Darkest Hour - Dev Diary #28 - Sneak Peak 1.03 - Combat rework and more

  • 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.

ewphoenix123

Darkest Hour Cartographer
10 Badges
Apr 26, 2007
817
2
  • Arsenal of Democracy
  • Cities in Motion
  • Crusader Kings II
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III
  • Sword of the Stars
  • Sword of the Stars II
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
Darkest Hour - Dev Diary #28 - Sneak Peak 1.3 - Combat rework and more







There have been a bunch of hints over the last weeks what we are working on. I for one part finished with the basic implementation of one of my pet projects earlier this week, that went a bit farther then initially expected.
It's just one aspect of the 1.3 patch, it still needs a lot of love and finetuning, and there are lot of other things we work on that are not ready for presentation but I thought it would be nice to give you guys a nice feeling that things are moving along in the background.

The 1.3 patch is still a few months away, even when everything wents as expected, good things take time.

Summary:

  • Landunits move with a more realistic speed
  • Movement speed is now affected by terrain, weather, infrastructure and season.
  • Strategic redeployment got a review
  • There are now diminishing returns that limit the usefullnes of going over optimal forceratios
  • Armored and Mobile units in general are now real forcemultiplier
  • Attack and defense ability of each unittype depends now more on terrain and weather
  • review of damage development between models
  • greater differentiation between air units
  • casualty rates now depend on doctrines and are nolonger an indication of combateffectiveness
  • complete rework of Landdoctrines
  • performance tweaks
  • more and easier modding



Movementspeed - how everything begun

Earlier this year I started to investigate reports about the on map unitspeed. Most people agreed that movement was to slow.
There was never any doubt that the reports were right.
We maintained for the most part the vanilla units maxspeed, but the new distance calculation changed the distances all around the world quite radically.
So I grabbed some old German and US field manuals to get an idea what was a to expected movement speed in good terrain.
Test showed that movement speed in Europe for Infantry wasn’t actually that far off, 20% more speed and we would have good values.

More critical was the representation of motorized and mechanized units. In the old model of HOI2 games fuel consuming units move traditionally about 2 times as fast as a normal Infantry unit.
The reality was different, motorized units over a 24h period moved faster and longer then a classical formation, so a realistic factor is closer to 5-6 times higher.
While this is a major change in itself, it was only the start of what became a major project.

When I started tweaking unitspeed I pretty early ran against a wall, I simply couldn’t get Division to move with the right speed. After some further checking I figured out that there are a whole bunch of modifiers to unit movement speed spread over various files.
Terrain types.csv change changes the speed of all units in a specific terrain, modifier.csv changes a specific units speed under specific terrain/weather conditions. In the misc.txt are a bunch modifiers that affect speed of units in certain situations.
So long story short, there are a huge amount of different modifiers that were in my opinion never really balanced against each other.
So I set out to do just that, clean up all modifiers that affect movement speed and achieve a more realistic endresult.

  • Generic movement modifiers for terrain are gone.
  • Each unittype has it’s own individual terrain modifier that are based mostly on the factors used by different military simulation systems.


Armor moves fast over plains and deserts, but slows down to infantry speed when moving through jungle.

That’s not really something new, a lot of mods have done it, but it’s a cleanup and improvement that was still missing for DH and make different terrain even more critical.

Something I haven’t seen so far in any mod is, that I placed a stronger emphasize on the day/night cycle. All units slow down during the night. Infantry almost completely, while mobile forces maintain a greatly reduced speed.

This gets especially interesting in combination with the moddable daylength modifiers in the misc.txt.
It is possible to define different daylight period for different seasons.

This means a Division now moves faster in summer, then it does in winter.

Strategic redeployment times were also reviewed and should be closer to historical redeploy times.

The modifier are based on a number of military scientific works from the 60s-90s that are publicly available and published under the Open Archive Initiative by The Defense Technical Information Center.
For those of you familiar with Dupuy’s QJM, the values shouldn’t be a big suprise.

