Guide to Hardcoded States

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

Moderator: Nizari

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

Guide to Hardcoded States

Post by Cypress » Wed Oct 27, 2021 10:02 pm

There are many states which have special hardcoded functionality. This guide describes some of them. If you know of any other hardcoded states that have not been described or listed, then please let me know!

EDITS:
(10/27/2021) Added red & blue.

THANKS:
Amazonbasin (Open Wounds state description, Poison state description, Slowed state description, various formulae and many stat descriptions that are relevant for their respective states, Attract description, Throwing Mastery damage doubling bug)
Question (for figuring out how to make the cold state apply to radial damaging auras: viewtopic.php?f=4&t=67255)
Nefarius for describing justhit (viewtopic.php?t=48963) and for the AI compendium which helped in figuring out the red & blue states (viewtopic.php?t=36230)
Nagahaku for describing dodge/avoid (viewtopic.php?f=4&t=59405), blood_mana limits, restinpeace, shatter, finding documentation on changeclass, testing of various apparently deprecated/unused states
OrderOfTheScribble for discovering that shrine_skill gives a statless skill bonus, that it does not give the stat 'item_allskills'
Borgin for describing how Blaze only works with the blaze state
kong for finding that dimvision does not properly blind on battlecry, for finding that freeze erases monprop auras
ProAtWorkHere/NightWisher for noticing that justhit is grouped with various other Armor states

---


[freeze] ID=1
∙When applied by any source, it stops the animations and AI of any monsters, including boss monsters (although I think this can only be applied to bosses via skill aurastates/passivestates).
∙Does nothing to players.
∙If a monster is frozen and has an aura from most unusual sources (i.e. the aura is not being directly cast by the monster), the aura will be permanently lost if the aura updates while frozen, including:
○Auras from monprop.txt
○Auras from monequip.txt items
○Auras from equipping multiple set items through monequip.txt to give a partial set bonus
○Auras from passive skill auras
○Blade Shield Auras, as well as any other kind of aura=1, given by the above methods will also be lost

[cold] ID=11
∙When applied by the stats coldmindam/coldmaxdam and coldlength, it will reduce velocitypercent and attackrate by 50.
∙For an aura to successfully apply this state, it must: have no aurastats, deal cold damage and have ELen.
∙The slowing cannot be applied with cold given by an aurastate directly or the stat state.

