Combat Mechanics: Theory VS Reality

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

yahiko

Captain
22 Badges
Dec 23, 2013
438
0
  • Europa Universalis IV
  • Crusader Kings II
  • BATTLETECH: Heavy Metal
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall
  • BATTLETECH: Season pass
  • BATTLETECH: Flashpoint
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • BATTLETECH - Digital Deluxe Edition
  • Age of Wonders III
  • BATTLETECH
  • Tyranny: Archon Edition
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Knights of Pen and Paper 2
  • Pillars of Eternity
  • Sword of the Stars
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
Well, since I'm trying to understand in details EU4's combat mechanics, I've studied thoroughly the Wiki page about this topic: http://www.eu4wiki.com/Land_warfare

After figured out the distinction between Morale Pips and Fire/Shock Pips (cf. this topic), I tried to put my knowledge into practice.

Let's assume we have a battle between the attacking Cherokees and the defending Powhatans (EU4 v1.4.1):
* 6 Infantry Regiments of Native American Archers (1 Offensive Shock, 1 Offensive Morale) on each side.
* A +0.25 infantry modifier for Fire, and a +0.30 infantry modifier for Shock (since Tech 1) on each side.
* A Cherokee leader with 0 Fire, 2 Shock, and a Powhatan leader with 2 Fire, 1 Shock.
* The Cherokees start with a morale of 2.08, and Powhatans with a morale of 2.06.
* 100% of discipline on each side.
* 0.50 of military tactics on each side.
* A -1 terrain modifier for the Cherokees due to a crossing river.
* A starting die of 9 for the Cherokees and a die of 7 for the Powhatans.

The battle starts in a Fire phase. Since each army is small and have only infantry, we could ignore the deployment phase.

According to the Wiki page, we have to compute first the die result for casualties on one hand and for morale damage on the other hand as follow:
(1) die result casualties = die roll + (attacking leader Fire - defending leader Fire) + (attacking unit attack Fire Pips - defending unit defense Fire Pips) - terrain modifiers
(2) die result morale = die roll + (attacking leader Fire - defending leader Fire) + (attacking unit attack Morale Pips - defending unit defense Morale Pips) - terrain modifiers

Attacker (Cherokees)
die result C = 9 + (0 - 2) + (0 - 0) - 1 = 6
die result M = 9 + (0 - 2) + (1 - 0) - 1 = 7

Defender (Powhatans)
die result C = 7 + (2 - 0) + (0 - 0) - 0 = 9
die result M = 7 + (2 - 0) + (1 - 0) - 0 = 10

Next, we have to compute the base casualties (for actual casualties and for morale damage) using the base casualties table.

Attacker (Cherokees)
base casualties C = 50
base casualties M = 60

Defender (Powhatans)
base casualties C = 80
base casualties M = 90

And finally, we can compute the casualties and the morale damage (patch 1.4 states that morale damage is increase by 10% and every day, each unit in a combat losses 0.01 morale).

(3) casualties = base casualties * attacking unit strength * attacking unit modifier * (100% + attacking unit Combat Ability) * attacking unit Discipline / defending unit Tactics
(4) morale damage = (base casualties * 0.01 / 6 * attacking unit strength * attacking unit maximum morale * (100% + attacking unit Combat Ability) * attacking unit Discipline / defending unit Tactics) * 1.1 + 0.01

Attacker (Cherokees)
casualties = 50 * 1 * 0.25 * (1 + 0) * 1 / 0.5 = 25
morale damage = (60 * 0.01 / 6 * 1 * 2.08 * (1 + 0) * 1 / 0.5) * 1.1 + 0.01 = 0.4676

Defender (Powhatans)
casualties = 80 * 1 * 0.25 * (1 + 0) * 1 / 0.5 = 40
morale damage = (90 * 0.01 / 6 * 1 * 2.06 * (1 + 0) * 1 / 0.5) * 1.1 + 0.01 = 0.6898

So, computations show that Cherokees should inflict 25 casualties and 0.4676 morale damage per unit to Powhatans, and Powhatan, 40 casualties and 0.6898 morale damage per unit, considering the fact that armies are small (6 regiments each) without "idle" regiments. In the end, based on computations, Cherokees should suffer 6 * 40 = 240 casualties and 0.6898 morale damage, and Powhatans should suffer 6 * 25 = 150 casualties and 0.4676 morale damage.

However, it seems to be wrong since in the game with the same initial conditions, results are different. In the first day of battle, Cherokees suffer only 160 casualties and 0.31 morale damage, and Powhatans suffer only 140 casualties and 0.17 morale damage.

This is quite annoying not being able to rely on what is stated in the Wiki. I suspect the base casualties table to be deprecated but cannot have any proof of that of course. If anyone could bring me some lights, this would be really helpful.

