Variable names (Hull_mass, Native_race, ...) should be self-explanatory. We use common arithmetic notation. In particular, / is a fractional division.

Configuration options are specified verbatim, with links to their description. Eff_ConfigOption denotes the value of the ConfigOption modified by experience modifiers EModConfigOption.

Internally, PHost often uses people counts for populations, which were also used in the older documentation. For this document, numbers have most of the time been converted to the the more familiar clans. Since VGA Planets does not support fractional clans, PHost truncates after each step anyway. Some formulas still use people counts. For those, Colonist_clans is the clan count (e.g. 32), Colonists is the people count (e.g. 3200).

When a series of "if..." sentences is given, take the first applicable one.

Abs(X)Absolute value of X
ArcTan(X,Y)Arc-tangent of X/Y (four-quadrant), angle in radiant
With X, Y being X/Y displacements, this will produce an angle which, when converted to degrees, corresponds to the one reported in scanner reports (0=North, 90=East, 180=South, 270=West). Note that the conventional mathematical definition of the ArcTan function gives it Y/X as a parameter, not X/Y, which produces different angles (0=East, counterclockwise).
Ceil(X)Next-larger integer, preserving the sign (round up if there is any fractional part). For example, Ceil(10.0) = 10, Ceil(10.1) = 11, Ceil(-5.2) = -6
Cos(X)Cosine of X, argument is in radiants
ERnd(X)Round X to integer (round towards nearest integer; round towards nearest even number if ends in .5 exactly)
Exp(X)Exponential of X (2.7182^X)
Ln(X)Natural logarithm of X
Max(X,Y,...)Maximum
Min(X,Y,...)Minimum
PIThe number π = 3.14159265358979323846
Random(X)Random integer, between 0 (inclusive) up to X (not inclusive). For example, Random(3) yields one of 0, 1, 2.
Round(X)Round X to integer (round towards nearest integer; round up if ends in .5 exactly)
Sgn(X)Sign of X (+1 if positive, -1 if negative, 0 if zero)
Sin(X)Sine of X, argument is in radiant
Sqrt(X)Square-root of X
Trunc(X)Truncate X to integer (remove fractional part). For example, Trunc(10.0) = 10, Trunc(10.1) = 10, Trunc(-5.2) = -5
X^NX to the Nth power
This is a testing version.
It may be incomplete, and have more bugs (or features) than the public live version at planetscentral.com.