Mount & Blade II: Bannerlord
0 of 0

File information

Last updated

Original upload

Created by

Light

Uploaded by

sgsdxzy

Virus scan

Safe to use

Tags for this mod

About this mod

A collection of combat-related mods featuring less-random autoresolving, better survival chance explanations, improved calvary and spearman performance in field battles, realistic ballistics for bows, smarter AI strategies and revised bandit behaviors, each can be used individually or work together as a whole. Supports both e1.4.0 and e1.4.1 beta.

Requirements
Permissions and credits
Translations
  • Mandarin
  • Korean
Changelogs
Light Combat Mod Collection
Supports both e1.4.0 and e1.4.1 beta. Please choose the corresponding file on the download page.
Refer to the changelogs for recent update details.

v1.4.6 adds better support for localization. I'd really apperciate it if you can translation this mod to other languages. 
How to translate:
Spoiler:  
Show
You can find the file Modules\CombatModCollection\ModuleData\Languages\module_strings.xml. It contains every string this mod uses, in English. Create a new subdirectory with name like CNs, copy the file there, change the 4th line: <tag language="English"/> to your target language, and every English description after text= in the following lines. You must keep the string ids as is and save the file in UTF encoding. You may refer to Modules\Native\ModuleData\Languages on how native game is translated.

v1.4.4 and later versions have intergrated MCM which provides a configuration menu. You don't need to install any additional mods. You will find the configuration menu in game Main Menu -> Mod Options.

Settings Migration Guide:
Spoiler:  
Show
from v1.4.7 and on, mod configuration file will be stored at My Documents\Mount and Blade II Bannerlord\Configs\ModSettings\Global\CombatModCollection\Light.CombatModCollection_v1.json. It has the same format as the old settings.json. You can copy your old file there and rename it, but it is recommended that you reconfigure the mod from the configuration menu, or at least check these configurations if you copy the file. One advantage of mod configuration menu is that your settings will be persisted upon mod upgrades so you don't have to override your settings every time.

This is a collection of mods which focused mainly on changing different combat-related aspect of the game. Each mod inside this collection can be individually turned on/off and configurable through a unified configuration file. By default, all is turned off. If you encontered any bug, you can turn off the bugged module and play on.
The mods can be generally categorized into two parts: Battle and Strategy. Mods in the Battle category change how each single battle, whether field battle or autoresolve is fight; and mods in the Strategy category change behaviors on the big map, primarily for AI logics. The list is expanding as I gain more ideas through my own gameplay. All code is hosted on my github.

Interconnections: These mods are designed with each other in mind: while each can work on its own, they can read each other's data and give improved results when used together. Here is the list of hightlighted interconnections: 
Spoiler:  
Show
  • SendAllTroops can use the settings from SurviveByArmor to determine the survival chances in autoresolves.
  • DetailedCombatModel in SendAllTroops uses the actual data of items, including the damage, accuracy, speed and so on to determine the performance of each troop in auto battles, so affected by RealisticBallistics's change to ranged weapons.
  • PowerThrust changes the calculation of thrust attacks, directly affecting the lethat rate in SurviveByArmor_SurviveByExcessiveDamage and improve the usefulness of spearmen against WarStomp horses.
  • LearnToQuit can read SendAllTroops data to determine the actual strength of both sides. It calculates not only the strength on each unit's profile, but also how the battle has been going from the start, like if archers have run out of arrows, if one side is low on hitpoints and rapidly losing soldiers, etc.
  • Lords in LearnToQuit may choose to press the attack relentlessly if he knows his soldiers are less likely to die because of SurvivalByArmor.
  • LearnToQuit lets lords preserve their troops to compensate the pocket army ModifyRespawnParty removes.

Compatibility Notes:
Spoiler:  
Show
I listed all the Classes and methods I patched in each module's respective description. Many other mods also list theirs' on their page. You can compare these and if they don't change the same method, they are almost always compatible. This is the most accurate method. For example, SendAllTroops (with DetailedCombatModel off) is even compatible with Keehu's Better Auto Calc.

