SP - General Armour. Why it doesn't work and how to make it work

Users who are viewing this thread

Ingolifs

Grandmaster Knight
Why Armour doesn't work

So I was inspired to make this post by two things. First, this video:


And second: After being hit by a stone while wearing high quality armour
ESP8o.jpg


Basically, armour seems to have bugger all effect in the game, and I went and investigated why.

Behind the spoiler is the relevant game code and my notes about the variables.
Code:
    public static float ComputeRawDamageNew(
      DamageTypes damageType,
      float magnitude,
      float armorEffectiveness,
      float absorbedDamageRatio)
    {
      float num1 = 0.0f;
      float factorByDamageType = CombatStatCalculator.GetBluntDamageFactorByDamageType(damageType);
      float num2 = magnitude * factorByDamageType;
      float num3 = (float) (100.0 / (100.0 + (double) armorEffectiveness));
      float num4 = num1 + num2 * num3;
      float num5;
      switch (damageType)
      {
        case DamageTypes.Cut:
          num5 = Math.Max(0.0f, (float) ((double) magnitude * (double) num3 - (double) armorEffectiveness * 0.5));
          num4 += num5 * (1f - factorByDamageType);
          return num4 * absorbedDamageRatio;
        case DamageTypes.Pierce:
          num5 = Math.Max(0.0f, (float) ((double) magnitude * (double) num3 - (double) armorEffectiveness * 0.330000013113022));
          num4 += num5 * (1f - factorByDamageType);
          return num4 * absorbedDamageRatio;
        case DamageTypes.Blunt:
          return num4 * absorbedDamageRatio;
        default:
          return 0.0f;
      }
    }
(thanks to ZenDzee)

The inputs are:
DamageType - cut, pierce or blunt
Magnitude - how hard the weapon hits. The calculation for this one is fairly complicated and I may go over it at a later date. The damage stat on weapons in the inventory screen is a derived quantity relating to this magnitude. Basically consider it as the raw damage amount before armour comes into play.
ArmorEffectiveness - the armor value protecting the specific body part that got hit
AbsorbedDamageRatio - some kind of blanket damage reduction thing. Appears to be unused - the only entities that have it defined have it set to 1.
FactorByDamageType - Some kind of formula - altering number to change the behaviour of weapon damage types. Blunt is 1, pierce is 0.25 and cut is 0.1. As I'll go into below, this thing mostly cancels itself out and is only actually important when calculating the integer damage reduction.

Code:
 public static void ComputeBlowDamage(
      float armorAmountFloat,
      WeaponComponentData shieldOnBack,
      AgentFlag victimAgentFlag,
      float victimAgentAbsorbedDamageRatio,
      float damageMultiplierOfBone,
      float combatDifficultyMultiplier,
      DamageTypes damageType,
      float magnitude,
      Vec3 blowPosition,
      ItemObject item,
      bool blockedWithShield,
      bool hitShieldOnBack,
      int speedBonus,
      bool cancelDamage,
      bool isFallDamage,
      out int inflictedDamage,
      out int absorbedByArmor,
      out int armorAmount)
    {
      if (!isFallDamage)
      {
        int num = (int) armorAmountFloat;
        armorAmount = num;
      }
      else
        armorAmount = 0;
      float armorEffectiveness = (float) armorAmount;
      if (hitShieldOnBack && shieldOnBack != null)
        armorEffectiveness += 10f;
      float absorbedDamageRatio = victimAgentAbsorbedDamageRatio;
      float rawDamage = Game.Current.BasicModels.StrikeMagnitudeModel.ComputeRawDamage(damageType, magnitude, armorEffectiveness, absorbedDamageRatio);
      float num1 = 1f;
      if (!blockedWithShield && !isFallDamage)
        num1 = num1 * damageMultiplierOfBone * combatDifficultyMultiplier;
      float num2 = rawDamage * num1;
      inflictedDamage = MBMath.ClampInt((int) num2, 0, 2000);
      int num3 = MBMath.ClampInt((int) ((double) Game.Current.BasicModels.StrikeMagnitudeModel.ComputeRawDamage(damageType, magnitude, 0.0f, absorbedDamageRatio) * (double) num1), 0, 2000);
      absorbedByArmor = num3 - inflictedDamage;
    }

