Crusader Kings II

Crusader Kings II

187 ratings
A Complex Guide To Combat Mechanics
By Prestige
A lot of this was already being discussed, but I thought I'd go ahead and create a thread so it would be easy for people to find it in the future.

I don't understand everything about how the combat engine works, but what I do understand I'm going to recap here.
3
2
   
Award
Favorite
Favorited
Unfavorite
A Day in Combat
The basic process of combat is as follows: The total damage of each flank is added up - total damage on left flank, center flank, right flank. It's divided proportionally amongst the defending units on the opposing flank, based on how large they are compared to the flank as a whole. If there is no unit on the opposing flank, the damage gets a flanking damage multiplier and is applied to one of the other enemy flanks.

The defense of the receiving units is computed, and casualties are inflicted at the multiple of:
TROOP_KILL_FACTOR * (damage received / unit defense).
TROOP_KILL_FACTOR is defined in defines.lua as 0.015.

Example: The right flank of army A does 10000 damage. The right flank of army B has two units - 300 pikes with defense 8, and 200 archers with defense 2. As the pikes make up 60% of the flank, they take 60% of the damage (6000 damage). Because they have 8 defense, they lose .015*6000/8 = about 11 pikes. The game often rounds off casualties slightly, so the results may not perfectly match the prediction.

One of the consequences of the way damage is split up is that over the course of a prolonged battle, low-defense units are disproportionately killed off - so while you may start out with 60% pikes and 40% archers, by the end of the battle it's quite possible your flank survivors will be 70% pikes and 30% archers.

There is a non-linear negative impact on morale based on damage taken and unit morale. Very low casualties will result in little or even no morale loss. Significant casualties can result in disproportionate losses of morale - for example, losing 40% of your army on the first day of combat is likely to result in over a 75% morale hit and the flank panicking immediately, but losing 40% over the course of 30 days of combat is likely to leave them with high enough morale to keep fighting. Some units have higher morale than others, and are thus harder to panic (for example, Light Infantry have 3 morale, but Pikemen have 6 morale). If anyone knows the exact formula for morale loss, let me know.
Combat Phases
All combat begins in the Skirmish phase. Generally, it proceeds on to the Melee phase after ten to fifteen days of combat, then to the Pursuit phase at the end of the battle.

Each of the seven unit types has different attack and defense stats in the three combat phases.

Skirmish phase:
Unit Type
Att
Def
Light Infantry
1
3
Heavy Infantry
0.25
5
Pikes
0.1
5
Light Cavalry
1
5
Knights
0.5
8
Archers
5
3
Horse Archers
4
4

In the Melee phase, this changes to:
Unit Type
Att
Def
Light Infantry
3
3
Heavy Infantry
6
4
Pikes
5
8
Light Cavalry
3
3
Knights
10
8
Archers
1
2
Horse Archers
3
4

In the Pursuit phase, the unit's base stats are:
Unit Type
Att
Def
Light Infantry
3
3
Heavy Infantry
2
2
Pikes
0.2
2
Light Cavalry
10
8
Knights
8
5
Archers
2
3
Horse Archers
7
7

Different phases of combat make different combat tactics available, and combat is moved from the Skirmish to the Melee phase by the flank selecting one of a specific set of tactics (there is one culturally unique tactic for Altaic-culture leaders, Retreat and Ambush, which can move the phase back to Skirmish from Melee).

There is a slight asymmetry between how attacker and defender combat phases are applied. If the attacker selects a tactic changing the combat phase, the same change is immediately applied to the defender. If the defender selects a tactic changing the combat phase, the change in phase is immediately applied to the defender but not applied to the attacker until the next day of combat.

So if a group of attacking Archers are faced with a Charge tactic from the defender, they will get one final Skirmish-phase attack in (at 5 attack / 3 defense) before moving to their much weaker melee 1 attack / 2 defense. But if a group of defending archers are faced with a charge, they immediately drop to their melee-phase stats. Most of the time this is not a big issue - one day of combat usually doesn't make a big difference, particularly if you have a fairly diverse army where some units become stronger and others weaker as it moves to the melee phase.

The Pursuit phase is a little different from the other phases. It triggers when one of the two flanks drops below the MORALE_COLLAPSE_THRESHOLD: 0.25, 25% morale. At that point, the combat phase is changed to pursuit for both sides. If the battle is ongoing on other flanks (for example, the left flank routed but the right and center flanks continue to fight), there is a chance your flank will pursue the routed side, or it may switch to directly engaging one of the still-fighting flanks.

The pursuit phase terminates in one of two ways: Either the army being pursued is totally wiped out, or it successfully escapes. In order to escape, the battle as a whole must have lasted for at least MIN_COMBAT_DAYS = 8, and the retreating flank must have been in the pursue phase for at least NUMBER_OF_RETREAT_DAYS = 4. So if you rout an enemy army on day 3 of battle, you have a guaranteed 5 days of pursuit; if you rout the army on any day after day 3, you are guaranteed 4 days of pursuit.
Tactics
On entering combat, each flank selects a tactic (defined in combat_tactics.txt). The selection process is as follows:
First, a list of eligible tactics is generated. The tactics have certain trigger conditions which must be met for them to be eligible tactics for a flank.

