d2jsp
Log InRegister
d2jsp Forums > Diablo II > Diablo 2 Discussion > Order Of Operations Of Rng And Dmg Scaling
Add Reply New Topic New Poll
Member
Posts: 5,961
Joined: Mar 13 2021
Gold: 101.00
Feb 19 2024 05:17pm
does D2 roll the dmg on the base range and then amplifies the number by ed/min/max/skills/synergies/masteries/... or is the base range modified first and the dmg rolled in the second step based on the extended range?

example: consider a short sword (base dmg: 2-7) and equip with 200%ed
scenario 1, dmg rolled on base range and amplified later: you start with possible dmg numbers (2 3 4 5 6 7), after considering %ed you end up with dmg numbers (6 9 12 15 18 21)
scenario 2, range gets extended first and dmg is rolled second: range is 6-21 and possible dmg numbers are (6 7 8 9 10 11 12 ... 20 21)

scenario 2 is sort of continuous (on the set of integers) while scenario 1 only allows discrete values

does anyone know which is implemented in the game? have there been any studies on this???
Member
Posts: 965
Joined: Dec 18 2021
Gold: 0.00
Feb 19 2024 11:11pm
Persons who knows things like this have stopped to viewing this site long time ago :p probably knows things like this i think, but he have been offline awhile. maybe can answer to your question or :D

This post was edited by Soppamies on Feb 19 2024 11:15pm
Member
Posts: 22,694
Joined: Sep 3 2006
Gold: 40,582.00
Feb 20 2024 12:43am
https://www.theamazonbasin.com/wiki/index.php/Damage

1. Base wep
2. Etheral
3. Enhanced wepon damage% / enhanced max wep damage%
4. Minimum / Maximum / adds damage
5. +damage
6. % damage
% damage undead/demons
7. Deadly strike / critic strike
8. Unit critical chance
9. Fire / Psn / Cold / Lightning
10. Magic skill damage %
11. Conversion of physical damage
12. Source damage penalty

As for defenender its rolls in this order:
1. Unit modifier(player forexample 17%)
2. Bone armor / Cyclone armor
3. %Energy shield
4. DR / MDR
5. % Resists
-% resists
6. Absorb %
7. Absorb
8. MDR/DR overflow

Crushing blow on a melee/ranged attack happens prior to direct damage.
Every part is rounded down (floor'ed)

This post was edited by gel87 on Feb 20 2024 12:44am
Member
Posts: 5,961
Joined: Mar 13 2021
Gold: 101.00
Feb 20 2024 12:59am
Quote (gel87 @ Feb 20 2024 07:43am)
https://www.theamazonbasin.com/wiki/index.php/Damage

1. Base wep
2. Etheral
3. Enhanced wepon damage% / enhanced max wep damage%
4. Minimum / Maximum / adds damage
5. +damage
6. % damage
% damage undead/demons
7. Deadly strike / critic strike
8. Unit critical chance
9. Fire / Psn / Cold / Lightning
10. Magic skill damage %
11. Conversion of physical damage
12. Source damage penalty

As for defenender its rolls in this order:
1. Unit modifier(player forexample 17%)
2. Bone armor / Cyclone armor
3. %Energy shield
4. DR / MDR
5. % Resists
-% resists
6. Absorb %
7. Absorb
8. MDR/DR overflow

Crushing blow on a melee/ranged attack happens prior to direct damage.
Every part is rounded down (floor'ed)


aware of that, but thats not the question. i am wondering at which point the RMG comes into play
Member
Posts: 5,961
Joined: Mar 13 2021
Gold: 101.00
Feb 20 2024 01:02am
Quote (Soppamies @ Feb 20 2024 06:11am)
Persons who knows things like this have stopped to viewing this site long time ago :p ^feanur probably knows things like this i think, but he have been offline awhile. ^gel87 maybe can answer to your question or ^goomshill :D


damn it :( sadly that technically makes a difference, so i have to calc a larger example to see if it matters for larger numbers
Member
Posts: 22,694
Joined: Sep 3 2006
Gold: 40,582.00
Feb 20 2024 03:28am
Quote (PiXi31415 @ Feb 20 2024 07:59am)
aware of that, but thats not the question. i am wondering at which point the RMG comes into play


Okay, well.
I would guess output of damage calc would roll. I kinda dont see why they would have an extra roll first for base damage or wepon damage. Cause what if u have 8min damage ring, and 3 max damage SC and so on...
But im not sure.

All i know is:
To get correct numbers one need to calc it like this:
FLOOR(WepMin * (1+(wepEd%/100))+OtherMinDamage) * FLOOR(1+((AuraEd%+Statbonus%+SkillBonus%+GearEd%)/100))
FLOOR(WepMax * (1+(wepEd%/100))+OtherMaxDamage) * FLOOR(1+((AuraEd%+Statbonus%+SkillBonus%+GearEd%)/100))
Here +damage will be added both on min and max.

So i guess it rolls for hitchance first, then it rolls for blockchance, then CB/OW, then FinalMin/Max, then it roll's for critic, then it rolls for deadly,
Then it adjust according to unit, then bone/cyclone, then es, DR/MDR, Resists, Absorb%, absorb integer, MDR/DR overflow.

Anyhow, not 100% sure.
Member
Posts: 13,180
Joined: Oct 14 2021
Gold: 86,215.90
Feb 20 2024 10:51pm
i've recently come upon this repository, which is an open source c++ reimplementation of d2 lod libraries based purely on assembly. there's lot of things you can verify in there but can take a bit of time to trace through each function

https://github.com/ThePhrozenKeep/D2MOO/tree/master/source

Member
Posts: 5,961
Joined: Mar 13 2021
Gold: 101.00
Feb 21 2024 02:55am
Quote (daanno2 @ Feb 21 2024 05:51am)
i've recently come upon this repository, which is an open source c++ reimplementation of d2 lod libraries based purely on assembly. there's lot of things you can verify in there but can take a bit of time to trace through each function

https://github.com/ThePhrozenKeep/D2MOO/tree/master/source


tyvm, now i just need to learn basics for c++ :D
Go Back To Diablo 2 Discussion Topic List
Add Reply New Topic New Poll