User:Praise/Regular Damage Generation

From Guild Wars Wiki
Jump to navigationJump to search

Remember, martial weapon damage for players is calculated with the following formula:


User Praise General weapon dmg formula.png


Where:

  • BaseDmg is the base weapon damage value, either the max dmg value (in case of certain critical hits) or the outcome of a random roll between the weapon's specified min & max dmg
  • ½AttackerLvl is rounded down to an integer
  • CritBonus is either 20 or 5 if calculating a critical hit, and is 0 otherwise
  • PvEBonus is 20 for players while wielding a Decade weapon during Festivals and 0 for players otherwise; is 0 for certain NPCs, and is 20 for certain other NPCs (see my NPC damage page)
  • TargetArmor is the target's final rounded armor after all the armor calculation (see my armor penetration notes to make sure you get it right)
  • The exponential part (2^x) is usually referred to as the strike level

Regular Damage[edit]

Counts of regular hits for 7-17 daggers @12 mastery wielded by a lvl20 player vs. a 60 armor target.

When generating regular damage (i.e. non-critical hit), Guild Wars rolls a random number within the specified weapon dmg range.

Let's take max dmg daggers as an example. The daggers' dmg range is stated by the game as 7-17.
However, in fact GW doesn't roll between 7-17. It rolls between 7.00-17.00 (or even more decimals: I haven't tested that yet).
>What's the difference???

The difference emerges from the statistical distribution of regular hits. If GW would roll random integers between 7-17, each value would be equally likely to hit. But that's not what is observed. See the observations for dagger hits in the 1st chart, Dagger hits @12 Mastery, for example. The min and max of the dmg range are hit half as many times as the ones in between, because their range before rounding is 7.00-7.49 and 16.50-17.00.

The same applies when different parameters are used. For example, a 15-22 sword with 18 points in mastery. The real regular dmg range given by the formula is 18.467-27.085, which if the dmg range would be rounded to 18-27, you would expect 1/10th of the hits to be 18. On the other hand, taking decimals into account leaves only a very small range of 18.467-18.499 which will be rounded down to 18.

Counts of regular hits for a 15-22 sword @18 mastery wielded by a lvl20 player vs. a 60 armor target.

And indeed, this is what is observed (see the 2nd chart, Sword hits @18 Mastery): only 0.38% out of 7383 hits is registered as 18 dmg.

I have collected many datasets of player dmg with varying parameters, and the unrounded dmg range given by the formula is always seen in the min & max dmg count proportions.

The fact that GW rolls in a range of non-integers is useful when analysing damage dealt by NPCs. They do not necessarily use the same formula as players, but they will most probably roll in their own dmg range with decimals included. From the ratio of observed counts of the min & max regular dmg, their real min & max dmg can be calculated and from that, their base dmg and/or their formula can be inferred.