SrcDam scaling applies to skill's own elemental damage?

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

Post Reply
Riv
Posts: 7
Joined: Mon Apr 05, 2021 5:30 pm

SrcDam scaling applies to skill's own elemental damage?

Post by Riv » Sun Apr 11, 2021 1:58 am

From testing it seems to be the case - if you make a skill do 100 fire damage, and set SrcDam to 1, it will do almost no damage compared to SrcDam=0 or 128 (the same does not apply to physical damage on the skill, it will actually go up because even SrcDam=1 makes it fully scale with +dmg% *and* str/dex, though attribute scaling disappears when you unequip your weapon)

Now, this makes me wonder - Lightning Bolt is advertised as added 1-40 lightning damage at level 1, but it has SrcDam=96. Wouldn't that make it do 1-30 damage instead? Changing SrcDam to 1 indeed makes it do no damage.

Looking at https://www.theamazonbasin.com/wiki/ind ... tning_Bolt it has no mention of damage being lower than expected, despite the basin wiki listing some extremely obscure bugs on other pages. Has it just never been tested, or I'm doing something wrong?

(Interestingly enough, srcdam ALSO scales poison_count but not poisonlength... so lower srcdam means poisons from multiple sources last longer. This is actually documented on the wiki, though they claim the formula to be different: https://www.theamazonbasin.com/wiki/ind ... Blade_Fury)

User avatar
Cypress
Junior Member
Paladin
Posts: 163
Joined: Fri Dec 01, 2017 2:08 am

Re: SrcDam scaling applies to skill's own elemental damage?

Post by Cypress » Sun Apr 11, 2021 2:31 am

Good find, from my own testing I saw the exact same thing. I'll be adding the fixed damage description to the next version of the Overworked Txt Files. Thanks!

User avatar
Conqueror
Posts: 56
Joined: Mon Oct 23, 2017 8:03 pm
Argentina

Re: SrcDam scaling applies to skill's own elemental damage?

Post by Conqueror » Mon Apr 19, 2021 9:22 pm

SrcDamage allows you to add a percentage of the weapon's damage (Both physical and elemental or magical that is delivered by statistics) to the damage of the skill.
It is a function that works from 1 to 255, if you set it to 0 the system ignores the function and uses the damage normally. This is calculated as follows:
DmgTotal += DmgWeap * SrcDamage / 128.

If you set it to 1 for example, you will only add 1/128 of the weapon's damage to the skill's elemental damage, it does not affect the skill's original damage at all (unless you modify the HitShift, that is in 256 hts, it is measured in bits, if you set it to 8 it is: SkillDmg * (2 ^ HitShift) / 256 = SkillDmg.

User avatar
Cypress
Junior Member
Paladin
Posts: 163
Joined: Fri Dec 01, 2017 2:08 am

Re: SrcDam scaling applies to skill's own elemental damage?

Post by Cypress » Tue Apr 20, 2021 12:43 pm

Conqueror, you can check it yourself with a simple test. Spawn some low level monsters with 100% physical resistance and no damageregen. Then modify Lightning Bolt to have no conversion and change srcdam as needed. Meaning, 100% of the damage I deal is from the added elemental damage of Lightning Bolt. I also increased the minimum damage to be equal to maximum for consistency. When I set the srcdam=96, I one hit the test monster. When I set the srcdam=1, it takes many, many hits to kill the test monster. And when I set srcdam=0, I one hit the test monster again. Srcdam seems to affect all weapon damage, including added elemental damage from skills, as long as a srcdam value greater than 0 is assigned.

If I'm missing something that is making this test unfair or dishonest, then please let me know, because I would much prefer this to be wrong as it makes it really awkward to work with srcdam skills of values that are not 0 or 128 that also have added elemental damage.

Post Reply

Return to “General Mod Making”