Does the AI know how to use new buildings/units/techs?

snapple232

Warlord
Joined
Aug 1, 2007
Messages
101
If I add a new building, unit, or tech to the game, does the AI know to build or research it or do I have to somehow teach it to use it?
 
It does, provided you're talking about XML. It recognises XML changes and can evaluate them properly; they'll build a Granary with +1000 culture and +100% commerce costing 1 hammer very quickly, while a building that only provides +1% trade route yield will be built only after a lot of other buildings have been built. You can influence this a bit with the flavour tags; an AI who has 'gold' and 'production' as its flavours will be more likely to build buildings with these two flavours.

But that all is XML. The AI does not recognise Python or C++ things.
 
Yes the AI knows: the teaching is done in a global way, so you can add new items.

However, there are some modifiers in the xml files that are taken into consideration by the AI when it comes to tech/train/build: iAsset, iPower (= Military Power). You will have to look for other similar entries to get an idea which value to put there.

If really you see that the AI does never react to your new entries, there is a tag <iAIWeight>0</iAIWeight> which is by default set to zero for all Buildings, Units, and Techs. I've added entries in all 3 files but I never had to change this particular tag, so it should be quite exceptional.

EDIT: wrote this while need my speed posted his reply: anyway, all infos are good :)
 
Top Bottom