Points of interest:
HitShieldOnBack - If you have a shield on your back, it adds +10 to armor if hit there.

DamageMultiplierOfBone - The damage bonus from getting in the head vs getting hit in the arm. The damage bonuses are as follows:
Head and neck: 2x pierce damage, 1.2x cut and blunt damage
Legs: 0.8x damage for all damage types.
Horse legs: 1.2 x damage for all damage types

I also found a curious bit of code that I can't understand the purpose of. It appears to make all blunt melee attacks ~ 50% stronger.
Code:
  this.DamageMultiplierOfBone = victimAgent.GetDamageMultiplierForBone(attackCollisionData.CollisionBoneIndex, (DamageTypes) attackCollisionData.DamageType);
        if (!attackCollisionData.IsMissile && (sbyte) attackCollisionData.DamageType == (sbyte) 1)
          this.DamageMultiplierOfBone = (float) ((1.0 + (double) this.DamageMultiplierOfBone) * 0.5);

The damage calculations look a bit complicated, but with a bit of algebra they simplify nicely.

From the code:

magnitude * FactorByDamageType * 100/(100 + armour) + (1- FactorByDamageType)*(magnitude*100/(100 + armour) - 0.5* armour)

This simplifies to:

magnitude* 100/(100 + armour) - (1 - FactorByDamageType )* 0.5 * armour

For Cut damage: magnitude* 100/(100 + armour) - 0.45* armour
For Pierce damage: magnitude* 100/(100 + armour) - 0.25* armour
For Blunt damage: magnitude* 100/(100 + armour)

iRkY1.png


The formula can be divided cleanly into two parts. The first part (100/(100+armour)) is essentially a percentage reduction, and a weak one at that. With 50 armour ( a decent amount to have by the late mid game), this is a 33% reduction. With 60 armour (close to being the best you can get), it's 37.5% reduction. These figures are very low when you compare them to other games. Early ID software games, for instance, had armour ranging from 50% to 80% protection, and even then, they didn't make you feel invulnerable.

The second part is integer damage reduction. This is the main thing that protects you from cut and pierce damage. However, for blunt damage it's completely absent! This means that no matter how much armour you've cheated onto your character, you'll never be fully protected from people flinging 3 damage pebbles.

This is the core reason why armour feels ineffectual. The damage reduction for attacks in general and blunt in particular is so low as to basically not be worth having heavy armour.

How the Damage Model can be made better

A good armour damage model needs to achieve several things:

-Armour needs to feel like armour and not cardboard. High quality historical armour provided a huge amount of protection from most strikes and the gameplay needs to reflect that.

-Incidental, weak blows should do zero damage.

-A lone armoured combatant should be brought down by dozens of peasants/looters. In real life, a lone knight would be wrestled to the ground by the peasantry and knifed through eyeslits/armpits or had their armour undone before being killed. We don't have that in M&B, so it's important that such attacks from low-tier fighters still do ~1-2 damage so that lone knights who lose their horse amongst peasants can eventually be killed.

-It's important that the armour doesn't absorb too much damage from super heavy attacks - like trebuchet rocks or a lance to the face from maximum velocity.

-There should be a meaningful gameplay distinction between using Cutting, Piercing and Blunt weapons. The player should find themselves in situations where they have to weigh up the pros and cons of which item type to equip. There sort of already is a distinction between cutting and the other damage types, but ideally there should be a distinction between piercing and blunt too.

These goals can't be achieved by either an integer damage reduction or percentage absorption system.

jGGxQ.png


Instead I propose a piecewise function - something that absorbs all damage from small attacks, lets some damage through for medium attacks, and allows lots of damage to get through from heavy attacks.

