Mdding Civ4Unitinfos file.....Default Unit AI????

Formulapower

Warlord
Joined
Nov 5, 2007
Messages
148
I was doing some modding of the XML files and came across this Default_UnitAI parameter in the civ4unitinfos file. Most of these make since....city defense...attack city....etc etc but I have a question about the meaning of a few

UNITAI_CITY_SPEICAL???
UNITAI_CITY_COUNTER???
UNITAI_RESERVE/UNITAI_RESERVE_SEA???

2
Also....what is the difference between the UNITAI_Assault_Sea and the UNITAI_Attack_Sea??

3
Their is also an entry in this same file that reads UnitsAIs and then it may list several of these AI options with a command allowing the AI to use different settings based on what is needed....If I change the bUnitAI from 1 to 0 does that mean the AI will never use the coresponding AI Setting?

For example...lets say units that don't get defensive bonuses like tanks and cavalry get bUnitAI=0 for UNITAT_CITY_DEFENCE Does that mean they will NEVER go into a city to defend it??



thanks for any help I can get
 
I can't tell you all...

Attack will search and destroy enemy units. Assault will attack a specific target (usually a invasion force will get Assault ai)

Counter AI's will accompany stacks (or stay in cities) to fullfill roles other than the primary task of the stack.
So a offensive stack will usually be accompanied by a few units with Counter AI
 
I would recommend looking for an existing unit with the AI in question.
Usually that will give you an "idea" as to its purpose. That will generally solve all your questions if you take the time to check it out.

As Refar mentioned. Counter is given to units like Spearman, Pikeman, AT Infantry. Units with a clear "purpose", but are generally not strong enough to be "off by themselves". (Spearman/Pikeman "Counter" Mounted, AT counter Tanks'), but a Spearman becomes easy pickings for an Axeman, or Swordman if they are out in the open, so the Spearman will stay in stacks, the AI_Counter tells the unit to do precisely that, and likewise City_Counter tells the unit to stay in a stack, in a city.

In addition generally speaking, the bonuses that are given to the units. should match up with their AI. i.e. AI_Attack_City should be given to units with a bonus to city attack (and likewise AI_City_Defense given to "defender units" like archers).

That should be enough to get you started. When it doubt, it doesnt hurt to test it in game. You can learn alot just by trying out something and seeing how the AI treats the unit. if its how you want, then your golden.
 
Back
Top Bottom