Defense number observations

I moved this over from Chaosti's Insane/Insane thread because it's too off-topic.  Burress asked a good question, and I've done some delving, and the results are interesting/baffling...

Quoting Burress, reply 8

Nick-Danger, how in the world does the AI get an army with 1000+ defense? I don't remember the damage formula exactly, but it doesn't seem like they could be damaged by any weapons.
Short answer -- no idea.

Longer, incomplete answer:

AI units have different stats in strategic view vs. when in tactical maps (above pics from tactical).

Here's 3 of the pictured units (from Choasit's thread) from strategic view (again, from my current insane/insane game):
Direfield Spearmen and Tradesteel riders (exact same):

Ironskin Warlords:

Note the Direfield Spearmen have a base 591 defense in strat map (tradesteel riders too), where their tactical defense in my previous post is 596 and 997.

The numbers differ from strategic view to tactical view.  For a particular Spikes of Krax, strategic defense:

\

Same unit in a tactical battle:

So, tactical has a 'defending' bonus, but there's more too.  One would think the difference between the defense values would be 282.5 (25 x 11.3) but 566 - 259  = 307 so somewhere there's another 307 - 282.5 = 24.5 bonus in tactical from some unmentioned source (am I missing something obvious here?).

-------------

Anyhoo, these units can be killed without much difficulty, so I don't know how/what the high defense is doing.  I don't remember the specific damage done to the 900+ defense units, but generally my ranged mage units seem to take all AI units down ~60-100 damage a shot (assuming no fire/ice resistance), with not much difference seen between the 200 defense and 900 defense units.  Four of these units is my main means to kill these enemy armies:

...with 4 of these melee units to form a 'wall' should that be necessary:

...and my Sov just casts heal/slow and the occasional haste.

Spearmaidens don't do much damage to the high defense AI units, maybe 10-20, occasionally a bit more.

Better melee units, such as the two below, can do 40-90+ to moderate defense (~500 defense) AI units:

--------------

I decided to replay some old battles to see how much damage I did on high defense units.  As noted above, defense changes from strategic to tactical.  Here's a Spikes of Krax in strategic:

Same unit, at the start of tactical battle:

Defending bonus of +25 plus some unnamed bonus accounted for the increased defense.

Same unit, after my mages did 92, 63, and 58 damage:

Krax blood bonus of +8 somehow kicked in -- but not until after the third attack.

Same unit after a fourth attack did 77 damage:

Defending bonus lost -- the unit moved.

Regarding damage done to this unit by ranged fire/ice mage attacks (see above for stats), in this and several other battles:

vs defense 566: 92, 63, 58, 68, 81, 62, 63

vs defense 655: 77, 63, 59, 79

vs defense 357: 83

Possible small decrease in damage dealt at higher defense.

damage done vs other units of various defense:

vs defense 37: 86

vs defense 99: 83

vs defense 136: 97

Sample size is too small to draw all but anecdotal conclusions.  The high defense seems to help a bit more vs melee units than the above ranged fire/ice mage attacks, but no numbers from testing so far so it's just me guessing.

85,583 views 16 replies
Reply #1 Top

   The damage formula is (Attack*Attack)/(Attack+Defense) for the max damage and min damage is (Max Damage)/2 so if it hits it will do potentially a hefty amount of damage.  This formula is heavily weighted towards damage over defense.  I would say to add melee damage resistance scaled from light resistance for leather to heavy for plate like Heavenfall did with his different armor types.  This would help offset the damage for melee versus high armor units.  Magic damage is supposed to be the answer to high defense units to which the defense to magic units is supposed to be resistance items.

+1 Loading…
Reply #2 Top

Sample size is too small to draw all but anecdotal conclusions. The high defense seems to help a bit more vs melee units than the above ranged fire/ice mage attacks, but no numbers from testing so far so it's just me guessing.

Fire, Ice, and Lightning damage, and I think also Poison damage, is supposed to completely bypass normal defense, and should only be affected by the appropriate resistances.

