Potential Melee DPS Bug

Started 13 Jan 2020
by jcambros
in Ask the Team
Hello,

I was running through some math on damage output while testing on the training dummies outside DL. In going through the data, I think I may have found a bug with melee DPS that costs pretty much any reasonably spec'd melee character about 10% damage from what they should be doing.

Damage Variance for melee should start at 25%-125% for an unspec'd line.
As the spec is increased, the min variance increases from 25% up to 75% when reaching the 2/3 of level point (34). For this first portion of specs increasing, max variance does not increase, and remains at 125%. Thus, at 34 Spec on a level 50, we should expect a variance of 75%-125% damage.
From 34 up to 50 Spec, both the Min and Max Variance are increased at the same rate, capping out at a variance of 100%-150% damage when spec reaches the Characters level.

This was stated by the devs in grab bags, and was confirmed by multiple theorycrafters in the past.

This brings me to my current test that I ran, attacking the test dummies outside DL with my VW from 1-50 (+12) Scythe spec.
(Im not sure how to better format a table here, so I apologize. Data is listed at the bottom of this thread. It should be easily reproduced.)

When I take the damage and calculate out what should be the Variance Normalized Damage, it looks correct up to 34 Spec.
2H Norm = Dmg / 2H Bns
Var Norm = 2H Norm / Avg Var

As you can see from the data below. When swinging my 3.5 Spd Scythe, ~57 damage is the "100% Variance" damage value, and ~75 is the "100% Variance" damage value for the 4.5 Spd Scythe.

Anyways, the point to get at is that when looking at the data from 34 Spec to 50 Spec, the "100% Variance" damage value drops at a steady rate (from 57 to 51 on the .5 Spd Scythe and from 75 down to 68 on the 4.5 Spd Scythe).

Considering that the simplest error is most likely, I wondered if the Phoenix Server was simply not increasing the Max Variance value from 125% up to 150% as Spec approaches the Character's Level (50).

When I rerun this math, it indeed works out that when clamping Max Variance to 125%, the 100% Variance value remains constant.

Thus, I get to the conclusion that there is a bug here holding down melee DPS by about 10%.
I believe that if this were working properly, I would expect to have seen the damage per swing at max be 100 / 132 instead of the 91 / 120 damage in the test.
Thus, the 10% damage missing.

TLDR
Variance should scale from 25%-125% at 1 Spec up to 100%-150% at 50+ Spec
Testing has shown that scaling is going from 25%-125% at 1 Spec up to 100%-125% at 50+ Spec
This is causing melee to miss out on about 10% damage for anyone who specs to at least 50 Composite for their baseline spec... which is just about everyone who melees.


Anyways, thank you for reading.