However, each submodule must work as a whole: If one patches two files, it must patch either BOTH or NONE. When it only managed to patch one, and your other mods patched the other, you might experience crashes. That's not anyone's fault. Load this mod last is always a safer option, or you'd have to turn off the submodule or any other conflicting mod.

Battle:
SendAllTroops (Minor Update)
You thought the "send troops" (auto resolve) send all your troops in. Instead, it sends them one by one to duel.  No wonder why you lose several unlucky knight when fighting looters 200:10. And only those lucky enough to be chosen and survive can gain combat XP.
Short Overview:
Spoiler:  
Show
Vanilla auto battles are giving players a hard time. It is a "roll-dice-and-die" game, full of random factors that cannot be controlled. Not only that, but also the player is treated differently than AI: when the player is leading a much stronger party against a weak party, like when hunting bandits, the weaker party receives a HUGE buff so the player party would have much higher casualties than what you'd expect.

Features of SendAllTroops:
  • Much less randomness is involved. You can opt to remove all randomness and get determined results.
  • The party fight as a whole, not a collection of individual soldiers. For example shields can protect firendly two-handers from arrows.
  • Uses hitpoints for every soldier.
  • The player is treated equally as everyone. Your opponent will no longer receive the buff.
  • Share combat XP among whole party, higher level troops will not be credited all kills and deprive low level troops of XP.
  • An optional new model that uses every soldier's equipments and skill levels to determine his strength.
  • A detailed combat progression taking into account the range of weapons, counting the depletion of ammo, and letting soldiers switch to different weapons for different situations. 
  • A refined multi-stage siege model that fortifications and siege engines are much more useful.
  • Every aspect can be easily configured in settings.