Thus, while the mundane components of an attack delivers up to PierceAttack*PierceAttack/(PierceAttack + Defense) damage to the target, the magical component deals up to (FireAttack*(100 - FireResistance) + ColdAttack*(100 - ColdResistance) + LightningAttack*(100 - LightningResistance))/100 damage to the target of an attack. Normal defense is supposed to be completely useless against any form of magic damage, and since the basic magic resistance items are either 25 or 50 resistance to an element there isn't really much room for resistance bonuses there (certainly not the +1130% bonus that defense gets, though a flat bonus of 25 resistance could be appropriate). Actual damage from an attack is then supposed to be within the range (0.5*maximum_damage, maximum_damage), and the tooltip that pops up when targeting an enemy unit will show these minimum and maximum numbers (remember that damage is per-figure, and each figure provides a separate attack roll which can hit or miss, so a three-figure unit will actually deal 0, min-max, min-max + min-max2, or min-max + min-max1 + min-max2 with each attack, where min-max, min-max1, and min-max2 are random numbers between the maximum possible attack damage and one half of that). The defense rating used for the damage computation is the defense rating of an individual figure (so if you have plate on your units, you would have defense = 32 in the damage calculation, not the defense rating multiplied by the figure count or something like that).

If the attack damage range for a unit with a purely magic attack decreases when the target's defense increases, this would to my understanding be a bug.

+1 Loading…
Reply #3 Top

I see now, the AI gets defense multiplied by about 12 as part of the difficulty bonus. But since attack is squared, high values will still score damage. It makes sense now. Thanks!

Reply #4 Top

don't think the AI gets a bonus to defense. that's the repeatable +10% defense technology at the end of the magic techtree. apparently they researched that tech about 113 times. 

pure melee weapons don't deal any real damage vs. this amount of defense. majority of the damage you do is elemental damage, since that ignores armor. don't know the design of Nick Dangers units, but i guess they are either buffed with fire/frost amulets, magic weapons (boreal blade or something) or heart of fire (or all of those items).

btw. the damage formula calculates the individual attack values of the single figures, not the combined value of the whole unit.

a plain longsword, maul or greataxe company with no elemental damage boosts will do next to nothing vs. 500+ defense

a 20 non elemental attack weapon vs. 500 defense results in 0-1 damage 

formula for max damage is in this case

20 * (20 / (500+20)) 

doesn't really matter in this case if you have 1 guy with this weapon or a company of 6.

conclusion: when the Insane AI stacks defense (repeatable +defense% tech) , forget physical damage - use elemental damage

+1 Loading…
Reply #5 Top

Azunai_, I don't think that Nick-Danger's damage results from his melee units are consistent with individual attack values for single figures. For instance, Nick-Danger reported a 40-90 damage attack from a melee unit with a combined 190 on a defense unit of ~500. That is (190^2)/~(500+190) = 52. That is consistent with the attack of the total group counting, which was what I thought it was all along. 

The distinction makes a drastic difference in many circumstances, so it would be worthwhile to know which it is.

edit: Now I am confused. Maybe Nick-Danger researched the +weapon damage technology many, many times. I have never had a game go on that long, so I don't know what I am seeing. How does one get 190 attack on a unit?

Reply #6 Top

Quoting Burress, reply 3
I see now, the AI gets defense multiplied by about 12 as part of the difficulty bonus.

Where is this multiplier stored? I ask, because there is nothing in the CoreDifficultyLevels.xml, but that would explain it:

Quoting Azunai_, reply 4
don't think the AI gets a bonus to defense. that's the repeatable +10% defense technology at the end of the magic techtree. apparently they researched that tech about 113 times.

Reply #7 Top

First, thanks to all repliers who've explained this stuff  :)

Quoting Burress, reply 5
...edit: Now I am confused. Maybe Nick-Danger researched the +weapon damage technology many, many times. I have never had a game go on that long, so I don't know what I am seeing. How does one get 190 attack on a unit?
It's quite late here and I've had a few beers, so my apologies if I'm misunderstanding...

I haven't researched the +weapon damage repeatable tech.

If you're wondering about my "The Wall" unit with 192 attack as pictured above:

He's now lvl 8, thus the higher hit points.

Attack for this unit:

+4 Fire attack is from Heart of Fire city spell (4 essence fortress city). not sure what the +2 attack under doom maul is from.  No accessories add to attack/damage (amulet warding, braided belt, first aid kit, rations -- health/defense/regen).

Here's a second The Wall, 4 levels lower but higher attack:

Attack for this unit:

No idea why this unit has +5 attack under Doom maul when the other unit has +2 (told you I'm merely an average player at best!).  Both screenshots taken from strategic, out-of-battle, sitting in cities context (so no tactical/strategic spell effects).

If the above isn't what you're referring to, my apologies, and maybe after a nights sleep my comprehension will improve :)