Example: The Berserker Charge tactic requires that the combat phase be Melee, the flank be composed of at least 1% heavy infantry, the flank have a named leader, and the flank leader's culture be in the North Germanic culture group.

Second, each eligible tactic is assigned a weight (confusingly termed mean time to happen in the game files; this is a misnomer). Each tactic has a default weight, and a series of conditions that can multiply that weight.

Example: The Harass tactic starts out with a weight of 3. The weight is multiplied by 1.5 if light cavalry make up at least 70% of the light troops (archers, light cavalry, horse archers), and the flank leader's martial skill is at least 8. The weight is multiplied by 1.5 if light cavalry are at least 60% of the light troops, and the flank leader's martial skill is 12+. The weight is multiplied by 1.5 if light cavalry are at least 50%, and the flank leader's martial is 16+. So if you had a flank with 1000 heavy infantry, 650 light cavalry, 350 archers, and a 20-martial-skill leader, the starting weight would be three. The first check is failed (light cavalry are 32.5% of the army, and 65% of the light troops - not 70% of the light troops). The second check is met, as is the third. So the weight becomes 3 * 1.5 * 1.5 = 6.75.

Third, a weighted random selection is performed, determining the tactic to be used.
Example: The above army, on the first day of combat, would have weights of 3 for Generic Skirmish, 6.75 for Harass, 3 for Volley Harass, 3 for Volley, 27 for Shieldwall, and 27 for Feint. So the total weight would be (3 + 6.75 + 3 + 3 + 27 + 27) = 69.75. Thus, there would be a (3/69.75) chance of selecting Generic Skirmish, Volley Harass, or Volley - a 4.3% chance of selecting each of those. There would be a 9.7% chance of selecting Harass, and a 38.7% chance each of selecting Shieldwall and Feint.

Once a tactic has been selected, it runs for a tactic-specific number of days (for example, Harass runs for 18 days). This is true even if the combat phase changes. You can see that tactic and it's effects in-game if you mouse-over the tactic icon on the right side of your flank panel in the battle window.

Example: if combat changes from Skirmish to Melee on day 12 of combat, but you selected Harass on day 1, your flank will not change its tactic for another 6 days.

The tactic will then give a series of unit-specific bonuses to attack and/or defense; it may also change the combat phase. Finally, it may have an affinity for other types of tactics which it counters especially well, giving a damage bonus against flanks using a tactic from that tactic group.

Example: Harass gives +300% damage to light cavalry, -150% damage to archers and horse archers, and has a 100% affinity against swarm-group tactics (the tactics Swarm and Harass-Swarm) which means if the other flank selected, say, Harass-Swarm, your army would get +100% damage.

There is an asymmetry in tactical affinities. The defender's tactical affinity works as you would expect, but the attacker's tactical affinity bonus applies to the tactic used on the previous day by the defender (one consequence of this is that the defender can get a damage boost from this on the first day of combat, but the attacker can never get that bonus until the second day of combat at the earliest).

When a tactic's duration has run out, a new tactic is selected from the available set of tactics, going through the same process as before (but likely with a different set of eligible tactics, as trigger conditions have changed).

For a complete list of tactics, you can open combat_tactics.txt. Alternatively, you may find the ckiiwiki list or ahhheygao's superb Google Docs spreadsheet to be a more accessible format.

A few closing words about tactics, for those who don't want to browse the entire list of tactics themselves. While all the tactics are significant, there's a general pattern most of them follow. The skirmish-phase tactics set up a bit of a rock-paper-scissors amongst light troops: light cavalry are strong against horse archers, horse archers strong against archers, archers strong against light cavalry. Heavy Infantry are key for getting through the skirmish phase with an army that is weak in skirmish and strong in melee.

Most of the transition-to-melee phase tactics become available starting on the 10th day of combat, so a typical skirmish phase should be expected to be 10-15 days long. If for some reason you made an army with over 60% of the troops being archers, expect the Charge on Undefended Flank tactic to be chosen by the enemy around day 3 of combat, meaning you'll get just two or three days of strong archers before your army gets ripped to shreds. So... make sure no more than about 55% of your army is archers.

In the melee-phase, knights are strong against heavy infantry, heavy infantry strong against pikes, pikes strong against knights.

Try to load your army up primarily with one or at most two light unit types, and one or at most two heavy unit types; that will make it more likely that you get a tactic that boosts a large fraction of your army.

