Mount & Blade II: Bannerlord Developer Blog - Weapon Physics, Pt. 2

After skipping a week to introduce us to the Khuzait Khanate, this week's Mount & Blade II: Bannerlord developer blog post once again talks about the weapon physics in Bannerlord. In this second part you can read about Bannerlord's complex damage calculations based on a multitude of factors, and how the different damage types work in the game. Check it out:

In the previous blog in this series, we described how Bannerlord’s new weapon physics model derives swing and thrust speeds of weapons from their physical characteristics. We talked about how weapon crafting plays a role in determining these properties and how this gives players the freedom to create a weapon which will complement their own fighting style. In this week’s blog, we would like to expand on this topic and explain the rest of the weapon physics model, showing how we determine the damage that a weapon inflicts and how that works in the game.

Damage is a difficult concept to get right in a computer game. Making the damage model realistic could be desirable since this can help with immersion and depth, on the other hand, what happens in a real-life physical trauma is incredibly complex and trying to replicate that in a computer model could easily get needlessly complicated with little benefit to gameplay.

While working on the system we made great use of an excellent article written by George Turner. The article was an eye opener about the intricacies and fine points of weapon dynamics. Of course, during implementation we had to make several simplifications and assumptions and if there are any unrealistic elements or errors in the end result, the fault lies with us and not the article.

Energy and Damage
In Bannerlord we tried to come up with a good model that is somewhat based on physics, but is still simple and understandable for players. In our model, damage depends on kinetic energy dissipated during the impact. However, energy is not converted to damage directly as we use several extra steps in our calculations.

Types of Damage
A weapon hit can have three different types of damage: cut, pierce or blunt. These three types have different trade-offs.
  • A cutting weapon is most efficient in converting kinetic energy of the weapon into hit-point damage. However, it is also least effective against armour.
  • Blunt weapons may require more hits for taking down an opponent, however, they make up for this by being least affected by armour.
  • Piercing weapons sit somewhat between cutting and blunt weapons.
Apart from kinetic energy and damage type, weapons also have a damage factor that can increase their effectiveness. Better made, more expensive weapons will inflict more damage.

Speed Bonus
As our calculations are physically based, we no longer need to calculate an extra “speed bonus” like we do in the previous games in the series. We simply get the attacker’s and target’s velocities and feed these into our equations. This results in a realistic and accurate way where the attack damage is affected by speed.

Impact Point
For swings, damage depends on the location of the impact point on the weapon. When showing weapon statistics in the inventory, we simply show damage as if the attack connected at a point a few centimetres below the tip. During combat we take the impact point from the position of the weapon and the target, so it is not necessarily near the tip. So for example, an axe that advertises itself as having 80 damage can deliver much less if it hits the target near the grip.

Weapon Balance and Damage
Weight and balance of the weapon has significant effect on damage. As we discussed in the first part of the blog, weight and weight distribution basically determines how much kinetic energy accumulated in the weapon’s swing.
  • Lighter weapons are faster and more agile.
  • Heavier weapons can take more time to connect, but this gives more time to increase their energy making them more powerful.
Therefore, during the swing, the muscles work to speed up the weapon increasing its kinetic energy. When the impact happens, this energy can go into three places:
  • Some of the energy will stay with the weapon since the weapon will not necessarily come to a complete stop.
  • A significant portion of the energy will go into the impact with the victim. This is the part of the energy which does the useful stuff that a weapon is supposed to do (inflict damage!). As the attacker, you will generally want this to be as high as possible. Hitting the opponent at an optimal point may ensure that more of the energy goes to the impact rather than being retained by the weapon.
  • Lastly, a portion of the energy will go to kicking-back the attacker’s hand(s). Not only does this do nothing to the opponent, but it also affects the attacker adversely. In the game, we model this with an “attacker stun”, which means that weapons with high kick-back will make you unable to attack again for a short while after your current attack connects or is blocked. An interesting note is that a pommel with the right weight will reduce kick-back, much like a making a gun heavier will reduce recoil, ensuring that energy goes to the bullet rather than the shooter’s hand.
Conclusion
Overall, for Bannerlord we strived to create a physics based combat system that will give realistic and immersive results without making use of hidden random variables. This allows players to craft different weapons with individual characteristics and strengths. Hopefully, as players become familiar with the system, they will keep creating new weapons and discovering new techniques and this will serve as a good base to make the game’s combat fun and interesting.