DevBlog #3: Combat Systems Pt.1.
In this third dev diary of the upcoming Grand Tactician sequel, as well as the next ones, I’ll discuss the main changes made in the game’s combat systems. In short, this will bring a lot of further detail in the way battles play out, while also providing opportunities for multiple interesting historical settings in the GT-series.
[h2]Unit and Soldier Levels[/h2]
Like already mentioned in a previous dev diary entry, with the new unit system, we were able to move much of combat calculation to single soldier level. This includes both ranged engagement and melee combat.
In GT1 (The Civil War) combat system, combat resolution takes place mostly on unit level. In ranged combat, the possibility of engaging an enemy unit is checked on unit level, taking into account terrain and own units (to avoid blue-on-blue, ie, friendly fire). If this check returns positive, a volley is calculated, using a complex formula (taking into account everything from terrain, formation, cover, weapons, morale, training, experience, etc.). The volley is calculated from soldier models, each aiming at a target unit in its possible firing arc. This allows the unit to fire at multiple enemy units at the same time. A number of casualties is calculated for the target unit(s), and the visual layer shows the casualties in the nearest “coy platforms” (the unit is broken down to multiple smaller blocks, as per previous blog).
Melee in GT1 uses a very simple model - hand-to-hand combat during the Civil War was rare. In this model, the unit engaging in melee will place itself next to the target unit, slightly overlapping, to visually communicate to the player there a melee is ongoing. The actual combat resolution takes into account unit conditions and stats, and from this, casualties are inflicted on both sides. The abstraction takes into account formation, so formation A is 10% more effective in melee than formation B, which, on the other hand, may suffer further casualties from small-arms fire. Once one unit's morale falters, it will fall back or rout, while the winning unit will continue combat according to orders.
The resulting model is quite good and believable, especially if the values in the formulas are well balanced, but it still lacks detail. In ranged engagement a part of a unit will not be able to fire if the unit level check for line of sight fails, and units can only engage enemies in their front sector (except in infantry square formation, where four front sectors are calculated). Melee on the other hand is much more heavily abstracted.
[h2]Organic Combat from Soldier Level[/h2]
In the rebuilt combat model, unit level is still a factor. Calculating everything on a single soldier level would be too much in terms of performance. Things like morale, cohesion, fatigue, cover, concealment, line of sight calculation (for fog of war, i.e. are units spotted or not), movement in terrain, are tracked per unit. These values are then passed on to the single soldier level for the actual combat and casualty calculation.
So, when a soldier fires his weapon, the hit probability is modified with unit-level values. Is the soldier tired? Is he well-trained in the use of his weapon? Is he familiar with the stress of combat, fighting in close order with other guns blazing right next to his ear and enemy firing back? Is he blinded by smoke? On the soldier level, does this soldier see an enemy in his dedicated sector? Does the weapon he carries reach that far (a single unit can have different weapons, so some may fire while others may not)? Can he fire at will, or is firing controlled per rank, for example? Are there friendly soldiers in the way? When pulling the trigger, all this is taken into account, plus also external effects like weather: will the weapon misfire? When the weapon fires and a hit on target is achieved, what is the impact of the projectile? Will it penetrate possible armour, and if so, will the target become a casualty? In case of artillery, how much energy does the round still have? Will it hit another soldier?
All this makes more “organic” combat outcomes possible, as the different outcomes don’t need to be artificially adjusted.

