How to figure out damage

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Mahuyo.3079

Mahuyo.3079

Okay, now i’m having trouble figuring out the equation for damage, I know the equation but the numbers just don’t seem right with what i’m getting. I guess the real question is how to factor in the % increase damage from traits, sigils, and runes. Then factor in the crit scaling.

Damage done = (weapon strength) * Power * (skill coefficient)/(target’s armor)

For crits

Average damage = (base damage) * (1 + (crit chance) * ((crit damage) – 1)

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Khristophoros.7194

Khristophoros.7194

Depends if the % increases are multiplicative or additive. I don’t know which it is.

Let’s say you have 5% from the sigil and 10% from a trait.

Additive:
damage * (1 + 0.05 + 0.1) = damage * 1.15

Multiplicative:
damage * 1.05 * 1.1 = damage * 1.155

Again, I don’t know which it is. I always assumed additive but never tested it.

How to figure out damage

in Guild Wars 2 Discussion

Posted by: That Guy.5704

That Guy.5704

Depends if the % increases are multiplicative or additive. I don’t know which it is.

Let’s say you have 5% from the sigil and 10% from a trait.

Additive:
damage * (1 + 0.05 + 0.1) = damage * 1.15

Multiplicative:
damage * 1.05 * 1.1 = damage * 1.155

Again, I don’t know which it is. I always assumed additive but never tested it.

it is multiplicative so Sigil of force and a trait that gives +10% is (damage * 1.05 * 1.1) = damage * 1.155

Now, what I dont know is how traits that say “damage is increased per something” is factored. Does mesmer compounding power give 9%(1.031.03+1.03)for 3 or does it give 1.03*1.03*1.03

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Khristophoros.7194

Khristophoros.7194

Depends if the % increases are multiplicative or additive. I don’t know which it is.

Let’s say you have 5% from the sigil and 10% from a trait.

Additive:
damage * (1 + 0.05 + 0.1) = damage * 1.15

Multiplicative:
damage * 1.05 * 1.1 = damage * 1.155

Again, I don’t know which it is. I always assumed additive but never tested it.

it is multiplicative so Sigil of force and a trait that gives +10% is (damage * 1.05 * 1.1) = damage * 1.155

Now, what I dont know is how traits that say “damage is increased per something” is factored. Does mesmer compounding power give 9%(1.031.03+1.03)for 3 or does it give 1.03*1.03*1.03

You’d have to test it.

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Khisanth.2948

Khisanth.2948

Too bad the steady weapons are no longer in game.

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Lord Kuru.3685

Lord Kuru.3685

As far as I know, all bonuses from “damage is increased” is calculated from your base damage. So additive.

Edit: seems this was wrong. See my post below.

(edited by Lord Kuru.3685)

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Wanze.8410

Wanze.8410

Hmmmm, I just swing my sword and do damage.
Then I swing my sword again and do more damage.

Tin Foil [HATS]-Hardcore BLTC-PvP Guild
Bloin – Running around, tagging Keeps, getting whack on Scoobie Snacks.

How to figure out damage

in Guild Wars 2 Discussion

Posted by: That Guy.5704

That Guy.5704

As far as I know, all bonuses from “damage is increased” is calculated from your base damage. So additive.

https://wiki.guildwars2.com/wiki/Damage_calculation#Damage_calculation

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Khristophoros.7194

Khristophoros.7194

As far as I know, all bonuses from “damage is increased” is calculated from your base damage. So additive.

Did you test it?

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Khristophoros.7194

Khristophoros.7194

As far as I know, all bonuses from “damage is increased” is calculated from your base damage. So additive.

https://wiki.guildwars2.com/wiki/Damage_calculation#Damage_calculation

The wiki is often incorrect.

Not sure if that page is incorrect but it’s always best to test for yourself rather than blindly trusting the wiki.

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Lord Kuru.3685

Lord Kuru.3685

As far as I know, all bonuses from “damage is increased” is calculated from your base damage. So additive.

https://wiki.guildwars2.com/wiki/Damage_calculation#Damage_calculation

The wiki is often incorrect.

Not sure if that page is incorrect but it’s always best to test for yourself rather than blindly trusting the wiki.

Ok.. so i did some testing:

Mesmer, critical damage 187%, traited with phantasms at 3% damage each. No other traits that give damage, no might, or any other modifiers.

I used spatial surge. It has the feature that all three hits in a single attack will always hit for the same base damage.

I spawned three phantasmal defenders, attacked with one attack of spatial surge, and shattered with distortion while attacking.

After many tries, I got one set of damage that worked out perfectly (shatter at the right time, critical hit at the right time). It looked like this:

critical hit for 254
regular hit for 125
regular hit for 125

It looks like I shattered between hits #1 and #2 because:

  • If i had shattered before all three hits, the crit should have been 125*1.87=233.75. It doesn’t fit with the data.
  • So I either shattered at the very end, or I shattered between hits #1 and #2.
  • In either of the above two cases the critical hit of 254 is base damage modified by all damage modifiers: 187% crit damage and 3% from each of 3 phantasms.
    In the additive model, that would mean base damage is: 254/1.96 = 129.59 … in the multiplicative model that means a base damage of 124.30
  • If I had shattered after all three hits had already completed, then the two non critical hits would have had to be modified from base damage. In the multiplicative model, that would have been 135.83, and in the additive model that would have been 135.49. But the non-critical hits were 125 so that doesn’t fit with the data.
  • So I shattered between hits #1 and #2. Which means hit #1 got all damage modifers while hit #2 got none. So we conclude at this point that base damage was exactly 125.

Given the base damage of 125 and the fact that hit #1 had full damage modifers: in the multiplicative model, damage from hit #1 would have been: 255.42 and in the additive model, it would have been: 245.

Since hit #1 was 255, it looks like the multiplicative model is correct.

Condition duration is additive though

How to figure out damage

in Guild Wars 2 Discussion

Posted by: That Guy.5704

That Guy.5704

As far as I know, all bonuses from “damage is increased” is calculated from your base damage. So additive.

https://wiki.guildwars2.com/wiki/Damage_calculation#Damage_calculation

The wiki is often incorrect.

Not sure if that page is incorrect but it’s always best to test for yourself rather than blindly trusting the wiki.

I dont blindly trust the wiki but your also shouldnt not trust it just because its the wiki. On the other hand, i do more trust the extensive maths that DnT put into their optomized builds and they use a multiplcative damage multiplier.

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Khristophoros.7194

Khristophoros.7194

As far as I know, all bonuses from “damage is increased” is calculated from your base damage. So additive.

https://wiki.guildwars2.com/wiki/Damage_calculation#Damage_calculation

The wiki is often incorrect.

Not sure if that page is incorrect but it’s always best to test for yourself rather than blindly trusting the wiki.

Ok.. so i did some testing:

Mesmer, critical damage 187%, traited with phantasms at 3% damage each. No other traits that give damage, no might, or any other modifiers.

I used spatial surge. It has the feature that all three hits in a single attack will always hit for the same base damage.

I spawned three phantasmal defenders, attacked with one attack of spatial surge, and shattered with distortion while attacking.

After many tries, I got one set of damage that worked out perfectly (shatter at the right time, critical hit at the right time). It looked like this:

critical hit for 254
regular hit for 125
regular hit for 125

It looks like I shattered between hits #1 and #2 because:

  • If i had shattered before all three hits, the crit should have been 125*1.87=233.75. It doesn’t fit with the data.
  • So I either shattered at the very end, or I shattered between hits #1 and #2.
  • In either of the above two cases the critical hit of 254 is base damage modified by all damage modifiers: 187% crit damage and 3% from each of 3 phantasms.
    In the additive model, that would mean base damage is: 254/1.96 = 129.59 … in the multiplicative model that means a base damage of 124.30
  • If I had shattered after all three hits had already completed, then the two non critical hits would have had to be modified from base damage. In the multiplicative model, that would have been 135.83, and in the additive model that would have been 135.49. But the non-critical hits were 125 so that doesn’t fit with the data.
  • So I shattered between hits #1 and #2. Which means hit #1 got all damage modifers while hit #2 got none. So we conclude at this point that base damage was exactly 125.

Given the base damage of 125 and the fact that hit #1 had full damage modifers: in the multiplicative model, damage from hit #1 would have been: 255.42 and in the additive model, it would have been: 245.

Since hit #1 was 255, it looks like the multiplicative model is correct.

Condition duration is additive though

Unfortunately, the only thing you tested is whether crits are additive or multiplicative with % damage modifiers. I don’t think that was ever in question. What is less clear is whether multiple different % modifiers are multiplicative together or not.

Also, you didn’t figure out if the trait is multiplicative with itself or not, which was a question somebody in the thread asked. If it’s multiplicative with itself your crit would be 255.42493625 and if it’s additive with itself it would be 254.7875. They both round to 255 so we don’t know. You’d have to test with higher base damage to find out if that trait is multiplicative or additive with itself.

edit: My bad, you got 254 damage. That means that the game truncates rather than rounding, so the trait is additive with itself. This doesn’t prove that multiple different sources of % damage are additive with each other though.

(edited by Khristophoros.7194)

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Lord Kuru.3685

Lord Kuru.3685

Unfortunately, the only thing you tested is whether crits are additive or multiplicative with % damage modifiers. I don’t think that was ever in question. What is less clear is whether multiple different % modifiers are multiplicative together or not.

Also, you didn’t figure out if the trait is multiplicative with itself or not, which was a question somebody in the thread asked. If it’s multiplicative with itself your crit would be 255.42493625 and if it’s additive with itself it would be 254.7875. They both round to 255 so we don’t know. You’d have to test with higher base damage to find out if that trait is multiplicative or additive with itself.

edit: My bad, you got 254 damage. That means that the game truncates rather than rounding, so the trait is additive with itself. This doesn’t prove that multiple different sources of % damage are additive with each other though.

Yeah… numbers are too small for using this method to test +3% traits. By the way, I think the 187% crit damage they list in the hero panel is not an exact number so that probably explains the 254 vs 255.

I’d be better to test with a +20% trait and a +10% trait with lots of hits, then do some statistical analysis, but I’ll leave that to someone else.

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Khristophoros.7194

Khristophoros.7194

Unfortunately, the only thing you tested is whether crits are additive or multiplicative with % damage modifiers. I don’t think that was ever in question. What is less clear is whether multiple different % modifiers are multiplicative together or not.

Also, you didn’t figure out if the trait is multiplicative with itself or not, which was a question somebody in the thread asked. If it’s multiplicative with itself your crit would be 255.42493625 and if it’s additive with itself it would be 254.7875. They both round to 255 so we don’t know. You’d have to test with higher base damage to find out if that trait is multiplicative or additive with itself.

edit: My bad, you got 254 damage. That means that the game truncates rather than rounding, so the trait is additive with itself. This doesn’t prove that multiple different sources of % damage are additive with each other though.

Yeah… numbers are too small for using this method to test +3% traits. By the way, I think the 187% crit damage they list in the hero panel is not an exact number so that probably explains the 254 vs 255.

I’d be better to test with a +20% trait and a +10% trait with lots of hits, then do some statistical analysis, but I’ll leave that to someone else.

The 254 crit is more likely explained by the display number being truncated from 254.7875 to 254. It’s pretty common because it takes less work than rounding. You have a data value of 254.7875 and you want to display a whole number. The easiest way to do that is convert it to a string “254.7875” and then just cut off the ‘.’ character and any characters that come after it. So you end up with a string which is “254” and you display it. Alternatively you convert it to an integer data type first, then to a string. It may still truncate rather than round depending on the compiler. I am not sure which is standard but I suspect trancating is. Make sense?

However, to be sure you could test without any ferocity so your crit damage would be exactly 50%.

Also, I found a way to test with non-random “weapon damage”. You just don’t equip any weapons and use utility skills. The damage is the same every time so you should be able to test with that.

(edited by Khristophoros.7194)

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Lord Kuru.3685

Lord Kuru.3685

The 254 crit is more likely explained by the display number being truncated from 254.7875 to 254. It’s pretty common because it takes less work than rounding. You have a data value of 254.7875 and you want to display a whole number. The easiest way to do that is convert it to a string “254.7875” and then just cut off the ‘.’ character and any characters that come after it. So you end up with a string which is “254” and you display it. Alternatively you convert it to an integer data type first, then to a string. It may still truncate rather than round depending on the compiler. I am not sure which is standard but I suspect trancating is. Make sense?

They’re probably storing the numbers as floats or doubles so it’s arguably easier to just round or truncate to an int using the appropriate function (“round” or “floor” in C) then display that int.

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Khristophoros.7194

Khristophoros.7194

The 254 crit is more likely explained by the display number being truncated from 254.7875 to 254. It’s pretty common because it takes less work than rounding. You have a data value of 254.7875 and you want to display a whole number. The easiest way to do that is convert it to a string “254.7875” and then just cut off the ‘.’ character and any characters that come after it. So you end up with a string which is “254” and you display it. Alternatively you convert it to an integer data type first, then to a string. It may still truncate rather than round depending on the compiler. I am not sure which is standard but I suspect trancating is. Make sense?

They’re probably storing the numbers as floats or doubles so it’s arguably easier to just round or truncate to an int using the appropriate function (“round” or “floor” in C) then display that int.

Using a function to round it is an extra step that has no purpose. You need to convert it to a string in order to display it either way.

Basically here are the possibilities.

1. Your display function only takes strings. So you convert it directly to a string and cut off the decimals.

2. Your display function can take ints or strings. You convert it to an int, which automatically truncates it and then plug the int into the function.

3. Your display function can take floats, but it doesn’t truncate or round automatically. You do not want to display the decimals to the player so you actually convert it to a string and truncate it.

There’s no reason to use the rounding function because it would give you a float with .0000000… on the end which after converted to a string would still have the decimal point and zeroes, and you’d have to truncate the string anyway. So rounding is an extra computation that has no purpose unless for some reason rounding the displayed number is extremely important.

The actual damage dealt is not rounded or truncated. Only the displayed number is truncated.

(edited by Khristophoros.7194)

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Khristophoros.7194

Khristophoros.7194

So anyway I found another neat way to test. It seems that AoE skills always deal the same damage to all targets. I tested a few 600 radius necromancer skills against the light test dummies. Always the same damage to both.

Also, it seems that multiple % bonuses are multiplicative. I tested on my necro with Spiteful Talisman (5% more damage to enemies without boons), Unholy Fervor (10% more damage with axe skills to vulnerable enemies), and 1 stack of vulnerability on one of the light dummies applied by Signet of Spite (tooltip is wrong, it only applies 1 stack).

I used Unholy Feast to hit both dummies and I got 830 damage on the one without vulnerability and 923 damage on the one with vulnerability. Neither was a crit.

830 × 1.1 × 1.01 = 922.13 so I’m assuming the original 830 was truncated from a slightly higher value.

Both dummies take bonus damage from Spiteful Talisman so we know that the damage is already subject to a 5% increase before calculating the 10% from the axe trait. If these traits were additive the resulting damage would have been (830/1.05) x 1.15 × 1.01 = 918 which isn’t what I got.

Only problem is I haven’t confirmed that Spiteful Talisman actually works. XD

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Mahuyo.3079

Mahuyo.3079

Okay, well this is my problem, I main an burst Ele, with FGs at 10k + (maxed i think is about 23k), with the crit chance should be 1 because of the sigil of intelligence, and the main traits that give me % are Pyromancer’s Training gives 10%, Buring Rage 10%(we are assuming buring, not like they are not going to be), Aquamancer’s Training (assuming we are over 90% health), then Bountiful Boons 2% * (Number of Boons (assuming 11)), then Runes I get 7% because of Flame Legion, and Sigil of Force 5%.
now that i look at it though i think i forgot one of the % but i’ll post the work that i did, this is assuming you are hitting the Heavy Golem in PvP, oo I adding full might to take that out of the equation:

Damage done/Might = (1030) * 3456 * (2.8) / (2597)
3837.9299191375

Damage Increase = (0.07 + 0.05 + 0.10 + (0.10) + (11 * 0.02)) * Damage done
Damage Increase = (0.07 + 0.05 + 0.10 + 0.10 + 0.22) * Damage done
Damage Increase = (0.12 + 0.20 + 0.22) * Damage done
Damage Increase = (0.12 + 0.42) * Damage done
Damage Increase = (0.54) * Damage done
with might 5910.4120754717

Average damage = 9802.481668579 * ( 1 + 1.00 * ( 2.14 – 1 ) )
Average damage = 9802.481668579 * ( 1 + 1.00 * 1.14)
Average damage = 9802.481668579 * 1.14
11174.82910218

I would appreciate someone checking the math, and thank you for the help if any other Qs about what i’m running the link should help:

http://gw2skills.net/editor/?vFAQJAoYnMIClMgtMA+MA8RgBBAjeCbhqQEAKAPg6N0E/kA-TxRBAB6pHwS1fuZ/hLOBAYp8bRlgA8AAAA-e

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Lord Kuru.3685

Lord Kuru.3685

Actually, now that I think about it, if you use wall of reflection on Lupi’s AOE in phase 2 and hit aegis in the middle (with the +20% damage when you have aegis trait), you can see an increase in damage that can’t be accounted for if damage modifiers were additive:

If you have two +10% damages from sigil and consumable, +7% from burning foes, +10% vs foes in symbols, then the +20% from aegis should give only 13% bigger numbers than without aegis in the additive model.

In the multiplicative model, you’d see 20% bigger numbers.

We’re talking really big numbers here (20000 range), so it’s easy to see the difference: I actually was wondering about it recently but couldn’t explain the numbers since I assumed damage was on the additive model.

How to figure out damage

in Guild Wars 2 Discussion

Posted by: Lord Kuru.3685

Lord Kuru.3685

The 254 crit is more likely explained by the display number being truncated from 254.7875 to 254. It’s pretty common because it takes less work than rounding. You have a data value of 254.7875 and you want to display a whole number. The easiest way to do that is convert it to a string “254.7875” and then just cut off the ‘.’ character and any characters that come after it. So you end up with a string which is “254” and you display it. Alternatively you convert it to an integer data type first, then to a string. It may still truncate rather than round depending on the compiler. I am not sure which is standard but I suspect trancating is. Make sense?

They’re probably storing the numbers as floats or doubles so it’s arguably easier to just round or truncate to an int using the appropriate function (“round” or “floor” in C) then display that int.

Using a function to round it is an extra step that has no purpose. You need to convert it to a string in order to display it either way.

Basically here are the possibilities.

1. Your display function only takes strings. So you convert it directly to a string and cut off the decimals.

2. Your display function can take ints or strings. You convert it to an int, which automatically truncates it and then plug the int into the function.

3. Your display function can take floats, but it doesn’t truncate or round automatically. You do not want to display the decimals to the player so you actually convert it to a string and truncate it.

There’s no reason to use the rounding function because it would give you a float with .0000000… on the end which after converted to a string would still have the decimal point and zeroes, and you’d have to truncate the string anyway. So rounding is an extra computation that has no purpose unless for some reason rounding the displayed number is extremely important.

The actual damage dealt is not rounded or truncated. Only the displayed number is truncated.

You might be right… then again in C if you printf up to a given number of decimal digits (using “%0f” for zero decimal digits), the result is automatically rounded.