Does the AI adapt to MOD changes?

tezster

Chieftain
Joined
Dec 29, 2005
Messages
31
Location
Toronto, Canada
Apologies if this has already been discussed (I just skimmed through some of the more recent threads and didn't see it), but I'm wondering whether the AI recognizes changes made to the XML files, and change its play style accordingly?

i.e. let's say I intentionally unbalance the game by giving a certain civ's UU ridiculously high stats, or if I edit a certain civic to give it huge bonuses, will the AI take this into account and exploit this advantage?

Since the game is so extensively moddable, I'm just wondering how the AI keeps up with it all? I can't quite imagine it being so flexible that it can adapt to every possible change made.
 
There are some factors that can be used to shape how the AI will use or value a unit... in the UnitInfos there are elements like <iPower> which tells the AI how powerful, relatively, the unit is... you can also set default AI uses of the unit in the UnitInfos and in Python
 
They will not, however, automatically incorporate the new uses of the unit without setting that information
 
tezster said:
Apologies if this has already been discussed (I just skimmed through some of the more recent threads and didn't see it), but I'm wondering whether the AI recognizes changes made to the XML files, and change its play style accordingly?

i.e. let's say I intentionally unbalance the game by giving a certain civ's UU ridiculously high stats, or if I edit a certain civic to give it huge bonuses, will the AI take this into account and exploit this advantage?

Since the game is so extensively moddable, I'm just wondering how the AI keeps up with it all? I can't quite imagine it being so flexible that it can adapt to every possible change made.

It does as well as can be expected. If you give a unit an amazingly high strength the AI will tend to pick it. So it has an algorithm it runs through to make decisions. Unfortunatly the game is so moddable that that those algorithms can't be expected to keep up with everything.

I tohught making fireballs for my mod was hard, until I realized I had to teach the computer to use them. It is doable, but its definitly the hardest thing about making a mod with new features.
 
Out of curiosity, how did you teach the AI to use them? are they just units that the mod spawns?
 
Déja said:
Out of curiosity, how did you teach the AI to use them? are they just units that the mod spawns?

It was just finding a way of defining the unit that the AI would use. I can't view any of the AI scripts so I don't know what logic it was going through so I just try different stuff until the computer seems to use it appropriatly. At first fireballs were air units, but the computer didn't tend to be very aggresive with them so I made them into land units. Then the computer never casted the fireball because it was an intercept on the improvement code. So I would run through each of the AI mages and drop fireballs on them every turn as if they had casted. I ended up moving spells to promotion code and it was easier to get the AI to do it every turn as a promotion so I was eventually able to take out the free spawned fireballs each turn.
 
Top Bottom