One way of doing this is with three joined linear functions - a flat damage reduction up to some value (let's say armour/2), a small amount of damage leakage (say ~25%) up to the armour value and full damage for higher values.

Another way is to join a curved function (such as a parabola) with a line. You just match the two up where the curve's slope becomes 1. A more aggressively curved function like a cubic or exponential could be used to further reduce the damage at low levels.

PcG7y.jpg


This gives more room for mixing and matching models to make pierce and blunt damage a bit more distinct. For instance, armour could be more effective at absorbing very low damage pierce attacks vs blunt attacks, but less effective at moderate damage levels.

Alternatively, blunt damage could be more effective at interrupting attacks. Currently all damage types will interrupt an attack if the damage dealt is over 5. If the threshold for blunt damage is lower, it allows blunt weapons to be more threatening to armoured opponents without necessarily having to be completely armour piercing.

 
Last edited by a moderator:
Beautiful post. Establishes the situation, explains why situation is not ideal, and proposes several conceivable ideas to make it better.

I can't think of anything that doesn't already fit in the current models, only can give the less useful what if ideas to allow new potential ones. For example if armor could be separated beyond a raw armor value, you could have them give different resistances to different damage types. Strong vs blunt, weak vs pierce, etc.
The other is a method for attacks to to give an extra element of randomness. If every long once in a while an attack got a "lucky!" modifier or something and bypassed more armor then you can have things like a knight slugging of peasant blows but still fall to a hoard of them as a lucky stone just manages to do damage, or a lucky hit to a joint, etc
 
Um... +1!

In all seriousness. What are your thoughts on the two mods: armor does something and realistic battle with realistic armor?

I've used both and currently use the latter, finding it more realistic and much more satisfying, but do not know the specific calculations.

I do find that piercing attacks in arena against well armoured opponents do more damage than slashing attacks.
 
Great analysis and proposal!

Doesn't seem as if pierce damage really works as pierce damage. The only reason to use pierce weapons is (besides cavalry defense and range) to pierce armor, and this is not at all reflected in the present code. Please correct me if i'm wrong there, but if i'm not this is just another example for how few thoughts they have actually put in the development process. They seem to just have coded something that works at the first look, but is nowhere near credible or logical.
 
Thanks for the post. Quality one.
I wanted to make different thread for Horse Armor problem alone but I think this post belongs here.

Currently, the mount combat is a hell. I have a War Horse with the best quality horse armor (don't remember the stats but it was worth 60k+ ) and I am being dismounted in one or two hits everytime I go in battle.

I try to be careful and not charge straightforward into bunch of soldiers but that seems to doesn't matter. 2-3 well placed arrows kill the horse easily as if it doesn't have an armor at all.

Basically, I don't feel any difference between having heavy armor on the horse, or no armor at all and that's just not right gameplaywise. Armor must mean something. It must make me the force to be feared on battlefield.
 
zL3Et_j8f3rpjnZGdrge4qwP8b78veyjK5at-sIaB4IlMS8_UAPskH0jckkFQ2Pdh-Ps0GZhFAiSGgojd-I31COk24Zvmb6wI44jV9qnffhkTweREYB9qzrcCXEDrm2zcv0bVh2dXUiJ28wJGuOgZP46EoYrQM-kcg60Wi5hsW-Cy4qlRt3XQnWsADDFFf1FUGQGU2ez5DBmVksBPJ-SU1iY1SX95wfmB2ICmvT0dtdouaQAAF7McXxZ74nQ


Really interesting @Ingolifs , very good post and I hope @MArdA TaleWorlds won't mind sharing it with his colleagues in the appropriate department. KyDeezy is right, those mods have become essential for more than someone; I have installed the Realistic Battle Mod myself and it develops its function in a good way that satisfies me. As Bloc said the other day in other threat, it would be nice for Taleworlds to visit Nexus ( in case they haven't already ), to investigate the Hot Mods and somehow "absorb" them and commute them to the Native.
 
Armour? pfft! I can pretty much cut through it with my katana! or I'll throw a stone to a dude wearing pretty decent armor while riding a horse going sideways and then manage to hit him then deal 20 dmg! Jokes aside, +1 to everything. great post
 
I doubt the devs will care, but my thanks go to the OP for taking the time to post this, it would make perfect sense to take action on it.
 
Great analysis, great post. An intelligent and constructive post amongst the multitudes of "why you break my game" posts I've endured in recent times. Whether the devs take it on board is another question, however thanks for sharing your well thought out and reasoned analysis and suggestions. I hope they do take notice. :smile: ? ?
 
The other is a method for attacks to to give an extra element of randomness. If every long once in a while an attack got a "lucky!" modifier or something and bypassed more armor then you can have things like a knight slugging of peasant blows but still fall to a hoard of them as a lucky stone just manages to do damage, or a lucky hit to a joint, etc
NO
 
Very good post ! It changes from the usual whining (y)
Totally agree and I would go for the quadratic model but with little modification. Because with this model, low level armors become useless.
 
Very good detailed analysis. Unfortunately, added to all the other nonsensical formulas and bizarre game mechanics, it shows how much the original design was borked. And the devs just seem to be preoccupied to fixing that flawed design with band-aids.

Well.. Maybe in a year or two some modder will turn BL into something interesting. Right now, it's just a mess.
 
I tell you what, when I'm in the arena whacking a noble over his head repeatedly because his expensive helmet is protecting him, while my shield wears out, I really get the impression that armour is working correctly, maybe even a little too well.

The "armour problem" seems to be momentum and javelins, specifically players moving towards javelins that hit them. Blunt might have an impact on our experiences, but hardly any units and probably hardly any players use blunt weapons.
 
That's an awesome analysis and some good proposals.

However, I cannot totally agree with the enthusiasm to make armor so much better. The reason is that the game lacks almost any negatives which come along with armor. Making armor too good leads to big imbalance therefore.

You know the story of the death of the Earl of Shrewsbury in 1098? When the fleet of Magnus Barefoot (or Bareleg, as others call him) was near his lands, the earl rode to the shore with his force, and two archers from the ships shot at him, one arrow hit the nasal of the helmet and deflected, the other hit through the eye and killed the heavily armored knight immediately. Such total failure of armor was not extremely seldom, because most armor had gaps.

So we needed a percentage for when armor was applied and for when it was of no use at all (like in Kenshi). If we had closed helmets we needed, for example, negatives to Athletics (cause breathing is strongly affected by closed helmets), perhaps restricted vision. We needed exhaustion from the weight and heat (or cold) coupled with the wearing of armor. We have nothing of this, no negatives (except weight on foot), armor protects all the time, so it must not protect as much as it would in reality if hit.
 
That's an awesome analysis and some good proposals.

However, I cannot totally agree with the enthusiasm to make armor so much better. The reason is that the game lacks almost any negatives which come along with armor. Making armor too good leads to big imbalance therefore.

You know the story of the death of the Earl of Shrewsbury in 1098? When the fleet of Magnus Barefoot (or Bareleg, as others call him) was near his lands, the earl rode to the shore with his force, and two archers from the ships shot at him, one arrow hit the nasal of the helmet and deflected, the other hit through the eye and killed the heavily armored knight immediately. Such total failure of armor was not extremely seldom, because most armor had gaps.

So we needed a percentage for when armor was applied and for when it was of no use at all (like in Kenshi). If we had closed helmets we needed, for example, negatives to Athletics (cause breathing is strongly affected by closed helmets), perhaps restricted vision. We needed exhaustion from the weight and heat (or cold) coupled with the wearing of armor. We have nothing of this, no negatives (except weight on foot), armor protects all the time, so it must not protect as much as it would in reality if hit.

I think both should accompany eachother, and that is something we can expect. TW now even got a tutorial how to adjust the armor calculation, and adding a simple stamina malus dependent on armour shouldn't be a real problem i guess.
 
BTW, why blunt damage ignores armor? Do they even know physics?
Right now we have "blunt weapons deals little damage but ignore armor" and this logic is just completly wrong.

Blunt damage is the WORST possible way to deal with armor, becouse strike has a huge sufrace of contact. You need to bend a lot more steel to wound enemy. (thats why maces were not just steel balls and hammers heads was so small compare to fantasy crap)

All anti armor weapons was UNBALANCED at first. Center of mass was closer to end, so with the same weight and strenght you can deliver a lot more energy to the strike. Becouse center of mass with travel a lot more and E=F*L
Crowbill was best example of anti armor weapon. A lot of energy + very thin point. BUT weapons like this has one HUGE issue. Just watch any "crowbill test" video and you will see it. After strike it can stuck in armor very very hard. Even without any damage to the enemy.
And thats why you want to use hammers - it provides a lot of energy and it cant stuck.

So blunt weapons should not ignore armor, they should deal tons of damage, that can overcome the armor value, but this weapons should be slow with bad handling.
 
Last edited:
Back
Top Bottom