AI ship design tables for ship and weapon specials

Information, How-to's, and discussion about mod'ing Master of Orion II.
Buddenbrook
Posts:48
Joined:Mon Jul 02, 2007 5:10 am
AI ship design tables for ship and weapon specials

Postby Buddenbrook » Thu Jul 19, 2007 10:47 am

Starts at 1F777C

Code: Select all

16 00 00 00 21 00 00 00 02 00 00 00 1A 00 01 00 19 00 01 00 23 00 00 00 27 00 01 00 1C 00 01 00 24 00 00 00 25 00 00 00 17 00 00 00 06 00 00 00 1F 00 00 00 11 00 00 00 08 00 00 00 02 00 00 00 12 00 00 00 26 00 00 00 15 00 00 00 0D 00 01 00 09 00 00 00 24 00 01 00 08 00 00 00 13 00 00 00 21 00 01 00 03 00 00 00 0E 00 00 00 1B 00 00 00 0D 00 00 00 14 00 00 00 1E 00 00 00 22 00 00 00 01 00 00 00 0F 00 00 00 19 00 00 00 20 00 00 00 10 00 00 00 05 00 00 00 22 00 00 00 0C 00 00 00 26 00 01 00 25 00 01 00 0A 00 00 00 23 00 01 00 22 00 01 00 18 00 00 00 0D 00 01 00 24 00 01 00 20 00 01 00 17 00 00 00 06 00 00 00 1F 00 00 00 1A 00 00 00 16 00 00 00 21 00 00 00 25 00 00 00 1C 00 00 00 1D 00 00 00 08 00 00 00 13 00 00 00 0D 00 00 00 26 00 00 00 15 00 00 00 0E 00 00 00 11 00 00 00 09 00 00 00 1B 00 00 00 12 00 00 00 02 00 00 00 1E 00 00 00 14 00 00 00 21 00 01 00 1A 00 00 00 0D 00 01 00 24 00 01 00 03 00 00 00 1D 00 00 00 08 00 00 00 13 00 00 00 0D 00 00 00 26 00 00 00 15 00 00 00 0E 00 00 00 11 00 00 00 09 00 00 00 1B 00 00 00 12 00 00 00 02 00 00 00 1E 00 00 00 14 00 00 00 21 00 01 00 1A 00 00 00 0D 00 01 00 24 00 01 00 03 00 00 00
Ends at 1F78F7

Format:

Sequences of 00 00 00 00

1 00 = Weapon/special numer
2 00 = always unused
3 00 = Weapon or special - 00 = special, 01=weapon
4 00 = always unused

From the start 5 x 00 00 00 00 x 7 = Seven different sequences for specified special preferences. Silicoid seem to use the first one with Phase Shifter (not in use), Subspace Teleporter, Augmented Engines and bio weapons, while Bulrathi use the second sequence with Transporters, Tractor Beams and so on. There are five specified specials in every sequence. The first in the list is first priority, subject to space allocation calculations. If it's not researched, then it follows the list down.

After the 7 specified sequences follows an 8. one which I initially thought was a specified sequence too, but seems to be something else (starts at IF7808). It originally has stuff like FMR's the AI doesn't ever seem to use, but these are not exclusive flags, because to exclude a special you simply won't place it into any of the sequences. The techs in this sequence do appear in the game on AI ships, but that seems about a 1/100 occurrance, even if AI has no other techs available.

The next sequence of 5 (x00 00 00 00) is shared by all races, and it includes Stellar Converter, Blackhole Generator, Energy Absorber, Plasma Web and Gyro Destabilizer.

The next 12x 00 00 00 00 sequence(s) remain a bit unclear, but they do appear in the game, albeit infrequently (very infrequently with ALT+Einstein, and could be tied to different phases of the game, although there are techs like Q-Detonator and Spatial Compressor involved). Whether these are race or ship hull size specific, I don't know. But look at the slot in which Warp Dissipater is originally placed, WAJ might be a better bet.

