Combat Equation
Posted: Tue Mar 03, 2015 7:20 pm
Is there a good post anywhere that clearly explains the combat equation in full detail? I've done some searches and found bits and pieces but not a comprehensive explanation.
I'd like to have a complete explanation of everything that is going on, so that I can build a computer model to make thorough combat prediction (ie. see the probability distribution curve of possible damage outcomes, probability of close defense, etc.). For that I'd need to know about the basic combat mechanics (how attack, defense, initiative, and ROF are used), as well as stuff like terrain and weather effects.ThvN wrote:Hi, sorry for the late reply, but what exactly are you looking for? Some combat mechanics are completely or partially 'hidden' (RoF, trait bonuses), other factors are external, like the weather/terrain (ini caps). I'm trying to mod some unit stats so I have compiled a fair amount of data to better understand what is happening.
If you want to know how the hit/miss percentages are determined, these are hardcoded and are the result of the absolute difference between the total attack and defense values, there are two sets, one for direct attacks and one for artillery/level bombers. So HA=20 vs. GD=18 combat would have the same miss/suppressed/kill chances as a SA=9 vs. GD=7 (both a 2 point difference).
Code: Select all
A-D Miss%Supp%Kill%
>14 10 9 81
14 10 9 81
13 12 9 79
12 14 9 77
11 16 9 75
10 18 9 73
9 20 9 71
8 22 10 68
7 24 10 66
6 26 11 63
5 28 11 61
4 30 12 58
3 35 12 53
2 40 11 49
1 45 11 44
0 50 10 40
-1 55 10 35
-2 60 9 31
-3 65 9 26
-4 70 8 22
-5 72 7 21
-6 74 7 19
-7 76 7 17
-8 78 7 15
-9 80 6 14
-10 82 6 12
-11 84 5 11
-12 86 5 9
-13 88 4 8
-14 90 4 6
-15 90 4 6
-16 90 4 6
-17 90 4 6
-18 90 4 6
-19 90 4 6
-20 90 4 6
-21 90 5 5
-22 through -30 idem
-31 90 6 4
-32 through -40 idem
-41 90 7 3
<-41? 90 7 3
Code: Select all
A-D Miss%Supp%Kill%
>53 ? ? ?
53 10 25 65
52 10 26 64
51 10 27 63
50 10 27 63
49 10 28 62
48 10 29 61
47 10 30 60
46 10 31 59
45 10 32 58
44 10 33 57
43 10 34 56
42 10 35 55
41 10 36 54
40 10 36 54
39 10 37 53
38 10 38 52
37 10 39 51
36 10 40 40
35 10 41 49
34 10 42 48
33 10 43 47
32 10 44 46
31 10 45 45
30 10 45 45
29 10 46 44
28 10 47 43
27 10 48 42
26 10 49 41
25 10 50 40
24 10 51 39
23 10 52 38
22 10 53 37
21 10 54 36
20 10 54 36
19 10 55 35
18 10 56 34
17 10 57 33
16 10 58 32
15 10 59 31
14 10 60 30
13 12 59 29
12 14 59 27
11 16 58 26
10 18 58 24
9 20 57 23
8 22 57 21
7 24 56 20
6 26 55 19
5 28 54 18
4 30 54 16
3 35 51 14
2 40 47 13
1 45 44 11
0 50 40 10
-1 55 37 8
-2 60 33 7
-3 65 30 5
-4 70 26 4
-5 72 24 4
-6 74 23 3
-7 76 21 3
-8 78 20 2
-9 80 18 2
-10 82 17 1
-11 84 15 1
-12 86 13 1
-13 88 11 1
-14 90 9 1
<-14 90 9 1
OK, now let's discuss initiative. I read elsewhere that for each +1 of initiative you have, you get to do 20% of your shots before the enemy returns fire. Is this rounded down as well? Also, what is the initiative roll-off and how is that determined?Tarrak wrote:Assuming a rate of fire of 10, which the majority of all units have, you get one dice roll per one point of current, unsuppressed strength of the unit. A unit with a strength of 7 gets 7 dice rolls, a unit with strength of 13 would get 13.
If the unit in question got different RoF then the amount of dices is multiplied by the RoF divided by 10 and the outcome is always rounded down to an integer. A unit with RoF of 7 and strength of 10 would get 7 dice rolls (10*7/10=7). The same unit with strength of 13 would get 13*7/10=9.1 also 9 dice rolls.
If no shot hits, the enemy can still use all its attacks. So it is important to not just have better initiative, but to be able to inflict some damage with those 'free' shots, otherwise the unit will still have to withstand the full force of the enemy attacks.When a unit takes 1 kill, this also generates some suppression. The formula is (50-stars*10)%. This means that a green unit takes additional 0.5 points of suppression per every kill. This models the fact that green unit becomes disorganized and demoralized when taking damage. Veteran 5-star units take zero additional suppression because they are so tough they are immune to this effect. All the rest units lie in between these two extremes.
Thanks for all the work! Is there any kind of initiative bonus for being the unit to initiate combat? Or do units do exactly the same on the attack as on the defensive?ThvN wrote:I edited in some additional info that was still missing (submarine rules), and I managed to figure out how the initiative advantage % is probably rounded. I'll have a look at posting about strength/defense modifiers, as these are also only visible in the combat log.
SA= soft attackFor each unit class, there are 8 columns specifying per-star bonus to attack, defense and initiative. Each value is the number of 1/100s, so 100 means 1, 50 means 0.5 and so on. After applying the bonus, the game rounds the result to the nearest integer. So 3.2 attack is rounded to 3, and 3.7 attack is rounded to 4.
Code: Select all
Class Ini SA HA AA NA GD AD CD
Infantry 50 100 50 0 0 100 100 100
Tank 50 100 100 0 0 100 50 0
Recon 0 50 50 0 0 100 50 0
Antitank 50 0 200 0 0 100 50 0
Artillery 0 100 50 0 0 100 50 0
Anti-air 0 0 0 200 0 100 50 0
Structure 0 100 100 100 100 100 100 100
Fighter 50 0 0 200 0 50 100 0
Tac bomber 0 100 100 0 50 50 100 0
Strat bomber 0 100 100 0 100 100 100 0
Submarine 0 0 0 0 100 100 100 100
Destroyer 0 0 0 0 100 100 100 100
Capital ship 0 100 100 50 100 100 100 100
Carrier 0 0 0 0 0 100 100 100
Transport 0 0 0 0 0 0 0 0
Armour train 0 100 50 0 0 100 50 0
River boat 0 0 0 0 100 100 100 100
Yes, it does, sorry for the confusion. A unit that attacks another unit that is on a river hex gets this bonus, and (your example) if a unit attacks from a river hex the opponent gets the bonus as well, no matter on what kind of hex it sits.proline wrote:So what about when you attack from a river? Does the unit you attack get the same +4 attack / defense?