EDIT: corrected the last screenshot as I had incorrectly copied the 192 attack unit screenshot instead of the 210 attack unit's as pointed out by joeball123.

 

Reply #8 Top

Quoting Nick-Danger, reply 7
not sure what the +2 attack under doom maul is from

I think there's a structure you can build in a Fortress that grants +2 attack to units trained there. As for why the second has a higher attack, did you at some point defeat a wildland boss whose reward included an attack modifier bonus for units trained in the city you place the trophy in?

 

The attack numbers for the unit "The Wall" give a damage range of roughly 20-40 damage per attack if everyone hits against a 300-defense target, or roughly 16-32 damage per attack against a 500-defense target, assuming no fire resistance is involved. If the damage calculation isn't using a per-figure attack rating for the computation, then the damage range is 42-84 against 300 defense or 33-66 against 500 defense. It should be fairly easy to test whether the damage computation is using the per-figure attack or the total unit attack at that difference in damage numbers.

Also, Nick, you posted the same attack breakdown for both units. Could you correct the second one?

Reply #9 Top

Quoting joeball123, reply 8
I think there's a structure you can build in a Fortress that grants +2 attack to units trained there. As for why the second has a higher attack, did you at some point defeat a wildland boss whose reward included an attack modifier bonus for units trained in the city you place the trophy in?
You're correct, I have a weaponsmith in my fortress, giving +2 to attack.  For the +5 in my later The Wall units, no idea.  No wildlands in this game, and checking my fortress:

The +2 physical attack bonus shows, but nothing to add +3 more.  I looked thru all building in the city screen, nothing seemed to add +3.  The latest The Wall units do have +5 so must be something recent.