I soon suspected that such “modifier madness” was not limited to unit movement and started to dig into the misc.txt to find more things that could be streamlined.
During my research to implement those changes, and track down the causes for weird results, I realized two things.
For one the game engine is full of moddable values that are to a certain degree redundant, to a high degree not understood, and not properly utilized.
Those “redundant” values should actually offer a much higher flexibility then anyone was aware of.

My initial idea was to read up on a few old threads about the combat engine, to get an idea what should be changed, and implement what was possible with those redundant values.
But it became pretty obvious that those discussions where only of very limited value, because noone really knew how the engine works.
And also because they were polluted by “opinion”-posts that describe in great detail how combat should be in reality and ingame, but sadly were purely fiction.
I took two steps back and started to work my way through a wide spectrum of military scientific publications to get an idea how combat actually plays out in reality. What factors are important, to what numbers boil they down, and is there a way that can be used to account for them.
After some weeks I actually had some good numbers to work with, and started some ingame tests to see if my math worked out… well it didn’t really fit. *g*
Working my way through the code to find my mistake, I realized that some of the assumptions on how the engine works were wrong, but also that there was a chance to repurpose existing variables and mechanics to achieve a far more realistic combat engine.

  • Let’s start with some problems of the classic combatengine:
  • Defensiveness / Toughness have hardly a practical effect
  • It is always beneficial to use bigger unitstacks
  • The increase in org and moral in combination with increasing attack values causes manpower losses to skyrocket in later years and leads to problems with the new mobilization system.
  • Difference in doctrines are not very good representable, and relies on stacking more org and morale on each other.


Diminishing returns

The first two actually belong together, and my theory atm is that it is not a design flaw in the engine but some mixup when the final hardcoded values were put into the engine.
The defense values Defensiveness-Toughness are used to determine the chance a hit has to occur.
Currently there is a 20% chance of a hit, as long as a units “defense” is not overwhelmed, when no defense is left, the chance of a hit increases by 20%. -> the damage doubles.
Which means in game that a unit suddenly takes more damage when it is fighting more enemy units, much more then the increase in hostile firepower justifies.

In reality the effect is for the most part opposite. There are enough discussions about diminishing returns in the forums, so I'll just skip going into detail here.

The point is that it can be emulated, with the existing mechanic of Hit chances and defense values.
We set the defense value of a unit to be ~3.5x of a units attackvalue.
And now comes the interesting part, we switch the the chance a hit has to occur.
And suddenly we achieve results in gamepraxis that are close to the diminishing return formulas.

OLD:

You are fighting, you take damage.When you're overhelmed, you take more damage. Suddenly out of the blue you take even more damage.

- 3 random chances a hit can miss. (which makes denfense/toughness a lmost pointless unitstat)
- 2 in it's effect identical modifier that determine a units combatpower in offense/defense One generic, one terrain specific.

NEW:

You are fighting, you take damange. When you're overhelmed you take more damage, but at some point when the hostile superiority in numbers gets so high that not all can shoot at you, the additional damage starts to drop and gets neglectable.

- 2 random chances a hit can miss
- 1 modifer that determines terrainspecific combat abilities
- 1 modifier that emulates diminishing returns and also determines the ability of a unit to fight outnumbered


What does this mean in game terms?

1. The most efficient force ratio to overwhelm an enemy is 3:5:1 afterwards the benefit of new units greatly drops.

A battle 1:1 lasts 6 days
A battle 3:1 lasts 2 days
A battle 10:1 lasts 1 day 16 hours

2. It is a great tool to simulate,the value certain unit types have as force multiplier. Tank divisions, not only have higher attack values, but also lower “defense” values.
I know this is the point where it gets counterintuitive, but in the new system lower defense means that a unit is better at fighting outnumbered, because the point at which the unit takes less damage is achieved earlier.

3. This "simple" change also generates two additional effects.

