Other user's assetsAll the assets in this file belong to the author, or are from free-to-use modder's resources
Upload permissionYou are not allowed to upload this file to other sites under any circumstances
Modification permissionYou must get permission from me before you are allowed to modify my files to improve it
Conversion permissionYou are not allowed to convert this file to work on other games under any circumstances
Asset use permissionYou must get permission from me before you are allowed to use any of the assets in this file
Asset use permission in mods/files that are being soldYou are not allowed to use assets from this file in any mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou are not allowed to earn Donation Points for your mods if they use my assets
Author notes
Be fair!
File credits
Sun Tzu
Donation Points system
Please log in to find out whether this mod is receiving Donation Points
Prevent mercenary clans from being selected to garrison recently captured settlements.
Version 1.2.22
Prevented player party from being given NPC instruction to garrison a captured settlement. (Remember if you don't like parties garrisoning captured settlements and you like captured settlements to be defended by 50 militia as the army wanders off to do nothing, you can disable in the MCM)
Version 1.2.21
Strings can be edited.
Fix checking if CFP loaded. (Works for me!)
Version 1.2.20
Fix
Version 1.2.19
Clarify inaccurate settings description for Patrol Logic Range. Art of War won't disband the army. It will tell the army to patrol the last attacked friendly settlement instead (if one exists, if doesn't exist, it won't do anything and let the army do whatever).
Version 1.2.18
Removed code to load Command Faction Parties' siege parties list. Guess it only works for me. SFG
Version 1.2.17
Added error handling back to when the mod is checking if Command Faction Parties is installed. If you get an error mesage from Art of War on load while CFP is installed, let me know what it says in the comments.
Version 1.2.16
Fixed getting CommandFactionParties (CFP) dll path that caused crashes on load with CFP installed. Using ..\.. to navigate directories caused issues for some users.
Garrison Captured Settlement Logic: Removing garrison parties if their clan or kingdom becomes null. Avoid crash?
Army Chase Fix: Patched AI Action for going around parties to make armies ignore faster parties. Based on what I have seen in game, this command is also used for armies to engage parties.
Army Chase Fix: Updated logic to ignore faster parties so they DO NOT ignore if the faster party is in a map event (battle/siege).
Army Chase Fix: Added MCM setting to toggle this mechanic.
Army Siege Logic: Settlements that get tracked when the player is part of an AI army are now updated when the siege target is changed by Art of War.
Army Patrol Logic: Add new patrol logic when armies decide to patrol a settlement far away from the front lines. Now the mod keeps track of settlements that have been attacked by enemies (raids/siege) and when an army decides to patrol somewhere ridiculous, the mod will instead tell them to patrol a recently attacked settlement. (Toggle in MCM and range from friendly settlements to look for enemy settlements, to help the mod determine where the front lines is.)
Change CFP loaded to false if siege parties returned is null... just in case, to avoid crashes.
Version 1.2.12
Fixes
Armies should ignore faster parties
Made compatible with my other mod Command Faction Parties when you order parties to siege.
Version 1.2.9
Now checking settlement item roster to see if they have any food before sending a garrison party low on food to purchase food from there. This applies to parties selected to garrison a settlement for the hours set in the MCM after capturing it from the enemy. This should fix bugs where a party will be sitting in a settlement starving.
Version 1.2.8
When armies are selected to garrison a captured settlement, they will be given 10 units of grain. I notice armies are starving often and probably from parties that are ordered to garrison captured settlements.
Default garrison time changed to 60 hours. This also should help them to not starve. Parties that garrison settlements can leave to buy food but certain conditions might keep them there, like a strong enemy patrolling nearby.
Siege Army Logic: Fixed bug of attacking army jumping back and forth between chasing an enemy army that keeps hiding in a settlement that is also the best possible target for the army to siege. The enemy army could bump the strength of the settlement to a high value that forces the attacking army to then abandon this siege, and the vanilla AI would try to switch them to a settlement deep in enemy territory. When this situation is going to occur instead the attacking army will just disband. The AI was going to insist on chasing this stupid army and switching back and forth between a settlement that is deep in enemy territory. In this situation, the army has nothing positive it can do and will just patrol around the siege target instead. If it receives reinforcements, it will consider sieging again.
Version 1.2.7
Added daily check to clean up dictionary used to find better targets for siege armies. Previously, if the army leader's party was destroyed before the hourly AI check then they would have remained in the dictionary.
Added null check to prevent a crash(?) while a garrison party is out buying food (if garrisoning a castle after a successful siege).
Version 1.2.6
Prevented the army logic from executing on armies already in the progress of a siege event or in a map event (battle). Didn't seem to hurt but just added more calculations that didn't need to be done.
Added a setting to toggle messages for all kingdom parties or only player clan parties.
Version 1.2.5
Added localization support.
Added intro message (anti-carioceco mod theft message)
If messages are enabled in the MCM, they will only display for parties in your clan.
Version 1.2.4
Army logic has been added. You can disable in the MCM if you don't want army AI changed by the mod. The logic so far only changes one behavior. Now when armies are off to besiege an enemy settlement, if they are traveling past another enemy settlement that is much closer, they will switch to besiege that settlement instead. See the front page for more details with images.
Version 1.2.3
Garrisons now will sally out when an ally is under attack outside the settlement and the garrison party thinks the battle is winnable with their help. Added settings to the MCM to tweak this behavior.
Version 1.2.2
Fixed garrison party purchasing food from nearby villages when they did not have enough food for the required garrison hours. This should fix parties that ended up starving around the map.
Version 1.2.0
Updated for 1.1.3
Fixed any issue with party not properly waiting at the settlement. The party only leaves if they are in a castle and need food. They should head to a nearby village or town in this case.
Version 1.1.7
I done goofed
Version 1.1.6
Garrison parties will now be relieved when their kingdom is no longer at war with another kingdom.
Version 1.1.5
Now the army leader will join the garrison if he is left alone after it selected other members. In testing I noticed he would be vulnerable traveling with many wounded and prisoners. Better he goes to the garrison.
Corrected the logic for when they decide to leave the garrison to buy food. Not it actually checks the time left and compares it to how many food days they have. If not enough they will likely head to a nearby village for food then return to the garrison.
Fixed some stuff with the AI to allow their normal AI to takeover when they are threatened.
Version 1.1.4
Fixed collection modified crash
Version 1.1.3
Army members selected instead of leader now. Army is no longer dispersed.
Added settings to determine how many members of the army would be selected for the garrison.
Version 1.1.1
If an army leader is chosen to garrison, then the army will be dispersed now. I don't think an army can actually enter a settlement and the game thinks it is trying to siege.
Version 1.1.0
Added MCM v5
Version 1.0.3
Added more conditions to which parties are ordered to garrison when a siege completes. Now it makes sure the settlement is owned by the mapfaction of the party, and ensures the stregth of the settlement is weaker than the party with their followers. Hopefully, this fixes issues some people have been having.
Added a new setting to the ini to display messages when a party is ordered to garrison. true to display or false (default) to not display.
Version 1.0.2
Enabling AI on parties once the time (default 72 hours) is up. This should fix parties that garrison going forward. If you have parties stuck in your game, follow the instructions in the stickied comment.
Version 1.0.1
Fixed player party being sent to garrison after capture and then becoming stuck for 72 hours.
Added settings.ini file to the dll folder (...\ArtOfWar\bin\Win64_Shipping_Client\settings.ini) so you can set the number of hours AI parties should remain in a garrison that has been captured.
Supporters on Patreon will be invited to my discord where I can help you with modding or you can have a place to discuss Bannerlord and modding. Additionally, you can click the donate button on my mod pages or profile to show support by donating to my paypal!
Features:
Parties will now garrison a settlement after capturing it. How many times have you seen the AI capture a city to just walk away right after? Then the enemy army that was too afraid to attack just walks up and takes it back, all while your allied army is off traveling back to its home settlement. Now once the settlement is captured the army or party will enter the settlement and stay there for 72 hours. The only thing that could prevent this is if they have low food. (Use my Supply Lines mod to keep armies fed.)
Army siege logic will no longer allow armies try to move past enemy garrisons to go deeper into enemy territory to siege settlements. When it sees this, it will choose the closest siege target and redirect them. If the garrison is too strong they will instead patrol.
Armies will no longer try to chase faster parties. They should ignore the flies buzzing around them
?
From Art of War:
Thus the highest form of generalship is to balk the enemy's plans; #
the next best is to prevent the junction of the enemy's forces; #
the next in order is to attack the enemy's army in the field; #
and the worst policy of all is to besiege walled cities. #
The rule is, not to besiege walled cities if it can possibly be avoided. #
The preparation of mantlets, movable shelters, and various implements of war, will take up three whole months; #
and the piling up of mounds over against the walls will take three months more. #
The general, unable to control his irritation, will launch his men to the assault like swarming ants, #
with the result that one-third of his men are slain, while the town still remains untaken. Such are the disastrous effects of a siege.