Spec	Spec+12	Dmg (3.5)	Dmg (4.5)	2H Bns	2H Norm (3.5)	2H Norm (4.5)	Min Var	Max Var	Avg Var	Var Norm (3.5)	Var Norm (4.5)	Min Var	Max Var	Avg Var	Var Norm (3.5)	Var Norm (4.5)
1 13 56 1.165 48 0
2 14 56 1.17 48 0
3 15 56 75 1.175 48 64
4 16 58 77 1.18 49 65
5 17 59 78 1.185 50 66
6 18 59 79 1.19 50 66 50% 125% 88% 57 76 50% 125% 88% 57 76
7 19 60 80 1.195 50 67 52% 125% 88% 57 76 52% 125% 88% 57 76
8 20 61 81 1.2 51 68 53% 125% 89% 57 76 53% 125% 89% 57 76
9 21 62 82 1.205 51 68 55% 125% 90% 57 76 55% 125% 90% 57 76
10 22 62 83 1.21 51 69 56% 125% 91% 57 76 56% 125% 91% 57 76
11 23 63 84 1.215 52 69 58% 125% 91% 57 76 58% 125% 91% 57 76
12 24 64 85 1.22 52 70 59% 125% 92% 57 76 59% 125% 92% 57 76
13 25 65 86 1.225 53 70 61% 125% 93% 57 76 61% 125% 93% 57 76
14 26 66 87 1.23 54 71 63% 125% 94% 57 75 63% 125% 94% 57 75
15 27 66 88 1.235 53 71 64% 125% 95% 57 75 64% 125% 95% 57 75
16 28 67 89 1.24 54 72 66% 125% 95% 57 75 66% 125% 95% 57 75
17 29 68 90 1.245 55 72 67% 125% 96% 57 75 67% 125% 96% 57 75
18 30 69 91 1.25 55 73 69% 125% 97% 57 75 69% 125% 97% 57 75
19 31 70 92 1.255 56 73 70% 125% 98% 57 75 70% 125% 98% 57 75
20 32 70 93 1.26 56 74 72% 125% 98% 56 75 72% 125% 98% 56 75
21 33 71 94 1.265 56 74 73% 125% 99% 57 75 73% 125% 99% 57 75
22 34 72 95 1.27 57 75 75% 125% 100% 57 75 75% 125% 100% 57 75
23 35 73 97 1.275 57 76 77% 127% 102% 56 75 77% 125% 101% 57 75
24 36 74 98 1.28 58 77 78% 128% 103% 56 74 78% 125% 102% 57 75
25 37 75 99 1.285 58 77 80% 130% 105% 56 74 80% 125% 102% 57 75
26 38 75 100 1.29 58 78 81% 131% 106% 55 73 81% 125% 103% 56 75
27 39 76 101 1.295 59 78 83% 133% 108% 54 72 83% 125% 104% 56 75
28 40 77 102 1.3 59 78 84% 134% 109% 54 72 84% 125% 105% 57 75
29 41 78 103 1.305 60 79 86% 136% 111% 54 71 86% 125% 105% 57 75
30 42 79 104 1.31 60 79 88% 138% 113% 54 71 88% 125% 106% 57 75
31 43 80 105 1.315 61 80 89% 139% 114% 53 70 89% 125% 107% 57 75
32 44 80 107 1.32 61 81 91% 141% 116% 52 70 91% 125% 108% 56 75
33 45 81 108 1.325 61 82 92% 142% 117% 52 70 92% 125% 109% 56 75
34 46 82 109 1.33 62 82 94% 144% 119% 52 69 94% 125% 109% 56 75
35 47 83 110 1.335 62 82 95% 145% 120% 52 68 95% 125% 110% 56 75
36 48 84 111 1.34 63 83 97% 147% 122% 51 68 97% 125% 111% 57 75
37 49 85 112 1.345 63 83 98% 148% 123% 51 67 98% 125% 112% 57 75
38 50 86 114 1.35 64 84 100% 150% 125% 51 68 100% 125% 113% 57 75
39 51 87 115 1.355 64 85
40 52 88 116 1.36 65 85
41 53 88 116 1.365 64 85
42 54 88 117 1.37 64 85
43 55 88 117 1.375 64 85
44 56 89 118 1.38 64 86
45 57 89 118 1.385 64 85
46 58 89 118 1.39 64 85
47 59 90 119 1.395 65 85
48 60 90 119 1.4 64 85
49 61 90 120 1.405 64 85
50 62 91 120 1.41 65 85
Mon 13 Jan 2020 3:57 PM by Ele
Without real of the formulas used on this server I think that is indeed how all dps are supposed to be calculated on this server. If I understood it correctly, that what occured on live server as the dmg variance got a fixed vaule of 50% of the possible variance here, which would pretty much fit your test row that shows 125% max dmg instead of the possibility to reach 150% dmg. I might have misunderstood the way this is calculated on this server though. Gruenesschaf gave great insight into various code aspects in the past, maybe we can get a reply with more in-depth knowledge from him?
Mon 13 Jan 2020 5:05 PM by gotwqqd
Ele wrote:
Mon 13 Jan 2020 3:57 PM
Without real of the formulas used on this server I think that is indeed how all dps are supposed to be calculated on this server. If I understood it correctly, that what occured on live server as the dmg variance got a fixed vaule of 50% of the possible variance here, which would pretty much fit your test row that shows 125% max dmg instead of the possibility to reach 150% dmg. I might have misunderstood the way this is calculated on this server though. Gruenesschaf gave great insight into various code aspects in the past, maybe we can get a reply with more in-depth knowledge from him?

