Combat Explained....

@carn -- thank you for the good analysis. I had had some initial thoughts along those lines, but hadn't had time/motivation to do a good write-up. Two promotions would also be a bit different, I think. I hope to do further analysis along those lines, but I'm not sure when I'll have time/motivation to do them.

Arathorn
 
A Quecha/archer question. In my MP experience I have had high % of losses attacking archers on flat land with quechas, with both units at full health and archer unfortified. Just some bad luck or is there something in the calcs that make archers harder for quechas to kill outside of cities that the civ numbers dont include. Odds are listed at ~2.2 to 1.5 for the Qeucha. I had a similar experience with attacking longbows in the open w/muskets.

On the other hand if i can wear a stack down with seige so that I have a >50% chance against the strongest enemy units, I can then get repeated wins and dispose of the stack. This is how I kill 6-7 infantry at the cost of 3-4 cannons (and get my cav promoted as well). Well worth it.
 
CiverDan said:
A Quecha/archer question. In my MP experience I have had high % of losses attacking archers on flat land with quechas, with both units at full health and archer unfortified. Just some bad luck or is there something in the calcs that make archers harder for quechas to kill outside of cities that the civ numbers dont include. Odds are listed at ~2.2 to 1.5 for the Qeucha. I had a similar experience with attacking longbows in the open w/muskets.

On the other hand if i can wear a stack down with seige so that I have a >50% chance against the strongest enemy units, I can then get repeated wins and dispose of the stack. This is how I kill 6-7 infantry at the cost of 3-4 cannons (and get my cav promoted as well). Well worth it.

That's whats been discussed, Archers and longbowmen have first strike which alters the odds in their favor (although you should still beat them with muskets/quechas)
 
Relative strength of wounded units

HP Str
95 0.949
90 0.899
85 0.849
80 0.799
77 0.769
76 0.685

75 0.676
70 0.565
65 0.51
60 0.471
55 0.431
50 0.359
45 0.285
40 0.253
35 0.222
30 0.166

So, a unit with 77 or more HPs is about as strong as a unit with 100 HP and a marginally lower strength in Combat Odds. However, with the equal "Combat Odds" strength wounded unit has 62% chance to lose (99-81 HP) or 75% chance to lose (80-77 HP).
After that, unit becomes significantly weaker than non-damaged unit with the same "Combat Odds" strength so it's not recommended to fight with it.
 
Ellestar said:
Relative strength of wounded units

HP Str
95 0.949
90 0.899
85 0.849
80 0.799
77 0.769
76 0.685

75 0.676
70 0.565
65 0.51
60 0.471
55 0.431
50 0.359
45 0.285
40 0.253
35 0.222
30 0.166

So, a unit with 77 or more HPs is about as strong as a unit with 100 HP and a marginally lower strength in Combat Odds. However, with the equal "Combat Odds" strength wounded unit has 62% chance to lose (99-81 HP) or 75% chance to lose (80-77 HP).
After that, unit becomes significantly weaker than non-damaged unit with the same "Combat Odds" strength so it's not recommended to fight with it.

How was this relative strength determined?
 