Finally, many cultures have a unique cultural tactic. These are often quite strong. Even if you don't want to read all the tactics, I recommend checking to see if your culture in your game has a unique tactic, and if so what its conditions and effects are.
The Leader
Each flank has a leader. The leader makes three contributions to an army. First, and most significant: a higher martial skill may impact the weight assigned to tactics, making good tactics more likely and bad tactics less so. The important thresholds here are 8, 12, and 16. Below 8 martial skill, some very harmful "bad" tactics become more likely. At 8 martial, a number of good tactics may become more likely if they suit your army makeup. Almost every tactic has a weight trigger that requires 12+ martial amongst other things, and most of them have conditions requiring 16+ martial.

Generally speaking, less than 8 martial is a terrible commander - better off with nobody at all. Between 8 and 11 is a decent commander, 12 to 15 is a good commander, and above 16 martial, increased martial skill no longer helps (except if you have leader traits like Aggressive Leader).

Second, some tactics require (or are made more likely by) specific leader traits. The cultural tactics are the obvious ones - note that these are unlocked by flank leader culture, not kingdom or home province culture. In some circumstances, it can be worth deliberately hunting for a commander of a different culture - if you have a lot of pikemen, consider looking for a good Scottish general. Generally, avoid combat generals who have wroth, aggressive, craven, organizer, lisp, stutter, slothful, or shy. Don't put Cruel commanders in charge of archers. A full list of traits that unlock tactics follow.
An Inspiring Leader or Defender-trait leader can start the (quite strong) Inspired Defense tactic in the Skirmish phase, which keeps casualties low until you reach the melee phase. An Aggressive Leader, Brave, or Cavalry Leader-trait leader can start the Heroic Countercharge tactic, which is an unusual knight-centric tactic that is strong vs. other charging armies - meaning a knight-based army with a good leader can be strong against both heavy infantry and knights, and only really weak against pikes. A Trickster or Quick leader can select the Clever Ambush tactic, which is useful if you have a very skirmish-centered army which nevertheless ends up in the melee phase - if you're relying a lot on archers, light cavalry, and light infantry, consider looking for a Trickster or Quick leader. A Possessed leader, or an Inspiring Leader who is also Zealous, can select Religious Fervor - a very strong offensive melee-phase tactic for a mixed-unit army. Wroth and Aggressive leaders are a bad idea, as they may select the unfortunate Reckless Charge tactic. Similarly with Craven or Organizer leaders, who may select Timid Advance. Lisp or Stutter commanders may select Confused Orders, which is devastating if you're relying on archers heavily in your skirmish phase. Slothful and Shy commanders might select Hesitant Commander. A Cruel commander may select Charging Own Skirmishers - a fairly strong tactic if your army is Cavalry-heavy and Archer-light, but a terrible tactic if the converse is true.