The attack numbers for the unit "The Wall" give a damage range of roughly 20-40 damage per attack if everyone hits against a 300-defense target, or roughly 16-32 damage per attack against a 500-defense target, assuming no fire resistance is involved. If the damage calculation isn't using a per-figure attack rating for the computation, then the damage range is 42-84 against 300 defense or 33-66 against 500 defense. It should be fairly easy to test whether the damage computation is using the per-figure attack or the total unit attack at that difference in damage numbers.
Some hard numbers.  Format is [attacking unit attack value per figure x # figures in that unit] vs [target defense]; [# swarm added in if applicable, otherwise not mentioned]:

34x6 vs 263: -38; -35; -42 [+1 swarm] {so 6 figures of 34 attack each; verses defense 263; first two attacks no swarm bonus, third attack had 1 extra unit adding swarm}

34x4 vs 219: -25

34x6 vs 468: -9

34x4 vs 468: -6 [+1 swarm]; -3 [+3 swarm]; -2 [+3 swarm];

32*x6 vs 468: -9 [+2 swarm]; -13 [+3]; -7 [+3]; -4 [+3]; -9 [+3]; -3 [+3]; -1 [+3]; -2 [+3]

{* -- some units were 34x6 at start of tac battle but after an attack changed to 32x6 -- not sure why attack decreased from 34 to 32}

32x6 vs 343: -30; -34 [+1 swarm]; -13 [+2]; -18 [+2]; -20 [+2]; -30 [+1]; -3 [+1]; -4 [+1]; -5 [+1]; -22  [+1]; -43;

32x1 vs 343: -4 [+2 swarm]

32x6 vs 0: -227; -278; -292; -327

32x5 vs 166: -44; -49; -48

32x5 vs 267: -45; -41

Looks like I over-estimated the damage done against high defense units, my apologies for that.

Also, Nick, you posted the same attack breakdown for both units. Could you correct the second one?

Told you it was late and I had a few beers  lol

 

Reply #10 Top

Quoting Nick-Danger, reply 9
{* -- some units were 34x6 at start of tac battle but after an attack changed to 32x6 -- not sure why attack decreased from 34 to 32}

There is a trait, Charge, which grants additional attack and movement at the beginning of the battle. If your units have it, that could explain it.

Quoting Nick-Danger, reply 9
32x6 vs 0: -227; -278; -292; -327

Looks like the damage range is greater than I thought (or at least has a higher maximum than I thought) - even with a Swarm bonus granting +8 attack you should only see up to 240 damage from how I thought the damage computation worked, regardless of which way the attack values are handled.

Edit: were your troops fighting opposite-alignment units? I just noticed that the Fortress gave your troops Enmity and that could help boost the damage number up to what you were getting.

Reply #11 Top

1130% unit defense bonus player ability? That's a lot of Refined Defense research!

Reply #12 Top

Quoting joeball123, reply 10


Quoting Nick-Danger, reply 9{* -- some units were 34x6 at start of tac battle but after an attack changed to 32x6 -- not sure why attack decreased from 34 to 32}

There is a trait, Charge, which grants additional attack and movement at the beginning of the battle. If your units have it, that could explain it.
I don't use Charge, so that's not it.


Quoting Nick-Danger, reply 932x6 vs 0: -227; -278; -292; -327

Looks like the damage range is greater than I thought (or at least has a higher maximum than I thought) - even with a Swarm bonus granting +8 attack you should only see up to 240 damage from how I thought the damage computation worked, regardless of which way the attack values are handled.

Edit: were your troops fighting opposite-alignment units? I just noticed that the Fortress gave your troops Enmity and that could help boost the damage number up to what you were getting.
Aye, I'm Kingdom (the sole Kingdom in the game) and all AI are Empires.

And no swarm bonus for those attacks.

davrovana: 1130% unit defense bonus player ability? That's a lot of Refined Defense research!
Plus the Insane modifier?

 

Reply #13 Top

menh, just spam Blizzard and you don't have to care what the stats of the AI units are.

 

This is the problem with trying to find a 'booster' on higher levels.  +defense means nothing when you have access to very easy access weapons/etc that blatently ignore it.

Reply #14 Top

My question is does the ai not realize you are using elemental damage and trying to protect itself from that ? I mean at some point, stop researching refined defense...

Reply #15 Top

Quoting joeball123, reply 10


Quoting Nick-Danger, reply 9{* -- some units were 34x6 at start of tac battle but after an attack changed to 32x6 -- not sure why attack decreased from 34 to 32}

There is a trait, Charge, which grants additional attack and movement at the beginning of the battle. If your units have it, that could explain it.


Quoting Nick-Danger, reply 932x6 vs 0: -227; -278; -292; -327

Looks like the damage range is greater than I thought (or at least has a higher maximum than I thought) - even with a Swarm bonus granting +8 attack you should only see up to 240 damage from how I thought the damage computation worked, regardless of which way the attack values are handled.

Edit: were your troops fighting opposite-alignment units? I just noticed that the Fortress gave your troops Enmity and that could help boost the damage number up to what you were getting.

his troops have doom hammers, they come with a 10% damage boost vs. the attacked unit on subsequent attacks. i think that explains the slow progression above the expected values. never really figured out how that boost works, but it seems to be a debuff that makes the target take more damage or something along that line

BTW: you don't really need super high numbers to proof the formulas. very low early gaem numbers work just fine to find out whether the formula works with combined values or a multiple of the individual calculation

just attack some darklings with your starting militia for example.

milita has 6 attack *3, darkling has 5 defense  (while he's defending, i.e. wehn he hasn't attacked yet)

with a combined value formula, the caclulation would be something like

18 x 18 / (18+5); result would be about 7-14 damage 

with the individual numbers, the calculation is

3 x ( 6x6 / (6+5) ); the result is about 3 x 1.6 - 3.2, which is consistent with the numbers shown in game (tooltip shows 1-3 x 3)

 

feel free to point out flaws in my example, but i think that's a very simple and easily reproducible experiment.

 

 

Reply #16 Top

Quoting Azunai_, reply 15
BTW: you don't really need super high numbers to proof the formulas. very low early gaem numbers work just fine to find out whether the formula works with combined values or a multiple of the individual calculation

I agree, it's just that with the numbers he had it should be relatively easy, since the entire damage range using the combined attack for the damage computation was completely outside of the damage range calculated using individual attacks. If you were sure you'd accounted for everything, and you saw damage either on the very low end (less than one-third the minimum damage for the combined attack rating) or very high (more than the maximum damage for the individual attack rating) you'd immediately know which formula it was using. Unfortunately, I don't know enough about how Doom Hammers work to really work them into a damage range computation, and the damage computation is something that I don't really care enough about to thoroughly test at the moment to figure out which way it works.

Plus, there are a bunch of traits you can pick up that you don't really know how they work (e.g., Enmity says it grants +25% attack against opposite-alignment units, but this only works on the mundane component of your attack, and I couldn't say if it works for custom factions using races which were supposed to be of the other alignment, such as a Mancer-blood Empire, nor do I know if the mundane attack bonus from traits like Muscle or Finesse can come into play for units using Incineration Staves, though since they don't get displayed in the attack breakdown I don't think they contribute, but it's something I'd have to test to actually know what happens).