[blaze] ID=13
∙Srvdofunc=23 (Blaze's release missiles while moving function) only works with this state.

[spiderlay] ID=22
∙Like the Blaze state, but more hardcoded.
∙Only produces srvside and cltside missile ID=143 (spidergoolay) as you move.

[stunned] ID=21
∙When applied by any source, it stops the AI of any monsters, including boss monsters.
∙When applied to players, it causes hit recovery (animmode=GH) to activate when hit.

[poison] ID=2
∙Poison enables kill properties on a monster, which includes anything that causes the Kill event (like Chance to Cast on Kill, Life on Kill), experience gain, magic find, gold find.
∙Poison deals poison damage every frame, which is overridden by higher poison damage rate applications.

[openwounds] ID=62
∙Similar to poison in that it enables kill properties.
∙If itemeventfunc=15 applies this state, it will deal damage.
∙The damage scales with the level of the user.
∙Damage is dealt with hitshift=0 (1/256 times damage) every frame, gaining 31+9*max(min(ulvl,15),0)+18*max(min(ulvl-15,15),0)+27*max(min(ulvl-30,15),0)+36*max(min(ulvl-45,15),0)+45*max(ulvl-60,0) damage per frame.
∙Lasts for 200 frames when applied by itemeventfunc=15.
∙Damage is halved with striking-only hits (missiles that deal SrcDam).
∙Damage is 1/2 against non-normal monsters and 1/4 against players.

[inferno] ID=12
∙Applied by skills with srvstfunc=11 (Inferno and Arctic Blast) while channeling the skill.

[playerbody] ID=7
∙Applied to the corpses of dead players.
∙{unknown purpose, maybe stores the value of % exp lost on death}

[skill_move] ID=18
∙Appears when using Leap, Leap Attack, Whirlwind and Charge.
∙{no idea what it does. maybe shows up on other skills}

[dimvision] ID=23
∙Causes monsters to lose their ability to search for enemies at a distance, but only if the state is applied under the correct circumstances.
∙If applied to targets through itemstatcost.txt itemevent#=9, then it will be blinded (see: https://www.theamazonbasin.com/wiki/ind ... nds_Target)
∙If applied to targets by srvdofunc=30 (as in Dim Vision), then it will be blinded.

[ironmaiden] ID=55
∙Only this state works with auraevent=4 (Iron Maiden).

[terror] ID=56
∙Causes monsters to flee, but only if the state is applied under the correct circumstances.
∙If a monster is given the state through skills.txt srvdofunc=30 (as in Terror), then it will flee based on auralencalc.
∙If a monster is hit by a missile with hitfunc=17 (as in Howl's howl missile), then it will flee based on the skill's ln56.
∙If applied to targets through itemstatcost.txt itemevent#=8 (as in the stat item_howl), then the target will flee.
∙See: https://www.theamazonbasin.com/wiki/ind ... er_to_Flee

[taunt] ID=27
∙If this state is applied to a monster via srvdofunc=71, the monster will chase the caster and attack in melee.

[slowed] ID=24
∙Applied by auraeventfunc=19 and auraeventfunc=27
https://theamazonbasin.com/wiki/index.php/Slows_Target

[concentration] ID=42
∙If this state gives damagepercent, then it will be applied to the magic damage of skills with srvdofunc=73 (Blessed Hammer), where the percent of damagepercent being applied is modified by the srvdofunc=73 skill's param1, in 8ths (so a value of 4 means half of the damagepercent is used to increase the skill's damage).

[preventheal] ID=52
∙This state is applied by the stat item_preventheal (ID=117) when a player with the stat attacks or strikes a target.
∙Lasts for 120,000 frames.

[conversion] ID=53
∙Applied by srvdofunc=51 (Mind Blast)

[uninterruptable] ID=54
∙Applied by Leap, Leap Attack and Whirlwind.
∙Causes the game to crash when applied to monsters.
∙Interrupts all actions when applied to players.
∙Also has remfunc=7 by default, although it doesn't seem to make a difference.
{maybe present on other skills?}

[attract] ID=57
∙State timer is not updated by re-application.
∙This means that, if applied via an aura, then it will constantly switch between on/off.
∙Monsters killed with this state by other monsters will give experience, but will not apply other kill effects like gold find and magic find and ctc on kill.
∙Monsters killed by monsters with this state will give experience, but will not apply other kill effects.

[dodge] ID=65
∙If given to an amazon, and the amazon triggers passive_dodge, then she will enter into the dodge animation.
∙Meaning an amazon without this state will not play the dodge animation even if she dodges.

[avoid] ID=66
∙If given to an amazon, and the amazon triggers passive_avoid, then she will enter into the avoid animation.
∙Meaning an amazon without this state will not play the avoid animation even if she avoids.

[pierce] ID=69
∙The stat skill_pierce will not work cltside unless you have this state.

[throwingmastery] ID=78
∙Required for the throwing mastery stats to display cltside, although the resulting damage display isn't accurate
∙passive_mastery_throw_th: Requires state to display on skilldesc.txt descatt=3 (Throw) and descatt=4 (Left Handed Throw), but descatt=1 (regular attacks) and descatt=2 (Double Throw) works properly without it
∙passive_mastery_throw_dmg: Requires state to display on skilldesc.txt descdam=3,4,13,21,22
∙Even with state, passive_mastery_throw_dmg damage bonus display is very erroneous, potentially displaying much more or much less damage than is actually being dealt, because it pretends to be multiplicative with other sources of +dmg% (it is additive) and applies twice to Throw and Left Handed Throw

[nomanaregen] ID=85
∙Seems to give -100% mana recovery, although it does not apply the stat manarecoverybonus nor manarecovery.
∙Using a source of manarecovery or manarecoverybonus will allow for mana regeneration.
∙Presumably, it modifies intrinsic mana regeneration (which isn't given by a stat).

[justhit] ID=86
∙Applied to a target when hit by a missile with nexthit=1 for as long as nextdelay= in frames.
∙Targets with this state cannot be hit by nexthit missiles until the state runs out.
∙Only applied by direct hits by missile, radial damage from missiles does not seem capable of applying this state.
∙If grouped with other states (as it is in vanilla with various Armor states), then it can be removed by applying one of those states, but it will not remove those states. So while Frozen Armor can remove justhit (allowing you to be hit again by a nextdelay missile), justhit cannot remove Frozen Armor.

[blue] ID=90
∙Used by AI=SandRaider when aip6=1

[red] ID=91
∙Used by AI=SandRaider when aip6=0
∙Used by AI=ClawViper when aip6=1

[revive] ID=96
∙Applied to monsters produced by srvdofunc=58 (Revive) and eventfunc=31 (reanimated monsters).

[sourceunit] ID=98
∙Appears on Shadow Warrior and Shadow Master (srvdofunc=49), Dopplezon aka Decoy (srvdofunc=15) and Valkyrie (srvdofunc=16).
∙Also appears on Hungry Dead produced by Blood Raven.
∙Seems to give the stats 'source_unit_type' and 'source_unit_id'
∙{unknown what it does, but probably has something to do with these monsters transforming into characters}

[healthpot] ID=100
∙State is removed when life is full.

[manapot] ID=106
∙State is removed when mana is full.

[holyshield] ID=101
∙Replaces equipped shield with the holy shield graphic, which has the graphical token HSH.
∙Can be made compatible with any character by adding in graphics for HSH to non-paladins.
∙The skill which creates the holyshield state will give a statless defense bonus based on the skill's calc1 that is additive with 'item_armor_percent'; this bonus only applies if you are wielding a shield.
∙The skill which creates the holyshield state will give a statless shield damage bonus based on the skill's physical damage settings (HitShift, MinDam, MinLevDam1, MinLevDam2, MinLevDam3, MinLevDam4, MinLevDam5, MaxDam, MaxLevDam1, MaxLevDam2, MaxLevDam3, MaxLevDam4, MaxLevDam5, DmgSymPerCalc).
∙Skilldesc.txt descdam=10 uses the skill with ID=117 (Holy Shield) to display Smite's bonus damage, based on the damage columns. This can result in a desync, as the true damage is based on the skill that casts the holyshield state, NOT based on Holy Shield's damage; Holy Shield is only used for cltside damage display. This can also cause a desync in vanilla, since Smite will always display the current level of Holy Shield, rather than the true damage which is based on the level at which holyshield was cast.

[just_portaled] ID=102
∙Town portals cannot be entered if this state is activated by any source onto the player.
∙This state is automatically applied to the player upon entering a town portal, lasting for ~88 frames.

[alignment] ID=105
∙Appears to be always active on all players and monsters.

[shatter] ID=107
∙Randomly applied when the stat coldlength applies the state cold, lasting just as long as coldlength.
∙Every application re-rolls shatter, so it usually disables itself.
∙Seems to occur on an average of 1/5 applications of cold.
∙Holywindcold (Holy Freeze) can also apply it, although the application is a bit bugged in that it can keep the shatter state going even after the holywindcold state runs out.
∙Freeze does not apply the shatter state.
On death, releases different cltside missiles depending on monstats2.txt Height column:
	height=1 creates ID=272 (icebreaksmall)
	height=2 creates ID=273 (icebreakmedium)
	height=3 creates ID=274 (icebreaklarge)
	height=4 creates ID=275 (icebreaksmoke)
Note that these missiles have pclthitfunc=31, which works as follows:

Code: Select all

HitIceBreak - Create a missile with a forced animation rate value of 1, depending on the missile class used.
·         If “Missile” equals “icebreaksmall” then create “icebreaksmallmelt” (ID=344)
·         If “Missile” equals “icebreakmedium” then create “icebreaklargemelt” (ID=345)
·         If “Missile” equals “icebreaklarge” then create “icebreaklargemelt” (ID=345)
·         If “Missile” equals “catapult cold explosion” then create “icebreaklargemelt” (ID=345)
On death, also simultaneously releases cltside missile ID=275 (icebreaksmoke).

[pregnant] ID=110
∙Applied when a skill with srvdofunc=133 is used on a target.
∙If applied by srvdofunc=133, it will also produce a defined summon with a defined summode, with the summon changing based on area level.

[blood_mana] ID=114
∙While active from some sources, players use life instead of mana when casting skills.
∙If given by an item via the 'state' stat, the game will crash upon casting a skill that uses mana.
∙Seems to work best when give by a skill's aurastate or passivestate.

[burning] ID=115
∙Applied by the stat firelength, lasting for the amount of firelength in frames-1 (i.e. 100 firelength will last for 99 frames).
∙If applied by firelength, will also deal the stats burningmin to burningmax damage over its length every frame, with a hitshift=0 (meaning 256 burning damage will deal 25 damage per second).
∙Also applied by skills using the elemtype burn.
∙Damage cannot be resisted.
∙Kills with burning do not count as the user's kill (i.e. experience, gold find, magic find, on-kill will not apply).

[corpse_noselect] ID=118
∙Applies to corpses that have been consumed by Find Potion, Find Item or Poison Explosion.
∙Basically, skills that use corpses but do not remove the corpse.
∙Has plrstaydeath=1, monstaydeath=1, bosstaydeath=1 and udead=1: if these settings are removed, then Find Potion and Find Item can be used again but will not release more items; Poison Explosion can also be used again and will produce more missiles.
∙Carrion Vine and Solar Creeper will also apply this state briefly, but it will disappear after the corpse explodes, which suggests that corpses still exist even after they are removed, but the overlay is hidden (also, vines will keep trying to eat corpses, with no success, if the non-selection settings are removed for this state).
∙FenrisRage also seems to work on corpse_noselect corpses as long as they can still be selected.
∙{Also given to some bosses like Blood Raven and The Countess. Probably by some setting in monstats2}

[corpse_nodraw] ID=104
∙Applied by Baal Corpse Explode {probably srvdofunc=141, unless it is hardcoded}

[skilldelay] ID=121
∙This state is applied when a player uses or activates a skill with a delay>0 in skills.txt.
∙This state works even if applied via unusual sources, such as auras.
∙While players have this state, they are unable to cast skills with delay>0.
∙{test if monsters can be affected by this state's function}

[shrine_skill] ID=134
∙Gives +2 to a statless bonus which acts almost exactly like +all skills, but does not add to your current amount of 'item_allskills'.accr

[shrine_stamina] ID=136
∙Stamina no longer drains
∙'stamina' becomes equal to 'maxstamina'
∙The stamina bar highlight string, string.tbl: panelstamina, becomes blue

[bloodlust] ID=141
∙The Nihlathak AI will keep casting skill2 on monsters with baseid=minion1 until the monster gains this state

[changeclass] ID=142
Nagahaku wrote:
Mon Jul 24, 2023 4:56 am
this state has setfunc=5, and i found this in blizzard's mod document...
setfunc=5:
Changes the monster’s class type to another monster’s class type. Gets the “shortparam1” stat defined in the ItemStatsCost.txt file and uses stat’s parameter to get the class type that the unit should change to. Only works for monster units. Has a special case where if the class the monster changed from was the “baalthrone” monster (defined in monstats.txt), then also set the path of the monster to move a direction.

I think this state controls 'baalthrone' turn back and walk into the chamber.
[invis] ID=146
∙Monsters have their overlays, shadows and the various pieces that make up their graphics turned invisible.
∙If a graphical state is applied while invisible, then that state will continue to be invisible until the invis state runs out of duration.
∙The hardcoded part only removes shadows from players, although in vanilla this state uses some softcoded state funcs to make players fully invisible as well.

[restinpeace] ID=172
∙Used by eventfunc=29, which in vanilla is used by itemstatcost item_restinpeace and property rip
∙Redemption does not use this state

[death_delay] ID=92
∙If you die while whirlwinding, this state is applied, killing you after whirlwind ends.
∙Does not seem to do anything if applied by other sources.

[sanctuary] ID=47
∙While you have this state, your physical damage (both weapon damage and non-weapon damage) ignores undead physical resistance.
∙Does not ignore physical resistance for Crushing Blow, Crushing Blow will be modified by undead physical resistance even if you have Sanctuary.

[attached] ID=143
∙Applies to imps that attach to steeds, but not to the steeds.

[uberminion] ID=184
Nagahaku wrote:
Fri Aug 25, 2023 7:12 am
I believe this one is applied by the minions spawned by uber mephisto/diablo/baal in battle.net, to make them leaving no corpse after death.
it's almost impossible to test because every singleplayer uberquest plugin, including plugY, basemod, is just simulating that in someway. plugY version is surely not using this state since they have corpse, and basemod version has no corpse, but also not using it in my test.
[skel_mastery] ID=97
∙Makes it so pets change monstats2 graphical parts based on level of the state. {Presumably only those produced by srvdofunc=31}.

Code: Select all

lvl 1		hax=RHv[0]
lvl 2-3		axe=RHv[1]
lvl 4-5		mac=RHv[2]
lvl 6-7		fla=RHv[3]
lvl 8-x		scm=RHv[4]

lvl 1-3		lit=HDv[0]
lvl 4-7		med=HDv[1]
lvl 8-x		hvy=HDv[2]

lvl 1-5		lit=TRv[0], LGv[0]
lvl 6-x		hvy=TRv[1], LGv[1]

lvl 1-3		lit=Rav[0]
lvl 4-8 	des=Rav[1]
lvl 9-x 	med=Rav[2]
(inaccessible)	hvy=Rav[3]

lvl 1-2		lit=Lav[0]
lvl 3-7		des=Lav[1]
lvl 8-x		med=Lav[2]
(inaccessible)	hvy=Lav[3]

lvl 1		RHv[0],HDv[0],TRv[0],LGv[0],Rav[0],Lav[0]
lvl 2		RHv[1],HDv[0],TRv[0],LGv[0],Rav[0],Lav[0]
lvl 3		RHv[1],HDv[0],TRv[0],LGv[0],Rav[0],Lav[1]
lvl 4		RHv[2],HDv[1],TRv[0],LGv[0],Rav[1],Lav[1]
lvl 6		RHv[3],HDv[1],TRv[1],LGv[1],Rav[1],Lav[1]
lvl 8		RHv[4],HDv[2],TRv[1],LGv[1],Rav[1],Lav[2]
lvl 9		RHv[4],HDv[2],TRv[1],LGv[1],Rav[2],Lav[2]

NOT TESTED FULLY:
none
fetishaura
prayer
thunderstorm
dopplezon
evade
redeemed
conversion_save
rabies
corpse_noselect
hurricane
armageddon
ebugcontrol
corpseexp: {Supposedly linked to the corpseexp missile, but modifying this state does not change Corpse Explosion nor its corpseexp missile}
sync_warped
lightningbolt
recycled
debugcontrol
runeword

NO KNOWN PURPOSE, PROBABLY DEPRECATED/UNUSED:
resistmagic
dragonflight
recycled
itemset1, itemset2, itemset3, itemset4, itemset5, itemset6
runeword
Last edited by Cypress on Sat Mar 23, 2024 2:39 pm, edited 52 times in total.

User avatar
loclazy
Posts: 11
Joined: Mon Nov 15, 2021 12:02 pm
United States of America

Re: Guide to Hardcoded States

Post by loclazy » Thu Dec 02, 2021 7:20 am

any idea why I cannot clone the ShadowWarrior state to make a new one? is it also hardcoded?

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

Re: Guide to Hardcoded States

Post by Nagahaku » Mon Jul 03, 2023 6:05 am

Hi, need some help.
blood_mana seems to be always removing it self when hp is higher than mp, and when i used it on a full-set state such as trang-oul's transform into vampire that can't remove itself, the game crashed when i cast a spell.
if this limit can be bypassed, maybe something like 'blood knight' or 'blood mage' would be much easier to make.

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

Re: Guide to Hardcoded States

Post by Cypress » Mon Jul 03, 2023 10:32 am

Hi Nagahaku, in what way are you applying blood_mana such that it removes itself when HP is higher than mana? When applying it as a passivestate, it seems to work well.

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

Re: Guide to Hardcoded States

Post by Nagahaku » Mon Jul 03, 2023 1:37 pm

I want to make trang-oul set a blood mage when it's full, so i replaced its transform state with blood_mana, and got a crash when i cast a spell.
perhaps i should do more test with it, not just give up so early. i'll try again. :)
Edit: yeah, i made it a passive skill instead of just replacing the 'monsterset' state and it worked :D
but still i don't know why simply replacing would cause a crash...
Last edited by Nagahaku on Mon Jul 03, 2023 2:11 pm, edited 1 time in total.

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

Re: Guide to Hardcoded States

Post by Cypress » Mon Jul 03, 2023 1:46 pm

Instead of giving the state directly, make the set give a passive skill which gives blood_mana as a passivestate.

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

Re: Guide to Hardcoded States

Post by Nagahaku » Mon Jul 03, 2023 2:24 pm

yeah, it worked with a passive skill, very good :D
i'll do some more test to see if srvdofunc=18 is also capable with it :)
Edit: srvdofunc=18 is also OK, i think it would be fine with all skills, but might crash when given in a item by 'state' property.

OrderOfTheScribble
Posts: 33
Joined: Wed Apr 05, 2023 7:35 pm
United States of America

Re: Guide to Hardcoded States

Post by OrderOfTheScribble » Mon Jul 03, 2023 11:30 pm

Cypress wrote:
Wed Oct 27, 2021 10:02 pm
[shrine_skill] ID=134
∙Gives +2 to 'item_allskills'
I've been testing my new mod recently, and it turns out pseudostats get increased by skill shrines, which means the skill shrine's bonus to all skills is not by adding to 'item_allskills'. In States.txt, the state has setfunc of 9, and remfunc of 6, which I'm guessing is the real way the skill shrine adds 2 to all skills.

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

Re: Guide to Hardcoded States

Post by Cypress » Tue Jul 04, 2023 12:31 am

Great find OrderOfTheScribble! I didn't realize it was one of those pesky statless bonuses. The fix is fortunately very easy. This is how I would do it:

In skills.txt, Kick (you can use any skill that is on every character, so Attack and Throw would work just as well; I like Kick because it has a shorter name and thus a shorter reference):
auralencalc=((lvl>0)?(lvl-stat('item_allskills'.accr)):(0)==3)?(2):(0)+stat('item_allskills'.accr)

This formula is similar to the previous pseudostat adjuster, but adapted specifically for Kick such that if Kick's allskill adjusted level is ever level 3 (i.e. when you have +2 skills from shrine_skill) then the outcome is 2, otherwise it is 0. I also tacked on stat('item_allskills'.accr) at the end to make some calcs cleaner down the line. In this way, 'kick'.len tells us (1) the amount of allskills we don't want applied to our pseudostats and (2) that we don't want shrine_skill giving a bonus to our pseudostats.

In skills.txt, replace every 'pseudostat'.len instance of:
(lvl>0)?(lvl-stat('item_allskills'.accr)):(0)
with
(lvl>0)?(lvl-skill('kick'.len)):(0)

This will make it so the pseudostat uses only the level of the pseudostat, and will ignore skill bonuses from any other methods. Note that this system can still break if you give +X to Kick on an item for whatever reason. So don't do that. If you want to use Kick as a skill, consider cloning it and giving the clone to players instead.

EDIT: Hold on, don't use this yet, I might have a better idea.
EDIT2: Alright my idea wasn't any better, I was hoping I'd be able to account for +skills to Kick such that even if you gained +lvls to Kick from items it could be corrected for, but now that I think about it, it is probably impossible. So don't ever give +lvls to Kick except through item_allskills and shrine_skill.

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

Re: Guide to Hardcoded States

Post by Nagahaku » Sun Jul 23, 2023 5:31 pm

Cypress wrote:
Wed Oct 27, 2021 10:02 pm
{restinpeace}: Supposedly linked to the redemption missile, but modifying this state does not change Redemption nor its redemption missile.
Found! this state applies on the target when you killing it if you have something with 'rest in peace' stat equiped.

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

Re: Guide to Hardcoded States

Post by Cypress » Mon Jul 24, 2023 12:59 am

Awesome find Nagahaku! I only tested Redemption and didn't think to check the Rest in Peace event. I've added it to the list.

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

Re: Guide to Hardcoded States

Post by Nagahaku » Mon Jul 24, 2023 4:56 am

Cypress wrote:
Wed Oct 27, 2021 10:02 pm
changeclass
this state has setfunc=5, and i found this in blizzard's mod document...
setfunc=5:
Changes the monster’s class type to another monster’s class type. Gets the “shortparam1” stat defined in the ItemStatsCost.txt file and uses stat’s parameter to get the class type that the unit should change to. Only works for monster units. Has a special case where if the class the monster changed from was the “baalthrone” monster (defined in monstats.txt), then also set the path of the monster to move a direction.

I think this state controls 'baalthrone' turn back and walk into the chamber.

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

Re: Guide to Hardcoded States

Post by Nagahaku » Mon Jul 24, 2023 5:24 am

Cypress wrote:
Wed Oct 27, 2021 10:02 pm
resistmagic
i'm quite sure this is a reserving slot for a resist magic aura, it's just following other elem resisting auras.
Cypress wrote:
Wed Oct 27, 2021 10:02 pm
dragonflight
this might be related with the dragonflight skill during early designs of the game but abandoned, it has nothing to do with the skill right now, i have changed it into something else then used it as a common state in my mod and nothing wierd happens...
Cypress wrote:
Wed Oct 27, 2021 10:02 pm
recycled
i think this might be related with those recycling vines in early designs, but also abandoned later, i removed its corpse relating functions and nothing goes wrong with the vines...
Cypress wrote:
Wed Oct 27, 2021 10:02 pm
itemset1, itemset2, itemset3, itemset4, itemset5, itemset6
not sure if they are related with set/full set bonuses, since they works like states instead of common item stats...

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

Re: Guide to Hardcoded States

Post by Nagahaku » Wed Jul 26, 2023 2:36 pm

Cypress wrote:
Wed Oct 27, 2021 10:02 pm
[taunt] ID=27
∙If this state is applied to a monster via srvdofunc=71, the monster will chase the caster and attack in melee
i have just found that the AI shift functions can't be activated by a missile (psrvhitfunc=23, s.hitpar1=71), so a 'taunt nova' like skill won't work :(

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

Re: Guide to Hardcoded States

Post by Nagahaku » Fri Aug 25, 2023 7:12 am

Cypress wrote:
Wed Oct 27, 2021 10:02 pm
uberminion
I believe this one is applied by the minions spawned by uber mephisto/diablo/baal in battle.net, to make them leaving no corpse after death.
it's almost impossible to test because every singleplayer uberquest plugin, including plugY, basemod, is just simulating that in someway. plugY version is surely not using this state since they have corpse, and basemod version has no corpse, but also not using it in my test.

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

Re: Guide to Hardcoded States

Post by Cypress » Sat Aug 26, 2023 11:33 am

Thanks Nagahaku, great finds! I've updated changeclass and uberminion, and put those other unknown ones under probably deprecated/unused; I can't find any hardcoded functionality for them either.
Nagahaku wrote:
Wed Jul 26, 2023 2:36 pm
i have just found that the AI shift functions can't be activated by a missile (psrvhitfunc=23, s.hitpar1=71), so a 'taunt nova' like skill won't work :(
A missile technically can do it by having the missile itself apply srvdofunc=71, through the HitMissileSkill function or [grimwardsmall] function. But then the problem is that the monster will be attracted to the missile itself, not to you. Maybe with proper settings, it can work like a Taunt Nova, although I haven't been able to get it to work well.

Post Reply

Return to “General Mod Making”