In this pair of images, on the left we have the GT1 engagement system and on the right the rebuilt engagement system:
In GT1 the red unit is within range of the blue unit, inside the front sector fire arc. First, the line of sight check returns positive: the unit can engage. Then the actual firing is calculated from the soldier models, which allows firing at multiple units simultaneously or limiting the number of soldiers firing (due to no enemies being in the soldier’s firing arc). Casualties calculation is done on unit level, taking into account direction of fire and creating the casualties in the nearest coy platforms. This calculation is modified with flanking fire value (simulating the higher chance of hitting a soldier further back, which is not the case if engaging from the front), which increases the effectiveness of the volley. In the end, 5 casualties are inflicted, and models on the left flank of the unit change to casualty animation and then “die”. The red unit cannot return fire, as its unit-level fire arc is pointing in the wrong direction. (What is not taken into account here is that in GT1 ,the average scale in visualization is 1:25, meaning 1 soldier model stands for 25 soldiers in the unit. To increase the visual impact, we kill more models than the calculated casualties justify. After a short time, a few more models spawn and move to “fill the gaps”.)
In the new system, each soldier (model) is constantly checking whether it sees enemy soldiers within assigned engagement directions (a soldier can have multiple, for example, as 1st priority front, and 2nd priority to left). Depending on the unit’s firing system, the single soldiers have permission to fire or are part of unit-level controlled fire, where permission to fire is given per rank. The per-rank firing to priority direction can happen as a part of single or multiple ranks firing a simultaneous volley, and may include rotation of the ranks to move soldiers with reloaded weapons to the front. Each shot by a soldier at a soldier is calculated separately, and the outcome is decided. For example, two soldiers fire at the same enemy soldier; the first one misses, and the second one hits. The rightmost soldier picks a target further back. (Also marked is the possibility for the red unit to fire back, as in the new unit system, the left flank soldiers can turn and fire at different targets than the rest of the unit.)
Even if the result in both systems is the same, 5 casualties in the red unit, the result in the new system comes through an “organic” calculation, as we like to say. There is no separate bonus from firing from the flank, as the increased effect comes directly from the soldier-level engagement modelling. In case the blue unit was in open order or the red unit had a bigger number of ranks or density of soldiers, the result could change drastically. In the left model, this comes from a separate single unit level modifier (casualty modifier per formation for red, firepower modifier per formation for blue), in the new model, such modifiers are not used and the result will be more realistic through organic means.
Like written previously, GT1 is very heavy on CPU usage due to a lot of calculation ongoing at all times, especially with large armies fighting. While the detail of combat has increased tremendously in the rebuilt combat system, the new engine handles the required calculations much more efficiently than in GT1, and performance is much better in similar size battles, even with 1:1 model per soldier scale vs. the old 1:25 scale.
In the next diary, we’ll take a look at the new melee system, which is very much a different beast in its own right - and there the soldier level approach has the most advantages.
Most Respy,
Gen’l. Ilja Varha
Lead Designer - Grand Engineer Corps
[h2]Unit and Soldier Levels[/h2]
Like already mentioned in a previous dev diary entry, with the new unit system, we were able to move much of combat calculation to single soldier level. This includes both ranged engagement and melee combat.
In GT1 (The Civil War) combat system, combat resolution takes place mostly on unit level. In ranged combat, the possibility of engaging an enemy unit is checked on unit level, taking into account terrain and own units (to avoid blue-on-blue, ie, friendly fire). If this check returns positive, a volley is calculated, using a complex formula (taking into account everything from terrain, formation, cover, weapons, morale, training, experience, etc.). The volley is calculated from soldier models, each aiming at a target unit in its possible firing arc. This allows the unit to fire at multiple enemy units at the same time. A number of casualties is calculated for the target unit(s), and the visual layer shows the casualties in the nearest “coy platforms” (the unit is broken down to multiple smaller blocks, as per previous blog).
Melee in GT1 uses a very simple model - hand-to-hand combat during the Civil War was rare. In this model, the unit engaging in melee will place itself next to the target unit, slightly overlapping, to visually communicate to the player there a melee is ongoing. The actual combat resolution takes into account unit conditions and stats, and from this, casualties are inflicted on both sides. The abstraction takes into account formation, so formation A is 10% more effective in melee than formation B, which, on the other hand, may suffer further casualties from small-arms fire. Once one unit's morale falters, it will fall back or rout, while the winning unit will continue combat according to orders.
The resulting model is quite good and believable, especially if the values in the formulas are well balanced, but it still lacks detail. In ranged engagement a part of a unit will not be able to fire if the unit level check for line of sight fails, and units can only engage enemies in their front sector (except in infantry square formation, where four front sectors are calculated). Melee on the other hand is much more heavily abstracted.
[h2]Organic Combat from Soldier Level[/h2]
In the rebuilt combat model, unit level is still a factor. Calculating everything on a single soldier level would be too much in terms of performance. Things like morale, cohesion, fatigue, cover, concealment, line of sight calculation (for fog of war, i.e. are units spotted or not), movement in terrain, are tracked per unit. These values are then passed on to the single soldier level for the actual combat and casualty calculation.
So, when a soldier fires his weapon, the hit probability is modified with unit-level values. Is the soldier tired? Is he well-trained in the use of his weapon? Is he familiar with the stress of combat, fighting in close order with other guns blazing right next to his ear and enemy firing back? Is he blinded by smoke? On the soldier level, does this soldier see an enemy in his dedicated sector? Does the weapon he carries reach that far (a single unit can have different weapons, so some may fire while others may not)? Can he fire at will, or is firing controlled per rank, for example? Are there friendly soldiers in the way? When pulling the trigger, all this is taken into account, plus also external effects like weather: will the weapon misfire? When the weapon fires and a hit on target is achieved, what is the impact of the projectile? Will it penetrate possible armour, and if so, will the target become a casualty? In case of artillery, how much energy does the round still have? Will it hit another soldier?
All this makes more “organic” combat outcomes possible, as the different outcomes don’t need to be artificially adjusted.

