With a view to being able to number crunch easily for balancing mods I've started to put together a battle calculator spreadsheet in excel using Derek's post here as a basis.
Trouble is, the numbers don't really stack up and I was hoping for a little guidance on what had been changed please.
My calculations are based along the following lines:
Unit stats:
- str = Strength
- dex = Dexterity
- con = Constitution
- lvl = Level
Weapon stats:
- w_att = attack factor
- w_hit = To hit bonus
- w_ddg = Dodge bonus
- w_def = Defense bonus
Armour stats:
- a_att = attack factor
- a_hit = To hit bonus
- a_ddg = Dodge bonus
- a_def = Defense bonus
Constants:
- ba = Base accuracy = 15
- al = Accuracy level multiplier = 3
- dd = Dodge dexterity divisor = 2
- sm = Attack strength subtraction = 10
- sf = Attack strength divisor = 10
- dm = Defense dexterity subtraction = 10
- df = Defense dexterity divisor = 10
- hb = Base hit points = 10
- hc = Hit point constitution divisor = 5
- hl = Hit point level multiplier = 2
Base Calculations:
- acc = Accuracy = ba + (lvl * al) + w_hit + a_hit
- ddg = Dodge = (dex / dd) + w_ddg + a_ddg
- att = Attack = w_att + a_att + ((str - sm) / sf)
- def = Defence = a_def + w_def + ((dex - dm) / df)
- hp = Hit Points = hb + ((con / hc) * (lvl * hl))
- rs = Retaliation strikes = ???
Applied Calculations:
- To Hit Percentage = (acc1 / (acc1 + ddg2)) * 100
- Minimum damage = ???
- Maximum damage = ???
- Average damage = ???
Ive tested this in-game and some of the results are a little off. Taking a spearman in enemy territory fighting against an enemy spearman the figures are as follows:
Spearman1:
- str = 10
- dex = 10
- con = 10
- lvl = 4
Weapon stats:
Armour stats:
Base Calculations:
- acc = Accuracy = 27
- ddg = Dodge = 5
- att = Attack = 9
- def = Defence = 2
- hp = Hit Points = 26
Applied Calculations:
- To Hit Percentage = 84% (actual 91%)
- Minimum damage = ??? (actual 1)
- Maximum damage = ??? (actual 8)
- Average damage = ??? (actual 4.5?)
EnemySpearman2:
- str = 10
- dex = 10
- con = 5
- lvl = 1
Weapon stats:
Armour stats:
Base Calculations:
- acc = Accuracy = 18
- ddg = Dodge = 5
- att = Attack = 10
- def = Defence = 5
- hp = Hit Points = 12
Applied Calculations:
- To Hit Percentage = 78% (actual 86%)
- Minimum damage = ??? (actual 6)
- Maximum damage = ??? (actual 9)
- Average damage = ??? (actual 7.5?)
So what I currently don't get is:
1. Why are the to-hit calculations not the same as in-game? I suspect mine are the accurate figures based on the amount of dodges in the battles.
2. How is damage calculated? I had assumed it was the same as the to-hit process but I can't be right based on the feedback in-game.
3. How are retaliation strikes calculated?
Where I want to end up is a calculator that tells you an average of how many turns it will take unit A to defeat unit B which would quickly allow modders to balance weapons and armour. In the above example my calculations would be as follows:
Each turn Spearman1 does an average of 4.5 points damage 84% of the time = 3.8 (kill enemy in 4 hits)
EnemySpearman2 does an average of 7.5 points damage 78% of the time = 5.9 (kill enemy in 5 hits)
So by the time Spearman1 dispatches the enemy he will only have an average of 2 hitpoints left. Very close battle. 
(D4/N5)+D12+D19