Then, starting at IF7860 follows the basic specials table for all races, with - as many people familiar with the game would have guessed - security stations in the first priority spot. It comes as a double (for what reason I don't know) but the first table doesn't seem to do anything, and it's the second one (starting at 1F78AC) that seems to count. Perhaps they had in mind two varying tables initially, but decided to go with just one.

How AI uses these tables? Bombs always take 10% of the allocation. How to change that, I have no idea. Then AI looks at the ship specials allocation, which is approximately 3/10, and picks as many techs from the basic specials, and specified specials tables as it can fit in that space. Generally it picks the first one on the priority list, but not always it if takes a lot of space.

Then AI proceeds to the table with SC, BHG (...) For doomstars it often seems to pick weapons from this table for 100% of the allocation (including energy absorber). So careful with that one or you end up with 40 tractor beams or 500 deathspores.

The other tables it does use, but how, or whether it is entirely random, I don't know.

NOTE that all ship specials and class 5 weapons and bio weapons whic are not included in these sequences won't be used by the AI. Ever. From deathspores (bio weapons are not bomb allocation) to anti-missile rockets to Achilles targeting Unit this seems to be so.

Couple of further notions: AI is able to use most of the techs, but not FMR's or H-X C's. Also take away BHG if you want to avoid those 7 BHG doomstars.
About stasis field I'm not sure. Before placing it on the list, I'd suggest you test it.
It does seem to attack twice with TWF, so that is fair game. As a small late game AI-bonus it's Damper field ships come with Shields on! That must be coded I'd guess, and cannot be changed easily.

All possible weapons can be placed in these sequences, but AI won't use modifications for them, so I'd suggest against it, unless it's a weapon with no significant modificationss.

Usage of the tables: To improve AI by placing the right (most effective) techs in the different sequences, with some cumulativity (also with racial abilities) and in balance with the continuum of MOOII scenarions and your personal mod. So that it will, if it lasts that long, take advantage of the best techs like ATU, AE's and Damper field and not ignore them in favour of Shield Capacitors, Multiphased Shields or whatever.

Another point concerns multiplayer games. AI will still be a lot weaker of course (unless it's a super race) but it can add variability to the mix, or better, replace human players who suddenly have to leave. At impossible AI will cheat a bit and use space allocation over the limits, so making up a bit for the 10% bombs. But it doesn't seem to use the space allocation given by Mega-fluxers, if that improves AI ship initiative, I haven't tested.

--------

When the AI has gone through these tables, only then it moves to the beams, torpedoes and missiles. But it does look like that AI preferences for these are coded, and follows different phases of the game. Possibly. So to get the early and mid game ship specials in the right order of priority to be in balance with the AI weapon preferences, this needs testing a bit.

How different races (or race picks!?) vary between the 7 specified sequences, also needs to be tested. I have only little idea due to limited testing.

And finally, note that you can always replace a slot with 00's if you don't want to use it.

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

Postby Lord Brazen » Thu Jul 19, 2007 5:58 pm

Great information. I was wondering what those tables were for.

Here are the names / offsets of the tables in that area of the EXE. These names have been extracted from the exe debug info. All are v1.31 offsets.

Code: Select all

001F777C _bio_weapon_spcl 001F7790 _capture_spcl 001F77A4 _cloaking_spcl 001F77B0 _beam_defense_spcl 001F77C0 _missile_defense_spcl 001F77E0 _armor_spcl 001F77EC _shield_spcl 001F77F8 _beam_offense_spcl 001F7814 _missile_offense_spcl 001F781C _special_weapons_spcl 001F7830 _special_device_spcl 001F7860 _defense_specials_f_spcl 001F78AC _defense_specials_t_spcl
"Stars are holes in the sky from which the light of the Infinite shine through." - Confucius.

User avatar
siron
Posts:504
Joined:Fri Jul 22, 2005 12:35 pm
Location:Hamburg
Contact:

Postby siron » Thu Jul 19, 2007 6:15 pm

Yes. The first 7 lists are so called Theme Specials and assigned at the beginning of the game. (Depends on race.)

Last both lists are identical IIRC. Designers had following in mind...

AI should use one of these lists depending on your best weapon.

List a: If your best weapon is not a beam weapon
List b: If your best weapon is a beam weapon....

Probably one of these lists disabled now.

Buddenbrook
Posts:48
Joined:Mon Jul 02, 2007 5:10 am

Postby Buddenbrook » Fri Jul 20, 2007 3:38 am

Code: Select all

001F777C _bio_weapon_spcl 001F7790 _capture_spcl 001F77A4 _cloaking_spcl 001F77B0 _beam_defense_spcl 001F77C0 _missile_defense_spcl 001F77E0 _armor_spcl 001F77EC _shield_spcl 001F77F8 _beam_offense_spcl 001F7814 _missile_offense_spcl 001F781C _special_weapons_spcl 001F7830 _special_device_spcl 001F7860 _defense_specials_f_spcl 001F78AC _defense_specials_t_spcl
Interesting. So the specified sequences are not all x5, but there are also sequences of 3 and 4. Beam and missile offense seem to occur extremely rarely though.

Correction: Time WF actually seems to be the first on the b_o list, and that's something I have seen a couple of times on AI ships. so the list is not completely defunct. Albeit it seems to occur very rarely in the game. Same with techs from the missile_o list. Recall that every time it has been Mrrshan. Could be that no other races use them?
Last edited by Buddenbrook on Fri Jul 20, 2007 3:54 am, edited 1 time in total.

Buddenbrook
Posts:48
Joined:Mon Jul 02, 2007 5:10 am

Postby Buddenbrook » Fri Jul 20, 2007 3:38 am

Yes. The first 7 lists are so called Theme Specials and assigned at the beginning of the game. (Depends on race.)

Last both lists are identical IIRC. Designers had following in mind...

AI should use one of these lists depending on your best weapon.

List a: If your best weapon is not a beam weapon
List b: If your best weapon is a beam weapon....

Probably one of these lists disabled now.
The first list seems disabled. So did you know of these earlier, have any experience in testing them?

It seems logical to place Damper, ATU, AE's, BS etc. on the "defense_specials" list so that all races will use the crucial techs when available and then stuff like tractor beams and cloaking device and sub s. teleporter and so forth into the race specific sequences.

User avatar
siron
Posts:504
Joined:Fri Jul 22, 2005 12:35 pm
Location:Hamburg
Contact:

Postby siron » Fri Jul 20, 2007 1:07 pm

Not tested the first list yet...

I have in mind to test it with menlo cheat...chemistry or power path....but not enough time for now. Have you tried this already?

Buddenbrook
Posts:48
Joined:Mon Jul 02, 2007 5:10 am

Postby Buddenbrook » Sat Jul 21, 2007 11:45 am

It would take quite a bit of testing to determine how different races vary between the 10 themes. And I'm not sure if that's necessary. Marine combat techs I'd keep in theme 2, because it seems that HG might affect races to pick this theme but other than that, the races are quite random. BHG won't work in the weapon specials sequence, but might work in one (or more) of the themes, because the space allocation rules are different. Haven't tested it yet, just an idea.

User avatar
siron
Posts:504
Joined:Fri Jul 22, 2005 12:35 pm
Location:Hamburg
Contact:

Postby siron » Sat Jul 21, 2007 12:28 pm

I wont say that it is just random. I would expect:
a) cybernetic race prefers armor theme
b) Alkari in beam defense theme
etc.

To clarify, I have to add that I actually meant the last 2 lists....there I would test with alt-menlo. Otherwise impossible to say if one of them is disabled or not.

Buddenbrook
Posts:48
Joined:Mon Jul 02, 2007 5:10 am

Postby Buddenbrook » Sat Jul 21, 2007 1:37 pm

I tested the two basic lists by removing all the techs from the first one, which didn't seem to affect anything - and by removing all the techs from the second one, which resulted in AI using none of the techs from the basic list. I tested this in two different modes with ALT+Einstein and Democracy+Charismatic+Telepathic letting the counter run till someone attacked in 3515-3535.

But you are right, there's a small possibility, the first list might be activated in some circumstances.

It's true the races don't vary randomly between the different themes (although some might), e.g. Meklar like the theme with Automated repair-unit, and Mrsshan prefer the two with offensive bonuses. I was just wondering how much there was to be gained from cumulativity with racepicks. In that sense most races are random when attemptiing to optimize the AI tactical combat ability.


Return to “Game Modifications”

Who is online

Users browsing this forum: No registered users and 30 guests