By using hitpoints and treat the player equally, SendAllTroops removes the most frustrating part of vanilla simulations, and can give more consistant, accurate and sensible results. Note this is a gamechanger as it affects every autoresolved battle for both AI and player. Weaker parties are less likely to defeat stronger parties, and stronger parties (especially under the player's command) usually suffer less casualties.

Configuration items:
  • Random Damage: If set to false, the damage value is fixed. If true, it will randomly fluctuate around the center points.
  • Random Death: If set to false, the death of soldier is determined by hitpoints reach 0. If true, the vanilla instant-death-by-chance is used. If both Random Damage and Random Death is false, this is the same as AbsoluteZeroRandomness mode in earlier versions, and the result of every battle is pre-determined. Note there are still two randomized things: first is who got the kill on the scoreboard (cosmic), and the second is if a defeated soldier gets wounded or dead. All medicine skills and perks give surgeon chance as percentiles and you cannot have 0.6 soldier alive and 0.4 dead.
  • Detailed Combat Model: Whether uses the new model that uses equpiments and skill levels to determine strength. If set to false, the vanilla Power is used. Refer to the detailed description of what Detailed Combat Model does.
  • Combat Speed: Multiply the combat speed between AIs. The autoresolves involving the player always finish instantly in terms of campaign time.
  • Combat Experience Multiplier: Multiply global experience points gained for everyone.

Known Issues:
  • You must disable every other mod changing how XP is calculated for the share XP among whole party to work. You can use the Combat Experience Multiplier to compensate the functionality provided by such mods.
  • The hitpoints are not preserved on game save and reload. I chose not to save the states because that would risk corrupting save files, and almost guarantees the save to be inopenable if you ever decide to disable SendAllTroops. This will not affect player autoresolves because they are finished instantly, but AI vs AI results might be different if you save the game during an ongoing battle and load


Detailed Description:
Spoiler:  
Show
To understand why vanilla auto battles are flawed, we must first understand how is it calculated. Here is a simple breakdown of how "Send Troops" (simulation) in vanilla is:
  • When two opposite parties meet on the world map to fight, it becomes an Event
  • For every several in-game minutes, the two sides fight a Session. You would notice AI vs AI battles lose soldiers every now and then (half an in-game hour), that is a Session.
  • Session is composed of multiple Rounds
  • In every Round, one random troop is selected on one side to Hit another randomly selected on the other side. The order of attacking is also random.
  • The number of troops detemines the number of Rounds each side in a Session has. A side with N soldiers do N^0.6 attacking rounds.
  • When oen troop is Hit, the Damage is a random number between 0 and 50 * Striker Power / Striked Power
  • And the Damage is compared to another random number between 0 and the striked max hitpoints (usually 100). If the Damage is higher, the striked instantly dies, and if it's lower, nothing happens.
  • Then how is Power calculated? It's 0.02 * (2 + Tier) * (10 + Tier), and if the soldier is mounted, multiply the result by 1.2. The mounted bonus is applied even in sieges. That means, a Battania Horseman(2.52) is stronger than a Battania Fian (2.1). You know how they perform in field battles.

We can see there are at least three major flaws:
  • It is a "duel" model, every troop fight on it's own, without the party fighting as a whole.
  • The battle does not preserve states, mostly the remaining hitpoints of each troop, and how long the battle has been (how many arrow left for archers). Every troop is ether dead or at max hp. Every Session would be a fresh restart.
  • The formula to calculate Power is too over-simplified.

And some minor but frustrating problems:
  • The attacking order is totally random. If one side attacks first and kills several opposite soldiers, the returning fire will be weaker.
  • Every attack has a chance to instantly kill anyone. Even you have 200 Tier 6 knights against 1 looter, if the looter gets the chance to attack first, he has 10% chance to instantly kill one knight.

Understanding the number of Rounds:
Let's take an example, a 1000 vs 100 battle, and both sides have the same type of soldier. You thought the size with 1000 soldier should crush the 100 side, but it is not that simple:
  • The 1000 side do 1000^0.6=63 attacks every Session.
  • The 1000 side do 100^0.6=16 attacks every Session.
So the attacking power of the 1000 side is not 10 times the 100 side, but only 4 times, or more precisely, 10^0.6=3.98 times. That means, even when one side outnumber the other side by 10 times, it is much less than 10 times stronger. The ^0.6 is the penalty to the side with more soldiers, so that it will not just steamroll the opposite.
With the ^0.6, the result seems still acceptable, as the side is still 4 times more powerful. But this is not the case if player is leading that side: if the player is involved in such battle, every side will do (1000+100)^0.6*3=200 Rounds per Session, they will have EXACTLY SAME attacking power, or say, the opposite side becomes 4 times more powerful! 
An example at extreme will be the player lead 200 knights against a lone looter. The player party can do 72 attacks, while one looter can also do 72 attacks! The attacking order is totally random, the looter may have the chance to do multiple attacks, and every attack from the looter has a moderate (~10%) chance to instantly kill one knight. Now understand why the player can some time lose tens of soldiers in a 200-men party against a handful of bandits, or hundres when leading an army against a much weaker party.

To overcome the flaw of vanilla simulation model, SendAllTroop does the following:
  • In each Session, both sides attack simutaneouly. No more random attacking order.
  • In every Round, everyone attacks once. The total attacking power of one side is the sum of the attacking power of all troops. 
  • When attacked, the party take the hit as a whole. The incoming attacking is divided to everyone. Each troop takes a portion of the incoming attack, compare to thier respective defense to decide the damage.
  • Upon taking damage, a troop loses corresponding hitpoints. If his hitpoints reach zero, he dies.
  • After each Round, combat experience is shared among the whole party.
  • The player is treated equally as AI and uses the same formula.

Breakdown of DetailedCombatModel:
This new model uses the troop's equipments to determine its strength. And it also tracks the battle progression.
  • For every troop, the model searches his equipment sets to find wepaons, shields, armor and horse.
  • A weapon's attacking power is determined by it's properties, including damage, speed, length, weight, etc. Weapons of multiple modes (like menavliaton) can have very different attacking power for different modes.
  • Bows, crossbows and thrown weapons are limited by ammo. Every attack uses 1 ammo, and if the ammo runs out, the weapon cannot be used again. In siege battles ammo can be replenished.
  • A unit can have multiple weapons, and will choose the best weapon for the current situation. For example, archers that run out of ammo will use backup melee weapons.
  • The unit's attacking power is the weapon's attacking power multiplied by the unit's proficiency (0.6 + weapon skill level / 300 * 0.4).
  • A unit's base defense is determined by the sum of his armor points.
  • If he has a shield and not using two-handed weapon, he can use the shield, which slightly increase defense against melee attacks, and significantly against ranged attacks. The bonus depends on the properties of the shield.
  • If he has a horse, the health, speed and manueuver of the horse and armor of saddle determineds the horse bonus. The bonus is applied to melee attacks, and doubled if he is using polearms designed for mounted combat. he also receives a bonus to defense, but attacks from polearms can negate the defense bonus. 
  • Mounted archers have high defense against melee attack. When they run out of ammo and start to melee they lose the defense bonus.
  • If one runs on foot or it is a siege battle, the atheletics skill level is used to determine the attacking and defense bonus.

The new combat model also features a detailed combat progression:
  • Every battle has a "distance", similar to the starting distant for field battles. Currently, the distance is 1 if the total number of combatant is less than 50, 2 if 50-100, 3 if more than 100, or 4 if it is a siege assult.
  • Every weapon has it's range. Bows and crossbows have a range of 3, thrown weapons have 1, and melee weapons have 0. If the range is less than the distance, the weapon cannot be used until more time is passed. For every Session, the distance is closed by 1. The defending side in sieges receive +1 bonus range to ranged weapons because they have height advantage.
  • In seiges, there's a penalty to the attacking power of the attacking side. Ranged attacks do reduced damage while melee attacks do very little damage. The defending side do increased ranged damage. The penalty and bonus depend on level of fortification (wall level), and siege towers reduces the penalty for melee.
  • After some time, the main gate is breached, and the penalty is decreased. The time to breach the main gate depends on the number of siege engines built, and the battering ram is specialized in taking down the gate.
  • Polearms behave badly in sieges because they easily get stuck.

Advanced Configuration items:
  • Strength of Number: Controls the penalty applied to the side with more members. This is the same penalty described in "Understanding Number of Rounds". A higher value makes the side with more members stronger. Valid values are between 0.0 -1.0. In vanilla the value is 0.6. Earlier version of SendAllTroops has a value of 1.0. If you stick with the value of 0.6, set RandomDamage and RandomDeath to true, and set DetailedCombatModel to false, you will get very similar results to AI battles in unmoded base game. 
  • Siege Strength of Number: Controls the penalty applied to the side with more members in sieges. A lower value makes sieges more difficult.

Coding Details: Harmony prefix on:
  • MapEvent.SimulateBattleForRounds
  • MapEvent.SimulateSingleHit
  • CharacterObject.GetPower
  • DefaultCombatXpModel.GetXpFromHit
Postfix on:
  • MapState.EndBattleSimulation

WarStomp
Make horse charge formidable.
Spoiler:  
Show
Vanilla: Any horse charge can be stopped by a farmer holding a pitchfork by forcing the horse to rear, and the charge damage is generally low.

Modded: Powerful Horse charges can no longer be stopped unless the horse is killed, however horses receive increased damage form what would have stopped them. Charge damage from the back is increased to simulate the "run over" war stomp damage.

You can get the standalone single-xml file version here (only for the unstoppable part).


Configuration items:
  • Unstoppable War Horse Charge: Whether warhorse charges are stoppable by thrust attacks.
  • Unstoppable Other Horse Charge: Whether other types of horse and camel charges are stoppable by thrust attacks.
  • Damage Multiplier to Horse: The damage multiplier to horses from pierce attacks.
  • WarStomp Damage Multiplier: Charge damage multiplier when charging from the back.

Coding Details: Harmony postfix on: 
  • Mission.ComputeBlowMagnitudeFromHorseCharge
  • Mission.ComputeBlowDamage 
  • Mission.CreateHorseAgentFromRosterElements

PowerThrust
Rebalanced thrust (down attack) damage.
Spoiler:  
Show
Vanilla: Thrust (down attack)'s damage is entirely proportional to speed^2, so zero speed = zero damage. This causes animation-unfinished or slow thrust attacks to do near-to-zero damage and gives spears a very hard time. On the other hand, swing (up, left and right attacks)'s damage has a small constant base, a linear portion to speed, and a square portion to speed^2, giving it a smooth damage curve at different speeds. It also slightly change the thrust animation that it is less likely to be stopped when stucked in a crowd.

Modded: Add a small constant base and a linear portion to speed to the magnitude (thus damage) of thrust attacks.

Configuration items:
  • kE: The coefficient for energy when calculating magnitude. Vanilla value is 0.125.
  • kP: The coefficient for momentum when calculating magnitude. Vanilla value is 0.
  • kC: The constant coefficient when calculating magnitude. Vanilla value is 0.
  • Thrust Hit With Arm Damage Multiplier: Damage multiplier when it is the handguard part of the thrust weapon that hit enemy. Vanilla value is 0.15.
  • Non Tip Thrust Hit Damage Multiplier: Damage multiplier when it is the not the tip of the spear that hit enemy. Vanilla value is 0.15.

Numbers for reference: 
  • The total magnitude is: Magnitude = kE * (0.5 * weight * speed^2) + kP * (weight * speed) + kC. Weight is the weight of used weapon, speed is weapon's relative speed to target.
  • In vanilla for swing: The formula is much more complicated, involving weapon center of mass, inertia and so on. However, it still has this form and kC = 0.033.
  • Unless you really understand how damage is calculated, just leave those to default.

Coding Details: Harmony prefix on:
  • CombatStatCalculator.CalculateStrikeMagnitudeForThrust
Postfix on:
  • ManagedParameters.Initialize

RealisticBallistics (New)
Archers too OP? Javelins too accurate? Want bows to do cut damage? Change the missile speed and accuracy of ALL items in simple settings, without causing any conflict with other mods!
Spoiler:  
Show
To Users of Realistic Battle mod:
Realistic Battle does not work well with any other mod changing battles. It makes so much change to combat systems and breaks the whole numerical balancing of vanilla game. It has its own air friction settings which cannot be edited by users, and will override anything you set here. It is generally recommended you do not use RealisticBallistics if you choose to stick to Realistic Battle. If you really want to, you should only use Accuracy Multipliers.
For example, in native, Hunting Bow has 64 missile speed and 45 damage, enabling ConsistantArrowSpeed will change the missile speed to match the damage, and resulting a bow with 45 missile speed and 45 damage. However, Realistic Battle will change that to 40 missile speed and 10 damage. If you enable ConsistantArrowSpeed together with Realistic Battle, the bow will have 10 missile speed and 10 damage. 10 missile speed renders it useless.


Vanilla: The world seems to have really low air friction: arrow fly very fast with minimum drop, and javelins have vast ranges.

Modded: You can change the missile speed and accuracy of all ranged weapons, as well as the air friction parameters to let them drop sooner (or later). The lower speed and higher friction, the more curved the ballistic. And a curved ballistic can allow archers to do indirect shots and fire over the head of friendly infantry.

Note this mod uses "In memory mass patching" technique. Some of you must have used Armor Does Something or similar mods that changes the property in game xml files for items, and found out two mods changing the same item will always conflict, even though they change different properties (one for damage and another for speed).

In this mod, when the game loads such properties, it changes them on the fly, and changes only the selected properties without touching others. It is as if the xml was changed on disk, and the game thinks these items have the modified missle speed / accuracy. So the in-game data cards for items can correctly reflect the new values.

This also makes the mod fully compatible with almost everything else, be it Item Fixes, new weapon mod, Realistic Combat, etc. If for example a new item mod adds a new bow with 100 damage and 100 accuracy, and you set the multipliers in this mod to 0.8, in game you will see the new bow has 80 damage / accuracy.

Configuration items:
  • Consistant Arrow Speed: It uses the same idea of Consistant Arrow Speed Mod that the damage of the same type of arrow should depend only on the speed of such arrow, not the type of bow used. So for different bows, the arrow damage should equal the missile speed. It changes the missile speed of every bow and crossbow to match its damage. 
  • Arrow / Bow / Thrown Speed Multiplier: Multiply the missile speed for each type of weapon. If ConsistantArrowSpeed is set to true, the speed is first modified to match the damage, then apply the multiplier.
  • Bow / CrossBow / Thrown Accuracy Multiplier: Multiple the accuracy for each type of weapon.
  • Bow / CrossBow / Thrown Damage Multiplier: Multiple the damage for each type of weapon.
  • BowToCut / Crossbow to Cut: Whether change the damage type of all bows / crossbows and their respective ammo to cut.
  • AirFriction Javelin / Arrow / Knife / Axe: Change the air friction for each type of weapon. A higher air friction means it will lose more speed when flying and drop sooner. The vanilla value is 0.002 / 0.003 / 0.007 / 0.007.

Coding Details: Harmony postfix on:
  • WeaponComponentData.Deserialize
  • WeaponComponentData.Init
  • ManagedParameters.Initialize
SurviveByArmor
Let a soldier's survival chance depend on how he is downed in battle, by his armor.
Spoiler:  
Show
Vanilla: A soldier's base survival chance is only determined by level: 1 - 1 / (1 + Level * 0.03), and no details about the killing blow is taken into account.

Modded: The lethal blow's excessive damage can be used to determine the survival chance. Successive sratches of 5 damage from a group of farmers: almost always survive because the soldier just lost consciousness from pain; A javelin into the head dealing 300 damage: guaranteed death (unless your surgeon can do miracles).

The armor value can be used to determine a soldier's survival chance when excessive damage data is unavaliable, like in autoresolves. 

All death rates is now multiplicative: Total death rate = Excessive damage death rate / (1 + Level bonus + Armor bonus + Medicine bonus) * Damage type death rate.

Configuration items:
  • Survive By Excessive Damage: Whether enables the excessive damage mechanics. Excessive damage is the excessive part of the killing blow.
  • Safe Excessive Damage: If excessive damage is within this value, one is guaranteed to survive. Any damage beyond this safe margin increases the death rate. 
  • Lethal Excessive Damage: If excessive damage is beyond this value, one is guaranteed to die unless saved by surgeon. 
  • Apply Medicine, Apply Level and Apply Armor: Whether apply the corresponding survival bonus in field battles if Survive By Excessive Damage is on. They can be individually set, but it is suggested not to have both Level and Armor on at the same time, or the death rate might be very low.
  • Blunt Death Rate: the death rate of blunt attacks.
  • Survive By Armor Value: Use Armor value instead of character level to determine survival chance if Survive By Excessive Damage is NOT turned on, or in autoresolves.
  • Armor Value Threshold: The armor threshold to give a medium survival chance.

Numbers for reference: 
  • Excessive death rate is (ExcessiveDamage - SafeExcessiveDamage) / (LethalExcessiveDamage - SafeExcessiveDamage). For example, you have a cataphract with 20 hitpoints remaining. SafeExcessiveDamage is set to 10, LethalExcessiveDamage is set to 50. He got shot and receive 50 damage, so ExcessiveDamage is 50 - 20 = 30, and his excessive death rate is (30 - 10) / (50 - 10) = 50%. Without any other bonus, damage higher than 20 + 50 = 70 is guaranteed to kill him on the spot. Note that it can be higher than 1.0 if the damage is too high so that even other bonus cannot save him.
  • Level bonus = Level * 0.03, this is the vanilla value. You can turn it off by setting ApplyLevel to false.
  • Armor bonus = Sum of all armor pieces / ArmorThreshold * 16 * 0.03. The * 16 * 0.03 means: If a unit has ArmorThreshold points of armor, his survival chance equals a Tier 3 unit in vanilla. You can turn it off by setting ApplyArmor to false.
  • Medicine bonus is the value you see on a character's medicine skill description. You can also turn if off by setting ApplyMedicine to false;
  • By using the above three options, you can turn off any additional survival bonus in field battles and rely on excessive damages to judge death, or you can let excessive damage be a multiplier to existing death rate.
  • Damage type death rate is always 1.0 for cut and pierce, and BluntDeathRate for blunt, which defaults to 0.0.
  • When excessive damage data is NOT available, like SurviveByExcessiveDamage is set to false, or in auto battles, the death rate uses vanilla value 1 / (1 + Level bonus + Medicine bonus). If SurviveByArmorValue is on, Armor bonus replaces Level bonus and it becomes 1/(1 + Armor bonus + Medicine bonus).
  • An Imperial Elite cataphract is level 31 and has a sum of armor values of 266. The armor of Battania Fian Champion: 133. Aserai Mameluke Palace Guard: 174.
  • Sorry Sturgia wolf head (73).

Example Configurations:
The configuration of SurviveByArmor is very flexible now. Generally, if you intend to use excessive damage mechanism, there are two ways: use it as the deciding factor, or use it as a multiplier:
  • Deciding factor: SurviveByExcessiveDamage = true, UseMedicine/UseArmor/UseLevel = false. This way, the death rate calculated by excessive damage is final. You can set lethal damage a bit higher.
  • Multiplier: SurviveByExcessiveDamage = true, UseMedicine/UseLevel = true, UseArmor =false, and set lethat damage lower. For example, because of level bonus, a level 5 soldier has inherent 44% survival rate, or say 56% death rate. Set safe damage = 0 and lethal damage = 20. If he receives full lethal damage (20 points), his death rate is 56%. If he only receive half lethat damage (10 points), his death rate is 28%. And if he receive two times the lethal damage (40 points), his death rate is 112% so he is doomed. This makes it much easier to balance this mod and other mods that changes armor or health.

Coding Details: Harmony prefix on:
  • DefaultPartyHealingModel.GetSurvivalChance 
  • Agent.HandleBlow
Uninterrupted (New)
You, armed to the teeth, made the stance, prepared you two-handed axe, ready for a powerful swing. Then, a stone doing 5 damage interrupted your attack and you are beaten to death by hatches. Ever wonder why you choose to wear such armor in the first place? Now, you can be uninterrupted by scratches and UNSTOPPABLE! (Warning: your enemies are the same!)
Spoiler:  
Show
Vanilla: Attacks dealing at least 5 damage can interrupt any attack animation.

Modded: The damage threshold for interrupt can be adjusted. Note the threshold will apply to everyone.

Configuration items:
  • Damage Interrupt Attack Threshold Pierce / Cut / Blunt: Required damage of each type to interrupt attacks.

Coding Details: Harmony postfix on:
  • ManagedParameters.Initialize

Strategy:
ModifyRespawnParty
Note: the latest game version reduces the respawn party from 25% to 10% so this mod may no longer be necessary for you.
No more pocket soldier for AI lords after they escape... or have your own pocket soldier!
Spoiler:  
Show
Vanilla: AI lords respawn with 10% of their party troop limit soldiers coming from nowhere.

Modded: The number of respawn troops are adjustable for AI lords and the player's clan members (just like game version v1.0.0). Or you can get the standalone version here.

Configuration items:
  • AI Lord Party Size On Respawn: The number of soldiers AI lords respawn with.
  • Player Party Size On Respawn: The number of soldiers player's clan members start with when creating party.

Numbers for reference: 
  • On game start, lords spawn with a random number averaged at 75% of their party size limit.
  • You'd better at least give them 3 to prevent them falling victim to Looters(4). 

Coding Details: Harmony prefix on:
  •  MobilePartyHelper.SpawnLordPartyInternal

LearnToQuit
The player have the option of sacrificing troops and retreat in dire situations. AI should also learn that.
Spoiler:  
Show
Vanilla: AI parties fight to death no matter how dim the situation is, leading them to be prisoners and wasting soldiers.

Modded: Make AI learn to sacrifice and retreat if they are defending and losing. AI will evaluate the strength of both sides. If SendAllTroops is on, they will use the new autoresolve troop strength model and battle states, like the remaining hitpoints and ammo status of archers. The retreat chance is based on how many soldiers must be sacrificed and the Valor rating of party leaders. Note that the attacker may still chase the defender and if the defender is slow, they may get caught again. It is sometimes possible for the defender to retreat, get caught, retreat again and get caught again all the way from enemy territory to within border, and finally be saved by friendlies or get doomed.

Configuration items
  • Retreat Chance: A multipler to controls the chance of successful retreat.
  • Verbose: Turn on/off the "Lord retreat from battle" message in the left bottom corner.

Numbers for reference: 
  • In vanilla the attacker may choose to withdraw if the defender's power is more than 110% of the attacker's power. However for most of the time limitations and randomness prevent them from retreating.

Coding Details: Harmony prefix on 
  • MapEvent.GetAttackersRunAwayChance
  • MapEvent.FinishBattle

Some Rationale: The high escape chance and respawn party are introduced by Taleworlds to slow down snowballing. However, this sometimes causes headache to players as players defeat AI lords in battle, release or capture (the result is the same), only to fight him with a 50-man party coming out of nowhere again one day later, and repeat this for more than 10 lords holding a single town.

In fact, snowballing should happen. It is repeated in history at every corner on the earth that losing a decisive battle leads to losing a war, and the destruction of an whole empire. Losing all veterans and the majority of labour is not something a country can easily recover from, and one such battle should let a country get steamrolled. A faction losing 3000 soldiers in sequences of battles should vanish, in game.

The problem is not winning a battle, but not losing a battle. Any decent king/general always think twice before they send their main force. It is such a huge risk that one would never commit the main force unless with absolute chance of victory. If things are not clear, they would just probe, and even if they get caught, they would try the best to retreat and preserve strength, not fight to the last blood for each battle. AIs in game never learn that only to get themselves caught over and over again.

I don't know if applying the AI retreat to player involved battles would cause too much frustration, just like "managed to escape" in M&B 1, as you may never fight a full field battle and get full loot. At least, I think AI should learn to quit in AI-to-AI battles, preserving strength then run and hide in safety (defending castles and towns, remember how many times you lead a seige against a lord-defended castle?) This should be the solution to snowballing, not some "hotfix" with more troops coming from vacuum (and lose them again in one day).

BanditMerger (New: Experimental)
The bandits are running all over in small groups... It's just tiresome to catch every of them, and there are too many. Now you would have to deal with a single party of Looters(16) instead of 4 groups of Looters(4).
Spoiler:  
Show
Vanilla: Bandits spawn in small parties and litter around the map.

Modded: Merge nearby bandit groups of the same type into a larger group. Reduces overall the number of bandit parties.

Configuration items
  • Merge Radius: The distance between two bandit groups to be merged.
  • Max Non Looter Number For Merge: The maximum number of non-looter bandits in the same group to be allowed to merge more.
  • Max Looter Number For Merge: The maximum number of looters in the same group to be allowed to merge more.
  • Maximum Looter Parties: The maximum total number of looter parties. Default value before v1.4.5 was 300, please set to a lower value like 100 to prevent only spawning looters. The default value has been changed to 100 in v1.4.5.

Coding Details: New custom behavior and new custom BanditDensityModel.