View Full Version : The Mechanics of Combat


vexing
Jul 21, 2011, 12:46 AM
Combat
How attacking and defending work

Introductionhttp://forums.civfanatics.com/attachment.php?attachmentid=301318&stc=1&d=1315497475
Highly promoted spearman attacking highly penalized tank

"writing an anti-war book is like writing an anti-glacier book" - Kurt Vonnegut, Jr.
"knowing is half the battle" - G.I. Joe

Given the inevitability of war in Civilization, it is prudent to be aware of the mechanics of combat. Whether engaged in an extensive entrenchment or a basic barbarian battle, primal fight or flight instincts need not be relied upon for guidance; expected and worse case scenarios can be determined prior to any combat.


Definitions
Basics of Combat
Combat Information Table
Damage Formula
Modifiers
Ranged Combat
Naval Combat
Death
Rules of Thumb


Definitions

CS - Combat Strength - The fully modified strength of units after all modifiers have been considered.
Modifiers - Percentages that are added to a unit's base strength to produce combat strength, such as terrain or promotions.
Melee - Unit vs unit combat that results in damage to both parties.


Basics of Combat

Melee combat occurs when a non ranged unit attacks any non civilian enemy unit. The units do an amount of damage to each other based upon their relative combat strengths. Both units engaged in the combat gain experience which can be used to earn promotions (http://forums.civfanatics.com/showthread.php?t=436373). At the end of combat, if a unit's hit points are reduced to 0 that unit is destroyed, though in melee combat one unit always survives (see Death). If the defender is destroyed, the attacker moves to occupy the defender's hex.

Attacking typically expels all movement points for a unit. Some units, such as mounted, have the ability to move after attacking, and the blitz and logistics promotions also confer this ability. In this case, attacking expends as many movement points as moving into that hex would have were it unoccupied, for example attacking across a river expels all movement points just as moving across does.

In determining the results of combat, the combat strength itself does not matter, just how it compares to the opponent: a 4 cs versus 8 cs battle will end the same as a 40 cs versus 80 cs battle. At even combat strength a melee unit will do 4-7 damage to an opponent, spread evenly across those values to average 5.5 damage. The damage dealt increases at a rate related to the combat strength ratios. A battle where the ratio is 1:2 will result in approximately 3 damage to the stronger party and 9.8 damage to the weaker. To find the final combat strength for the battle, each unit's base strength is modified by promotions, terrain and flanking. When a unit is damaged, the damage it deals is reduced by approximately 10% for each two whole points of damage the unit has suffered: odd amounts of damage do not reduce damage output.


Combat Information Tablehttp://forums.civfanatics.com/attachment.php?attachmentid=296079&d=1311230158
The combat information table

http://forums.civfanatics.com/attachment.php?attachmentid=296080&d=1311230158
False numbers from a nonadjacent tile


The combat information table gives an estimated prediction of the results of a battle, based on the current positions of the combatants. Note that if the units are not adjacent these numbers can change for actual combat (as pictured). It is comprised of these parts:

Approximate Damage
This is the mean damage rounded to the nearest integer. Note that when it says 7, the real expected mean damage could be anywhere from 6.5 to 7.5, and the actual damage done can be from about 2/3rds this number (4 damage) to about 4/3rds (10 damage); the greater the possible damage the greater the spread.
Strength
The combat strength with all modifiers applied. A 25 base strength unit with a single +20% modifier results in a listed 30 combat strength.
Modifiers
A list of all the modifiers being applied to the unit's base strength, with positive modifiers in green and negative in red.
Health Bar
A visual representation of the unit's current health and how much the expected damage will be.



Damage Formula

The game engine determines the result of combat as follows:

Calculates the ratio of the two combat strengths
Uses that ratio to create a modified ratio that is lessened at ratios close to 1:1 and strengthened at ratios beyond 3:1
Modifies the defined minimum damage (4 for melee) and spread (again 4 for melee) based on the modified ratio and other modifiers, such as a damaged unit loses 10% per 2 damage
Rolls a dice from 0 to the modified spread amount and adds that to the minimum damage
Rounds that result down to the nearest whole number to get the actual damage dealt, with a minimum of one damage always dealt.


Precisely, the formula is as follows:

r = max combatant's CS / min combatant's CS
m = 0.5 + ( r+3 )^4 / 512
min damage to weaker party = base min damage * m
damage spread to weaker party = base spread * m
min damage to stronger party = base min damage / m
damage spread to stronger party = base spread / m
mean damage = min damage + spread / 2 - 0.5
max damage = floor( min + spread )
actual damage = max( floor( min damage + random( 0, spread ) ), 1 )

The damage can have the following modifiers applied:

Damaged Unit: 1 - floor( damage / 2 ) / 10 (a 10% reduction per two points of damage)
City: 0.5

As an example let us consider a 30 vs 22.5 CS melee battle with both units at full hp

r = 30/22.5 = 4/3
m = 0.5 + ( 4/3 + 3 )^4 / 512 = 1.19
damage to the 22.5 cs unit:
min: 4.75, mean: 6.63, max: 9, spread: 4: 5.2%, 5-8: 21.0% each, 9: 10.7%
damage to the 30 cs unit:
min 3.37, mean 4.55, max: 6, spread: 3: 18.9%, 4-5: 29.7% each, 6: 21.7%

The displayed expected results will be 7 damage (6.63 rounded) and 5 damage (4.55 rounded)
If the 22.5 CS unit was attacking a 30 strength city, the damage it deals remains the same, but the min damage the 30 CS city will deal the unit changes from 4.75 to 2.38, the mean from 6.63 to 3.07.

http://forums.civfanatics.com/attachment.php?attachmentid=296078&d=1311230158
Min, Mean and Max damage results from melee at full health.


Modifiers
http://forums.civfanatics.com/attachment.php?attachmentid=296146&stc=1&d=1311309248
An attacking crossbowman upgraded to rifleman falsely listing +65% open terrain ranged bonus.
Note the listed modified strength is unaffected and still the appropriate 25

The following modifiers can be applied:

Rough Terrain: +25% - applied to the defender if they are in a forest, jungle or hills tile. Some units (such as mounted) have a no defensive bonuses promotion which prevents this bonus.
Marsh/Fallout: -15% - applied to the defender if they are in a tile with these features.
Open Terrain: -10% - applied to the defender in all other terrain.
Attacking Over River: -20% - applied to the attacker when a river is immediately between the combatants.
Amphibious Attack: -50% - applied to a melee attacker if attacking from water.
Flanking Bonus: +10% (multiple) - a +10% bonus per friendly unit adjacent to the enemy.
Fortification: +25% first turn / +50% every turn after - applied to units who begin their turn by fortifying. Some units (such as mounted) have a no defensive bonuses promotion which makes them unable to fortify and gain this bonus.
Strategic Resource Penalty: -50% - a penalty applied to all units requiring a specific strategic resource when using more of that resource than available.
Very Unhappy Penalty: -33% - a penalty when happiness is at -10 or lower.
Promotions: Miscellaneous - most bonuses and penalties are encoded as promotions, which vary in strength and conditions in which they are applied.


These modifiers are all added together then applied to the base strength of a unit, for example a very unhappy (-33%) unit in rough terrain (+25%) will only be at -8% when defending. Promotions are the main source of modifiers. There is no cap on how much strength can be gained via modifiers, however there is a maximum penalty of -90%. Note that a ranged strength bonus will have no impact if the unit is upgraded to a melee unit, although the promotions may be listed. For example, a crossbowman upgraded to a rifleman with open terrain ranged bonus will have the +65% bonus listed if the defender is in open terrain, however it does not alter their strength.


Ranged Combat

Units with a ranged combat strength such as archers and catapults engage in ranged combat when attacking. They can attack units in nonadjacent tiles, and do not take damage as a result of the combat. These units have two separate strength listings: Strength and Ranged Attack. Strength is the base strength at which they will defend against melee attacks, and is generally around 2/3rds of ranged strength for normal ranged units and 1/2 for siege units. Ranged attack strength is the strength at which they attack at. As with normal melee combat units, attacking with a ranged unit expels all its movement points unless it has the logistics promotion or the ability to move after attacking, in which case attacking expends one movement point.

The damage a ranged attack does is slightly less than 2/3rds of what an equivalent strength melee combatant would do. The combat formula uses the same modified ratio as above, but the base minimum damage that gets modified is 2 instead of 4, though the base spread remains 4. At even combat strength a ranged attack will do 2-5 damage to an opponent, spread evenly across those values to average 3.5 damage.

Land based ranged vs ranged combat follows a modified set of rules for determining damage. The defender uses its ranged strength instead of normal strength, regular combat promotions like drill or barrage do not help (although they are incorrectly listed in the combat information table), and the defender gains a 1.25x strength multiplier which is applied after all other modifiers are applied. For example, an archer with the cover promotion (+25% strength vs ranged attacks) in rough terrain (+25%) defending against another archer will be fighting at a ratio of 1.875:1, a result of the total 1.50x combat strength from modifiers gaining the 1.25x ranged defense multiplier. The effective result of this is it's generally inefficient to attack ranged units with ranged attacks, including city bombardment, while melee units should tear through through a ranged defender's lower base strength easily.

http://forums.civfanatics.com/attachment.php?attachmentid=301606&stc=1&d=1315799408
Two upgraded destroyers in battle; the attacker's 22 ranged strength * 1.6 modifiers
outguns the defender's 35 base strength * 1.6 modifiers * 0.4 naval defense penalty

Naval Combat

Naval military units with the exception of the carrier all engage in ranged combat. They typically have a ranged strength equal to 2/3rds their base strength. In addition to being able to engage in ranged combat, all naval military units can kill an embarked unit outright by moving onto its tile. While doing this does not expel all movement points as a normal ranged attack would, it does count as an attack for the round.

Although naval units engage in ranged attacks, they do not follow the same ranged vs ranged rules: they use their normal combat strength when defending. For naval vs naval combat there is a 0.4x defense strength multiplier penalty, applied after all modifiers. Gaining targeting 3 promotion (+60% strength vs naval units) provides only an additional 24% defense (60% * 0.4). The effective result of this attacking naval units with other naval units results in significantly more damage than an equivalent strength ranged unit.


Death

When two low hit point melee units engage in combat only one of them can die. The winner always survives with one hit point. In this situation the total damage is calculated as normal, and if the attacker ends up with what would be more hit points than the defender, the attacker survives. If the combat would result in an equal amount of hit points, the defender will survive, which tips the scales in favor of the defender. In combat between two equal strength units both at 2 hit points, the attacker will die about 2/3rds of the time.

The same rules are not applied when capturing cities; if a city is brought to 0 hp, the unit is guaranteed to survive and capture the city. This can result in low hp units successfully capturing low hp cities without dying in many situations, and a city at 1 hp is guaranteed to fall to any attack.

With a high enough combat ratio, units become unkillable via melee (though any ranged attack will kill them). A defender with about 3.6x the strength of an attacker (such as infantry vs pikeman) will always do at least 10 damage and and take at most 1, resulting in the defender always surviving.


Rules of Thumb

Given that plugging the combat formula into a calculator whenever engaged in combat may be a bit much, the following general rules can be learned and relied upon

The real result can range from about 2/3rds to 4/3rds what the combat information table predicts.
A predicted 6 damage can result in from 4 to 9 damage.
A predicted 1 damage can result in at most 2 damage.
A predicted 10 damage can potentially result in 6 minimum.
Units gain damage at odd amounts of health; a 9 hp unit fights as though it were full strength.
The guaranteed kill ratio is at about 2.7x strength; the unit will do 10 damage and generally take at most two.
Attack melee units with ranged, and ranged units with melee.
Attack and destroy naval units with naval units; do not receive counterattacks from naval units.
If both combatants are predicted to die, the attacker must end up with more hit points to survive.



Patch version of this article: 1.0.1.383

evahaut
Sep 23, 2011, 12:10 AM
Thanks Vexing, very nice article! Would you happen to know how defensive buildings are taken into account of a city's combat strength?

KiffeLesBiffles
Sep 23, 2011, 05:03 AM
Damaged Unit: ceil( current hp / full hp * 5 ) / 5 (a 10% reduction per two points of damage)

Is it not more like 20% per 2 point of damage ? if you have 8 hp: ceil(8/10*5)/5 = 80%

vexing
Sep 23, 2011, 10:59 AM
Thanks Vexing, very nice article! Would you happen to know how defensive buildings are taken into account of a city's combat strength?

they are indeed; a city's combat strength is just the number it has displayed. that number is calculated by
6 base strength
1 strength per 4 pop
an exponentially increasing number based on number of techs (that goes up to 48 for all techs)
1/5th of a garrison's strength,
all raw + defense building mods,
and a 15% modifier for being on a hill

Is it not more like 20% per 2 point of damage ? if you have 8 hp: ceil(8/10*5)/5 = 80%

woops, the words were right, i adjusted the formula.

DaveMcW
Sep 23, 2011, 11:20 AM
The same rules are applied when capturing cities, which can result in low hp units successfully capturing low hp cities without dying in many situations. A city's inherent 50% penalty makes this easier than regular killing; a 1 hp unit will capture an equal strength 1 hp city more than half the time, while it'd die attacking a unit about two thirds of the time.

After max bombarding a city, it's an auto-win for any melee unit. Is that because it has 0 hit points?

vexing
Sep 23, 2011, 12:21 PM
have you verified that? i'd be surprised to see a scout taking a 40 str city. i didn't actually test taking cities, it might have different rules than unit killing.

MadDjinn
Sep 23, 2011, 01:53 PM
have you verified that? i'd be surprised to see a scout taking a 40 str city. i didn't actually test taking cities, it might have different rules than unit killing.

it is true. (I do it often)

once a city is down to 1 HP it can be taken by any unit, no matter it's health.

Damage is still done to the unit, but the unit will never die.

This is unlike a unit at 1 HP that might roll a lucky win and stay at 1 HP. The city always falls, even with 100 CS vs. a 1 HP scout.

vexing
Sep 23, 2011, 03:05 PM
once a city is down to 1 HP it can be taken by any unit, no matter it's health.

i know that is untrue, i've had a mega capital at above 120 strength kill multiple aa guns (32 strength) that were at or near full health. i don't know if 0 hp is special cased.

KiffeLesBiffles
Sep 23, 2011, 03:45 PM
it is true. (I do it often)

once a city is down to 1 HP it can be taken by any unit, no matter it's health.

Damage is still done to the unit, but the unit will never die.

This is unlike a unit at 1 HP that might roll a lucky win and stay at 1 HP. The city always falls, even with 100 CS vs. a 1 HP scout.

It is true

vexing
Sep 23, 2011, 07:27 PM
okay, my bad - i tested and cities do indeed fall to any attack when at 1 hp. i've adjusted that part of the "death" section appropriately.

Nefliqus
Sep 25, 2011, 02:21 AM
http://forum.civilization.org.pl/img/Nefliqus_phpk3EPYx_aproxDMG.jpg

NOVAL invert mirror map script - Civ5 multiplayer map script. (http://forums.civfanatics.com/showthread.php?p=11057733#post11057733)

Augustus Bob
Oct 03, 2011, 06:11 PM
What about air combat? I dont quite understand how it works. Unless im mistaken, doesnt the jet fighter receive damage attacking swordsmen? What is the pilot doing exactly? How could an archer's reach be longer than a bomber's that it doesnt get damaged? The damage predicted by the computer is a logical zero, but i guess my airplanes shoot their own...

vexing
Oct 03, 2011, 09:37 PM
i'm not sure how air combat works either. it will probably get a full article, with the basic numbers added here as well.

here's what i think so far:
the attack works as ranged does (ie floor(2 + rand(0,4)) at equal strength)
the combat window lies about the damage you're take; it lists the ranged 0 expected, but in fact you always receive damage. this damage is half of normal melee damage (ie floor(2 + rand(0,2)) at equal strength).

interception causes your unit to take additional damage from the interceptor. this damage is floor(4 + rand(0,3) at equal strength. this means an AA gun (64 str) will tend to hurt your bombers (50 str) pretty badly. the damage from each seems to be calculated separately and added together, so even fighting a 1 str aa gun and scout would cause 2 dmg.
when intercepted the damage you deal to your target is reduced, but i can't tell you by how much yet.

i also don't know how evasion works. the in game tool tip says reduces the damage taken from interception by 50%, but that doesn't seem to be what it really does.

doing an air sweep causes your fighter to just fight whatever interceptor to eat the up the interception, while taking only 75% of normal damage.

Augustus Bob
Oct 04, 2011, 05:00 AM
Well im happy to see im not the only one to get baffled. Lets just say ive decided airplanes were a waste except to bomb a city before getting in. I much prefer artillery, where at least i know where i stand in terms of damage. Thanks anyway

thectexperience
Oct 20, 2011, 06:51 PM
Well im happy to see im not the only one to get baffled. Lets just say ive decided airplanes were a waste except to bomb a city before getting in. I much prefer artillery, where at least i know where i stand in terms of damage. Thanks anyway

Except when the AI builds 20 fighters. Then you'll have to watch your units die v. slowly, & you'll wish you set quick combat on

Thanks for the article Vexing. Cleared up my query about bushido too

bweenie
Dec 05, 2011, 11:57 AM
The same rules are not applied when capturing cities; if a city is brought to 0 hp, the unit is guaranteed to survive and capture the city. This can result in low hp units successfully capturing low hp cities without dying in many situations, and a city at 1 hp is guaranteed to fall to any attack.


How many hit points does a city have?

vexing
Dec 05, 2011, 03:46 PM
How many hit points does a city have?

they start at 25 hit points.
unfortunately the combat window does not tell the current hit points for cities, but you can see when they're at one hit point left if the little red bar flashes to empty when a unit expecting to do one damage is poised to attack.

volanchik
Dec 30, 2011, 05:20 AM
I was trying to calculate example with 2 destroyers.

DESTROYER
Combat: 35 melee, 22 ranged

Attack strength: 22 * 1.6 (via Targeting III) = 35.2
Defence strength: 35 * 1.6 (via Targeting III) * 0.4 (via naval defense penalty) = 22.4

Damage:
r = 35.2/22.4 = 1.57
m = 0.5 + (1.57 + 3) ^ 4 / 512 = 1.35
min damage to weaker party = 4 * m = 4 * 1.35 = 5.4
min damage to stronger party = 4 / m = NA (no back damage - ranged attack)
mean damage = min damage * 3 / 2 - 0.5 = 7.6
max damage = floor( min * 2 ) = 10

Why on the screen approx damage inflicted is 5? Why not 7 or 8?
What did I miss in formulas?

Wargizmo
Dec 30, 2011, 08:37 AM
Does anyone know why my ranged units sometimes have melee range, it doesn't seem to be related to whether there's a unit in the way, sometimes I can shoot over rivers sometimes not, I thought it was when hills were in the way but it's happened without there even being a hill there. It just seems like randomly every now and then I can't actually shoot anything with my archers/crossbowmen.

DaveMcW
Dec 30, 2011, 09:40 AM
You can always bombard over flatland.
You can bombard over hills or forest if you are on a hill.
You can never bombard over forested hills or mountains.

You can bombard over anything if you have Indirect Fire and a unit spotting for you.

MadDjinn
Dec 30, 2011, 12:46 PM
You can always bombard over flatland.
You can bombard over hills or forest if you are on a hill.
You can never bombard over forested hills or mountains.

You can bombard over anything if you have Indirect Fire and a unit spotting for you.

this is true. But there is a bug with the ranged targeting system. Sometimes (mainly when you have the range promotion) the hexes available for bombarding are not the right ones. I've seen open terrain/river block me from shooting at a unit 3 tiles away. I've also seen the ability to shoot past hills (rare) even when standing on flat terrain.

clif9710
Jan 01, 2012, 01:32 PM
I'm confused by promotions for terrain.

Am I right that if you are attacking, it is the terrain the enemy unit is on that applies and if you are defending it is the terrain of your tile that applies?

So if I have a promotion that gives me +20% on open terrain, it will apply if I am attacking a unit that sits on open terrain, regardless of the terrain of my tile?

And it will not apply if I am being attacked and am not sitting on an open terrain tile, even if the attacker is?

MadDjinn
Jan 01, 2012, 10:23 PM
I'm confused by promotions for terrain.

Am I right that if you are attacking, it is the terrain the enemy unit is on that applies and if you are defending it is the terrain of your tile that applies?

So if I have a promotion that gives me +20% on open terrain, it will apply if I am attacking a unit that sits on open terrain, regardless of the terrain of my tile?

And it will not apply if I am being attacked and am not sitting on an open terrain tile, even if the attacker is?

yes. Though sitting in rough terrain gives you a defensive bonus anyways, so it's usually the safer place to be (until you get open terrain 2 or 3).

volanchik
Jan 02, 2012, 06:46 AM
Using formulas from above I tried to imagine a fight between a Caravel and a submarine. Caravels attack sub. How many of them do we need to sink a submarine?

CARAVEL
Combat: 15 melee, 7 ranged

SUBMARINE
Combat: 25 melee, 60 ranged

Our caravel is highly promoted (targeting III, Logistic)

Attack strength: 7 * 1.6 (via Targeting III) = 11.2
Defence strength: 25 * 0.4 (via naval defense penalty) = 10.0

Damage:
r = 11.2/10.0 = 1.12
m = 0.5 + (1.12 + 3) ^ 4 / 512 = 1.0628
min damage to weaker party = 4 * m = 4 * 1.0628 = 4.3
min damage to stronger party = 4 / m = NA (no back damage - ranged attack)
mean damage = min damage * 3 / 2 - 0.5 = 5.9
max damage = floor( min * 2 ) = 8.0

Can 1 caravel with targeting III and logistic promotions sink a normal submarine with 1 turn?

Start of Renaissance Era (Astronomy) can beat end of Industrial era (Refrigeration)?

(Presuming I have a destroyer /or air recon that can see a sub)/

vexing
Jan 02, 2012, 11:18 AM
Why on the screen approx damage inflicted is 5? Why not 7 or 8?
What did I miss in formulas?

for ranged attacks
The combat formula uses the same modified ratio as above, but the base minimum damage that gets modified is 2 instead of 4, though the base spread remains 4.

the formula listed applies only to melee as it is. it also uses some shortcuts as base min damage and base spread are the same for melee and are both 4
precisely the formula in general is
min = base min damage for domain * or / modified ratio
spread = base spread for domain * or / modified ratio
mean damage = min + spread / 2 - 0.5
max damage = floor( min + spread )

for the destroyer vs destroyer example, this cuts the min damage in half (from 5.4 to 2.7), makes the mean 4.9, and max 8

funkyj
Jan 02, 2012, 05:25 PM
Precisely, the formula works out as follows for melee combat:

r = max combatant's CS / min combatant's CS
m = 0.5 + ( r+3 )^4 / 512
min damage to weaker party = 4 * m
min damage to stronger party = 4 / m
mean damage = min damage * 3 / 2 - 0.5
max damage = floor( min * 2 )
actual damage = max( floor( min damage + random( 0, min damage ) ), 1 )


The above reads a bit confusingly. I think it would read better if you defined:

damage variation = max damage - min damage

actual damage = max( floor ( min damage + random (0, damage variation))), 1)

This formula is true even if max damage were not min * 2.

---

Great article, thanks!

vexing
Jan 02, 2012, 07:22 PM
The above reads a bit confusingly...

as you quoted, the formula was correct for melee combat - that's all it claimed.

i've modified it to a general form, though i'm not convinced it's any clearer this way. comprehensive reading is required either way =d

volanchik
Jan 03, 2012, 12:38 AM
for ranged attacks

max damage = floor( min + spread )

for the destroyer vs destroyer example, this cuts the min damage in half (from 5.4 to 2.7), makes the mean 4.9, and max 8

floor(2.7 + 4) = 6. Why 8?

May I take this as basis:
r = max combatant's CS / min combatant's CS
m = 0.5 + ( r+3 )^4 / 512

Melee to melee:
min damage to weaker party = 4 * m
min damage to stronger party = 4 / m
mean damage = min damage * 3 / 2 - 0.5
max damage = floor( min * 2 )

Range to melee:
min = 2 * m
mean damage = min + 4 / 2 - 0.5
max damage = floor( min + 4)

I just want to enter all formulas in excel to have a some sort of base information about possible damage for needed units.

(range to range have the same formula for damage, but difference in strength calculation (1.25x strength multiplier))

vexing
Jan 03, 2012, 02:10 AM
the base spread of 4 has the modified ratio applied, just like min damage, so it ends up being 5.4 for that example. 2.7 + 5.4 = 8.1, floored is 8. since it's barely above 8, the max of 8 damage will happen rarely, precisely 0.1 / 5.4 percent of the time, or slightly less than 2% of the time.

i've attached a zipped simple spreadsheet with the formulas for melee and ranged plugged in; it should just require entering the two unit strengths as they'll be for combat.

volanchik
Jan 03, 2012, 03:14 AM
i've attached a zipped simple spreadsheet with the formulas for melee and ranged plugged in; it should just require entering the two unit strengths as they'll be for combat.

No formulas, just values.
Opening with Excel.

vexing
Jan 03, 2012, 07:44 PM
No formulas, just values.
Opening with Excel.

sorry, i didn't realize excel couldn't translate ods formulas by default (which seems ridiculous).
i changed the upload to a converted .xls

volanchik
Jan 03, 2012, 11:46 PM
sorry, i didn't realize excel couldn't translate ods formulas by default (which seems ridiculous).
i changed the upload to a converted .xls

Thanks!

But it seems that "Ranged to Weaker" means how much damage will do weaker ranged (naval or land unit) to a stronger target. And "Ranged to Stronger" means damage will be done unit with higher strength to a unit with lower strength.

For e.g. Destroyer vs Destroyer: 35.2/22.4. Attack stronger then defence so damage will be from "Ranged to Stronger" min 2.7, spread 5.4, max 8.0, mean 4.9
But when frigate (no promotions) attack destroyer (targeting III): 15 / 22.4, damage will be from "Ranged to Weaker" min 1.5, spread 3.1, max 4.0, mean 2.6.
Am I right? Or all the time I should use "Ranged to Stronger"?? That in case frigate vs destroyer (targ III) give min 2.6, spread 5.2, max 7.0, mean 4.7

vexing
Jan 04, 2012, 02:50 AM
if the offense strength is greater than the defense strength, the larger values apply.
your listed values seem correct.

JJansen
Jan 24, 2012, 10:56 PM
Great article, though the formulae remain a bit... vexing. (They could be clarified perhaps by centering each part in-line in the article and giving a short description on what each portion means, building toward the final damage formula.)

What my wife and I really liked was the title graphic, decisive spearman vs tank victory, truly inspired illustration, sir.

aj_killer
Apr 26, 2012, 12:24 PM
@vexing

I Think in the excel file you have uploaded, you have interchanged "ranged to weaker" and "ranged to stronger" heads, or am I wrong or missing something?

vexing
Apr 27, 2012, 01:39 AM
@vexing

I Think in the excel file you have uploaded, you have interchanged "ranged to weaker" and "ranged to stronger" heads, or am I wrong or missing something?

you're correct.
if offense > defense, the larger values apply

GamerKG
May 02, 2012, 11:42 AM
I was under the impression cities had 20 hp, not 25. Are you sure about this?

vexing
May 03, 2012, 06:14 PM
from the defines.xml
"MAX_CITY_HIT_POINTS","25"

GamerKG
May 04, 2012, 08:33 PM
Ah. I actually went back into the game and watched damage pile up. It looks like the half health point is 12 hp, so yeah.

Do you know how much it heals per turn? I've seen 2 hp, I've seen 3 hp, and I think I've even seen 4 hp.

vexing
May 05, 2012, 03:06 AM
i believe it's 2 base, and each defense structure provides +1 (including palace, so capital starts at 3)

weregamer
May 09, 2012, 02:03 PM
I've not seen more than 4, but perhaps I've not let any AIs get Arsenals built.

Xiabed
May 14, 2012, 05:38 AM
Thank you for this great article !

What about land ranged attacking naval and naval attacking land ranged ?
Does the "landed ranged vs ranged" rule applies in any case ?

vexing
May 14, 2012, 10:40 AM
Thank you for this great article !

What about land ranged attacking naval and naval attacking land ranged ?
Does the "landed ranged vs ranged" rule applies in any case ?

i haven't verified but i think land based ranged units will get their 25% defense vs ranged attacks bonus against all ranged attacks (including naval), and naval units will be at their base defense; the naval vs naval penalty 60% penalty will not apply.

weregamer
May 14, 2012, 03:27 PM
(Gah, not logged in for some reason and saw an old message as new.)

You also can never bombard civilian units or embarked military units except with a city or air strike, that's the thing I still sometimes forget - usually leading to the death of the unit that was supposed to be shooting, not attempting to capture.

vexing
May 14, 2012, 08:00 PM
You also can never bombard civilian units or embarked military units except with a city or air strike, that's the thing I still sometimes forget - usually leading to the death of the unit that was supposed to be shooting, not attempting to capture.

false.
rather than using the shortcut right mouse button attack (which defaults to move for ranged vs civilian), click the bombard button then click the civilian unit.

The Pilgrim
May 16, 2012, 07:22 PM
false.
rather than using the shortcut right mouse button attack (which defaults to move for ranged vs civilian), click the bombard button then click the civilian unit.
When you declare war by right mouse button clicking civilian unit the attack is ranged. I accidentally shoot CS workers all the time. :crazyeye:

Piousflea
Jul 26, 2012, 07:15 AM
Are there updated versions of the equations for G&K, and does anyone have an idea of how air combat works? The formulae seem to be very different from either normal ranged or normal melee combat.