AI modding?

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 modding?

Postby Buddenbrook » Mon Jul 02, 2007 6:23 am

Hello

I have been modding MOOII ever since OCL became available.

I have only played off line humans + AI multiplayer games and haven't experienced many notable bugs (we don't cheat) or notable lag with w95 version (other than the 255+ ship combat bug), so my experiences are in modding 1.31, but it shouldn't make much difference from what I understand.

The original 1.31 AI even as super races and at impossible difficulty level made the game practically unplayable, because of it's chronic weaknesses.
It wasn't impossible to take down 10 doomstars with 2 Titans. The AI didn't take advantage of cumulative bonuses in ship design, whether defensive or attack bonuses. It didn't specialize in anything. All the ships were a bit of everything, cumulating in nothing. In the end you put together damper field, heavy armor, reinforced hull, structural analyzer and Achilles Targeting Unit with Disrupter or Plasma Cannon and with one fleet you could move from a star to another easily adding a whole civilization to your empire.

It is possible (as you probably well know) to mod this away with OCL. Make tech advancement slower, early fuel cells with longer ranges (but not by much) and early ship building quicker, almost instant, so there will be more battles with early technologies.

Disable all automatic repair for everyone else but cybernetic races and specialized leaders. Make battle stations and star fortresses multiple times more formidable. The same for planetary missile bases (hexedit). Combined with no auto repair this makes it more difficult to make these quick raids, in which you can destroy the AI in a few turns.

Make missiles and torpedoes relatively much much stronger, because AI will use them anyway. So strong in fact, that you might even consider putting a jammer or a few defensive lasers on your ship.

Use the exclusion flags to restrict cumulative bonuses, and/or/alternatively make the space demands vastly different, to more accurately reflect the impact of the different techs.

Make the ship drives stronger. to the extent of 5x The easiest way to destroy AI ships was to overload their drives with the right tech combinations.

Add in-built bonuses to later beam technology, to compensate for AI's refusal to use ATU or SA.

Humans will still be stronger, but playing with impossible, the AI will cheat by adding weaponry over the space limits to further compensate the off balance in cumulativity.

Artificially fast building (at Impossible) will compensate for the fact that the AI don't take advantage of early colony bases, outpost ships etc.

Blitzing can be restricted by radically altering the tech pick points. And by removing the droids (our preference) or making it more costly to build them. (Again cumulative bonuses with initial race picks)

And you can add a bit of variability by removing some of the keytechs from the tech tree and giving them to leaders with telepathy bonuses (so making it more difficult to steal them).

You may also consider race specific tech trees and removing the Guardian and placing the techs in the tree or giving them to leaders.

I also like to place Loknar and the Antaran into the leader pool and making the leaders more significant, with survival pods as an early must-build.

OK, there are other nuances and variations, but that should be enough to make the AI an interesting addition to multiplayer games with 2-3 human players and not just a helpless bystander waiting to be slaughtered.


*******

Yet... although it has made the game playable (and it still is years later, once or twice a year an 8 player marathon) it's far from perfect.

The AI won't ever use Damper field, Achilles targeting Unit, Structural Analyzer, Reflection field, Rangemaster Unit, High Energy Focus, Time Warp facilitator etc. which takes away from the importance of technological advancement and reduces combat variability.

Generally AI would put a scout lab on it's ships before any beam bonuses. Even if you remove all the other techs and make laser bonuses to take 1 space, it's highly probable it won't use any of them. So for some bizarre reason this is in the game code I assume?

I don't know much about coding really, but you might think it's simple on/off flags, or numerical preferences (AI loves security stations) which for some bizarre reason have been turned off for later game techs and beam bonuses?

If someone could find these in the game code with a couple of basic changes playability could be improved significantly. The same applies to a few colony techs, but at impossible, it's not equally important.

I have not been able to find anything on the net, but does anyone know how to get the AI to take advantage of late game keytechs and beam bonuses?

Yxklyx
Posts:39
Joined:Tue Jun 19, 2007 9:50 am

Postby Yxklyx » Mon Jul 02, 2007 7:33 am

Sorry, I can't help but I wonder who has the original source code. Sometimes these things leak out. I myself have early source to a popular game. When would the source code enter the public domain?

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

Postby Buddenbrook » Fri Jul 06, 2007 7:28 am

