d2jsp
Log InRegister
d2jsp Forums > d2jsp > Ladder Slasher > Melee Damage Calculation?
123Next
Add Reply New Topic New Poll
Member
Posts: 12,396
Joined: Sep 17 2005
Gold: 15,132.59
Jan 8 2022 04:52pm
Just curious if anyone has it.

If not, some logical thinking towards a solution could be fun

The calculation for charms is
(1 + (int - 5) / 100) * ( 1 + (ee + prof + mastery) / 100) * base damage from https://ladderslasher.d2jsp.org/index.php?g=11 = show damage in game
Note that on your character link such as https://forums.d2jsp.org/user.php?c=3&i=193561&p=58179 it does NOT take proficiency/mastery into account. So calculation is (1 + (int - 5) / 100) * ( 1 + (ee/ 100)) * base damage = character link damage.
Interestingly enough, item history damage is from an intelligence value of 0, which leads to calc being 0.95 * (1+ee/100) * base damage: https://ladderslasher.d2jsp.org/itemHistory.php?i=1840095&c=0
All of the above is known and has been checked by others and i double checked the numbers with a few of my own charms. Just posted it for reference


Given that i would "suggest" the calculation for damage would be:
(1 + (str-5)/100*wpn ratio + (dex-5/100)*wpn ratio) * ( 1 + (ee + prof)/100) * base damage from https://ladderslasher.d2jsp.org/index.php?g=11 = show damage in game

However from two test items came out different and in such a different way that I think it's something completely different.
Test item 1: Str - 264, Dex - 25, Club lvl 50, 228 ee, show max damage excluding prof: 1508. Calculated damage from the formula - 1303
Test item 2: Str - 264, Dex - 25, Dagger lvl 40, 228 ee, show max damage excluding prof: 274. Calculated damage from the formula - 263

Tried removing the "-5" part from the calc on str/dex and it's still way out for the club in particular.

I already know from testing that weapons only get damage at specific amounts of strength/dex, as an example if i added 4 more points of dex to the above numbers, the damage on the club would NOT change whilst the dagger would move 4 times one for each stat.
I made some charts to show which numbers these are:



So the better way of working out the damage is from counting the number of damage adds you get.
For club strength and dagger dexterity. Divide the amount by 10 and remove any remainder then multiply by 9. For the remainder, multiply it by 10 again. then take 1 off of it.
For club dexterity and dagger strength. Divide the amount by 10 and remove any remainder and you're done.
Add those two together to get the number of times damage was increased from strength/dexterity.