This sound right
Working as intented
Mon 13 Jan 2020 5:49 PM by Azrael
Ele wrote:
Mon 13 Jan 2020 3:57 PM
Without real of the formulas used on this server I think that is indeed how all dps are supposed to be calculated on this server. If I understood it correctly, that what occured on live server as the dmg variance got a fixed vaule of 50% of the possible variance here, which would pretty much fit your test row that shows 125% max dmg instead of the possibility to reach 150% dmg. I might have misunderstood the way this is calculated on this server though. Gruenesschaf gave great insight into various code aspects in the past, maybe we can get a reply with more in-depth knowledge from him?

After you mentioned it it sounded familiar to me they lowered variance value cause variance itself was removed. I guess this is what we are looking for?

https://forum.playphoenix.online/viewtopic.php?f=38&t=3636&p=23269&hilit=25+150#p23277
Wed 15 Jan 2020 2:03 PM by gruenesschaf
Variance has nothing to do with spec.

The variance is quite literally a random(50) (representing 0 - 0.5) that is added to the spec based multiplier which is 0.75 + 0.5 * min(enemy level + 1, spec -1) / (enemy level + 1).

In case of player vs player at 50 that means composite spec up to 52 is used (enemy level + 1 would be 51, to have 51 be spec - 1 you need at least 52 spec). Any increase after reaching enemy level + 1 is due to the 2h spec bonus which is uncapped and affects the weapon dps and therefore also the damage cap.

Enough tests have been run on pend to confirm that this is indeed the behavior and that our formulas are within 5% of what is observed there (which usually means within 1 or 2 min/max damage):

In all cases the relevant pend char stats have been entered into our formula.

Avg is what you'd actually see (variance 25) here, min is with variance 0, max with variance 50. Observed min / max are the manually entered observed values from combat logs.

Example Hero slash lw vs druid

unbuffed, 1 + 15 spec

avg: 115.25, min: 91.14, max: 140.37
Observed minimum damage: 91, we got 100.15% of that, rounded 100.00%
Observed maximum damage: 140, we got 100.27% of that, rounded 100.00%

unbuffed, 50 + 15 spec
avg: 182.01, min: 152.89, max: 212.35
Observed minimum damage: 155, we got 98.64% of that, rounded 98.06%
Observed maximum damage: 213, we got 99.69% of that, rounded 99.53%

buffed, 50 + 15 spec
avg: 243.26, min: 204.34, max: 283.81
Observed minimum damage: 205, we got 99.68% of that, rounded 99.51%
Observed maximum damage: 285, we got 99.58% of that, rounded 99.30%
Wed 15 Jan 2020 2:20 PM by Horus
gruenesschaf wrote:
Wed 15 Jan 2020 2:03 PM
Variance has nothing to do with spec.

The variance is quite literally a random(50) (representing 0 - 0.5) that is added to the spec based multiplier which is 0.75 + 0.5 * min(enemy level + 1, spec -1) / (enemy level + 1).

In case of player vs player at 50 that means composite spec up to 52 is used (enemy level + 1 would be 51, to have 51 be spec - 1 you need at least 52 spec). Any increase after reaching enemy level + 1 is due to the 2h spec bonus which is uncapped and affects the weapon dps and therefore also the damage cap.

Enough tests have been run on pend to confirm that this is indeed the behavior and that our formulas are within 5% of what is observed there (which usually means within 1 or 2 damage):

In all cases the relevant pend char stats have been entered into our formula.

Avg is what you'd actually see (variance 25) here, min is with variance 0, max with variance 50. Observed min / max are the manually entered observed values from combat logs.

Example Hero slash lw vs druid

unbuffed, 1 + 15 spec

avg: 115.25, min: 91.14, max: 140.37
Observed minimum damage: 91, we got 100.15% of that, rounded 100.00%
Observed maximum damage: 140, we got 100.27% of that, rounded 100.00%

unbuffed, 50 + 15 spec
avg: 182.01, min: 152.89, max: 212.35
Observed minimum damage: 155, we got 98.64% of that, rounded 98.06%
Observed maximum damage: 213, we got 99.69% of that, rounded 99.53%

buffed, 50 + 15 spec
avg: 243.26, min: 204.34, max: 283.81
Observed minimum damage: 205, we got 99.68% of that, rounded 99.51%
Observed maximum damage: 285, we got 99.58% of that, rounded 99.30%

Can you clarify this statement? "Any increase after reaching enemy level + 1 is due to the 2h spec bonus which is uncapped and affects the weapon dps and therefore also the damage cap."

