This article is based on research of Medieval II Total War. It has not been confirmed whether or not Rome Total War uses the exact same system. The data in the following tables is hardcoded and can not be modified (without the use of external programs).
The faction header in descr_strat.txt contains what we will refer to as an "AI Personality". It can look like this:
faction england, balanced smith
- The first name (balanced) controls a set of AI building preferences (no impact on repairing).
- The second name (smith) controls a set of AI recruitment preferences (no impact on retraining).
- Any first name can be combined with any second name, so fortified caesar is just as valid as bureaucrat napoleon.
- AI personalities do not influence aggression at all, merely the decisions on what to build and recruit.
- All decisions contain a random element, so biases are a statistical matter.
AI Building Preferences
These biases are towards building properties, rather than buildings themselves. The game does not know what a "Blacksmith" is, for example, it only knows that it is a building which provides a weapon upgrade, and hence a craftsman AI would be more likely to build it than most other AI personality types.
The available first names are:
balanced religious trader comfortable bureaucrat craftsman sailor fortified
The following list of building properties have a weight of 0 in all 8 first names and have been excluded from the above table:
- Bigger bonuses get preferred over smaller ones. This is why the AI really loves buildings with income_bonus in many mods.
- recruit_pool, agent & agent_limit are missing from both lists. It seems recruit_pool always has the highest priority, but this needs further investigation.
- The properties have been listed disregarding their ingame functionality. Some of them are dummy effects (e.g. trade_fleet) or do not provide any bonuses (e.g. taxable_income_bonus), but they still influence the AI's preference to construct any buildings containing them.
- The order of the properties in the EDB does NOT matter, despite previous claims. This has been confirmed by memory editing the preference weights.
AI Recruitment Preferences
This one is a bit more complex, so read carefully.
When the unit database (EDU) is loaded, the game combines unit category and class to know which weight to apply. It also calculates a value for the unit that is based on a unit's stats. Note that I say value, it has nothing to do with cost or upkeep (!). This value can not be seen anywhere in the game without the use of external programs. Soldier count has the biggest impact on a unit's value. That is why large units tend to get recruited more often than small ones, which can be amended by using recruit_priority_offset in Medieval II Total War: Kingdoms.
It has to be stressed that this unit value is far more influential than the preferences set by the AI personality. For example a stalin personality will still prefer a very good light infantry unit over a bad heavy infantry one. These biases only come into full effect when units are of equal or similar value.
The available second names are:
Available in both Rome: Total War and Medieval II: Total War
smith mao genghis stalin napoleon henry caesar
Available in Medieval II: Total War only
richard heinrich subotai knud guy doge robert wyvadslaw vlad roger alfonso arslan tahar saladin tzar
- There is a tendency towards producing troop mixtures (according to what is already in the garrison) that might obscure the bias.
- No evidence has been found to suggest that AI factions respond to troop compositions of their neighbours or enemies.
- Weapon attributes do not matter for categorizing, so a heavy infantry unit with the spear attribute is still considered to be heavy infantry.
- skirmish infantry (the unit class skirmish, not what the unit does!) is grouped into light infantry
- skirmish cavalry & spearmen cavalry are grouped into light cavalry
- weights for non_combatants and handlers have been excluded from the table
- ships have a value of 0 in all profiles