Flower
Nov 11, 2005, 03:52 PM
Hi, I've read on this site the combat system section for Civilization IV but I'd like to know for example what are the odds for me to win a combat where I am a Warrior and fighting an archer. Also, where's the option that you can turn on to know these odds.
Arkalius
Nov 11, 2005, 04:16 PM
The formula for determining the chance unit A will win in a fight with unit B is very complicated and involves loops and binomial coefficients. It's not something you could do in your head and probably not really do on a calculator with any real quickness.
Basically, each unit has a strength value. This strength value is modfiied based on promotions and other things for each unit involved in a fight. For example, a warrior may have combat 1 and combat 2 promotions, giving him +20% strength in all situations, which is 2 * 1.2 = 2.4
Then let's look at an archer, who has no upgrades but is on a hill. Archers have a +25% bonus on hills, plus you get +25% for defending while on a hill, that's a total of +50%, so 3 * 1.5 = 4.5
So you have a 2.4 warrior against a 4.5 archer. You can see these modified strength values if you select a unit of yours and hold alt while hovering over an enemy unit. The strength values come up in the bottom left corner. When combat begins, it is fought in rounds. The odds that unit A will win a particular round against unit B is A / (A + B) where A and B are the modified strength values of the individual units. So, the chance that the warrior will win a round against the archer is 2.4 / ( 2.4 + 4.5 ) = .348 or 34.8%. The unit that wins the round does damage to the other unit. Each unit has 100 hit points to start with. The amount of damage done on a successful hit is equal to 20 * (3A + B) / (3B + A ). So, should the warrior win a round, he'll do 14 HP of damage. If the archer wins a round he'll do 27 hp of damage. That means the warrior would have to hit the archer 7 times to kill it, and the archer only has to hit the warrior 4 times. The chances that the warrior will actually hit the archer 7 times before being hit 4 times himself are pretty slim, remember he only has a 35% or so chance to score a hit each time. Using a little program I developed to determine the odds, the warrior would have only a 2.5% chance of actually winning the whole fight. this of course ignores the fact that the archer has a first strike.
First strikes allow a unit to fight a combat round without any risk of taking damage. It works just like a normal combat round except if the first strike unit loses the round, it takes no damage. These happen before the regular combat rounds begin. If both units have first strikes, than mutual first strikes are ignored... like if a unit had 3 first strikes and another had 2, the first unit would get only 1 first strike round (and the second unit would have none). Some units are immune to first strikes as well, in which case they are ignored.
Note that when a unit is injured (ie has less than 100 hp), his strength is reduced. If that archer for example had only 72hp, his base strength would only be 3 * (72/100) = 2.2 (rounded), and this is the strength that would show on his unit card when selected (it would say 2.2/3). This strength value is what will then get the modifiers. Remember he had +50%, so that means he would have 2.2 * 1.5 = 3.3 instead of the 4.5 above. Also, since he's already hurt, any unit attacking him won't have to do the full 100hp damage to defeat him. This is why units that are hurt are even more vulnerable than their reduced strength would suggest. A unit at full health with strength 4 is more likely to win when fighting a unit at half health with strength 4 out of 8.
screwtype
Nov 11, 2005, 04:26 PM
Hi, I've read on this site the combat system section for Civilization IV but I'd like to know for example what are the odds for me to win a combat where I am a Warrior and fighting an archer. Also, where's the option that you can turn on to know these odds.
You don't have to determine the odds. They are displayed for you.
All you need to do if you want to know the odds of winning a combat is right click on the unit you are thinking of attacking and keep holding the mouse button down. The odds, along with all the modifiers, are then displayed for you.
Don't let go of the mouse button while still holding the mouse over the enemy unit or you will attack the unit! Just move the mouse somewhere else before releasing the button.
Arkalius
Nov 11, 2005, 04:31 PM
You don't have to determine the odds. They are displayed for you.
All you need to do if you want to know the odds of winning a combat is right click on the unit you are thinking of attacking and keep holding the mouse button down. The odds, along with all the modifiers, are then displayed for you.
Don't let go of the mouse button while still holding the mouse over the enemy unit or you will attack the unit! Just move the mouse somewhere else before releasing the button.
People call these combat odds but they are really not quite that... they are the modified strength values of the units that will fight. Keep in mind that a unit that has half the strength of another unit has less than a 1% chance of winning a fight.