Can you clarify how this "2H spec bonus" works? Is it a fixed value or related to the composite spec level? How does it apply to Archery?
Wed 15 Jan 2020 2:22 PM by gruenesschaf
Horus wrote:
Wed 15 Jan 2020 2:20 PM
Can you clarify this statement? "Any increase after reaching enemy level + 1 is due to the 2h spec bonus which is uncapped and affects the weapon dps and therefore also the damage cap."

Can you clarify how this "2H spec bonus" works? Is it a fixed value or related to the composite spec level? How does it apply to Archery?



see https://camelotherald.fandom.com/wiki/Melee_Damage

TWOHANDBONUS = 1.10 + 0.005 * SPEC
or = 1.00 if it's no two handed weapon at all.

Where spec is the uncapped composite spec. Applies to all 2h weapons including bows.
Wed 15 Jan 2020 3:58 PM by Horus
gruenesschaf wrote:
Wed 15 Jan 2020 2:22 PM
Horus wrote:
Wed 15 Jan 2020 2:20 PM
Can you clarify this statement? "Any increase after reaching enemy level + 1 is due to the 2h spec bonus which is uncapped and affects the weapon dps and therefore also the damage cap."

Can you clarify how this "2H spec bonus" works? Is it a fixed value or related to the composite spec level? How does it apply to Archery?



see https://camelotherald.fandom.com/wiki/Melee_Damage

TWOHANDBONUS = 1.10 + 0.005 * SPEC
or = 1.00 if it's no two handed weapon at all.

Where spec is the uncapped composite spec. Applies to all 2h weapons including bows.

Thanks for the clarification. One other thing in reviewing the link about. Regarding archery and 2H. There are two values in the formulas for "SPEC". One is for 2HBONUS:
TWOHANDBONUS = 1.10 + 0.005 * SPEC

and one in DAMAGE MODIFIER:

DAMAGE_MODIFIER = LEVEL
* DAMAGE_TABLE / 10
* (1 + 0.01 * STATS)
* (0.9 + 0.1 * MAX(1, STRENGTH_RELIC_COUNT))
* (0.75 + 0.5 * MIN(ENEMY_LEVEL + 1, SPEC - 1) / (ENEMY_LEVEL + 1).

When it comes to Archery are both of these SPEC entries the total composite archery spec value? Are either capped? I just get a little confused when everyone talks about the "52 composite spec" as being the ceiling.
Wed 15 Jan 2020 4:03 PM by gruenesschaf
Horus wrote:
Wed 15 Jan 2020 3:58 PM
Thanks for the clarification. One other thing in reviewing the link about. Regarding archery and 2H. There are two values in the formulas for "SPEC". One is for 2HBONUS:
TWOHANDBONUS = 1.10 + 0.005 * SPEC

and one in DAMAGE MODIFIER:

DAMAGE_MODIFIER = LEVEL
* DAMAGE_TABLE / 10
* (1 + 0.01 * STATS)
* (0.9 + 0.1 * MAX(1, STRENGTH_RELIC_COUNT))
* (0.75 + 0.5 * MIN(ENEMY_LEVEL + 1, SPEC - 1) / (ENEMY_LEVEL + 1).

When it comes to Archery are both of these SPEC entries the total composite archery spec value? Are either capped? I just get a little confused when everyone talks about the "52 composite spec" as being the ceiling.

SPEC = composite spec, uncapped. The reason for 52 being the cap in case of 50 vs 50 is MIN(ENEMY_LEVEL + 1, SPEC - 1), if the enemy is 50 then it's MIN(51, SPEC -1) meaning at most 52 of your composite spec are taken into account for that part against level 50 opponents. If the enemy is 75, e. g. high level epic pve mobs, the effective composite spec cap against those would be 76.
Wed 15 Jan 2020 4:44 PM by Horus
gruenesschaf wrote:
Wed 15 Jan 2020 4:03 PM
Horus wrote:
Wed 15 Jan 2020 3:58 PM
Thanks for the clarification. One other thing in reviewing the link about. Regarding archery and 2H. There are two values in the formulas for "SPEC". One is for 2HBONUS:
TWOHANDBONUS = 1.10 + 0.005 * SPEC

and one in DAMAGE MODIFIER:

DAMAGE_MODIFIER = LEVEL
* DAMAGE_TABLE / 10
* (1 + 0.01 * STATS)
* (0.9 + 0.1 * MAX(1, STRENGTH_RELIC_COUNT))
* (0.75 + 0.5 * MIN(ENEMY_LEVEL + 1, SPEC - 1) / (ENEMY_LEVEL + 1).

When it comes to Archery are both of these SPEC entries the total composite archery spec value? Are either capped? I just get a little confused when everyone talks about the "52 composite spec" as being the ceiling.

SPEC = composite spec, uncapped. The reason for 52 being the cap in case of 50 vs 50 is MIN(ENEMY_LEVEL + 1, SPEC - 1), if the enemy is 50 then it's MIN(51, SPEC -1) meaning at most 52 of your composite spec are taken into account for that part against level 50 opponents. If the enemy is 75, e. g. high level epic pve mobs, the effective composite spec cap against those would be 76.
Thanks, that clears things up for me. So there is a benefit to speccing greater than 52 in Archery to get an increased 2Hbonus but it is pretty muted as that value is multiplied by .005. I was reviewing the Damage Table wiki and there was in interesting blurb:

https://camelotherald.fandom.com/wiki/Damage_Table

Factor 22

Mercenary - Slash, Crush, Thrust and Staff
Scout - Archery * 2)
Armsman - Slash, Crush, Thrust, Staff, Two Handed, Polearm and Crossbow
Vampiir - Piercing
Blademaster - Blades, Blunt and Piercing
Hero - Blades, Blunt and Piercing, Large Weapons and Celtic Spear
Ranger - Archery * 2)
Hunter - Archery * 2)