Thanks for having read so far. ^^
 
Last edited:
I can't reproduce your results (possibly also since I can't fix the dice rolls ;)). My Powhatan and Cherokee with 6 regiments each are consistently dealing 3 times base casualties in actual casualties, as it should be.
 
As far as I know attacker doesn't mean who attacked, and defender doesn't mean who defended.

Both sides will attack during each phase. The Wiki actually notes that. Edit: Hmm nvm about this. I think I saw wrong before how you were calculating it because you added the (attcker) and (defender) tag to each side.

Also, if I have a 1-shock leader, and you have a 3-shock leader, as far as I know this won't result in a -2 roll penalty for me, and a +2 roll bonus for me. Instead it would result in a +0 bonus for me, and a +2 bonus for you.
 
Last edited:
I can't reproduce your results (possibly also since I can't fix the dice rolls ). My Powhatan and Cherokee with 6 regiments each are consistently dealing 3 times base casualties in actual casualties, as it should be.
I see. But even if you cant reproduce exactly, because of random dice, are your results closer from my computations or closer from what I mention in game?

As far as I know attacker doesn't mean who attacked, and defender doesn't mean who defended.
Both sides will attack during each phase. The Wiki actually notes that.
Yep, I know that. I don't think having forgotten this point in my computations. If so, please let me know where.

Also, if I have a 1-shock leader, and you have a 3-shock leader, as far as I know this won't result in a -2 roll penalty for me, and a +2 roll bonus for me. Instead it would result in a +0 bonus for me, and a +2 bonus for you.
Really? The wiki doesn't seem to state that.
In your case, "attacking leader skill - defending leader skill" means -2 for you and +2 for me.
 
As far as I know attacker doesn't mean who attacked, and defender doesn't mean who defended.

Both sides will attack during each phase. The Wiki actually notes that.
That is true, but has also been taken into account here.

Also, if I have a 1-shock leader, and you have a 3-shock leader, as far as I know this won't result in a -2 roll penalty for me, and a +2 roll bonus for me. Instead it would result in a +0 bonus for me, and a +2 bonus for you.
That is not how the wiki explains it however. It could be wrong (or just very unclear) on that topic, ofcourse. But that's what we're trying to find out.

I should mention in my short test both my leaders had 1/0 in fire/shock so leader skills didn't change the math at all, and it worked fine then. So maybe the leader skills are just misrepresented on the wiki.
 
I see. But even if you cant reproduce exactly, because of random dice, are your results closer from my computations or closer from what I mention in game?
I mean my combat results were all roughly the same as the calculation I made through the formulae. I will try again with massively different leaders.

And now I have!
With a 0/4 leader on Powhatan side and a 4/1 on Cherokee.
tag: POW - CHE
roll: 5(-1) - 4
expected base casualties inflicted: 32 - 70
converted to real casualties: 16 - 35
times six regiments: 96 - 210
actual casualties inflicted: 96 - 210

Perfect!

morale base casualties inflicted: 40 - 80
morale damage expected: .319 - .628
actual morale damage: .20 - .17

Eh yeah, that doesn't quite work out. I thought I read somewhere that you get a morale boost as the attacking side, which would help that make more sense, but I can't seem to find any details on that anywhere anymore. So this part of the test is kind of useless :p
 
Interesting experiment Schmo ;)
Could you please tell me what were you Unit Modifiers? With +0.25 infantry modifier for Fire and a +0.30 infantry modifier for Shock, I also find 210 casualties but cant find 96 casualties on POW's side (36 instead!)

Also, my main issue is for morale. I've made the hypothesis that de base casualties table for morale is different than the one for actual casualties.
 
HTW3ddy.jpg


Cherokee: 1 fire leader. Roll of 9. -1 river crossing. 6 regiments.
Powhatan: 3 fire leader. Roll of 5. 3 regiments.

Cherokee:
die result = 9 + 0 + 0 - 1 = 8 (1 fire leader - 3 fire leader = -2. this is counted as 0. You can see what the leader modifier ends up as in the box where the terrain modifier and die roll are.)
base casulaties: 70
casualties = 70 * 1 * .25 * 1 * 1 / .5 = 35
Total casualties: 5 regiments attack for 175 casualties. Powhatan left with 3000 - 175 = 2825 men

Powhatan:
die result = 5 + 2 + 0 + 0 = 7
base casulaties: 60
casulaties = 60 * 1 * .25 * 1 * 1 / .5 = 30
Total casualties: 3 regiments attack for 90 casualties. Cherokee left with 6000 - 90 = 5910 men

