Once more I thought that it could be usefull to write up the sequence that I'm using in modding combat and describe briefly the components and in what order I tweak them. Perhaps it might be usefull to someone else who's in the mood of modding some time in the future. However, one needs a basic understanding of the battle mechanics to comprehend what follows. Of course anyone is free to correct/comment!
I'm not concerned yet with specialities of individual units (just unit-subtypes), just with the overall battle balance, that is: How decisive do you want battles to be (under what circumstances)? How much luck or randomness should be involved? How evenly should hits be distributed amongst the participating elements? How large should the influence of certain factors be (quality)? How large should the influence of numbers be (quantity)?
Of course I have a certain idea of what I want in my mind (light troops, less decisive battles for the most part), but perhaps a similar approach might be usefull for other ideas as well.
STEP 1: DECISIVENESS / EFFECTS OF BEING OUTNUMBERED / RETREAT-CHECK-INTERVALLS
I had to begin with the issue of numbers/quantity, as everything else needed to be based on this. You need to know how many elements will fight in order to get an idea of how many attempts in fire- and melee-combat will be made (which you need as a basis for your desired hitchances) and also to get an idea of how decisive battles and especially being outnumbered will be. One of my aims was to reduce the importance of numbers, so that outnumbered stacks are not so much at a disadvantage.
My first step was to reduce the numbers of elements that are allowed to fight in each battle-round. As a base, I used to same values for most terrains and balanced the frontages so that there would be at max. 40 elements of heavy infantry fighting in each terrain and weather, regardless if you attack or defend. Note that I actually had to increase frontages for bad weather (in relation to clear weather) since movement time in bad weather is increased. Apart from that and in order to get a more transparent game, I declared all terrain-types as "not open", which means that the huge frontage bonus of generals in open terrain should be ruled out.
What I have achieved by having only ca. 40 battle elements fight in each round is that the intervalls at which C-in-Cs consider retreat are smaller. Whereas with 100+ elements fighting, there are usually lots of casualties and an outnumbered army gets virtually destroyed before a C-in-C even checks whether he'd like to retreat (except for the pre-battle-check); Now, with but 40 elements fighting, the C-in-C can check for the first time much "sooner" with less blood-shed, before his army is destroyed.
But one also has to see that reducing the number of fighting elements increases randomness in regard to which elements are selected to fight (of which I don't have any idea), and: as less elements are involved, their success/failures will be more dispersed. The more elements involved, the less random the results. But then again, concerning randomness, reducing frontage reduces a different and more important kind of randomness: the randomness of retreat-checks, which weighs much heavier than randomness in the combat of elements. Whereas before you depended on one single retreat-roll the result of which decided over lots of casualties, now you get more retreat chances for the same amount of casualties.
Note that one could also achieve this (less bloody and unforgiving battles) by drastically reducing fire-combat and melee-combat hitchances for elements, so that even though lots of elements are involved in one battle round, hardly any of them successfully hits an opposing element. However, I considered "frontage" to be the more elegant measurement, especially as I wanted to reserve very low hitchances for the targetting of light troops.
STEP 2: BLOODINESS OF BATTLE
Next, we can tune the bloodiness of battle in two ways: 1) in setting the number of battle rounds per battle and tuning retreat-wills and retreat-success-chance; 2) in setting combat parameters (how many shots are fired, hitchances, etc.).
The first way compensates for the reduced frontage by increasing the duration of battles. So, although there are much less elements fighting per round, if both commanders are determined to stand (depending on posture/ROE and the retreat-rolls), then the battle will drag on for longer and there will be more casualties. One can easily alter the number of rounds per battle (in vanilla RoP 6) and add the corresponding retreat-will- and retreat-success-modifications. In general, I think that these modifications (retreat settings for different ROEs/postures) are the most important factors when modding combat decisiveness. If you set them too high, an inferior force will always draw out of battle very easily with few casualties, leading to indecisive skirmishes rather than battles (but you can still tweak pursuit casualties!). If you set them too low, an inferior troop will tendencially get destroyed. But you should make sure to re-adjust retreat-wills once you've set all the combat-variables of elements as altering those will also alter their PWR, thus you could end up with more extreme power-relations (to which retreat-will needs to be adjusted).
So by tweaking the number of elements allowed per round (i.e. less blood will be shed in between each retreat-check-intervall), and by tweaking the number of rounds per battle in combination with the retreat-will-parameters, a lot of fine-tuning can be achieved.
Then you can tweak combat parameters. This is a difficult topic as there are so many combinations and things to consider. I personally started with the amount of "attempts" that could be made by each element in one battle round. Keep in mind that the more attempts are made, the less random will battle be. So, my first consideration was Rate of Fire and Range. Just multiply the number of elements allowed per round (in my case 40), and multiply that by their full rate of fire + 1 per range allowance greater than 1 (actually, it doesn't exactly work like that; in the battle-logs I sometimes notice that some elements fired less than their ROF, others more; but you still get an overall idea). So, with a rate of fire of 2 and a maximum range of 3, you can expect that your elements will get 40*2+2=160 fire-combat-attempts on enemy elements each round. If you now consider their fire value and multiply it by the basic to hit coefficient, and the result by fire-damage, you will get a rough idea how many hits your force will inflict in a single round of combat. So, assuming that all my elements had a chance of 20% and would inflict one hit for a successfull attempt, there would be 160*0,2=32 hits inflicted in each battle round, which translates into 256 casualties (1 hit = 8 men in my mod). As 40 elements represent roughly 8 battalions or 2 brigades, each battalion (well, hit-dispersion is not that easy, but still..) would suffer ca. 32 casualties, which is quite a lot for a single round of combat.
Therefore rate of fire and range are the first cog-wheels that you need to touch, simply because you need to know how many shots will be fired per round before you continue to tweak the hit-chance of each shot. However, there are a few things to consider when tweaking range and ROF: 1) For rate of fire, you need to keep in mind that shaken elements loose 1 ROF. So, if you set ROF of elements to 1, they won't be able to fire at all when they're shaken. 2) If you set range very low, you also need to tweak terrain-modifications on range in the terrain-files. I'm not talking about the maximum range, but rather about the range-penalty that elements suffer in certain terrains. E.g. if the terrain file gives a -1 on range, then elements that only have a range of 1 won't be able to fire!
Only now that we know how many elements will take part and how many attempts they have each round, should we consider the actual combat parameters (fire/assault and TQ, global assault and fire coefficients, damage, etc). As hitchances are thouroughly explained in the AGE-wiki ("Combat explained"), I don't need to expand on this too much. Don't forget to consider those factors that you cannot change (e.g. low strength/low cohesion penalties). I would always start with considerations of troop quality and assault, as TQ comes into play both in fire- and in assault-combat. One needs to keep in mind, however, that TQ also plays a role in siege-resolution, which needs to be adjusted accordingly. So for each variable, you should check if you don't mess up any others of their "uses" in the game. To give another example: When increasing protection, keep in mind that you don't necessarily need to set this on a unit-level. You can also do it on the level of element-subtypes via the terrain files. This latter approach has the advantage that it doesn't increase an elements' combat power which is used in other calculations (AI?, retreat-check, etc.). In any case, you can tweak all kinds of stuff until you end up with the hitchance and hitchance-dispersion of your liking.
When it comes to modding the close combat phase, I think that the attributes charge, disrupt and countercharge are essential, because they take into consideration the cohesion of the target element and are thus relative. With TQ and assault-values alone, there is just not enough freedom and the quality of the target doesn't matter a lot. I'm still testing stuff, but I think I will mainly handle combat via those three attributes in combination with abilities (in order to make countercharge more reliable; you can alter the counter-charge-probability, e.g. at least I hope so).
Also consider that cohesion and cohesion-damage is quite important. By setting cohesion damage of fire-combat and assault-combat very high, you will end up with more routed units and also, combat might get more one-sided (the element that got hit has worse chances to strike back once it is lower than 50% of its cohesion). Moreover, keep in mind that cohesion and hits certainly affect the calculation of power, and therefore might be the main influence on retreat-will.
What I can't touch on, since it has not been explained, is how rotation of elements works.
Last but not least, you should adjust pursuit casualties. The pursuit-sequence is also nicely explained in the ageod-wiki.
1. Adjust frontages in all terrains/weathers. (+ set range-malus; + declare as (not-)open terrain to disable or enable leader-frontage-boni)
2. Determine the maximum number of rounds you want a battle to have - it can't be helped that the detailed combat report only shows 6 rounds
3. Adjust retreat-will and retreat-chance for each round and each posture
4. Set range and rate of fire for elements (keep in mind that shaken elements loose 1 attempt)
5. Set other combat parameters (element-, terrain/weather-, gamelogics-specific; e.g. set the leader-boni in the gamelogics file); it's a good idea to start with TQ, which is needed for both melee and ranged combat; Keep in mind that you can set protection in the terrain files
6. Fine-tune melee combat (attributes: charge, disrupt, countercharge; finetune the results via abilities)
7. Set the damage-stats; Keep in mind how they affect combat (hard-coded!) and the campaign (e.g. considerations of the effects of cohesion on movement speed)
8. Adjust pursuit casualties
9. Test your settings in the game and study the battlelogs!
As for retreats, which are probably the most important aspect when it comes to moddeling battle mechanics, the retreat-will seems to be calculated like this (from what I've read in the battle-log):
I'm pretty sure that only the side which has less power in a battle checks whether it likes to retreat, the more powerfull side always gets a message like "No need to retreat from this battle: OppPower: 334 FacPower: 425". So the following calculations are only made for the less powerfull side:
1) take the base retreat will according to command-posture (e.g. 80%);
2) modify that with penalties for being out of ammo, having less trench-level than the opponent, and lack of of command points. The exact factors remain unknown to me (what I know is, for example, that 50% ammo doubles retreat will).
3) most importantly you add up the opponents' power (only of those stacks that take part in the battle? – e.g. a passive stack might not commit in round 1 if there are more aggressive stacks around) and compare it to your own power. E.g. If the enemy has a power of 425 and you have a power of 334, then the power factor is 127%.
For the final retreat-will-chance, you multiply your disadvantage with the modified base chance:
modified base-retreat-will (mainly based on posture): 80%
Power of opponents compared to us: 425 vs. 334 --> 127%
Retreat-will-chance = 27 * 0,8 = 22
--> There is a chance of 22% that the C-in-C will initiate a retreat prior to this combat-round.
Then a d100 is rolled and if the result is lower than 22, the faction tries to retreat. In contrast to the retreat-decision which is made by the C-in-C in a region on a faction-basis, each STACK of the retreating faction now has to carry out its own retreat-check
. Unfortunately, retreat-check-parameters don't seem to be open for modding in RoP.