Formulas
Formulas
Central overview of all formulas verified in the pr0game source code. Details, derivation and parameter tables are on the respective linked individual page — this page only has the compact mathematical notation for quick reference.
Distance
Distance between two coordinates. Used in Flight Time,
Fuel Consumption, Missile Flight Time (special case, see there).
Source: getTargetDistance().
Different galaxy (standard universe type):
Different galaxy (ring universe, uni_type=2):
Different galaxy (linear universe, uni_type=1):
Same galaxy, different system (analogous ring/linear/standard, plus additive constant):
Same system, different planet:
Same planet (planet↔moon):
Flight Time
Flight duration of a normal fleet. Used for every fleet
dispatch as well as in the fuel consumption formula. Source:
getMissionDuration().
- = speed factor (10–100%), = speed of the slowest ship, = optional player bonus (default 1), minimum value 5 seconds.
Missile Flight Time
Its own, simpler flight time formula for Interceptor Missiles/Interplanetary Missiles
— depends only on system distance. Source: getMIPDuration().
Game Speed
Global speed factor, feeds into Flight Time and
Missile Flight Time. Configurable per universe
(fleet_speed). Source: getGameSpeedFactor().
Fuel Consumption
Deuterium consumption of a flight mission, calculated per ship type and
summed up. Used for every fleet dispatch. Source:
getFleetConsumption().
Sum over all ship types in the fleet, multiplied by the attacker's honor points fuel factor, rounded up:
Build Cost Per Level
Cost scaling for buildings and research (not for ships/defense —
those cost a constant amount per unit built, see respective unit page).
Used on all building/research pages. Source:
uni1_vars.factor/cost901-911.
- = base cost (level 1), = cost factor (typically 1.5–2.0, varies per building), = target level.
Production Formula (Example: Metal Mine)
Resource production per building and level — the specific formula is
listed individually on each building page under "Production Formula"
(from uni1_vars.production901-911). Used for
Metal Mine and all other producing buildings.
- = building level, = bonus from Production Maximization Metal, Production Maximization Crystal and Production Maximization Deuterium
Storage Formula (Example: Metal Storage)
Storage capacity per building and level — listed individually on each
storage building page under "Storage Formula" (from
uni1_vars.storage901-903). Used for
Metal Storage and the other resource storage buildings.
Honor Points Fuel Discount
Discount on your own fuel consumption depending on your own
honor points rank. See Honor Points for details.
Source: calculate_honorpoints_boost().
Honor Points Plunder Factor
Multiplier on the base plunder rate (50% per resource) depending on the
honor points of the attacked target. See Honor Points for
details. Source: calculate_honorpoints_decrease() +
BattleHandler.php.
Resource Protection
Share of daily production that is protected from plunder regardless of
the plunder rate. Used in every battle involving resource plunder,
depending on the respective storage building level (see
Metal Storage, Crystal Storage, Deuterium Tank). Source:
BattleHandler.php.
- = daily production of the respective resource, = level of the associated storage building (max. 10% protection from level 10 onward).