The Guide to Almost All Non-Missile Skill Functions

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

User avatar
mac13lx
Posts: 4
Joined: Sun Nov 12, 2023 2:28 pm
Poland

Re: The Guide to Almost All Non-Missile Skill Functions

Post by mac13lx » Sun Nov 12, 2023 2:32 pm

Hey guys, im green with modding the Diablo 2, i tried to add Diablo skills onto the ring but when i try to use them all it does is just bugging my character is there a way to fix it? if you guys could help me with this issue i would really really appreciate that :).

User avatar
Cypress
Moderator
Champion of the Light
Posts: 493
Joined: Fri Dec 01, 2017 2:08 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by Cypress » Sun Nov 12, 2023 5:17 pm

Hi mac13lx, that's probably because of an improper animation, which is defined by the anim column of the skill. A lot of monster skills have SQ as their default animation, which doesn't work for players unless it has a seqnum associated with it to determine what sequence it should play. You can change the skill's anim from SQ to SC to make it use the casting animation.

User avatar
mac13lx
Posts: 4
Joined: Sun Nov 12, 2023 2:28 pm
Poland

Re: The Guide to Almost All Non-Missile Skill Functions

Post by mac13lx » Sun Nov 12, 2023 5:38 pm

Thanks @Cypress for the quick reply :), can you tell me please in what file i can make those changes?

User avatar
Cypress
Moderator
Champion of the Light
Posts: 493
Joined: Fri Dec 01, 2017 2:08 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by Cypress » Sun Nov 12, 2023 9:02 pm

The changes would be made in skills.txt

User avatar
mac13lx
Posts: 4
Joined: Sun Nov 12, 2023 2:28 pm
Poland

Re: The Guide to Almost All Non-Missile Skill Functions

Post by mac13lx » Sun Nov 12, 2023 11:03 pm

Cypress wrote:
Sun Nov 12, 2023 9:02 pm
The changes would be made in skills.txt
I manage to do that thank you!!, but when i try diabwall skill i get error every single time i just dunno why

User avatar
Cypress
Moderator
Champion of the Light
Posts: 493
Joined: Fri Dec 01, 2017 2:08 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by Cypress » Mon Nov 13, 2023 2:39 am

Starting from fresh 1.13c txt files, this is what I had to change to make it be usable with the fewest changes, in skills.txt:
skilldesc=delerium change
anim=SC

Code: Select all

DiabWall	197		delerium change		102												diabwallmaker																																																												diablo_fire_cast															58					diabwallmaker												1	0		none												SC	SQ	S1																										1																								1	1									lvl	#missiles							0	?	0	?	0	?	0	?									1								8																																					0

User avatar
eleriaqueen
Posts: 57
Joined: Mon Dec 16, 2019 8:49 am
France

Re: The Guide to Almost All Non-Missile Skill Functions

Post by eleriaqueen » Wed Jan 10, 2024 8:32 am

Hi, idk if you're keeping track of D2R behavior but I did some (naive) testing in up to date version and it seems that Vengeance can't apply magic damage type through eMin/eMax. I simply switched to Bash/Concentrate func and magic damage went through.

User avatar
Cypress
Moderator
Champion of the Light
Posts: 493
Joined: Fri Dec 01, 2017 2:08 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by Cypress » Thu Jan 11, 2024 12:02 am

Thanks eleriaqueen! That's not a D2R specific difference, that was my mistake in testing. Turns out Vengeance can't use elemental damage nor Etype; it always applies cold length with ELen regardless of the etype set. I've updated the guide accordingly.

User avatar
Nagahaku
Junior Member
Paladin
Posts: 155
Joined: Sat Nov 30, 2019 1:11 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by Nagahaku » Fri Feb 16, 2024 8:12 am

Hi, I found something strange with Blade Shield.
It would interrupt some finishing strikes from releasing charge-ups at its damaging frame, especially Dragon Tail.
Dragon Tail would totally fail at Blade Shield's damaging frame on srv side, no mana cost, no damage, no releasing charge-ups, yet clt side anims are fine.
Dragon Talon would normally do the multiple kicks, dealing its own damage but without releasing charge-ups.
Dragon Claw seems to be OK, but I modificated its srvstfunc to 28 which is same as Blade Shield to apply a state, don't know if it would be interrupted with vanilla 25.
Dragon Flight seems to be OK as well.