Savage - Staff
Berserker - Axes, Swords, Hammers, Staff and Thrown
Warrior - Staff and Thrown "


2) The bow factor is only used to display it as weapon skill, since archery has been changed to be a magic attack.

I suspect some of the ongoing concern/questions about archery comes from the fact that Phoenix is using a current "Live" melee dmg formula for archery that is really not intended to be used by archery as it is considered a magic attack on "Live". I think for a classic inspired server it would be better to leverage a formula for archery that was used when it was still considered a physical attack.
Thu 16 Jan 2020 6:40 AM by jcambros
Hello,

Thank you for the response.
I went to the website linked for the combat formulas, but I still cant get the math for the Damage_Modifier to work out correctly. I was hoping someone could show me where I am messing up my math.

I had my 50 Warden attack a 50 Bard.
Warden: 173 Strength, 52 Composite Blades, 18 Damage Table from here
Bard: 100 AF / Slot, 19% Absorb, 23% Slash Resist

From the Website:
ENEMY_ARMOR = (20 + (ITEM_USEABLE_AF + (ENEMY_SPEC_AF_BONUS / 5) + (ENEMY_TOA_AF_BONUS / 5)) * ITEM_QUALITY * ITEM_CONDITION) / (1 - ITEM_ABSORB)
With the Baseline AF Buff, and obviously no TOA modifiers:
ENEMY_ARMOR = (20 +(100 AF)) / (1 - 19%) = 148.15

DAMAGE_MODIFIER = LEVEL * DAMAGE_TABLE / 10 * (1 + 0.01 * STATS) * (0.9 + 0.1 * MAX(1, STRENGTH_RELIC_COUNT)) * (0.75 + 0.5 * MIN(ENEMY_LEVEL + 1, SPEC - 1) / (ENEMY_LEVEL + 1) + 0.01 * RANDOM(50)) / ENEMY_ARMOR * (1 - ENEMY_BUFFED_ABSORB) * (1 - ENEMY_RESISTANCE)
Note STATS above is Str / 2 per prior linked website

With only 1 Str Relic:
DAMAGE_MODIFIER = 50 * 18 / 10 * (1 + 0.01 * 173/2) * (0.9 + 0.1 * 1) * (0.75 + 0.5 * 51 / 51 + 0.01 * 25) / 148.15 * (1-0) * (1-23%) = 1.308

When I hit the Bard, I consistently had a Damage Modifier of 904.
Im pretty sure the reported Damage Modifier in the combat log is 1000x the above calculated.
However, 904 is significantly lower than the 1308 that I expected to see.

Did I do math wrong somewhere on what I predicted my Damage Modifier would be?

