View Full Version : Modding and the AI


hj232
Sep 27, 2006, 05:55 PM
I read the info about modding. I'm a newbie with all this so please indulge me, but when you make a lot of changes--does the AI know how to utilize units effectively after all the changes?

Thanks

Teg_Navanis
Sep 27, 2006, 06:54 PM
This is from looking at how the AI behaves in other mods, not from looking at the SDK code:

The AI is pretty good at choosing among available units. If you want, you can influence it by using the iAIWeight tag in the XML files. It gets more complicated when a unit is not yet available, e.g. when you need to research a certain tech and/or construct a certain building before you can build the unit in question. In that case, the AI might just build lots of weak units instead of the building that is required for strong units. Again, modifying the AIweights of the techs and buildings can help.

Gerikes
Sep 27, 2006, 07:45 PM
Pretty much what Teg said. I would also add that most (if not all) changes that you make that just change the XML will be fully aware to the AI. It makes decisions based upon the values it sees in the XML.

The problem with the AI not understanding items is when mods are made that change the python or the SDK aspects that would affect the AI's decisions but don't actually tell the AI how to use those changes.

hj232
Sep 27, 2006, 08:08 PM
Thanks guys!!!:goodjob: