Thomas Slade

The First World War Mod: Balancing Trench-Warfare with Machinations

The First World War Mod: Balancing Trench-Warfare with Machinations

The aim of the World War I Mod for Hearts of Iron 4 is to simulate a war that resembles the one that took place historically. This means a slower, more tenacious war than World War II (which vanilla HoI4 sets itself in), where battles over individual valleys and villages may have played out over weeks or months (in particular, on the Western Front, the Italian Front, and Gallipoli). Other fronts, however, were a little more dynamic (though certainly not as fluid as WWII) and, of course, different fronts advanced at different speeds during different phases of the war: trench warfare didn’t set in until the Battle of the Marne - before this, the German offensive was rapidly pushing through northern France - while what followed was a few years of utter stagnation for the Anglo-French until various tactical innovations finally started to thaw the deadlock in the conflict’s later years.

I’m really aiming to encapsule these different speeds and senses of urgency in my mod. I really want my players to be plotting fights bridgehead-to-bridgehead over on the Western Front in 1915, while being able to make huge advances on the Eastern Front at the same time. I’d really like for Germany to have an initial - but narrow - window of opportunity to rapidly advance to Paris, but face the reality of the stagnant front if they fail to do so, wherever that front may fall.

The problem is balancing for such complicated behaviour. We’re essentially trying to design a game pace that can flip like a switch - Sommes, Gallipolis, Brusilov Offensives, 100 Days Offensives, Schlieffen Plans, and Sieges of Kut - the entire array of mobility that existed in the historic war, but with the same set of values. Division HP and attack needs to result in the Battle of the Marne at one point in time, and Paschendale at another, or the Isonzo in one location and Tannenberg in another. How can this be done?

One-Offs or Combat Models?

I may have mentioned previously that I’ve seen other WWI mods for HoI IV handle this in a particular way: with the use of special in-game events and bonuses. For example, the Great War Mod provides a one-off Schlieffen Plan bonus to Germany, allowing them to briefly punch through Belgium before the bonus is removed and the game’s stagnant pace resumes. This certainly does the job, but it’s also quite a bespoke method that restricts the potential for early-war scrambles like the Marne solely to players taking the historic route. There’s no similar bonus for Italy invading France, for example. But who’s to say that the stalling of the Schlieffen plan was inevitable or that such a strange and dramatic playoff couldn’t have happened elsewhere in the war, between other countries? Leaving these rulesets open to the use of the player, I think, is much more in the spirit of alt-history games like HoI IV.

So another way to accomplish the desired variation of fronts would be a more rule-based, simulated approach, in which the playouts of the war’s various theaters depend on regular game rules - no one-off events. The stagnation on the Italian front, for example, could be attributed to a very high mountain defense bonus. But since that’s a rule, and not a ‘Stagnant Austrian-Italian Front’ malus arbitrarily applied to Italy in 1914, players can work around it. Why invade Ausria as Italy through the Alps? Why invade Austria at all?

I’m much more partial to a modelled approach for achieving what I want to achieve. But there’s a lot to worry about with this kind of design: it’s really hard. Creating a couple of ‘Schlieffen Plan Failed’ events takes very little time and leaves more room to focus on the particulars of balancing the event’s effects. Building a combat system that results in all of the diverse conditions seen in the war is difficult.

So pulling this off will require a lot of balancing (which is fine, since that’s basically why I took on this project). But there are tools available to speed up the balancing process.

Machinations

Machinations is a piece of prototyping-software created by Ernest Adams and Joris Dormans. It was discussed extensively in Advanced Game Design, which was a huge resource for me while completing my studies and working on Silkroads. It’s not for prototyping games: it’s for prototyping game systems. It’s a sort of flow-chart builder in which iterations of a game can be ‘run’ and key values can be spat out into a graph, allowing first-pass balances or resource structuring directed for certain paces and experiences (i.e. exactly what I want to do).

I’ve been wanting to try and use the tool for a while, so this project seemed like my chance. Below is my first-pass at a simple simulation of a land battle between two HoI IV units.

It’s a little unclear, so I’ll outline what’s happening.

  • The attacker (circled red) and defender (circled blue) are both in-game units. They each have organisation, strength, attack, and breakthrough/defense) stats.

  • In a HoI IV land battle, attackers and defenders do damage to each other’s Organisation and Strength every hour. If Organisation falls to zero, the unit retreats. If Strength falls to zero (much more rare) the unit is destroyed.

  • Attack value is compared to Defense/Breakthrough value to determine which attacks ‘passes’ and ‘fails’ (circled orange). Passes do more damage, but even fails have a chance to do some damage. The number of hits is then multiplied by a handful of constants, plus a die roll. (circled purple)

Obviously the attacks are only going from attacker to defender right now. In reality, the defender fights back.

These models can then be executed. Each step, resources move across the graph, in this case representing damage to Organisation and Strength.

Machinations2.gif

Machinations can also graph the progress of your simulation. This is really useful for me, since the main thing I’m interested in right now is how long a battle will take. With these values and rules copied from the vanilla game*, Machinations is simulating a battle fought over …

(*I tell a lie. Values like Organisation and Strength have been multiplied by 100, because Machinations doesn’t really deal in decimal numbers whearas HoI IV has a lot of very small damage values)

149 iterations. 149 /2 (each step is 12 hours) is 74.5 days.

HoI IV battles take place over a few weeks in the early game, in my experience, so clearly my model is innacurate. After looking into the game’s actual behaviour, I realised that in a setup like this (with an equally matched attacker and defender infantry unit), the defender will easily win, with the attacker running out of organisation almost twice as fast. This is because infantry have a very high defense value compared to their breakthrough value.

So I made the model symmetrical, handling both the defender and attacker’s HP:

With this, running the model results in the attacker losing in about 30 days. A month is pretty in-line with what I observe in vanilla HoI, so we can assume that the model is set up correctly.

Machinations5.PNG

What to do now?

In 1914, Germany advanced from Liege to Namur, Belgium, in 16 days. The 1st battle of St. Quentin began 9 days later. Finally, Germans reached the outskirts of Meux (the doorstep of Paris) 10 days after St. Quentin. A distance of 289 kilometers, in about 35 days, gives us an average advancement speed of 8.2 kilometers a day (this varied quite a lot - the German advance in Belgium was much slower, stalled by sieges at Namur and Liege).

On the game map, this whole advance is about 20 tiles.

Schlieffen.png

So in other words, Germany needs to win 20 battles against France in just over a month in this early phase of the war, in order to resemble the actual unfolding of the schlieffen plan. Time taken to move between tiles also needs to be considered.

When I plug all of this into an excel sheet, I can determine that I need Germany to be winning battles against France in 1 and a half days-per-tile in order to advance at historic speeds. This seems extremely quick (you almost never see battles advancing this fast in HoI unless you’re easily cutting through the enemy) but I’ll use it as a guideline anyway, and see how the testing goes.

Tweaking Values

The characteristics of the fighting in Hearts of Iron IV is determined by its units, and the functionality of each unit is an emergent property of its stats.

As an example, HoI basically models a hammer-and-anvil simulation of WWII combat in its unit design: mobile units are the hammers, and infantry are the anvils. That is: tanks and trucks are very good at punching through enemy lines in HoI, but not so good at defending, while infantry can hold a front but only advance very slowly. Obviously, this is all in service of the mobile-warfare doctrine that was so important in 1939.

A major way in which it does this is through its distinction between the Defense and Breakthrough stat. In the Machinations graph above, you may have noticed that the attacker has a ‘breakthrough’ value, instead of a ‘defense’ value. This is because breakthrough is basically the same thing as defense, only it’s used for determining how many hits an attacker takes, while the defense value is used for the defender. This allows units to be given low breakthrough and high defense if we want them to be anvils, or vice-versa if we want them to be hammers.

The implementation of these stats is aimed at modelling the fact that tanks did the heavy-lifting of rapid offense throughout much of World War II. But in World War I, tanks didn’t really arrive until 1916/1917: the Schlieffen plan was largely executed by footsoldiers.

So how to give Germany a huge offensive advantage, but for only a month, before allowing the front to settle into stalement? Well, from the start, the plan has been to give France some sort of debuff (this is how vanilla HoI IV makes France an easy victim for Germany, despite the two countries having comparable sizes). But in particular, I want to use the game’s doctrines to start France on bad footing, and allow them to catch up to Germany within a month or two of the war.

Doctrines.png

Doctrines are a special kind of technology in HoI which are there to represent the evolving field-strategies of particular countries, as well as give character to armies that has very distinct fighting styles (Germany’s blitzkrieg vs. Britain’s preoccupation with entrenchment, for example). My plan is to remake this tech tree entirely, but with a few very pivotal doctrines to research at the base of the tree. These doctrines will already be researched by Germany at the start of the game, but France will have to catch up. What’s more, France could start the game with a debuff to its army experience points (which can be used to accelerate research on these techs). Army experience gain will ramp up once France is actually at war, and - if they play their cards right - they’ll be able to grab the doctrine techs that can stop the German advance before Paris falls.

Doctrines can give all sorts of bonuses and unlocks, including modify the breakthrough and defense values of units. So this is how we can start Germany with a strong advantage, but allow France to quickly recover in a battle-of-Marne style playout.

Bringing the breakthrough of the attacking infantry to be higher than that of the defending infantry is a good start. This is enough to guarantee that, all things being equal, the aggressor has the advantage at this early phase of the game. Doubling the damage constant will also force these battles to resolve faster:

This takes us down to a 15-day battle, which is still obviously too high according to my estimations. But as I mentioned, I don’t expect that a 1.5 day resolve-time is really what we should be going for here at all, and only a playtest will let me know how these values actually feel. There are also factors that I’m simply not considering in the model, such as the snowballing effect of routing an army (it’s easier to beat the French again once you’ve broken their lines a first time).

ValuesTweaked.png

As you may imagine, the idea here is that France will have a moderate Breakthrough value and a low Defense value, while Germany will have a moderate Breakthrough value and a high Defense value, due to having started off with the basal doctrines already researched. This actually reflects the situation in the real war, in which German troops were already experimenting with the strategy of ‘digging in’, while France had wedded itself to a misguided doctrine of attack due to its loss of the Franco-Prussian war about a half-century earlier. What this means is that a France player may try to play aggressively against German player but will likely see limited success, due to Germany basically already having ‘discovered’ trench warfare by 1913 or so.

Wrapping Up

This entire post has ended up much larger than I’d have anticipated, and I still have some basic steps to undergo before the fundamental balancing procedure is ready to demonstrate. Next post, I’ll show these values at work in-game, and hopefully use the new Machinations graph to quickly adjust the mod for trench-warfare-style conditions.

The First World War Mod: Balancing Trench Warfare, Part 2

The First World War Mod: Balancing Trench Warfare, Part 2

The First World War Mod: Factory Balancing

The First World War Mod: Factory Balancing