Club example from earlier:
Club strength example 264/10 = 26.4 - remainder = 26. Multiply this by 9 = 234. Remainder = 0.4 *10 = 4, -1 = 3. This is a total of 237 times damage was increased by strength
Club dexterity example 25/10 = 2.5. -remainder = 2. Total of 2 times damage increased by dex
Add these together is 239 total amount of times damage was increased from strength/dexterity (i'll call these damage instances from now on)

One other thing to note is that there is definitely still a negative number attached to strength and dexterity, this is why the damage numbers of items do not match the numbers on the portal for items with 0 ee. Examples:
https://ladderslasher.d2jsp.org/itemHistory.php?i=1229937811&c=0 - 55 club, portal damage 126 max, history damage 119 max.
https://ladderslasher.d2jsp.org/itemHistory.php?i=1229915144&c=0 - t1 club, portal damage 9 max, history damage 8 max.
Given this we can double check the EE part of the formula remains the same, by checking a large ee item and noting that it will be less than expected.
https://ladderslasher.d2jsp.org/itemHistory.php?i=3414670&c=0 is what i tested. Used a 0 value for strength/dexterity. 1 * ( 1 + 228/100) * 117 = 383.

TLDR
So what we actually 100% know about the melee damage calculation:
EE part of it is correct. specifically: ( 1 + (ee + prof)/100) * base damage from https://ladderslasher.d2jsp.org/index.php?g=11 = show damage in game
There is also a negative value attached to strength/dexterity, this is very likely to be -5 on both.
Rather than a direct formula, you need to take into account the damage instances. You should be able to get very close numbers without using damage instances though. Simply multiplying the strength/dex ratios to your strength/dexterity should give you an answer within 2%, the larger the strength/dex values are, the less error there is. Or you can specifically use multiples of 10 for both strength and dexterity for Clubs/Daggers/Axes and multiples of 20 for swords/staffs, then you can ignore damage instances as the numbers will come out the same.


Now i've written all this crap someones gonna give me the formula arn't they :rofl:
If not i would appreciate some suggestions on how to calculate it, I have a few ideas but i suspect i'm not the only mathy person here.
Member
Posts: 40,183
Joined: Apr 29 2006
Gold: 20,826.51
Jan 8 2022 05:06pm
Tried reading it fully and got a bit lost.

All I noticed is that both weapons with reverse ratios 90/10 (club) vs 10/90 (dagger) was based on 264 Str and 25 Dex. To me you are definitely going to get different calculations.

But, if I am wrong (which people will say I am) ... did you have a glyph on at the time using the dagger when taking notes?

Maybe you should have done the calculations based on the AVERAGE damage? Just a thought because the base damage of those weapons = same average damage.

EDIT: use the same numbers 264 / 25 for club, but then switch them around for dagger 25 / 264.

This post was edited by izParagonzi on Jan 8 2022 05:09pm
Member
Posts: 12,396
Joined: Sep 17 2005
Gold: 15,132.59
Jan 8 2022 05:13pm
Quote (izParagonzi @ Jan 8 2022 11:06pm)
Tried reading it fully and got a bit lost.

All I noticed is that both weapons with reverse ratios 90/10 (club) vs 10/90 (dagger) was based on 264 Str and 25 Dex. To me you are definitely going to get different calculations.

But, if I am wrong (which people will say I am) ... did you have a glyph on at the time using the dagger when taking notes?

Maybe you should have done the calculations based on the AVERAGE damage? Just a thought because the base damage of those weapons = same average damage.


You are unlikely to be the only one a little lost as this is me just spamming my thoughts in what seems in my head a logical manner, however i think differently to a lot of people so perhaps it is confusing.

i expected people to deal with the damage ratio's themselves or use damage instances.

To keep it simple i'd like the damage calc to correctly give the damage on both the lvl 50 228ee club and level 40 130 ee dagger on this character with the gear as is: https://forums.d2jsp.org/user.php?c=3&i=193561&p=29506
The "obvious" calculation of multiplying strength by 0.9 and dexterity by 0.1 comes out 200 damage wrong for the level 50 and about 10 damage wrong for the level 40.

Much easier to use maximum damage seeing the number is directly on your screen and using maximum also limits inaccuracy from increasing by less than 1 damage leading to multiple amounts of str/dex reaching the same value.


thanks for the input though. also nothing to do with glyphs seeing i'm mostly using it from the character link which ignores prof/glyphs.

edit:
reversing the numbers will only prove that damage instances exist and are working correctly.


Basically i need to figure out the change in damage per strength point and reverse engineer that.
I.e have strength numbers of 200, 210, 220, 230, 240, 250 strength and use that information to recalculate, but even getting correct numbers from that is a bit of a nuisance as it's not clear what type of function it is

This post was edited by Bigheaded on Jan 8 2022 05:16pm
Member
Posts: 5,900
Joined: Apr 13 2005
Gold: 1,385.63
Jan 8 2022 05:21pm
Quote (Bigheaded @ Jan 8 2022 11:52pm)
Just curious if anyone has it.

If not, some logical thinking towards a solution could be fun

The calculation for charms is
(1 + (int - 5) / 100) * ( 1 + (ee + prof + mastery) / 100) * base damage from https://ladderslasher.d2jsp.org/index.php?g=11 = show damage in game
Note that on your character link such as https://forums.d2jsp.org/user.php?c=3&i=193561&p=58179 it does NOT take proficiency/mastery into account. So calculation is (1 + (int - 5) / 100) * ( 1 + (ee/ 100)) * base damage = character link damage.
Interestingly enough, item history damage is from an intelligence value of 0, which leads to calc being 0.95 * (1+ee/100) * base damage: https://ladderslasher.d2jsp.org/itemHistory.php?i=1840095&c=0
All of the above is known and has been checked by others and i double checked the numbers with a few of my own charms. Just posted it for reference


Given that i would "suggest" the calculation for damage would be:
(1 + (str-5)/100*wpn ratio + (dex-5/100)*wpn ratio) * ( 1 + (ee + prof)/100) * base damage from https://ladderslasher.d2jsp.org/index.php?g=11 = show damage in game

However from two test items came out different and in such a different way that I think it's something completely different.
Test item 1: Str - 264, Dex - 25, Club lvl 50, 228 ee, show max damage excluding prof: 1508. Calculated damage from the formula - 1303
Test item 2: Str - 264, Dex - 25, Dagger lvl 40, 228 ee, show max damage excluding prof: 274. Calculated damage from the formula - 263

Tried removing the "-5" part from the calc on str/dex and it's still way out for the club in particular.

I already know from testing that weapons only get damage at specific amounts of strength/dex, as an example if i added 4 more points of dex to the above numbers, the damage on the club would NOT change whilst the dagger would move 4 times one for each stat.
I made some charts to show which numbers these are:
https://i.imgur.com/hVY4AqY.png
https://i.imgur.com/DVptDIg.png

So the better way of working out the damage is from counting the number of damage adds you get.
For club strength and dagger dexterity. Divide the amount by 10 and remove any remainder then multiply by 9. For the remainder, multiply it by 10 again. then take 1 off of it.
For club dexterity and dagger strength. Divide the amount by 10 and remove any remainder and you're done.
Add those two together to get the number of times damage was increased from strength/dexterity.

Club example from earlier:
Club strength example 264/10 = 26.4 - remainder = 26. Multiply this by 9 = 234. Remainder = 0.4 *10 = 4, -1 = 3. This is a total of 237 times damage was increased by strength
Club dexterity example 25/10 = 2.5. -remainder = 2. Total of 2 times damage increased by dex
Add these together is 239 total amount of times damage was increased from strength/dexterity (i'll call these damage instances from now on)

One other thing to note is that there is definitely still a negative number attached to strength and dexterity, this is why the damage numbers of items do not match the numbers on the portal for items with 0 ee. Examples:
https://ladderslasher.d2jsp.org/itemHistory.php?i=1229937811&c=0 - 55 club, portal damage 126 max, history damage 119 max.
https://ladderslasher.d2jsp.org/itemHistory.php?i=1229915144&c=0 - t1 club, portal damage 9 max, history damage 8 max.
Given this we can double check the EE part of the formula remains the same, by checking a large ee item and noting that it will be less than expected.
https://ladderslasher.d2jsp.org/itemHistory.php?i=3414670&c=0 is what i tested. Used a 0 value for strength/dexterity. 1 * ( 1 + 228/100) * 117 = 383.

TLDR
So what we actually 100% know about the melee damage calculation:
EE part of it is correct. specifically: ( 1 + (ee + prof)/100) * base damage from https://ladderslasher.d2jsp.org/index.php?g=11 = show damage in game
There is also a negative value attached to strength/dexterity, this is very likely to be -5 on both.
Rather than a direct formula, you need to take into account the damage instances. You should be able to get very close numbers without using damage instances though. Simply multiplying the strength/dex ratios to your strength/dexterity should give you an answer within 2%, the larger the strength/dex values are, the less error there is. Or you can specifically use multiples of 10 for both strength and dexterity for Clubs/Daggers/Axes and multiples of 20 for swords/staffs, then you can ignore damage instances as the numbers will come out the same.


Now i've written all this crap someones gonna give me the formula arn't they :rofl:
If not i would appreciate some suggestions on how to calculate it, I have a few ideas but i suspect i'm not the only mathy person here.


Acuallty I read this on my 3rd beed and I am like some asteroid from Ort cloud rushing towards Earth.

I will read it again tomorrow ...
Member
Posts: 22,315
Joined: Aug 25 2006
Gold: 58,914.87
Jan 8 2022 05:35pm
mabe try: damage = (a_00 + a_01*dex+a_10*str+a_11*dex*str+a_02*dex*dex+a12*dex*dex*str+....)*(100+ee+prof)/100*base_dmg

take some datas and solve for all a_ij, if u have luck u maybe get the exakt formula (ofc a_ij depends on weapon typ so u have this to do for all typs )

e:
instead of
(1 + (str-5)/100*wpn ratio + (dex-5/100)*wpn ratio) * ( 1 + (ee + prof)/100) * base damage
u tryed:
(1 + ((str+dex-5)/100)*wpn ratio) * ( 1 + (ee + prof)/100) * base damage ?

This post was edited by tor_zero on Jan 8 2022 05:43pm
Member
Posts: 12,396
Joined: Sep 17 2005
Gold: 15,132.59
Jan 8 2022 05:54pm
Quote (tor_zero @ Jan 8 2022 11:35pm)
mabe try: damage = (a_00 + a_01*dex+a_01*str+a_11*dex*str+a_02*dex*dex+a12*dex*dex*str+....)*(100+ee+prof)/100*base_dmg

take some datas and solve for all a_ij, if u have luck u maybe get the exakt formula (ofc a_ij depends on weapon typ so u have this to do for all typs )


can you clarify what you mean by a_00? etc?

pretty sure i need a maximum of 2 weapons as then i get the discrepancy between str/dex ratios.

Quote
U TRYED:
(1 + ((str+dex-5)/100)*wpn ratio) * ( 1 + (ee + prof)/100) * base damage ?


this doesnt make sense the entire point of weapon ratios is that they get attached to each stat, for example club is 0.90*str and 0.10*dex or 90/10 from the weapon ratios here: https://ladderslasher.d2jsp.org/index.php?g=3

This post was edited by Bigheaded on Jan 8 2022 05:57pm
Member
Posts: 22,315
Joined: Aug 25 2006
Gold: 58,914.87
Jan 8 2022 06:32pm
Quote (Bigheaded @ Jan 9 2022 12:54am)
can you clarify what you mean by a_00? etc?

pretty sure i need a maximum of 2 weapons as then i get the discrepancy between str/dex ratios.



these are the coefficients of a 2-dimensional polynomial

for example:
(1 + (str-5)/100*wpn ratio_str + (dex-5/100)*wpn ratio_dex) = 1+ (-5/100*wpn ratio_str -5/100*wpn rati_dex) +1/100*wpn ratio_str*str +1/100*wpn ratio_dex*dex (i just rewrite ur forumla and i changed wpn ratio to wpn ratio_dex and wpn ratio_str beacuse there 2 different values (0.5 and 0.5 or 0.9 and 0.1 etc.))
than
a_00 = 1+ (-5/100*wpn ratio_str -5/100*wpn rati_dex) = 0.95 // (becasue wpn rati_dex + wpn rat_str = 1)
a_01 = 1/100*wpn ratio_dex
a_10 = 1/100*wpn ratio_str
a_11 = 0
and all others coefficients (square/cubic terms) = 0
but since the values of the coefficients are wrong you have to calculat them.

if u now take datas from different pairs of (dex,str,damage) u can calculat with curve fitting methodes an approximate solution.



Member
Posts: 40,183
Joined: Apr 29 2006
Gold: 20,826.51
Jan 8 2022 06:58pm
Quote (Bigheaded @ Jan 9 2022 12:13pm)
You are unlikely to be the only one a little lost as this is me just spamming my thoughts in what seems in my head a logical manner, however i think differently to a lot of people so perhaps it is confusing.

i expected people to deal with the damage ratio's themselves or use damage instances.

To keep it simple i'd like the damage calc to correctly give the damage on both the lvl 50 228ee club and level 40 130 ee dagger on this character with the gear as is: https://forums.d2jsp.org/user.php?c=3&i=193561&p=29506
The "obvious" calculation of multiplying strength by 0.9 and dexterity by 0.1 comes out 200 damage wrong for the level 50 and about 10 damage wrong for the level 40.

Much easier to use maximum damage seeing the number is directly on your screen and using maximum also limits inaccuracy from increasing by less than 1 damage leading to multiple amounts of str/dex reaching the same value.


thanks for the input though. also nothing to do with glyphs seeing i'm mostly using it from the character link which ignores prof/glyphs.

edit:
reversing the numbers will only prove that damage instances exist and are working correctly.


Basically i need to figure out the change in damage per strength point and reverse engineer that.
I.e have strength numbers of 200, 210, 220, 230, 240, 250 strength and use that information to recalculate, but even getting correct numbers from that is a bit of a nuisance as it's not clear what type of function it is


Years ago I debated the "-5" STAT in the formula as being a quick fix based on the information you can see with items on the Link (sold or item on mp using the ID#). Yes, fundamentally the -5 does work, but (this is where it gets tricky), for melee weapons, the added STAT point ONLY affects the minimum or maximum damage based on how many points you add. (this sounds confusing)

At some stage adding 1 stat point = 0 added damage to minimum or maximum, thus it is rounded down.
At some stage adding 2 stat points = either 1 added damage to Minimum, or 2 to maximum damage
At some stage adding 3 stat points = 1 minimum damage and 2 maximum damage.

Not sure if this helps, but because of the ratios of Weapons vs Charms only relying on Intelligence, you will have to come up with a different formula.

EDIT: yes, years ago I actually tried to log the information down based on adding 1 stat point per level, but it got extremely tedious with different weapons and because it was based on Guardian with the lowest Str / Dex and Heavy weapons.

EDIT #2: Here is an after thought... Charm formula is based on 1 stat, weapons are based on 2 stats... so, when you use -5 in the formula, which stat do you take it from? 1 or both?

EDIT #3: Okay... another after thought: if the ratio is 90/10, then you would -4 from str and -1 from dex? Maybe, and reverse. So how would you do the formula for 75/25 or 25/75? would it be -3.5 / -1.5 or switch -1.5 / -3.5 Stat?

This post was edited by izParagonzi on Jan 8 2022 07:09pm
Member
Posts: 12,396
Joined: Sep 17 2005
Gold: 15,132.59
Jan 9 2022 07:43am
Right, this is even more complicated than i first anticipated.

Currently focusing on clubs until i can get some form of formula to solve clubs, then i'll work on the rest.

A large issue with the calculation is that some Damage Instances give 2x damage, i have no idea why. On the plus side though, this appears to be consistent of every 4 increases of damage instance, you get 2x.
Just adds another layer to the calculation though, which is pretty frustrating.

Here's some numbers:



So calculation is something along these lines for clubs. Ignoring the -5 str/dex for the moment as it just overcomplicates things:

(x + (damage_instances + damage_instances/4) * y) * (1+ ee/100) * base damage = show damage on character link.
Also worth noting the (damage_instances + damage_instances/4) must always be a whole number, however i don't know if it rounds UP/DOWN/WHATEVERS_CLOSEST to the nearest whole number.
X and Y being the numbers i need to find out to make the equation work for any club. Another thing is when do damage instances start? I start from 0/0 str/dex, perhaps i should be starting from -5/-5 although my red/green sheet from the first post is based off of 0/0

Quote (izParagonzi @ Jan 9 2022 12:58am)
Stuff to do with -5 dex/strength


You're correct to question whether or not its -5, the answer is i don't know at this point and will not know until i resolve the rest of the equation, this is probably the last part of resolving it.

This post was edited by Bigheaded on Jan 9 2022 07:55am
Member
Posts: 12,396
Joined: Sep 17 2005
Gold: 15,132.59
Jan 9 2022 09:44am
All sorted.

couple of different ways you can write it but here's the way i'm using which resolves clubs, may need to rewrite it to work for all weapons but it seems close:

Club damage calculation:
(0.95 + (instances + instances/4(rounded_down)/100)) * (1+ee/100) * base damage from portal = character link(rounded_down)
I am 99% sure this will work for daggers as well.

So from the numbers above, lets suggest you're on a mage with base stats 20/50 with no strength gear and looked at the market at a 228 ee level 50 club when you have 0 prof, this can then be calculated as follows:

To re-iterate the first post in the topic, the amount of instances a club would have on a mage would be
20 strength = 18 instances.
50 dex = 5 instances
total = 23 instances
instances/4(rounded_down)=5.75, rounds down to 5.

(0.95 + (23 + 5)/100) * (1+228/100) * 117 = ?
(0.95 + 0.28) * (3.28) * 117 = 472.0248 -> rounds down to 472


Anyway, going to resolve this to work for all weapons, i have a very good idea as to why its 0.95 at the very start of the equation, as i expect 5 damage_instances are lost with clubs which is why the history links show incorrect damage. i'm expecting same for daggers and will double check for swords/staffs/axes.

Hopefully going to write a google sheet which allows you to see your damage by inputting strength/dex and hopefully use some numbers for critical strike and quickdraw in particular to see how much they impact your damage which i think will be helpful for a significant number of us.
Go Back To Ladder Slasher Topic List
123Next
Add Reply New Topic New Poll