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
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!
NOTE: THIS MOD IS COMPATIBLE WITH WAR AND AI TWEAKS, BUT AS OF NOW THAT MOD HAS BUGS IN THE MILITARY LOGIC AND YOU SHOULD DISABLE IT IN THE MCM. NPC SIEGES WILL NEVER COMPLETE IF YOU HAVE IT ON. I NEVER REALIZED WHY MY FACTION WAS STEAMROLLING EVERYONE UNTIL I REALIZED THAT NPCS COULD NOT COMPLETE SIEGES THE ENTIRE CAMPAIGN!!! D:
v1.2.4 Block armies from choosing stupid siege targets. Here an army is off to besiege a castle deep in enemy territory and will need to travel past a few enemy garrisons. This is stupid of course.
His options with vanilla AI:
He will never make it there and he will probably die in the process. I use Garrison Do Something which makes garrisons actually do what they are supposed to and they will be subject to guerrilla attacks and in real warfare would waste away with attrition, constant skirmishes and cut off supplies. Why Siege A Castle?
With the Army Logic in the MCM enabled they will recognize when they are passing an enemy garrison and will opt to siege that instead:
Their AI will still work so they might decide to do something else but as long as they plan on sieging, they will choose a better target!
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.)
Future:
Anything stupid the AI does I will try to implement more features to correct their behavior. Post your suggestions on my YouTube channel (Subscribe first!) or become a patron and join my Discord.
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.
The AI seems to favor running away after taking settlements. Usually a large enemy army will be nearby because they have been waiting like wolves for you to finish the siege and will hunt down your allied AI army slowed down by wounded. I don't know why TW wouldn't make them force the enemy to siege them back rather than get caught in the field or just lose the settlement you lost half your troops taking. This just happened in my game and I had to create this because of it. I can't stand fighting a siege to watch it just be taken back because the AI is too stupid to leave a garrison behind. After installing this mod, my allied army instead went into the settlement and stayed there. The enemy army then decided to not besiege the settlement and the war ended like a day after that. Without the mod the idiot AI would have lost the settlement right back.