In this pair of images, on the left we have the GT1 engagement system and on the right the rebuilt engagement system:
In GT1 the red unit is within range of the blue unit, inside the front sector fire arc. First, the line of sight check returns positive: the unit can engage. Then the actual firing is calculated from the soldier models, which allows firing at multiple units simultaneously or limiting the number of soldiers firing (due to no enemies being in the soldier’s firing arc). Casualties calculation is done on unit level, taking into account direction of fire and creating the casualties in the nearest coy platforms. This calculation is modified with flanking fire value (simulating the higher chance of hitting a soldier further back, which is not the case if engaging from the front), which increases the effectiveness of the volley. In the end, 5 casualties are inflicted, and models on the left flank of the unit change to casualty animation and then “die”. The red unit cannot return fire, as its unit-level fire arc is pointing in the wrong direction. (What is not taken into account here is that in GT1 ,the average scale in visualization is 1:25, meaning 1 soldier model stands for 25 soldiers in the unit. To increase the visual impact, we kill more models than the calculated casualties justify. After a short time, a few more models spawn and move to “fill the gaps”.)
In the new system, each soldier (model) is constantly checking whether it sees enemy soldiers within assigned engagement directions (a soldier can have multiple, for example, as 1st priority front, and 2nd priority to left). Depending on the unit’s firing system, the single soldiers have permission to fire or are part of unit-level controlled fire, where permission to fire is given per rank. The per-rank firing to priority direction can happen as a part of single or multiple ranks firing a simultaneous volley, and may include rotation of the ranks to move soldiers with reloaded weapons to the front. Each shot by a soldier at a soldier is calculated separately, and the outcome is decided. For example, two soldiers fire at the same enemy soldier; the first one misses, and the second one hits. The rightmost soldier picks a target further back. (Also marked is the possibility for the red unit to fire back, as in the new unit system, the left flank soldiers can turn and fire at different targets than the rest of the unit.)
Even if the result in both systems is the same, 5 casualties in the red unit, the result in the new system comes through an “organic” calculation, as we like to say. There is no separate bonus from firing from the flank, as the increased effect comes directly from the soldier-level engagement modelling. In case the blue unit was in open order or the red unit had a bigger number of ranks or density of soldiers, the result could change drastically. In the left model, this comes from a separate single unit level modifier (casualty modifier per formation for red, firepower modifier per formation for blue), in the new model, such modifiers are not used and the result will be more realistic through organic means.
Like written previously, GT1 is very heavy on CPU usage due to a lot of calculation ongoing at all times, especially with large armies fighting. While the detail of combat has increased tremendously in the rebuilt combat system, the new engine handles the required calculations much more efficiently than in GT1, and performance is much better in similar size battles, even with 1:1 model per soldier scale vs. the old 1:25 scale.
In the next diary, we’ll take a look at the new melee system, which is very much a different beast in its own right - and there the soldier level approach has the most advantages.
Most Respy,
Gen’l. Ilja Varha
Lead Designer - Grand Engineer Corps