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
Cypress
Moderator
Champion of the Light
Posts: 446
Joined: Fri Dec 01, 2017 2:08 am

The Guide to Almost All Non-Missile Skill Functions

Post by Cypress » Sun Sep 06, 2020 5:23 pm

I was bored and decided to check out how a bunch of skills work. This is the result. Note that I purposely did not cover most skills involving srv/cltmissilea/b/c/d because that is in a separate guide I am working on; I chose to separate them since missile skills work very distinctly and there are a ton of them.

See here for the Guide to Missile Functions: viewtopic.php?f=4&t=67114

This guide is quite lengthy, so I recommend using ctrl+F to find specific skills you are interested in, each entry begins with the name of skills that use the respective function(s).

The only non-missile skills that aren't covered in this guide are: Submerge, Emerge, Self-Resurrect, DiabRun, Suck Blood (I did however hybridize it and found that it was a kicking skill which is bizarre, as described below), FetishAura, EvilHutSpawner, Swarm Move and Jump; these skills either seemed to do nothing when used by a player, or cause crashes.

If you notice any errors, or any notable features given by skills that I missed, then please let me know!

Indicates the function is hardcoded, broken, has no known purpose or is not understood
Indicates the function works, but is either awkward or seems to be an inferior version of another function
Indicates the function works and is highly recommended for use; subsequent green-labeled entries are alternatives that might work just as well
Indicates the function works and has a unique behavior with no available alternatives

THANKS:
Red Havoc for explaining a lot of monster functions (viewtopic.php?t=1073)
Ogodei and LadyIsabelle for finding out how broken Shadow Warrior/Master are (viewtopic.php?t=66555)
Nefarius for his description of charge-ups (viewtopic.php?t=48854)
The Amazon Basin Wiki for their detailed skill descriptions
Riv for finding that srvdofunc 30 does not get applied to monsters with mWL=0
Nagahaku for noticing that Enchant cannot apply auraevents and for describing Iron Golem fade, for finding that Hydra can summon multiple leashed pets without crashing, for finding that Blade Shield's srvdofunc 54 interrupts Dragon Talon and Dragon Tail
AlisonHell for finding that Baal Corpse Explode can deal damage, that Double Swing's cltstfunc 27 works perfectly with Bash's srvstfunc 32 allowing the attack rate bonus to be synchronized, fully describing Static Field's clc2 mindamage, fully describing Telekinesis's srvstfunc
eleriaqueen for finding that Vengeance cannot apply added elemental damage
Conqueror for finding that srvdofunc 49 (seen on Assassin Shadow pets) can have a limited lifespan; Woestave for finding that Conqueror found this
Alranyr for finding that srvdofunc 49 doesn't like to use sumskill# auras
Kong for noticing that srvdofunc 131 can apply to both allies and enemies; that maggotegg gives experience; for asking to check if poisonlengthresist also applies to other auras

---

[ATTACKS] This section describes attacking skills.
[OTHER ATTACKS] This section describes unusual attack skills that use damage from shields or boots.
[SEQUENCE] This section describes skills that require sequences.
[SPELLS] This section describes skills that carry out some unusual function that doesn't involve weapon damage, states nor sequences.
[STATES] This section describes skills that aren't attacks but do apply states.
[PETS] This section describes skills that use the summon and pet columns.
[SUMMONS] This section describes skills that use the summon columns, but not the pet columns.
[USEFUL CLTFUNCS]
[GENERALIZED NON-FUNCTIONS] This section describes skill features that may seem as if they are unique to a function, but are in fact more generally applicable.
[SRVSTFUNC] This skill describes srvstfunc that are generally useful; a number of srvstfunc are not listed because their only known use is with a specific srvdofunc

[SKILLS AS AURAS] An analysis of various skill functions when applied as auras (aura=1, periodic=1, perdelay=).
[CHARGE-UPS] A list of functions which can set or build up charges.
[FINISHING MOVES] Skills which can release charge-ups and can use the finishing column.
[HARDCODED ID LISTING] A list of skills which are hardcoded in some way to their original row ID.

--------------------------


[ATTACKS]


[ATTACK] Hardcoded so that in ID=0, it is the only skill that allows the main-hand and off-hand weapon to be swapped on each use. When in any other ID, this skill only attacks with the main-hand.
(srvdofunc=1)
(SrcDam=)
(note: in vanilla, it also uses srvstfunc=1, cltstfunc=1, cltdofunc=1 but these do not seem to do anything)
(note: for dual wielding, you can even remove srvdofunc=1 if it is from ID=0 and it'll still attack, but it won't swap hands)

[Left Hand Swing] {}

[KICK] Always "hits" and always rolls chance to cast on attack and on striking despite not dealing any damage (descdam=2, the default, wrongly thinks it gains damage). It also always applies normal knockback. Seems to be required in ID=1 for kicking objects to work properly. Interesting to note that you can add a srvmissile to Kick and it will be released every time you kick a barrel or urn. You could use this to occasionally spawn bonus items, monsters, or even randomized events.
(srvstfunc=2,srvdofunc=2)
(aurastate=,auratargetstate=,auralencalc=,aurastat1-6=; applies aurastate to the player while the animation is playing, and applies the auratargetstate to the hit target for as long as auralencalc, uses all aurastats; hitting the target again causes the state to toggle off)
(interrupt=1; if this is not set, then it will interrupt itself on subsequent uses, causing major desync issues)
(note: in vanilla, it uses cltstfunc=0, cltdofunc=0, but I do not notice any differences, and I do not even think these are valid func IDs)


[THROW] Releases the missile assigned in weapons.txt in the direction you click. Hardcoded such that Throwing Mastery stats will not apply unless the skill is ID=2.
(srvdofunc=3,cltdofunc=2)
(note: in vanilla, it has srvstfunc=65,cltstfunc=2, but these do not seem to do anything)


[LEFT HAND THROW] Releases the missile assigned in weapons.txt in the direction you click of a throwing weapon, but only if you are dual-wielding throwing weapons (trying to use this function when you are not dual-wielding will cause a crash). Hardcoded such that Throwing Mastery stats will not apply unless the skill is ID=3.
(srvdofunc=5,cltdofunc=2)
(weapsel=1; otherwise will throw your main-hand weapon)
(note: in vanilla, it has srvstfunc=65,cltstfunc=2, but these do not seem to do anything)

[Impale] Attack a target in melee range and modify your weapon if you successfully hit. Can apply a state to both the player and target. For non-stacked weapons, this skill can increase or decrease the durability. For stacked weapons, this skill will always reduce stack size by 1 regardless of clc3.
(srvstfunc=7,srvdofunc=2)
(aurastate=,auratargetstate=,auralencalc=,aurastat1-6=; applies aurastate to the player while the animation is playing, and applies the auratargetstate to a target within melee range for as long as auralencalc, uses all aurastats; hitting the target again causes the state to toggle off)
(range=h2h; not required but recommended)
(clc1=damagepercent added to each hit)
(clc2=chance to modify durability of your weapon)
(clc3=amount of durability to add or subtract to your weapon; positive numbers reduce durability, negative numbers increase durability; added durability can go over maxdurability; does not affect stacked weapons)
(clc4=damage converted to etype; multiplies damage by every % over 100%)
(tohit,levtohit,tohitcalc)
(srcdam=,etype=,emin/emax,elen)
(NOTE: this skill ignores stats that double damage, like deadly strike and critical strike)

[Charged Strike] Attack that releases zig-zagging missiles.
(srvstfunc=6,srvdofunc=11,cltdofunc=19)
(range=h2h; not required but recommended)
(srv/cltmissilea=; released in a zig-zag)
(clc1=number of srv/cltmissilea to release AND damagepercent added to each hit)
(clc4=damage converted to etype; multiplies damage by every % over 100%)
(srcdam=,etype=,emin/emax,elen)

[Lightning Strike] Attack that releases a chaining missile. Adds lightning damage to attacks and converts attack damage to an element of choice, making it the only skill able to do multielemental (lightning + a second, converted element) damage without using the stat columns.
(srvstfunc=10,srvdofunc=14,cltdofunc=22)
(clc1=radius to seek targets AND damagepercent added to each hit)
(clc2=number of targets to hit)
(clc4=damage converted to etype; seems to cap at around 255%)
(etype=,emin/max=; regardless of the etype it will be added to your attack as lightning damage)

[Fend] Unlike most vanilla sequenced skills, this one works fine with any anim, sequence or not, it seems to automatically go into a sequence after the first anim is finished. Attacks additional targets around you automatically, up to once each, repeating the same anim each time for each attack.
(srvstfunc=9,srvdofunc=13,cltstfunc=14,cltdofunc=21)
(range=h2h; not required but recommended)
(anim=; anything should work well, including sequences)
(clc1=number of targets within melee range to hit once each)
(clc2=damagepercent added to each hit)
(clc4=damage converted to elem; multiplies damage by every % over 100%)
(par2=frame rollback; modifies sequence speed, oddly seems like sometimes a lower value is faster and sometimes a higher value is faster, depending on the weapon and anim)
(tohit,levtohit,tohitcalc)
(srcdam=,etype=,emin/emax,elen)

[Poison Dagger] A seemingly redundant attack skill, especially given that it requires both srvstfunc and srvdofunc to be able to do anything (although you can create working hybrids with other skills).
(srvstfunc=16,srvdofunc=32)
(range=h2h; not required but recommended)
(clc1=damagepercent added to each hit)
(clc4=damage converted to elem; multiplies damage by every % over 100%)
(tohit,levtohit,tohitcalc)
(srcdam=,etype=,emin/emax,elen)

[Sacrifice] A fairly varied attack that gets flags and all of the usual columns. Does not apply damage doubling, nor damage to undead/demons.
(srvstfunc=29,srvdofunc=64)
(range=h2h; not required but recommended)
(clc1=damagepercent added to each hit)
(clc2=percent of physical damage to deal to self)
(clc4=damage converted to elem; multiplies damage by every % over 100%)
(tohit,levtohit,tohitcalc)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects)
(srcdam=,etype=,emin/emax,elen)
(note: in vanilla, it has cltdofunc=34, which allows you to release cltmissilea on each attack, but it isn't necessary for the skill to animate properly)

[Zeal][Fury] Releases a normal hit, followed by more hits that can be sped up.
(srvstfunc=37,srvdofunc=13,cltstfunc=53,cltdofunc=21)
(range=h2h; not required but recommended)
(clc1=number of hits)
(clc2=damagepercent added to each hit)
(clc4=damage converted to elem; multiplies damage by every % over 100%)
(param2=frame rollback; modifies the speed of the hits beyond the first)
(tohit,levtohit,tohitcalc)
(srcdam=,etype=,emin/emax,elen)

[Charge][SerpentCharge] Moves the user toward the selected point with a par1-controlled movement speed changer, surprisingly does not require a sequence. Always attempts to cause knockback and applies the bash overlay effect.
(srvstfunc=31,srvdofunc=67,cltdofunc=37)
(clc1=damagepercent added to each hit)
(clc4=damage converted to elem; multiplies damage by every % over 100%)
(par1=percent increase in velocity; does not use the actual stat velocitypercent, but is additive with it; negative values work, which can allow for moonwalking; if modifier cancels out total speed charging will occur immediately, which lets you release srv/cltmissiles every frame)
(tohit,levtohit,tohitcalc)
(srcdam=,etype=,emin/emax,elen)
(note: cltstfunc=25 is used in vanilla, but does not seem to be necessary)

[Conversion] An attack that has a chance to convert monsters. Unfortunately, cannot apply aurastats to the converted monster.
(srvstfunc=32,srvdofunc=79)
(aurastate=,auratargetstate=,auralencalc=,aurastat1-6=; applies aurastate to the player while the animation is playing, and applies the auratargetstate to a target within melee range for as long as auralencalc; note that the aurastats only apply to the player, not to monsters even if converted)
(range=h2h; not required but recommended)
(clc1=chance to convert a monster for as long as auralencalc)
(clc4=damage converted to elem; multiplies damage by every % over 100%)
(tohit,levtohit,tohitcalc)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects)
(srcdam=,etype=,emin/emax,elen)

[Bash][Stun][Concentrate] An attack that does almost everything, including states, full clcs (damage%, drain damage, speed and conversion), elemental damage/length, hit chance and resultflags/hitflags/hitclass. This is one of the ultimate plain-attack functions.
(srvstfunc=32,srvdofunc=2)
(aurastate=,auratargetstate=,aurastat1-6=; applies aurastate to the player while the animation is playing, and applies the auratargetstate to the hit target for as long as auralencalc, uses all aurastats; hitting the target again causes the state to toggle off)
(cltsfunc=27; required for animations to synchronize with the calc3 attackrate bonus, has cltcalc1 which determines cltside 'attackrate' bonus)
(cltcalc1=cltside attackrate bonus; gives 'attackrate' stat to the user equivalent to the input, this is only cltside so this will make you animate faster but not deal damage faster)
(range=h2h; not required but recommended)
(clc1=damagepercent added to each hit)
(clc2=drain damage to add to each hit; this damage only counts towards life/mana steal and is only reduced by drain resistance)
(clc3=srvside attackrate bonus; gives 'attackrate' stat to the user equivalent to the input, this is only srvside so while you will deal damage faster, your character won't appear to swing faster without cltstfunc 27 and cltcalc1=clc3)
(clc4=damage converted to elem; multiplies damage by every % over 100%)
(tohit,levtohit,tohitcalc)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects)
(srcdam=,etype=,emin/emax,elen)

[Vengeance] An attack that gets deals physical damage as additional fire/cold/lightning damage. Notably, it is one of the few attacks that does not allow for damage conversion nor added elemental damage. Hits always apply overlays in the successive order of fire_hit (ID=81), ice_explode (ID=36), lightning (ID=1), even if you don't deal any damage of one of those three elements.
(srvstfunc=35,srvdofunc=2)
(aurastate=,auratargetstate=,aurastat1-6=; applies aurastate to the player while the animation is playing, and applies the auratargetstate to the hit target for as long as auralencalc, uses all aurastats; hitting the target again causes the state to toggle off)
(range=h2h; not required but recommended)
(clc1=percent of base damage to add as additional fire damage)
(clc2=percent of base damage to add as additional cold damage)
(clc3=percent of base damage to add as additional lightning damage)
(tohit,levtohit,tohitcalc)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects)
(srcdam=,elen=; elen is applied as coldlength regardless of etype)

[Fire Claws] A simple attack with only one calc. Useful if you want to use calcs 2-4 for something else.
(srvstfunc=58,srvdofunc=2)
(aurastate=,auratargetstate=,aurastat1-6=; applies aurastate to the player while the animation is playing, and applies the auratargetstate to the hit target for as long as auralencalc, uses all aurastats; hitting the target again causes the state to toggle off cltside and will not be re-enabled cltside until auralencalc fully elapses but will still be active srvside)
(clc1=damagepercent added to each hit)
(tohit,levtohit,tohitcalc)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects)
(srcdam=,etype=,emin/emax,elen)