Notes: First day of casualties happen immediately when the armies clash. The total morale (the green bar) is the average of the morale of each regiment, which can be seen by mousing over each regiment.



Edit: You're not finding the 96 casulaties because you're applying a -4 penalty to them for not having a 4 Fire leader. There is no penalty to the amount of casualties you do for having an inferior leader.
 
Last edited:
Interesting experiment Schmo ;)
Could you please tell me what were you Unit Modifiers? With +0.25 infantry modifier for Fire and a +0.30 infantry modifier for Shock, I also find 210 casualties but cant find 96 casualties on POW's side (36 instead!)

Also, my main issue is for morale. I've made the hypothesis that de base casualties table for morale is different than the one for actual casualties.
Oh yeah, I think I made a small error there which turns out to prove that indeed Golladan is correct. I didn't subtract the Cherokee's leader skill from the die roll for the Powhatan. Since that resulted in absolutely perfect results, clearly that is the way to do it, and the wiki needs to be far more clear about it :p

I'm really not entirely sure what's going on with morale either. It's pretty obvious that the formula isn't quite correct since the morale mechanic has changed since it was put up. But it's not entirely obvious what part of unexpected results are due to changes not working the way you'd expect them to and what part due to the actual formula not being quite right. I'll probably do a lot of combat math testing once they add the ability to mod the dice rolls, but until then I'm afraid I'll stick to simple quick tests like this :p
 
Yeap, seems Golladan was correct. It fixes the actual casualties formula. Good news!
Thanks schmo for your tests. Very clear and helpful ;)

I gonna work on morale but this is complicated for sure. If one of us end up on something consistent, let's post our results here.
Thanks a lot again ;)

EDIT:
The correct die result formulae are:
(1) die result casualties = die roll + MAX(attacking leader skill - defending leader skill, 0) + (attacking unit attack skill - defending unit defense skill) - terrain modifiers
(2) die result morale = die roll + MAX(attacking leader skill - defending leader skil, 0) + (attacking unit attack Morale Pips - defending unit defense Morale Pips) - terrain modifiers
 
If some of you are interested in understanding EU4's combat mechanics, I share a small open source web application immodestly called "Battle Simulator for EU4": http://yahiko.co.nf/battleSimulatorEU4/

It's in beta release and lacks many important mechanisms (e.g. unit deployment, unit selection). However, I plan to improve this tool by time being.
Feel free to comment, any suggestion could be helpful.
 
If some of you are interested in understanding EU4's combat mechanics, I share a small open source web application immodestly called "Battle Simulator for EU4": http://yahiko.co.nf/battleSimulatorEU4/

It's in beta release and lacks many important mechanisms (e.g. unit deployment, unit selection). However, I plan to improve this tool by time being.
Feel free to comment, any suggestion could be helpful.

Great initiative, kudos. I've finally been getting into the quagmire of an equation that is EU4 battle myself. Something interesting I've found:

Battle dynamics are determined by aggregate regiment condition and its delta. We can see this by looking at the order in which realized damage is determined: first base casualties by die result (baseline), then potential damage by regimental modifiers (strength, condition, ability, discipline), then realized damage by enemy Tactics. Only one factor (regiment condition) will vary during the course a battle, and that factor scales potential damage 1:1 for the current battle state, which in turn affects the difference in condition for future battle states, hence battle dynamics are determined by aggregate regiment condition and its delta, QED. It would take some tedious calculus work that I'm not going to do to derive exactly when a battle is decided, but given that there are no black swans (e.g., "critical hits") except for external reinforcements, I'm confident that it's in the first 15% for two large, equal armies.

The only exception is when the armies are so equal that they approach the breaking point where regiments begin to retreat and fail to be replaced more or less simultaneously, such as when two highly damaged armies battle. (This nearly cannot occur for undamaged armies, however, since any slight difference in initial conditions or initial battle phases would snowball via regiment condition.) In this case, battle dynamics should be determined by relative unit deployment and, in particular, the relative rates at which regiments retreat and fail to be replaced. I'm not sure this would be worth trying to model, though, so you could probably save a lot of time by not including unit deployment in your simulator.
 
Great initiative, kudos. I've finally been getting into the quagmire of an equation that is EU4 battle myself. Something interesting I've found:

Battle dynamics are determined by aggregate regiment condition and its delta. We can see this by looking at the order in which realized damage is determined: first base casualties by die result (baseline), then potential damage by regimental modifiers (strength, condition, ability, discipline), then realized damage by enemy Tactics. Only one factor (regiment condition) will vary during the course a battle, and that factor scales potential damage 1:1 for the current battle state, which in turn affects the difference in condition for future battle states, hence battle dynamics are determined by aggregate regiment condition and its delta, QED. It would take some tedious calculus work that I'm not going to do to derive exactly when a battle is decided, but given that there are no black swans (e.g., "critical hits") except for external reinforcements, I'm confident that it's in the first 15% for two large, equal armies.