In combat with an unequal force ratio in favor of the attacker, an attacker takes higher losses over a shorter time. (Which still means they take less losses in total, but it's a effect you can see in reality aswell)
Combat involving huge numbers of Divisions take longer then combats involving only a few units.

There is no specific engine mechanic necessary to create this effect, it follows automaticly out of the way how damage is distributed statisticly, and it fits nicely with observations in reality.

A stacking penalty which limits the amount of divisions that can fight in a specifc province efficently, is a completely different thing, it greatly depends upon dispersion laws, doctrines and a mixture of terrain features. This can’t be simulated with existing game mechanics, and won’t be part of the next patch.
For the most part it wouldn’t even make sense, DH is played on a scale that provinces are of a size where stacking penalties would only occur when battles involve well beyond 100 divisions and at that point the command limit penalties already affect the battle.
Of course there are special cases like battles in cities or against forts where the value would be much lower, and a stacking penalty would be noticeable. So it is something we might decide to add for a later patch, but it’s no high priority for me.

Modifier all around

The old “defense” values were often used to differentiate a units ability in attack and defense, this is now done mostly within the modifiers.csv .

As this required a complete review of all modifiers I went a bit further and went through additional sources to better represent the strength and weaknesses of light vs heavy units.

file.php


A tank unit greatly benefits from wide open terrain where it can use it’s main armaments full range, but that advantage drops when the terrain become compartmentalized like in woods, in this terrain infantry begins to be more efficient.

I also reworked all weather modifiers, and added them for all units that didn’t have them before. So no more bomber raids in storms, or airtoground support in the middle of a blizzard.

And on top of that, a lot of tweaks to general combatmodifiers in the misc.txt, which got greatly expanded in that area.

Currently we expect to add more then 20 entries that make it possible to adjust old hardcoded features related to the combatengine alone.

Overall Firepower changes and attackvalues

The next change implemented is a overall rework of all units attack values, currently the damage output of a unit from 1914-1945 tripled, it now only doubles so the damage progression is a bit more realistic.
There were also tweaks to the attack values of different units and models to each other to make them a more realistic forcemultiplier.

My initial reasons for the change were balance and performance, but thanks to the research I've done I've also achieved a higher realism of the whole system.
With the damage output of different units especially during the wars a bit closer together it gets easier to achieve balance. Modern units are still better and provide an edge, but the difference is smoother.

The performance aspect is a bit more complicated, I reduced the attack values of all units and increased the damage multiplier in misc.txt to compensate for it so the damage remains the same.
During the wars the attack values of land units are 10-20% lower, but for air units and later land unit models the difference is up to 50%. As each attack point basically means one additional check in combat for each unit every in game hour, this should be another improvement to keep long campaigns run smoothly.

Air combat tweaks

The new use of defense values as a “forceratio-stackingpenality” made it possible to emulate a few model specific things for air units that didn’t really work before.

Tactical Bomber are very vulnerable to interceptor but not so much to aa fire.
Strategic bomber are hardly affected by ground based AA but are still vulnerable to interceptor planes.
Interceptor are vulnerable to AA but they are not very vulnerable to other interceptors.
Early CAS do more damage then early TAC, but they are more vulnerable to ground based aa, on the other hand are CAS not as vulnerable against Interceptor.

Dispersion

Initially I was only looking for a way to improve the way combat is represented in the ww1 scenario, the main aspect I wanted to have represented, was that the average casualty rate per hour, during WW1 was twice as high as during WWII.

New weapons like mgs and improved usage of artillery greatly increased the damage generated by a unit compared to the franco-prussian war, and the nations military doctrines, didn’t yet catch up.

One important factor that determines how much damage a military unit takes in reality, is the so called Dispersion, which represents the space each soldier has “for himself”.
Modern and mobile doctrines have a much higher dispersion to compensate for the higher firevolume of modern weaponry.
It took me a while to make the connection, but the gde is perfect to be used to represent dispersion.
If you use this values for a doctrine a normal unit suddenly takes twice as much mp damage, but still fights basicly as good as before.

command = { type = max_organization which = land value = 30 }
command = { type = morale which = land value = 30 }
command = { type = ground_def_eff value = 0.5 }

Doctrines

The next big change is a complete rework of land doctrines.
Dispersion is also a really great tool to create a difference between the 5 landoctrines we currently have.
A manpower focused doctrine has a much lower dispersion, then a mobile oriented doctrine.
With the technique from above we can have more realistic losses., but maintain game and historical balance.
For example battles between German and soviet troops, soviet casualty ratios were usually much higher to achieve the same results.
The changes to units attack values no longer make it necessary to constantly increase org and morale to compensate for more damage, so we gain some additional flexibility to play around with.
If we now use org and morale, and different attack/defense modifiers for each doctrine to fine tune things we can get some really nice and differentiated results for each doctrine.
One doctrine tech may increase the attackmodifier but comes at the price of higher mp losses, another might increase the defense but reduces the morale of a unit, making it harder to counterattack.
One thing I wanted to achieve was that the doctrines should be different but not necessarily better after a certain point in time.

Nothing new but good to know.

There is a currently still hardcoded mechanic that hard units like ARM cause almost twice as much org damage then other units.
Fast units have a much higher chance for certain combat events, like breakthrough and encirclement.

Minor changes to modifier with big impact for casual modding.

As part of this rework I went over most, if not all modifiercombination that affect different engine aspects. Whenever more then 1 modifier was used, I decided to set the general modifer in misc.txt to 1.

Just one example.
The upgrade modifier in misc.txt and an individual model upgrade time in the unit files.
But there are a lot more of such modifier pairs.

old:

misc.txt
# Upgrade cost
0.6
# Upgrade time
0.8
unitfile:
upgrade_time_factor = 0.75
upgrade_cost_factor = 1.25

new:

misc.txt
# Upgrade cost
1
# Upgrade time
1
unitfile:
upgrade_time_factor = 0.6
upgrade_cost_factor = 0.75

It's just a little thing, but makes it much easier to understand and adjust values of indivdual units or unittypes.

And just to make it doubly clear.
Patch 1.3 is still a few months away, good things take time.
 
Awesome! Can't wait looks like some phenomenal changes here guys
ke
 
Sounds very good. Now if we only got a better logistical system... ;)