The third contribution a leader can make is his leadership traits.
Here are the impacts of the various traits:
(Unit-type) Commander (e.g., Light Foot Commander): Useless. Has no impact, besides Cavalry Commander making one tactic an option. Inspiring Leader: +20% morale defense, +10% offense to flank if commanding center flank. Trickster: +10% morale offense, -20% defense. Defensive Leader: +10% defense, -20% damage. Experimenter: Random change to flank offense, ranging from +/- 30%. Flanker: +20% damage when flanking a unit (not when leading a side flank). -20% damage when commanding the center flank. Aggressive Leader: +20% pursuit damage, +10% damage, -20% defense. Terrain Leader traits (e.g., Flat Terrain Expert): +20% offense and +20% defense in battles on relevant terrain. Holy Warrior: +30% damage vs. religious enemy (different religious group; heresy doesn't count). +10% morale defense. -10% damage. Unyielding Leader: +20% morale defense, +10% defense.

All the values there are scaled by leader martial skill. A beneficial impact is multiplied by (1 + .05*leader martial); this can go arbitrarily high. A negative impact is multiplied by (1 - 0.05*leader martial), up to 0 when leader martial is 20+.

This can help inform decisions on leader promotions. The strongest trait when applicable is indisputably the terrain traits - a 20-martial general with Flat Terrain Expert causes all his troops to have 40% more attack and 40% more defense on flat terrain - which is nearly equivalent to making his army 40% larger. Holy Warrior comes in at second-best if you're fighting holy wars, and quite weak if you aren't fighting religious enemies.
The worst trait is Experimenter, which is as likely to make your troops weaker as stronger (nothing quite like seeing a 20-martial general give all his troops -50% damage at the start of battle).
The Unit-type Commander traits are worthless, but at least not going to hurt you. I believe this is a bug, and may well be patched soon. If anyone can demonstrate an actual clear impact of one of these traits (besides Cavalry Leader unlocking the Heroic Countercharge tactic), please let me know. Note that Heroic Countercharge is good enough to sometimes be worth getting this trait anyways if you are going with an all-mounted retinue and using it on its own a lot against other knight-heavy armies.
Aggressive Leader and Defensive Leader are actually net negatives on a low-martial leader - anything below 8 martial, they're worse than useless. In the 8-12 martial skill range, they're pretty weak traits, but they're decent for a high-martial leader.
Skirmish-centric flanks should value Aggressive and Trickster leaders; melee-centric flanks should value Defensive and Unyielding leaders.
Damage (and defense) Calculation
The basic formula for finding out the damage or defense of a unit is: (Base Stat for this phase) * (1 + sum of unit-specific modifiers) * (1 + sum of flank-wide modifiers).
The unit specific modifiers are as follows:

Technology level. +0%/+10%/+15%/+20%/+25%/+30%, depending on the relevant tech level.
For a unit raised from a specific holding, it is the tech level in that county that matters. For a unit raised from a vassal, it's the vassal's average tech level. For a retinue unit, it's your country's average tech level.

Terrain impacts.
There are negative terrain impacts on an attacker for attacking across a river, across a straight, or an amphibious landing. There are positive terrain impacts on a defender for defending on mountains and on hills. You can find them in static_modifiers.txt.
River crossing:
Unit type
Att mod
Def mod
Light Infantry
-.1
-.1
Heavy Infantry
-.15
-.15
Pikes
-.15
-.15
Light Cavalry
-.125
-.125
Knights
-.15
-.15
Archers
-.05
-.1
Horse Archers
-.075
-.125

Straight Crossing:
Unit type
Att mod
Def mod
Light Infantry
-.15
-.15
Heavy Infantry
-.2
-.2
Pikes
-.2
-.2
Light Cavalry
-.172
-.172
Knights
-.2
-.2
Archers
-.1
-.15
Horse Archers
-.125
-.172

Amphibious Landing:
Unit type
Att mod
Def mod
Light Infantry
-.15
-.15
Heavy Infantry
-.2
-.2
Pikes
-.2
-.2
Light Cavalry
-.175
-.175
Knights
-.2
-.2
Archers
-.1
-.15
Horse Archers
-.125
-.175

Defending Mountains:
Unit type
Att mod
Def mod
Light Infantry
0
.1
Heavy Infantry
0
.1
Pikes
.1
.2
Light Cavalry
0
0
Knights
0
0
Archers
.2
.3
Horse Archers
.15
.25

Defending Hills:
Unit type
Att mod
Def mod
Light Infantry
0
0
Heavy Infantry
0
0
Pikes
.05
.1
Light Cavalry
0
0
Knights
0
0
Archers
.15
.2
Horse Archers
.1
.15

Cultural building: Cultural buildings can provide boosts to units trained in that holding. All cultural buildings are 4-leveled, with each level providing an equivalent boost to some unit. For example, the Welsh and English Longbow Range provides +15% archer attack per level, capping out at +60% archer offense. Note that this only applies to troops trained in the relevant holding. Retinues have no home holding, but automatically get a benefit equivalent to that provided by the level-4 cultural building. A full list of cultural building benefits by culture follows:
English or Welsh: +15%/level archer offense. Scottish: +15%/level pike defense Baltic or Finno-Ugric: +15%/level heavy infantry defense. Altaic or Iranian: +10%/level horse archer attack, +5%/level horse archer morale Frankish, Occitan, Norman, German, or Breton: +15%/level knight offense Iberian: +15%/level light cavalry offense Italian: +15%/level pike morale Russian: +15%/level heavy infantry defense North Germanic or Saxon: +15% heavy infantry offense per level Hungarian or west Slavic: +15% light cavalry defense per level Arabic: +15%/level light cavalry defense Byzantine: +7.5%/level knight and horse archer offense Irish: +15%/level heavy infantry defense Ethiopian: +15%/level light infantry offense West African: +15%/level light infantry offense South Slavic: +7.5%/level knight and light cavalry defense Dutch: +7.5%/level pike and light infantry offense

Tactical effect: See a table of tactics. Ranges from -150% to +420%. Note that these are so huge, they often swamp technology-based and terrain-based modifiers (1 + 4.2 - .05 is basically the same as 1 + 4.2, so a Massive Longbow Volley doesn't take a significant damage hit from a river-crossing penalty).

This is a list of the potential flank damage modifiers:
Leader traits. See leader section above.
Tactical Affinity. See the list of tactics. These tend to be either +100% or +300%, and they are always boosts to offense (not defense).
Flanking bonus. If a unit is conducting a flanking attack - engaging a unit that is not fighting back, but is instead tied up fighting a different flank - they get a 30% damage bonus.
Putting it all together
So the full formula for a unit stat would be:
(Base unit stat) * (1 + tech bonus + terrain bonus + cultural bonus + tactic bonus) * (1 + leader trait bonus + tactical affinity bonus).

So the full formula for a unit stat would be: (Base unit stat) * (1 + tech bonus + terrain bonus + cultural bonus + tactic bonus) * (1 + leader trait bonus + tactical affinity bonus). Say you have an army of 1000 Scottish pikes on mountain terrain, from a province with a level-2 Schiltron, tech level 2 in infantry melee weapons, tech level 3 in heavy armor, led by a martial-skill-20 leader with Mountain Terrain Leader, in the melee phase, doing the Schiltron formation tactic; the opposing flank is 2 Knight retinues led by a 10-martial traitless Norman general doing the Couched Lance Charge, with all tech levels at level 1. Pike Offense = 5 * (1 + .15 + .1 + 2.4) * (1 + .4 + 3) = 80.3 Pike Defense = 8 * (1 + .2 + .2 + 3.6) * (1 + .4) = 35 Total offense: 80.3 * 1000 = 80300. The Norman army has 600 knights and 400 light cavalry. Knight offense = 10 * (1 + .1 + .6 + 4.2) * (1) = 59 Knight defense = 8 * (1 + .1) * 1 = 8.8 Light Cavalry offense = 3 * (1 + .1) * (1) = 3.3 Light cavalry defense = 3 * (1 + .1) * (1) = 3.3 Total offense: 600 * 59 + 400 * 3.3 = 36720 So the pikes lose .015 * (36720/35) = 15 pikes. The knights lose 0.015 * (80300 * 600/1000) / 8.8 = 82 knights. The Light cavalry lose 0.015 * (80300 * 400/1000) / 3.3 = 146 light cavalry. The defending pikes will take 15 casualties total, the attacking cavalry will take about 230 casualties total. After maybe two or three days of that, the cavalry will rout, having lost a good third of their force or more and inflicted practically no casualties. At this point it will switch to the pursue phase, which will cause the pike's attack to drop from 5 to 0.2, the light cavalry's defense to rise from 3 to 8, and the knights defense to fall from 8 to 7. There will be minimal casualties after this point. It will be almost impossible for the pike army to wipe out that mounted army even if it chases it to another province, because from now on they'll likely rout the mounted army after at most one day of melee combat, and do almost no damage during the Skirmish and Pursuit phases. A smart human player would have a small force of light cavalry waiting nearby to swoop in and join the pikes in the mop-up.
Relative unit strengths - a first approximation
I chose to take a different approach to calculating strengths.
I start by observing that generally you don't win a war because of better morale; you tend to have better morale because you're winning the battles of the war. More offense means more kills, which means more morale damage. More defense means fewer deaths, which means less morale lost. So I ignore the morale stat entirely.
sqrt(A*D) is a pretty good start for estimating a unit's strength. If you double the attack and defense, that unit is effectively worth two of the previous unit (it kills twice as many, and is twice as hard to kill); that also doubles sqrt(A*D). If you double attack and halve defense, you inflict twice as many casualties and take twice as many casualties, which means you're roughly equally strong in combat. sqrt(A*D) is equal to sqrt(2A * .5D).
So how do the various units rate by this metric?
Unit
Skirmish Power
Melee Power
Pursuit Power
Light Infantry
1.73
3.00
3.00
Heavy Infantry
1.12
4.90
2.00
Pikes
0.71
6.32
0.63
Light Cavalry
2.24
3.00
8.94
Heavy Cavalry
2.00
8.94
7.00
Archers
3.87
1.41
2.45
Horse Archers
4.00
3.46
7.00

So to take this a step further, how does this translate to overall combat effectiveness, over an entire battle through all three phases?
Start by approximating battles as being of equal parts skirmish and melee phase, until they're effectively decided. Since the skirmish phase tends to be 10-15 days, that gives a 20-30 day window for a typical battle, which is about right with my experience.
Note that the armies tend to have larger numbers earlier (as soldiers... die), so over-emphasize the importance of the skirmish by a factor of about 25% (thus corresponding to a battle which is decided after about 50% of each army has been killed, in a close battle; this is also close to typical in my experience). So that gives us a nominal ~12.5 days of skirmish and ~10 days of melee. Now note that a high A and low D means a day of combat is very significant (lots of deaths on each side), but a low A and high D means a day of combat is basically a stalemate (few deaths). Further, we can be more precise. One day of combat, at A and D, causes as many casualties asfour days of combat at .5A and 2D. So we can "scale" the nominal days in skirmish and melee by a unit's A/D factor to get the effective skirmish days and effective melee days. That lets us estimate what fraction of casualties caused and suffered by a unit will be in the skirmish phase, and what fraction in the melee phase, against a comparably strong army. Scaling this with their relative strengths in each phase gives a rough estimate of overall strength.

Unit
Estimated Strength
Light Infantry
2.5
Heavy Infantry
4.5
Pikes
6.0
Light Cavalry
2.7
Heavy Cavalry
8.1
Archers
3.2
Horse Archers
3.9

In-depth calculation example, for light infantry:
Skirmish 1/3, melee 3/3, pursue 3/3. Skirmish score sqrt(1*3) = 1.73 Melee score sqrt(3*3) = 3 Pursue score sqrt(3*3) = 3 Skirmish effective days: 1.25 * 10 * 1/4 = 3.125 Melee effective days: 10 * 3/6 = 5 Final score: 1.73 * 3.125/(3.125 + 5) + 3 * 5/(3.125+5) = .67 + 1.85 = 2.5

These numbers are only a rough first approximation, because it all ignores tactics, morale, and damage after routing / being routed. But all units get beneficial tactics, and harmful tactics. It will slightly underestimate the strength of the mounted units (Knights, Light Cavalry, Horse Archers) because they tend not to get hurt much if routed, but inflict heavy damage if pursuing. And to me at least, it checks pretty well with my gut instinct - light infantry worse than anything else, light cavalry pretty weak, heavy infantry and pikes moderately strong, knights quite strong (generally worth at least 2 of almost anything else).

Where they do not even come close to accurately reflecting power is when one side is a very mixed-bag flank with lots of all unit types, and the other side is a very carefully crafted flank designed to maximize chances of benefiting from good tactics. In that case, you might well be two or more times as strong as your nominal strength might suggest. The other thing they don't do a very good job of estimating is the strength of the Mongols. The Mongols regularly turn the combat phase back into Skirmish, so their horse archers are stronger than you would think, and enemy unit's scores are tilted towards their skirmish scores rather than the (generally higher) melee scores. One of the few units that would be benefited significantly by moving back to skirmish (archers) also has a tactic that has a very negative synergy with typical horse archer skirmish tactics of swarming - expect archers to take double-damage from horse archers.
Upgrading your holdings
Tactical benefits will, during combat, temporarily make some units incredibly powerful and others basically useless. For example, an army doing Swarm will temporarily have quadruple horse-archer damage and no damage from archers and light cavalry. So specialization is the name of the game.

Cities will have garrisons specializing in archers and pikes. No choice, and it's not a bad outcome.
Temples will have garrisons specializing in archers and heavy infantry. Same as above.
Castle garrisons have some choice. They start off with light infantry, heavy infantry, and light cavalry. The stable is generally not worth it for the cost, so you probably get pikes, heavy infantry, light infantry, and archers. The exception would be if you have a heavy-cavalry unique building, in which case you don't really want to mix in pikes, or if you have a horse archer unique building (in which case, you don't particularly want archers). Regardless, your cultural building is almost certainly your top priority (the only time that is debatable is if it is a light-cavalry cultural building, in which case the barracks or militia barracks might be a higher priority).

The question will eventually arise, is it better to get an off-focus building or not improve at all. Generally speaking, if a building would give your levy the third of one of the two unit sets (you already have two of archers, light cavalry, horse archers, and it'd add the third, or the same with heavy infantry, pikes, and knights), and the new units would make up at least 1% of the levy on completion, it's not just not worth paying for - it'd be worth paying to not have if that was an option. Note that this is not true if you're going to be using that levy in a mixed-unit flank already.

The easiest example is something like the castle stable (which starts adding in knights at high rank), if you already have a barracks giving you a significant force of pikemen. A castle with maxed out militia barracks and regular barracks has a base of 995 soldiers. Add in a stable level 4, and that goes up to 1220, 15 of which are knights. That means just over 1% of the levy is knights... which means it's giving you a significant chance of selecting the Awesome Charge and Awesomer Charge tactics. Both of those tactics will give your knights a big damage boost (the latter will also give your ~10% of your force that is pikemen a decent damage boost). Both of those tactics will give your heavy infantry, which make up about a third of your force, a total damage debuff resulting in them dealing no damage. So for the benefit of getting another 55 light cavalry and 10 heavy cavalry, there's a real chance of making your 400+ heavy infantry useless.
Your Retinue
The general advice for making a retinue is "make it all your unique retinue unit" (found down at the bottom of the list of retinue choices). This tends to be good advice for several reasons. It means you get a highly-specialized retinue that can stand on a flank (or two, or three!) by itself, selecting tactics that are particularly beneficial due to there being just one or two unit types in the whole flank; they also will benefit from the cultural unit bonus. It's not the full story though.

There are many situations you might wish to be using your retinue in. If you want your retinue to be used for sieges (perhaps you're repeatedly breaking truces to attack someone, and don't want to wait for your levies to be re-raised and re-gathered), numbers are far more important than overall power. A skirmish retinue is the default choice here, unless you happen to have a Longbow, Horse Archer, Ethiopian Skirmisher, or Free Warrior available as an option. Skirmish retinues are terrible at winning battles, but pretty good at getting sieges moving along quickly.

If you want your retinue to be used in low-supply counties (perhaps you're invading Persia or Mali?), quality is far more important than overall power. You need an army that can stand toe-to-toe against anything its size or smaller (and preferably even those a little larger). Odds are that your cultural retinue is better for low-supply situations like that; the only exceptions are as follows:
English or Welsh. You need at least 40% of your flank to not be archers. Equal parts longbow and shock is ideal.
Ethiopian, Mande. 3 parts Defense to one part Shock, your cultural retinue is just not useful for this sort of use.
Dutch. Wait, you're invading Persia as the Dutch? Well, your retinue isn't particularly good for that. 3 Goedendags to one shock.
Any 500-light-cavalry retinue. Well, it's the best choice if you don't have any unique tactics available. But if you can get a shot at a Byzantine leader for your retinue, alternate one cultural, one cavalry (400 LC 100 heavy cavalry) retinues, so 10% of your force is heavy cavalry. Same thing if you can get an Aggressive, Brave, or Cavalry Leader trait leader for the flank.

You might want your retinue to be supporting a mercenary band or raised levy over a prolonged period of time (long enough to justify crafting the retinue for that exact purpose), in which case you need to look at the unit mix of the troops it will be supporting. It's not much good to add 1000 pikes to a flank, if they're getting mixed in with 7000 heavy infantry and 3000 knights.

Finally, some retinues are just not very good. Specifically, the Free Warrior, Ethiopian Skirmisher, and Goedendag Militia retinues aren't worth it. Light Infantry rarely benefit from tactics, so you're better off crafting a retinue that is likely to get significant tactical boosts - I'd recommend 3 defense to one shock, or 3 Goedendag to one shock for the Dutch. Pike retinues, if standing on their own, need to mix in a shock retinue for every three pike retinues. Light cavalry retinues may sometimes want to mix in an even mix of light cavalry and cavalry retinues, if you can get an appropriate general.

The English Longbow retinue is an interesting case.
If your leader's martial skill is in the 8-11 range, a 1-to-1 shock to longbow retinue is ideal. That gives you a 30% chance of volley, 30% of massive longbow volley, 20% of the moderately unfortunate Shieldwall, and 20% of the very unfortunate Generic Skirmish tactic. In the 12+ range, an all-longbow army is superior to a shock - longbow army, because Shieldwall becomes far more likely at that point in a mixed army (it goes from 3 weight to 27). Shieldwall is a weak tactic for an army that is primarily archer-based, so the higher martial skill actually makes the army weaker. The caveat to an all-longbow army is that it's much more vulnerable if caught on the defense. The 1-day asymmetry in phase transitions mentioned above (in Combat Phases) is quite significant if you're trying to win your battles in just 3 or 4 days.
Intelligent Flank Composition
The dominant factor in how well your army performs is the impact of the tactics it chooses. So the primary goal of improvement choices, retinue choices, and how you divide your army up into flanks should be trying to (a) maximize the benefit of getting a good tactic, and (b) maximize the odds of getting a good tactic.
The first is pretty simple - you look at what tactics you'd consider to be "good" with your current unit mix, and you try to further adjust your unit mix to be even more useful with that tactic. If you have a lot of pikes, try to get even more pikes. If you have a lot of light cavalry, try to get even more light cavalry. It's a pressure to specialize your holdings and flanks. Rather than have half your army be horse archers that get +300% damage from a Swarm tactic, it's nice to have 80% of your army be horse archers getting +300% damage from that tactic.

So before entering battle, open up the army management panel (the little arrow by the right side of the army), glance over the subunits in your army, and shuffle them between flanks to get a better mix on each flank - for example, shuffle light-cavalry-heavy castle levies to one flank, and archer-heavy city levies to another.

The latter goal, maximizing the odds of getting a good tactic, is a little more complicated because there are two pressures at work. You want as many eligible good tactics (and as few eligible bad tactics) as possible. Second, you want the weights on the good tactics to be as high as possible.

A glance over the list of tactics should show that you become eligible for most tactics if you have even a token force of its primary units. You're eligible to select the Volley tactic as soon as at least 1% of your flank is archers. You're eligible to select a Slow Advance if at least 1% of your army is pikes and at least 1% is heavy infantry. The exception is the off-phase tactics - tactics benefiting melee troops in the skirmish phase, or skirmish troops in the melee phase. Those tend to require at least 20% of your army be the relevant type. Generally with tactics, you're worrying about what could be called the "Rule of Two." (I could just say it, but it sounds much better with a nifty name)

The Rule of Two: A flank should contain no more than two of the three major skirmish units (Horse Archers, Archers, Light Cavalry), and no more than two of the three major melee units (heavy infantry, pikes, and knights).

It's generally ok to have just one of each of the two types of units; the two exceptions are pikes and archers. Pikes always need either knights or heavy infantry backing them up, because the pike-only tactic is unusual in that it requires forest terrain. Archers are ok by themselves, provided they are less than 60% of your total army (otherwise, you'll see the enemy selecting Charge on Undefended Flank on day 4 or 5, moving you to the Melee phase far earlier than desired). Three units can work effectively by themselves - horse archers, heavy cavalry, and heavy infantry are all tolerably good in one-unit armies. Pikes need just a token force of heavy infantry or knights supporting them, and light cavalry with an appropriate leader (Byzantine, Aggressive, Brave, or Cavalry Leader) need just 10% of the force to be knights.

Light infantry are nominally "light" troops, but they are not in the "light" troop category. They are not involved in any skirmish-phase tactic triggers or weight conditions, and the only skirmish-phase tactic that benefits them is the Shieldwall tactic (which is primarily oriented at melee-focused armies, to help those armies get through the tactics phase). So they're a bit of an oddity - neither light "skirmish" phase units, nor heavy "melee" phase units. The only generalization that can really be made about the tactics they are involved in is that after it gets to the melee phase of combat, they enable some tactics that make skirmish-strong units like archers (a little) less outclassed.

Impacting the weights generally requires that the vast majority of your light troops, or heavy troops, be the relevant type of unit. For example, if you want to maximize your odds of getting a Volley or Swarm Volley tactic, you want at least 70% of your light troops to be archers. So when upgrading holdings, you should pick just a couple light and a couple heavy units to focus on (maybe just one of each!), and ignore the rest. Pikemen should not be left by themselves - if your flank is highly reliant on pikemen, you need some heavy infantry to unlock the Shieldwall tactic, to help get the pikes to the melee phase with minimal casualties. So even in a high-pike flank, try for at least 25% heavy infantry.

If for some reason you can't come up with any decent generals (your generals are somewhere in the <12 martial skill range), tactical selection becomes pretty random. At this point, you pretty much just need to throw numbers at the problem and hope for the best.

Your vassal AI count-level or higher levies will likely be a wild mishmash of all sorts of units, totally unsuited to a carefully crafted flank. Assuming this is the case, you might consider sticking them in two of the flanks, then fill the third flank with your retinue, mercenaries, and/or your personal holding levies (the units you have a lot more control over the makeup of).
18 Comments
Prestige  [author] Mar 6 @ 1:25pm 
Your levies come from your counties. You can manage them by buildings.
Junior Feb 29 @ 9:59am 
But how do i make this rule of two if the majority of the levies gave more than 2 types of troops? How can i edit them?
taio Jan 7 @ 11:35am 
@vompatti I also had trouble researching this. All I found was a forum thread speculating on other combat issues, and meanwhile assuming without comment during calculations that attack and defense are indeed clamped to zero. I've gone with that ever since.
vompatti Jun 4, 2023 @ 3:59pm 
Hey sorry for asking in such a old guide, but I can't seem to find this information anywhere. What I'm wondering is that can a unit type's attack actually go negative, or is it limited to 0? I noticed that the good ol' navelist combat calculator calculates as if it can go negative, but I'm wondering if that's really correct.

This of course isn't a big deal for retinues, but it does have some relevance for levies. For example, Heavy cavalry would be not just bad cost-effectively, but outright detrimental unless you have a lot of them. Powerful Charge and Overwhelming Charge tactics can trigger in a presence of at least 1% HC, and they give -150% and -180% attack to Heavy Infantry. If that can actually make HI have negative attack, then these tactics are absolutely awful for levies (instead of just kinda worthless), and it could actually be that building Stables any higher than level 4 is just making your levy army worse. Not to even mention Jousting Lists.
CornbreadChrist Aug 18, 2022 @ 12:42pm 
There are a lot of good flank compositions, but if you're really trying to optimize a flank to get the best results and fight far above it's normal numerical combat effectiveness, there's really only one true winner for most scenarios.

Light Infantry, Light Cavalry (camels included), and some Heavy Cavalry with zero other unit types.

The hardest part is finding cultures that can support this composition. It's usually only possible using culture retinues and tribal retinues combined, which limits your options if playing ironman.

CK2 wiki has excellent breakdown on retinues, tactics, and unit stats, then it's just up to you to get the math right. My advice here would be to remember that even a perfectly balanced flank will suffer losses in combat and will likely have to fight more than one battle.

My biggest advice would be to experiment yourself. It's fun :)
CornbreadChrist Aug 18, 2022 @ 12:42pm 
Archers/Longbowmen used to be the most powerful retinue in the game. They are cheap, and would obliterate sieges in an assault because sieges used to start in the skirmish phase.

I don't understand why people still love this composition. It's morale is terrible, and if you get to melee phase, a large portion of it will be killed even though you may win. It is cheap to reinforce and easy to employ, so good for starters I suppose. The problem isn't the tactics that can be chosen, it's the morale of the army.

If you're really dedicated to the archer option, then Welsh culture with Suomenusko religion is the best version that flank composition can achieve.
kaiyl_kariashi Feb 27, 2022 @ 1:08am 
yeah, the pic is Female Knight from Maoyuu Maou Yuusha. (no one has names in the series, they're just called by job descriptions or other traits).
DustFinn Dec 30, 2021 @ 4:25am 
I wonder how commanders affect the sub-unit they are assigned to
Prestige  [author] Dec 24, 2021 @ 7:44pm 
@KarlKartoffel a part was by myself, but a lot of it came from the community experiences. I just mixed it
Antioof Dec 22, 2021 @ 8:17am 
Hm