Master of Orion II: Battle at Antares/Calculations

This page contains small description of colony calculations engine. It was checked under 1.31 version of MoO2. Functions IF, ROUNDDOWN, ROUND, ROUNDUP and SQRT used below has the same meaning as in MS Excel or OpenOffice Calc.

Turn sequence
Each time "Turn" button was pushed next actions take place:

(1) population is increased/decreased,

(2) FP/PP/RP/Money are generated,

(3) new buildings is constructed,

(4) new colonists arrives by freighters (and battles take place),

(5) researches are finished (and, possibly, spies finish their jobs).

Sometimes it's important to know this sequence. For example, you have the last turn before enemy attacks your colony. Buying some ship or defensive building will help but finishing new technology will not.

Population growth
Notice, that game interface provide not all the information about population. Only total information is presented on the upper right corner of colony screen. So it may look strange in case of planet with several races. For example, you have a planet with colonists of two races. And each race has 1.6 millions of creatures (or 1,600k). In this case you will see one colonist of each race on the colony screen and number 3,200k on the upper right corner. Population increment is shown by the same way. Situation became even stranger if you move 1 colonist somewhere form this planet. In this case you will see the only colonist on the colony screen and 2,200k on the upper right corner.

Next formulae is used to calculate population growth for each race individually: population_increment = ROUNDDOWN(   basic_increment * ( 100% +     race_bonus + medicine_bonus + IF(cloning center exists, 100%, 0%) + housing_bonus ) / 100% ) -  food_lack_penalty

Basic_increment is the increment for 'normal' race without any bonuses and penalties: basic_increment = ROUNDDOWN( SQRT(2000 * colonist * free_space / planet_capacity) ) Where colonist is number of colonists of this race, planet_capacity is maximal number of colonists on the planet, free_space is space left for new colonists.

Race_bonus can be -50%, 0%, +50%, +100% (see ../Race_design_options);

Medicine_bonus is sum of technology bonus and leader bonus; medicine_bonus = IF( universal antidote is researched, 50%,   IF( microbiotics is researched, 25%, 0% ) ) + IF( colony leader is present, medicine skill, 0%);

Housing_bonus appears if 'housing' is picked in the build menu: housing_bonus = ROUNDDOWN( PP * 40 / colonist ), Where PP is just number of product points, colonist is number of colonists of this race

Food_lack_penalty appears when population have not enought food or production points (for cybernetic races). For non-cybernetic races: food_lack_penalty = 50 * food_lack For cybernetic races: food_lack_penalty = 25 * food_lack + 25 * production_lack If colony has colonists of several races it is not clear how food lack will be divided between them.

Food, production and research points
All the points calculates as a sum of values of 3 kinds: P = P_const + ROUND( P_base + P_bonus )

P_const are some point produced permanently by buildings: farming - hydroponic farms +2, subterranean farms +4; production - automated factories +5, robo miners +10, deep core mine +15, robotic factory from +5 for ultra poor to +25 for ultra rich, recyclotron +population (adds population value); research - research laboratory +5, planetary supercomputer +10, galactic cybernet +15, autolab +30.

P_base is sum of colonists number multiplied to 'basic_coeff' over the races; basic_coeff = planet_coeff + race_coeff + tech_coeff + buildings_coeff Planet_coeff depends on a planet type generally; there are two exceptions: biomorphic fungi allows all the 'no farming' colonies produce food with planet_coeff=1; aquatic races has +1 for farming planet_coeff on tundra, ocean and terrain planets.

Race_coeff is depends on racial bonuses.

''Tech_coeff depends on got achievements: farming - no bonuses; production - microlite construction +1; research - hightening intelligence +1 to players' race.

Building_coeff generated by buildings: farming - soil enrichment +1, weather controller +2, astro university +1; production - automated factories +1, robo miners +2, deep core mine +3, astro university +1; research - research laboratory +1, planetary supercomputer +2, galactic cybernet +3, astro university +1.

P_bonus is a sum of different bonuses and penalties: P_bonus = P_total - P_colonist - P_pollution P_total is a part of P_base: P_total = C_total * P_base Where C_total is formed by government, morale and colony leader: unification and galactic unification ignores morale and got +50% and +100% for farming and production, for other governments morale just adds to C_total; democracy (federation) and feudal (confederation) got +50 (+75%) and -50% (-25%) to research; leader skills adds to C_total.

P_colonist is a sum of penalties for each colonist (it is calculated for each colonist and can be presented in two equal forms: as a part of P_base for some group of colonists, or as a part of basic_coeff for each colonist separately): conquered colonists got 25% penalty; if colony has 'wrong' gravity for the race and has no gravity generator, colonist got 25% or 50% penalty; blockaded colony has penalty 50% for farming and production.

Production has extra penalty - pollution. It is calculated as: pollution = ROUNDUP( ROUND( PP_base + PP_bonus ) / pollution_divisor * leader_coeff * tolerance - planet_size ), Where ROUND( PP_base + PP_bonus ) is a part of PP except the constantly produced by buildings PP_const. Pollution_divisor defines basic amount of pollution: pollution_divisor = 2 * IF( pollution processor is built, 2, 1 ) * IF( atmospheric renewer is built, 2, 1 ) Leader can remove part of pollution: leader_coeff = ( 100% - value_of_environmentalist_skill ) / 100% Tolerance = 1 - tolerant_population / total_population - is a part of non-tolerant population (so, fully tolerant population does not generate pollution). Planet_size is in a range from 1 to tiny to 5 for huge planets, nano disassemblers increases this value two times. Negative pollution ignores. Core waste dumps removes any pollution.

Money generation
Money generation looks to be calculated in a little bit different way - rounding take place for each bonus separately: income = special_income + population_income + bonus_income - building_maintenance Special_income appears on planets with gold (+5) and gem (+10) deposits. population_income = ROUND( population * income_coeff ) Where population is a colonists number. income_coeff = 1 + empire_bonus + government_bonus Where empire_bonus can be -0.5, 0, +0.5 and +1 BC/colonist, government_bonus is +50% (+75%) for democracy (federation) and 0% otherwise. bonus_income = IF( space port is built, ROUND( (special_income+population_income)/2 ), 0 ) + IF( stock exchange is built, special_income+population_income, 0 ) + IF( galactic currency exchange is researched, ROUND( (special_income+population_income)/2 ), 0 ) + ROUND( (special_income+population_income) * morale ) + IF( colony leader present, ROUND( (special_income+population_income) * financial_leader_skill ), 0 )

building_maintenance = ROUND( building_maintenance_base * maintenance_coeff ) Where building_maintenance_base - is a sum of maintenance over all the buildings on a planet. Maintenance_coeff depends on climate, there are 50% penalty for toxic and 25% for radiated and desert.

Cost of the buying things
X is a number of PP to make the thing, and Y is already produced PP.