Resource icon

[vanilla] The Mechanics of Combat (vanilla)

vexing

knows
Joined
Dec 24, 2010
Messages
2,668
vexing submitted a new resource:

The Mechanics of Combat - The Mechanics of Combat

Combat
How attacking and defending work

Introduction

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...

Read more about this resource...
 
Last edited by a moderator:
Thanks Vexing, very nice article! Would you happen to know how defensive buildings are taken into account of a city's combat strength?
 
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%
 
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.
 
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?
 
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.
 
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.
 
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.
 
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
 
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.
 
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...
 
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.
 
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
 
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
 
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?
 
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.
 
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?
 
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.
 
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.
 
Top Bottom