Roland Johansen said:
How was this relative strength determined?
Wounded unit with "HP" Hit Points and Strength 1 has 50%+ chance to win against non-wounded unit with Strength "Str" from that table (both units don't have first strikes).

v0.15 http://c4combat.narod.ru/c4c.htm
Check only checkbox "Relative Strength of Wounded units"
You also can set first strike for 1st or 2nd unit if you want.
 
Ellestar said:
Wounded unit with "HP" Hit Points and Strength 1 has 50%+ chance to win against non-wounded unit with Strength "Str" from that table (both units don't have first strikes).

v0.15 http://c4combat.narod.ru/c4c.htm
Check only checkbox "Relative Strength of Wounded units"
You also can set first strike for 1st or 2nd unit if you want.

Okay, that is good to know. So a unit of strength 1 with 70 hitpoints has close to 50% chance to defeat a unit of strength 0.565 with 100 hitpoints.

I should note that the special value of 76-77 hitpoints has to do with this specific battle. If you take 2 units with one wounded then in general it is not that important if the wounded unit has 76 or 77 hitpoints. It is just that a jumppoint (as defined by Arathorn in his article) occurs somewhere between 76 and 77 hitpoints in this lineup.

If you take a wounded unit of basic strength 10 and a healthy of strength 6, then there is a jumpoint for the strength 10 unit at the following health values:94-95, 83-84 and 72-73 etc. There's no jumppoint at health value 76-77.

Chance for the basic strength 10 unit to defeat the strength 6 unit when the wounded strength 12 unit starts with the following number of hitpoints:
100: 0.962

95: 0.954
94:0.851

84:0.805
83:0.691

73:0.619
72:0.466

and for the argument:
77:0.650
76:0.642

I only post this so that people don't think there's something special with the 76-77 hitpoint value. I don't know if you were trying to prove that this hitpoint value is important, but people could think it is after reading your post.
It's interesting to see how quickly the real strength of a unit drops after losing some hitpoints and your post shows that quite well.
 
Roland Johansen said:
I only post this so that people don't think there's something special with the 76-77 hitpoint value. I don't know if you were trying to prove that this hitpoint value is important, but people could think it is after reading your post.
It's interesting to see how quickly the real strength of a unit drops after losing some hitpoints and your post shows that quite well.
Well, it's not that important itself, but you can rely on "Combat Odds" if your unit has 77+ Hit points and there are no first strikes involved. After that, unit may be actually weaker (less than 50% chance to win) even if it's stronger in "Combat Odds" comparision.
The most important thing is that it's easy to use that simple rule when you're playing - you don't need any complicate formulas etc.
 
The key here is "may be". If the unit is stronger in combat odds (rather than just equal), this throws your whole table out the window and requires a new table. On that new table, depending on what the combat odds are, the break point could be completely different. It could be at 66 for example. So remembering the number 77 is useless for all purposes except for absolutely equal combat odds, which you generally don't want to get into anyway.
 
Very small updates to the first two posts -- linked the new combat calculator, added a bit more on first strikes, corrected the "start with 100 hps" sentence, things of that nature.

What open questions do we still have for land combat?

Arathorn
 
Arathorn said:
What open questions do we still have for land combat?

My question was: How does the game pick/determine the best defender (from a stack of possible defenders)?
 
Arathorn said:
Very small updates to the first two posts -- linked the new combat calculator, added a bit more on first strikes, corrected the "start with 100 hps" sentence, things of that nature.

What open questions do we still have for land combat?

Arathorn

First Strike 'Chances'?
 
Luhh said:
Also, I dislike that my modern armors so often are the ones defending against gunships instead of the mechanized infantry in the stack. Perhaps they do sometimes have a marginally higher strength, because of more experience, but that should be a reason why the computer should NOT use them for defence. They are an offensive units, and used defensively is just plain waste. I would like to see better use of this, or preference settings. If for instance there were 2 equally strong units or one marginally stronger, but the other had the hill defense or city defense upgrade, it could perhaps have a higher priority because of this? Not necessary, just a thought, and some peculiarities regarding always strongest units now that they only have one strength value.
This would easily be solved if they add "Designated Defender" back in. The strongest Designated Defender is chosen for defense. If there there are none in a stack, the strongest non-defender unit is chosen.

This was in Civ 1 through SMAC, (don't remember about CivIII). I have absolutely no idea why this isn't included as you can now specialize units for attack or defense. Why would you ever want a lvl 6 City Raider axeman to defend (with Combat II, City Raider III) if there's a half-dozen lvl 3 Combat II axemen in the stack?

Or to make matters more simple (since designated defenders are replaced more often), switch it around and have a "Designated Attacker" button. It could be a toggleable button on the command bar titled "Never defend" or some other self-explanatory wording. This way your designated assault units would be the last chosen for defense.


Roland Johansen said:
The only way to get rid of the jump points is by making the amount of damage variable (with an average amount of damage equal to the present value).

The reason for jump points is that you need 5 hits of 20-24.999 damage to kill a unit and 4 hits of 25-33.333 damage to kill a unit. It's far more probable that a unit successfully hits 4 times (or more) than that it successfully hits 5 times (or more).

Variable damage in a turn-based game is actually identical in effect to a single formula-calculated % chance to win and health loss, since it all occurs in one unit of combat. Just eliminating the rounds method of combat would solve this, using one unified combat result formula instead :)

Variable damage is something more commonly used in real-time combat to provide the randomness you get from a percentage formula in turn-based combat. The thing here is the inherent "rounds" method of calculating odds, which results in the odd jumps.
 
Thalassicus said:
Variable damage in a turn-based game is actually identical in effect to a single formula-calculated % chance to win and health loss, since it all occurs in one unit of combat. Just eliminating the rounds method of combat would solve this, using one unified combat result formula instead :)

Variable damage is something more commonly used in real-time combat to provide the randomness you get from a percentage formula in turn-based combat. The thing here is the inherent "rounds" method of calculating odds, which results in the odd jumps.

Civ 3 also worked with rounds of combat, but there were no odd jumps in the chances of victory. It really has to do with the effect described earlier in this thread. 5 hits of 20 damage each kill a unit, but if you only do 19.999 damage per round then 6 hits are required (units have 100 hitpoints). So a unit of strength 3 has a much better chance to beat a unit of strength 3 then a unit of strength 2.999 would have.
If the damage was not determined to be exactly 20 but vary a little, then a unit of strength 3 fighting another unit of strength 3 might need 6 hits to defeat it (or only 4 hits), while the unit of strength 2.999 might be able to defeat the unit in 5 hits. This will eliminate the jump points. The graph in post 92 shows an example of variable damage per combat round.

Another game where this occured was Starcraft: Marines did 6 points of damage in this game, needing 6 hits to kill the 35 hitpoints zergling. If the marines upgraded their weapons to do 7 hitpoints of damage then only 5 hits were needed. If the zerglings however upgraded their natural armor, then the marines would only do 5 hitpoints of damage, needing 7 hits to kill the zergling. In this matchup of realtime units, this was not a bad thing. In civ4 it is because very small differences in strength can have large differences in combat effectiveness.
 
Roland Johansen said:
Another game where this occured was Starcraft: Marines did 6 points of damage in this game, needing 6 hits to kill the 35 hitpoints zergling. If the marines upgraded their weapons to do 7 hitpoints of damage then only 5 hits were needed. If the zerglings however upgraded their natural armor, then the marines would only do 5 hitpoints of damage, needing 7 hits to kill the zergling. In this matchup of realtime units, this was not a bad thing. In civ4 it is because very small differences in strength can have large differences in combat effectiveness.
That is an excellent point, I had forgotten about that. It's a good example of jump points being worked into the design of a game :) Warcraft III avoided them with slightly variable damage on all units and a wider range of health values.

Still, when all combat is resolved in one sequence, it seems that having a formula calculate the result would have the same effect as multiple rounds of combat, since it's all invisible at the user end, and would require less processing time.
 
You're right, the rounds of combat don't necessarily have to be shown to the player. However, some gamers (like me) like to know how exactly the combat formula works, so for them the combat log is very interesting. The reason that the civ combat model uses rounds of combat is to lower the randomness of combat. It is not totally unthinkable that a longbowman will win a round of combat against a modern armor, but it will not win enough rounds to win the battle (in general). However, it will sometimes damage the modern armor, which means that a scientific edge in civ4 doesn't mean automatic victory in all and every combat. You cannot steamroll an opponent if you're one technology ahead of them. Maybe this can also be achieved with other combat models that lower the variance in outcomes, but this system works pretty well. The only 'problem' are the jump points in victory chances and that can be modified by doing variable amounts of damage.

By the way, calculating a combat result costs a negligible amount of time. It's the animations that take a fixed amount of time to be shown to the player.
 
If I have a Flanking II & Drill IV unit fighting an equal Drill IV unit, will my 'immune to first strikes' from Flanking II first take away the opponents first strikes and then add mine, or will it compare the first strikes, conclude that we have the same amount, give no first strikes to either and then remove the opponents first strikes (by immunity)?

In short: Is immunity to first strikes taken in before or after the comparison of first strikes?
 
Roland Johansen said:
[...]

By the way, calculating a combat result costs a negligible amount of time. It's the animations that take a fixed amount of time to be shown to the player.
The situation I was thinking about is between human turns, when the AI's make their moves. Not sure how much of an advantage consolidating combat into one formula result would be, but it would still be more efficient nonetheless. The winner, health remaining, and XP gained in combat all could likely be calculated by an iterative formula rather than the recursive/iterative rounds-of-combat formula. There's really no way of knowing without seeing what the actual code looks like :)
 
Atanvarno said:
In short: Is immunity to first strikes taken in before or after the comparison of first strikes?
Given the interpretation of first strikes as "rounds of immunity," I believe you'd get your first strikes.

This is because there is never any actual "comparison of first strikes." There are only rounds where neither unit can be damaged. But if you're immune to first strikes, the enemy can be damaged after all. And you still can't because of your first strikes that are still working.
 
Thalassicus said:
The situation I was thinking about is between human turns, when the AI's make their moves. Not sure how much of an advantage consolidating combat into one formula result would be, but it would still be more efficient nonetheless. The winner, health remaining, and XP gained in combat all could likely be calculated by an iterative formula rather than the recursive/iterative rounds-of-combat formula. There's really no way of knowing without seeing what the actual code looks like :)
During AI turns, most of the processing power is sucked up by the AIs themselves.
 
Top Bottom