Have you done sth about the superstack issue? It is especially noticeable on the defence, because there are no over-command modifiers then.
 
Neat work ewphoenix.

Regarding AA, what I think is important is that it makes bombing much less effective. Where there is AA, bombers have to drop their load from higher attitude and as such most of the bombs goes off not even near to the target.

The main purpose of AA was not to shot down all attacking aircrafts, but rather break up their formations and make them unable to drop their load on target.
 
My nipples got hardon.

But...

As Patton wrote in his book "Any avarge officer can lead panzer division but you need a genius one to supply it", and sadly with current logistic system there is no way to simulate that (in AoD it is possible).

And imo touching GDE is very risky they did that in AoD and it gives really weird effects, test it MANY times before you implement it.
 
Last edited:
Doctrines

The next big change is a complete rework of land doctrines.
Dispersion is also a really great tool to create a difference between the 5 landoctrines we currently have.
A manpower focused doctrine has a much lower dispersion, then a mobile oriented doctrine.
With the technique from above we can have more realistic losses., but maintain game and historical balance.
For example battles between German and soviet troops, soviet casualty ratios were usually much higher to achieve the same results.

So "human wave" is gonna to be meatgrinder doctrine in 1.03? Then it is an onesided redesign imo.
Or that are only early soviet doctrines and later ones catch up with other doctrines?

Im waiting for 1.03 though
 
It's a meatgrinder doctrine in the early 30's and catches up slowly first and more rapidly around 41 when the doctrine becomes more mobility based. But the soviet doctrines always maintained as certain quantity over quality focus, as shown in the historical casualty numbers.