User avatar
Cypress
Moderator
Champion of the Light
Posts: 493
Joined: Fri Dec 01, 2017 2:08 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by Cypress » Fri Feb 16, 2024 11:15 am

Awesome find Nagahaku! From my testing:
•Blade Shield's srvdofunc is causing the interruption (the srvstfunc is like an aura, it will repeat the srvdofunc every perdelay frames, so every time the srvdofunc 54 is repeated, it may interrupt)
•Dragon Talon is also getting interrupted fully like Dragon Tail, it's just that the interruption occurs on a per-kick basis, so when you only have 1 kick you often times miss entirely, but with multiple kicks you'll end up missing only some kicks
•The interruption only occurs while srvdofunc 54 is hitting the target that you want to kick with Dragon Talon or Dragon Tail. I used a Hand Axe with rangeadder=25, and found that, when far away, these kicks will hit like normal. Even when close, the kicks will hit, but only if targeting an enemy that isn't getting hit by srvdofunc 54
•Hurricane (srvdofunc 145) and Armageddon (srvdofunc 146) do not interrupt these kicks when paired with srvstfunc 28, although Hurricane doesn't seem to want to do weapon damage, and Armageddon is slightly random in terms of where its missiles appear, so it won't perfectly mimic Blade Shield's aoe being centered on the player

So probably the best fix for this would be to use srvstfunc 28 with srvdofunc 146, set aurarangecalc=1 and make it shoot missiles that deal weapon splash damage, like ice javalin psrvhitfunc 44. You will lose out on Blade Shield's odd properties, like how it can trigger ctc-on-attack and it's spell physical damage being reduced by srcdam, but otherwise it seems to work okay.

User avatar
nothing5
Junior Member
Champion of the Light
Posts: 335
Joined: Sun May 13, 2007 8:10 pm

Re: The Guide to Almost All Non-Missile Skill Functions

Post by nothing5 » Fri Feb 16, 2024 5:25 pm

An issue concerning Bash:

It seems like after using Bash, its aurastats will persist as long as I keep hitting enemies--and it doesn't matter which skill I use. I am trying to use the Bash function to trigger a CTC effect that is only possible as long as the Bash-granted aurastat is in effect. However, this little feature enables players to use other skills alongside this CTC effect, which makes the class completely OP.

Cypress, or anyone, are you aware of any workarounds? Thanks.

User avatar
Nagahaku
Junior Member
Paladin
Posts: 155
Joined: Sat Nov 30, 2019 1:11 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by Nagahaku » Sat Feb 17, 2024 2:06 pm

Cypress wrote:
Fri Feb 16, 2024 11:15 am
So probably the best fix for this would be to use srvstfunc 28 with srvdofunc 146, set aurarangecalc=1 and make it shoot missiles that deal weapon splash damage, like ice javalin psrvhitfunc 44. You will lose out on Blade Shield's odd properties, like how it can trigger ctc-on-attack and it's spell physical damage being reduced by srcdam, but otherwise it seems to work okay.
Good idea, i tried this and much everything became better. however it would also lose triggering functions, no longer triggering ctc or crush blow, open wounds, so i tried a psrvhitfunc=5 missile to release a small nova. i know NHD sould be used as less as possible, but still prefered triggering functions.

User avatar
Cypress
Moderator
Champion of the Light
Posts: 493
Joined: Fri Dec 01, 2017 2:08 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by Cypress » Sun Feb 18, 2024 4:05 pm

nothing5 wrote:
Fri Feb 16, 2024 5:25 pm
An issue concerning Bash:

It seems like after using Bash, its aurastats will persist as long as I keep hitting enemies--and it doesn't matter which skill I use. I am trying to use the Bash function to trigger a CTC effect that is only possible as long as the Bash-granted aurastat is in effect. However, this little feature enables players to use other skills alongside this CTC effect, which makes the class completely OP.

Cypress, or anyone, are you aware of any workarounds? Thanks.
Hi nothing5, great find! I didn't know it works that way, that is a rather annoying result. The only workaround I can think of is to use a skill that supports a length based aurastate, like Berserk or Frenzy, and make the duration really short maybe like 20 frames or so. You wouldn't lose much, since Bash's added damage is broken/weird anyways.


Nagahaku, you can use hitflags=32 to enable ctc on striking with radial damage, so you don't need to use nextdelay.