[Berserk] An attack that can apply a state to self and the enemy for set, independent durations. Also applies most other features, including elemtype/len, resultflags/hitflags/hitclass, toht and a few clcs to play with.
(srvstfunc=39,srvdofunc=2)
(aurastate=,auratargetstate=,auralencalc=,aurastat1-6=; applies aurastate to the player for as long as calc2, and applies the auratargetstate to the hit target for as long as auralencalc, uses all aurastats; hitting the target again causes the state to toggle off)
(range=h2h; not required but recommended)
(clc1=damagepercent added to each hit)
(clc2=duration of aurastate on user when attacking in melee range)
(clc4=damage converted to elem; multiplies damage by every % over 100%)
(tohit,levtohit,tohitcalc)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects)
(srcdam=,etype=,emin/emax,elen)

[Power Strike] Attack a target and add damage, and apply states to self and target. Note that tohit,levtohit,tohitcalc do NOT work despite the vanilla skill thinking they do.
(srvstfunc=6,srvdofunc=2)
(aurastate=,auratargetstate=,auralencalc=,aurastat1-6=; applies aurastate to the player while the animation is playing, and applies the auratargetstate to a target within melee range for as long as auralencalc, uses all aurastats; hitting the target again causes the state to toggle off)
(range=h2h; recommended but not required)
(clc1=damagepercent added to each hit)
(clc4=damage converted to etype; multiplies damage by every % over 100%)
(srcdam=,etype,emin/emax,elen)

[Double Swing] An attack that can increase attack rate, surprisingly does not require a sequence, so you can use it with a single weapon. Does not actually require you to dual wield.
(srvdofunc=70,cltstfunc=27; cltdofunc=39 should only be used if you are dual wielding, I think it controls the double hitting sound and maybe some other dual wielding stuff)
(range=h2h; not required but recommended)
(aurastate=,aurastat1-6=; applies aurastate to the player while the animation is playing, uses all aurastats)
(cltcalc1=cltside attack rate bonus; probably should set this to reference clc3)
(clc1=damagepercent added to each hit)
(clc3=srvside attack rate bonus; determines how much faster you actually attack; doesn't work well with certain animations so be cautious as to which weapons/anims you use and allow)
(clc4=damage converted to elem; multiplies damage by every % over 100%)
(tohit,levtohit,tohitcalc)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects)
(srcdam=,etype=,emin/emax,elen)

[Frenzy] Attack that activates a auralencalc controlled state on the second attack in a row, does not actually require two weapons, nor does it require a sequence. The aurastat values of the state can scale with the number of hits if using dm/ln/lvl, with each hit setting the stat to the max value of that given level (so the first hit is level 1, the second is level 2, etc).
(srvdofunc=9; cltdofunc=39 should only be used if dual wielding)
(range=h2h; not required but recommended)
(aurastate=,auralencalc,aurastat1-6=; applies aurastate to the player for as long as auralencalc, uses all aurastats; for aurastat clcs, lvl is equivalent to the number of hits beyond the first)
(clc1=damagepercent added to each hit)
(clc4=damage converted to elem; multiplies damage by every % over 100%)
(tohit,levtohit,tohitcalc)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects)
(srcdam=,etype=,emin/emax,elen)

[monfrenzy][BloodLordFrenzy] Attack that activates an auralencalc controlled state on the first attack. Aurastat value of dm/ln/lvl scales with number of hits, with each hit being equivalent to an additional level. Basically, the same as Frenzy but only requiring a single hit to activate the aurastate instead of two. This skill also doesn't get elemental conversion.
(srvdofunc=109)
(range=h2h; not required but recommended)
(aurastate=,auralencalc,aurastat1-6=; applies aurastate to the player for as long as auralencalc, uses all aurastats; for aurastat clcs, lvl is equivalent to the number of hits beyond the first)
(clc2=damagepercent added to each hit)
(tohit,levtohit,tohitcalc)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects)
(srcdam=,etype=,emin/emax,elen)
(NOTE: vanilla monfrenzy uses srvstfunc=64, but this doesn't seem to do anything; vanilla bloodlordfrenzy uses srvstfunc=37 but I didn't bother checking if it does anything relevant to non-bloodlords)

[Feral Rage][Maul] An attack that gives the user a state that can accumulate aurastat with subsequent hits.
(srvstfunc=56,srvdofunc=120)
(range=h2h; not required but recommended)
(aurastate=,auralencalc,aurastat1-6=; applies aurastate to the player for as long as auralencalc, uses all aurastats; for aurastat clcs, lvl is equivalent to the number of hits, up to a maximum of clc2)
(clc1=damagepercent added to each hit)
(clc2=max lvl of charge; this sets it so that when you use lvl in any aurastat calculation, the lvl value will increase by 1 per attack until it hits this value)
(clc4=damage converted to elem; multiplies damage by every % over 100%)
(tohit,levtohit,tohitcalc)
(srcdam=,etype=,emin/emax,elen)