But it's not one sided towards the manpower doctrines, allthough they have the highest losses in general. The mid 30s defensive doctrines, that relied extensively on old ww1 style trenches and static defense have a very high attrition aswell.

And imo touching GDE is very risky they did that in AoD and it gives really weird effects, test it MANY times before you implement it.

Any idea what kind of weird effects?
I didn't really see anything that could cause weird effects as long as you don't forget to adjust org/morale at the same time, and that gde is affected by another multiplier or two that need to be properly set first.
 
Excellent information about 1.3. All of you must be working hard and long hours. Keep up the great work. Especially love the work being done on land movement and air unit differentiation. Looking forward to 1.3.
 
Incredible work, this is exactly what this game needed, thank you so much!

edit: are you planning some naval rework as well?

I'd also like to know that :). From reading above i get the feeling that this could improve post ww2 battles also (NWO2 needs something like this). It'd probably mean doing the same changes from the ww1 doctrine to ww2 doctrine but this time doing it from ww2 to cold war doctrine. This definitely looks good, the combat would be more realistic than IC or AoD.
I'd love the logistics of AoD in DH but I'd rather the devs leave it out if it means slowing down the game. There are better parts of AoD that could be implemented. (Synthetic plants, loss statistics).
 
That happens automatic basicly: AA fire generates org damage -> forces bomber to abort the mission and return home faster -> reduces the damage they can project in a province.

Yeah, but as a human player you can still chose to bomb with org level at zero, even without losses?
 
I don't know about you, but when my Tact Bombers reach 0, they won't even leave the airbase 'til they recover a few org.
Anyways, this teaser sounds phenomenal, and although I'm relatively new to the series, I was indeed noticing defensiveness/toughness was practically moot, and some of the other issues.
 
Tactical Bomber are very vulnerable to interceptor but not so much to aa fire.
Strategic bomber are hardly affected by ground based AA but are still vulnerable to interceptor planes.
Interceptor are vulnerable to AA but they are not very vulnerable to other interceptors.
Early CAS do more damage then early TAC, but they are more vulnerable to ground based aa, on the other hand are CAS not as vulnerable against Interceptor.

Why are interceptors vulnerable to AA if they are operating at the same high altitudes as the strategic bombers? And are smaller and faster?

Aren't tactical bombers smaller and faster than strategic bombers, so should be less vulnerable to ground fire? If CAS are less vulnerable to interceptors, because they are smaller and faster, than shouldn't this be the same for tactical/strategic bombers?

Did tactical bombers bomb from lower altitude than strategic bombers?

It's great to see a long post like this outlining new changes!
 
Why are interceptors vulnerable to AA if they are operating at the same high altitudes as the strategic bombers? And are smaller and faster?

Aren't tactical bombers smaller and faster than strategic bombers, so should be less vulnerable to ground fire? If CAS are less vulnerable to interceptors, because they are smaller and faster, than shouldn't this be the same for tactical/strategic bombers?

Did tactical bombers bomb from lower altitude than strategic bombers?

It's great to see a long post like this outlining new changes!

The examples are a bit oversimplified and things change with different models, and doctrines.
When a Strat model has the same ceiling height as a Tac model, both have roughly the same vulnerability to AA fire, but in general Stratbombers operated at a bigger height.
Interceptors take less damage from AA because they are fast and small, but they operate through all height levels depending on the enemy they take on, so AA has to be a factor for them aswell. It's not possible to work with different values against different airplanes so I went with the assumption that the majority of the targets involved would force the interceptor in a height that puts it in aa range.

Not necessarily the perfect solution, but it's imo a definite improvement and adds much need differentation between the various bomber units.
 
Could we simulate stacking penalties with gradual GDE loss if more and more divs are in the same province? I mean every additional div would lower the whole stack's gde. The point of this is if you have lots of soldiers cramped into a given space mp losses would go up.