User avatar
Nagahaku
Junior Member
Paladin
Posts: 155
Joined: Sat Nov 30, 2019 1:11 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by Nagahaku » Mon Feb 19, 2024 4:38 am

Cypress wrote:
Sun Feb 18, 2024 4:05 pm
you can use hitflags=32 to enable ctc on striking with radial damage, so you don't need to use nextdelay.
thanks, it worked.
and i found an interesting (bug?) for this armaggedon style blade shield: cast it in town, then touch a healer npc, go out to the field and it won't do any damage. no idea what the healer did to it, without touching a healer, it would work normally even casted in town.

GreenDude
Posts: 15
Joined: Sun Jan 31, 2016 2:20 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by GreenDude » Thu Feb 29, 2024 7:53 pm

Sorry to necropost this. @Cypress: In your guide you wrote that fend's par2 allows you to play with attack speed. I just wanted to say this should be edited out of your post because this is a purely client side change. Kingpin had a look at the code and there is no acknowledgement of the par2 value on the two srv side functions so even though you will appear to attack faster visually, you are not hitting faster on the server and thus are actually desyncing yourself.

User avatar
Cypress
Moderator
Champion of the Light
Posts: 493
Joined: Fri Dec 01, 2017 2:08 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by Cypress » Sat Mar 02, 2024 1:43 pm

Hi GreenDude, that's not a necropost at all, I'm always glad to see contributions to our understanding of Diablo 2. However, I'm not so sure that's correct. From my brief testing, the difference between Fend with par2=60 and par2=1 is immediately clear. 60 takes it's time clearing out an area, and 1 seems to attack at 1 frame per attack.

Video evidence:

GreenDude
Posts: 15
Joined: Sun Jan 31, 2016 2:20 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by GreenDude » Sat Mar 02, 2024 11:04 pm

Thanks for the video. In this case it must mean that singleplayer trusts the client for this while online multiplayer doesnt. Otherwise you'd have the client deciding the attack speed on the server. I always thought that even d2's singleplayer still respects the srv side over the client and that mostly seems true which is why srvdo functions will always be the real thing happening and not cltdo but based on your video it does seem like the kill is happening faster on srvdo side. Very strange. Even the cloak of shadows CD is only possible client side although because this one actually restricts the casting on the client end, for singleplayer, this works adequately.

aasa0001
Posts: 17
Joined: Mon Aug 05, 2002 11:55 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by aasa0001 » Sun May 05, 2024 3:03 pm

Is it possible to make hydra or other non-druid funcs to summon pet with caster level or area level?

User avatar
Cypress
Moderator
Champion of the Light
Posts: 493
Joined: Fri Dec 01, 2017 2:08 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by Cypress » Mon May 06, 2024 12:19 am

Hi aasa0001, you can give your pet a 'level' stat bonus. For example, aurastat1=level and aurastat1calc=ulvl. This will give your pet a unit level bonus equivalent to your character level.

aasa0001
Posts: 17
Joined: Mon Aug 05, 2002 11:55 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by aasa0001 » Wed May 08, 2024 5:23 am

Cypress wrote:
Mon May 06, 2024 12:19 am
Hi aasa0001, you can give your pet a 'level' stat bonus. For example, aurastat1=level and aurastat1calc=ulvl. This will give your pet a unit level bonus equivalent to your character level.
Thanks. But:
- When I tried to use it for death-skill/hydra drop (viewtopic.php?t=19228) in D2R, the drop item level is monstats.<pet>.level, not caster level.
Is it that level for item drop is handled differently or D2R changed the behavior?
- I wanted to verify level in other ways, but then I realized that golem/skeleton/valkyrie... have level=<blank> in monstats.
How does non-druid summon skills setup the level for pet? (And how to check pet level?)

User avatar
Cypress
Moderator
Champion of the Light
Posts: 493
Joined: Fri Dec 01, 2017 2:08 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by Cypress » Wed May 08, 2024 10:17 pm

aasa0001, I have updated every pet entry to show the pet level. In the case of Hydra:

•if monstats.txt noratio=0:
◦NORMAL: PET LEVEL=monstats.txt Level
◦NIGHTMARE: PET LEVEL=levels.txt MonLvl2Ex
◦HELL: PET LEVEL=levels.txt MonLvl3Ex
•if monstats.txt noratio=1:
◦NORMAL: PET LEVEL=monstats.txt Level
◦NIGHTMARE: PET LEVEL=monstats.txt Level(N)
◦HELL: PET LEVEL=monstats.txt Level(H)

