Top > Programming > Master of Orion 2 > Lastrace.RAC


In version 1.31, the ability to play as the previously-entered custom race was added. The file lastrace.rac contains that data.

File Format Overview
Government
Offset Value Meaning
0x00 0x00 Feudal
0x01 Confederation
0x02 Dictatorship
0x03 Imperium
0x04 Democracy
0x05 Federation
0x06 Unification
0x07 Galatic Unification
0x08 and above crashes out immediately after clicking on "Custom"
Bonuses
Only the four values listed for each bonus will work. Any other value will be silently treated like 0x00.
Offset Value Meaning
0x01 0x00 No growth bonus
0x32 +50% population growth
0x64 +100% population growth
0xCE -50% population growth
0x02 0xFF -1/2 food
0x00 No food bonus
0x02 +1 food
0x04 +2 food
0x03 0xFF -1 production
0x00 No production bonus
0x01 +1 production
0x02 +2 production
0x04 0xFF -1 research
0x00 No research bonus
0x01 +1 research
0x02 +2 research
0x05 0xFF -.5 BC
0x00 No money bonus
0x01 +.5 BC
0x02 +1 BC
0x06 0xEC Ship defense -20
0x00 No ship defensive bonus
0x19 Ship defense +25
0x32 Ship defense +50
0x07 0xEC Ship offense -20
0x00 No ship offensive bonus
0x14 Ship offense +20
0x32 Ship offense +50
0x08 0xF6 Ground combat -10
0x00 No ground combat bonus
0x0A Ground combat +10
0x14 Ground combat +20
0x09 0xF6 Spying -10
0x00 No espinoige bonus
0x0A Spying +10
0x14 Spying +20
Attributes
0x00 disables an attribute, 0x01 enables it. Any other value will be treated like 0x00. If two mutually exclusive attributes (like Repulsive and Charismatic) are enabled, the first one on this list is enabled and the second is disabled.
Offset Meaning
0x0A Low-G World
0x0B High-G World
0x0C Aquatic
0x0D Subterranean
0x0E Large Home World
0x0F Rich Home World
0x10 Artifacts World
0x11 Cybernetic
0x12 Lithovore
0x13 Repulsive
0x14 Charismatic
0x15 Uncreative
0x16 Creative
0x17 Tolerant
0x18 Fantastic Traders
0x19 Telepathic
0x1A Lucky
0x1B Omniscient
0x1C Stealthy Ships
0x1D Trans-Dimensional
0x1E Warlord
Race Picture
Offset Value Meaning
0x1F 0x00 Alkari
0x01 Bulrathi
0x02 Darlocks
0x03 Elerians
0x04 Gnolams
0x05 Humans
0x06 Klackons
0x07 Meklars
0x08 Mrrshan
0x09 Psilons
0x0A Sakkra
0x0B Silicoids
0x0C Trilarians
0x0D and above Crashes with a Windows dialog box that says: "RACENAME.LBX [entry 0] exceeds number of defined records"
Name
Offset Length Comment
0x20 0x0F bytes If there is less than 15 characters in the chosen name, there is null after last character. No null is needed if there are exactly 15 characters, although the game will not let you choose a 15-character name in the Custom Race screen.

I found it curious that the designers chose to use the values of the bonuses instead of using a bitfield, as they did for the Heroes. Having a series of bytes that are either 0 or 1 also seems wasteful to me, but then again the entire file is 47 bytes long, so I suppose it's not really an issue.