Offsets for AI Ship Design Tables
Posted: Mon Jun 25, 2012 11:43 pm
Greetings!
Well, I fired up MOO2 this past weekend after a long hiatus, and it wasn’t too long before I was vaporizing huge AI fleets with my 22 “Mongoose” battleships. After the fun of that wore off, I pulled out my MOO2 Official Strategy Guide and went looking for some better competition. It took a few hours, but I found it:
OFFSETS FOR AI SHIP DESIGN TABLES
Orion2.exe – 1F7904 thru 1F7D83
Orion95.exe – 155B70 thru 155FEF
1152 bytes
There are 8 ship tables, not 6 as shown in the guide, so there can be 8 different models for a given size ship. This may be the reason the AI ships often have numerals I – VIII in their name, but the numeral doesn’t always match the table used to build the ship, and varies by race. The ships may simply be numbered by which model was built first, or some other factor.
Each table has 144 bytes which are percentages of 12 categories of equipment to be installed in the available ship space. There are 24 bytes (12 words) for each of the 6 ship sizes, from smallest to largest.
Table 1 matches the “Standard Beam” model from figure 4-15 in the strategy guide, and looks thusly (from Orion95.exe, spaced for clarity):
(Frigate)
FF FF FF FF FF FF 0F 00 FF FF FF FF FF FF FF FF
FF FF 55 00 FF FF 00 00
(Destroyer)
0A 00 00 00 FF FF 05 00
FF FF FF FF FF FF FF FF 2D 00 1E 00 FF FF 0A 00
(Cruiser)
0F 00 00 00 FF FF 00 00 FF FF FF FF FF FF 0A 00
1E 00 1E 00 FF FF 0F 00
(Battleship)
0F 00 00 00 FF FF 05 00
FF FF FF FF FF FF 0F 00 19 00 19 00 FF FF 0F 00
(Titan)
0F 00 00 00 FF FF 0A 00 FF FF FF FF FF FF 0F 00
19 00 14 00 FF FF 0F 00
(Doom Star)
0F 00 00 00 FF FF 0F 00
FF FF FF FF FF FF 0F 00 14 00 14 00 FF FF 0F 00
There are a few anomalies, but as near as I can figure, these are the 12 equipment categories:
Word 1 Theme Special -- specials based on one of 7 racially assigned themes (according to guide)
a. Bio Weapons -- teleporter, augmented engines, death spores, etc
b. Capture -- transporters, assault shuttles, tractor beam, troop pods, etc
c. Cloaking -- cloaking device, stealth field, phasing cloak
d. Beam Defense -- inertial stabilizer/nullifier, augmented engines
e. Missile Defense -- jammers, lightning field, spatial compressor, anti-m rockets , etc
f. Armor -- heavy armor, reinforced hull, automated repair
g. Shield -- hard shields, multi-phased shields, shield capacitors
Word 2 Beam Special
Word 3 Missile Special
Word 4 Defense Special
Word 5 Special Weapon
Word 6 Special Device
More information on categories 1-6 can be found in this thread viewtopic.php?t=492
Word 7 Missile x5 or Torpedo
Word 8 Missile x2 or Torpedo
Word 9 Heavy Beams
Word 10 Beams
Word 11 Point Defense Beams
Word 12 Bombs
So using the battleship from table 1 above as an example, it would contain:
15% theme specials (word 1 - 0F 00)
0% beam specials (word 2 - 00 00)
5% defense specials (word 4 - 05 00)
15% missile x2 or torpedo (word 8 - 0F 00)
25% heavy beams (word 9 - 19 00)
25% beams (word 10 - 19 00)
15% bombs (word 12 - 0F 00)
I have tried changing some of the FF FF word values in the tables, but they seem to be ignored, so it probably indicates an invalid selection for that ship. The 00 00 values can be changed, and I suspect they are there so any unused/leftover percentages from previous categories will carry over into the next valid slot. I’m not certain that always happens.
Note that all the ships in table 1 have 0% beam specials, which explains why the AI never uses specials like the Achilles unit. This is the first setting I tested with and I got the AI to produce some rather potent ships bristling with heavy Plasma Cannons and the HEF/Achilles/Structural Analyzer beam trifecta. Unfortunately, the other 7 ship design tables have the FF FF in the beam specials slots, and changing it had no apparent effect.
The other 7 tables are formatted in the same fashion
Table 2 matches the “Hybrid” model from figure 4-17 in the guide. Heavy beams, beams, bombs and a decent complement of 5x missiles.
Table 3 is just like table 2 except uses 2x missiles instead of 5x.
Table 4 is very close to the “Standard Missile” model from figure 4-16 in the guide. The numbers in the guide show high percentages of bombs and low percentages of 10x missiles. The game code has lots of 2x missiles and only a few bombs. It may be a typo in the strategy guide, but needs verification.
Table 5 is close to the “Carrier” model from figure 4-18 in the guide. The guide shows high percentages of bomber bays, but in the code those numbers are in word 7, which was used for missile x5 in the Hybrid model. Perhaps word 7 is used for bomber bays, and word 8 is all missiles, with some other factor determining the ammo count. Or some tables could be interpreted differently than others. Lots of testing needed.
Table 6 matches the “Special Device” model from figure 4-20 in the guide. See Buddenbrook’s thread referred to in the equipment categories section above for details on special devices. This may be where the dreaded security stations come from.
Table 7 is similar to table 8 except the Doom Star has no beam weapons and a higher percentage of special weapons.
Table 8 matches the “Special Weapon” model from figure 4-19 in the guide. Again, see Buddenbrook’s thread for details.
Much of this was taken from the strategy guide, so is subject to verification. Any insights, additions, corrections or comments are most welcome. Among other things, I am curious to see if more than 100% of the ship space can be allocated.
Apologies if this is already posted elsewhere, but I could not find it among all the excellent info posted here. Happy modding!
Meson
Well, I fired up MOO2 this past weekend after a long hiatus, and it wasn’t too long before I was vaporizing huge AI fleets with my 22 “Mongoose” battleships. After the fun of that wore off, I pulled out my MOO2 Official Strategy Guide and went looking for some better competition. It took a few hours, but I found it:
OFFSETS FOR AI SHIP DESIGN TABLES
Orion2.exe – 1F7904 thru 1F7D83
Orion95.exe – 155B70 thru 155FEF
1152 bytes
There are 8 ship tables, not 6 as shown in the guide, so there can be 8 different models for a given size ship. This may be the reason the AI ships often have numerals I – VIII in their name, but the numeral doesn’t always match the table used to build the ship, and varies by race. The ships may simply be numbered by which model was built first, or some other factor.
Each table has 144 bytes which are percentages of 12 categories of equipment to be installed in the available ship space. There are 24 bytes (12 words) for each of the 6 ship sizes, from smallest to largest.
Table 1 matches the “Standard Beam” model from figure 4-15 in the strategy guide, and looks thusly (from Orion95.exe, spaced for clarity):
(Frigate)
FF FF FF FF FF FF 0F 00 FF FF FF FF FF FF FF FF
FF FF 55 00 FF FF 00 00
(Destroyer)
0A 00 00 00 FF FF 05 00
FF FF FF FF FF FF FF FF 2D 00 1E 00 FF FF 0A 00
(Cruiser)
0F 00 00 00 FF FF 00 00 FF FF FF FF FF FF 0A 00
1E 00 1E 00 FF FF 0F 00
(Battleship)
0F 00 00 00 FF FF 05 00
FF FF FF FF FF FF 0F 00 19 00 19 00 FF FF 0F 00
(Titan)
0F 00 00 00 FF FF 0A 00 FF FF FF FF FF FF 0F 00
19 00 14 00 FF FF 0F 00
(Doom Star)
0F 00 00 00 FF FF 0F 00
FF FF FF FF FF FF 0F 00 14 00 14 00 FF FF 0F 00
There are a few anomalies, but as near as I can figure, these are the 12 equipment categories:
Word 1 Theme Special -- specials based on one of 7 racially assigned themes (according to guide)
a. Bio Weapons -- teleporter, augmented engines, death spores, etc
b. Capture -- transporters, assault shuttles, tractor beam, troop pods, etc
c. Cloaking -- cloaking device, stealth field, phasing cloak
d. Beam Defense -- inertial stabilizer/nullifier, augmented engines
e. Missile Defense -- jammers, lightning field, spatial compressor, anti-m rockets , etc
f. Armor -- heavy armor, reinforced hull, automated repair
g. Shield -- hard shields, multi-phased shields, shield capacitors
Word 2 Beam Special
Word 3 Missile Special
Word 4 Defense Special
Word 5 Special Weapon
Word 6 Special Device
More information on categories 1-6 can be found in this thread viewtopic.php?t=492
Word 7 Missile x5 or Torpedo
Word 8 Missile x2 or Torpedo
Word 9 Heavy Beams
Word 10 Beams
Word 11 Point Defense Beams
Word 12 Bombs
So using the battleship from table 1 above as an example, it would contain:
15% theme specials (word 1 - 0F 00)
0% beam specials (word 2 - 00 00)
5% defense specials (word 4 - 05 00)
15% missile x2 or torpedo (word 8 - 0F 00)
25% heavy beams (word 9 - 19 00)
25% beams (word 10 - 19 00)
15% bombs (word 12 - 0F 00)
I have tried changing some of the FF FF word values in the tables, but they seem to be ignored, so it probably indicates an invalid selection for that ship. The 00 00 values can be changed, and I suspect they are there so any unused/leftover percentages from previous categories will carry over into the next valid slot. I’m not certain that always happens.
Note that all the ships in table 1 have 0% beam specials, which explains why the AI never uses specials like the Achilles unit. This is the first setting I tested with and I got the AI to produce some rather potent ships bristling with heavy Plasma Cannons and the HEF/Achilles/Structural Analyzer beam trifecta. Unfortunately, the other 7 ship design tables have the FF FF in the beam specials slots, and changing it had no apparent effect.
The other 7 tables are formatted in the same fashion
Table 2 matches the “Hybrid” model from figure 4-17 in the guide. Heavy beams, beams, bombs and a decent complement of 5x missiles.
Table 3 is just like table 2 except uses 2x missiles instead of 5x.
Table 4 is very close to the “Standard Missile” model from figure 4-16 in the guide. The numbers in the guide show high percentages of bombs and low percentages of 10x missiles. The game code has lots of 2x missiles and only a few bombs. It may be a typo in the strategy guide, but needs verification.
Table 5 is close to the “Carrier” model from figure 4-18 in the guide. The guide shows high percentages of bomber bays, but in the code those numbers are in word 7, which was used for missile x5 in the Hybrid model. Perhaps word 7 is used for bomber bays, and word 8 is all missiles, with some other factor determining the ammo count. Or some tables could be interpreted differently than others. Lots of testing needed.
Table 6 matches the “Special Device” model from figure 4-20 in the guide. See Buddenbrook’s thread referred to in the equipment categories section above for details on special devices. This may be where the dreaded security stations come from.
Table 7 is similar to table 8 except the Doom Star has no beam weapons and a higher percentage of special weapons.
Table 8 matches the “Special Weapon” model from figure 4-19 in the guide. Again, see Buddenbrook’s thread for details.
Much of this was taken from the strategy guide, so is subject to verification. Any insights, additions, corrections or comments are most welcome. Among other things, I am curious to see if more than 100% of the ship space can be allocated.
Apologies if this is already posted elsewhere, but I could not find it among all the excellent info posted here. Happy modding!
Meson