Lord Brazen and the Russian who wrote ocl have done a great job in helping us to mod MOO2. Most of the important aspects in the game can be balanced and customized now. If someone could locate the offsets within Orion2.exe for AI Ship Design the last major step in modding could be taken. The ship specials in OCL come with a lot of flags, but none of them affect AI.
Many/most(?) of us want to play with friends, which usually means 2-3 human players and AI thrown in. Also there are many who play single player games when other options are not available.

There must be a simple reason that the AI nearly always chooses security stations, but doesn't use any of the beam specials like structural analyzer or rangemaster unit. If someone could locate this in the .exe, you could give ATU the same value that security stations now have.

Obviously the AI use one basic formula for all it's ship design in which weapons, bombs and specials are given numeric values as % of the total space (+ bit of extra at impossible). Could these be located too?

If these were located, what could possibly be achieved is that:

1. AI utilizes the best ship specials, so watchout if they get ATU before you

2. AI uses the ship space more wisely and in balance with your mod

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

Postby siron » Sun Jul 08, 2007 6:41 pm

You made some good observations in this thread. But...
Obviously the AI use one basic formula for all it's ship design in which weapons,
...it is surely a bit more complicated than this. I am sure design is race-specific for example.

I am hopeful we see a new DC version in the next months that will include improved Antarans and AI. I could need a few beta testers who are willing to play the AI. ;) Anyone who is interested can mail or pm me.

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

Postby Buddenbrook » Fri Jul 13, 2007 2:01 pm

You made some good observations in this thread. But it is surely a bit more complicated than this. I am sure design is race-specific for example.
Well I have tested it. and the ratios seem clear.

60% weaponry 10% bombs 30% anything else. There seems to be no race variability to those ratios.

I have simulated full scenarios with Democracy, charismatic, telepathic etc. just skipping turns and then checked different levels of development (corion-human player-check out all the ships they have built), and I don't note much disparity.

Early game that 30% is often anti-missile rockets and pd lasers for all races, with the sole exception of silicoid who loves death spores (death spores and bio terminators are not bomb allocation!). As soon as security stations becomes available, all races will invariably pick it.

Late game if they have room for two techs they usually pick security stations and Hard Shields. With five techs they pick in addition energy absorber, multiphased shields, displacement device. That seems to be most often the case. Then only down the line follow S Capacitors, heavy armor, reinforced hull, jammers, lightning field. If really pushed, i.e. derived of all those techs they may pick Nullifier, reflection field. But they hardly ever pick beam bonuses (never seen a SA or HEF on AI ship) and they never pick Damper Field. That's one that is certain. And something that should be fixed (the tech preferences in general) for any meaningful challenge from the AI.

Couple of race specific exceptions to the preferences rule:

HG races (late game) pick Troop Pods and Transporters in addition to Security Stations and use the rest of the space units for Tractor beams.

Silicoid for some bizarre reason (which proves these tech preferences are clearly flagged in a mind boggling way) often choose Subspace Teleporter (or Phase Shifter if available) in addition to security stations and always seems to carry a ton of bioweapons around. Very intelligent ship building... NOT (well it won't teleport next to your planet and unload it's cargo which might make some sense).

And Darloks use phasing cloaks (and klackons too now and then) and there are a few times I have seen TWF (which was a surprise) but I'm not sure if the AI could actually use it, or just skipped the extra turn, which could be tested quickly I know. At least AI has no use for hyper-x or fast m. racks. It's not even programmed into the game!

There's more but the ratios 6 1 3 seem clear.

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

Postby Buddenbrook » Fri Jul 13, 2007 2:10 pm

Two more things.

Space requirements have no bearing on AI preferences!

Checked with both specials and weaponry.

Late game it's first choice is stellar converter, then usually BHG. If derived of those two, AI often chooses Plasma web. To test whether this was based on some damage / space units calculation I made PlasmaW require 1000 space units, and it still preferred it!

The same with security stations. Even if ATU etc. took 1 space unit, AI would prefer 300 space unit SS.

This is on the other hand a good sign, because clearly there is no complex mathematic equation to it's ship preferences, but simple flags. You only need to find them :x


Second thing: AI and Blackhole Generator do not mix. In the worst case scenario it can use all it's weapon space units for

7 Blackhole Generators

building fleets of unimaginably worthless doomstars.

marhawkman
Posts:67
Joined:Sat Mar 10, 2007 10:30 pm

Postby marhawkman » Fri Jul 13, 2007 4:52 pm