[Fists of Fire][Claws of Thunder][Blades of Ice] Allow you to build-up charges on each attack, which can be released to execute specific functions. Read viewtopic.php?t=48854 for a better explanation than I can give.
(srvdofunc=35)
(srvprgfunc1/2/3,prgcalc1/2/3,prgdam,cltprgfunc1/2/3; prgfunc allows you to control which srv/clt functions to call upon when releasing respective charges, with prgcalc1/2/3 allowing executing some specific modifications to the skill function; prgdam has a few different results depending on the input, see the above linked guide)
(aurastate=,auralencalc,aurastat1=,aurastat2=; note that the aurastate must have pgsv=1 or it won't build up charges properly)
(range=h2h; not required but recommended)
(progressive=1; otherwise it won't gain charges)
(calc1=elem conversion%; converts physical damage to elemental on the hit which releases charges, conversion seems to cap at 100%; only occurs if under prgdam=4)
(tohit,levtohit,tohitcalc)
(srcdam=,etype=,emin/emax,elen; notably, emin/emax and elen are only released when the charges are released under prgdam 3 or 4)
(NOTE: in vanilla, these skills use srvstfunc=23, but it doesn't seem to do anything important)


[Tiger Strike][Cobra Strike][Phoenix Strike] I was unable to find any difference between these and the specific elemental charge-up functions. Notably, in vanilla these skills do not use prgstack, whereas the others do, but from what I can tell these can use prgstack by just setting it =1. If there is an actual difference in features, then I can't find it.
(srvdofunc=34)


[Dragon Claw] An attack that always acts as a finishing move; surprisingly, does not require finishing=1. Useful and versatile seeing as it has an open srvstfunc and is one of a few skills (one of two regular, weapon-based attacks; the other being Attack) that can act as a finishing move. Does not require a sequence despite using one normally.
(srvdofunc=46)
(range=h2h; not required but recommended)
(clc1=damagepercent added to each hit)
(clc4=damage converted to elem; multiplies damage by every % over 100%)
(tohit,levtohit,tohitcalc)
(srcdam=,etype=,emin/emax,elen)
(NOTE: vanilla dragon claw uses srvstfunc=25, but this doesn't seem to do anything)


[Blade Shield] This skill is described in two different sections because its function massively changes based on how you configure it, and both the srvstfunc and srvdofunc have interesting capabilities. This section describes Blade Shield's srvdofunc, it is perhaps the most unique attack skill in the game. It deals area of effect damage, every hit of which to each monster can apply effects, so you can trigger ctc on attack or striking numerous times in a single use. It also gains non-weapon mindam/maxdam (meaning it is like spell damage), which no other non-kicking attack skills gain. Unfortunately, this attack has the same range constraints as the state-based Blade Shield, which makes it really awkward to use with any weapon with added melee range (the only vanilla item types that work nicely are daggers, wands, orbs, bows, crossbows and non-javelin throwing weapons). It doesn't seem to have any clcs, but you can easily add a state onto it since it does not require a srvstfunc which can apply damagepercent as a stat.
(srvdofunc=54)
(range=h2h; not required but strongly recommended if using without Blade Shield's srvstfunc)
(tohit,levtohit,tohitcalc)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects on each attack; by default, it uses 32/0/3; resultflag=32 prevents quite a few effects from being applied, like ctc on striking and crushing blow)
(kick=; seems to be able to benefit from the kick column, {barely tested how it works exactly})
(srcdam=,mindam/maxdam,etype=,emin/emax,elen; note that mindam/maxdam is NOT weapon damage, so it will not be enhanced by strength/dexterity/damagepercent, but it will be modified by srcdam)

[AssDoAreaAttack] {Seems identical to Blade Shield's srvdofunc 54}
(srvdofunc=142)

[Hunger]
(srvdofunc=122)
(clc1=a multiplier to physical damage that applies after everything else; can be positive or negative; so if you have 100 damage, 50% enhanced damage and -75% damage from hunger, you will deal 100*1.5*0.25=37.5 damage)
(clc2=lifesteal percent; negative values show leeching, but do not do anything)
(clc3=manasteal percent; negative values show leeching, but do not do anything)
(tohit,levtohit,tohitcalc)
(srcdam=,etype=,emin/emax,elen)

------

[OTHER ATTACKS]


[Smite] Attacks with a shield; does nothing if you are not wielding a shield. Cannot miss; ignores hit chance and blocking, uses the damage of your shield. Ignores numerous properties that are usually applied to weapons (+damage, dmg% to a monster type, damage doubling, elemental damage, life/mana steal). Despite not adding elemental damage from items, it does add elemental damage from the elemental damage columns.
(srvdofunc=150)
(range=h2h; not required but recommended)
(clc1=damagepercent added to each hit)
(clc2=length of stun from each hit, in frames)
(etype=,emin/emax,elen)


[Dragon Talon] Attacks with boots (meaning it can follow kicking rules, adding damage from str/dex, etc). Uniquely, kicking attacks make use of the mindam/maxdam (added physical damage) columns, which is particularly fortunate for Dragon Talon considering that the kick damage% is determined by param1/2, which do not accept calculations.
(srvstfunc=24,srvdofunc=42,cltstfunc=6,cltdofunc=4)
(range=h2h; not required but strongly recommended)
(clc1=number of kicks per use)
(clc2=knockback chance on the last kick, versus uniques)
(clc3=knockback chance on the last kick, versus bosses)
(clc4=knockback chance on the last kick, versus players)
(param1=base percent kick damage; note that percent kick damage is multiplicative with percent damage when being applied to kick damage added by str/dex)
(param2=additional percent kick damage per level)
(tohit,levtohit,tohitcalc)
(kick=1; without this, your attack will not gain kick damage from str/dex)
(mindam/maxdam,etype=,emin/emax,elen)


[Dragon Tail] Attacks with boots (meaning it can follow kicking rules, adding damage from str/dex, etc). Produces a fire explosion within aurarangecalc based on the amount of kick damage you deal to a target. Uniquely, kicking attacks make use of the mindam/maxdam (added physical damage) columns; in the context of Dragon Tail, this also massively boosts the fire explosion since the added mindam/maxdam counts as kick damage. Only deals fire radial damage, changing etype will not change radial damage.
(srvstfunc=27,srvdofunc=50; cltdofunc=7 only if you want to produce cltmissilea)
(aurarangecalc=; radius of fire explosion)
(h2h; not required but recommended)
(clc1=percent fire explosion damage; adds physical damage dealt as additional radial fire damage, where =0 means no fire radial damage, =50 means half of physical added as fire, =100 means all of your physical added as fire; so if you have =237 and you deal 505 kick damage to an enemy, then radial fire damage is ~1196)
(param4=Attack rate modifier; gives you an equivalent amount of the 'attackrate' stat while using this skill)
(tohit,levtohit,tohitcalc)
(kick=1; without this, your attack will not gain kick damage from str/dex)
(mindam/maxdam,etype=,emin/emax,elen)
(NOTE: vanilla dragon tail uses cltstfunc=9, but it doesn't seem to do anything)


[Suck Blood] This is a hybrid skill using Suck Blood and a common attack srvdofunc, srvdofunc=2; it could probably be used with other attack srvdofuncs. It ignores all added non-skill damage, but the skill's physical damage can be increased by +dmg% (but not by str/dex). What this skill does is act as an attack skill and appends life steal to each hit equivalent to percent damage. It's kind of like a kick skill that doesn't use boot damage.
(srvstfunc=60,srvdofunc=2)
(range=h2h; not required but recommended)
(aurastate=,auratargetstate=,aurastat1-6=; applies aurastate to the player while the animation is playing, and applies the auratargetstate to the hit target for as long as auralencalc, uses all aurastats; hitting the target again causes the state to toggle off)
(clc1=percent damage)
(clc2=life leech%)
(tohit,levtohit,tohitcalc)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects)
(kick=1; without this, your attack will not gain damage from str/dex, but you will gain access to mindam/maxdam columns)
(mindam/maxdam,etype=,emin/emax,elen)
(NOTE: in vanilla, suck blood uses srvdofunc=127, but this causes the game to crash, so I instead tried salvaging it with a different function)


-----

[SEQUENCE]

[Jab] Uses a sequence to release hits in melee range; if you do not use a sequence, then it will only hit according to normal animation rates. The sequences used work differently, seemingly sped up (when comparing Concentrate and Jab using Whirlwind sequence, Jab kills way faster).
(srvdofunc=7)
(range=h2h; recommended but not required)
(anim=SQ or other,seqnum=; you can choose not to use SQ, but then you will lose most of the special features of this skill; the seqnum changes how this skill works, for example if you use whirlwind's then it will rapidly hit for as long as you hold down, if you use jab's then it will rapidly hit three times in a row)
(clc1=damagepercent added to each hit)
(clc4=damage converted to etype; multiplies damage by every % over 100%)
(tohit,levtohit,tohitcalc)
(srcdam=,etype,emin/emax,elen)
(note: has srvstfunc=5 in vanilla, but it doesn't seem to be necessary)

[Leap] Requires a sequence, but most sequences won't work and results are different for different characters. You can't make it release missiles without breaking it and there is no state attached to it. Not very useful for doing anything except an almost exact Leap clone. Speed of Leap increases is modified based on charstats.txt RunVelocity.
(srvstfunc=40,srvdofunc=77,cltstfunc=29,cltdofunc=43)
(aurarangecalc=; leaping distance)
(anim=SQ,seqnum=; only works properly with some sequences, and sequences that work for one character might not work for another)
(useattackrate=0; otherwise it will be jittery and messed up)
(clc1=radius of knockback around landing point)


[Leap Attack] Requires a sequence, but most sequences won't work and results are different for different characters. You can't make it release missiles without breaking it and there is no state attached to it. Not very useful for doing anything except an almost exact Leap Attack clone. Speed of Leap Attack is modified based on charstats.txt RunVelocity.
(srvstfunc=41,srvdofunc=78,cltstfunc=30,cltdofunc=44)
(anim=SQ,seqnum=; only works properly with some sequences, and sequences that work for one character might not work for another)
(useattackrate=0; otherwise it will be jittery and messed up)
(clc1=damagepercent added to each hit)
(clc4=damage converted to elem; multiplies damage by every % over 100%)
(tohit,levtohit,tohitcalc)
(srcdam=,etype=,emin/emax,elen)


[Whirlwind] A moving attack. Technically does not require a sequence, but is really awkward without one. Will not trigger chance to cast while animating.
•Attack speed (I think this also applies to range? hard to tell) is based entirely on the main-hand, the off-hand is irrelevant (so if a barb has a Grief PB and a 0% IAS Legendary Mallet, then he will hit 12.5 APS with the PB on the main-hand and 2.08 APS with the Legendary Mallet on the main-hand)
•If dual-wielding with a usable weapon and a broken weapon, then the usable weapon will count for all attacks as if you were dual-wielding it twice (so if you have a Grief PB and a Broken Dagger, then your Grief PB will attack at 12.5 APS and the Broken Dagger at 0 APS)
•Two-handed swords use one-handed breakpoints, even when equipped with both hands (this seems to hold true even for non-barbs)
(srvstfunc=38,srvdofunc=76,cltstfunc=31,cltdofunc=45)
(aurastate=,aurastat1-6=, auraevents; applies aurastate to the player while the animation is playing, uses all aurastats)
(weapsel=2,anim=SQ,seqnum=; using non-SQ will cause it to be very slow and virtually unusable; usually you will want seqnum=11, the default, but some other seqs also work well enough)
(clc1=damagepercent added to each hit)
(param3=attacks per tick; supposedly gives an additional chance to hit if it misses per attempt at an attack, although I didn't notice a difference in practice, might have very low limits which would make hard to confirm)
(tohit,levtohit,tohitcalc)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects)
(srcdam=,etype=,emin/emax,elen)


[Dragon Flight] A target specified warp that only attacks if you use an attacking sequence. Attacks with boots (meaning it can follow kicking rules, adding damage from str/dex, etc). Kicking attacks make use of the mindam/maxdam (added physical damage) columns, which is particularly fortunate for Dragon Flight considering that the kick damage% is determined by param1/2, which do not accept calculations.
(srvdofunc=52)
(aurarangecalc=; the radius from the user for selecting targets that it will warp and then attack)
(warp=1; otherwise will fade to black after each use)
(anim=SQ or other,seqnum=; requires an attacking sequence if you want it to attack e.g. whirlwind or dragon flight sequence, if you only want it to teleport then any anim is fine)
(param1=base percent kick damage; note that percent kick damage is multiplicative with percent damage when being applied to kick damage added by str/dex)
(param2=additional percent kick damage per level)
(tohit,levtohit,tohitcalc)
(kick=1; without this, your attack will not gain kick damage from str/dex)
(mindam/maxdam,etype=,emin/emax,elen)
(NOTE: vanilla dragon flight also uses srvstfunc=12 and cltstfunc=5, but these do not seem to do anything)


[Fire Hit] An attack that should use a sequence (but doesn't have to, but you really should use a sequence). Most notably, it applies an aurastate while you are using a sequence and has access to most of the usual columns.
(srvstfunc=42,srvdofunc=83)
(aurastate=,aurastat1-6=; applies aurastate during the anim and maintains it until the user moves, uses all aurastats)
(range=h2h; not required but recommended)
(anim=SQ,seqnum=; strongly recommended to use a sequence, you technically can use a non-sequence, but it will cause the user to be broken until they move, but has the amusing side effect of keeping the aurastate active indefinitely)
(clc1=damagepercent added to each hit)
(clc4=damage converted to elem; multiplies damage by every % over 100%)
(tohit,levtohit,tohitcalc)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects)
(srcdam=,etype=,emin/emax,elen)

[Mosquito] A melee damage spell. Technically does not require a sequence, but you want to use a sequence with it given that it allows a great amount of sequence customization. Deals a lot of damage types.
(srvstfunc=55,srvdofunc=107; cltstfunc=42,cltdofunc=62 are only necessary if you are using a sequence and want it to do multiple loops)
(clc1=min loops; minimum number of times to repeat a sequence if you are using a sequence)
(clc2=max loops; maximum number of times to repeat a sequence if you are using a sequence)
(clc3=life gained; gains life based on the amount of physical damage the spell deals regardless of how much damage you actually deal to the enemy, this means it ignores physical resistance, it also ignores drain resistance; also allows for negative values to do the opposite)
(param1=reset loop frame; chooses the frame at which the sequence starts over, so you probably want to make sure your given sequence does not reset before the activation frame occurs)
(range=h2h; not required but recommended)
(mindam/maxdam,; value is dealt as physical damage and mana damage)
(etype=,emin/emax,; value is dealt as physical damage and whatever element you set etype to)
(elen=value is dealt as poison duration, doesn't seem to do poison damage unless you make the etype pois)

-----

[SPELLS]

[Static Field] Deals damage in a defined radius of a defined element. Calc1 determines the percentage of life taken from the target, while calc2 determines the amount of elemental damage dealt to the target in 256ths, so 25600 would deal 100 lightning damage. Only calc1 or calc2 applies, whichever would deal more damage. So if calc1=25 and calc2=25600, then a monster with 200 life will take 100 damage and a monster with 1000 life will take 250 damage. Both damages are dealt as elemental, so resistances apply. Both damages are capped by DifficultyLevels.txt StaticFieldMin.
(srvdofunc=20)
(aurarangecalc=radius of damage)
(clc1=damage %; percent of current monster life removed if that damage would be greater than the flat min damage, damage type is based on etype and can be resisted)
(clc2=min damage; deals flat 256ths elemental damage if that damage would be greater than the percentage damage, damage type is based on etype and can be resisted)
(etype=,elen; uses etype for its damage and applies elen to monsters in radius)

[Telekinesis] Deals physical and/or elemental damage to a selected target, and also applying resultflags/hitflags/hitclass. Can pick up items that have one of the following itemtypes code (or an equiv that links to that code, which means you can make it pick up all items again just like in the old days): gold, xboq, bowq, poti, key, scro.
(srvdofunc=21)
(par2=chance to knockback)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects; by default it is set to 5/2/109)
(mindam/maxdam,etype=,emin/emax,elen)

[Psychic Hammer] Deals physical and/or elemental damage to a target. Has special knockback settings, allowing for control over chances against different types.
(srvdofunc=33; also has srvstfunc=22, but does not seem to be necessary)
(calc1=knockback% vs. monster; normal monsters only)
(calc2=knockback% vs. unique; champion & unique monsters only)
(calc3=knockback% vs. boss; monsters with boss=1 only)
(calc4=knockback% vs. player)
(mindam/maxdam,etype=,emin/emax,elen)

[DiabCold] Damages the selected target and chills/freezes them for as long as elen.
(srvdofunc=100)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects)
(etype=,emin/emax,elen; regardless of etype, it will freeze/chill for as long as elen)

[Teleport] Immediately teleports the user to the clicked point.
(srvdofunc=27)
(warp=1; not required, but without it you will fade from black after every use)

[monteleport][Teleport 2][Baal Teleport][Baal Clone Teleport] Like Teleport, but if you select a target it will warp you backwards.
(srvdofunc=98)
(warp=1; not required, but without it you will fade from black after every use)
(NOTE: vanilla teleport 2 and baal teleport use cltstfunc=48,cltdofunc=73 which produce cltmissilea/b on start/end)

[Imp Teleport] Similar to Teleport, but it doesn't have any collision issues. If a bunch of monsters use this on a player, then the monsters will neatly stack up into a perfect pile.
(srvdofunc=129)
(warp=1; not required, but without it you will fade from black after every use)
(NOTE: vanilla imp teleport uses cltstfunc=48,cltdofunc=74 which produce cltmissilea/b on start/end)


[Find Potion] Consume a corpse for a chance to get a healing, mana or rejuvenation potion.
(srvdofunc=69; cltdofunc=38 only if you want the corpse to release blood droplets)
(searchenemynear=1,selectproc=4,targetcorpse=1; this will allow it to select specific corpses, as well as nearby corpses)
(clc1=chance for a consumed corpse to drop a potion)
(param1=chance of getting a heart; probably doesn't do anything)
(param2=chance of getting a healing potion; doesn't actually matter since this is the default selection and is overridden by the other two)
(param3=chance of getting a mana potion; this takes priority over health and rejuvenation)
(param4=chance of getting a rejuvenation potion; this takes priority over health)
(NOTE: vanilla find potion has srvstfunc=33,cltstfunc=26, but these do not seem to do anything)

[Find Item] Consume a corpse for a chance to drop its treasureclass a second time.
(srvdofunc=72; cltdofunc=40 only if you want blood droplets after use)
(searchenemynear=1,selectproc=5,targetcorpse=1; this will allow it to select specific corpses, as well as nearby corpses)
(clc1=chance for a consumed corpse to re-drop items)
(param1/2/3/4=supposedly change minheart/maxheart/quality/magic item drop chance, but I saw no differences in my testing)
(NOTE: vanilla find item has srvstfunc=34 and cltstfunc=28, but these do not seem to do anything)

[Mind Blast] A radial explosion that can be limited via filters. Can convert targets.
(srvdofunc=51,cltdofunc=8; cltdofunc=8 is only necessary if you want cltmissilea/b to be released over the radius)
(aurafilter=makes it so only those filtered for are affected by the skill)
(aurarangecalc=radius of effects)
(par3=conversion length min; minimum conversion duration in frames, seems to convert for at least 1 frame at absolute minimum)
(par4=conversion length random range; adds a random amount of duration)
(par5=chance for conversion; dm56 is applied to determine conversion chance)
(par6=max chance for conversion; dm56 is applied to determine conversion chance)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects; by default it is set to resultflags=9)
(mindam/maxdam,etype=,emin/emax,elen)

[RegurgitatorEat] Consumes a corpse and adds or removes life to the user.
(srvdofunc=108; cltdofunc=63 is used by the vanilla skill to release cltside missiles, but it will activate even if you do not consume a corpse)
(searchopenXY=1,selectproc=1,targetcorpse=1; these should be set so that you can select a target corpse)
(clc1=life gained or lost by consuming a corpse; the life change is based on the life of the corpse, including modifiers like +life% and +life and /players setting)

[Baal Corpse Explode] Consumes/disappears corpses within a radius around the selected target corpse. The graphics can be returned by setting cltdofunc=82 which will call in the baalcorpseexplode missile, although it is kind of buggy so it makes sense why they didn't use it (most significantly, it can act on already-purged corpses).
(srvdofunc=141)
(aurarangecalc=radius within to consume/disappear corpses)
(cltdofunc=82)
(searchopenXY=1,selectproc=1,targetcorpse=1; these should be set so that you can select a target corpse)
(calc1=minimum /players1 HP dealt as damage)
(calc2=maximum /players1 HP dealt as damage)
(parameter5=cltside radius of corpses to find)
(parameter6=cltside radius of corpses to find added per additional level)

[MagottDown] Creates a small, invisible block that can be flown over, and also slightly teleports the user in a northern, slightly western direction. Casting it a bunch of times in a row creates a wall.
(srvstfunc=45,srvdofunc=86,cltstfunc=33)
(warp=1; set this if you do not want the screen to fade from black with each use)
(clc1=heal%; heals a defined % of life, but unfortunately cannot be negative)
(NOTE: vanilla magottdown uses cltdofunc=47, but it doesn't seem to do anything)

[MagottUp] Cast to allow yourself to move after using MagottDown.
(srvdofunc=45; cltstfunc=32 is only necessary if you want to release cltmissilea vaguely in the direction of casting)

[Resurrect][Resurrect2] Resurrects the target monster's corpse. Seems to work on any monsters. The target will use ResurrectMode or ResurrectSkill upon being resurrected, although it seems that not all animmodes work well (S3 locks up on a frame, and S4 will run frames 0-10 and skip the rest). Monseqs should not be used if a monster is casting, since it will play the first frame again after the last (resulting in a stuttering up-down-up animation of the resurrected target). Bizarrely, monseqs work fine for resurrection if the player uses the skill on a monster.
(srvdofunc=97)
(selectproc=1,targetcorpse=1,targetally=1; recommendations for targeting all corpses)
(NOTE: vanilla resurrect uses cltstfunc=39, but this doesn't seem to do anything)

[ZakarumHeal][Bestow] Heals the selected target.
(srvdofunc=96)
(clc1=the minimum percent of life healed, which cannot be greater than clc2; negative values do not seem to apply)
(clc2=the maximum percent of life healed; negative values do not seem to apply)

[Siege Beast Stomp] Deals explosive damage around the player and shakes the screen. The screen shaking lasts even if you start a new session.
(srvdofunc=134; cltdofunc=75 is only necessary if you want screen shaking)
(srvmissilea=; must have a valid entry from missiles.txt to deal damage, but it doesn't actually release the missile)
(aurarangecalc=; the radius of the explosive damage)
(param1=screen shake magnitude; strength of shaking)
(param2=screen shake build; how long it takes for the screen to reach peak magnitude)
(param3=screen shake duration; how long the screen shakes at the peak magnitude)
(param4=screen shake fade; how long it takes to go from peak magnitude to no shaking)

[cry help] When cast on a target, monsters with AI=minion will approach and attack the target, even if their AIpar3 (chance to approach and attack)=0. They will keep approaching and attacking until the calc1 defined duration elapses. The AI=minion monster must be part of the caster's party through Partymin-PartyMax with SetBoss=1. So while any monster can use Cry Help to send minions after you, only minions can have their AI altered to become aggressive. {Unknown how this attaches to the target. Does it use a hidden state?}
(srvdofunc=128)
(calc1=duration)

[AssDoAreaDamage] Releases radial explosive damage.
(srvdofunc=38)
(srvprgfunc1,srvprgfunc2,srvprgfunc3=radius of damage for respective srvprgfunc# if cast by a progressive state)
(aurarangecalc=radius of damage)
(mindam/maxdam,etype=,emin/emax,elen)


-----


[STATES]


[Inner Sight][Slow Missiles] Applies a state to targets within a radius around the user, applying only one stat.
(srvdofunc=6)
(aurafilter=,auratargetstate=,auralencalc=,aurarangecalc=,aurastat1=; aurafilter determines what will be targeted, auratargetstate determines the state applied, auralencalc is the length of the state, aurarangecalc is the radius around the player, only aurastat1 is applied)

[Amplify Damage][Dim Vision][Weaken][Terror][Life Tap][Decrepify][Lower Resist] Applies a state to targets within a radius around the selected point.
•Does not apply a state to monsters with mWL=0
•aurastat1calc must be a value other than 0 if there is an aurastat1, otherwise the state and its stats will not be applied
•If auratargetstate=terror, then targets will flee
•If auratargetstate=dimvision, then targets will be blinded
(srvdofunc=30; cltstfunc=18,cltdofunc=30 are not necessary but recommended, given that they produce a missile from/at the location, with the missile at the location sharing the radius of the srvside function)
(aurafilter=,auratargetstate=,auralencalc=,aurarangecalc=,aurastat1-6=, auraevents; aurafilter determines what will be targeted, auratargetstate determines the state applied, auralencalc is the length of the state, aurarangecalc is the radius around the clicked point, all aurastats are applied to the target)

[Confuse] Apply a 5-stat state in a radius around the selected point to targets, making them of neutral alignment (they attack and can be attacked by everything). State will not be applied to non-normal monsters.
•Does not apply a state to monsters with mWL=0
(srvdofunc=61; cltstfunc=18,cltdofunc=30 are not necessary but recommended, given that they produce a missile from/at the location, with the missile at the location sharing the radius of the srvside function)
(aurafilter=,auratargetstate=,auralencalc=,aurarangecalc=,aurastat2-6=; aurafilter determines what will be targeted, auratargetstate determines the state applied, auralencalc is the length of the state, aurarangecalc is the radius around the clicked point, for some reason aurastat1 doesn't apply but the rest work)

[Attract] Apply a statless state to a target which makes it of neutral alignment (it attacks and can be attacked by everything). State will not be applied to non-normal monsters.
•Does not apply a state to monsters with mWL=0
(srvdofunc=59; cltstfunc=18,cltdofunc=30 are not necessary, but are used by the vanilla variation of the skill, with cltdofunc=30 using aurarangecalc, and 18 producing a graphical missile)
(aurafilter=,auratargetstate=,auralencalc=; aurafilter determines what will be targeted, auratargetstate determines the state applied, auralencalc is the length of the state)
(aurarangecalc=appears to be the radius in which monsters will want to attack the attracted monster)
(NOTE: srvstfunc=18 is used by the vanilla skill, but I do not notice any differences with it gone)

[Frozen Armor][Shiver Armor][Chilling Armor][Bone Armor][Cyclone Armor][Burst of Speed][Fade][Venom] Gives a state to the user, applies aurastats, auraevents and passivestats.
(srvdofunc=18)
(aurastate=,auralencalc=,aurastat1-6=,auraevent; aurastate determines the state applied, auralencalc is the length of the state, all aurastats are applied to the target)
(auraevent1-3,auraeventfunc1-3 are enabled for the duration)
(passivestat1-5 are active while the state is active, without needing a passivestate)

[Blaze][SpiderLay][Energy Shield] Gives a state to the user, applies auraevents and passivestats. Note that Blaze's missile releasing with movement function does not require this function, see the Missiles guide for a description of Blaze's missile behavior.
(aurastate=state applied)
(auralencalc=length of state)
(auraevent1-3,auraeventfunc1-3 are enabled for the duration)
(passivestat1-5 are active while the state is active; this is the only non-aura in the game that applies temporary passivestats; this is very fortunate since you might want to use an aurastat-applying missile to produced missiles, this allows you to counteract stats gained/lost via aurastats with passivestats)

[Werewolf][Wearwolf][Werebear][Wearbear][Delerium Change] Apply a state to the user which can have different overlays when activating or deactivating. If the state has a states.txt group setting, then the state can be toggled.
(srvdofunc=116; cltstfunc=45 should be used only if you want to make use of cltoverlaya/b when activating/deactivating)
(cltoverlaya=,cltoverlayb=; required for activation/deactivation but only if you are using cltstfunc=45)
(aurastate=,auralencalc=,aurastat1-6=; aurastate determines the state applied, auralencalc is the length of the state, all aurastats are applied)

[Blade Shield] This skill is described in two different sections because its function massively changes based on how you configure it, and both the srvstfunc and srvdofunc have interesting capabilities. This section describes Blade Shield's srvstfunc, which is highly unique since it applies a state to the user for a set duration without even having to use a srvdofunc. Additionally, this srvstfunc will repeatedly cast the skill (including the srvdofunc, excluding the srvstfunc so it won't self-perpetuate) every perdelay. Meaning, you can make a skill that re-casts a skill multiple times, so a skill that summons 5 Blood Golems per cast, or which automatically Taunts nearby monsters, or releases Inner Sight every 10 seconds, or activates Static Field every 5 seconds, is entirely possible. Seems that only one Blade Shield can be active at a time, unless using aura=1.
(srvstfunc=28; a srvdofunc is not necessary unless you want it to re-cast that srvdofunc every perdelay)
(srvmissilea=; as long as it references an actual missile it will allow the state to attack)
(aurafilter,aurastate=,auralencalc=,aurastat1-6=; aurafilter determines the monsters it will attack, aurastate determines the state applied to the user, auralencalc is the length of the state minus 1, all aurastats are applied)
(periodic=,perdelay=; periodic=1 if you want it to cast the srvdofunc, perdelay determines how many frames must pass before it attempts to cast again)

[Enchant] Applies a state to a target, either the user or a pet/ally.
(srvdofunc=25)
(aurastate=,auralencalc=,aurastat1-6; aurastate determines the state applied, auralencalc is the length of the state, all aurastats are applied to the target)
(targetpet=1,targetally=1; if you want it to be applicable to allies)

[Might][Prayer][Resist Fire][Resist Cold][Resist Lightning][Defiance][Thorns][Cleansing][Meditation][Fanaticism][Concentration][Blessed Aim][Vigor][Salvation][Barbs Aura][Wolverine Aura][Oak Sage Aura] Apply a state to yourself and/or to allies and/or enemies. Also allows you to gain passive stats, but only while the aurastate is active.
•Cleansing Behavior: If any aurastat or passivestat=item_poisonlengthresist, then you don't actually gain any item_poisonlengthresist and instead every time the aura perdelay elapses, the associated value will be used as a percentage modifier of current poison and curse duration every time perdelay elapses, so if =30 then every perdelay will set the current duration to 30% (70% reduction in duration); if =200 then every perdelay will set the current duration to 200% (100% increase in duration)
(srvdofunc=65)
(aurafilter=,aurastate=,auratargetstate=,aurarangecalc=,aurastat1-6=; aurafilter determines what will be targeted, auratargetstate determines the state applied, aurarangecalc is the selection radius around the user, all aurastats are applied to the user and target)
(passivestat1-5=; these are applied only to the user while the aurastate is active)
(aura=,periodic=,perdelay=; these are not required, but are usually used, aura=1 makes it so it is active as long as it is on the skill bar, and periodic allows perdelay which determines how long the aurastate and auratargetstate last as well as how often they update, in frames; perdelay seems to have a lower limit of 4)

[Holy Fire][Holy Shock][Sanctuary][Conviction] Apply an aurastate and its stats to selected targets. Also allows the user to gain passive stats, but only while the aurastate is active. Also deals elemental damage within aurarangecalc every time it updates/activates; this allows it to function well even when not being used as an aura (e.g. as an area of effect explosive damage spell).
•Cleansing Behavior: If any aurastat or passivestat=item_poisonlengthresist, then you don't actually gain any item_poisonlengthresist and instead every time the aura perdelay elapses, the associated value will be used as a percentage modifier of current poison and curse duration every time perdelay elapses, so if =30 then every perdelay will set the current duration to 30% (70% reduction in duration); if =200 then every perdelay will set the current duration to 200% (100% increase in duration)
(srvdofunc=66)
(aurafilter=,aurastate=,auratargetstate=,aurarangecalc=,aurastat1-6=; aurafilter determines what will be targeted, auratargetstate determines the state applied, aurarangecalc is the selection radius around the user for applying the auratargetstate and applying elemental damage, all aurastats are applied to the to the user and target)
(passivestat1-5=; these are applied only to the user while the aurastate is active)
(aura=,periodic=,perdelay=; these are not required, but are usually used, aura=1 makes it so it is active as long as it is on the skill bar, and periodic allows perdelay which determines how long the aurastate and auratargetstate last as well as how often they update, in frames; perdelay seems to have a lower limit of 4)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects; by default it is set to 16385, which makes the elemental damage effects show up)
(etype=,emin/emax,elen)

[Holy Freeze] Apply an aurastate and its stats to selected targets. Also allows the user to gain passive stats, but only while the aurastate is active. Also deals elemental damage within aurarangecalc every time it updates/activates; this allows it to function well even when not being used as an aura (e.g. as an area of effect explosive damage spell). Unlike the above srvdofunc=66, coldeffect in monstats.txt is relevant for this, with coldeffect=0 rendering a monster immune to the auratargetstate.
•Cleansing Behavior: If any aurastat or passivestat=item_poisonlengthresist, then you don't actually gain any item_poisonlengthresist and instead every time the aura perdelay elapses, the associated value will be used as a percentage modifier of current poison and curse duration every time perdelay elapses, so if =30 then every perdelay will set the current duration to 30% (70% reduction in duration); if =200 then every perdelay will set the current duration to 200% (100% increase in duration)
(srvdofunc=81)
(aurafilter=,aurastate=,auratargetstate=,aurarangecalc=,aurastat1-6=; aurafilter determines what will be targeted, auratargetstate determines the state applied, aurarangecalc is the selection radius around the user for applying the auratargetstate and applying elemental damage, all aurastats are applied to the to the user and target)
(passivestat1-5=; these are applied only to the user while the aurastate is active)
(aura=,periodic=,perdelay=; these are not required, but are usually used, aura=1 makes it so it is active as long as it is on the skill bar, and periodic allows perdelay which determines how long the aurastate and auratargetstate last as well as how often they update, in frames; perdelay seems to have a lower limit of 4)
(resultflags,hitflags,hitclass; can make use of these columns to apply a few different possible effects; by default it is set to 16385, which makes the elemental damage effects show up)
(etype=,emin/emax,elen)

[Redemption] Apply an aurastate to the user, but only passivestats. Also can search for corpses and redeem them for life and mana; this deletes the corpse, both srvside and cltside, and produces cltmissilea.
•Cleansing Behavior: If any passivestat=item_poisonlengthresist, then you don't actually gain any item_poisonlengthresist and instead every time the aura perdelay elapses, the associated value will be used as a percentage modifier of current poison and curse duration every time perdelay elapses, so if =30 then every perdelay will set the current duration to 30% (70% reduction in duration); if =200 then every perdelay will set the current duration to 200% (100% increase in duration)
(srvdofunc=82)
(aurafilter=,auratargetstate=,aurarangecalc=; aurafilter determines which corpses should be selected (set to 4354 by default), aurarangecalc is the selection radius around the user for selecting corpses)
(passivestat1-5=; these are applied only to the user while the aurastate is active)
(aura=,periodic=,perdelay=; these are not required, but are usually used, aura=1 makes it so it is active as long as it is on the skill bar, and periodic allows perdelay which determines how long the aurastate lasts as well as how often it updates as well as how often corpses are selected for redeeming, in frames; perdelay seems to have a lower limit of 4)
(cltmissilea=missile to release when the corpse is redeemed)
(clc1=chance of redeeming a corpse)
(clc2=amount of life gained from redeeming a corpse)
(clc3=amount of mana gained from redeeming a corpse)

[Taunt] Apply an aurastate to a single monster, along with all of the associated aurastats. Does not seem to apply to non-normal monsters.
•Does not apply a state to monsters with mWL=0
•If auratargetstate=taunt (ID=27), then targets will chase the player in melee
•If auratargetstate=terror (ID=56), then targets will flee
•If auratargetstate=dimvision (ID=23), then targets will be blinded
(srvdofunc=71)
(aurafilter=,auratargetstate=,auralencalc=,aurastat1-6=; aurafilter determines what will be targeted, auratargetstate determines the state applied, auralencalc is the length of the state, aurarangecalc is the radius around the player, only aurastat1 is applied)

[Cloak of Shadows] Apply an aurastate to the user (which provides passivestats) and an auratargetstate to all targets (even to allies if filtered for) which applies aurastats within the aurafilter and range. The auratargetstate always applies blind. The auralencalc prevents you from using this skill until it runs out. Note that it only prevents casting if you have that aurastate currently, this means you can allow yourself to cast it again earlier if you replace it with an identical state of a shorter duration, and likewise you will be prevented from casting it even if you haven't cast it if you already have the state from something else. So for example, if you are a paladin and cast Cloak of Might (which gives the Might state), and then select Might (the aura) then unselect it, you will be able to cast Cloak of Might again; and if you keep Might active, then you won't be able to cast Cloak of Might.
(srvdofunc=47,cltstfunc=7)
(aurafilter=,aurastate=,aurarangecalc=,auralencalc=,aurastat1-6=; aurafilter determines which targets should be selected to gain auratargetstate (set to 57347 by default), aurarangecalc is the selection radius around the user for selecting targets, auralencalc determines how long the aurastate and auratargetstate last as well as how long it takes to be able to use this skill again, all aurastats are applied to the targets)
(passivestats1-5=; applied to the user while aurastate is active)

[MonCurseCast] Applies a random curse (ID=66,72,76,82,87,91; Amplify Damage, Weaken, Life Tap, and Decrepify; in 1.10f-1.12, can also select Lower Resist and Iron Maiden).
• BEFORE the change in 1.13, Iron Maiden and Lower Resist can be selected. Decrepify won't be cast in vanilla, but can be selected to cast if Decrepify's param7 is given a value.
• AFTER the change in 1.13, Iron Maiden and Lower Resist cannot be selected, and Decrepify can be selected but doesn't slow (so all it does is override other curses)
• In D2R, Lower Resist can be selected, but Iron Maiden cannot be selected. {Unknown if Decrepify is broken like in 1.13}
• Note that this skill does not read the aurastats of the given curses
• This also means any new aurastats that the curse may give due to your modding will be ignored by this function
• It seems that you can't change srvdofunc=30 of the respective curses, or otherwise the function won't be able to use them
• It directly uses the aurarangecalc/auralencalc from the curses it casts
(srvdofunc=112; cltdofunc=30 is used by the vanilla skill, but it is awkward since the aurarangecalc is a single value, but the curses it casts have different aurarangecalcs which causes a desync between the apparent radius and the actual radius; cltstfunc=18 is also used by the vanilla skill, but it isn't necessary)
(aurarangecalc=; only relevant if you want to use cltdofunc=30)
(Amplify Damage always applies 'damageresist' of -100)
(Weaken always applies 'damagepercent' of -50)
(Iron Maiden calc1=amount of damage to reflect via auraevent=domeleedamage VS MONSTERS, auraeventfunc=4; the auraevents/auraeventfuncs set for the skill are ignored)
(Iron Maiden calc2=amount of damage to reflect via auraevent=domeleedamage VS PLAYERS, auraeventfunc=4; the auraevents/auraeventfuncs set for the skill are ignored)
(Iron Maiden calc3=amount of damage to reflect via auraevent=domeleedamage VS {hirelings?}, auraeventfunc=4; the auraevents/auraeventfuncs set for the skill are ignored)
(Life Tap calc1=amount of damage to recover as life via auraevent1=damagedinmelee, auraevent2=damagedbymissile auraeventfunc=5; the auraevents/auraeventfuncs set for the skill are ignored)
(Decrepify param7=; amount of 'velocitypercent' and 'attackrate' to give to the target; 'damagepercent' and 'damageresist' are always -50 as long as param7 isn't equal to 0)
(Lower Resist ln56=resists to apply; amount of 'fireresist', 'lightresist', 'coldresist', 'poisonresist' to give to the target)

[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)

[Overseer Whip] For the far majority of monsters, this applies an auratargetstate and its stats. To monsters with monstats.txt: baseid=minion1, this either applies an auratargetstate and its stats (if it succeeds) or converts them into the defined summon, turning into an equivalent monster in the respective chain (e.g. minion1=scarab1, minion2=scarab2, minion3=scarab3, etc). Can target both allies and enemies.
(srvdofunc=131)
(auratargetstate=,auralencalc=,aurastat1-6=; auratargetstate determines the state applied, auralencalc is the length of the state, all aurastats are applied)
(summon=,summode=; summon determines what monster it will convert into, spawning along the equivalent nextinclass chain; summode determines the animation upon spawning, make sure it uses an animmode that the given monster actually has, something like A1 is almost always safe)
(clc1=chance of applying auratargetstate; if it fails, then the monster is converted into the monster in the column "summon" instead, but only if it a minion; the replacement monster is janky and dies when it gets near you, but it carries at least most of the stats, at least including monprops, of the given monster)

[Holy Shield] Aurastate effects are not based on a skill function. See: viewtopic.php?t=67297, under [holyshield]
(aurastate=holyshield; will make it so your shield becomes the HSH graphical token)
(calc1=defense bonus; gives a statless percent defense bonus that is additive with 'item_armor_percent')
(Mindam, MaxDam, etc: Gives a statless damage bonus that applies to the shield when attacking with smite)
Last edited by Cypress on Thu Mar 28, 2024 11:09 am, edited 151 times in total.


User avatar
Whaag
Posts: 32
Joined: Thu Feb 13, 2020 10:07 pm
Germany

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

Post by Whaag » Mon Sep 07, 2020 10:18 am

This is already very helpful to me cause i`m working on skills right now. Thanks man.

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

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

Post by Cypress » Tue May 18, 2021 8:16 pm

Ran out of space in the main post, so I had to move some sections downwards.


-----------------------

[PETS]

[Unsummon] Unsummons (does not kill, the unsummoned will not trigger death effects) one of your pets.
(srvstfunc=3,srvdofunc=4)
(targetpet=1)


[Dopplezon] Summons a timed pet at the clicked point that can borrow your life; pet triggers death effects when the duration runs out.
(srvdofunc=15)
(aurastats1-6, auraevents; applied to the summon)
(passivestats1-5; applied to the summon)
(summon=,pettype=,petmax=,summode=,sumsk1-5=)
(clc1=multiplier to base life; multiplicative with other sources of life%)
(clc2=pet duration, in frames)
(clc3=the percent of life it borrows from the user for its own base life)
(tohit,levtohit,tohitcalc)
(srcdam=,mindam/maxdam; srcdam is the percentage of its base damage from monstats, mindam/maxdam is added damage, but these only apply if the monstats.txt entry is linked via the "SkillDamage" column)

[Shadow Warrior][Shadow Master] Summons a pet at the selected location. It gains life via ln12 and limits item level based on ln78. It also is broken (thanks Ogodei and LadyIsabelle: viewtopic.php?t=66555) in that auracalc2/passivecalc2 determine the values for all the other calcs of their type; it can be fixed via hardcoding as described in the aforementioned link. Also has a weird hidden behavior, where the auralencalc column determines how long the pet lasts. Doesn't seem to be able to use sumskill# auras {although maybe it requires special settings, like giving her the spell directly}
(srvdofunc=49)
(auralencalc=duration of pet's life span; the pet dies after the time, in frames, runs out)
(aurastat1-6,auracalc2; applied to the summon; auracalc2 is used for all aurastats)
(passivestat1-5,passivecalc2; applied to the summon; passivecalc2 is used for all passivestats)
(summon=,pettype=,petmax=,summode=,sumsk1-5=)
(param1; +baselife% per level)
(param7,param8; ilvl of equipment on minion)
(tohit,levtohit,tohitcalc)
(srcdam=,mindam/maxdam; srcdam is the percentage of its base damage from monstats, mindam/maxdam is added damage, but these only apply if the monstats.txt entry is linked via the "SkillDamage" column)

[Valkyrie] Summons a pet at the selected location that must have an inventory or suffer a crash. If you do not summon from hcldx=357 (valkyrie), then it will be invisible. No matter what it will have a glowy full set aura. Attempting to transform it into something else via a state does not seem to work.
(srvdofunc=16)
(aurastat1-6, auraevents; applied to the summon)
(passivestat1-5; applied to the summon)
(summon=,pettype=,petmax=,summode=,sumsk1-5=)
(monstats.txt: summon must have inventory=1)
(clc1=multiplier to base life; multiplicative with other sources of life%)
(clc2=ilvl of magic items; seems like it also gives a +1 bonus to the input)
(srcdam=,mindam/maxdam; srcdam is the percentage of its base damage from monstats, mindam/maxdam is added damage, but these only apply if the monstats.txt entry is linked via the "SkillDamage" column)


[Hydra] Creates 3 summons, that being the specified summon and the two rows following it in monstats.txt. The summons cannot be unsummoned. Regardless of the monster alignment/AI, the summons will be incapable of harming you and will be on your side (although they will still attempt and fail to harm you). {Necroskeletons seem to die when they get near enemies for some reason. Necromages do not do this}. All summons with monstats.txt AI=hydra die (and trigger death effects) after ln12 runs out.
(srvdofunc=144)
(aurastat1-6, auraevents; applied to the summon)
(passivestat1-5; applied to the summon)
(summon=,pettype=,petmax=,summode=,sumsk1-5=; the following two entires in monstats.txt will also be summoned alongside the entered summon; petmax counts all three of the summons, so you need at least petmax=3 to summon all three)
(param1=duration of summons, in frames)
(param2=added duration of summons per additional level, in frames)
(tohit,levtohit,tohitcalc)
(srcdam=,mindam/maxdam; srcdam is the percentage of its base damage from monstats, mindam/maxdam is added damage, but these only apply if the monstats.txt entry is linked via the "SkillDamage" column)
(NOTE: vanilla hydra uses srvstfunc=14 and cltstfunc=17 but they don't seem to do anything)


[Raise Skeleton][Raise Skeletal Mage] Consume a corpse to make it release a pet. Also hurts (and possibly kills) Paladins, dealing 1/8th of their max life per use. Gains +1% to all resists per value in the stat passive_summon_resist. Also: synchronizes monstats2 S4v and S5v (i.e. the necromage energy balls), makes it so the state skel_mastery upgrades monstats2 RHv, is required for AI=NecroPet to use skill1 and attack at range (i.e. for necromages) and allows for random S4v (i.e. random energy balls for necromages). Basically, necromages won't function unless you use this.
(srvdofunc=31; cltstfunc=20,cltdofunc=31 are only needed if you want the corpse to also release cltmissilea)
(aurastat1-6, auraevents; applied to the summon)
(passivestat1-5; applied to the summon)
(summon=,pettype=,petmax=,summode=,sumsk1-5=)
(selectproc=2,targetcorpse=1; required for a corpse to be targeted)
(clc1=multiplier to base life; multiplicative with other sources of life%)
(tohit,levtohit,tohitcalc)
(srcdam=,mindam/maxdam; srcdam is the percentage of its base damage from monstats, mindam/maxdam is added damage, but these only apply if the monstats.txt entry is linked via the "SkillDamage" column)
(NOTE: has srvstfunc=15, but it doesn't seem to do anything)


[Clay Golem][Blood Golem][Fire Golem] Summons a pet at the selected location. Gains +1% to all resists per value in the stat passive_summon_resist.
(srvdofunc=56)
(aurastat1-6, auraevents; applied to the summon)
(passivestat1-5; applied to the summon)
(summon=,pettype=,petmax=,summode=,sumsk1-5=)
(clc1=multiplier to base life; multiplicative with other sources of life%)
(tohit,levtohit,tohitcalc)
(srcdam=,mindam/maxdam; srcdam is the percentage of its base damage from monstats, mindam/maxdam is added damage, but these only apply if the monstats.txt entry is linked via the "SkillDamage" column)

[Oak Sage][Summon Spirit Wolf][Heart of Wolverine][Summon Dire Wolf][Spirit of Barbs][Summon Grizzly] Summons a pet at the selected location.
(srvdofunc=119)
(aurastat1-6, auraevents; applied to the summon)
(passivestat1-5; applied to the summon)
(summon=,pettype=,petmax=,summode=,sumsk1-5=)
(clc1=multiplier to base life; multiplicative with other sources of life%)
(clc2=level of the pet; doesn't seem to change the result from ulvl clcs on the summon for things like aura/passivestats, but it definitely changes the actual level of the monster as far as hit chance is concerned)
(tohit,levtohit,tohitcalc)
(srcdam=,mindam/maxdam; srcdam is the percentage of its base damage from monstats, mindam/maxdam is added damage, but these only apply if the monstats.txt entry is linked via the "SkillDamage" column)

[Poison Creeper][Cycle of Life][Solar Creeper] Summons a pet at the selected location. The summon cannot display overlays (but still does receive bonuses from states) and produces vine graphics/sounds as it moves. Hit chance seems to be bugged and always set to the minimum 5%.
(srvdofunc=115)
(aurastat1-6, auraevents; applied to the summon)
(passivestat1-5; applied to the summon)
(summon=,pettype=,petmax=,summode=,sumsk1-5=)
(clc1=multiplier to base life; multiplicative with other sources of life%)
(clc2=level of the pet; doesn't seem to change the result from ulvl clcs on the summon for things like aura/passivestats, but it definitely changes the actual level of the monster as far as hit chance is concerned)
(tohit,levtohit,tohitcalc)
(srcdam=,mindam/maxdam; srcdam is the percentage of its base damage from monstats, mindam/maxdam is added damage, but these only apply if the monstats.txt entry is linked via the "SkillDamage" column)


[Bone Wall] Release two missiles at the target location that travel in opposite directions perpendicular to the user and spawn a pet at the target location. If using the bonewallmaker missile (a missile with psrvdofunc=13 will create summon as it moves), then be sure to not use a pet with a leashed AI or it'll crash the game. If you use unaligned monsters as the summon, they will be hostile to everything, including each other. Note that the 24 second duration of Bone Wall is only applied to monsters with a monstats.txt AI=BoneWall. Also note that the summon that gets produced seems to have a broken hit calculation, always having the minimum 5% hit chance (the monster's level is equivalent to you however), as such it is recommended that if you want to make summons with this then you make them use missiles or skills that can either properly calculate hit chance or ignore hit calculations entirely. Also, the monsters summoned sort of have their normal AI behavior but with severe brain damage, so you'll probably want to make sure they use a skill that is smarter than they are (e.g. auras that hit in a radius, Guided Arrow, Bone spirit). Also, the summons share an unusual cooperation, in that if any of the pieces besides the center-most die, then all the others die; this means you can trigger ctc on death at most twice (once from the center piece, causing that piece to die, and once from a side piece, causing all the pieces to die).
(srvdofunc=60; cltdofunc=26 if you want to shoot out missiles along the length of the bone wall)
(srvmissilea; only use a missile with bonewallmaker's psrvdofunc=13 if the summon doesn't have a leash; modifying the velocity of the missile will space out the distance between each summon; if you want to make it like a hybrid between fire wall and bone wall, then use cltmissilea and cltdofunc=26)
(aurastat1-6, auraevents; applied to the summon)
(passivestat1-5; applied to the summon)
(summon=,pettype=,sumsk1-5=; be sure not to use a summon with a leash if you spawn more than 1 summon; note that there is no cap to the number of pets)
(clc1=multiplier to base life; multiplicative with other sources of life%)
(clc2=makes a missile with psrvdofunc=13 spawn an equal amount of summons as this clc, plus one extra that is always spawned in the middle)
(tohit,levtohit,tohitcalc)
(srcdam=,mindam/maxdam; srcdam is the percentage of its base damage from monstats, mindam/maxdam is added damage, but these only apply if the monstats.txt entry is linked via the "SkillDamage" column)
(NOTE: vanilla bone wall has cltstfunc=22, but it doesn't seem to do anything)


[Bone Prison] Seems to basically follow the same rules as Bone Wall, just without the center summon and instead producing a ring of summons.
(srvdofunc=62; srvstfunc=19 is not required, it just makes it so you have to target a specific monster for it to cast)
(aurastat1-6, auraevents; applied to the summon)
(passivestat1-5; applied to the summon)
(summon=,pettype=,sumsk1-5=; be sure not to use a summon with a leash if you spawn more than 1 summon; note that there is no cap to the number of pets)
(clc1=multiplier to base life; multiplicative with other sources of life%)
(tohit,levtohit,tohitcalc)
(srcdam=,mindam/maxdam; srcdam is the percentage of its base damage from monstats, mindam/maxdam is added damage, but these only apply if the monstats.txt entry is linked via the "SkillDamage" column)
(NOTE: vanilla bone prison has cltstfunc=22, but it doesn't seem to do anything)


[Iron Golem]
•Memory is hardcoded to skill ID=90 and makes it impossible to fully clone Iron Golem's behavior.
•For memory to function it requires pettype IDX=3, which in vanilla is golem.
•Produces a pet from a metal item (item must have weapons.txt/armor.txt/misc.txt column bitfield1=3), which the pet will have equipped to it.
•This function is still useful for cloning if you want to have a temporary pet that can only be spawned from metal items and adopts the stats of the used item, since it won't interfere with the memory of the hardcoded Iron Golem row.
•Can gain the Fade stat when produced from an ethereal item, but only works properly if it has: an aurastate and an aurastat with Fade>1.
(srvdofunc=57)
(aurastat1-6, auraevents; applied to the summon; one of these must have aurastat=fade and aurastatcalc>0 or otherwise the summon will not become faded from an ethereal item)
(passivestat1-5; applied to the summon)
(summon=,pettype=,petmax=,summode=,sumsk1-5=)
(targetitem=1; required for an item to be targeted)
(clc1=multiplier to base life; multiplicative with other sources of life%)
(tohit,levtohit,tohitcalc)
(srcdam=,mindam/maxdam; srcdam is the percentage of its base damage from monstats, mindam/maxdam is added damage, but these only apply if the monstats.txt entry is linked via the "SkillDamage" column)
(NOTE: vanilla irongolem has srvstfunc=20 and cltstfunc=23, but they don't seem to do anything)


[Revive] Revives selected corpses and appends additional stats and skills to them. Also hurts (and possibly kills) Paladins, dealing 1/8th of their max life per use.
(srvdofunc=58; cltstfunc=24 is only necessary if you want different cltmissiles released from the corpse based on its size in monstats2.txt, with small=0,large=0 releasing cltmissilea, small=1,large=0 releasing cltmissileb and small=0,large=1 releasing cltmissilec)
(aurastat1-6, auraevents; applied to the summon)
(passivestat1-5; applied to the summon)
(pettype=,petmax=,sumsk1-5=; sumsk allows for stuff like auras to be added to all your revives)
(selectproc=2,targetcorpse=1; required for a corpse to be targeted)
(clc1=multiplier to base life; multiplicative with other sources of life%)
(clc2=duration of revives, in frames)
(NOTE: vanilla revive has srvstfunc=21, but it doesn't seem to do anything)
(srcdam=,mindam/maxdam; srcdam is the percentage of its base damage from monstats, mindam/maxdam is added damage, but these only apply if the monstats.txt entry is linked via the "SkillDamage" column of every single monster you revive, also note that these bonuses are applied to the monster even when not revived, however if you set it so that srcdam=0 and mindam/maxdam=0, then you can freely modify min/maxlevdam1-6 without making monsters any stronger, although this whole process is essentially pointless since you can just give it to them via aurastats/passivestats/sumsks)


[Raven] Summons a pet at the selected location. The pet cannot be harmed and will not be targeted by enemies. Number of hits until death is not controlled by this skill function.
(srvdofunc=114)
(aurastat1-6, auraevents; applied to the summon; also applies auratargetstate to attacked targets but not the aurastats)
(passivestat1-5; applied to the summon)
(summon=,pettype=,petmax=,summode=,sumsk1-5=)
(clc1=multiplier to base life; multiplicative with other sources of life%)
(clc2=level of the pet; doesn't seem to change the result from ulvl clcs on the summon for things like aura/passivestats, but it definitely changes the actual level of the monster as far as hit chance is concerned)
(tohit,levtohit,tohitcalc)
(srcdam=,mindam/maxdam; srcdam is the percentage of its base damage from monstats, mindam/maxdam is added damage, but these only apply if the monstats.txt entry is linked via the "SkillDamage" column)


[Blade Sentinel] Summons a pet at the user's location. The pet will not be selected by enemies, but can be harmed and even killed by colliding with incidental missiles and explosions. This also allows for Blade Sentinel to move between the user and selected location (requires monstats.txt: AI=BladeCreeper), but otherwise Blade Sentinel's vanilla features (e.g. the way it hurts things it moves into and its duration) are not controlled by functions.
(srvdofunc=44)
(aurastat1-6, auraevents; applied to the summon)
(passivestat1-5; applied to the summon)
(summon=,pettype=,petmax=,sumsk1-5=)
(tohit,levtohit,tohitcalc)
(srcdam=,mindam/maxdam; srcdam is the percentage of its base damage from monstats, mindam/maxdam is added damage, but these only apply if the monstats.txt entry is linked via the "SkillDamage" column)


[Charged Bolt Sentry][Wake of Fire][Lightning Sentry][Wake of Inferno][Death Sentry] Summons a pet at the selected location. The pet will not be selected by enemies, but can be harmed and even killed by colliding with incidental missiles and explosions.
(srvdofunc=45)
(aurastat1-6, auraevents; applied to the summon)
(passivestat1-5; applied to the summon)
(summon=,pettype=,petmax=,summode=,sumsk1-5=)
(tohit,levtohit,tohitcalc)
(srcdam=,mindam/maxdam; srcdam is the percentage of its base damage from monstats, mindam/maxdam is added damage, but these only apply if the monstats.txt entry is linked via the "SkillDamage" column)

-----


[SUMMONS]


[MagottLay] Spawns a summon at the user. There is an odd hinderance that occurs after each use, which requires you to move before you can summon again. You can use a sequence with multiple activation frames to summon multiple times, but it'll still lock up after using them up (until you move). Note that the summon also includes minion1/2 and min/maxgrp, so you can spawn large armies.
(srvdofunc=87)
(summon=,summonmode=; summon creates the monster, and summonmode controls the animation the summon plays on spawning; minion1/2 and min/maxgrp of the summon are also spawned alongside it)

[MinionSpawner] Spawns a single defined monster, also using the monstats.txt: minion1/2,mingrp/maxgrp of the defined monster (meaning it can spawn up to 3 different monsters and also allowing you to spawn more than a single monster). The monster (but not minion1/2) cannot be selected, but can be killed by area of effect.
(srvstfunc=62,srvdofunc=135)
(summon=,summode=; the specific monster to create along with its minion1/2,mingrp/maxgrp columns in monstats.txt; summode determines which animation it plays on spawning)

[MaggotEgg] Spawns one or more of a specific monster, also using the monstats.txt: minion1/2,mingrp/maxgrp of the defined monster (meaning it can spawn packs of up to 3 different monsters). The monsters spawned by the summon column (meaning not minion1/2) use anim S1 (so you'll want to either make sure the monsters are damaged/knocked back/etc as soon as they spawn so that they are immediately kicked out of their non-existent animation, or add in S1 animdata for those monsters). The srvdofunc also gives 2x your current experience as additional experience, adjusted by expratio, so you probably don't want to give this to players.
(srvdofunc=84; also uses srvstfunc=43 in vanilla, but it only seems to change where the summons spawn, so it may or may not be desirable over some other srvstfunc)
(summon=; the specific monster to create along with its minion1/2,mingrp/maxgrp columns in monstats.txt; the specific monster always is spawned with anim S1, which most monsters do not have)
(clc1=number of summons to spawn; limit depends on the size of the monster with a box-sized area around the user being available to fill up, anything beyond that area will not spawn, meaning smaller monsters have a higher limit)
(NOTE: vanilla maggotegg uses cltdofunc=46, but it doesn't seem to do anything)

[Nest] Spawns a defined monster. You get permanently stuck after doing so. Also causes crashes when the user is blinded by Cloak of Shadows, so I'd recommend replacing this entirely with MinionSpawner.
(srvstfunc=49,srvdofunc=91)
(cltstfunc=36,cltdofunc=50)
(summon=,summode=; the specific monster to create along with its minion1/2,mingrp/maxgrp columns in monstats.txt; summode determines which animation it plays on spawning)

[Baal Tentacle] Spawns 1-4 of the first monster in monstats.txt (in vanilla, skeleton1) that are unselectable until you move really far away from them. They are spawned around the selected target, unless there aren't any around, in which case they spawn around the user. Doesn't actually make use of the summon column. {Unknown how it selects monsters to spawn. Baalcrab creates baaltentacle1 and baaltentacle2. Hardcoded to only those two monsters? Does it use baseid chains somehow?}
(srvdofunc=140)

[Impregnate] Makes it so the afflicted monster summons one or more monsters on death; hardcoded to only use the Pregnant state (this means it can be disabled by applying the Pregnant state via some other aurastate applying means); the monster inherits all of its stats from MonStats.txt. Monsters with baseid=putriddefiler1 or baseid=painworm1 cannot be impregnated. Summoned monsters are also accompanied by min/maxgrp minion1/2. If the monsters are chained via nextinclass, then both monlvlex (the area level of levels.txt) and level (the monster level of monstats.txt) are considered: the highest level monster in the chain that is at least of an equal level to the area level will be selected. This means you can produce 99+ different summons from a single skill, making it incredibly useful.
(srvdofunc=133)
(summon=monster spawned after the death of the host; the monster is summoned according to a chain based on monster level)
(summon=,summode=; the specific monster to create along with its minion1/2,mingrp/maxgrp columns in monstats.txt; summode determines which animation it plays on spawning)

[DiabPrison] Only useful for its usual, vanilla purpose. Summons boneprison1-4 (hcidx=340-343) around the target, trapping them. Attempting to use any other monster does not seem to work. The boneprison won't drop its treasureclass.
(srvdofunc=104)
(summon=boneprison1)

-----


[USEFUL CLTFUNCS]


[Cloak of Shadows] Prevents the user from using a skill again until the aurastate runs out. This can work as a kind of softcoded skill delay to any skill that applies an aurastate controlled by auralencalc.
(cltstfunc=7)

-----


[GENERALIZED NON-FUNCTIONS]


[Energy Shield] If the user gains a state, then damage can be absorbed by mana. Multiple different states applying this will stack, so with two 95% absorption energy shields you get 99.75% absorption. The state is disabled if your mana is fully drained. Rather useful cltside too because of the reactive prgoverlay graphic which changes based on the direction of the target that triggers the event.
(aurastate=,auralencalc,auraevent,auraeventfunc; auraevent and its auraeventfunc should be absorbdamage/24)
(prgoverlay=appears over user when auraevent triggers, changing depend on the direction of the target that triggers the event; uses the overlay defined, and also the 7 following overlays)
(clc1=; what percent of damage is taken from mana before life, capped at 95%)
(clc2=; resistance to all non-poison damage types, with each increment being worth 6.25%, with 32 being -100% resistance, 31 being -93.75% resistance and so on; I've read on the d2mods forum that it breaks below the value of 16, but this is definitely not true, it is effective down to a value of 1, or the equivalent of 93.75% resistance; there seems to be no upper limit, I was able to get to at least 256, or -300% resistance, and it seems like it may have even worked up to 1024 but I didn't thoroughly check at that point)


[Raven] The limited number of hits is based on monstats.txt: skill1. Whatever skill1 is, the number of hits will be equivalent to ln56 of that skill. This only applies if using AI=Raven.


[Charged Bolt Sentry][Wake of Fire][Lightning Sentry][Wake of Inferno][Death Sentry] The limited number of shots is based on monstats.txt: skill1. Whatever skill1 is, the number of shots will be equivalent to clc4 of that skill. This only applies if using AI=AssassinSentry.


[Blade Sentinel] The duration and hitting of this skill is based on monstats.txt and missiles.txt, which open up clc4 and srvmissilea to be borrowed by the summon. Srvmissilea is released only once on initial use. AI=BladeCreeper is required for any of this to work.
(srvmissilea=the missile that the summon releases; is released only once)
(clc4=duration, how long the summon lasts in frames)


[Shadow Warrior][Shadow Master] Their power to use skills has nothing to do with the function, only AItype (see: viewtopic.php?t=21049&highlight=shadow+master for a good explanation) and AI=ShadowWarrior or ShadowMaster (with ShadowWarrior using your current skills and ShadowMaster using any skills with AItype). This is very fortunate since their function (srvdofunc=49) does nothing useful, but breaks a lot of features that work for every other summon. The only reason these skills do not cast Shadow Warrior and Shadow Master in vanilla (which would cause a crash) is apparently because of hardcoding, cloning one of these skills will allow them to cast it (and crash the game). It is worth noting that ShadowMaster will only cast skills given to her via Monstats.txt Sk1-8 and with AItype that is either of no class or of the same class as the caster (so if some skills with charclass=sor have AItype and a sorceress makes the ShadowMaster, then the ShadowMaster will use those skills).


-----

[SRVSTFUNC]

[Fire Arrow][Cold Arrow][Multiple Shot][Poison Javelin][Exploding Arrow][Lightning Bolt][Ice Arrow][Guided Arrow][Plague Javelin][Immolation Arrow][Freezing Arrow][Lightning Fury] Makes it so the skill only works properly if the equipped weapon has settings in itemtypes.txt: throwable=1 or shoots=(an itemcode; in vanilla this is bowq or xboq). If throwable=1, then item_throw_mindamage and item_throw_maxdamage are used for SrcDam. If shoots is set, then mindamage and maxdamage (for one-handed weapons) or secondary_mindamage and secondary_maxdamage (for two-handed weapons) are used. If both throwable and shoots are used, then it will use throw damage.
(srvstfunc=4)

[Throw][Left Hand Throw] {probably same as srvstfunc 4 but with an additional durability check}
(srvstfunc=65)

[Holy Shield] Only activate skill if wielding a shield.
(srvstfunc=36)

[AndrialSpray] Only activate skill if selecting a target unit.
(srvstfunc=46)

[Quick Strike] Only activate skill if selecting a target unit.
(srvstfunc=50)

[Telekinesis] The skill will only activate srvside if you select a target, and the target is within the radius of aurarangecalc.
(srvstfunc=12,cltstfunc=16)
(aurarangecalc=on-screen cast range; target must be within this radius for the srvside effects of the skill to activate, otherwise only the cltside parts will occur)
(note: Telekinesis does not use cltstfunc=16 by default)

[Raise Skeleton][Raise Skeletal Mage] Only activate skill if targeting a corpse that has nosel=0 and corpsesel=1. {unsure how this is different from corpse explosion}
(srvstfunc=15)

[Corpse Explosion][Poison Explosion] Only activate skill if targeting a corpse that has nosel=0 and corpsesel=1. {unsure how this is different from raise skeleton}
(srvstfunc=17)

[Revive] Only activate skill if targeting a corpse that has revive=1, nosel=0 and corpsesel=1. {doesn't work on lightningspire for some reason, not sure what setting is causing that}
(srvstfunc=21)

[Find Potion][Grim Ward] Only activate skill if targeting a corpse that has soft=1, nosel=0 and corpsesel=1. {unsure how this is different from find item}
(srvstfunc=33)

[Find Item] Only activate skill if targeting a corpse that has soft=1, nosel=0 and corpsesel=1. {unsure how this is different from find potion}
(srvstfunc=34)
Last edited by Cypress on Sun Apr 14, 2024 11:56 am, edited 20 times in total.

Question
Posts: 87
Joined: Sat Nov 28, 2009 1:53 pm

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

Post by Question » Sun Sep 05, 2021 4:02 am

Spent a lot of time struggling with these earlier. I was trying to turn inner sight into an aura. I tried emulating Conviction (function 66) and that doesnt work because inner sight uses the emin/emax fields which causes teh aura to do damage to enemies.

Emulating holy might (function 65) doesnt work either because it will apply the debuff to yourself.

While testing many combinations, i eventually figured out that the default settings for inner sight works fine, that is to say function 6, it allows you to target enemies without applying the debuff to yourself. Function 6 seems like it would be very helpful if you are making auras that are only meant to debuff enemies and you need to use the emin/emax fields.

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

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

Post by Cypress » Mon Sep 06, 2021 6:54 pm

Question wrote:
Sun Sep 05, 2021 4:02 am
Spent a lot of time struggling with these earlier. I was trying to turn inner sight into an aura. I tried emulating Conviction (function 66) and that doesnt work because inner sight uses the emin/emax fields which causes teh aura to do damage to enemies.
Inner Sight doesn't need the emin/emax fields, it only uses those out of convenience. You can use this formula to replicate it:

A+B*max(min(lvl-1,7),0)+C*max(min(lvl-8,8),0)+D*max(min(lvl-16,6),0)+E*max(min(lvl-22,6),0)+F*max((lvl-28),0)

Where A=emin/emax, B=eminlev1/emaxlev1, C=eminlev2/emaxlev2, D=eminlev3/emaxlev3, E=eminlev4/emaxlev4, F=eminlev5/emaxlev5. So for example, if you want to directly copy over Inner Sight's vanilla values:

40+25*max(min(lvl-1,7),0)+45*max(min(lvl-8,8),0)+60*max(min(lvl-16,6),0)+80*max(min(lvl-22,6),0)+100*max((lvl-28),0)

Would give you the same result. You could put this formula in any calculation-accepting cell and then reference it for the armorclass stat. As such, you absolutely could use function 66 for an Inner Sight aura.
Question wrote:
Sun Sep 05, 2021 4:02 am
While testing many combinations, i eventually figured out that the default settings for inner sight works fine, that is to say function 6, it allows you to target enemies without applying the debuff to yourself. Function 6 seems like it would be very helpful if you are making auras that are only meant to debuff enemies and you need to use the emin/emax fields.
Are you saying you turned srvdofunc=6 into an aura directly? The issue with that is your character is still casting the skill even though it is an aura. So every time the perdelay elapses, it will interrupt your current action, which causes a lot of invisible issues. For example, if your srvdofunc=6 aura triggers while you are casting a missile, then the missile will be produced cltside, but srvside it will do nothing. I recommend you prove this to yourself: set perdelay of your aura to 1 and try fighting a monster while using the aura. You should notice that even though it appears that your character is doing something, almost all of your actions do not actually do anything.

In your case, this doesn't really matter since srvdofunc=66 should work for emulating Inner Sight. But in the case that you do, for whatever reason, want an unusual aura (i.e. an aura that isn't using srvdofunc=65,66,81,82), then I strongly recommend using an invisible pet to carry the aura instead. You can keep the pet's aura level synchronized with your own by passing over stats which tell it what it's aura level should be.

Question
Posts: 87
Joined: Sat Nov 28, 2009 1:53 pm

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

Post by Question » Tue Sep 07, 2021 12:55 am

Are you saying you turned srvdofunc=6 into an aura directly?
Yes, thats what I thought I did. Hmm...i will try testing it, thanks for the headsup.

Edit : I just tested this with perfdelay to 1. I turned the aura on and set immolation arrow to my left mouse button and went to fight some mobs. No issues at all, i was one shotting them like normal and the immolation arrows were creating the fire patches.

However, i set the "aurastate" to be different from the "auratargetstate"...so the aura on my character is different from the aura on the targets. I did it this way so that the aura on my target looks different from the one applied to the targets. Not sure if this has any effect. But I dont see any glitches at all.

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

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

Post by Cypress » Tue Sep 07, 2021 7:14 pm

Awesome find, Question! It does work perfectly. One of the first things I did when I began modding was messing around with auras, and I ended up disappointed since it seemed like nearly every skill worked poorly with auras. Now with some more comprehensive testing:

[SKILLS AS AURAS]

A skill can be converted into an aura by setting aura=1 and giving it an aurastate=. Perdelay will control how often it activates, in frames (so perdelay=50 is 2 seconds per activation). Not all skills work well as auras, since many of them will interrupt the player's actions, causing fake missiles and fake attacks to be released.

Note that auras ignore restrictions. They can be used in any form, with any states, ignore weapon type requirements and do not care if you are out of mana. A way to work around this is to use calculations that modify the power of the aura based on stats or skill levels, since these will be updated every time the aura updates. So for example, if you want to make it so a Static Field aura deals double damage with two-handed weapons, then you would want to make it so the % of life damage calculation is 0 unless a stat given by two-handers is on the user.

UNUSUAL CASES:
srvdofunc=44 (Blade Sentinel, does interrupt, but creates an entirely new skill that follows you around, mass-producing itself but also limited due to the pet limit; in other words, the interruption doesn't really matter since it proliferates itself and thus the aura does not need to be active for it to function)
srvstfunc=18,srvdofunc=59 (Attract, technically does interrupt, but it won't cast again on the same target so the interruption is minimal)
srvdofunc=54 (Blade Shield, the aoe attack hit, will interrupt Dragon Talon and Dragon Tail, but only if the aoe attack hit is hitting the same target as your kick on the same frame; so if you hit a target beyond the aoe range, then you will hit)

FUNCTIONS THAT DO NOT CAUSE INTERRUPTIONS WHEN USED AS AURAS:
srvdofunc=6 (Inner Sight, which Question discovered)
srvstfunc=5,srvdofunc=7 (Jab)
srvdofunc=9 (Frenzy, periodically hits with main hand only; works with one weapon)
srvdofunc=9,srvdofunc=13 (Fend)
srvstfunc=37,srvdofunc=13 (Zeal)
srvstfunc=10,srvdofunc=14 (Lightning Strike)
srvdofunc=20 (Static Field)
srvdofunc=23 (seen on Energy Shield and Blaze)
srvdofunc=24 (Fire Wall)
srvdofunc=25 (Enchant)
srvdofunc=27 (Teleport)
srvstfunc=13,srvdofunc=29 (Thunder Storm; only works fully if you have at least one level in the respective skill)
srvstfunc=22,srvdofunc=33 (Psychic Hammer)
srvstfunc=23,srvdofunc=34 (Tiger Strike and Cobra Strike; notably, the other charge-up function does not work, but it seems that we can change those skills to this srvdofunc and make them compatible with auras)
srvdofunc=43 (Shock Web)
srvstfunc=25,srvdofunc=46 (Dragon Claw, only uses the main hand if dual-wielding; works with one weapon equipped)
srvstfunc=26,srvdofunc=48 (Blade Fury, shoots missiles for the duration of your animation)
srvdofunc=51 (Mind Blast)
srvstfunc=28,srvdofunc=54 (Blade Shield, hits as often as perdelay as per usual; only works fully if you have at least one level in the respective skill)
srvstfunc=12,srvdofunc=52 (Dragon Flight; does not seem to do any attacking, only warps to selected targets)
srvdofunc=65,66,81,82 (aura functions)
srvdofunc=70 (Double Swing, behaves like Frenzy, periodically hitting with main hand only; works with one weapon)
srvdofunc=71 (Taunt)
srvdofunc=74 (Double Throw, consumes the main-hand first; works with one weapon)
srvdofunc=80 (Fist of the Heavens, won't release its missiles but it will release its special locking-on damage)
srvstfunc=14,srvdofunc=144 (Hydra)
srvdofunc=150 (Smite)
srvstfunc=42,srvdofunc=83 (Fire Hit, works great, only repeats once after an attack unlike other attack auras which constantly repeat. Would make for an excellent melee attack booster without being completely overpowered)
srvstfunc=43,srvdofunc=84 (MaggotEgg, seems to unleash the defined summon every time you do an activation frame, for example from an attack or from releasing a missile)
srvdofunc=87 (MagottLay, unleashes the defined summon if there is space for it and if you are namelocking something)
srvstfunc=46,srvdofunc=88 (AndrialSpray, released only while animating)
srvdofunc=98 (MonTeleport)
srvdofunc=104 (DiabPrison)
srvstfunc=64,srvdofunc=109 (MonFrenzy, constantly attacks as long as you are animating, doesn't matter if that animation is an attack or a spell. Also applies its incrementing aurastats)
srvdofunc=129 (Imp Teleport)
srvdofunc=131 (Overseer Whip)
srvstfunc=28,srvdofunc=145 (seen on Blade Shield and Hurricane state)
srvstfunc=28,srvdofunc=146 (seen on Blade Shield and Armageddon state; only seems to start working if you get the above Blade Shield/Hurricane to jumpstart it)

DOESN'T INTERRUPT, BUT DOESN'T DO ANYTHING EITHER:
srvstfunc=8,srvdofunc=12 (Strafe)
srvstfunc=24,srvdofunc=42 (Dragon Talon)
srvstfunc=27,srvdofunc=50 (Dragon Tail)
srvstfunc=29,srvdofunc=64 (Sacrifice)
srvstfunc=38,srvdofunc=76 (Whirlwind)
srvstfunc=41,srvdofunc=78 (Leap Attack)
srvstfunc=32,srvdofunc=79 (Conversion)
srvstfunc=56,srvdofunc=120 (Feral Rage, Maul)
srvdofunc=124 (seen on Hurricane and Armageddon)
srvstfunc=48,srvdofunc=90 (Swarm Move)
srvstfunc=55,srvdofunc=107 (Mosquito)
srvstfunc=62,srvdofunc=135 (MinionSpawner)
srvstfunc=44 (MagottUp)
srvstfunc=52 (Emerge)
srvdofunc=138 (this func is not on any vanilla skills)

FUNCTIONS THAT CAUSE INTERRUPTIONS WHEN USED AS AURAS:
srvstfunc=6,srvdofunc=2 (Power Strike)
srvstfunc=7,srvdofunc=2 (Impale)
srvstfunc=6,srvdofunc=11 (Charged Strike)
srvstfunc=32,srvdofunc=2 (Bash and a few other skills)
srvstfunc=35,srvdofunc=2 (Vengeance)
srvstfunc=39,srvdofunc=2 (Berserk)
srvdofunc=8 (Teeth, Multiple Shot)
srvdofunc=10 (Bone Spirit, Guided Arrow)
srvdofunc=15 (Decoy)
srvdofunc=16 (Valkyrie)
srvdofunc=17 (Charged Bolt)
srvdofunc=18 (seen on many self-buffs, like Bone Armor, Frozen Armor, Fade)
srvstfunc=12,srvdofunc=21 (Telekinesis, removing srvstfunc=12 doesn't help)
srvdofunc=22 (seen on nova skills, like Nova, Frost Nova and Howl)
srvdofunc=26 (Chain Lightning)
srvdofunc=30 (seen on most curses)
srvstfunc=16,srvdofunc=32 (Poison Dagger, interrupts and also doesn't do anything)
srvstfunc=23,srvdofunc=35 (Fists of Fire, Claws of Thunder, Blades of Ice and Phoenix Strike: notably, if we change these to use dofunc=34 instead, then they do work with auras)
srvdofunc=45 (traps)
srvdofunc=49 (Shadow Warrior and Shadow Master)
srvdofunc=56 (non-iron golems)
srvdofunc=60 (Bone Wall)
srvdofunc=61 (Confuse)
srvdofunc=62 (Bone Prison)
srvstfunc=31,srvdofunc=67 (Charge)
srvdofunc=68 (seen on Barbarian novas, excluding Howl)
srvdofunc=73 (Blessed Hammer)
srvstfunc=40,srvdofunc=77 (Leap, permanently locks up the character)
srvstfunc=50,srvdofunc=92 (Quick Strike, only interrupts if you are using a bow)
srvdofunc=114 (Raven)
srvdofunc=115 (druid vine summons)
srvdofunc=116 (seen on Werewolf and Werebear; tested with states that aren't wolf/bear since character transformations can cause interruptions)
srvdofunc=117 (Firestorm)
srvdofunc=118 (Twister and Tornado)
srvdofunc=119 (druid mammal and spirit summons)
srvdofunc=122 (Hunger)
srvdofunc=123 (Volcano)
srvdofunc=85 (UnholyBolt and ShamanFire)
srvstfunc=45,srvdofunc=86 (MagottDown)
srvstfunc=47,srvdofunc=89 (Jump, locks up the player)
srvstfunc=49,srvdofunc=91 (EvilHutSpawner, locks up the player)
srvstfunc=50,srvdofunc=92 (ravenstrike, only interrupts if the player is using a bow, but doesn't seem to do anything either way)
srvdofunc=93 (GargoyleTrap)
srvstfunc=53,srvdofunc=95 (FetishInferno)
srvdofunc=96 (ZakarumHeal)
srvdofunc=99 (PrimePoisonNova)
srvdofunc=100 (DiabCold)
srvdofunc=101 (FingerMageSpider)
srvdofunc=102 (DiabWall)
srvdofunc=105 (DesertTurret)
srvdofunc=106 (ArcaneTower)
srvstfunc=37,srvdofunc=109 (BloodLordFrenzy)
srvdofunc=110 (MissileSkill1)
srvdofunc=111 (FetishAura)
srvdofunc=112 (MonCurseCast)
srvdofunc=125 (Wake of Destruction Sentry)
srvstfunc=59,srvdofunc=126 (ImpInferno)
srvstfunc=60,srvdofunc=127 (Suck Blood)
srvdofunc=130 (Vine Attack)
srvdofunc=132 (Imp Fire Missile)
srvdofunc=133 (Impregnate)
srvdofunc=134 (Siege Beast Stomp)
srvdofunc=136 (DeathMaul)
srvdofunc=139 (Baal Cold Missiles)
srvdofunc=141 (Baal Corpse Explode, also seems to produce invisible objects that get in the way)
srvdofunc=148 (DoomKnightMissile)
srvdofunc=149 (NecroMageMissile)
srvstfunc=53,srvdofunc=152 (DiabLight)
srvstfunc=60,srvdofunc=2 (hybridized Suck Blood)
srvdofunc=150 (this func is not on any vanilla skills)


{Wasn't able to find a way to test corpse-consuming skills, Unsummon. Didn't test Iron Golem.}

Also noticed that Double Swing and Frenzy use Left Hand Swing, so if that skill is changed, it will also change the off-hand hit of Double Swing and Frenzy.

[CHARGE-UPS]

It is typically thought that only the usual charge-up functions, those used by Fists of Fire, Tiger Strike, etc, are the only skills capable of giving charges (or at least I thought that). This isn't true, there are a few other functions that can also create charges, allowing for more varied charge-up playstyle.

LIST OF NON-ATTACKING FUNCTIONS WHICH CAN PROGRESSIVELY BUILD CHARGE-UPS FOR AND FROM OTHERS:
srvdofunc=65 (Might, Defiance, etc)
srvdofunc=66 (Holy Fire, Holy Shock, Sanctuary, Conviction)
srvdofunc=81 (Holy Freeze)
•Each of these functions can be used to share aurastats, which are given to allies. So for example, you can replace the Fire Golem's Holy Fire aura with a Fists of Fire charge-building aura, and you will be able to release Fist of Fire charges.

LIST OF NON-ATTACKING FUNCTIONS WHICH CAN PROGRESSIVELY BUILD CHARGE-UPS:
srvdofunc=18 (Frozen Armor, Bone Armor, Cyclone Armor, Burst of Speed, etc)
srvdofunc=65 (Might, Defiance, etc)
srvdofunc=66 (Holy Fire, Holy Shock, Sanctuary, Conviction)
•Use passivestats to apply progressive charges.
srvdofunc=81 (Holy Freeze)
•Use passivestats to apply progressive charges.
srvdofunc=82 (Redemption)
•Use passivestats to apply progressive charges.
srvdofunc=124 (Armageddon, Hurricane)
•Cltside breaks and only displays one charge, but builds charges properly srvside.
srvstfunc=28 (Blade Shield)

LIST OF NON-ATTACKING FUNCTIONS WHICH CAN SET CHARGE-UPS:
srvdofunc=23 (Blaze, Energy Shield)
•Can set charges through passivestats.
srvdofunc=47 (Cloak of Shadows)
srvdofunc=116 (Werewolf, Werebear)

LIST OF ATTACKING FUNCTIONS WHICH CAN PROGRESSIVELY BUILD CHARGE-UPS:
srvdofunc=34 (Tiger Strike, Cobra Strike, Phoenix Strike)
srvdofunc=35 (Fists of Fire, Claws of Thunder, Blades of Ice)
srvstfunc=56, srvdofunc=120 (Feral Rage, Maul)

---

[FINISHING MOVES]

A Finishing Move is a skill which can release a charge-up and benefit from the progressive_tohit stat.

A Finishing Move is not enabled by the skills.txt finishing column. The finishing column is a boolean which determines if the progressive_tohit stat acts as a percent attack rating bonus to a Finishing Move. The skill must be a Finishing Move to benefit from this bonus, if it is not a Finishing Move, then the attack rating bonus will appear to apply but will not actually apply.

The following are finishing moves: Attack (srvdofunc=1), Left Hand Swing (srvdofunc=1), Dragon Talon (srvdofunc=42), Dragon Claw (srvdofunc=46), Dragon Tail (srvdofunc=50), Dragon Flight (srvdofunc=52).

---

[HARDCODED ID LISTING]

ID=0 (Attack): Required to rotate weapons while attacking with two weapons as an Assassin or Barbarian.
ID=1 (Kick): Required to kick objects, like barrels and urns.
ID=2 (Throw): Throwing mastery stats will not apply to clones.
ID=3 (Left Hand Throw): Throwing mastery stats will not apply to clones.
ID=90 (Iron Golem): Required for Iron Golem to be remembered from game to game.

ID=98 (Might): Aura Enchanted monumod
ID=102 (Holy Fire): Aura Enchanted monumod
ID=108 (Blessed Aim): Aura Enchanted monumod
ID=114 (Holy Freeze): Aura Enchanted monumod
ID=118 (Holy Shock): Aura Enchanted monumod
ID=122 (Fanaticism): Aura Enchanted monumod
ID=123 (Conviction): Aura Enchanted monumod

ID=66 (Amplify Damage): Cursed monumod
ID=184 (MonTeleport): Teleportation monumod

ID=169 (Nest): {can't remember}
ID=173 (SpiderLay):
ID=176 (Submerge):
ID=197 (DiabWall):
ID=216 (QueenDeath):
ID=217 (Scroll of Identify)
ID=218 (Book of Identify)
ID=219 (Scroll of Townportal)
ID=220 (Book of Townportal)
ID=284 (Baal Taunt)
ID=285 (Baal Corpse Explode)
ID=286 (Baal Monster Spawn)
ID=287 (Catapult Charged Ball)
ID=288 (Catapult Spike Ball)

ID=294 (Vine Attack): Used by cltdofunc=89 to define vine graphics
ID=300 (Impregnate): {}
ID=303 (CatapultBlizzard)
ID=304 (CatapultPlague)
ID=305 (CatapultMeteor)
ID=315 (Baal Tentacle)
ID=316 (Baal Nova)
ID=317 (Baal Inferno)
ID=318 (Baal Cold Missiles)
Last edited by Cypress on Fri Feb 16, 2024 10:52 am, edited 13 times in total.

Question
Posts: 87
Joined: Sat Nov 28, 2009 1:53 pm

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

Post by Question » Tue Sep 07, 2021 7:42 pm

Wow, that must have taken a long time to test. Im glad to hear that function 6 works fine to turn a skill into an aura though, that makes things a lot easier to turn many debuff skills into auras.

Question
Posts: 87
Joined: Sat Nov 28, 2009 1:53 pm

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

Post by Question » Fri Sep 17, 2021 7:16 am

Hmm i was experimenting with raise skeleton to try and allow it to be summonable like golems (dont need a corpse, can cast in town).

If i use the same function as golems (function 56), it works and i can summon them in town...but they are summoned with no weapons and do no damage (mages in particular just run up and melee enemies).

Functions "15/56" and "blank/31" do not cause anything to be summoned although the casting animation will play. "blank/56" summons skeletons but they have no weapons.

Whats causing the weapons to be summoned along with the skeletons? If i use functions "15/31" but allow the skill to be cast without targetting a corpse, nothing gets summoned.

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

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

Post by Cypress » Tue Sep 21, 2021 9:46 pm

After some investigating, Srvdofunc=31:
(1) It is what provides the different weapon graphics for Necroskeletons (Raise Skeleton) based on the level of the skel_mastery state.
(2) It also is required for the necromage AI to function.
(3) Gives the random energy balls to Necroskeletons.
(4) Makes sure the energy balls are identical.

I don't think it is possible to emulate (1) with a different pet function. At best, you can set the skeletons to have one weapon always, or one random weapon. This is controlled in monstats2.txt: necroskeleton row, RHv column. nil means no weapon, so if you remove that, your skeletons will always spawn with a weapon.
As for (2), you can't emulate it exactly, but you could try using a different AI. For example, the GrizzlyBear AI is can be configured as a ranged AI by giving long meleerange and setting his chance to use skill1 to 100% (see: https://d2mods.info/forum/viewtopic.php?t=65397).
Due to (3), you can't really have Necromages unless you use Srvdofunc=31, since their random missile type is based on their energy ball graphics.
(4) can be kind of emulated by changing the monstats2.txt S4v necromage graphics into a composite of both S4v and S5v

Also, srvstfunc=15 makes it so that the two different energy balls in the Necromage (Raise Skeletal Mage) hands are synchronized.

In short, you're probably best off sticking with the original 15/31 functions. You could make corpses less of an issue by adding in a spell that summons corpses.

User avatar
kain_abel_666
Posts: 68
Joined: Fri Apr 03, 2020 12:13 pm
Location: Canada
Canada

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

Post by kain_abel_666 » Sat Oct 30, 2021 4:01 am

Hey Cypress, - great work on all these guide
You mention "this allows it to function well even when not being used as an aura (e.g. as an area of effect explosive damage spell)." in regards to the Holy Auras used as spells and not auras. I am having trouble getting the aura to cycle off. I want it to be a short time debuff after a big explosive blast style spell. I have been using auralencalc but it as the timer for the aurastate but no matter what i put in there - the state stays active.

Any Advice?
I've stayed quite a while and heard what you have to say. Now it is time for the real Kain to emerge.

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

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

Post by Cypress » Mon Nov 01, 2021 2:19 pm

Hi kain_abel_666, auras are weird in that they do not use auralencalc, but rather perdelay for the length of their state application. This makes it so that every time the aura updates it will apply its state for just as long. So if you set perdelay=100, then it will apply for 100 frames. Fortunately, perdelay is a formula accepting column, so you have as much control as you would with auralencalc (the main difference is that you cannot reference perdelay, but you can reference auralencalc; of course, you can get around this by setting perdelay=len, such that perdelay is always equal to auralencalc, which is useful for skilldesc synchronization).

User avatar
Necrolis
Senior Admin
Throne
Posts: 9125
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

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

Post by Necrolis » Mon Nov 01, 2021 5:14 pm

Cypress wrote:
Mon Nov 01, 2021 2:19 pm
Hi kain_abel_666, auras are weird in that they do not use auralencalc, but rather perdelay for the length of their state application. This makes it so that every time the aura updates it will apply its state for just as long. So if you set perdelay=100, then it will apply for 100 frames.
This is not really the case, the state is actually always active, the srvdo just gets invoked every perdelay (which gets rounded to a boundary to prevent you fast toggling through skills to abuse things like holy shock etc).
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
kain_abel_666
Posts: 68
Joined: Fri Apr 03, 2020 12:13 pm
Location: Canada
Canada

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

Post by kain_abel_666 » Wed Nov 03, 2021 12:45 am

Necrolis wrote:
Mon Nov 01, 2021 5:14 pm
Cypress wrote:
Mon Nov 01, 2021 2:19 pm
Hi kain_abel_666, auras are weird in that they do not use auralencalc, but rather perdelay for the length of their state application. This makes it so that every time the aura updates it will apply its state for just as long. So if you set perdelay=100, then it will apply for 100 frames.
This is not really the case, the state is actually always active, the srvdo just gets invoked every perdelay (which gets rounded to a boundary to prevent you fast toggling through skills to abuse things like holy shock etc).
I see - i was just wondering because then the overlay never switches off and is very confusing - i wish i had more control over the casting overlays - thx all for your replies
I've stayed quite a while and heard what you have to say. Now it is time for the real Kain to emerge.

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

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

Post by Cypress » Wed Nov 03, 2021 5:51 pm

Thanks Necrolis!

So basically, this doesn't actually work as well as I thought it did. As for the overlay never turning off, I'm not quite sure what you mean because it lasts (up to) perdelay when I've used it, the overlay never lasted longer than expected (but does usually run out sooner than expected).

There are some alternative solutions, but they have flaws of their own:
(1) Inner Sight + Explosion Missile (effect is centered on the player). Should work very well, except Inner Sight only supports 1 aurastat at a time.
(2) Curse + Lobbed Explosion Missile (effect near cursor). The explosion and curse will often times desync, so it's kind of awkward to use.
(3) State Missile + Explosion Missile (can be centered on the player or occur near the cursor). Can't support synergies, instead the state will reference the enemy's stats.

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

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

Post by Nagahaku » Mon May 15, 2023 3:03 pm

Hi Cypress, perhaps i've just found something... it seems that traps, which means srvdofunc 45 doesn't apply aurastats or passive stats, and no aurastates either. I noticed this when trying to use srvdofunc 45 summoning a vine, and 'vine_beast' state that displaying vine-like movements never shown. then i tried to set some elem pierce stats to traps and did a little test, seems they didn't work as they did on hydras :cry:

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

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

Post by Cypress » Mon May 15, 2023 11:42 pm

Hi Nagahaku, I did a few tests with Charged Bolt Sentry:

Gave passive_ltng_pierce=0, had them fight zombies with 99 lightning resistance. Result: zombies take almost no damage.
Gave passive_ltng_pierce=200, had them fight zombies with 99 lightning resistance. Result: zombies die in a few casts.

Gave passive_ltng_mastery=0, had them fight zombies with 10000 life. Result: zombies take almost no damage.
Gave passive_ltng_mastery=10000, had them fight zombies with 10000 life. Result: zombies die in a few casts.

Stats definitely seem to be working. And the reason you aren't seeing an aurastate is probably because of the 'noOvly' column in monstats2.txt, which is set to 1 for traps. This setting makes it so states are invisible on the monster. By setting noOvly to 0, I got the might aurastate to appear on a Charged Bolt Sentry.

As for the 'vine_beast' state, I only ever remember getting it to work with the vine srvdofunc=115.

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

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

Post by Nagahaku » Tue May 16, 2023 4:01 am

Cypress, yeah you're right, the stats work with srvdofunc 45, what happened during my test is because my txt got corrupted somehow, after replacing them with my backups they turned normal :D along with 'vine_beast' state.
that vine movement state works with almost every summon skill i think, i've just made a triple headed vine summoning skill with hydra's srvdofunc 118

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

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

Post by Cypress » Sun May 21, 2023 11:01 pm

Thanks Nagahaku, the vine_beast state does work, my problem was that vine_beast uses cltdofunc 89 which is hardcoded to read cltmissiles from the skill with ID 294 (Vine Attack).

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

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

Post by Nagahaku » Mon Jul 31, 2023 1:39 pm

Cypress wrote:
Sun Sep 06, 2020 5:23 pm
[Enchant] Applies a state to a target, either the user or a pet/ally.
(srvdofunc=25)
(aurastate=,auralencalc=,aurastat1-6=, auraevent
Hmmm... I failed when trying to apply an auraevent with srvdofunc=25, does it require any specific settings? i just tried to make frozen armor like skills able to cast on hirelings...

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

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

Post by Cypress » Tue Aug 01, 2023 12:36 am

Nagahaku, you are right. Thanks for letting me know! It seems like curses can apply auraevents to targets that aren't yourself, but unfortunately that doesn't work with allies unless you use roundabout methods like creating a spell that summons an enemy monster that casts the curse on you. If you are interested, I could come up with something. I'll also do some investigating on auraevents to confirm every possible means of applying them.

Seems like the skills that get auraevents are:
Frozen Armor
Energy Shield
Whirlwind
Amplify Damage
All pets (except shadows, although you could give shadows a skill that applies the auraevent to them so they can practically get auraevents)

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

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

Post by Nagahaku » Thu Oct 19, 2023 7:58 am

Cypress wrote:
Tue May 18, 2021 8:16 pm
Only one of the summons can have a pet leash, more than one will cause a crash
Hi, I'm a bit confused about this, how did that crash happen? I have created many summoning skills with srvdofunc=144, and no crash encountered. As a sample, I've made the Carrion Vines skill summons 3 vines that one of them recycles HP, another recycles MP, and the last one does nothing but following you, they worked fine together without crashing.
Also, I've found something funny about the Hydras: at least when using Hydra AI, the monster's SK1 linked missile's damage seems to be fixed with the summoning skill, you must set 'skill' column in 'missiles.txt' to the summoning skill, otherwise the missile couldn't identify its own level so its damage would always be level 1 value. And, it seems that the SK1 skill must be a common missile skill which means srvdofunc=0, srvstfunc=0, otherwise it would not read level information either. I didn't make further test, just tried to switch it to a inferno skill but failed. I'll do more test to see what really happened.
Edit: I think I found something about Hydra's SK1. the missile damage seems to be really fixed to the Summoning skill, not SK1 skill, set 'skill' column to the SK1 skill or anything else in missiles.txt would not work, and I believe same situation fits Assasin's Trap skills. And, you must give synergy skills to Hydras through 'sumskillX' as well to make the synergies work, so I believe the logic behind it might be:
Summoned Creatures would automatically inherit its summoning skill's level, even not being given through 'sumskillX', but the synergy skills couldn't be inherited together, so you must give them manually through 'sumskillX'.
And, I think it might be the AI script that forbidden their SK1 missile's damage to be linked with other skills.

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

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

Post by Cypress » Sat Oct 21, 2023 1:41 pm

Hi Nagahaku, now that I'm re-testing Hydra, I see that most of what I wrote was wrong. I can't find a way to unsummon pets made through Hydra, the game isn't crashing when using multiple pets with leash, necropet AI doesn't cause insta-death on hydra (this only happens with the melee necropets, not with necromages), clc1 isn't used (rather ln12 is used) and the duration death only applies to pets with AI=hydra. Thanks for testing it out, it's great to know that Hydra has more uses than I thought!

It doesn't seem like the summoning skill level matters for the pet's skill level. If I set the Hydra's HydraMissile sumsk1calc=99, then even if the skill is level 1, it is killing 1000 HP zombies in one shot. And if I set HydraMissile's sumsk1calc=1, then even if I upgrade the skill a lot, the damage is really bad, much less than it should be.

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

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

Post by Nagahaku » Sat Oct 21, 2023 4:27 pm

Cypress wrote:
Sat Oct 21, 2023 1:41 pm
It doesn't seem like the summoning skill level matters for the pet's skill level.
Hmm... I'll test to find what mistakes I've made.

Post Reply

Return to “General Mod Making”