Guide to Events, Itemevents and Auraevents

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: 456
Joined: Fri Dec 01, 2017 2:08 am

Guide to Events, Itemevents and Auraevents

Post by Cypress » Mon Jun 10, 2024 11:43 pm

This is a guide describing events, itemevents and auraevents. Itemevents and auraevents are separate since they don't seem to share functions.

CREDITS:
Silvermane and Necrolis for confirming that the doactive event is non-functional.
Nefarius and BrotherLaz for writing the missiles.txt guide, which describes ReturnFire
Nefarius for describing how units killed by thorns and damaging auras will not trigger the killed event (https://d2mods.info/forum/viewtopic.php?t=37966), for writing the itemstatcost.txt guide
Amazon Basin for describing When You Kill An Enemy, Energy Shield, caster healing to Blood Golem description, for describing knockback, for describing Hit Causes Monster to Flee, Blinds Target, Freezes Target, Open Wounds, Crushing Blow, Chance to Cast.
Borgin and Kong for inspiration.
TrueMage for noticing an inaccuracy in the kill event description, and for reminding me of ctc-on-kill spells.
Necrolis for describing the unlisted "become_corpse" event, which I list as corpse for short

[EVENTS] Events that trigger itemevents and auraevents.
[ITEMEVENTS]
[AURAEVENTS]

---

[EVENTS]

[absorbdamage]
Triggers if successfully hit by an attack, missile, radial explosion (even from auras), thorns_percent, Psychic Hammer: seems to retaliate versus any source of damage.
Triggers against the attacker.
{can thorns trigger this, creating an infinite reaction?}
Triggers even if: the damage is fully reduced by damage reduction, no damage is dealt.
Does NOT trigger if damage: is blocked, is weapon blocked, is dodged, is avoided, is evaded.

[hitbymissile]
Triggers if colliding with a missile which has missiles.txt ReturnFire=1.
Triggers against the attacker.
Triggers even if the missile: deals no damage, is blocked, is avoided, is evaded.
{didn't test weapon block}

[damagedbymissile]
Triggers if successfully hit by a missile which has SrcDamage>0.
Triggers against the attacker.
Triggers even if the missile: damage is fully reduced by damage reduction, deals no damage.
Does NOT trigger if the missile: is blocked, is weapon blocked, is avoided, is evaded.

[attackedinmelee]
Triggers if an attack attempt is made.
Triggers against the attacker.
Triggers even if the attack: damage is fully reduced by damage reduction, is blocked, is weapon blocked, is dodged, is evaded.

[damagedinmelee]
Triggers if successfully hit by a melee attack.
Triggers against the attacker.
Triggers even if the attack: damage is fully reduced by damage reduction.
Does NOT trigger if the attack: damage is fully reduced by damage reduction, is blocked, is weapon blocked, is dodged, is evaded.

[domissiledamage]
Triggers if successfully hitting with a missile or radial damage (such as with icejavalin's psrvhitfunc=44, resultflags=1, hitflags=32) which have SrcDamage>0.
Triggers against the defender.
Triggers even if: the damage is fully reduced by damage reduction, no damage is dealt.
Does NOT trigger if damage: is blocked, is weapon blocked, is avoided, is evaded.

[domeleedamage]
Triggers if a melee attack successfully hits a target.
Triggers against the defender.
Triggers even if: the damage is fully reduced by damage reduction.
Does NOT trigger if melee hit: is blocked, is weapon blocked, is dodged, is evaded.

[domeleeattack]
Triggers if a melee attack attempt is made, even if it does not hit.
Triggers against the defender.
Triggers even if melee hit: is blocked, is weapon blocked, is dodged, is evaded.

[kill]
Triggers if you kill an enemy with SrcDamage, or if the enemy is killed by negative 'hpregen' stat while they have the 'poison' (ID=2) or 'openwounds' (ID=62) state.
Triggers against the killed.
If used with itemeventfunc=30, then the trigger will activate even with non-srcdamage kills, like from Bone Spear or Frozen Orb.

[killed]
Triggers if the defending user dies to an attacker; thorns (auraevent=4, itemevent=6,10,11,12 and thorns_percent) and damaging auras (skill srvdofunc=66,81) will not activate the trigger.
Triggers against the attacker.

[corpse]
Not listed in events.txt by default, can be added by putting in a 13th row and giving it a name.
Triggers if the user dies by any means, releasing the event when the user finishes their death animation (from DT to DD).
Even if the DD or DT animations are missing, will still release the event.
Does not have a target, so only itemevent=20,30 will do anything {didn't test auraevents since I'm 99% sure they won't do anything without a target}.

[levelup]
Triggers when you level up.
{Triggers against?}
Does not trigger if you gain the 'level' stat through non-leveling up means, like through a state or an item.
A potion that gives the 'level' stat through pspell=3 will update your level on the next kill, triggering a level-up and resetting your level back to your original level since you don't have enough experience to keep that level (could be useful if you want to keep benefitting from ctc on level-up at max level).
Can also let players trigger level-ups forever by making it so the max level has negative expratio, so the moment they reach max level, the next kill will bring them back down to the previous level. However, the player will gain permanent level-up benefits each time which is generally not acceptable (the only way you could make this work is if your mod has no permanent level-up bonuses).

[domissileattack]
{Non-functional? Unable to get this to do anything. Regular weapon damage missiles don't work, shapeshifted melee attack with a bow doesn't work.}

[doactive]
Non-functional.




---

[ITEMEVENTS]

[6][item_attackertakesdamage]
•Adds additional physical damage to events.
•Amount determines the additional damage.
◦Vanilla Behavior: Defending owner deals damage to attacking target, applies {thorns} overlay and {thorns} sound.
◦Mod Behavior: Attacking owner deals additional damage to defending target, does not apply overlay or sound.
•Cannot trigger the 'kill' event.
•Return Damage Events: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed
•Deal Additional Damage Events: domissiledamage, domeleedamage, domeleeattack
•Do-nothing Events: hitbymissile, corpse, {kill might work but it would be pointless}, {probably levelup}

[10][item_attackertakeslightdamage]
•Adds additional lightning damage to events.
•Amount determines the additional damage.
◦Vanilla Behavior: Defending owner deals damage to attacking target, applies {ltng} overlay and {ltng} sound.
◦Mod Behavior: Attacking owner deals additional damage to defending target, does not apply overlay or sound.
•{Cannot trigger the 'kill' event probably, didn't test}.
•Return Damage Events: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed
•Deal Additional Damage Events: domissiledamage, domeleedamage, domeleeattack
•Do-nothing Events: hitbymissile, {kill might work but it would be pointless}, {probably levelup}

[11] Unused in vanilla
•Adds additional fire damage to events.
•Amount determines the additional damage.
◦Vanilla Behavior: Defending owner deals damage to attacking target, applies {fire} overlay and {fire} sound.
◦Mod Behavior: Attacking owner deals additional damage to defending target, does not apply overlay or sound.
•{Cannot trigger the 'kill' event probably, didn't test}.
•Return Damage Events: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed
•Deal Additional Damage Events: domissiledamage, domeleedamage, domeleeattack
•Do-nothing Events: hitbymissile, corpse, {kill might work but it would be pointless}, {probably levelup}

[12] Unused in vanilla
•Adds additional cold damage to events.
•Amount determines the additional damage.
•Applies cold duration for {unknown} frames.
◦Vanilla Behavior: Defending owner deals damage to attacking target, applies {cold} overlay and {cold} sound.
◦Mod Behavior: Attacking owner deals additional damage to defending target, does not apply overlay or sound.
•Return Damage Events: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed
•Deal Additional Damage Events: domissiledamage, domeleedamage, domeleeattack, kill (has a chance to destroy corpses)
•Do-nothing Events: hitbymissile, corpse, {probably levelup}

[7][item_knockback]
•Event causes knockback.
•Boolean.
•See: https://www.theamazonbasin.com/wiki/index.php/Knockback
◦Vanilla Behavior: Attacking owner applies knockback to defending target.
◦Mod Behavior: Attacker applies knockback to defending owner.
•Knockback Target: domissiledamage, domeleedamage, domeleeattack
•Knockback Self: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed (will change the direction you face upon reviving)
•Do-nothing Events: hitbymissile, corpse, kill {might work on shapeshifted characters}, {probably levelup}

[8][item_howl]
•Event inflicts the 'terror' state and makes terrorized targets flee.
•Amount determines chance to terrorize, in 128ths instead of 100ths.
•See: https://www.theamazonbasin.com/wiki/ind ... er_to_Flee
◦Vanilla Behavior: Attacking user makes defending target flee.
◦Mod Behavior: Defending user makes attacker flee.
•Offensive Flee: domissiledamage, domeleedamage, domeleeattack, kill (lasts only while monster is in DT animmode, and only if terror state has monstaydeath=1)
•Defensive Flee: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed
•Do-nothing Events: hitbymissile, corpse, {probably levelup}

[9][item_stupidity]
•Event inflicts the 'dimvision' state and makes the target blind.
•See: https://www.theamazonbasin.com/wiki/ind ... nds_Target
◦Vanilla Behavior: Attacking user makes defending target blind.
◦Mod Behavior: Defending user makes attacker blind.
•Offensive Blind: domissiledamage, domeleedamage, domeleeattack, kill (lasts only while monster is in DT animmode, and only if dimvision state has monstaydeath=1)
•Defensive Blind: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed
•Do-nothing Events: hitbymissile, corpse, {probably levelup}

[14][item_freeze]
•Event inflicts the 'freeze' state and cold duration to the target.
•See: https://www.theamazonbasin.com/wiki/ind ... zes_Target
◦Vanilla Behavior: Attacking user makes defending target frozen.
◦Mod Behavior: Defending user makes attacker frozen.
•Offensive Freeze: domissiledamage, domeleedamage, domeleeattack
•Defensive Freeze: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed
•Do-nothing Events: hitbymissile, corpse, {probably levelup}
•Crashing Event: kill (even if you remove everything softcoded from the freeze state, it still crashes)

[15][item_openwounds]
•Event inflicts the 'openwounds' state and makes the target take damage over time.
•Amount determines chance to apply bleeding.
•See: https://www.theamazonbasin.com/wiki/ind ... pen_Wounds
◦Vanilla Behavior: Attacking user makes defending target bleed.
◦Mod Behavior: Defending user makes attacker bleed.
•Offensive Bleed: domissiledamage, domeleedamage, domeleeattack, kill (enemy bleeds eternally if openwounds has plyrstaydeath,monstaydeath,bossstaydeath=1)
•Defensive Bleed: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed
•Do-nothing Events: hitbymissile, corpse, {probably levelup}

[19][item_slow]
•Event inflicts the 'slowed' state and slows the target.
•If applying negative slow, the target gets faster.
•Amount determines how much slow/speed to apply to target.
•See: https://www.theamazonbasin.com/wiki/ind ... ows_Target
◦Vanilla Behavior: Attacking user makes defending target slow.
◦Mod Behavior: Defending user makes attacker slow.
•Offensive Slow: domissiledamage, domeleedamage, domeleeattack, kill (lasts only while monster is in DT animmode, and only if slowed state has plyrstaydeath,monstaydeath,bossstaydeath=1)
•Defensive Slow: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed
•Do-nothing Events: hitbymissile, corpse, {probably levelup}

[29][item_restinpeace]
•Event inflicts the 'restinpeace' state to the target.
•Boolean.
•The unusable corpse part of RIP is softcoded to the state by udead=1.
◦Vanilla Behavior: Attacking user applies RIP to defending target.
◦Mod Behavior: Defending user applies RIP to attacker.
•Offensive RIP: domissiledamage, domeleedamage, domeleeattack, kill
•Defensive RIP: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed
•Do-nothing Events: hitbymissile, corpse, {probably levelup}

[13][item_damagetomana]
•Event restores the user's mana, applies the {manasteal} overlay.
•Negative value does not seem to do anything.
•Amount determines percentage of damage taken restored as mana.
◦Vanilla Behavior: Defending user recovers mana based on attacker's physical weapon damage.
◦Mod Behavior: Attacking user recovers mana based on their physical weapon damage applied to the defending target.
•Defensive Damage to Mana: damagedbymissile, attackedinmelee, damagedinmelee, killed (only relevant for shapeshifting)
•Offensive Damage to Mana: domissiledamage, domeleedamage, domeleeattack, kill
•Do-nothing Events: hitbymissile, corpse, absorbdamage, {probably levelup}

[16][item_crushingblow]
•Event deals a percentage of target's life as physical damage, applies the {crushingblow} overlay.
•Amount determines chance of crushing blow.
•See: https://www.theamazonbasin.com/wiki/ind ... shing_Blow
◦Vanilla Behavior: Attacking user applies crushing blow to defending target.
◦Mod Behavior: Defending user applies crushing blow to attacker.
•Offensive Crushing Blow: domissiledamage, domeleedamage, domeleeattack
•Defensive Crushing Blow: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed
•Do-nothing Events: hitbymissile, corpse, {kill might work but would only be relevant against shapeshifters}, {probably levelup}

[17][item_manaafterkill]
•Event recovers mana, gives the {manasteal} overlay.
•If negative, then lose mana instead.
•Amount determines how much mana is recovered/lost.
◦Vanilla Behavior: Attacking user recovers mana against defending target.
◦Mod Behavior: Defending user recovers mana by attacker.
•Offensive Mana Recovery: domissiledamage, domeleedamage, domeleeattack, kill
•Defensive Mana Recovery: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed (relevant for shapeshifters)
•Do-nothing Events: hitbymissile, corpse, {levelup might work but you regain all your mana on leveling anyways}

[28][item_healafterkill]
•Event recovers life, gives the {lifesteal} overlay.
•If negative, then lose life instead, down to a minimum of 1 (cannot kill).
•Amount determines how much life is recovered/lost.
◦Vanilla Behavior: Attacking user recovers life against defending target.
◦Mod Behavior: Defending user recovers life by attacker.
•Offensive Mana Recovery: domissiledamage, domeleedamage, domeleeattack, kill
•Defensive Mana Recovery: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed (relevant for shapeshifters)
•Do-nothing Events: hitbymissile, corrpse, {levelup might work but you regain all your life on leveling anyways}

[18][item_healafterdemonkill]
•Event recovers life if the target has monstats.txt demon=1, gives the {lifesteal} overlay.
•If negative, then lose life instead, down to a minimum of 1 (cannot kill).
•Amount determines how much life is recovered/lost.
◦Vanilla Behavior: Attacking user recovers life against defending target.
◦Mod Behavior: Defending user recovers life by attacker.
•Offensive Mana Recovery: domissiledamage, domeleedamage, domeleeattack, kill
•Defensive Mana Recovery: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed (only relevant for shapeshifters
•Do-nothing Events: hitbymissile, corpse, {levelup might work but you regain all your life on leveling anyways}

[20][item_skillonattack][item_skillonkill][item_skillonhit]
•Chance to cast a skill; if the skill creates a missile, then the missile is spawned on top of the target directed at the target
•Param determines skills.txt ID (skills over ID=1023 will overroll), min amount determines chance to cast, max amount determines level of skill (amount over 63 overrolls).
•See: https://www.theamazonbasin.com/wiki/ind ... ce_to_Cast
•Events: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed, domissiledamage, domeleedamage, domeleeattack, kill, levelup (released in the direction of the cursor from the target location), corpse (released in a random direction)
•Do-nothing Events: hitbymissile

[21][item_skillongethit]
•Chance to cast a skill; if the skill creates a missile, then the missile is spawned from the user directed at the target
•Seems to be identical to func 30, except that func 30 can use the levelup event.
•Param determines skills.txt ID (skills over ID=1023 will overroll), min amount determines chance to cast, max amount determines level of skill (amount over 63 overrolls).
•See: https://www.theamazonbasin.com/wiki/ind ... ce_to_Cast
•Events: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed, domissiledamage, domeleedamage, domeleeattack, kill
•Do-nothing Events: hitbymissile, corpse, levelup

[30][item_skillondeath][item_skillonlevelup]
•Chance to cast a skill; if the skill creates a missile, then the missile is spawned from the user directed at the target
•Param determines skills.txt ID (skills over ID=1023 will overroll), min amount determines chance to cast, max amount determines level of skill (amount over 63 overrolls).
•If used with the kill event, spells will be able to trigger the ctc, even without srcdamage nor poison/openwounds
•See: https://www.theamazonbasin.com/wiki/ind ... ce_to_Cast
•Events: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed, domissiledamage, domeleedamage, domeleeattack, kill, levelup (released in the direction of the cursor from the user), corpse (released in a random direction)
•Do-nothing Events: hitbymissile

[31][item_reanimate]
•Reanimate target if the event is occurring while the target dies, the reanimated monster gets the 'revive' state.
•Cannot reanimate monsters with monstats.txt velocity=0.
•Works well with offensive events; janky when using defensive events since the reanimation will only occur if you are taking the event when the target dies.
•Param is the monstats.txt row ID of the monster you want to reanimate; amount determines chance of reanimation.
•Proper reanimate: domissiledamage, domeleedamage, domeleeattack, kill
•Janky reanimate: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee,
•Do-nothing Events: hitbymissile, corpse, {killed might work but not going to test since it'd be almost useless}, {levelup probably}



---

[AURAEVENTS]

[1][Chilling Armor]
•Retaliates with a missile when hitbymissile is triggered.
•Trigger releases srvmissilea and cltmissilea
•Events: hitbymissile
•Do-nothing events: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, domissiledamage, domeleedamage, domeleeattack, kill, killed, levelup

[2][Frozen Armor]
•Applies freeze when triggered, applies freeze state and freeze duration.
•Freezes target of event for calc1 frames.
•Events: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, domissiledamage, domeleedamage, domeleeattack, kill (destroys corpse of normal monsters), killed
•Do-nothing events: hitbymissile, levelup

[3][Shiver Armor]
•Applies damage when triggered.
•Deals damage based on EType, EMin,EminLev#,Emax,EMaxLev#.
•For damage, all Etypes seem valid: for physical use no etype or a non-existant etype; rand and burn both work.
•For elemental duration, uses ELen and ELevLen#.
•By using etype=frze, this can do everything Frozen Armor's auraevent 2 can do, using ele dmg and elen instead of calc1.
•Events: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, domissiledamage, domeleedamage, domeleeattack, kill (basically useless, but with cold, rand or frze dmg it can destroy corpses), killed
•Do-nothing events: hitbymissile, levelup

[4][Iron Maiden]
•Has two possibilities, depending on the events used:
◦Vanilla Behavior: maidened target deals their own physical weapon damage to themselves when hitting any defenders, with a percent multiplier
◦Mod Behavior: maidened target takes percent multiplied physical weapon damage from attackers
•Behavior is hardcoded to require state ID=55 (ironmaiden).
•One of the few methods by which you can self-destruct; most methods of self-harm will only bring life down to 1, but Iron Maiden can kill.
•calc1: weapon damage percent multiplier, for monsters
•calc2: weapon damage percent multiplier, for players
•calc3: weapon damage percent multiplier, for {others? hirelings?}
•Negative calc values do not seem to do anything.
•Resultflags and Hitflags can be used for additional effects, like ignoring physical resistance and applying knockback.
•Hitclass determines damage reflection sound.
•Damage Self-Reflecting Events: domissiledamage, domeleedamage, domeleeattack
•Damage Multiplier Events: damagedbymissile, attackedinmelee, damagedinmelee
•Do-nothing Events: hitbymissile, kill, killed, {levelup probably}
•Crashing Events (OHKO anything you hit): absorbdamage

[5][Life Tap]
•Recover life when triggered based on physical weapon damage.
◦Vanilla Behavior: attacker's physical weapon damage restores life against tapped target
◦Mod Behavior: defender absorbs tapped target's physical weapon damage (if calc1 is negative, then tapped target gains a weapon damage multiplier versus the defender)
◦Mod Behavior: attacker recovers life when killing tapped target
•Life recovered is based on calc1; if negative, life is lost instead, which can bring you down to 1 life but cannot kill you.
•Life Recovery on Hit: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed (only recover on killing the tapped target)
•Absorb Damage as Life: domissiledamage, domeleedamage, domeleeattack
•Do-nothing Events: hitbymissile, kill, {levelup probably}

[22][Bone Armor]
•Reduces physical damage taken, only really works with 'absorbdamage' event.
•Uses aurastat1,aurastatcalc1 as the current life of the state (in 256ths) and aurastat2,aurastatcalc2 as the max life of the state (in 256ths).
•If using the absorbdamage event, then physical damage is taken first by the state instead of the user, until the state runs out of life.
•{Removes one piece of state overlay for every 1/3rd of state life gone. Not going to figure out exactly how this works because it's cltside and I don't really care.}
•Absorbs Attacker's Physical Damage Event: absorbdamage
•State takes attacker's physical damage, but does not absorb damage: damagedbymissile, attackedinmelee, damagedinmelee, killed (only applies if plrstaydeath, monstaydeath or bossstaydeath =1)
•State takes defender's physical damage, but does not absorb damage: domissiledamage, domeleedamage, domeleeattack, kill (only hurt your own shield on kill)
•Do-nothing Events: hitbymissile, {probably levelup}

[25][Cyclone Armor]
•Reduces fire, lightning and cold damage taken, {probably only works with 'absorbdamage' event}
•Uses aurastat1,aurastatcalc1 as the current life of the state (in 256ths) and aurastat2,aurastatcalc2 as the max life of the state (in 256ths).
•If using the absorbdamage event, then fire&ltng&cold damage is taken first by the state instead of the user, until the state runs out of life.
•{Probably supposed to remove parts of the state overlay as state life is lost, but it's broken and doesn't update properly}
•Absorbs Attacker's Fire&Ltng&Cold Damage Event: absorbdamage
{didn't test other events, they probably do nothing}

[24][Energy Shield]
•Reduces a percentage of damage taken, making mana take the damage instead, only works beneficially if using the 'absorbdamage' event
•calc1=only works with 'absorbdamage' event; percent of damage taken by mana instead of life; minimum value of 0, maximum value 95
•calc2=the amount of resistance your mana has to all damage types; the lowest value of 1 is equivalent to 100-6.25*1=93.75% resistance, and every additional value gives -6.25% resistance; so at 32 (the vanilla default), you have 100-6.25*32=-100% resistance; {the max value is basically unlimited}
•Energy Shield Event: absorbdamage
•Mana Takes Damage, but does not Absorb Damage: damagedbymissile, attackedinmelee, damagedinmelee, killed (only hurt mana when you die, if plrstaydeath=1; basically does nothing since you recover all your mana when you revive anyways)
•Hurt Your Own Mana: domissiledamage, domeleedamage, domeleeattack, kill (only hurt mana when killing an enemy)
•Do-nothing Events: hitbymissile, {levelup probably}
{how does energy shield get disabled? is it mana burn/mana dmg only?}

[23][Blood Golem]
•Gives a special kind of pet life steal that is shared with the owner, has two distinct flavors.
◦Vanilla Behavior: Pet gains weapon damage life steal that is given to the pet & owner
◦Mod Behavior: Pet life-steals off attacker's weapon damage, which is given to the pet & owner
•dm12 (diminishing returns, with param1 as the "min" value and param2 as the max value reached at level 60): Percent life steal bonus to pet, this life steal is special in that it can be shared with the owner
•param3: percent of life stolen that the owner gains
•Life Steal by Pet Hits, for Pet & Owner: domissiledamage, domeleedamage, domeleeattack
•Life Steal by Pet Weapon Damage Taken, for Pet & Owner: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed (only applies when pet dies)
•Do-nothing Events: hitbymissile, {levelup probably}
{pet only?}

[26][Blood Golem]
•Always gives potion sharing with pet regardless of event, also may cause owner to take damage from the pet
◦Vanilla Behavior: Damage pet takes is also taken by the owner
◦Mod Behavior: Damage pet deals is also dealt to the owner
•param5: Percent of damage taken by pet that is also taken by the owner; all damage types seem to apply, although poison will only deal the damage of the initial hit which is generally negligible; negative numbers make the owner heal instead
•param6: Percent of life given to pet when you drink a healing potion or rejuvenation potion, in both cases the healing is instantaneous; negative numbers do not seem to do anything {unknown if blood golem also gets healing potion crits or not; do new potions also work with healing, or is it hardcoded to only the vanilla potions?}
•Damage pet takes is also taken by owner: damagedbymissile, attackedinmelee, damagedinmelee, killed (only when pet dies to a monster)
•Damage pet deals is dealt to the owner: domissiledamage, domeleedamage, domeleeattack, kill (only when pet kills a monster)
•Do-nothing Events: absorbdamage, hitbymissile, {levelup probably}
•Potion healing share events: absorbdamage, hitbymissile, damagedbymissile, attackedinmelee, damagedinmelee, domissiledamage, domeleedamage, domeleeattack, kill, killed, levelup, doactive; anything works and behaves the same, even no event name, even made up event names, even new events added to events.txt
{pet only?}

[27][Clay Golem]
•Slows target of event based on the amount of item_slow (hardcoded to stat ID=150).
◦Vanilla Behavior: Slows attacker.
◦Mod Behavior: Slows defender.
•Is not pet only; other states can apply this auraevent, like with srvdofunc 18 (Frozen Armor).
•Defensive Slow Events: absorbdamage, damagedbymissile, attackedinmelee, damagedinmelee, killed
•Offensive Slow Events: domissiledamage, domeleedamage, domeleeattack, kill (only on kill, only while monster is in DT animation and disappears when in DD animation, and only lasts for those few frames if plrstaydeath,monstaydeath,bossstaydeath=1)
•Do-nothing Events: hitbymissile, {levelup probably}
{slow does not seem the same as the item_slow event. should check exactly how slowed monsters are getting through auras. or maybe it's that item_slow and this slow can stack?}

Post Reply

Return to “General Mod Making”