This means you can either have a consistent pet level by setting noratio=1, or keep noratio=0 and only have pet level scale with area level in Nightmare and Hell. Personally, I wouldn't use Hydra as an item dropper since the number of drops can't easily be controlled through calcs. Using Teeth + monspawn, you can have the number of drops based on a calc. This allows for massive item drops of dozens of items (every monspawn missile created could have up to 6 drops, and you could spawn dozens of missiles for many drops), or make the item dropper even rarer than 1% ctc, since you can also reduce the effective ctc by having a chance to spawn 0 missiles (so instead of 1-100%, you could have fractional values, like 50.5% or 0.5% or 0.0001%).

EDIT: And the way I check for level is to give the pet an aura with aurastat1=fireresist and aurastatcalc1=stat('level'.accr), such that the pet gives fire resistance equivalent to its pet level.

User avatar
Cypress
Moderator
Champion of the Light
Posts: 493
Joined: Fri Dec 01, 2017 2:08 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by Cypress » Sat May 11, 2024 8:57 pm

nothing5 wrote:
Fri Feb 16, 2024 5:25 pm
An issue concerning Bash:

It seems like after using Bash, its aurastats will persist as long as I keep hitting enemies--and it doesn't matter which skill I use. I am trying to use the Bash function to trigger a CTC effect that is only possible as long as the Bash-granted aurastat is in effect. However, this little feature enables players to use other skills alongside this CTC effect, which makes the class completely OP.

Cypress, or anyone, are you aware of any workarounds? Thanks.
I figured out how to fix it in some cases. If your skill has aurastate=concentrate then every other attack will miss. With interrupt=0, you won't have this random missing. So with both, you will lose the aurastate upon swapping due to the concentrate interruption. You still can carry over aurastates if there is another skill with the same two settings, although in which case only the old aurastate will remain while the new aurastate won't get applied until you interrupt.

User avatar
Nagahaku
Junior Member
Paladin
Posts: 155
Joined: Sat Nov 30, 2019 1:11 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by Nagahaku » Wed May 15, 2024 4:57 am

Cypress wrote:
Sun Sep 06, 2020 5:23 pm
[fenris rage] Consume a corpse to gain a state with full aurastats.
(srvdofunc=137; cltstfunc=51,cltdofunc=79 if you want cltmissilea to be released from the consumed corpse)
(aurastate=,auralencalc=,aurastat1-6=; aurastate determines the state applied, auralencalc is the length of the state, all aurastats are applied)
two things about it
1. this srvdofunc is hardcoded to be targeting a 'soft' corpse, changing selectproc won't work. the wolf would always keep trying to eat a skeleton corpse and keep failing.
2. the fenris_rage state (id=138) is the only state that makes the wolf stop eating another corpse through its duration, if another state is applied, the wolf would always try to find a corpse to eat.

User avatar
Cypress
Moderator
Champion of the Light
Posts: 493
Joined: Fri Dec 01, 2017 2:08 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by Cypress » Thu May 16, 2024 11:32 am

Awesome finds Nagahaku! That is annoying that it seems to try and eat non-soft corpses even though they are not valid targets. For player use, selectproc=4 or 6 works good since they preclude soft corpses. I think this is more of a problem of the AI's corpse selection, so I'm not sure if there is a skill related fix. I tried using srvstfuncs that only allow soft corpses, but the AI seems to ignore those too.

Being able to choose if it keeps eating corpses is fun though, in some cases that might be useful, like if you make it so the fenrisrage skill produces damaging missiles as well as the buff. Also more of an AI problem, as noted here: https://d2mods.info/forum/viewtopic.php?f=4&t=65398

User avatar
Nagahaku
Junior Member
Paladin
Posts: 155
Joined: Sat Nov 30, 2019 1:11 am

Re: The Guide to Almost All Non-Missile Skill Functions

Post by Nagahaku » Thu May 16, 2024 5:48 pm

Cypress wrote:
Thu May 16, 2024 11:32 am
I think this is more of a problem of the AI's corpse selection
yes, for a further test, AIs targeting corpse do not check selectproc of a skill, they would target anything that was a corpse. i tried to make a potion finder with CycleOfLife AI, it kept trying to dig potions from skeleton corpses too.

Post Reply

Return to “General Mod Making”