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

redtide

Magister Ludi
63 Badges
Jun 19, 2010
479
71
  • Crusader Kings II: Charlemagne
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Heir to the Throne
  • Crusader Kings II
  • Europa Universalis III Complete
  • Europa Universalis III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Victoria 3 Sign Up
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Leviathans Story Pack
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Green Cities
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Cities: Skylines Industries
  • Cities: Skylines
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Semper Fi
  • Teleglitch: Die More Edition
  • Victoria 2
  • 500k Club
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Stellaris
  • Hearts of Iron IV: Cadet
I played for quite a while without ever using retinues, and when I finally decided to use them I really went down the metagame rabbit hole. I devised a quantitative way of comparing flank compositions. Here is a first draft of the bit of madness that I call ARCEM. It's described in the attached PDF, which has expressions for the equations used in the spreadsheet. Please compare its findings to the conventional wisdom and experimental results. Let me know about any errors in the calculations, disagreements with the theory, or suggestions for improvement.

Caveats and Limitations:

Since it bases offensive efficiency on retinue cap usage, the metric neglects investment in cultural buildings. This is actually a good thing because it makes comparisons between generic retinues and cultural retinues easier.

I don't know whether this is how casualties are actually calculated by the game. It's just my interpretation of the forum's prevailing consensus, and I haven't tested it very much.

I don't know how the game calculates the daily reduction in "average morale". I have employed Eslin's explanation even though I have some reservations with it.

It is static rather than dynamic, which is to say that it gives results for a "snapshot" of the composition. A carelessly composed flank could start with good tactics but lose its balance and lurch into bad tactics with just a few casualties, and this metric doesn't account for that. This caveat is especially important when considering the melee figures, since skirmish casualties might introduce a mismatch between the theoretical melee "snapshot" and the actual flank composition. A dynamic version could probably be built by iterating damage to the flank.

A lot of the compositions in the rankings are extremes meant to represent ideals. Real compositions should have buffers around tactics triggers and/or modifiers to allow for disproportionate casualty rates.

No judgment is made about whether it is better for a flank to stay in skirmish or quickly charge into melee. If you have a preference, pay attention to the Skirmish 10+ tactics probabilities.

For each phase of battle, the combined metric gives equal importance to offense and defense. But you might choose to prioritize one over the other, e.g. building a flank that has high defensive efficiency in skirmish and high offensive efficiency in melee.

It doesn't account for the composition of or tactics used by the opposing flank.

I have yet to add hordes.

Religious bonuses are neglected.

Some fields in the spreadsheet are intended for future updates and haven't been fully implemented.