Thank you for your help!
Thu 16 Jan 2020 10:58 AM by gruenesschaf
jcambros wrote:
Thu 16 Jan 2020 6:40 AM
From the Website:
ENEMY_ARMOR = (20 + (ITEM_USEABLE_AF + (ENEMY_SPEC_AF_BONUS / 5) + (ENEMY_TOA_AF_BONUS / 5)) * ITEM_QUALITY * ITEM_CONDITION) / (1 - ITEM_ABSORB)
With the Baseline AF Buff, and obviously no TOA modifiers:
ENEMY_ARMOR = (20 +(100 AF)) / (1 - 19%) = 148.15

Did I do math wrong somewhere on what I predicted my Damage Modifier would be?

Thank you for your help!

Use a different inherent AF value: Try 45 / 50 * defender level instead of 20 for the enemy armor, in case of pendragon use defender level. Also use 33 as the resist (23 + 10 from studded vs slash) and use up to 5% aka 0.05 for relics (although that wouldn't apply in case of 1 relic). That gets me to 0.94, if I use 102 ie assume the bard is rr5 it's 0.929, however, if I also add the 3 slash racial from celts and assume 100 af I end up at 0.9. If you already included the 3% in your 23% resist it would be something else that's missing.

And yes, the damage modifier in the combat log is * 1000 for display purposes making 3000 the cap for players.
Fri 17 Jan 2020 4:16 AM by jcambros
This worked out.

Thank you
Tue 4 Feb 2020 10:38 PM by Cadebrennus
Horus wrote:
Wed 15 Jan 2020 4:44 PM
gruenesschaf wrote:
Wed 15 Jan 2020 4:03 PM
Horus wrote:
Wed 15 Jan 2020 3:58 PM
Thanks for the clarification. One other thing in reviewing the link about. Regarding archery and 2H. There are two values in the formulas for "SPEC". One is for 2HBONUS:
TWOHANDBONUS = 1.10 + 0.005 * SPEC

and one in DAMAGE MODIFIER:

DAMAGE_MODIFIER = LEVEL
* DAMAGE_TABLE / 10
* (1 + 0.01 * STATS)
* (0.9 + 0.1 * MAX(1, STRENGTH_RELIC_COUNT))
* (0.75 + 0.5 * MIN(ENEMY_LEVEL + 1, SPEC - 1) / (ENEMY_LEVEL + 1).

When it comes to Archery are both of these SPEC entries the total composite archery spec value? Are either capped? I just get a little confused when everyone talks about the "52 composite spec" as being the ceiling.

SPEC = composite spec, uncapped. The reason for 52 being the cap in case of 50 vs 50 is MIN(ENEMY_LEVEL + 1, SPEC - 1), if the enemy is 50 then it's MIN(51, SPEC -1) meaning at most 52 of your composite spec are taken into account for that part against level 50 opponents. If the enemy is 75, e. g. high level epic pve mobs, the effective composite spec cap against those would be 76.
Thanks, that clears things up for me. So there is a benefit to speccing greater than 52 in Archery to get an increased 2Hbonus but it is pretty muted as that value is multiplied by .005. I was reviewing the Damage Table wiki and there was in interesting blurb:

https://camelotherald.fandom.com/wiki/Damage_Table

Factor 22

Mercenary - Slash, Crush, Thrust and Staff
Scout - Archery * 2)
Armsman - Slash, Crush, Thrust, Staff, Two Handed, Polearm and Crossbow
Vampiir - Piercing
Blademaster - Blades, Blunt and Piercing
Hero - Blades, Blunt and Piercing, Large Weapons and Celtic Spear
Ranger - Archery * 2)
Hunter - Archery * 2)

Savage - Staff
Berserker - Axes, Swords, Hammers, Staff and Thrown
Warrior - Staff and Thrown "


2) The bow factor is only used to display it as weapon skill, since archery has been changed to be a magic attack.

I suspect some of the ongoing concern/questions about archery comes from the fact that Phoenix is using a current "Live" melee dmg formula for archery that is really not intended to be used by archery as it is considered a magic attack on "Live". I think for a classic inspired server it would be better to leverage a formula for archery that was used when it was still considered a physical attack.

I pointed out the very same to the developers way back in beta but was, in so many words, told to go to hell regarding my findings and feedback.
This topic is locked and you can't reply.

Return to Ask the Team or the latest topics