Base food calculations
Posted: Sat Aug 06, 2005 11:29 pm
For those that have asked for food formulas, base food (what you see when you right click a planet) calculations are very simple.
First define some of the variables:
Now calculate effect of Biomorphic Fungi (it applies only to food barren planets):
Next calculate normal farming value (biomorphic fungi makes food barren planets farmable):
Next we add in effects of race picks (race food bonuses only apply to farmable planets):
Aquatic calculations are based on the following table. This table is used for the Aquatic_bonus calculations below. The table contains a value for each planet environment class (1 byte for each). Also, define some variables.
For Swamp and Tundra planets:
But for Terran and Ocean planets:
And for all other planet environment classes:
Here is the value that is displayed for base food (Aquatic bonuses only apply to farmable planets):
First define some of the variables:
Code: Select all
Planet_food_value = food value from the individual planet in the planets table
Race_food_bonus = 0 when no farming race pick
= -1 when -1/2 food race pick
= 2 when +1 food race pick
= 4 when +2 food race pick
Code: Select all
Barren_flag = 0 when Planet_food_value > 0
= 1 when Planet_food_value = 0
Biomorphic_flag = 0 when you do not have Biomorphic Fungi
= 1 when you do have Biomorphic Fungi
Biomorphic_bonus = Biomorphic_flag * Barren_flag * 2
Code: Select all
Normal_farming_value = (Planet_food_value * 2) + Biomorphic_bonus
Code: Select all
Farmable_flag = 0 when Normal_farming_value is 0
= 1 when Normal_farming_value is > 0
Food_after_bonus = Normal_farming_value + (Race_food_bonus * Farmable_flag)
Code: Select all
Table at offset 0x1F3E70 in orion2.exe file.
00 00 00 01 01 02 02 01 02 03
Terran_value = 9th value from the table above.
Gaia_value = 10th value from the table above.
Planet_value = nth value from the table above where n is the planet environment class.
Code: Select all
Aquatic_bonus = (Terran_value - Planet_value)*2
Code: Select all
Aquatic_bonus = (Gaia_value - Planet_value)*2
Code: Select all
Aquatic_bonus = 0
Code: Select all
Base_food = (Food_after_bonus + Aquatic_bonus)/2
Note: Base_food is always rounded down.