EDIT: I think maybe I should make a point about my terminology. I use "efficiency" in a different way than some of the retinue testers seem to use it. In my sense, efficiency ultimately relates to cost (whether reinforcement cost or retinue cap usage). It is the ratio of the flank cost-effectiveness (which I believe I've seen others call "cost-efficiency") to the cost-effectiveness of some reference flank. I have normalized my figures such that a flank composed solely of Light Skirmish retinues is 100% efficient in the skirmish and pursuit phases, and a flank composed solely of Defense retinues is 100% efficient in the melee phase. I believe that some retinue testers use "efficiency" to refer to something like kills:casualties. Is that right? Since my metrics look at your flank in isolation, at Day 0 of a given phase, they make no claims about the casualties that it will inflict or whether it will win the battle.

EDIT: Now with morale! In version 0.3, I've introduced a flank morale parameter that I'm calling "fortitude". I have redefined sARCEM and mARCEM to use morale efficiency instead of defensive efficiency. In the spreadsheet, tactics that switch the phase of battle now use the appropriate base stats for unit offense and defense (but I've left those tactics grouped according to the phase during which they trigger). Since version 0.2, the spreadsheet properly accounts for heavy cavalry offense bonuses (correcting the error in the version 0.1 documents noted by Zhouji).

EDIT: A new version (0.4) with a less wrong accounting of morale. Also has some calculations for levies (though no efficiency calculation). I corrected an error in the spreadsheet that had omitted cultural building bonuses from generic retinues. In my rankings list, flanks composed solely of generic retinues have no cultural building bonuses, and cultural retinue bonuses assume Level 4 cultural buildings. The way that the spreadsheet imparts cultural building bonuses is a little weird at the moment. Cultural retinues automatically get a cultural building bonus (as long as a number 1-4 is entered in the cell) regardless of whether you pick its specific cultural building from the drop down list, but generic retinues will get the cultural building bonus only if you select the building from the drop down list.
 

Attachments

  • ARCEM_0.4.xlsx
    285,8 KB · Views: 0
  • ARCEM_0.4_description.pdf
    242 KB · Views: 0
  • ARCEM_0.4_figures.pdf
    2,4 MB · Views: 0
Last edited:
  • 3Like
  • 1Love
Reactions:
If you don't mind my asking, what is your real life job or field of study? Because that's some pretty advanced stuff you've got there... Great work in any case, will definitely study it when planning my next game.
 
If you don't mind my asking, what is your real life job or field of study? Because that's some pretty advanced stuff you've got there... Great work in any case, will definitely study it when planning my next game.
I've done some engineering-type stuff. The math expressions started as just a way for me to keep track of what was happening in the spreadsheet, and then they felt pithier than explaining the project in words, which I could probably make more of an effort at. I did most of the work on this in the late fall, but then mothballed it because I became frustrated when trying to incorporate morale. When I revisited it, I decided to just throw it to the community in somewhat rough form and then answer whatever questions might arise.
 
Last edited:
Hello,

Nice to see new propositions for unravelling the CK2 combat system!!!

So these are projections based on a model simulating the battle, if I understand well. I only looked quickly at your doc so if some of my comments are wrong, don't hesitate to point them.

I don't know whether this is how casualties are actually calculated by the game. It's just my interpretation of the forum's prevailing consensus, and I haven't tested it very much.
I guess you checked this page, but the response is here:
https://ck2.paradoxwikis.com/Combat
The game calculates the total damage dealt (based on attack stat), and the defense stat stands as hit points, so a fraction (0.015) of damage/defense gives the number of deaths. it is applied taking into account the proportion of each unit types in the flank (not sure how exactly, I saw this is an old post from the forum, detailing the battle system even more).

It doesn't incorporate morale. I don't know how the game calculates the daily reduction in "average morale". I couldn't model the figures given in the battle interface, even after modding in some simplifications.
3 morale points are substracted to the total morale of the army for each casualty (converted as percentages but this is not very important).
I don't know if this is the information you want...

Overall, when calculating attack, defense, morale (etc), the game calculates the sum over the whole flank rather than the mean. This may not completely invalidate your formulas tho.

It is static rather than dynamic, which is to say that it gives results for a "snapshot" of the composition. A carelessly composed flank could start with good tactics but lose its balance and lurch into bad tactics with just a few casualties, and this metric doesn't account for that. This caveat is especially important when considering the melee figures, since skirmish casualties might introduce a mismatch between the theoretical melee "snapshot" and the actual flank composition. A dynamic version could probably be built by iterating damage to the flank.
This is a pretty big limitation; tactics pool changes, as well as the attack/defense values of the flank, based on the casualties. However, for a first model, I guess this is OK

In my opinion, the biggest limitation, is that we cannot be certain that your metrics makes a good inference about whether the retinue is good at winning its flank or the battle, which is the most important information when it comes to spending your gold on an expensive army.

- First, it does not take into account the morale, which is the biggest factor towards determining the winning side.

- Second, the scores are calculated per combat phase. We don't know for sure whether the skirmish or melee phase is the most important for winning the flank, which makes the comparison between melee and skirmish oriented retinues complicated. This is hard to conclude whether the best skirmish retinue or the best melee retinue has the highest likelihood to win its flank or the battle. Simply mixing the best skirmish with the best melee does not work either since it can mess up the tactics, as well as how casualties are distributed across unit types during the battle (which affects the outcome of the battle in a dramatic way when taking into account the morale).
Besides, the efficiency during the pursuit phase has no influence on the outcome of the battle (the flank is already won) and actually, if a winning flank decides to pursuit rather than flanking the adjacent flank (this is random), it decreases the chances to win the battle. The pursuit phase is where the most casualties are inflicted, which is interesting for the overall war as it weaken the opposing army for the future battles (although this is limited by the reinforce rate), but not for winning the present battle.

Finally: I'm not sure taking into account the opposing army tactics is relevant given your method. If I'm not mistaken, you do not simulate actual battles. You just estimate the theoretical performances of a flank (offensively and defensively) based on the unit stats. It does not take the opposing army into account in the calculation at all (not even the stats on the units).

So about further improvements:
- The morale seem very important to take into account. If we can manage to integrate it in your metrics, it can give us a better estimation about whether a retinue is good at winning battles. I don't know if with the mode of calculation for morale damage I pointed above (if you did not already know it), you see a way to implement it.
- It would be nice to find a way to compare quantitatively the predictions from your model with actual battle data such as Dragatus' tests. This relates with implementing the morale, as Dragatus tests directly evaluate the winrate of different armies.
- Adding a dynamic aspect to the model could be interesting, but it takes it to a new level. It would need to take into account the opposing army stats (for instance a levy army, or retinue-levy mix), and simulate battles rather than calculate a composite efficiency score... not the same goal then.
 
Last edited:
based on a model simulating the battle

There is no simulation of the battle. My expressions simply imagine the case of the flank having the selected composition when a tactic is selected. Thus, for the melee phase, it imagines the unrealistic case of the flank magically skipping the skirmish phase. I agree that this is a major problem. I would just recommend giving yourself a decent "buffer" around whichever trigger you do or don't want to hit and that you stay aware of the percentage of casualties that a certain unit type will incur relative to its fraction of the flank. This is simply another way of stating that the metrics are static rather than dynamic, and I agree with your sentiment that this is "a pretty big limitation". But it seemed OK to me to do statics before dynamics, as long as everyone knows the limitations. These metrics are idealizations rather than "models" or "simulations" or mirrors of what actually happens in a battle.


I believe that that page is somewhat outdated. For instance, it lists as a reference this thread from 2013, and there is no "TROOP_KILL_FACTOR" in defines.lua. There is an "ATTACK_TO_DAMAGE_MULT", but it has a value of 0.01 rather than 0.015. I mention that in the PDF. Otherwise, I believe my expressions for casualties reflect what you describe. What I meant by "I don't know" is that I prefer evidence over argument from authority.

3 morale points are substracted to the total morale of the army for each casualty (converted as percentages but this is not very important).
I don't know if this is the information you want...

I really want to know how morale works, and I have seen that explanation before, but I'm not entirely convinced by it. I know that defines.lua contains "MORALELOSS_FACTOR = 3.0", which is described as "Affect[ing] the morale loss rate in combats (higher gives bigger losses)", but it also contains "DEATH_MORALE_DAMAGE = 2.5", which is described as "How much morale damage is done by a soldier dying", which confuses me. I wanted to incorporate morale by first coming up with an expression for the damage required to cause a given flank to flee (i.e. when its "average morale" hits 20%). I used Dragatus' retinue test mod with some of my own simplifications added, and I recorded all of the numbers listed in the battle interface for each day of the battle and then tried to reconstruct the way that the game calculates the daily reduction in average morale, but I couldn't figure it out.

Overall, when calculating attack, defense, morale (etc), the game calculates the sum over the whole flank rather than the mean. This may not completely invalidate your formulas tho.

If I recall correctly, my PDF has expressions relating the averages to the sums over the flank. But I prefer averages in my metrics because averages allow you to compare any flanks regardless of their sizes. They can be compared solely on the basis of their ratio of unit types.

we cannot be certain that your metrics makes a good inference about whether the retinue is good at winning its flank or the battle, which is the most important information when it comes to spending your gold on an expensive army

This is true. The comprehensive metric is an efficiency metric rather than a success metric. Retinues are limited by scarcity in the form of finite usage with which to assemble your retinue and finite gold with which to reinforce your retinue after it sustains casualties. A retinue can sustain expensive losses even in a victory. If "money is no object", then you might prefer the values that I call "intensity" and "strength", which I calculate along the way and which I've charted vs usage and reinforcement cost, respectively.

Simply mixing the best skirmish with the best melee does not work either since it can mess up the tactics

You can do a little mixing and still get favorable tactics. You'd end up with what I would call a "flatter" profile, sacrificing efficiency in one phase for efficiency gains in another. I have tried to depict this by offering two "infantry hybrid" examples (which I define as a mix of Pikemen and Heavy Infantry or either Pikemen or Heavy Infantry with over 50% Light Infantry), Schiltron:LS:Shock (5:9:5) and Housecarl:LS: Def (5:4:2). One that doesn't use cultural retinues is Def:Shock:LS (5:3:1), but I didn't include it.

the efficiency during the pursuit phase has no influence on the outcome of the battle

Agreed. My metrics are intended to show only which flanks are efficient pursuers.

I'm not sure taking into account the opposing army tactics is relevant given your method. If I'm not mistaken, you do not simulate actual battles. You just estimate the theoretical performances of a flank (offensively and defensively) based on the unit stats. It does not take the opposing army into account in the calculation at all (not even the stats on the units).

This is an accurate characterization of my method. And yeah, I think you're right about the opposing tactics and resulting affinities. I guess a better way for me to think about it is that the incoming damage to a flank will be higher when the opposing flank has an affinity bonus.

It would be nice to find a way to compare quantitatively the predictions from your model with actual battle data such as Dragatus' tests. This relates with implementing the morale, as Dragatus tests directly evaluate the winrate of different armies.

They are slightly different. I don't claim that my metrics will tell you which flank is more likely to actually win a battle. I don't remember the extent to which Dragatus accounts for cost. But if both methods are considered ways of evaluating the "goodness" of a flank, I would be very interested to see which flanks are both cost-effective (in my sense) and have high win rates.
 
Last edited:
I should add that the following conditions were used when calculating the values in the rankings: commander with 18 martial, fully upgraded cultural buildings, cavalry leader where appropriate, and--when relevant--commanders with cultures matching the cultural retinues. Since I assumed neutral terrain, I neglected the Stand Fast, Desert Ambush, and Mountain Ambush tactics.
 
I believe that that page is somewhat outdated. For instance, it lists as a reference this thread from 2013, and there is no "TROOP_KILL_FACTOR" in defines.lua. There is an "ATTACK_TO_DAMAGE_MULT", but it has a value of 0.01 rather than 0.015. I mention that in the PDF. Otherwise, I believe my expressions for casualties reflect what you describe. What I meant by "I don't know" is that I prefer evidence over argument from authority.
Maybe someone told me the same thing in a previous thread... If this is the case I forgot it in the mean time. The broad calculation should not have changed much, but in the details, there seem to be some changes. Anyways, sorry for assuming you did not see all of this.

I really want to know how morale works, and I have seen that explanation before, but I'm not entirely convinced by it. I know that defines.lua contains "MORALELOSS_FACTOR = 3.0", which is described as "Affect[ing] the morale loss rate in combats (higher gives bigger losses)", but it also contains "DEATH_MORALE_DAMAGE = 2.5", which is described as "How much morale damage is done by a soldier dying", which confuses me. I wanted to incorporate morale by first coming up with an expression for the damage required to cause a given flank to flee (i.e. when its "average morale" hits 20%). I used Dragatus' retinue test mod with some of my own simplifications added, and I recorded all of the numbers listed in the battle interface for each day of the battle and then tried to reconstruct the way that the game calculates the daily reduction in average morale, but I couldn't figure it out.
A way to test whether one of the parameters is outdated and does not work, would be to test each parameter by setting ridiculous values (first try with extremely high value, second try to 0) and see if it affects a battle (if the parameter works, it should be either one shot or no morale damage at all). This does not tell us exactly how the whole calculation is done tho...

Other than that, if morale damage = a flat amount per unit killed, then the score you calculate for the offensive efficiency already takes this into account indirectly (offensive is good for killing so it is good for inflicting morale damage). Then for improving the integration of the morale into your efficiency metrics, the only thing to do is find a way to take the morale into account into your score for the defensive efficiency. This is a big part of the defensive stats, and ignoring it reduces greatly the defensive efficiency of high morale unit types such as pikemen, camels and HC.
I don't really know how to do it but we can discuss this.

Agreed. My metrics are intended to show only which flanks are efficient pursuers.
the fact that you have a separate metrics per combat phase makes it that you can just ignore the pursuit score if you want to estimate the efficiency during battle. So this is not really a problem or limitation.

This is an accurate characterization of my method. And yeah, I think you're right about the opposing tactics and resulting affinities. I guess a better way for me to think about it is that the incoming damage to a flank will be higher when the opposing flank has an affinity bonus.
I don't know if this something crucial for your method. The only way I see for implementing defending against an affinity bonus, would be estimating a normal score and a score against affinity bonus (taking into account the probability of triggering tactics with affinity for the tested army and assuming the opposing army triggers the dominant affinity tactics... this assumption is made because with your method, there is no opposing army).

Calculating two scores is not very parsimonious... I don't like that too much to be honest.

They are slightly different. I don't claim that my metrics will tell you which flank is more likely to actually win a battle. I don't remember the extent to which Dragatus accounts for cost. But if both methods are considered ways of evaluating the "goodness" of a flank, I would be very interested to see which flanks are both cost-effective (in my sense) and have high win rates.
I don't think Dragatus took the costs into account. Only the efficiency in battle.
 
A way to test whether one of the parameters is outdated and does not work

My instinct was to give the devs the benefit of the doubt by assuming that both MORALELOSS_FACTOR and DEATH_MORALE_DAMAGE are currently functioning.

test each parameter by setting ridiculous values (first try with extremely high value, second try to 0) and see if it affects a battle (if the parameter works, it should be either one shot or no morale damage at all). This does not tell us exactly how the whole calculation is done tho...

Right, I did try something like that, and the modifications that I settled on were:
morale gain removed, morale tech bonus removed, MORALELOSS_FACTOR = 1, DEATH_MORALE_DAMAGE = 0, light infantry morale reduced to 1. I then ran a battle using a flank of 2000 light infantry (5 Ethiopian Skirmisher retinues to be exact) commanded by a guy with 18 martial and recorded all of the numbers on each day of a battle. That was my flank, and they always lost, so it seemed like a good test case.

Other than that, if morale damage = a flat amount per unit killed, then the score you calculate for the offensive efficiency already takes this into account indirectly (offensive is good for killing so it is good for inflicting morale damage). Then for improving the integration of the morale into your efficiency metrics, the only thing to do is find a way to take the morale into account into your score for the defensive efficiency. This is a big part of the defensive stats, and ignoring it reduces greatly the defensive efficiency of high morale unit types such as pikemen, camels and HC.

I agree with this almost completely. With respect to offense, there is also the case of "morale damage". Certain commander traits give bonuses to the morale damage that a flank inflicts on its enemies, such that there would not be a 1:1 correspondence between the physical damage and the morale damage that a flank inflicts. And I don't know how the incoming morale damage to a flank affects or differs from the morale damage that a flank might sustain when one of its troops dies. But I do think of the morale issue as being almost exclusively one of an additional defense metric. Incidentally, this wouldn't be necessary if morale were to scale with defense, but of course it doesn't. The way that I hope to incorporate morale is in a metric related to the damage that a given flank would have to sustain to cause it to flee. The reason I want to do it that way is that the existing defense metric is based on the incoming damage to the flank, so it would provide some cohesion. But aside from the issue of MORALELOSS_FACTOR vs DEATH_MORALE_DAMAGE, another outstanding question that I have about the "average morale" calculations is what the game uses as the baseline morale. On each day of the battle, does it always use the total morale that the flank had as it entered the battle, or does it use an updated total morale based only on the units that remain in the battle?

the fact that you have a separate metrics per combat phase makes it that you can just ignore the pursuit score if you want to estimate the efficiency during battle. So this is not really a problem or limitation.

This might relate to a terminological distinction in the use of "efficiency". Did you see my question about that in my edit to my first post? I'd appreciate your feedback on that. I include the pursuit phase because I want to mirror the way that the game gives the different attack and defense values for each phase of battle. I conceive of this project as providing another set of a priori (i.e. prior to battle) numbers, like the attack and defense stats of the various units, but for the entire flank, based on its unit-fraction composition and probabilities of tactics used. In that way, my project fundamentally differs from that of Dragatus, which is experimental and based on actual battles.

I don't know if this something crucial for your method. The only way I see for implementing defending against an affinity bonus, would be estimating a normal score and a score against affinity bonus (taking into account the probability of triggering tactics with affinity for the tested army and assuming the opposing army triggers the dominant affinity tactics... this assumption is made because with your method, there is no opposing army). Calculating two scores is not very parsimonious... I don't like that too much to be honest.

I completely agree with all of that. I believe that my initial comment about the opposing flank composition and affinities reflected a momentary lapse in my appreciation for the theoretical economy of treating a flank in isolation. And my reply had a followup conclusion that I left implied, specifically that if we conceive of the composition and affinities of the enemy flank as affecting only the damage projection of the enemy flank, then there is no need to incorporate it as a vulnerability of your own flank.

EDIT: BTW, thank you very much for all of your engagement on this topic. I hope more people chime in.
 
I don't think Dragatus took the costs into account. Only the efficiency in battle.

My tests took cost into account in the sense that I gave my test armies a limited "budget" (which in the second test was 36000 retinue cap) and they only got as many retinues of a specific type as the budget allowed. This effect was even more pronounced in the first test where the entire test army was composed of retinues.

I do use the term "cost" somewhat interchangeably though for how much retinue cap a soldier of a given type uses, for how much gold it costs to hire a soldier of a given type, and for both the upkeep and reinforcement costs for a soldier of a given type. That's because all these values are linearly proportional to each other and derived from the maintenance attribute that is given to the unit in the defines file. The ratio of any of these costs for two chosen units types is going to be the same, no matter which of the specific costs you pick, as long as you have an equal number of soldiers of both types.

I also was not aware that effectiveness and efficiency were two different things, but will keep that in mind from now on.

As for ARCEM, my first comment is to make it clear in the document that the "usage" mentioned on page 3 is retinue cap usage. Since I've always thought of it as "cost" and I've never seen anyone call it "usage" before I had trouble figuring out what exactly this usage was supposed to be. I must have started at that part of the text for half an hour trying to understand it before I decided to just read on and then gradually came to understand what you meant. Simply calling it "retinue cap usage" the first time it's mentioned would have been enough to avert this.

I would also recommend having a short summary at the very beginning which explains the caveats and limitations and how slash lines are a measure of how powerful a retinue is in each phase of combat before delving into how you calculated them. That would help retain the attention of the less technically inclined.

The calculations themselves seem fine to me, if incomplete due to the omission of morale as a factor. The only thing I have doubts about is that you have chosen to calculate defensive reinforcement cost-effectiveness instead of defensive usage-effectiveness. Can you elaborate on your reasoning?

Finally, for putting together offensive and defensive efficiency, multiplying is certainly better than taking the mean, but I'm not sure taking the square root it was necessary. Then again I wouldn't quite say it did harm either, at least not at this point. The order in which the retinue compositions are sorted would be unaffected, only the relative ratios would change.

In defense of multiplying offense and defense, if a unit has 4 attack and 1 defense and another unit has 1 attack and 4 defense, the first unit will do 4x as much raw damage, but the second unit will divide that raw damage by 4 when determining casualties, so they both end up inflicting the same amount of casualties upon each other. If you take either of these and have it fight a unit with 2 attack and 2 defense you will again have both sides inflict the same amount of casualties upon each other, though the amount of casualties will be either twice as high or half as high as in the first case, depending on whether you take the offensive or the defensive unit.

Writing that made me realize there is one effect beyond morale that ACREM does not take into account and that is how quickly a retinue will resolve it's battle. In the above example all 3 units would have the same ACREM, but would function differently on the battlefield. The offensive unit would resolve it's fight against the opposing flank quickly and if victorious would then become able to flank the enemy. While flanking it would not be taking any damage, which in turn meas that it's low defense would not hinder it but it would still benefit from it's high attack (which now has the flanking bonus applied to it). On the contrary, the defensive units would take longer to resolve it's battles, so even if it was set to lose if left to it's own devices, it could be able to hold out long enough for an adjacent friendly flank to win it's battle and begin flanking the enemy.

So if you had a pure retinue army you could have the left and center flank be composed of Defense retinues and account for 25% of the total retinue cap usage each, while the remaining 50% of your retinue cap would be spent on filling the right flank with Light Skirmish retinues.

Returning to how exactly to combine offensive and defensive efficiency, one further thing that is perhaps worth noting is that during the course of battle the effect of scaling up either of those will be non-linear. If you double offense you double enemy casualties, so you take less damage on the next day. Likewise if you double your defense you halve your casualties, which in turn means more of your soldiers will survive to deal damage to the enemy. So offense reinforces defense, which reinforces offense, which reinforces defense ...

But since you're currently focused on the static picture on day 0 of a tactic, you can maybe ignore that for now.
 
Last edited:
I also was not aware that effectiveness and efficiency were two different things

To elaborate on this a bit, and I don't know whether everyone thinks about this the way that I do, but I prefer to use "effectiveness" for raw values of result per investment and reserve the term "efficiency" to express the effectiveness as a percentage of some ideal, such that to say that a flank with the ratio Camel 6:1 LS is 150.5% offensively efficient in the skirmish phase is to say that it is about 1.5 times as offensively "usage-effective" as a flank of Light Skirmish retinues.

Simply calling it "retinue cap usage" the first time it's mentioned would have been enough to avert this. I would also recommend having a short summary at the very beginning

These are very good points. In general, I need to make more of an effort at framing the project and explaining what is going on at each step.

you have chosen to calculate defensive reinforcement cost-effectiveness instead of defensive usage-effectiveness. Can you elaborate on your reasoning?

Ultimately it doesn't matter which "cost" you choose, since, like you said, they are all linearly proportional to one another based on what's called "maintenance" in defines.lua (and which is also just the retinue cap usage per unit type), and if you're eventually turning everything into percentages, then the results will be the same regardless of which "cost" you employ. But I did have a reasoning behind choosing retinue cap usage and reinforcement cost for offense and defense, respectively. I didn't care only about the combined metric that I call ARCEM. I wanted each step along the way to be meaningful on its own. And so I assumed that when you purchase a retinue you're investing in its capacity to project damage, and while you might have gobs of money to spend on that retinue, if you don't have the usage points then you can't spend that money. Thus, when initially buying a retinue, I consider retinue cap usage scarcer than gold, or, to put it another way, retinue cap usage is the limiting factor. Doing it that way also removes any need to account for the gold investment in cultural buildings. You could do the same thing when calculating defense metrics. But what happens when your retinue sustains casualties? You have to pay gold for it to reinforce, and if you're using knights you might pay a lot. Sometimes you might not have enough gold to reinforce your retinue. Thus, I assumed that reinforcement cost is the most relevant "cost" to relate to flank defense.

the amount of casualties will be either twice as high or half as high as in the first case, depending on whether you take the offensive or the defensive unit.

The way that I think about this is that there is a "loss of resolution" when you combine offensive efficiency and defensive efficiency into ARCEM. ARCEM might give you some vague sense about the "goodness" of a particular composition, but to really know what is going on with that composition you should drill down into the underlying metrics.
 
Thanks a lot for the efforts! This is great!

I was playing around with the excel file. I think there is a mistake in the HC offence calculation in the Retinue section, that the offence bonus was not applied correctly. The values in column BL should be multiplied with AJ instead of AE.

I would suggest to add options of pure Camel Warrior and pure Cataphract in the Ranking section. Pure Camel Warrior only sacrifices some offence in Skirmish, which still makes them the highest, however greatly improves their Melee phase compared to the mixed version. Pure Cataphract also behaves better in the Melee phase than mixing it with General Cav. Also adding the data of Horse Archers and Cataphract in terrains which doesn't allow them to use Swarm tactic seems to be a good idea for me, it tells you how much difference the terrain makes for HA.

Also for the Horse Archers, I know Retreat and Ambush is tricky for the calculation, since it changes the phase back to Skirmish. It looks for me that the Melee phase data of Horse Archers are normalized to General Defence, maybe also calculated with the base unit data of the Melee phase. Isn't it supposed to be counted as Skirmish phase and normalize it with General Light Skirmish? I realize that it's an unfair comparison in either way how one treats it... But it may be worth to note it as it looks that Horse Archers are really weak in Melee phase by the numbers now, although they are very strong on certain terrains where they have 100% chance to trigger R&A, giving a higher bonus.
 
I was playing around with the excel file. I think there is a mistake in the HC offence calculation in the Retinue section, that the offence bonus was not applied correctly. The values in column BL should be multiplied with AJ instead of AE.

You're right. Thanks, that's a great eye. That means that metrics for flanks with Heavy Cavalry are wrong in the version 0.1 PDF and spreadsheet. I'll post corrected versions.

Pure Camel Warrior only sacrifices some offence in Skirmish, which still makes them the highest, however greatly improves their Melee phase compared to the mixed version.

Camel 6:1 LS has a skirmish offensive efficiency of 150.5%, while pure Camel Warrior has a skirmish offensive efficiency of 101.2%, a difference of -49.3%, which seems significant to me. This is due to the latter throwing Disorganized Harass instead of Harass. In melee, pure Camel Warrior does have higher "intensity", "strength", and efficiencies than Camel 6:1 LS, but the offensive efficiency gain is only +11.7%. The "intensity" of either composition is higher in the skirmish phase than in the melee phase, so I think that making a Camel flank as dominant as possible in the skirmish phase is what that retinue is best suited to.

Pure Cataphract also behaves better in the Melee phase than mixing it with General Cav.

A flank of pure Cataphracts does have higher "intensity" in both skirmish and melee, and higher "strength" in melee. But it has a higher cost per casualty and thus lower defensive efficiency in both skirmish and melee, which means that you might pay more when reinforcing, but if the added offense resolves the battle more quickly, then you might see fewer casualties anyway. I suppose that is something that my metric doesn't account for, due to its static nature and/or the fact that it gives equal weight to offense and defense. I will add an entry for pure Cataphracts.

Also adding the data of Horse Archers and Cataphract in terrains which doesn't allow them to use Swarm tactic seems to be a good idea for me, it tells you how much difference the terrain makes for HA.

Yeah, when Horse Archers can't throw Swarm, they also can't throw Harass Swarm or Retreat and Ambush, which makes them very bad. Maybe I'll add terrain-specific entries in a future version.

Also for the Horse Archers, I know Retreat and Ambush is tricky for the calculation, since it changes the phase back to Skirmish. It looks for me that the Melee phase data of Horse Archers are normalized to General Defence, maybe also calculated with the base unit data of the Melee phase. Isn't it supposed to be counted as Skirmish phase and normalize it with General Light Skirmish?

Isn't it the case that the Retreat and Ambush tactic itself (which lasts only 6 days) is still in the melee phase and that it's just the follow-on tactic that is back in the skirmish phase?

it looks that Horse Archers are really weak in Melee phase by the numbers now, although they are very strong on certain terrains where they have 100% chance to trigger R&A, giving a higher bonus

All of the values in this version assume an abstract "neutral ground". Maybe one of the actual terrains behaves that way, but I'm too lazy to look right now. But what that means is that the values that I've quoted for Horse Archers are already based on them throwing Retreat and Ambush 100% of the time in melee.
 
Isn't it the case that the Retreat and Ambush tactic itself (which lasts only 6 days) is still in the melee phase and that it's just the follow-on tactic that is back in the skirmish phase?
If I understand it correctly, Retreat and Ambush will switch immediately to skirmish, just like any Skirmish phase charge will switch to Melee. The other side may still be using melee tactics, but base stats are now skirmish stats (same thing with charge, the other side may still be using shieldwall or generic, it doesn't stop the phase change).
 
Camel 6:1 LS has a skirmish offensive efficiency of 150.5%, while pure Camel Warrior has a skirmish offensive efficiency of 101.2%, a difference of -49.3%, which seems significant to me. This is due to the latter throwing Disorganized Harass instead of Harass. In melee, pure Camel Warrior does have higher "intensity", "strength", and efficiencies than Camel 6:1 LS, but the offensive efficiency gain is only +11.7%. The "intensity" of either composition is higher in the skirmish phase than in the melee phase, so I think that making a Camel flank as dominant as possible in the skirmish phase is what that retinue is best suited to.

Yes, I'm mostly talking about "intensity" here instead of "efficiency". What I found interesting and to be worth to note about pure Camel is that it still has higher offensive intensity in Skirmish than any other troop even though using a bad tactic, AND at the same time has a great offensive intensity in Melee which is comparable to Housecarl and Frankish HI, as well as a good defense in both Skirmish and Melee phase. This just simply shows how imbalanced Camel is.


Isn't it the case that the Retreat and Ambush tactic itself (which lasts only 6 days) is still in the melee phase and that it's just the follow-on tactic that is back in the skirmish phase?

All of the values in this version assume an abstract "neutral ground". Maybe one of the actual terrains behaves that way, but I'm too lazy to look right now. But what that means is that the values that I've quoted for Horse Archers are already based on them throwing Retreat and Ambush 100% of the time in melee.

I'm not sure how the phase switching works in the game. I always thought it switches phase immediately, what's uncertain is in which phase the basic unit values are they using. R&A gives better bonus to both HA and LC, and will greatly increase its offense.

P.S. Would you mind if I translate the excel table into Chinese and post it on a Chinese forum? I will of course post the link to this original post and quote your name.
 
If I understand it correctly, Retreat and Ambush will switch immediately to skirmish, just like any Skirmish phase charge will switch to Melee. The other side may still be using melee tactics, but base stats are now skirmish stats

I'm not sure how the phase switching works in the game. I always thought it switches phase immediately, what's uncertain is in which phase the basic unit values are they using.

OK, I had just assumed that Retreat and Ambush and the Skirmish (days 10+) Charge tactics use the base stats of melee and skirmish, respectively, and that's what version 0.1 of the spreadsheet does. I'm not remembering the battle interface well enough to know whether the game makes it obvious which base stats are being used. I'll have to check on that.

This just simply shows how imbalanced Camel is.

Yeah, it's pretty ridiculous. And of course this is new with 2.8.x. Their defensive numbers seem "typical" to me (i.e. falling in with the rest of the Light Cavalry group), but of course I'm not accounting for morale. But their offensive numbers are out of control. They're clearly the best offensive composition in skirmish, and during melee they fall in with the Heavy Infantry and/or Heavy Cavalry group(s).

Would you mind if I translate the excel table into Chinese and post it on a Chinese forum?

That's fine with me.
EDIT: Just know that the error that you pointed out affects all of the Heavy Cavalry numbers in the ranking table, which are just values copy and pasted form the Profile page. You should be able to fix that easily, if you don't want to wait for me to post the corrected spreadsheet. I'm going to add a few more compositions before I post it.
 
Last edited:
Right, I did try something like that, and the modifications that I settled on were:
morale gain removed, morale tech bonus removed, MORALELOSS_FACTOR = 1, DEATH_MORALE_DAMAGE = 0, light infantry morale reduced to 1. I then ran a battle using a flank of 2000 light infantry (5 Ethiopian Skirmisher retinues to be exact) commanded by a guy with 18 martial and recorded all of the numbers on each day of a battle. That was my flank, and they always lost, so it seemed like a good test case.
Then it seems that DEATH_MORALE_DAMAGE: either has no effect anymore (and has probably been replaced by MORALELOSS_FACTOR) or implements something else than the number of morale points lost per soldier lost (this is the job of MORALELOSS_FACTOR).

I agree with this almost completely. With respect to offense, there is also the case of "morale damage". Certain commander traits give bonuses to the morale damage that a flank inflicts on its enemies, such that there would not be a 1:1 correspondence between the physical damage and the morale damage that a flank inflicts. And I don't know how the incoming morale damage to a flank affects or differs from the morale damage that a flank might sustain when one of its troops dies. But I do think of the morale issue as being almost exclusively one of an additional defense metric. Incidentally, this wouldn't be necessary if morale were to scale with defense, but of course it doesn't. The way that I hope to incorporate morale is in a metric related to the damage that a given flank would have to sustain to cause it to flee. The reason I want to do it that way is that the existing defense metric is based on the incoming damage to the flank, so it would provide some cohesion. But aside from the issue of MORALELOSS_FACTOR vs DEATH_MORALE_DAMAGE, another outstanding question that I have about the "average morale" calculations is what the game uses as the baseline morale. On each day of the battle, does it always use the total morale that the flank had as it entered the battle, or does it use an updated total morale based only on the units that remain in the battle?
About that question, I remember reading a while ago (probably in the thread you linked, the source for the wiki page), that the death of a soldier was a double penalty since it reduced the total morale by 3 (MORALELOSS_FACTOR) and removed the soldier's morale from the total morale of the flank. This would mean the total morale is updated each day but don't quote me on this... I am really not certain. Besides, this could provokes strange shenanigans where losing a high morale unit has an inflated effect on the flank (when mixed with low morale troops).
For now, I don't really know how morale could be added up to your metrics (besides the fact that it only should affect the defense part)... The fact that the system simulates the battle at two levels (soldier level with defense as hit points and flank level with morale as hit points) makes it very difficult.

This might relate to a terminological distinction in the use of "efficiency". Did you see my question about that in my edit to my first post? I'd appreciate your feedback on that. I include the pursuit phase because I want to mirror the way that the game gives the different attack and defense values for each phase of battle. I conceive of this project as providing another set of a priori (i.e. prior to battle) numbers, like the attack and defense stats of the various units, but for the entire flank, based on its unit-fraction composition and probabilities of tactics used. In that way, my project fundamentally differs from that of Dragatus, which is experimental and based on actual battles.
EDIT: I think maybe I should make a point about my terminology. I use "efficiency" in a different way than some of the retinue testers seem to use it. In my sense, efficiency ultimately relates to cost (whether reinforcement cost or usage). It is the ratio of the flank cost-effectiveness (which I believe I've seen others call "cost-efficiency") to the cost-effectiveness of some reference flank. I have normalized my figures such that a flank composed solely of Light Skirmish retinues is 100% efficient in the skirmish and pursuit phases, and a flank composed solely of Defense retinues is 100% efficient in the melee phase. I believe that some retinue testers use "efficiency" to refer to something like kills:casualties. Is that right? Since my metrics look at your flank in isolation, at Day 0 of a given phase, they make no claims about the casualties that it will inflict or whether it will win the battle.
As you separate each phase, including the pursuit phase is OK in my opinion. it is interesting to have an idea of the efficiency of the retinue during this phase (the quicker the flank wipes the fleeing opponent, the quicker it will help the adjacent flank, and killing soldiers is always good for global strategy during a war). The only problem I see is that as this phase is a purely asymetrical phase (one flank attacks and the other defends), as opposed with skirmish and melee which are symmetrical. In this case mixing attack efficiency and defense efficiency in a single statistics may not be the best solution but first, this is a minor issue since efficiency in skirmish and melee seem far more important in my opinion, second, you also report the attack and defense values separately, so I know where to look for having the information I want.

About the terminology, I did not understood at first, that you used "efficiency" as cost-efficiency, so good you precised this. About the normalization with Light Skirmish/Defense, this is easier to read in my opinion. It gives a quick look telling instantly how much a retinue is more cost-efficient than the best basic retinue in its specific phase. For now it may underestimate the efficiency of retinues involving high morale troops. But other than that, trying to quantify cost-efficiency is your choice, we have no say in this. If this is clear in your presentation of the metrics, no problem :)
As pointed out by several others, adding an introduction presenting your general approach in the pdf could be nice.

(I don't know if I responded on what you expected I respond :/)

I completely agree with all of that. I believe that my initial comment about the opposing flank composition and affinities reflected a momentary lapse in my appreciation for the theoretical economy of treating a flank in isolation. And my reply had a followup conclusion that I left implied, specifically that if we conceive of the composition and affinities of the enemy flank as affecting only the damage projection of the enemy flank, then there is no need to incorporate it as a vulnerability of your own flank.
I think that for a general cost-efficiency metrics, enemy army composition and affinity is not relevant.
If you want a retinue which directly counters the army's opponent with retinues, just taking the looking at the general cost-efficiency and intuitively weighting it with the benefits you expect this composition has for countering the enemy (and for achieving other goals) is sufficient. Besides, when you beat your enemy what will you do? adapt your composition against a new enemy? In terms of cost-efficiency, changing your retinue seem not cost efficient at all.
A simple metrics cannot cover every situations. Ignoring the opposing army allows for staying in the most general and generic situation.

EDIT: BTW, thank you very much for all of your engagement on this topic. I hope more people chime in.
No problems. Î don't have that much time on this. Apparently, more people have chimed in ^^
 
Last edited:
Ultimately it doesn't matter which "cost" you choose, since, like you said, they are all linearly proportional to one another based on what's called "maintenance" in defines.lua (and which is also just the retinue cap usage per unit type), and if you're eventually turning everything into percentages, then the results will be the same regardless of which "cost" you employ. But I did have a reasoning behind choosing retinue cap usage and reinforcement cost for offense and defense, respectively. I didn't care only about the combined metric that I call ARCEM. I wanted each step along the way to be meaningful on its own. And so I assumed that when you purchase a retinue you're investing in its capacity to project damage, and while you might have gobs of money to spend on that retinue, if you don't have the usage points then you can't spend that money. Thus, when initially buying a retinue, I consider retinue cap usage scarcer than gold, or, to put it another way, retinue cap usage is the limiting factor. Doing it that way also removes any need to account for the gold investment in cultural buildings. You could do the same thing when calculating defense metrics. But what happens when your retinue sustains casualties? You have to pay gold for it to reinforce, and if you're using knights you might pay a lot. Sometimes you might not have enough gold to reinforce your retinue. Thus, I assumed that reinforcement cost is the most relevant "cost" to relate to flank defense.

I think how well the retinue does in combat is the most important metric, more so than how much it costs to recover loses. Though if it results in the same final numbers then it doesn't matter. It might be worth testing whether you actually do get the same final result with both reinforcements cost and usage cost. I say that because you mentioned units dying of at different rates.

I would suggest to add options of pure Camel Warrior and pure Cataphract in the Ranking section. Pure Camel Warrior only sacrifices some offence in Skirmish, which still makes them the highest, however greatly improves their Melee phase compared to the mixed version. Pure Cataphract also behaves better in the Melee phase than mixing it with General Cav.

The problem with pure Cataphract is that for the purpose of selecting tactics Horse Archers count as Light Cavalry, so the retinue is eligible for Harass. Harass is a great tactic if you have lots of Light/Camel Cavalry, but the Cataphract retinue doesn't. Instead it has a decent amount of Horse Archers, which suffer a -150% offense penalty during Harass and end up doing no damage in the phase of combat during which they were supposed to excel.

To elaborate, each special troop type has a defined base_type and will be detected as such for the purpose of tactic selection. Camel Cavalry and Horse Archers both have Light Cavalry as their base type, while the base type for War Elephants is Heavy Cavalry. This means that a flank consisting out of 50 Light Cavalry, 30 Horse Archers, and 20 Camel Cavalry will be detected as consisting out of 20% Camel Cavalry, 30% Horse Archers, and 100% Light Cavalry.

What keeps Horse Archer armies from triggering Harass is the additional condition that it only triggers if the army has fewer than 50% Horse Archers. That works for the Horse Archer retinue (which is 52% Horse Archers), but fail for Cataphract (which is 40% Horse Archers). By mixing Cataphract with standard Cavalry in a 2:1 ratio you ensure that at least half your skirmish troops will actually be doing damage in the skirmish phase, so it greatly increases reliability.

Camel 6:1 LS has a skirmish offensive efficiency of 150.5%, while pure Camel Warrior has a skirmish offensive efficiency of 101.2%, a difference of -49.3%, which seems significant to me. This is due to the latter throwing Disorganized Harass instead of Harass. In melee, pure Camel Warrior does have higher "intensity", "strength", and efficiencies than Camel 6:1 LS, but the offensive efficiency gain is only +11.7%. The "intensity" of either composition is higher in the skirmish phase than in the melee phase, so I think that making a Camel flank as dominant as possible in the skirmish phase is what that retinue is best suited to.

Battles always start in skirmish phase, so superiority during skirmish phase is also more valuable than superiority during melee phase.

Isn't it the case that the Retreat and Ambush tactic itself (which lasts only 6 days) is still in the melee phase and that it's just the follow-on tactic that is back in the skirmish phase?

A tactic that changes the phase of battle will do so instantly. I have always thought that when the flank switches from one phase to another it also switches from using one set of attack and defense values to another.

Melee tactics are melee tactics because that's a condition for them to trigger. But there is nothing in the tactics file that suggests a link between melee tactics and melee stats. Which in turns suggests that the values used will depend purely on what phase the flank is in.

Related observations from my testing are that if attacker and defender select a new tactic on the same day the attacker will do so first and if the attacker's chosen tactic changes the phase of combat, the attacker will change a tactic for the new phase of combat. That's why you so often find attacker's charging into melee and then instantly running away. What happens in such a case is that the attacker charges, which switches the phase to melee. The defender then picks a melee tactic. If the tactic is Force Back the defender will do 4x damage to the charging attacker, which often means an instant win and a switch to pursuit phase..

About that question, I remember reading a while ago (probably in the thread you linked, the source for the wiki page), that the death of a soldier was a double penalty since it reduced the total morale by 3 (MORALELOSS_FACTOR) and removed the soldier's morale from the total morale of the flank. This would mean the total morale is updated each day but don't quote me on this... I am really not certain. Besides, this could provokes strange shenanigans where losing a high morale unit has an inflated effect on the flank (when mixed with low morale troops).

Data from an old set of tests I did to figure out combat mechanics suggests that morale total is updated each day of battle and that it affects what is considered to be 100% morale. If you have 200 Heavy Infantry they'll have 800 morale and that will be 100%. If half of them die, the survivors can have 400 morale at most and that becomes the new 100%. Each day of battle the UI will show you the current maximum morale (what would be considered 100%) and it's current percentage.

I assumed that was true and calculated how much morale was reduced per casualty and got a ratio that was close to constant across all the days of battle and the difference was small enough that it could be explained with rounding errors (especially given how there was a disparity between displayed damage, displayed loses, and loses calculated by comparing the number of troops in the flank). That ratio did change based on the composition of the opposing flanks, however, which stumped me at the time. Now I suspect it's related to the number of units in a flak.


Finally, for putting together offensive and defensive efficiency, multiplying is certainly better than taking the mean, but I'm not sure taking the square root it was necessary. Then again I wouldn't quite say it did harm either, at least not at this point. The order in which the retinue compositions are sorted would be unaffected, only the relative ratios would change.

The more I think about this, the more certain I am that you should have just multiplied the offensive and defensive efficiency rather than taking the square root. Right now if you quadruple a unit's attack you will only double it's ACREM, while it's actual strength will be more than 4x as high (because over time offense reinforces defense reinforces offense reinforces defense ...). While this suggests some sort of exponential scaling is needed for a dynamic evaluation, linear scaling is accurate for the static model.

Put to play Devil's advocate for the current method, the square root is fitting if you want to make ACREM scale linearly with cost. Halving a unit's cost will double both it's offensive and defensive efficiency (you have twice as many troops to inflict and absorb damage) and with the current method that yields a doubled ACREM.
 
The problem with pure Cataphract is that for the purpose of selecting tactics Horse Archers count as Light Cavalry, so the retinue is eligible for Harass. Harass is a great tactic if you have lots of Light/Camel Cavalry, but the Cataphract retinue doesn't. Instead it has a decent amount of Horse Archers, which suffer a -150% offense penalty during Harass and end up doing no damage in the phase of combat during which they were supposed to excel.

To elaborate, each special troop type has a defined base_type and will be detected as such for the purpose of tactic selection. Camel Cavalry and Horse Archers both have Light Cavalry as their base type, while the base type for War Elephants is Heavy Cavalry. This means that a flank consisting out of 50 Light Cavalry, 30 Horse Archers, and 20 Camel Cavalry will be detected as consisting out of 20% Camel Cavalry, 30% Horse Archers, and 100% Light Cavalry.

What keeps Horse Archer armies from triggering Harass is the additional condition that it only triggers if the army has fewer than 50% Horse Archers. That works for the Horse Archer retinue (which is 52% Horse Archers), but fail for Cataphract (which is 40% Horse Archers). By mixing Cataphract with standard Cavalry in a 2:1 ratio you ensure that at least half your skirmish troops will actually be doing damage in the skirmish phase, so it greatly increases reliability.

I understand how tactic works... In fact, I thought exactly the same thing as what you wrote here before actually using the excel to make some calculations.

It turns out cataphract mixing with cavalry (2:1) actually decreases the skirmish offense intensity from 1.325 to 1.122, if you are fighting on a terrain suitable for HA. This is because increasing the LC ratio increases the chance to trigger harass. Mixing with 2:3 ratio can make it to a roughly same value 1.338, however this will decrease the melee offense intensity from 2.189 to 1.397 (German brave general). If you mix too many LC, it basically becomes a standard cavalry. It's just not worth it. Of course, if you are fighting on a terrain not suitable for HA, mixing it with cavalry will greatly increase the skirmish offense, since you are simply adding number of LC from zero, but the cost of melee power is the same as previous case.

Similarly, I was arguing with someone on reddit about the power of pure camels after he posted this link. I always thought pure camels can't be better than Tie-Futu on equal numbers, because Harass is 300% and disorganized Harass is 100%. It turns out I was wrong, pure camels do better damage than any other units except mixed camels in Skirmish phase, and there is no risk of triggering volley. And at the same time they do same damage as housecarls in melee, so it's also no problem if the enemy numbers are too big to finish the battle in skirmish. It's completely viable, and somewhat anti-intuitive, that's why I suggest to include it.

I really appreciate the author because the excel sheet is really helpful to make quick calculations and get results which are not that intuitive.
 
I think how well the retinue does in combat is the most important metric, more so than how much it costs to recover loses.

What I've presented is essentially an economic metric, in that it is concerned with the efficient use of scarce resources, namely your retinue cap and gold. If two flanks produce the same outcome, but one uses less of your retinue cap and costs less to reinforce, then I consider it better. As for the "outcome", I am using the theoretical "damage projection" and "damage absorption" of the flank in lieu of experimental results from in-game testing (win rate, kills:casualties, etc) because you already have that down and because I personally find this kind of project a little more fun. I would be very interested to see where there are agreements and disagreements. I'm guessing there are a fair number of disagreements, since I haven't accounted for morale yet.

It might be worth testing whether you actually do get the same final result with both reinforcements cost and usage cost. I say that because you mentioned units dying of at different rates.

The different casualty rates are accounted for in the calculations of "total flank casualties" (denoted by capital theta) and "average replacement cost per casualty", the latter of which depends on the reinforcement cost. Switching from reinforcement cost to retinue cap usage amounts only to multiplying all instances of reinforcement cost by some constant, which would change the raw values of "defensive cost-effectiveness (DCE)", expressing them in [dmg/usg] instead of [dmg/gold], but when you normalize them to the DCE of the reference unit type and/or retinue the results will be the same whether you use reinforcement cost or retinue cap usage.

the base type for War Elephants is Heavy Cavalry.

I think the truth is a little weirder than this, as I've ranted about here. If it's tl;dr for anyone, the upshot is that War Elephants don't trigger heavy cavalry tactics because the line in the special troops file reads "base_type = heavy_cavalry" instead of "base_type = knights". I don't know whether "heavy_cavalry" is defined elsewhere for other reasons, but the heavy cavalry unit is called "knights" in the combat tactics file.

A tactic that changes the phase of battle will do so instantly. I have always thought that when the flank switches from one phase to another it also switches from using one set of attack and defense values to another.

Melee tactics are melee tactics because that's a condition for them to trigger. But there is nothing in the tactics file that suggests a link between melee tactics and melee stats. Which in turns suggests that the values used will depend purely on what phase the flank is in.

Thanks. This is very helpful. I will need to change the base stats used by those tactics in a future version.

Data from an old set of tests I did to figure out combat mechanics suggests that morale total is updated each day of battle and that it affects what is considered to be 100% morale. If you have 200 Heavy Infantry they'll have 800 morale and that will be 100%. If half of them die, the survivors can have 400 morale at most and that becomes the new 100%. Each day of battle the UI will show you the current maximum morale (what would be considered 100%) and it's current percentage.

This is also very helpful. I've decided to go ahead and add a morale metric even if its assumptions don't accurately reflect exactly what actually happens in a battle. It will still be better than nothing.