Some stuff from the Deity Team Game SG (not sure how relevant):
The max war plan can be 20 turns for normal.
iTimeModifier is 100 for normal [unless the AI has over 200(!) more power, it was supposed to be 2 but there is a bug in the code]Code:else if (AI_getWarPlanStateCounter((TeamTypes)iI) > ((20 * iTimeModifier) / 100)) { AI_setWarPlan(((TeamTypes)iI), NO_WARPLAN); }
The AI doesn't wait for catapults, just enough troops for attack
Once the AREAAI_OFFENSIVE is returned the AI will start marching.Code:if (bTargets) { if ((countNumAIUnitsByArea(pArea, UNITAI_ATTACK) + countNumAIUnitsByArea(pArea, UNITAI_ATTACK_CITY) + countNumAIUnitsByArea(pArea, UNITAI_PILLAGE) + countNumAIUnitsByArea(pArea, UNITAI_ATTACK_AIR)) > (((AI_countMilitaryWeight(pArea) * iOffensiveThreshold) / 100) + 1)) { return AREAAI_OFFENSIVE; } }
UNITAI_XXX are types that the AI can possible use to attack city.
The number of the units must be more than number of (cities+population) divided by 4 for total war. The AI totally doesn't care if will attack w/ warriors or catapults (or modern armor) once it has passed the initial power threshold. And the units fall in the UNITAI_XXX roles above, catapults promoted to barrage are actually not counted since they are most likely UNITAI_COLLATERAL.
War is a team decision so it calculates the units/cities/population of all the members.
-----
I'd be glad we can fit 5 archers/1axe/1spear and walls on the hill city by the time attacking. I'd dedicate delhi/bombay for units and perhaps start growing cottages in the copper city.
1st. AI is sort of honorable and never starts a total war in less than 10 turns (limited are started on the 6th turn, but that's not limited war)
2nd. (the reason) Monty and Ragnar (he had low power) dont have enough units w/ the roles described above, that's the only reason the AI doesn't start a total war (besides not path which cancel the war altogether)
Units can be 'counter' or 'reserve' (UNITAI_RESERVE are the most suicidal ones) and they are not counted (but participate in the stacks). Defense units (UNITAI_CITY_DEFENSE) are not considered either. AIs can have quite a bit of them but they are not counted towards the decision, for instance spears are likely to be counter type and they are not counted. Axes are often counter (or even reserve, esp. for unit spammers like Monty). Chariots also get often into counter division. Suicide (barrage) catapults don't get considered either.
So assuming they together have 11cities and probably like 40-45 population, let's say: 55/4 = 13, 13+1=14, they need 15units (together) designated for attack which they don't have yet.
---
Bottom line, many (or most) of the units produced during peace time are simply not "city attack", so they have to build the offense.
The Rook, try counting mostly units w/ CR promos and archers w/ combat. Also HAs w/ combat. I think they are the supposed city attackers. The rest are support which the AI doesn't consider viable preparation.
If you see some CR promoted units wandering (not stacked) it means that Monty/Ragnar are morons (which we know anyways) and will spend some time chasing barb. cities (which is good for us).