Base food calculations

Information, How-to's, and discussion about mod'ing Master of Orion II.
User avatar
Lord Brazen
Site Admin
Posts:162
Joined:Mon Jul 18, 2005 10:16 pm
Location:Toronto, Canada
Contact:
Base food calculations

Postby Lord Brazen » 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:

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
Now calculate effect of Biomorphic Fungi (it applies only to food barren planets):

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
Next calculate normal farming value (biomorphic fungi makes food barren planets farmable):

Code: Select all

Normal_farming_value = (Planet_food_value * 2) + Biomorphic_bonus
Next we add in effects of race picks (race food bonuses only apply to farmable planets):

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)
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.

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.
For Swamp and Tundra planets:

Code: Select all

Aquatic_bonus = (Terran_value - Planet_value)*2
But for Terran and Ocean planets:

Code: Select all

Aquatic_bonus = (Gaia_value - Planet_value)*2
And for all other planet environment classes:

Code: Select all

Aquatic_bonus = 0
Here is the value that is displayed for base food (Aquatic bonuses only apply to farmable planets):

Code: Select all

Base_food = (Food_after_bonus + Aquatic_bonus)/2 Note: Base_food is always rounded down.
"Stars are holes in the sky from which the light of the Infinite shine through." - Confucius.

User avatar
dirt-bag
Posts:33
Joined:Sun Jul 31, 2005 8:16 pm

Postby dirt-bag » Thu Aug 11, 2005 9:23 am

so aquatic does NOT treat oceans and terrans as gaia?

i have never noticed a difference between ocean and gaia for an aquatic race

User avatar
Lord Brazen
Site Admin
Posts:162
Joined:Mon Jul 18, 2005 10:16 pm
Location:Toronto, Canada
Contact:

Postby Lord Brazen » Thu Aug 11, 2005 11:58 am

so aquatic does NOT treat oceans and terrans as gaia?

i have never noticed a difference between ocean and gaia for an aquatic race
Well if you look at the formulas.

But for Terran and Ocean planets:

Code: Select all

Aquatic_bonus = (Gaia_value - Planet_value)*2
In short this makes Terran, Ocean, and Gaia planets all have the same food base for Aquatic races.

I'll post some tables with everything calculated out later today.

User avatar
Lord Brazen
Site Admin
Posts:162
Joined:Mon Jul 18, 2005 10:16 pm
Location:Toronto, Canada
Contact:

Postby Lord Brazen » Thu Aug 11, 2005 1:19 pm

Here it is all calculated out for you:

Code: Select all

Non-Aquatic Race Without Biomorphic Fungi 0.5 food norm +1 food +2 food Toxic 0 0 0 0 Radiated 0 0 0 0 Barren 0 0 0 0 Desert 0 1 2 3 Tundra 0 1 2 3 Ocean 1 2 3 4 Swamp 1 2 3 4 Arid 0 1 2 3 Terran 1 2 3 4 Gaia 2 3 4 5

Code: Select all

Non-Aquatic Race With Biomorphic Fungi 0.5 food norm +1 food +2 food Toxic 0 1 2 3 Radiated 0 1 2 3 Barren 0 1 2 3 Desert 0 1 2 3 Tundra 0 1 2 3 Ocean 1 2 3 4 Swamp 1 2 3 4 Arid 0 1 2 3 Terran 1 2 3 4 Gaia 2 3 4 5

Code: Select all

Aquatic Race Without Biomorphic Fungi 0.5 food norm +1 food +2 food Toxic 0 0 0 0 Radiated 0 0 0 0 Barren 0 0 0 0 Desert 0 1 2 3 Tundra 1 2 3 4 Ocean 2 3 4 5 Swamp 1 2 3 4 Arid 0 1 2 3 Terran 2 3 4 5 Gaia 2 3 4 5

Code: Select all

Aquatic Race With Biomorphic Fungi 0.5 food norm +1 food +2 food Toxic 0 1 2 3 Radiated 0 1 2 3 Barren 0 1 2 3 Desert 0 1 2 3 Tundra 1 2 3 4 Ocean 2 3 4 5 Swamp 1 2 3 4 Arid 0 1 2 3 Terran 2 3 4 5 Gaia 2 3 4 5


Return to “Game Modifications”

Who is online

Users browsing this forum: No registered users and 39 guests