Campaign AI Tweaks
This mod works for both the Vortex and Mortal Empires campaign modes.
There are many good campaign AI tweaking mods on the Workshop, particularly Incata’s and mr.napop’s, which I highly recommend. The goal with this mod was to combine the elements I enjoyed about Incata’s Ai Evolution (beta), which tuned all faction AI quite aggressively, to a more pared back version that differentiated aggression across factions according to their lore and personality type in the CAI tables. Gradual tweaks across multiple campaigns playing as different factions on Very Hard campaign difficulty resulted in this mod.
Generally speaking, when compared to vanilla, you should experience AI factions in campaigns that:
- Aggressively perceive and respond to enemy threats, according to their relative strength.
- Retreat more often from battles they cannot win, reducing scenarios where armies are thrown into clear losing engagements.
- Take strategic opportunities more often where potentially advantageous (e.g. taking undefended settlements deeper in enemy territory, declaring war on weaker factions).
- Prioritise defending their owned regions and settlements when necessary, but will otherwise prioritise aggression towards nearer targets. This should reduce instances of AI factions sending all of their armies abroad on offensive campaigns while their homelands burn, and encourages AI factions to take territory adjacent or near to their existing owned territory to maintain internal lines of supply.
- Strongly prioritise war coordination targets from the player, making this feature slightly more useful in campaigns where the player wants to coordinate allied assaults.
- Extremely defensive or passive factions have been tweaked to prioritise consolidation and defence over any expansion or aggression. This includes Wood Elf factions, minor Tomb Kings factions and factions with the Passive or Isolationist personality.
This was achieved by tweaking the strategic components table and the task generator table.
In addition to tweaking how the AI considers threats and targeting on the campaign map, I’ve incorporated changes to income and budget allocation, occupation decisions, the overall CAI variables and some building values. These should mean that, overall:
- AI factions allocate two-thirds (67%) of their income to army funding and recruitment and the army funding cap is doubled, allowing for consistent manpower mobilisation across all factions.
- AI factions allocate just less than a third (27-30% depending on faction type) to construction funding, allowing for a measured pace of building progress for factions without undermining army recruitment.
- Agent and diplomacy funding is deprioritised (~3%) to reduce agent spam and large amounts of tribute being offered.
- Tomb Kings have their income allocation heavily weighted towards construction (91%) to reflect their faction mechanics (recruitment is zero cost).
- AI factions, depending on certain conditions, will use more of their income for spending (rather than saving): a minimum of 65% in very low spending conditions, up to 95% in very high spending conditions.
- AI factions are more likely to occupy suitable climate settlements, and raze unsuitable or uninhabitable ones.
- AI will prioritise building defensive or garrison building chains that result in walls in all of their settlements, generally increasing the defensibility of AI territory for all factions.
- The number of goals that the AI is able to evaluate, both for individual factions and all factions on the campaign map, has been increased. This should result in larger factions in later turns being able to more effectively coordinate large amounts of forces, without significantly increasing the CPU load time for end-turn computation.
This should support the strategic components and task generator tweaks by increasing overall funds available to AI factions, increasing overall spending, more suitable settlement occupation and greater defensibility of AI faction settlements.
In the strategic components table tweaks, I’ve differentiated between races and personality types to allow for a more lore-consistent experience.
Generally, most values have been tweaked upwards at the lower-end, and slightly downwards at the top-end, to around 0.75-0.98 for enemy strength modifiers (vanilla ranges from 0.3-1.0) and 0.75-1.0 for the retreat ratios (vanilla ranges from 0.1-0.85).
Most factions sit around the 0.7-0.8 mark to induce a distribution that sits slightly above average (meaning AI overall is better at assessing threats and retreating). Within these new ranges however:
- Assessing threats: Dwarfs and Wood Elves, and those with Survivor, Passive or Defensive personalities, will be better at assessing the threat from enemy factions relative to their own strength. Greenskins, Norsca, Beastmen and those with the Foolish personality will be worse. All other factions and personality types sit roughly in between these two groups.
- Retreating: Dwarfs and Wood Elves, and those with Survivor, Cowardly, Passive or Defensive personalities, will be more likely to retreat in engagements that do not favour their forces. Greenskins, Norsca, Beastmen and those with the Foolish or Aggressive personality type are less likely to retreat. All other factions and personality types sit roughly in between these two groups.
- Opportunism: Dark Elves, Skaven, Vampire Coast, Vampire Counts, and those with Survivor, Opportunist or Cowardly personalities are more likely to take strategic opportunities. Dwarfs and those with the Defensive, Straightforward or Foolish personality are less likely to take strategic opportunities. All other factions and personality types sit roughly in between these two groups.
This mod should be compatible with anything, so long as another mod does not override the edited values in this mod for the following tables:
db/cai_construction_system_building_values_tables
db/cai_personalities_budget_allocations_tables
db/cai_personalities_income_allocations_tables
db/cai_personality_occupation_decision_components_tables
db/cai_personality_occupation_decision_priorities_tables
db/cai_personality_strategic_components_tables
db/cai_task_management_system_task_generator_groups_generators_junctions_tables
db/cai_variables_tables
Any mod that loads after that edits the same values will override this mod (but TWW2 will still function, just without the values selected in this mod).