Campaign AI Fixes and Tweaks AI

by Motomataru·v1.1·Updated 2019-02-24

Campaign AI Fixes and Tweaks AI fixes and tweaks

Screenshots 1 screenshots

About this mod Machine translation

Campaign AI Fixes and Tweaks AI fixes and tweaks

Remember when main and activity dropped significantly around version 1.122 of Mount & Blade? At the request of our Brytenwalda mod players, I investigated why so many lords have been sitting in their castles - in some cases for hundreds of game days. I find that if for some reason these parties cannot recruit more troops, there is no provision for a system designed to keep under-motivated parties at home until they can. I then decided that while I was there, I would address the other long-standing annoyances of the campaign AI, just like I did with the battlefield AI.

Here's a summary of the changes:

General repair

  • Put more party operations into practice.
  • Don't limit party participation to 30% (for an army of ideal size 300, this can be a sizable party).
  • To balance #1, reduce the number of village raids, in part by making them faction targets.
  • Resolve the confusion between party size and party strength (size is generally 1/20 of strength).
  • Resolve the confusion between the proportions of the two distance functions (one is 1/100 of the other).
  • Avoid setting invalid AI goals.
  • Prevent marshals from massing troops on former enemy targets.
  • Prevent the marshal from getting into trouble during the operation.
  • Better handle spai_screening_party as a substate of spai_accompanying_army.
  • Apply lord personality to process_hero_ai and party_set_ai_state.

Problem: Lords ignore each other

  • Adjust aggressive settings and update.
  • Repair the marshal's screening party (now with an average of 150 people, large enough to face the enemy).
  • Have a Marshal's screening party at all times, not just after the attack begins.
  • Whether the marshal's entourage is close to the target.

4A. Causing two nearby enemy police officers to attack rather than just pass by.

4B. Makes the party more aggressive when their commander enters combat.

Issue: Factions ignore trouble at home

  • Fixed party will strengthen their weak center (if below 100 people - not below 7).
  • Faction AI is more dynamic (will become more defensive as it gets smaller and damaged).
  • Even if you do not intend to attack, you must defend even if there is a more ideal attack.
  • Summarize the marshal’s emergency actions.

There is camp defense even without a marshal.

  • Attack village raiders as well as town siegeers.
  • Outline the defensive behavior of the attacking army (rather than just patrolling the center being attacked).
  • Patrolling troops move closer to the center they are patrolling.

Problem: Little policeman evades target

  • Allow vulnerable groups to recruit before other operations.
  • Provide low-priority recruiting options to all parties, not just disadvantaged groups.
  • Weak police recruit from the over-defended center (leaving a garrison of 100-700).
  • Add a party size component to voting decisions (weighted approximately 50% of popularity).
  • Weak players lose reputation (leading to lower size expectations and better selection).

For ease of use, I tried limiting my changes to module_scripts. However, these changes affect several other places in the script:

module_simple_triggers 1154

Now that aggressiveness is set correctly, you can comment out the expensive and poorly written script_allow_vassals_to_join_indoor_battle: #Process alarm

  • Maybe break it down into several groups, using modula

(1,# now calls 1/3 of all centers each time, so hopefully less CPU load

[

(call_script,“script_process_alarms”),

#(call_script,“script_allow_vassals_to_join_indoor_battle”),

(call_script,“script_process_kingdom_parties_ai”),

]),

module_dialogs 13002

[anyone,"lord_tell_objective",[ #

MOTO uses substates to correctly represent filtering

#(party_slot_eq,“$ g_talk_troop_party”,slot_party_ai_state,spai_screening_army)],

(party_slot_eq,“$ g_talk_troop_party”,slot_party_ai_state,spai_accompanying_army),

( party_slot_eq,“$ g_talk_troop_party”,slot_party_ai_substate,1)],

MOOT finally uses substat …

Install & use Install: follow the bundled instructions

  1. Unzip the archive from playbuff and read the bundled readme / instructions first.
  2. There is no universal mod manager for this game: some mods replace game files directly, some go into a game-specific Mods folder, and some need a game-specific community loader or tool first — follow the bundled readme.
  3. Place the files exactly as the readme says; mods with listed dependencies need those installed too.
  4. Launch the game to confirm it loaded; some games require enabling mods in settings or an in-game mod menu.

Install locations vary a lot between games and mods — the bundled readme is the most reliable guide.

File & checksum

Filename
Campaign AI Fixes and Tweaks AI修复和调整
File size
318.0 KiB