The only exception is when the armies are so equal that they approach the breaking point where regiments begin to retreat and fail to be replaced more or less simultaneously, such as when two highly damaged armies battle. (This nearly cannot occur for undamaged armies, however, since any slight difference in initial conditions or initial battle phases would snowball via regiment condition.) In this case, battle dynamics should be determined by relative unit deployment and, in particular, the relative rates at which regiments retreat and fail to be replaced. I'm not sure this would be worth trying to model, though, so you could probably save a lot of time by not including unit deployment in your simulator.

As you said: without any intervention, a battle is decided quite fast. And that it's important to do maximum damage in the first days of a battle.
And that's why artellery is so overpowered and worth it's price. (shooting from second row AND increasing def pips for first row = more casualities for enemies with lower casualities on own side)
 
As you said: without any intervention, a battle is decided quite fast. And that it's important to do maximum damage in the first days of a battle.
And that's why artellery is so overpowered and worth it's price. (shooting from second row AND increasing def pips for first row = more casualities for enemies with lower casualities on own side)

I think there's a lot of general feelings and best-practice advice floating around on about combat which works, but we don't really understand why it works. For instance, I've long had a feeling that what truly mattered was casualties (inflicted and sustained), not morale, and now I see why: casualties lead to more casualties, but morale damage doesn't lead to more morale damage, and it's because of the regiment strength factor's influence on battle dynamics.

We can also finally derive principles for optimal army configurations by maximizing regiment strength, which is done by optimizing the three levels I've specified, which we might call "Baseline," "Defense" and "Damage." Optimal baseline is achieved by fielding an army with your best combined general-regiment configuration (found by maximizing base casualties from the sum of general-regiment Fire and Shock values, minding the increasing marginal utility of higher rolls), defending in the harshest possible terrain (self-explanatory). Optimal Defense is achieved by maximizing Discipline, Tactics, as well as fielding a full combat width front, and a full combat width in artillery. Optimal Damage is achieved by maximizing Discipline, Modifier and Combat Ability.
 
but morale damage doesn't lead to more morale damage
I believe morale damage is modified by current morale, so higher morale does lead to more morale damage (which in part is why morale stacking can be powerful).
However, morale is "only" meaningful in forcing the enemy to retreat, while casualties have more immediate benefits.
 
I believe morale damage is modified by current morale, so higher morale does lead to more morale damage (which in part is why morale stacking can be powerful).
However, morale is "only" meaningful in forcing the enemy to retreat, while casualties have more immediate benefits.

If it is, it's not in the formula, which invokes maximum morale (which also explains why morale stacking works).
 
If it is, it's not in the formula, which invokes maximum morale (which also explains why morale stacking works).
Hmm.
Well I'm going off on vague memory of a post made a while ago by a dev (I think, hell, I could be remembering that part wrong and it wasn't a dev), so I'm quite willing to say I'm wrong.
I guess it could be decided through some tests - should be easy enough by using maintenance sliders, to get low current morale but high max morale and see how morale damage plays out.
 
Hmm.
Well I'm going off on vague memory of a post made a while ago by a dev (I think, hell, I could be remembering that part wrong and it wasn't a dev), so I'm quite willing to say I'm wrong.
I guess it could be decided through some tests - should be easy enough by using maintenance sliders, to get low current morale but high max morale and see how morale damage plays out.

It wouldn't be consistent with how combat plays out, I think. If current morale determined morale damage, we would see relative changes in morale loss for attacker and defender beyond and above the relative change in casualties, but this does not occur. We would also see a net decrease in morale loss as a battle progressed, which does not occur either.
 
Battle dynamics are determined by aggregate regiment condition and its delta. We can see this by looking at the order in which realized damage is determined: first base casualties by die result (baseline), then potential damage by regimental modifiers (strength, condition, ability, discipline), then realized damage by enemy Tactics. Only one factor (regiment condition) will vary during the course a battle, and that factor scales potential damage 1:1 for the current battle state, which in turn affects the difference in condition for future battle states, hence battle dynamics are determined by aggregate regiment condition and its delta, QED.
That's correct in theory, but I would like to be sure of that in practice.

As you said: without any intervention, a battle is decided quite fast. And that it's important to do maximum damage in the first days of a battle.
And that's why artellery is so overpowered and worth it's price. (shooting from second row AND increasing def pips for first row = more casualities for enemies with lower casualities on own side)
Zodium got the point. We all know several empiric best practices, but no one can explain the underlying mechanism. And I think this is quite an exciting challenge to do so.