Guide to ItemStatCost.txt Stats

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 ItemStatCost.txt Stats

Post by Cypress » Wed Dec 08, 2021 11:57 pm

This is an attempt at describing all hardcoded stats. Stats are listed in the following format:

[name] (the name of the stat in vanilla, bracketed for easy searching)
•Characteristic 1 (bold indicates a characteristic that is not hardcoded to the stat)
•Characteristic 2
•etc

{} indicates uncertainty or the unknown. Usually, this is due to an inability to reference a stat or confusion. If you should know the answer, please let me know!
{need to describe what happens when you refer to a non-existent stat, which creates a specific error value}
{investigate why lightning bolt doesn't gain numerous stats}
{add links for hardcoded stat plugins and edits}

TERMINOLOGY:
Weapons.txt/armor.txt/misc.txt are collectively referred to as "WAM.txt"
Units include characters, monsters and hirelings.
'stat'.base means the stat's base value is being considered (i.e. 'strength'.base includes the Strength you start the game with and invested stat points into)
'stat'.mod means the stat is given as the non-base value (i.e. 'strength'.mod includes Strength from states and items)
'stat'.accr is the sum of base and modified (i.e. 'strength'.accr is displayed on the Character Screen)
'staf'.eff means that the stat is effectively modified, but is not actually (i.e. Berserk's 'armor_override_percent'.accr modifies 'armorclass'.eff such that it is treated as 0, although your 'armorclass'.accr is unchanged)
'stat'.item.xxx means the stat is item specific (i.e. 'item_armor_percent'.item.accr means the total +enhanced defense% on a given item, 'armorclass'.item.base means the base defense of the item, and 'armorclass'.item.mod means added defense from properties socketables)
'stat'.unit means the stat can be given to a specific item, but due to the way it is applied it is given globally (i.e. Berserker's Arsenal gives +75 'armorclass'.unit; Fortitude on a weapon gives +200 'item_armor_percent'.unit)
NOTE: Stats may be described as 'stat'.base, 'stat'.mod, 'stat'.accr, 'stat'.eff, etc so if I say "Kick Damage", that is NOT referring to the stat 'item_kickdamage'.accr, it is rather referring to a behavior that is stat-independent.

THANKS:
Amazonbasin for documenting and describing many of these stats and functions
Nefarius for organized stat information (https://d2mods.info/forum/viewtopic.php?t=10179)
Nefarius and HarvestWombs for the itemstatcost.txt guide (https://d2mods.info/forum/kb/viewarticle?a=448)
Hygiliak for finding 'pierce_idx' (https://d2mods.info/forum/viewtopic.php?t=49474)
Red Havoc for fully describing 'item_lightcolor' (https://d2mods.info/forum/viewtopic.php ... 31#p158869)
Nefarius for the hardcoded 'item_lightcolor' fix
Freiik for describing randomized 'item_addskill_tab' (https://d2mods.info/forum/viewtopic.php ... 27#p423854)
Drac0 for "A Simple Mans Guide to Calculating Item Drop Quality" (https://d2mods.info/forum/viewtopic.php?t=58662)
justin3009 for describing 'item_throwable' (https://d2mods.info/forum/viewtopic.php?t=53171)
Diablo2.diablowiki, for having an organized explanation of gold capacity (https://diablo2.diablowiki.net/Gold)
Pangaea for describing potion crits (https://d2mods.info/forum/viewtopic.php ... 04#p440027)
librarian for describing mana recovery (https://www.mannm.org/d2library/faqtoid ... ml#manareg)
OrderOfTheScribble for finding out what Value does
Nagahaku for describing Iron Golem fade, item_handofathena state, Anya's quest bonus giving both base and mod resists
RayveeN for debugging passive_summon_resist and finding its interaction with abs% stats

[HARDCODED STATS] A list of vanilla stats that are hardcoded in some way.
{might add extra sections later}

SEE ALSO:
A very interesting guide by ocarinas that will allow for the usage of parameters on passive skills. Technically works with any parameter-using stat, although by far the best use ('item_reanimate') is described in the guide (https://d2mods.info/forum/viewtopic.php?t=63447).

---


[HARDCODED STATS]

[STRENGTH]
•Character Screen displays 'strength'.accr.
•'strength'.base can be increased by spending 'statpts'.mod on the Character Screen
•Charstats.txt gives a defined amount of 'strength'.base to a newly made character (via str).
•Skills.txt and WAM.txt can specify required 'strength.accr' for the first point into a skill and required for equipment (via reqstr).
•WAM.txt adds a percent of 'strength'.accr as +dmg% (via StrBonus), which behaves identically to 'damagepercent'; this bonus only applies when the specific item is dealing damage, which can be a regular weapon, boots or a shield.
•If kick=1 in skills.txt for a skill that adds physical damage to attacks (i.e. Dragon Talon, Dragon Tail, Dragon Flight, hybridized Suck Blood), then physical damage is added according to the formula:
Minimum base damage = [ [ (stat('strength'.accr) + stat('dexterity'.accr) - 20) / 4] * (100 + Skill Bonus) / 100]
Maximum base damage = [ [ (stat('strength'.accr) + stat('dexterity'.accr) - 20) / 3] * (100 + Skill Bonus) / 100]

[ENERGY]
•Character Screen displays 'energy'.accr.
•'energy'.base can be increased by spending 'statpts'.mod on the Character Screen
•Charstats.txt gives a defined amount of 'energy'.base to a newly made character (via int).
•Charstats.txt gives 256*X/4 'maxmana'.base per 'energy'.accr and 256*X/4 'maxmana'.mod per 'energy'.mod (via X=ManaPerMagic)
•Charstats.txt gives 256*2.5*X/4 'mana'.base per 'energy'.base (via X=ManaPerMagic) {the 2.5 multiplier is the average of my results where X=1, there may be a degree of randomization or some unknown factor involved}
•Skills.txt can specify a required 'energy'.accr for the first point into a skill (via reqint).
•'manarecovery' given by misc.txt via pSpell=3 has a chance to be doubled based on energy (see: https://d2mods.info/forum/viewtopic.php ... 04#p440027)


[DEXTERITY]
•Character Screen displays 'dexterity'.accr.
•'dexterity'.base can be increased by spending 'statpts'.mod on the Character Screen
•Charstats.txt gives a defined amount of 'dexterity'.base to a newly made character (via dex).
•Skills.txt and WAM.txt can specify required 'dexterity.accr' for the first point into a skill and required for equipment (via reqdex).
•WAM.txt adds a percent of 'dexterity'.accr as +dmg% (via DexBonus), which behaves identically to 'damagepercent'.accr; this bonus only applies when the specific item is dealing damage, which can be a regular weapon, boots or a shield.
•Gives +5 'tohit'.base per 'dexterity'.accr
•Gives +1 defense per 4 'dexterity'.accr (note that this defense is NOT 'armorclass', it isn't even a stat, although it apparently behaves the same in most cases).
•If kick=1 in skills.txt for a skill that adds attacking physical damage (i.e. Dragon Talon, Dragon Tail, Dragon Flight, hybridized Suck Blood), then physical damage is added according to the formula:
Minimum base damage = [ [ (stat('strength'.accr) + stat('dexterity'.accr) - 20) / 4] * (100 + Skill Bonus) / 100]
Maximum base damage = [ [ (stat('strength'.accr) + stat('dexterity'.accr) - 20) / 3] * (100 + Skill Bonus) / 100]

[VITALITY]
•Character Screen displays 'vitality'.accr.
•'vitality'.base can be increased by spending 'statpts'.mod on the Character Screen
•Charstats.txt gives a defined amount of 'vitality'.base to a newly made character (via vit).
•Charstats.txt gives 256*X/4 'maxhp'.base per 'vitality'.accr and 256*X/4 'maxhp'.mod per 'vitality'.mod (where X=LifePerVitality)
•Charstats.txt gives 256*{???}/4 'hitpoints'.base per 'vitality'.base (where X=LifePerVitality)
•Skills.txt can specify a required 'vitality'.accr for the first point into a skill (via reqvit).
•'hpregen' given by misc.txt via pSpell=3 has a chance to be doubled based on vitality (see: https://d2mods.info/forum/viewtopic.php ... 04#p440027)

[STATPTS]
•Character Screen displays 'statpts'.base.
•'statpts'.base increases by 5 each time 'level'.base increases.
•'statpts'.base can be spent to increase the value of 'strength'.base, 'energy'.base, 'dexterity'.base and 'vitality'.base
•'statpts'.mod can be spent to increase the value of 'strength'.base, 'energy'.base, 'dexterity'.base and 'vitality'.base; 'statpts'.mod will only be spent after 'statpts'.base is used up, and for every 'statpts'.mod spent, 'statpts'.base will decrease by 1 (but since CSvsigned=0, negative 'statpts'.base will disappear on restart)

[NEWSKILLS]
•Skill Tree displays 'newskills'.base.
•'newskills'.base increases by 1 each time 'level'.base increases.
•Skills can only be upgraded if the Skills.txt skpoints value is equal to or less than 'newskills'.base.
•Each time a 'newskills'.base is spent into a skill, the skill's base level {might be a stat, e.g. 'item_singleskill'.base, but I can't verify} increases by 1.
•If respeccing, you get back skill base levels times their respective Skills.txt skpoints as 'newskills'.base {this is assumptive}
•If using Plugy's respec, it is highly recommended that you set ActiveSkillsUnassignmentOneForOne=1, otherwise respeccing will give back no 'newskills'.base for skills with Skills.txt skpoints value other than 1 (although it will also make skills with skpoints=0 return a skill point, which is perhaps as bad).
•Does not appear to do anything unless applied as .base, when applied by states and items the displayed and usable skill points are unchanged.

[HITPOINTS]
•Life Orb displays stat('hitpoints'.base) in 256ths (every other vanilla source also displays it in 256ths).
•When a unit's stat('hitpoints'.base) hits zero it is killed, which causes the unit to die unless it has a state with {the one that wolf/bear uses}, in which case the state is removed and the unit can keep living despite having stat('hitpoints'.base)=0, although if it should take any more damage without this state, then it will truly die.
•Every value of 'hpregen' gives 1 'hitpoints' per frame
•{openwounds} itemeventfunc=15 (as seen on 'item_openwounds'.mod) reduces stat('hitpoints'.mod) by 31+9*max(min(clc4,15),0)+18*max(min(clc4-15,15),0)+27*max(min(clc4-30,15),0)+36*max(min(clc4-45,15),0)+45*max(clc4-60,0) every frame; this life drain is multiplied by {list boss/player multipliers; note that AB says that putrid defilers are an exception, which suggests that they have a special baseid that overrides the boss setting, this is probably what keeps them from impregnating themselves}
•Behaves unusually when applied by aurastates: for the amount of hitpoints put into aurastat, you will gain 1x stat('hitpoints'.base) and 2x stat('hitpoints'.accr) upon activation; every time you get hit, it seems to apply 1x stat('hitpoints'.base) and 1x stat('hitpoints'.accr) {investigate further; also, how is it that prayer doesn't apply every time you get hit? are there other factors that can cause it to apply?}

[maxhp]
•The maximum 'hitpoints', in 1/256ths.
•Displayed as the upper limit of the life orb.

[hpregen]
•Every value of 'hpregen' gives 1 'hitpoints' per frame (or -1 'hitpoints' if negative).
•Can be thought of as Life per Second = 'hpregen'*25/256

[mana]
•The amount of mana, in 1/256ths.
•Displayed as the current fill of the mana orb, as a percentage of 'maxmana'.
•{}

[maxmana]
•The maximum 'mana', in 1/256ths.
•Displayed as the upper limit of the mana orb.
•Increases [Mana per Second].

[manarecoverybonus]
•Modifies the recovery of 'mana' by a percentage.
•See above for how it factors into the mana recovery formula.
•Formula (slightly altered from: https://www.mannm.org/d2library/faqtoid ... ml#manareg):
[Mana per Second] = 25 * [[256 * 'maxmana' / (25 * charstatsManaRegen)] * (100+'manarecoverybonus')/100] / 256 + 'manarecovery'*25/256

[manarecovery]
•Modifies the recovery of 'mana' by a flat amount.
•Applies additively with the [Mana per Second] formula.
•Seems to follow the same formula as 'hpregen': Mana per Second = 'manarecovery'*25/256

[stamina]
•The amount of stamina, in 1/256ths.
•Displayed as the current fill of the stamina bar, as a percentage of 'maxstamina'.
•{}

[maxstamina]
•The maximum 'stamina', in 1/256ths.
•Displayed as the upper limit of the stamina bar.
•{}

[staminarecoverybonus]
•{}

[item_staminadrainpct]
•{}

[level]
•Character Selection and Character Screen display 'level'.accr
•Equipment cannot be used if a character's 'level'.accr is lower than: Levelreq column in WAM.txt; lvl req column in SetItems.txt/UniqueItems.txt; levelreq column in MagicPrefix.txt/MagicSuffix.txt/AutoMagic.txt.
•Equipment 'level'.accr required can also be modified by applying additional 'item_levelreq'.accr to the item
•In normal difficulty, monsters have their 'level'.base set to monstats.txt Level; monsters that were not randomly generated by the level have their 'level'.base equal to Level(N) and Level(H) in nightmare and hell, respectively.
•In nightmare and hell difficulty, randomly generated monsters have their 'level'.base set by Levels.txt to MonLvl2Ex and MonLvl3Ex, respectively.
•Champions, Fanatics and Ghostly Monsters have 'level'.base increased by 2; Unique Monsters, Unique Monster Minions and Berserkers have 'level'.base increased by 3; the monumod leveladd adds +3 to 'level'.base (so a normal 'level'.base=2 Unique Monster with the monumod leveladd will have 'level'.base=2+3+3=8).
•Monsters will drop items with ilvl equal to their 'level'.base
•If in monstats.txt NoRatio=0, then their entries for normal/(N)/(H): minHP, maxHP, AC, Exp, A1MinD, A1MaxD, A1TH, A2MinD, A2MaxD, A2TH, S1MinD, S1MaxD, S1TH, El1MinD, El1MaxD will scale based on the monster 'level'.accr according to MonLvl.txt: (monstats.txt*monlvl.txt)/100
•In skills.txt, reqlevel determines the 'level'.accr requirement for the given skill, with the effective reqlevel increasing by 1 for each base level of the skill
•The missile psrvdofunc=17 (seen on Howl) will only apply the fear state to a target if the character 'level'.accr+skill('howl'.lvl)+param2 > monster 'level'.accr
•'level'.accr 'gold' and 'goldbank' limits.
•'level'.accr influences per character level stats.
•Conversion has special settings depending on 'level'.accr (see: 'conversion_level', 'conversion_maxhp')
•'level'.base affects experience gain, see experience.txt column ExpRatio and https://www.theamazonbasin.com/wiki/ind ... cter_level. 'level'.accr does not seem to affect experience gain whatsoever, if you are a lvl 1 barb and wield a weapon that gives +90 'level'.accr, then you still gain regular experience from mlvl 1 monsters
•{look for other missile/skill cases}


[experience]
•For characters, displayed on the Character Screen under Experience and as the numerator of the experience bar.
•For hirelings, displayed on the Mercenary Inventory under Experience.
•When it exceeds Next Level, the user gains 'level'.base
•'experience' is gained from killing monsters, based on Monstats.txt: Exp, Exp(N), Exp(H); and on MonLvl.txt (if Monstats.txt: noRatio=0): L-XP, L-XP(N), L-XP(H)
•'experience' gained from states does not count towards levels, even if it exceeds Next Level
•Indirect kills do not count towards experience (Flavie, wandering barbarians, Bone Wall/Bone Prison, some friendly fire), unless the kill is made while the monster is afflicted with the state poison or openwounds.
•See: https://www.theamazonbasin.com/wiki/ind ... Experience

[lastexp]
•{unknown; not sure where/when it is applied, if at all}
[nextexp]
•{unknown; not sure where/when it is applied, if at all}

[gold]
•Displays in your inventory.
•Picking up Gold converts it into an equivalent amount of 'gold'.
•Dropping 'gold' converts it into an equivalent amount of Gold.
•Selling items gives the described amount of gold as 'gold'.
•Buying and repairing items consumes 'gold', and if there should not be enough, then it will use 'goldbank'.
•Can be put into Your Private Stash.
•See: https://diablo2.diablowiki.net/Gold#Gold_Loss
•Maximum 'gold' is modified by 'level'.accr (see: https://diablo2.diablowiki.net/Gold#Max ... d_Capacity).
•Maximum 'gold' is 0 if 'level'.accr is less than 1.

[goldbank]
•Displayed in Your Private Stash.
•{Some percentage is taken on death.}
•Putting 'gold' into Your Private Stash increases 'goldbank'.
•Taking from your 'goldbank' reduces 'goldbank' and increases 'gold'.
•Reduced by purchasing and repairing items if you do not have enough 'gold'.
•See: https://diablo2.diablowiki.net/Gold#Gold_Loss
•Maximum 'goldbank' is modified by 'level'.accr (see: https://diablo2.diablowiki.net/Gold#Stash_Gold_Capacity).
•Maximum 'goldbank' is 0 if 'level'.accr is less than 1.

[tohit]
•Increases(+)/decreases(-) chance to hit with attacks and missiles (with tohit=1) according to the formula: {}

[item_tohit_percent]
•Displays as a percent modifier to 'tohit' on the Character Screen's Attack Rating
•Increases(+)/decreases(-) by a percent: 'tohit', 'item_demon_tohit' and 'item_undead_tohit'.
•Also modifies any related opstat given 'tohit', 'item_demon_tohit' and 'item_undead_tohit' (in vanilla, this includes: 'item_tohit_perlevel', 'item_demon_tohit_perlevel' and 'item_undead_tohit_perlevel').

[toblock]
•Displays on itemtypes.txt linked to itemtype=shie as Chance to Block: block+'toblock'.item.accr, up to a maximum of 75% (note that this display is dishonest, in that display values over 75% can still increase your chance of blocking).
•For monsters, this stat is only utilized if in monstats.txt noshldblock=1 or if they have monstats2.txt SHv which does not roll nil, with each point of 'toblock' increasing chance of blocking by +1%, up to a maximum of 100%.
•For characters, they must have an item linked to itemtype=shie equipped on larm or rarm, with a chance of successful block as: (block+'toblock')*('dexterity'.accr-15)/(2*'level'.accr), where block is the WAM.txt column for the equipped item; the chance of blocking is up to a maximum of 75%.
•Blocking can occur against any (melee) attack (even Berserk, which converts 100% to magic, can still be blocked).
•Blocking can occur against any missile with SrcDam>1 that deals physical damage (so if the missile has 100% conversion to elemental, then it can no longer be blocked even if SrcDam>1).
•Any item can act as a shield (block hits) as long as it connects to type=shie and is equipped in larm or rarm.
•Shields can block when dual-wielded (needs type shie for blocking and type weap to allow for dual-wielding on barbs), although it doesn't work well due to the lack of animations.

[mindamage]
•Displays on an item if itemtype=weap; does not display if WAM.txt: 1or2handed=0 and 2handed=1.
•Displays in descdam if {}; scaled by SrcDam of the skill.
•Minimum damage dealt by one-handed weapons (players) and A1 attacks (monsters).
•Also given by the mindam column in WAM.txt.
•If 'mindamage' > 'maxdamage' on melee attacks, then every additional point of 'mindamage' also increases the effective 'maxdamage' (so if you have 110 'mindamage' and 100 'maxdamage', then you deal 110-111 damage).
•If 'mindamage' > 'maxdamage' on missiles, then 'mindamage' and 'maxdamage' swap (so if you have 110 'mindamage' and 100 'maxdamage', then you deal 100-110 damage).
[maxdamage]
•Displays on an item if itemtype=weap; does not display if 1or2handed=0 and 2handed=1.
•Displays in descdam if {}; scaled by SrcDam of the skill.
•Maximum damage dealt by one-handed weapons (players) and A1 attacks (monsters).
•Also given by the maxdam column in WAM.txt.

[secondary_mindamage]
•Displays on an item if itemtype=weap and WAM.txt: 2handed=1.
•Displays in descdam if WAM.txt columns 2handed=1 and is being used with both hands; and if {proper descdam}; scaled by SrcDam of the skill.
•Minimum damage dealt by two-handed weapons (players).
•Also given by the 2handmindam column in WAM.txt.
•If 'secondary_mindamage' > 'secondary_maxdamage' on melee attacks, then every additional point of 'secondary_mindamage' also increases the effective 'secondary_maxdamage' (so if you have 110 'secondary_mindamage' and 100 'secondary_maxdamage', then you deal 110-111 damage).
•If 'secondary_mindamage' > 'secondary_maxdamage' on missiles, then 'secondary_mindamage' and 'secondary_maxdamage' swap (so if you have 110 'secondary_mindamage' and 100 'secondary_maxdamage', then you deal 100-110 damage).
[secondary_maxdamage]
•Displays on an item if itemtype=weap and WAM.txt: 2handed=1.
•Displays in descdam if WAM.txt columns 2handed=1 and is being used with both hands; and if {proper descdam}; scaled by SrcDam of the skill.
•Maximum damage dealt by two-handed weapons (players).
•Also given by the 2handmaxdam column in WAM.txt.

[item_throw_mindamage]
•Displays on an item if its WAM.txt type entry has itemtypes.txt: throwable=1.
•Displays in: descdam=3,21,22 (right-handed), descdam=4 (left-handed), descdam=13 (both); scaled by SrcDam of the skill.
•Minimum damage dealt by throwing weapons (players).
•Also given by the minmisdam column in WAM.txt.
•If 'item_throw_mindamage' > 'item_throw_maxdamage', then 'item_throw_mindamage' and 'item_throw_maxdamage' swap (so if you have 110 'item_throw_mindamage' and 100 'item_throw_maxdamage', then you deal 100-110 damage).
[item_throw_maxdamage]
•Displays on an item if its WAM.txt type entry has itemtypes.txt: throwable=1.
•Displays in: descdam=3,21,22 (right-handed), descdam=4 (left-handed), descdam=13 (both); scaled by SrcDam of the skill.
•Maximum damage dealt by throwing weapons (players).
•Also given by the maxmisdam column in WAM.txt.

[item_normaldamage]
•Displays under descdam=1,5,6,7,9,11,14,17,18,19,20,23,24; scaled by SrcDam of the skill.
•Adds to the damage calculation as a flat, unchanging bonus, but it is affected by 'damagepercent', 'item_mindamage_percent', 'item_maxdamage_percent' and strbonus/dexbonus of the attacking weapon or shield.
•Applies to Shield Damage (Smite), despite not appearing on its display (descdam=10).
•Adds minimum and maximum physical damage to (melee) attacks for all units, including Blade Shield (exceptions: Dragon Talon, Dragon Tail, Dragon Flight, and any kicking hybrids).
•Does not apply to any missiles (erroneously displays on Blade Fury which uses descdam=24 in vanilla).

[damagepercent]
•Percent increase for fist damage, 'mindamage' to 'maxdamage', 'secondary_mindamage' to 'secondary_maxdamage', 'item_throw_mindamage' to 'item_throw_maxdamage' and 'item_normaldamage'.
•Additive with the effective +dmg% bonus from 'strength'.accr and with non-weapon, equal amounts of 'item_mindamage_percent' and 'item_maxdamage_percent'.
•For monsters, applies to A1 (which is 'mindamage' and 'maxdamage'), A2 and S1.

[item_mindamage_percent]
•Acts as a percent increase.
•When off-weapon, applies to minimum 'item_normaldamage' (despite it not being an op stat), minimum fist damage (despite it not being a stat), 'mindamage', 'secondary_mindamage' and 'item_throw_mindamage'.
•For monsters, applies to A1 (which is 'mindamage'), A2 and S1.
•Properties.txt func=7 gives an equal amount of 'item_mindamage_percent' and 'item_maxdamage_percent'.
•When on weapons (excluding boots and shields), acts as a percentage multiplier to the WAM.txt given 'mindamage', 'secondary_mindamage' and 'item_throw_mindamage'.
•Due to its op and op stats, when on weapons (excluding boots and shields) it will act as a percent increase to the WAM.txt given 'mindamage', 'secondary_mindamage' and 'item_throw_mindamage'.
•If the op and op stats are removed, it will behave as off-weapon 'item_mindamage_percent' even when on a weapon.

[item_maxdamage_percent]
•Acts as a percent increase.
•When off-weapon, applies to maximum 'item_normaldamage' (despite it not being an op stat; this is the only way to make 'item_normaldamage' into a range), maximum fist damage (despite it not being a stat), 'maxdamage', 'secondary_maxdamage' and 'item_throw_maxdamage'.
•For monsters, applies to A1 (which is 'maxdamage'), A2 and S1.
•Properties.txt func=7 gives an equal amount of 'item_mindamage_percent' and 'item_maxdamage_percent'.
•Due to its op and op stats, when on weapons (excluding boots and shields) it will act as a percent increase to the WAM.txt given 'maxdamage', 'secondary_maxdamage' and 'item_throw_maxdamage'.
•If the op and op stats are removed, it will behave as off-weapon 'item_maxdamage_percent' even when on a weapon.

[armorclass]
•A specific item only displays itemdefense if it has base defense.
•itemdefense=('armorclass'.item.base)*(100+'item_armor_percent'.item.accr)/100+('armorclass'.item.mod).
•Displayed as Defense on the character screen:
(Σitemdefense+'armorclass'+'dexterity'.accr/4)*(100+'skill_armor_percent'.accr+'item_armor_percent'.accr)*('armor_override_percent'.accr)/100

[armorclass_vs_missile]
•Not displayed, even though it is relevant for defense calculations.
•Unlike 'armorclass', it is not multiplied by 'armor_override_percent', 'skill_armor_percent' nor 'item_armor_percent'.
•Acts like 'armorclass', but it only applies versus missiles with tohit=1.

[armorclass_vs_hth]
•Not displayed, even though it is relevant for defense calculations.
•Unlike 'armorclass', it is not multiplied by 'armor_override_percent', 'skill_armor_percent' nor 'item_armor_percent'.
•Acts like 'armorclass', but it only applies versus (melee) attacks.

[normal_damage_reduction]
•Subtracts(+)/adds(-) physical damage taken.
•If an enemy deals simultaneous physical and elemental damage and physical is fully negated, then the remainder is subtracted from elemental damage.
•Missiles.txt missiles with damagerate>0 will multiply the effectiveness of 'normal_damage_reduction', so if a missile has damagerate=41, deals 100 physical damage and you have 100 'normal_damage_reduction', then you take slightly less than 84 physical damage.

[magic_damage_reduction]
•Subtracts(+)/adds(-) elemental (fire, cold, lightning, magic) damage taken.
•If an enemy deals simultaneous physical and elemental damage and elemental is fully negated, then the remainder is subtracted from physical damage.
•Missiles.txt missiles with damagerate>0 will multiply the effectiveness of 'magic_damage_reduction', so if a missile has damagerate=41, deals 100 fire damage and you have 100 'magic_damage_reduction', then you take slightly less than 84 fire damage.

{also need to discuss resists in terms of immunities and immunity breaking}
{resists given via monstats.txt are .mod}

[damageresist]
•Percent decrease(+)/increase(-) to the amount of damage received by: fist damage, MinDam to MaxDam from skills.txt and missiles.txt, 'mindamage' to 'maxdamage', 'secondary_mindamage' to 'secondary_maxdamage', 'item_throw_mindamage' to 'item_throw_maxdamage', 'item_normaldamage', 'thorns_percent', itemeventfunc=4 (seen on Iron Maiden) and itemeventfunc=6 (seen on 'item_attackertakesdamage').
•Upper limit of 50 'damageresist' on players and hirelings.
•Lower limit of -100 'damageresist' on all units.
•Has no upper limit against itemeventfunc=16 (Crushing Blow, as seen on 'item_crushingblow'), providing invulnerability to Crushing Blow if a unit has 100 or more 'damageresist'
•Negative 'damageresist'.mod applies via states at 1/5 effectiveness on monsters with 100 or more 'damageresist'.mod {how does it interact with items or monprops?}


[magicresist]
•Modifies the amount of magic damage incurred by a percentage.
•This bonus caps at 75% on players and {presumably hirelings}.
[maxmagicresist]
•Modifies the magicresist cap, up to +20% and down to very negative numbers.

[fireresist]
•Percent decrease to the amount of fire damage received.
•Does not apply to burning damage.
•This bonus caps at 75% on players and hirelings.
•Anya's quest gives +10 .base AND .mod per difficulty; if you die, you no longer get the bonus, although it will still be referenced as if you have the full value
[maxfireresist]
•Modifies the fireresist cap, up to +20% and down to very negative numbers.

[lightresist]
•Percent decrease to the amount of lightning damage received.
•This bonus caps at 75% on players and hirelings.
•Anya's quest gives +10 .base AND .mod per difficulty; if you die, you no longer get the bonus, although it will still be referenced as if you have the full value
[maxlightresist]
•Modifies the lightresist cap, up to +20% and down to very negative numbers.

[coldresist]
•Percent decrease to the amount of cold damage received.
•This bonus caps at 75% on players and hirelings.
•Also reduces the duration that the cold/freeze states are applied for when applied by normal sources (like the stat coldlength, or cold length from skills).
•Anya's quest gives +10 .base AND .mod per difficulty; if you die, you no longer get the bonus, although it will still be referenced as if you have the full value
[maxcoldresist]
•Modifies the coldresist cap, up to +20% and down to very negative numbers.

[poisonresist]
•Percent decrease to the amount of poison damage received.
•This bonus caps at 75% on players and hirelings.
•Also decreases poison state duration.
•Anya's quest gives +10 .base AND .mod per difficulty; if you die, you no longer get the bonus, although it will still be referenced as if you have the full value
[maxpoisonresist]
•Modifies the poisonresist cap, up to +20% and down to -100%.

•••FOR ALL RESISTS:{}
•If noratio=0, then the monster's immunities work differently
•{i think immunes work differently in normal too, the display is also messed up}

[item_poisonlengthresist]
•Percent decrease(+)/increase(-) to poison state duration.
•See: http://www.theamazonbasin.com/wiki/inde ... th_Reduced

[curse_resistance]
•Percent decrease(+)/increase(-) to the duration of states that have curse=1.
•If 'curse_resistance' is 100 or greater, then immunity to curses is achieved.

[firemindam]
•Minimum fire damage dealt by weapons and kicks.
•Only modified by 'passive_fire_mastery' if applied with (melee) attacks.
•For melee: if no max damage, then min damage is not applied
[firemaxdam]
•Maximum fire damage dealt by weapons and kicks.
•Only modified by 'passive_fire_mastery' if applied with (melee) attacks.
•For melee: if min>max, then max becomes min+1

[lightmindam]
•Minimum lightning damage dealt by weapons and kicks.
•Only modified by 'passive_ltng_mastery' with (melee) attacks.
•For melee: if no max damage, then min damage is not applied
[lightmaxdam]
•Maximum lightning damage dealt by weapons and kicks.
•Only modified by 'passive_ltng_mastery' with (melee) attacks.
•For melee: if min>max, then max becomes min+1

[magicmindam]
•Minimum magic damage dealt by weapons and kicks.
•For melee: if no max damage, then min damage is not applied
[magicmaxdam]
•Maximum magic damage dealt by weapons and kicks.
•For melee: if min>max, then max becomes min+1

[coldmindam]
•Minimum cold damage dealt by weapons and kicks.
•Only modified by 'passive_cold_mastery' if applied with (melee) attacks.
•For melee: if no max damage, then min damage is not applied
[coldmaxdam]
•Maximum cold damage dealt by weapons and kicks.
•Only modified by 'passive_cold_mastery' if applied with (melee) attacks.
•For melee: if min>max, then max becomes min+1
[coldlength]
•User applies the cold state if 'coldmindam' or 'coldmaxdam' is concurrently dealt.
•Also has a ~{1/5} chance of applying the shatter state for as long as the cold state, which is re-rolled each time the cold state is applied.
•'coldlength' determines the length of the cold and shatter states, in frames.
•The cold state applies -50 'velocitypercent' and 'attackrate'.
•Percent increased/decreased by target 'coldresist'. Halved by 'item_halffreezeduration', negated by 'item_cannotbefrozen'. Percent multiplied by monstats.txt: coldeffect/coldeffect(N)/coldeffect(H) (such that 100=100% duration; 0=0% duration)
•Not applied on melee attacks if you do not have any coldmaxdam.

[poisonmindam]
•Minimum poison damage in 1/256ths dealt every frame over the poisonlength (without poisonlength, no damage is dealt), dealt via weapons and kicks.
•Only modified by passive_pois_mastery if applied with (melee) attacks.
[poisonmaxdam]
•Maximum poison damage in 1/256ths dealt every frame over the poisonlength (without poisonlength, no damage is dealt), dealt via weapons and kicks.
•Only modified by passive_pois_mastery if applied with (melee) attacks.
[poisonlength]
•Applies the poison state, but only if 'poisonmindam'>0.
•'poisonlength' determines the duration of the poison state, in frames.
•Duration is percent increased/decreased by 'item_poisonlengthresist' and 'poisonresist'.
•Duration is divided by 'poison_count', which increases by 1 for each item with 'poisonmindam' ('poison_count' is always considered to be at least 1, even if you have 0 or negative 'poison_count').

[lifedrainmindam]
•When used by players and hirelings, returns a percentage of SrcDam≠0 physical damage as 'hitpoints', multiplied by the target's monstats.txt Drain/Drain(N)/Drain(H) percent (100=100% of drain; 0=0% of drain, no draining).
•When used by monsters, acts as flat damage to life; this damage cannot be resisted, a Drain=0 monster hit by a monster with 'lifedrainmindam' will still take full damage.
[lifedrainmaxdam]
•Similar to 'lifedrainmaxdam', except it creates an upper limit (so that Life damage dealt equals 'lifedrainmindam' to 'lifedrainmaxdam').

[manadrainmindam]
•When used by players, returns a percentage of SrcDam≠0 physical damage as 'mana', multiplied by the target's monstats.txt Drain/Drain(N)/Drain(H) percent (100=100% of drain; 0=0% of drain, no draining).
•When used by monsters, acts as flat damage to character mana.
[manadrainmaxdam]
•Similar to 'manadrainmaxdam', except it creates an upper limit (so that Mana damage dealt equals 'manadrainmindam' to 'manadrainmaxdam').

[stamdrainmindam]
•Does not seem to work when used by characters, even in PvP.
•When used by monsters, acts as flat damage to character stamina.
[stamdrainmaxdam]
•Similar to 'stamdrainmindam', except it creates an upper limit (so that Stamina damage dealt equals 'stamdrainmindam' to 'stamdrainmaxdam').

[stunlength]
•User applies stun state on (melee) attacks.
•Every 1 'stunlength' = 1 frame of stun state duration.
•Effective limit is 250, since the stun state has a maximum duration of 250 frames.

[velocitypercent]
•Linear, percent increase(+)/decrease to base movement speed (WL and RN) with no obvious upper limit (although you might start moving so fast that you travel backwards).
•You have 100 'velocitypercent'.base, regardless of charstats.txt WalkVelocity/RunVelocity settings
•When walking, you gain 'velocitypercent'.mod of: 100, regardless of charstats.txt WalkVelocity settings
•When running, you gain 'velocitypercent'.mod of: 100*RunVelocity/WalkVelocity

[item_fastermovevelocity]
•Modifies base movement speed (WL and RN) of the user, with diminishing returns.
•See chart: https://www.theamazonbasin.com/wiki/ind ... r_Run/Walk
•Effective increase in speed cannot exceed +149%, which means the effective limit to 'item_fastermovevelocity' is 22350.

[attackrate]
•Modifies the attack (A1, A2, KK, some sequences) animation speed of the user.
•Given by the opposite value of your weapon as defined by WAM.txt speed; for example, a phase blade (-30 WIAS) actually just gives +30 'attackrate'
•See (AB names it Skill EIAS and -WSM): https://www.theamazonbasin.com/wiki/ind ... tack_speed

[item_fasterattackrate]
•Modifies the attack (A1, A2, KK, some sequences) animation speed of the user.
•See (AB names it IAS): https://www.theamazonbasin.com/wiki/ind ... tack_speed

[other_animrate]
•Modifies the neutral (NU) animation rate of the user.

[item_fastergethitrate]
•Modifies the gethit/hit recovery (GH) animation of the user.

[item_fasterblockrate]
•Modifies the blocking (BL) animation of the user.

[item_fastercastrate]
•Modifies the casting (SC) animation of the user.

[quantity]
•Displays on items with 'quantity' from some source (although it only has meaning if WAM.txt: stackable=1).
•WAM.txt minstack to maxstack determines the minimum to maximum 'quantity' a stackable=1 item can spawn with (a stackable=1 item will have up to a maximum of 1 'quantity' if maxstack=0).
•Repairing a stackable item increases 'quantity' to WAM.txt: maxstack.
•'item_replenish_quantity' regenerates 'quantity' up to WAM.txt: maxstack, but only if at least one 'quantity' has been spent by throwing (melee attacks that have used up 'quantity' will not begin regeneration)
•'item_extra_stack' increases the effective WAM.txt: maxstack, and therefore the max 'quantity', of the given item.
•'quantity' has no obvious upper limit, but values over 511 will be forgotten on restart.
•'quantity', when given directly to a stackable item, will modify the amount of 'quantity' used per throw: +1 reduces consumption to 0, +2 reduces consumption to -1 (that is, you gain 1 'quantity'), -1 increases consumption to +2, -2 increases consumption to +3, and so on (values over +1 are mostly meaningless, since it will keep increasing the stack size to absurd values, although it would allow you to determine how many times you have thrown a specific item without restarting).
•No obvious lower limit either, can become negative if negative 'quantity' added to item pushes total stack size below 0.
•Stackable items cannot be thrown if the total stack size is 0 or less.
•{interaction with impale durability loss}

[item_replenish_quantity]
•'item_replenish_quantity' regenerates (it uses the absolute value, so (+)/(-) are identical) a stackable item 'quantity' up to WAM.txt: maxstack + 'item_extra_stack', but only if at least one 'quantity' has been spent by throwing (melee attacks that have used up 'quantity' will not begin regeneration).
•Regeneration is +1 'quantity' every 100/'item_replenish_quantity seconds {have not confirmed this, but it's probably true}.
•Upper and lower limit is {???} {around 25 maybe?}.

[item_extra_stack]
•Amount increases(+) the effective WAM.txt: maxstack, and therefore the max 'quantity', of the given item.
•Amount (-) only has meaning if applied to an item with 'item_extra_stack'>0.

[value]
•Increases when a piece of a set is equipped (except when a setitem from sets.txt ID=0 is equipped).
•Gain +X amount, where X is the ID of the equipped setitem in sets.txt.
•Not cumulative, so whether you wear one piece of a set or more than one piece of a set, you will still gain the same amount.

[durability]
•Displays as the low-value of the Durability range on items with WAM.txt: durability>0.
•Cannot exceed 'maxdurability'.
•Seems to spawn on non-vendor items such that 'durability' is ~51-99% of WAM.txt: durability.
•Stats given via properties.txt func=13 will max out 'durability' to 'maxdurability' (in vanilla, only 'item_maxdurability_percent' uses this property func=13).
•Skills.txt srvstfunc=7 (Impale) adjusts 'durability' of the used weapon depending on the skill's settings: calc2=chance of modifying 'durability' per successful hit, calc3=amount of 'durability' changed per hit (+ decreases 'durability', - increases 'durability').
•See: https://www.theamazonbasin.com/wiki/ind ... Durability

[maxdurability]
•Displays as the high-value of the Durability range on items with WAM.txt: durability>0.
•Increases(+)/decreases(-) the 'maxdurability' of an item.
•WAM.txt durability='maxdurability' of the item, up to a maximum of 255 (256-511 will give 255, and 512+ will set 'maxdurability'=0); can also apply negative numbers, which can make it broken on spawn.
•'maxdurability', when given via properties, has no obvious limits.
•See: https://www.theamazonbasin.com/wiki/ind ... Durability

[item_goldbonus]
•Increases(+)/decreases(-) the amount of gold dropped by enemies.
•See: https://www.theamazonbasin.com/wiki/ind ... m_Monsters
•Note that the above article isn't quite accurate: you can apply 'item_goldbonus' in unusual cases by applying the poison or openwounds state (i.e. a poisoned monster that is killed by Flavie will apply your 'item_goldbonus')
•-100 'item_goldbonus' will make it so all gold drops are 0.
•'item_goldbonus' seems to apply to all objects (chests and caskets and the like), except for super chests (any object that drops a ton of loot).

[item_magicbonus]
•Increases(+)/decreases(-) the quality of items dropped by enemies.
•See: https://www.theamazonbasin.com/wiki/ind ... agic_Items
•Note that the above article isn't quite accurate: you can apply 'item_magicbonus' in unusual cases by applying the poison or openwounds state (i.e. a poisoned monster that is killed by Flavie will apply your 'item_magicbonus')
•See: https://d2mods.info/forum/viewtopic.php?t=58662
•It is worth noting that -100 'item_magicbonus' prevents any Magic, Rare, Set and Unique items from dropping, even if the respective TreasureClassEx settings are at 1024 (even -99 has no apparent effect in this context).
•'item_magicbonus' applies to objects with OperateFn, but seems to ignore or has a massive penalty for any quality above magic: 1 (Casket, Undefiled Grave, Sarcophagus), 3 (Large Urn, Urn, Dead Body, Rock Pile, Basket, non-burning Trapped Soul, Jar), 5 (Barrel), 4 (Chest, Arcane Sanctuary Caskets, Act 5 brown chests, Act 5 Hidden Stash, Act 5 Barrel, Wooden Chest, Burial Chest, Skulls and Rocks, Act 5 Tomb, Act 5 Corpse),
•'item_magicbonus' applies to objects with OperateFn, with less of a penalty{???; not really sure, objects are weird}: 14 (Crate, Dead Rogue, Act 4 Hidden Stash, Skull Pile, Jug, Act 2 Corpse, Hidden Stash, Skeleton, Hollow Log, Loose Rock, Loose Boulder, Guard Corpse, Coffin, Stash, Pillar, Cocoon, Body, Rat Nest, Goo Pile, Act 3 Corpse, Harem Bed, Bone Chest, Fire, Act 5 wilderness/siege Barrel), 51 (Act 3 Stash)
•'item_magicbonus' does not apply to objects with OperateFn: 19 (Armor Stand), 20 (Weapon Rack); also doesn't seem to apply to super chests (some Gold Chests, Act 1 Super Bed, Lower Kurast Chests).
•{unknown for operatefn: 48}

[item_addexperience]
•Increases(+)/decreases(-) 'experience' gained from kills (does not apply to 'experience' gained from pSpell=4).
•Seems to be reduced to a minimum of 1 'experience', unless set to -100, which will set 'experience' gained to 0.
•There does not seem to be an upper limit, nor overflow (gave myself +1000000000 'item_addexperience' and went from level 1 to 66 after one kill).

[item_reducedprices]
•Decreases(+)/increases(-) vendor prices to a minimum of 1% of the initial cost.
•The minimum value of an item is 1 gold.
•Negative 'item_reducedprices' has no apparent limit.

[item_addclassskills]
•Amount increases(+)/decreases(-) the level of skills of a specific skills.txt charclass setting.
•Parameter determines which charclass it applies to: 0=amazon, 1=sorceress, 2=necromancer, 3=paladin, 4=barbarian, 5=druid, 6=assassin.
•Bonus only applies if it matches the character class (so a Barbarian with +3 Jab from 'item_nonclassskill' will not benefit from +5 to Amazon Skills from 'item_addclassskills').
•{hirelings?}

[item_nonclassskill]
•Value increases(+)/decreases(-) the lvl of the skill.
•Parameter corresponds to skills.txt ID.
•If the given skill is from a class (determined by skills.txt: charclass), then it is not character specific.
•If the given skill is from your class, then it has an upper limit of +3 and no obvious lower limit; note that this limit is applied across all items, so if you are a Necromancer with a ring of +3 Raise Skeleton and a helm of +3 Raise Skeleton, then you will only get +3 and not +6.
•Applies to all units.

[item_singleskill]
•Value increases(+)/decreases(-) the lvl of the skill.
•Parameter corresponds to skills.txt ID.
•If the given skill is from a class (determined by skills.txt: charclass), then it is character specific.
•If the given skill is classless (where charclass is empty), then a character cannot gain it.
•{do monsters benefit from classless skills?}
•{Hirelings supposedly ignore class specificity, and can gain [Class Only] skills if they have the skill. I have not tested this.}


[item_elemskill]
•Param corresponds to elemtypes.txt (1=fire, 2=ltng, 3=mag, 4=cold, 5=pois, 6=life, 7=mana, 8=stam, 9=stun, 10=rand, 11=burn, 12=frze).
•Amount increases(+)/decreases(-) the lvl of skills with a corresponding EType entry.
•New elements in elemtypes.txt can be added to skills, which can be modified by 'item_elemskill' (although new elements will do nothing except be increased, so it is only useful to do this if the skill does not use emin/emax/elen/conversion, or uses missiles that carry out the element).
•The 0=none element cannot be modified by 'item_elemskill', even if given an elemtypes code.


[item_allskills]
•Amount increases(+)/decreases(-) the lvl of all skills.
•Effective upper limit is based on the Amazon's Experience.txt MaxLvl row entry (so by default, skills are capped at 99 for every character); effective lower limit is 0.

[item_addskill_tab]
•Amount increases(+)/decreases(-) the lvl of skills within a specific skill tree tab (based on skilldesc.txt: skillrow, where 1=bottom page, 2=middle page, 3=top page).
•Param corresponds to skill tab (|0=Bow and Crossbow Skills, 1=Passive and Magic Skills, 2=Javelin and Spear Skills| |3=Fire Spells, 4=Lightning Spells, 5=Cold Spells| |6=Curses, 7=Poison and Bone Spells, 8=Summoning Spells| |9=Combat Skills, 10=Offensive Auras, 11=Defensive Auras| |12=Combat Skills, 13=Masteries, 14=Warcries|, |15=Summoning, 16=Shape Shifting, 17=Elemental| |18=Traps, 19=Shadow Disciplines, 20=Martial Arts|)
•If param is randomized via property func=12, then see: https://d2mods.info/forum/viewtopic.php ... 27#p423854
•Bonus only applies if it matches the character class (so a Barbarian with +3 Jab from 'item_nonclassskill' will not benefit from +5 to Javelin and Spear Skills).
•Hirelings do not benefit. {this is from AB. have not tested, but this sounds right to me}


[item_lightradius]
•Amount increases(+)/decreases(-) the radius of light around a character.
•Additive with starting Light Radius (which is not a stat).
•Upper limit of 5.
•Lower limit of -12 (any lower when given by a state and it will be as if 'light_radius'.mod=0).
•Does not seem to function on non-characters.

[item_lightcolor]
•Amount changes the color of the combination of inherent Light Radius (inherent Light Radius is not a stat) and 'item_lightradius'.
•See: https://d2mods.info/forum/viewtopic.php ... 31#p158869
•Does not seem to function on non-characters.
◦Hardcoded fix: https://d2mods.info/forum/viewtopic.php?t=48312

[item_extrablood]
•Boolean.
•Increases the bleeding of the user.
•Doesn't seem to do anything when used by a character.
•See: https://d2mods.info/forum/viewtopic.php?t=48327

[item_req_percent]
•Percentage multiplier to an item's WAM.txt reqstr and reqdex.
•Required 'strength' and 'dexterity' cannot be reduced below 1, unless the amount of 'item_req_percent' is -100, in which case requirements become 0.
•Unknown upper limit of this stat (created a Matriarchal Pike with +32000% requirements, requiring 47829 dexterity and 42372 strength).

[item_levelreq]
•Adds to the 'level'.accr requirement of an item.
•Positive and negative values are valid.

[item_levelreqpct]
•Seems to be non-functional. {do more testing}
•Might have been an unsuccessful attempt at creating a softcoded stat that modifies 'item_levelreq'

[state]
•Boolean. {is it actually? it could correspond to state level, in which case it could potentially override other states if high enough level, which would have some niche uses}
•Param corresponds to the state ID in states.txt.
•Carries out the expected srvside behaviors of the state (i.e. state=102, just_portaled, will prevent the player from using Town Portals when give by 'state').

[fade]
•Boolean. {I think so, although vanilla monprops uses a value of 16 for irongolem}
•Makes a unit translucent.
•For a pet to become ethereal, requires the pet to be created from an ethereal item and to have srvdofunc=57, an aurastate, an aurastat which is fade.

[skill_bypass_undead]
•Boolean.
•Makes it so melee & missile hits with SrcDam≠0 ignore the positive physical resistance of monsters with monstats.txt: lUndead=1 and/or hUndead=1.
•Non-SrcDam hits do not benefit; Sanctuary is able to ignore physical resistances because of its state, it has nothing to do with it giving 'skill_bypass_undead' to targets.
•Can be used by characters and hirelings, but other monsters do not seem to benefit from it.

[skill_bypass_demons]
•Boolean.
•Makes it so melee & missile hits with SrcDam≠0 ignore the positive physical resistance of monsters with monstats.txt: demon=1.
•Can be used by characters and hirelings, but other monsters do not seem to benefit from it.

[skill_bypass_beasts]
•Boolean.
•Makes it so melee & missile hits with SrcDam≠0 ignore the positive physical resistance of monsters with monstats.txt: lUndead=0, hUndead=0 and demon=0.
•Can be used by characters and hirelings, but monsters do not seem to benefit from it.

[item_ignoretargetac]
•Boolean.
•See: https://www.theamazonbasin.com/wiki/ind ... 7s_Defense
•Hirelings and monsters do not seem to benefit from it.

[item_fractionaltargetac]
•Reduces(+)/{???}(-) percent effective target defense on a hit check, down to a minimum of 0.
•See: http://theamazonbasin.com/wiki/index.php/Target_Defense
•Hirelings and monsters do not seem to benefit from it.

[item_damagetargetac]
•Increases(+)/reduces(-) the hit target's 'defense'
•If the target's 'defense' < 'item_damagetargetac', then it no longer reduces 'defense' (e.g. if you have 'item_damagetargetac'=100 and a target has 1155 'defense', then the maximally reduced 'defense' is 55)
•There is no apparent upper limit to increasing 'defense'.
•See: https://theamazonbasin.com/wiki/index.p ... se_per_hit
•All units can apply this stat.
•{does a state control this?}

[item_demondamage_percent]
•Increases(+)/decreases(-) SrcDam≠0 physical damage against monsters with monstats.txt: Demon=1.
•Additive with 'damagepercent'.
•Does not apply to shields, boots, nor Sacrifice.

[item_undeaddamage_percent]
•Increases(+)/decreases(-) percent SrcDam≠0 physical damage against monsters with monstats.txt: lUndead=1 and/or hUndead=1.
•Additive with 'damagepercent'.
•Does not apply to shields, boots, nor Sacrifice.

[item_demon_tohit]
•Increases(+)/{???}(-) hit chance against monsters with monstats.txt: Demon=1
•Additive with 'tohit'.
•Modified by 'item_tohit_percent'.

[item_undead_tohit]
•Increases(+)/{???}(-) hit chance against monsters with monstats.txt: lUndead=1 and/or hUndead=1.
•Additive with 'tohit'.
•Modified by 'item_tohit_percent'.

[item_preventheal]
•Boolean.
•See: https://www.theamazonbasin.com/wiki/ind ... nster_Heal
•Applies the state with ID=52 (preventheal).
•Disables damageregen of the target since preventheal has life=1.
•Hirelings and monsters do not benefit from it (as is described in the link).

[item_halffreezeduration]
•Boolean.
•If any amount is present, then when the cold state is applied to the user via 'coldlength' or skill/missile ELen, the duration will be 1/2 as long.

[item_cannotbefrozen]
•Boolean.
•If any amount is present, then when the cold state is applied to the user via 'coldlength' or skill/missile ELen, the duration will be negated.

[thorns_percent]
•Returns a percentage of attack (melee) physical damage taken as physical damage to the attacker.
•Reflection damage is therefore modified by 'damageresist' on both the user and attacker.
•Reflection damage is not increased by negative 'normal_damage_reduction'

[bonearmor]
•Only updates for cltside display via eventfunc=22 (this is why Cyclone Armor does not have overlay destruction unless you use Bone Armor with it).
•{is this hardcoded?}
•{??? investigate further}
[bonearmormax]
•{is this hardcoded?}

[item_kickdamage]
•Adds to the minimum and maximum damage dealt by kicking skills {find exact funcs}.
•Adds once if you do not have any item equipped in the feet equipment slot, adds twice if you do have an item equipped in the feet equipment slot (so in almost all cases, it will give 2x the described value).
•+kick dmg% from skills, 'damagepercent', +dmg% from strbonus/dexbonus apply to the full amount of bonus damage, both the non-booted added damage and doubled damage added when wearing from boots are additive and modified in the same ways.
•'item_mindamage_percent' does nothing; 'item_maxdamage_percent' applies to both min and max damage

[item_deadlystrike]
•A percent chance, up to 100%.
•Doubles physical weapon damage for all sources when successful, excluding: kick damage, shield damage, Sacrifice and Impale.
•Only one source of damage doubling can succeed for each hit: 'passive_critical_strike', 'item_deadlystrike', 'passive_mastery_melee_crit' or 'passive_mastery_throw_crit'.

[passive_critical_strike]
•A percent chance, up to 100%.
•Doubles physical weapon damage for all sources when successful, excluding: kick damage, shield damage, Sacrifice and Impale.
•Only one source of damage doubling can succeed for each hit: 'passive_critical_strike', 'item_deadlystrike', 'passive_mastery_melee_crit' or 'passive_mastery_throw_crit'.

[item_absorbfire_percent]
•Absorbs (every 1 damage deducted is also gained as 1 life) a percentage of fire damage (does not include burn damage), up to a maximum of 40% (which is equivalent to 80% damage deduction).

[item_absorbfire]
•Absorbs an equivalent amount of fire damage (does not absorb burn damage).

[item_absorblight_percent]
•Absorbs a percentage of lightning damage, up to a maximum of 40%.

[item_absorblight]
•Absorbs an equivalent amount of lightning damage.

[item_absorbmagic_percent]
•Absorbs a percentage of magic damage, up to a maximum of 40%.

[item_absorbmagic]
•Absorbs an equivalent amount of magic damage.

[item_absorbcold_percent]
•Absorbs a percentage of cold damage, up to a maximum of 40%.

[item_absorbcold]
•Absorbs an equivalent amount of cold damage.

[item_aura]
•Param corresponds to a skills.txt ID, min and max determine the level of the aura.
•Skill will only function as an 'item_aura' if it has skills.txt aura=1.
•Auras are additive from multiple sources (so if you have Level 15 Might on your boots and level 30 on your torso, it will sum to Level 45 Might).
•Only one 'item_aura' may be present on an item at a time, with the 'item_aura' that is functional and has the highest skill ID will take priority
○Even with sockets, only one aura per item: if you have two sockets with two different auras on the same item, only one will be active
○If you have an item with an aura and a socket in that item with an aura, only one will be active
○If an aura is disabled on an item because another aura overrides it, it will still count towards increasing the level of the aura if it is active on a different item (for example, if you have a Phase Blade with Level 1 Holy Freeze When Equipped and Level 1 Resist Fire When Equipped, equipping it will give only Level 1 Holy Freeze; however, if you also equip a Cap with Level 1 Resist Fire When Equipped, you will now have Level 1 Holy Freeze and Level 2 Resist Fire)
•If applied via a skill's passivestate or sets.txt, then you will only be able to have one 'item_aura' active (meaning all 'item_aura' from items will be ignored, only one passivestate or sets.txt given aura will be applied over all else).
•Additionally, 'item_aura' through passivestate will cause a crash on death.

[item_indesctructible] [sic]
•Items with this stat no longer display durability and cannot lose or gain 'durability'.
•Before 1.10f, this stat deleted 'maxdurability', allowing for some single player time traveling abuse (socket a Zod in a version before 1.10f, send the character to 1.10f+, remove the Zod and you now have a free socket and a weapon which cannot be destroyed).

[item_pierce]
•Allows the user's missiles (if the missile has pierce=1) to hit up to 5 times before disappearing.
•This allows hitfunc missiles to trigger multiple times, but the cltside graphics are glitchy with hitfuncs and will often desync.

[skill_pierce]
•Allows the user's missiles (if the missile has pierce=1) to hit up to 5 times before disappearing.
•This allows hitfunc missiles to trigger multiple times.
•Requires the state with ID=69 (pierce) to function properly; cltside piercing will not work unless you have the ID=69 state.

[item_magicarrow]
•Shoot missiles.txt ID=27 (magicarrow in vanilla).
•Requires a quiver, but does not use quiver quantity.
•For a weapon to shoot, it must have: wclass/2handedwclass=bow or xbw; type=bow or xbow (also works if the type ends up linking to bow or xbow at some point).

[item_explosivearrow]
•Shoot missiles.txt ID=41 (explodingarrow in vanilla).
•For a weapon to shoot, it must have: wclass/2handedwclass=bow or xbw; type=bow or xbow (also works if the type ends up linking to bow or xbow at some point).

[skill_handofathena]
•Acts as a percentage multiplier to the user's missile speed, but only if the missile has missiles.txt canslow=1.
•Can only be given by the 'slowmissiles' aurastate or passivestate, any other state will not change missile speed (this also means that adding the stat to items won't do anything, since item stats aren't given by states).
•If equal to 0, then missiles have -100% velocity. If equal to 50, missiles have -50% velocity. If equal to 100, missiles have 0% velocity (which is to say, an unmodified velocity). If equal to 200%, missiles have +100% velocity, and so on.
•Negative values work, but only srvside: missiles will travel backwards, but will be invisible.

[skill_concentration]
•In versions 1.10f+, this seems to interrupt instead of preventing interruption, with the chance of interruption increasing with higher amounts.
•This will interrupt the user even if not being hit (i.e. it's a chance of interruption at all times).
•{unsure of interaction with non-player units}
•In versions before 1.10f, this stat seems to work as expected: it prevents hit recovery interruption.

[item_armor_percent]
•Percentage modifier to 'armorclass' and non-stat defense from 'dexterity'
•Does not modify 'armorclass_vs_missile' nor 'armorclass_vs_hth'
•Even if op stat1=armorclass is removed, it will still modify 'armorclass' and 'dexterity' defense when given to a non-armor item.

[skill_armor_percent]
•Percentage modifier to 'armorclass' and non-stat defense from 'dexterity'
•Does not modify 'armorclass_vs_missile' nor 'armorclass_vs_hth'

[armor_override_percent]
•Acts as a percentage multiplier for 'armorclass', with -100 setting 'armorclass'.eff to 0 and +100 setting it to 2x, +200 to 3x and so on with higher values.
•Does not modify 'armorclass_vs_missile' nor 'armorclass_vs_hth'

[attack_vs_montype]
•{}

[damage_vs_montype]
•Percentage modifier to damage versus an entry from montypes.txt.
•Additive with other forms of +% damage, such as 'damagepercent'
•Parameter determines which montypes.txt entry is used, it also applies up the montype chain (e.g. lowundead and highundead have equiv1=undead, so vs undead works on both of them).
•{radial weapon damage}

[item_damage_vs_monster] {These are likely deprecated.}
[item_damage_percent_vs_monster]
[item_tohit_vs_monster]
[item_tohit_percent_vs_monster]
[item_ac_vs_monster]
[item_ac_percent_vs_monster]

[item_numsockets]
•The number of sockets on an item, up to a maximum of 6.
•Sockets cannot exceed the size of the item (a 1x3 weapon can have a maximum of 3 sockets).
•Sockets cannot exceed WAM.txt: gemsockets.
•Sockets cannot exceed the WAM.txt type referenced from itemtypes.txt: Maxsock1 (if item level is 1-25), Maxsock25 (if item level is 26-40) and MaxSock40 (if item level is 41+).
•How gems.txt interacts with sockets depends on WAM.txt: gemapplytype, where 0=weaponMod, 1=helmMod, 2=shieldMod.

[item_charged_skill]
•Allows you to cast a skill with a limited number of charges, where the parameter defines the skill ID.
•{how does min/max work? remember it having some weird rules with how it scaled, potentially on ilvl}
•In 1.10f, there is a bug where a charged skill will count as base level if you do not have any base levels in that skill. So base level 0 Bone Prison + Marrowwalk = Level 33 Bone Prison synergy, but base level 1 Bone Prison + Marrowwalk = Level 1 Bone Prison synergy. {Supposedly multiple charges do not stack, which would make sense, but I haven't tested.}
•See: https://www.theamazonbasin.com/wiki/index.php/Charges

{item_replenish_durability}


[item_find_item]
•{unknown}

[passive_cold_pierce]
•Subtracts(+) from/adds(-) to the target's 'coldresist'.eff, regardless of the cold damage source (works with attacks, non-attacking strikes, radial-type damage, non-weapon damage).
•Does not work against immune targets, unless the immunity is broken.
•Can reduce target's resistance to a minimum of -100%.
[passive_fire_pierce]
•Subtracts(+) from/adds(-) to the target's 'fireresist'.eff, regardless of the fire damage source (works with attacks, non-attacking strikes, radial-type damage, non-weapon damage).
•Does not work against immune targets, unless the immunity is broken.
•Can reduce target's resistance to a minimum of -100%.
[passive_ltng_pierce]
•Subtracts(+) from/adds(-) to the target's 'lightresist'.eff, regardless of the lightning damage source (works with attacks, non-attacking strikes, radial-type damage, non-weapon damage).
•Does not work against immune targets, unless the immunity is broken.
•Can reduce target's resistance to a minimum of -100%.
[passive_pois_pierce]
•Subtracts(+) from/adds(-) to the target's 'poisonresist'.eff, regardless of the poison damage source (works with attacks, non-attacking strikes, radial-type damage, non-weapon damage).
•Does not work against immune targets, unless the immunity is broken.
•Can reduce target's resistance to a minimum of -100%.

[item_fire_pierce] Seems to be functionally identical to 'passive_fire_pierce' stat.
[item_ltng_pierce] Seems to be functionally identical to 'passive_ltng_pierce' stat.
[item_cold_pierce] Seems to be functionally identical to 'passive_cold_pierce' stat.
[item_pois_pierce] Seems to be functionally identical to 'passive_pois_pierce' stat.


[firelength]
•Applies state ID=115 (burning) to enemies hit by SrcDam≠0 missiles, cannot be applied by (melee) attacks.
•State lasts for: ('firelength')-1 frames (so if 'firelength'=200, then it will last for 199 frames, or 7.96 seconds).
•Deals 'burningmin' to 'burningmax' damage (which are in 1/256ths) per frame.
•Must be dealt concurrently with at least 1 'burningmin' and 1 'burningmax'.
•Length is not modified by any resistances (even if you make burning a curse, it still will not be affected by 'curse_resistance').

[burningmin]
•Minimum burning state damage dealt per frame, in 1/256ths.
•Cannot be resisted.
[burningmax]
•Maximum burning state damage dealt per frame, in 1/256ths.
•Cannot be resisted.

[progressive_tohit]
•Only works for a given skill if it has the skills.txt boolean finishing=1.
•Displays as a percentage increase to 'tohit'.accr on the Character Screen; display also turns blue when applying.
•Additive with 'item_tohit_percent'

[passive_dodge]
•A percent chance, up to 100%.
•If successful, ignores an attack when in any animmode aside from WL and RN {might not actually be true, I know it at least applies to NU, A1, A2 and SC}.
•If successful AND an amazon AND you have the passivestate dodge, then you will use the animmode of the passivestate skill; if ANY of these cases are not true, then you will ignore the attack and not play the annoying animation (in other words, you don't seem to need hardcoding to stop the Amazon's dodgelocking).

[passive_avoid]
•A percent chance, up to 100%.
•If successful, ignores a missile when in any animmode aside from WL and RN {might not actually be true, but it applies to most of them}.

[passive_evade]
•A percent chance, up to 100%.
•If successful, ignores an attack or missile when in the WL or RN animmodes.
•If successful AND an amazon AND you have the passivestate evade, then you will use the animmode of the passivestate skill; if ANY of these cases are not true, then you will ignore the attack or missile and not play the annoying animation (in other words, you don't seem to need hardcoding to stop the Amazon's evadelocking).


[passive_mastery_melee_th]
•Applies to weapons that aren't thrown. Missiles benefit, as long as the missile itself isn't created by a throw. Throwing weapons benefit, as long as they aren't being thrown.
•{}
[passive_mastery_melee_dmg]
•Applies to weapons that aren't thrown. Missiles benefit, as long as the missile itself isn't created by a throw. Throwing weapons benefit, as long as they aren't being thrown.
•{}
[passive_mastery_melee_crit]
•Applies to weapons that aren't thrown. Missiles benefit, as long as the missile itself isn't created by a throw. Throwing weapons benefit, as long as they aren't being thrown.
•{}

THROW:
•This describes how the below Throwing Mastery stats determine if something is thrown or not.
•The skill must have, in skills.txt: range=rng, itype with a parameter that is within the type or equiv of the Throwing Mastery stats

[passive_mastery_throw_th]
•Only functions with weapons that have been thrown. Does not benefit throwing weapons that are used in melee or which have generated non-thrown missiles.
•{find funcs that it works with, pretty sure it is only double throw and the default throws; also somehow zon throws i think use it, not sure how}
[passive_mastery_throw_dmg]
•Only functions with weapons that have been thrown. Does not benefit throwing weapons that are used in melee or which have generated non-thrown missiles.
•{}
[passive_mastery_throw_crit]
•Only functions with weapons that have been thrown. Does not benefit throwing weapons that are used in melee or which have generated non-thrown missiles.
•{}


[passive_weaponblock] Allows blocking with claw-type weapons.
•To function, requires: Assassin token (assassins transformed into other tokens will not work, non-assassins transformed into assassins will work), dual-wielding, type=h2h.
•Despite having params set, params are not necessary: 'passive_weaponblock' will function regardless of the param settings (in other words, save param bits should be set to 0 for items since it does nothing except potentially waste d2s space).
•Amount is the percent chance to weapon block (animmode=BL), up to 100%.
•Weapon blocking checks against all melee attacks and missiles; monsters using Charge is an exception.
•{when does it play animmode? seems to always do it against attacks}

[passive_summon_resist]
•Applies to pets summoned by srvdofunc=31 (Raise Skeleton, Raise Skeletal Mage), srvdofunc=56 (Clay Golem, Blood Golem, Fire Golem) and srvdofunc=57 (Iron Golem).
•Gives 'fireresist'.mod, 'lightresist'.mod, 'coldresist'.mod and 'poisonresist'.mod
•'passive_summon_resist'.accr is not given to summons
•The resistance bonuses are negated if the respective absorb% stat is given to the pet. For example, Fire Golems do not gain 'fireresist'.mod because they have 'item_absorbfire_percent', but they do gain the other three resistances.
•{Unknown why}, but immunity display will not factor in 'fireresist'.mod, 'lightresist'.mod, 'coldresist'.mod and 'poisonresist'.mod toward displaying immunities, even though these stats will cause the immunity to display if given via other means, such as auras.
•{does immunity breaking also differ when immunities are gained via this stat?}

[passive_mag_mastery] {Broken.}
[passive_mag_pierce] {Broken.}

[item_timeduration]
•{unknown}
[damageaura]
•{unknown}
[unsentparam1]
•{unknown}
[item_doubleherbduration]
•{unknown}
[lastblockframe]
•{unknown}

[monster_playercount]
•Amount corresponds to the number of players in the game or the /players # setting, whichever is greater.
•Changing the amount via auras does not seem to do anything, even nodrop does not seem to change.

[item_throwable]
•Boolean.
•When added to a bow/crossbow, quiver ammo consumption is removed.
•Makes it so items with itemtypes.txt throwable=0 are treated as if throwable=1 when using Throw or Left Hand Throw, allowing them to be thrown, although Double Throw will produce invisible missiles ie srvside missiles only (note that in vanilla, Throw requires a thro type weapon, so you'll probably want to remove that restriction)
•{does it work off-weapon? on states?}

[ironmaiden_level]
•{unknown}
[lifetap_level]
•{unknown}
[skill_enchant]
•{unknown}
[skill_conviction]
•{unknown}
[skill_chillingarmor]
•{unknown}

[skill_frenzy]
•Acts as a counter for the number of frenzy charges you have.
•srvdofunc=9 (Frenzy) and srvstfunc=56 with srvdofunc=120 (Feral Rage and Maul) increase 'skill_frenzy'.mod by 1 each time it successfully hits, up to a maximum of the skill's level (so if Frenzy is level 3, then 'skill_frenzy'.mod applied by it is capped at 3).
•Seems to be given by the aurastate of each respective skill, which allows it to have different sources of 'skill_frenzy'.mod without interference (so you can have, for example, Feral Rage and Maul functioning simultaneously); this also means the value disappears when the aurastate disappears.

[skill_decrepify]
•{unknown}

[alignment]
•Amount depends on the align setting in monstats.txt
•If align=0 (enemy), the monster's 'alignment'.mod=0
•If align=1 (ally), the monster's 'alignment'.mod=2
•If align=2 (hostile to everything), the monster's 'alignment'.mod=1
•Conversion changes the monster's 'alignment'.mod to 2 (note that conversion does not work on monsters with align=1)
•Modifying a monster's 'alignment'.mod does not change their behavior
•If send bits=0, you will be unable to select monsters.
•{look into further}

[target0]
•{unknown}
[target1]
•{unknown}
[goldlost]
•{unknown}

[conversion_level]
•The 'level'.accr of a monster before it was converted.
•Only changes if the monster has a higher level than you.
•When conversion runs out, 'level' becomes the value of 'conversion_level'
•You cannot cheat this system by giving your converted monster 'conversion_level' while they are converted; they will retain the expected level (so if you are level 99, convert a level 110 monster and then apply +10 'conversion_level' with an aura: the monster will return to level 110 and not 120).

[conversion_maxhp]
•The 'maxhp'/256 of a monster before it was converted.
•Only changes if the monster has a higher level than you.
•When conversion runs out, 'maxhp' becomes the value of 'conversion_maxhp': since 'conversion_maxhp' is 1/256 of 'maxhp', this means the monster will have virtually no life {this is of course a bug: whoever made this stat didn't know 'maxhp' is in 256ths}.
•Just like 'conversion_level', adding 'conversion_maxhp' while converted will not cheat the system (which is unfortunate, since it seemed to be a potential means of fixing the 1/256ths life bug).

[unit_dooverlay]
•{unknown}

[item_extra_charges]
•{unknown}

[poison_count]
•Automatically added for each source of 'poisonmindam' on items, including from socketables (so each socketed Emerald on a weapon will increase 'poison_count' by 1).
•Acts as a divisor for 'poisonlength', so if you have two items with 50 and 100 'poisonlength' then you will have 150 'poisonlength'.accr, but the duration of your poison will be for 75 frames: ('poisonlength'.accr)/('poison_count'.accr)=actual poison duration.
•If 'skill_poison_override_length'>0, then 'poison_count' becomes irrelevant.
•Works fine when give via skills, but should NOT be given to items or the game will lock up

[damage_framerate]
•{unknown}

[pierce_idx]
•'pierce_idx' is increased by 1 each time one of the following animmodes are used: A1, A2, SC, KK, SQ; {might be based on event frames, but if so it does not count more than one event per animmode, e.g. 5-hit Zeal will only increment by 1; also does not increase when kicking objects, but does increase when using the skill Kick}
•The above only seems to occur with characters, could not get monsters to increment their 'pierce_idx'
•{Unknown purpose, although it should be possible to create auras/skills that use it to have special events/stat changes when X number of actions occur; could also periodically deduct from the amount to reset it, creating an event cycle}

[passive_warmth]
•{unknown}

[modifierlist_skill]
•Value is dependent on aurastates and passivestates, corresponding to the skill which gives the state (e.g. Blessed Aim has ID=108, thus upgrading Blessed Aim gives +108 'modifierlist_skill' both when used and not, since it has both a passivestate and an aurastate).
•Cannot be modified by giving the stat via aurastats nor passivestats.
•Determines how many skill IDs will register for event-dependent cltside missiles (i.e. Blaze's cltside missile release on step, Chilling Armor's cltside missile release when hit by missiles).
•By default, it has Send Bits=9, which means only skills up to 511 will release event-dependent cltside missiles.
•Strongly recommended to change Send Bits to 15, so that all skills will show cltside missiles.

[modifierlist_level]
•States only count towards the value of this stat if they are from a passivestate or from aurastates of srvdofunc=65,66,82 (auras), srvdofunc=47 (Cloak of Shadows), srvdofunc=18 (various self-buffs, like Venom and Frozen Armor), srvdofunc=116 (Werewolf, Werebear).
•The following srvdofuncs do not count towards value: 25 (Enchant), 39 (Berserk), 9 (Frenzy); states given by missiles do not seem to count either (like from Shout or fingermagespider).
•Value is dependent on the level of valid states, corresponding to the total lvl of states active on the user (so if you have blessedaim at level 10, then the value is 10 whether you are using it or not; if you use level 12 might with level 10 blessedaim acting passively, then you will have a value of 22).

[last_sent_hp_pct]
•Describes the percentage of life monsters have left, in 128ths.
•Seems to constantly update as monsters lose and regain life.
•{Probably related to the life bar updating}

[source_unit_type]
[source_unit_id]
•Used by states.txt setfunc=4.
•{Given to monsters produced by Blood Raven. Can't figure out what the stats do, although there is some relation to monstats ID of the produced monster.}


[shortparam1]
•Used by states.txt setfunc=5.
•The value corresponds to a monstats.txt ID, and when a state with setfunc=5 is applied, the monster will graphically convert into the monster of that ID. So if you have a monster with shortparam1=15, then when it gains the state applying setfunc=5, it will look like a foulcrow.
•Effects are cltside only, so expect cltside desyncs unless the animation frames of the original and transformed monster are identical.

[questitemdifficulty]
•{unknown}
•{probably a stat on quest items based on difficulty. im guessing 0=normal, 1=nightmare, 2=hell, but i havent thoroughly tested it yet}

[item_slow] ID=150
•Normal behavior is softcoded by itemevent.
•Hardcoded in that auraevent=27 (Clay Golem) uses the amount of this stat to determine how much slow to apply; the auraevent will apply slow based on this stat even if the itemevent slow is removed.
Last edited by Cypress on Sun Jul 07, 2024 2:59 pm, edited 27 times in total.

kulasdq
Posts: 37
Joined: Tue May 04, 2021 6:04 pm
United States of America

Re: Guide to ItemStatCost.txt Stats

Post by kulasdq » Wed Dec 15, 2021 7:47 am

great guide. question, would those passive attributes work on active skills, for example using the same srvfunction of frozen armor and adding the passive to aurastat, so that the passive only becomes effective during the duration of the active skill?

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

Re: Guide to ItemStatCost.txt Stats

Post by Cypress » Wed Dec 15, 2021 2:56 pm

Hello kulasdq, the only functional difference I know of between aurastats and passivestats is that passivestats can specify a param value via passiveitype. So with passivestats you could have a specific reanimate or specify a weapon type for the mastery stats, but you cannot specify with aurastats due to the lack of param settings. Are you referring to any stat in particular?

kulasdq
Posts: 37
Joined: Tue May 04, 2021 6:04 pm
United States of America

Re: Guide to ItemStatCost.txt Stats

Post by kulasdq » Thu Dec 16, 2021 8:04 am

not in particular. from what i can see, blizzard never used any passive attributes in active skill (aurastate), they are only used in passive skill (passivestat). so lets use venom as an example, if i add poison pierce to aurastat4, will that work? I dont want to use passivestat because by doing so, the character will automatically gain the pierce ability from each skill point I contribute to venom, whether I use venom or not. i want the poison pierce to only work during the time when venom is activated.
same to all other passive attributes. if it works, then we can create a lot active buff skills to boost critical strike chance, crush blow chance, etc during a defined timeframe.

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

Re: Guide to ItemStatCost.txt Stats

Post by Cypress » Thu Dec 16, 2021 1:57 pm

Most stats with the passive_ prefix work fine as aurastats, that prefix is usually referring to how the stat is utilized in vanilla. Passive_elem_pierce stats, passive_elem_mastery stats, skill_passive_staminapercent, passive_dodge, passive_avoid, passive_evade, passive_weaponblock (because it doesn't even use the param), passive_summon_resist: will function the same on aurastats and passivestats. The only stats that would work much better on passivestats are:
item_addclassskills
item_nonclassskill
state
item_singleskill
item_elemskill
item_reanimate (can be used on aurastats, but in which case it will only ever select monstats ID=0; passivestats can select any monster)
attack_vs_montype
damage_vs_montype
item_addskill_tab
passive_mastery_melee_ (I think they may kind of work for aurastats if you want stats that do not benefit throwing, but that's niche)
passive_mastery_throw_ (might work, would be less niche than using the melee mastery stats on an aurastat since throwing is much less common)

And the ctc stats won't work on aurastats nor passivestats since they require three values to be defined, although supposedly you can make ctc aurastats on D2R using the new auraevent=33.

rikeproseet123
Posts: 3
Joined: Wed May 25, 2022 12:52 pm

Re: Guide to ItemStatCost.txt Stats

Post by rikeproseet123 » Wed May 25, 2022 1:09 pm

thank! very helpful article. In addition, I can leave a link to another site with codes. There is also a large palette. I hope it was helpful. I have been working as a Java worker for many years! I saw this thread and I can not share my knowledge with you. I have already picked up the bolts for myself, but you can use the site https://create.vista.com/colors/palettes/ . Almost all colors are here.

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

Re: Guide to ItemStatCost.txt Stats

Post by Nagahaku » Tue Jul 25, 2023 3:35 pm

Cypress wrote:
Wed Dec 08, 2021 11:57 pm
•{how does it work with irongolem anyways? it has some special setup that makes it only apply fade when an item is ethereal. is this attached to the hardcoded iron golem ID, or will it work on clones?}
as i remembered, it needs a state to get iron golem fade, if you have the state removed from the summoning skill, it loses the ability to fade...

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

Re: Guide to ItemStatCost.txt Stats

Post by Nagahaku » Wed Jul 26, 2023 4:54 am

Cypress wrote:
Wed Dec 08, 2021 11:57 pm
[item_staminadrainpct]
I found this stat only works on items, skills are not able to apply it correctly.

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

Re: Guide to ItemStatCost.txt Stats

Post by OrderOfTheScribble » Wed Jul 26, 2023 10:26 pm

Nagahaku wrote:
Wed Jul 26, 2023 4:54 am
Cypress wrote:
Wed Dec 08, 2021 11:57 pm
[item_staminadrainpct]
I found this stat only works on items, skills are not able to apply it correctly.
I tested this with a copy of Modworked v14a1 by making 3 skill changes as follows:
  • The 'firelength' stat in one of the superoskills was changed to 'item_staminadrainpct' and gained the value 2*skill('Critical Strike'.pst1), meaning a character with Critical Strike would gain slower stamina drain equal to twice the chance of critical strike. This would be 32% at slvl 1.
  • Resist Fire gained 'item_staminadrainpct' as its ast3, and this was set to ast1. This means that Resist Fire now adds slower stamina drain equal to its bonus to fire resist, which is 52% at slvl 1.
  • Frozen Armor gained 'item_staminadrainpct' as its ast2, and this was set to 2*ast1. This means that Frozen Armor now adds slower stamina drain equal to twice its defense bonus. This would be 60% at slvl 1.
I did it this way to see if some ways to apply the stat worked but not others. I then created 3 test characters, each with one of the changed skills, and played each one of them until they got to level 2 and found the entrance to the Den of Evil. I then had each of them run from the Den of Evil entrance to town without and then with the changed skill. In all 3 cases, the slower stamina drain worked. The Amazon had a fairly short path and could barely make it without Critical Strike, but her stamina bar didn't go down as much after taking Critical Strike. The Paladin and Sorceress both had longer paths and couldn't make it without the skill active, but they both made it with the skill.

Edit: I just realized the 'item_staminadrainpct' entry doesn't have any characteristics listed in this guide, so I'll post some more info about the stat here. The Amazon Basin has a wiki page on stamina drain here. That page has a formula for stamina drain that reads Stamina drain per second = 25 * max( (40 * (1 + [Armor speed /10] ) * (100 - Slower Stamina Drain) /100 , 1) /256
  • 25 is the number of frames per second, and 256 is the number of bits per point, so taking those numbers out of the formula gives the stamina drain in bits per frame, leaving max( (40 * (1 + [Armor speed /10] ) * (100 - Slower Stamina Drain) /100 , 1)
  • All classes except the Assassin have a RunDrain entry of 20 in CharStats.txt, so I'm guessing the 40 is supposed to be 2*RunDrain, which would make the formula max( (2 * RunDrain * (1 + [Armor speed /10] ) * (100 - Slower Stamina Drain) /100 , 1)
  • Armor speed is the 'speed' entry of body armor in Armor.txt. Only the body armor slot (i.e. the 'tors' item type) counts for stamina drain. With the way the formula works, any body armor with a 'speed' entry of -10 or lower would set stamina drain to the minimum of 1 bit per frame. That also explains why stamina drains much faster with Scale Mail, Plate Mail, and Full Plate Mail and their upgrades than with any other armor in vanilla.
  • Slower Stamina Drain is the 'item_staminadrainpct' stat. The wiki page lists all sources of that stat in vanilla.

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

Re: Guide to ItemStatCost.txt Stats

Post by Nagahaku » Thu Jul 27, 2023 5:18 am

thanks for the guide OrderOfTheScribble! perhaps my txt got corrupted again.... it happens randomly during my modding and i don't know why :(
i'll do it again with after replacing the txt with my backups...
Edit: I found the reason why i failed to get it work before
what i did was giving it to a initial skill such as 'Kick' as a passive stat, this method worked with most stats, such as light radius or damage/magic damage reducing, they applies correctly right after the modification. but for item_staminadrainpct, it requires a passive update action to get itself work.
that's funny, but i don't know why, and no idea if any other stats also needs that.

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

Re: Guide to ItemStatCost.txt Stats

Post by Nagahaku » Wed Aug 02, 2023 8:11 am

Cypress wrote:
Wed Dec 08, 2021 11:57 pm
•{how does it work with irongolem anyways? it has some special setup that makes it only apply fade when an item is ethereal. is this attached to the hardcoded iron golem ID, or will it work on clones?}
Hi, i have tested further more about this and figured it out.
irongolem's ethereal fading function requires 3 things:
1. srvdofunc=57
2. an aurastate
3. an aurastat which is 'fade'.
cloned srvdofunc=57 skills, other summoned monsters worked just well with these 3 functions :D

Edit: Monprop doesn't matter, removing it form ironglem is totally fine, nothing would happen.

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

Re: Guide to ItemStatCost.txt Stats

Post by Cypress » Thu Aug 03, 2023 11:02 pm

Awesome find Nagahaku! I wasn't expecting it to require an aurastate, but it definitely does. I'll be sure to add it in!

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

Re: Guide to ItemStatCost.txt Stats

Post by Nagahaku » Sun Nov 26, 2023 8:10 am

Cypress wrote:
Wed Dec 08, 2021 11:57 pm
[item_throwable]
•Boolean.
•When added to a bow/crossbow, ammo consumption is removed.
I found somthing weird, I don't know what caused this, but it did happen in my mod.
Sometimes, it only removes ammo consumption of skill missiles, normal attacks would still consume ammo, I think maybe it's because I moved weapon bows and crossbows to other itemtype rows?
I can't remember since when it started to happen in my mod, at first normal attacks are just fine, same as skills.
Oh, I also found if this stat is on a throwing weapon, it would also remove ammo consumption of throwing skills that use a skill specific missile such as ama's javelin skills, but those using weapon missiles would still consume ammo, which means normal Throw, Left Throw and Double Throw.

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

Re: Guide to ItemStatCost.txt Stats

Post by Cypress » Sun Nov 26, 2023 1:34 pm

Nagahaku wrote:
Sun Nov 26, 2023 8:10 am
Cypress wrote:
Wed Dec 08, 2021 11:57 pm
[item_throwable]
•Boolean.
•When added to a bow/crossbow, ammo consumption is removed.
I found somthing weird, I don't know what caused this, but it did happen in my mod.
Sometimes, it only removes ammo consumption of skill missiles, normal attacks would still consume ammo, I think maybe it's because I moved weapon bows and crossbows to other itemtype rows?
I can't remember since when it started to happen in my mod, at first normal attacks are just fine, same as skills.
Oh, I also found if this stat is on a throwing weapon, it would also remove ammo consumption of throwing skills that use a skill specific missile such as ama's javelin skills, but those using weapon missiles would still consume ammo, which means normal Throw, Left Throw and Double Throw.
I'm not able to replicate. I tried every throwing javelin skill, they all consumed quantity with item_throwable. And when I changed Long Bows to the "bowz" itemtype which never links to the original "bow" itemtype, it never consumes ammo ever, even without item_throwable.

It is also worth noting that adding the 'quantity' stat directly to a throwing weapon will make it recover ammo on each throw, which makes it behave like item_throwable but for throwing weapons.

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

Re: Guide to ItemStatCost.txt Stats

Post by Nagahaku » Mon Nov 27, 2023 4:04 am

Cypress wrote:
Sun Nov 26, 2023 1:34 pm
I'm not able to replicate.
Hmmm... seems I have to roll back to vanilla and check what happened step by step, would take a lot of time, i'll post more if something worthy found...

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

Re: Guide to ItemStatCost.txt Stats

Post by Nagahaku » Fri May 10, 2024 4:26 pm

Cypress wrote:
Wed Dec 08, 2021 11:57 pm
[skill_handofathena]
•Acts as a percentage multiplier to the user's missile speed, but only if the missile has canslow=1.
•If equal to 0, then missiles have -100% velocity. If equal to 50, missiles have -50% velocity. If equal to 100, missiles have 0% velocity (which is to say, an unmodified velocity). If equal to 200%, missiles have +100% velocity, and so on. {does this work with negative values, allowing inverted missiles?}
Hi, I found this stat requires state slowmissiles (id=87) to be functional, other states won't work. didn't test if it work on items if gave it save bits in itemstatcost.txt

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

Re: Guide to ItemStatCost.txt Stats

Post by Cypress » Sat May 11, 2024 4:45 pm

Thanks Nagahaku! I've added it into both the stat guide and state guide. Also, doesn't seem to do anything on items, probably because if it is on an item then the stat isn't given by the slowmissiles state. Although, you can still give it to items by adding in a passive skill or aura-when-equipped that uses the slowmissiles state.

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

Re: Guide to ItemStatCost.txt Stats

Post by Nagahaku » Wed Jul 03, 2024 4:07 pm

Cypress wrote:
Wed Dec 08, 2021 11:57 pm
'stat'.base means the stat's base value is being considered (i.e. 'strength'.base includes the Strength you start the game with and invested stat points into)
'stat'.mod means the stat is given as the non-base value (i.e. 'strength'.mod includes Strength from states and items)
Hmmm... i found something strange about them with the resists given by Mara's scroll, they seems to be counted both as 'stat'.mod and 'stat'.base, really confused me.

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

Re: Guide to ItemStatCost.txt Stats

Post by Cypress » Sun Jul 07, 2024 2:57 pm

That is strange Nagahaku! Especially since the game doesn't save the resist stats to the character. I guess it determines the base and mod values based on the quest flag only. I was hoping it saved to the character somehow, in which case giving save bits to the resists would make it stay after death, but that doesn't work. The base and mod values don't change on death either, even though the actual bonus is 0% rather than 10-30% after death.

Post Reply

Return to “General Mod Making”