How does War AI work - what makes factions send grouped units?

Galgus

Emperor
Joined
Aug 22, 2012
Messages
1,705
I know almost nothing about AI coding in the game, so I'm just hoping that someone who knows can point me in the right direction.

Though I'm not sure if it is possible, I'd like to find a way to get the Aliens to send attack groups at cities when in red status; and understanding war AI seems to be a first step.
 
From what I've read it's mostly a dll issue and nothing can be done until the dll is released.
 
Nope, this is not a DLL thing: you can mod the groups the AI sends to a limited extent using XML files.
The AI has a database of various "operations" it can execute: things like sneak attack, clear barbarians camps/nests, settle a plot, etc. Each operation uses a formation from MultiUnitFormations.xml (located in the Units folder) to see what unit types it needs/wants. Then, the AI will try to recruit and/or build missing units to fill armies. Short version: operation creates an "army" entity, then assigns a formation to that army, which the AI will attempt to fill before sending the army out to its mission.
 
Top Bottom