Guide to Elements, Elemtypes and Etypes

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

Guide to Elements, Elemtypes and Etypes

Post by Cypress » Sat Feb 03, 2024 7:29 pm

Elemental types, or elemtypes, or etypes, are the fundamental damage types. They are (barely) defined in ElemTypes.txt, although your only options are to delete elements, change their reference codes or to add new elements.

These are the basic rules that apply to all elements:
(1) If a skill has EType=(ElemType code), then the corresponding ID of that element in ElemTypes.txt determines which item_elemskill parameter increases its skill level. This allows you to create "new" elements, such as Physical phys, which can be added to the ElemType of perhaps Jab to make it so that it scales with +X to Physical Skill Levels.
(2) If a skill or a missile has EType=(ElemType code), then the elemental damage dealt will be of that element. New and undefined elements will deal physical damage. A few missile and skill functions can convert physical damage to the EType element, for new elements this means a percentage of physical damage is being erased.

THANKS TO:
AlisonHell for describing how the "None" element deals elemental physical damage


---



[None][]
•Related Stats: damageresist, normal_damage_reduction, magic_damage_reduction (overflow)
•Applies if the etype=none, blank, a non-existant etype, or a new non-vanilla etype
•Adds elemental physical damage to melee attacks and non-missile skill damage (like Static Field, Telekinesis and Holy Fire); does not seem to work with missiles
•This physical damage is non-weapon, meaning that it is not modified by strbonus, dexbonus, damagepercent, etc

[Fire][fire]
•Related Stats: firemindam, firemaxdam, fireresist, maxfireresist, item_absorbfire_percent, item_absorbfire, item_pierce_fire, passive_fire_mastery, passive_fire_pierce, magic_damage_reduction, normal_damage_reduction (overflow)
•Elemental damage added to skills/missiles is functionally equivalent to 'firemindam' and 'firemaxdam'
•Overlay: fire_hit (ID=81)
•Hit Ally Sound: impact_fire_1 (ID=353)
•Hit Enemy Sound: impact_fire_layer_1 (ID=356)

[Lightning][ltng]
•Related Stats: lightmindam, lightmaxdam, lightresist, maxlightresist, item_absorblight_percent, item_absorblight, item_pierce_ltng, passive_ltng_mastery, passive_ltng_pierce, magic_damage_reduction, normal_damage_reduction (overflow)
•Elemental damage added to skills/missiles is functionally equivalent to 'lightmindam' and 'lightmaxdam'
•Overlay: lightning (ID=1)
•Hit Ally Sound: impact_lightning_1 (ID=368)
•Hit Enemy Sound: impact_lightning_layer_1 (ID=372)

[Magic][mag]
•Related Stats: magicmindam, magicmaxdam, magicresist, maxmagicresist, item_absorbmagic_percent, item_absorbmagic, magic_damage_reduction, normal_damage_reduction (overflow)
•Elemental damage added to skills/missiles is functionally equivalent to 'magicmindam' and 'magicmaxdam'

[Cold][cold]
•Related Stats: coldmindam, coldmaxdam, coldresist, maxcoldresist, item_absorbcold_percent, item_absorbcold, item_pierce_cold, passive_cold_mastery, passive_cold_pierce, magic_damage_reduction, normal_damage_reduction (overflow)
•Elemental damage added to skills/missiles is functionally equivalent to 'coldmindam' and 'coldmaxdam', with ELen giving 'coldlength'
•Overlay: ice_explode (ID=36)
•Hit Ally Sound: impact_cold_1 (ID=359)
•Hit Enemy Sound: impact_cold_layer_1 (ID=362)

[Poison][pois]
•Related Stats: poisonmindam, poisonmaxdam, poisonlength, poison_count, skill_poison_override_length, poisonresist, maxpoisonresist, item_poisonlengthresist, item_pierce_pois, passive_pois_mastery, passive_pois_pierce
•Elemental damage added to skills/missiles is functionally equivalent to 'poisonmindam' and 'poisonmaxdam' over elemental length 'poisonlength'.
•If applied through srcdam, 'poison' state applies for frames: edln + 'poisonlength'/'poison_count'
•If you have any 'skill_poison_override_length', then the 'poison' state is applied for that duration in frames instead
•Minimum poison DPS calc: edns*edln/256
•Maximum poison DPS calc: edxs*edln/256
{amazonbasin says DR overflow applies to first frame of poison. need to confirm. also, does MDR apply to first frame of poison?}

[Life Drain][life]
•Related Stats: lifedrainmindam, lifedrainmaxdam
•{has some weird rules when applied by etype, something like it steals 1% of life per value at hitshift=0}
•Overlay: steallife (ID=151)

[Mana Drain][mana]
•Related Stats: manadrainmindam, manadrainmaxdam
•{has some weird rules when applied by etype}
•Overlay: stealmana (ID=152)

[Stamina Drain][stam]
•Related Stats: stamdrainmindam, stamdrainmaxdam
•{only seems to work when used by monsters}
•{eats player stamina, doesnt seem to do anything else. doesnt seem to give monster life based on stamina stolen, nor does it seem to deal more damage based on stamina stolen.}

[Stun][stun]
•Related Stats: stunlength
•Elemental damage added to skills and missiles with hitshift=0 is functionally equivalent to 'stunlength', ELen is equivalent to 'stunlength'
•Applies the 'stunned' state, see [stunned]: viewtopic.php?t=67297
•Has a 100% chance of applying to regular monsters, a 10% chance versus champion and unique monsters, a 0% chance versus monsters with monstats.txt boss=1 or monstats.txt velocity=0
•If using missile psrvdmgfunc=7 or psrvdmgfunc=9, elemental stun won't be applied unless srcdam>0

[Random][rand]
•Related Stats: The stats of fire, ltng, mag, cold, pois
•Randomly applies either fire, lightning, magic, cold or poison damage.
•Poison damage is usually dealt in 1/256ths, but here it is dealt in the full value, so if you deal 100 rand damage, then if you select cold you deal 100 cold damage, but if you deal poison you deal 100 poison damage per frame (so 25 frames = 2500 poison damage); as such, you will probably want to keep poison duration at 1 frame; although you will still have problems if the player equips gear that adds more 'poisonlength'
•Adds random elemental damage to melee attacks and non-missile radial damage (like Static Field, Telekinesis and Holy Fire); does not seem to work with missiles

[Burning][burn]
•Related Stats: firelength, burningmin, burningmax
•Elemental damage added to skills/missiles is functionally equivalent to 'burningmin' and 'burningmax' over elemental length 'firelength'
•Applies the 'burning' state for frames: 'firelength'-1
•A target that dies with the 'burning' state is not considered to be killed by the burn user
•Melee attacks cannot apply the burning element through the related stats, but can apply the burning element through EType, added elemental skill damage and elemental damage conversion

[Freeze][frze]
•Identical to the cold element, except it gives freeze duration instead of 'coldlength' to non-missiles

Post Reply

Return to “General Mod Making”