Did you do research to figure out why the Psilons always build ships crammed with beam weapons, except for two missiles that have EMG?

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

Postby Buddenbrook » Fri Jul 13, 2007 7:35 pm

Did you do research to figure out why the Psilons always build ships crammed with beam weapons, except for two missiles that have EMG?
I'm not totally convinced, but I haven't recognized race specifics re: weaponry, only the specials are affected to some extent. Beam + missiles are are an usual combination in early-mid game.

-

On another note; Late game the AI drops missiles with the original numeric values. Space allocation seems to have little to do with AI choices, although it could be that it is taken into account when comparing beams, with inbuild and available modifications playing a role. The annoying AI fetish for Gauss Cannon with the original numeric values (when e.g. Plasma C or DR would be available) can gladly be fixed. Beams, missiles and attack specials (like plasma web, but not e.g. spatial compressor which is considered a defensive weapon) all use the same 60% allocation.

To get back to your question, in very early game when AI only has PD lasers and anti-missile rockets for the 30% defensive/special/marine combat allocation, it will only use these to some extent, not necessarily filling the total 30% quota, and attacking weapons will then fill up more than 60% of the allocation. The same happens if you manually derive the AI of the specials it prefers like SS.

But doubt it has anything to do with Psilons specifically, although not 100% certain.

rekka
Posts:7
Joined:Sun Nov 27, 2005 10:23 pm
Location:a boring place in america

Postby rekka » Mon Dec 17, 2007 2:52 pm

there was a strategy guide years ago (i still have it somewhere) that explained a lot of these things in detail about how things in the game are decided. unlike moo where there were differences between the races with ships, at least favored ship sizes, in moo2 it is the same formula for every race. The only things that effect the % chance of including an item are 1. hull size, and 2. the best weapon/system, 2nd best, and 3rd best have different values. how it determines best, i suppose depends on where it is on the tech tree... i.e. higher up = better.

Turbo Beholder
Posts:15
Joined:Tue Feb 26, 2008 3:32 am
Contact:

Postby Turbo Beholder » Thu Feb 28, 2008 7:17 pm

you put together damper field, heavy armor, reinforced hull, structural analyzer and Achilles Targeting Unit with Disrupter or Plasma Cannon and with one fleet you could move from a star to another easily adding a whole civilization to your empire.
Yeah. And on less than "impossible" level merely few AP guns or Ion-Pulse firing after some shield-kicker is enough to blow up half of AI fleet and capture second half despite generally lesser techs used on ships (at least until captured are scrapped)... Completely random designs could work at least sometimes.
Generally AI would put a scout lab on it's ships before any beam bonuses.
I don't know much about coding really, but you might think it's simple on/off flags, or numerical preferences (AI loves security stations) which for some bizarre reason have been turned off for later game techs and beam bonuses?
There's strategical value numbers, but those are 0 for Security Stations and Scout Lab... i have some idea though.
Security Stations have Space > Cost, and ATU have Space < Cost. Battle pods have negative space... but it means Cost/Space is negative and if it's what "priority" is, BPs are unbeatable. Needs testing.
I would consider it all empty guessing, if not creative (Psilons) with Security Stations and Shield Capacitors, MWJammer, Absorber, and no more useful Specials. But on the other hand, why they put EA on titans, if "cost per space" raises ?.. Maybe, AI first make small design and then scale it up ?..
Even if you remove all the other techs and make laser bonuses to take 1 space, it's highly probable it won't use any of them. So for some bizarre reason this is in the game code I assume?
You assume AI's goal is the same as yours: build good ship, never mind cost if it will not be needed to replace it, so only important value is space.
If my hypothesis is right, you actually diminish attractiveness of specials you drop to 1 space. :)
Still, maybe it's just fixed list checked against those quotas...
Silicoid for some bizarre reason (which proves these tech preferences are clearly flagged in a mind boggling way) often choose Subspace Teleporter (or Phase Shifter if available) in addition to security stations and always seems to carry a ton of bioweapons around. Very intelligent ship building... NOT (well it won't teleport next to your planet and unload it's cargo which might make some sense).
Bioweapon is because "they're Repulsive anyway, so to the shell any diplomatic penalties", but why this pesticide bomber comes with Teleporter while other bomb-crammed flying garbage does not ?..
"Two Eyes Good, Eleven Eyes Better."
- Michele Carter


Return to “Game Modifications”

Who is online

Users browsing this forum: No registered users and 35 guests