Mount & Blade II: Bannerlord
0 of 0

File information

Last updated

Original upload

Created by

MacNokker

Uploaded by

MacNokker

Virus scan

Safe to use

About this mod

Customize the Damage Reduction provided by armor either globally or according to armor material.

Requirements
Permissions and credits
Changelogs
This mod replaces the default damage calculation method with a functionally identical one which exposes multiple variables to XML.

You can now customize armor damage reduction (for each armor type if so desired) by editing this XML file (customdamage.xml) in the module directory.
You are allowed to ship this file with your mod directly overwriting it if your mod depends on this one.

The file has more details on these values in the comments.



Additionally there are some new features:

1: You are able to set whether Perk Bonus Damage can be absorbed by armor, which in normal MB gets added after armor:

<ArmorSkillDamageAbsorb>1.0</ArmorSkillDamageAbsorb>

2: Armor Characteristics can be set for each material (cloth,leather,chainmail,plate) e.g. "cloth":

<materials>

<cloth>
<BluntFactorCut>0.1</BluntFactorCut>
<BluntFactorPierce>0.1</BluntFactorPierce>
<BluntFactorBlunt>1.0</BluntFactorBlunt>
<ArmorAbsorbFactor>2.0</ArmorAbsorbFactor>
<ArmorThresholdFactorPierce>0.5</ArmorThresholdFactorPierce>
<ArmorThresholdFactorCut>0.5</ArmorThresholdFactorCut>
</cloth> 

3a: Attack Magnitude can be set for each Damage Type x Attack Type:

<melee>
<cut>1.0</cut>
<pierce>1.5</pierce>
<blunt>1.0</blunt>
</melee>
<ranged>
<cut>1.0</cut>
<pierce>0.8</pierce>
<blunt>0.6</blunt>
</ranged>

3b: If you require more control over Attack Magnitude you may set individual multipliers by Weapon Class:

<Unarmed>1.0</Unarmed>
<Dagger>1.0</Dagger>
<OneHandedSword>1.0</OneHandedSword>
... 20 included in xml but if you need to set the others you can add them

4: Damage after Armor Reduction can be modified e.g. "cut":

<dmgmult>

<cut>
<Head>1.4</Head>
<Neck>1.8</Neck>
<Chest>1.0</Chest>
<Abdomen>1.0</Abdomen>
<Shoulders>1.0</Shoulders>
<Arms>1.2</Arms>
<Legs>1.2</Legs>
<Legs_Horse>1.4</Legs_Horse>
</cut>

5. (requested)The effectiveness of horse armor can be set.
6. (requested)The damage received by all heroes can be set.




As has been requested the default (base config) values would be:

<BluntFactorCut>0.1</BluntFactorCut>
<BluntFactorPierce>0.25</BluntFactorPierce>
<BluntFactorBlunt>1.0</BluntFactorBlunt>
<ArmorAbsorbFactor>1.00</ArmorAbsorbFactor>
<ArmorThresholdFactorPierce>0.33</ArmorThresholdFactorPierce>
<ArmorThresholdFactorCut>0.5</ArmorThresholdFactorCut>

<ArmorSkillDamageAbsorb>0.0</ArmorSkillDamageAbsorb> //disabled for vanilla behaviour


For a full list of the default values see MBDefaults.xml in the module directory.
Note that Material Detection does not have default values as it is not in the base game.


Source repo at https://gitlab.com/macnokker/customdamage
Mod uses Harmony 2.0 net472 DLL

Version R1.5 patches the following methods:

TaleWorlds.MountAndBlade.Mission.ComputeBlowDamage
TaleWorlds.MountAndBlade.Mission.ComputeBlowMagnitudeImp
TaleWorlds.MountAndBlade.Mission.GetDamageMultiplierOfCombatDifficulty
TaleWorlds.MountAndBlade.Agent.GetBaseArmorEffectivenessForBodyPart
Sandbox.SandboxAgentApplyDamageModel.CalculateDamage