这是一篇试图解释如何解析打包在 MPQ 文件中的 MagicPrefix 和 MagicSuffix 数据文本文件中的数据的文章.

大部分信息已记录在 The Phrozen Keep

Column Headers

Column Header Meaning
name Name of the prefix or suffix.
*comment This appears to be an identifier or index.
version Determines which game version these affixes are working in.
  • 0: Old game version affixes.
  • 1: Affixes working in Diablo II and Lord of Destruction.
  • 100: Affixes exclusives to Lord of Destruction.
spawnable A boolean that controls whenever or not this affix can be picked by the randomizer that assigns affixes to magic and rare items.
  • 0: Cannot be picked, but can still be used in cube recipes.
  • 1: Can be picked.
rare A boolean that controls whenever or not this affix can be picked by the randomizer when assigning affixes to a rare item.
  • 0: Cannot appear on rare items (magic only).
  • 1: Can appear on rare and magic items.
level The quality level (qLvl) of this affix, for this affix to be available on an item, that item must have an item level (iLvl) of at least this amount. The iLvl is equal to the level of the monster that drops the item, or the generation level (for vendors). The iLvl of an item is further influenced by the magic lvl field in Weapons.txt,Armor.txt and Misc.txt.
maxlevel Controls the point at which this affix will no longer appear on items. Say we have a Level of 10 and a MaxLevel of 15, then the affix will only appear on items with a iLvl of 10-15, whereas it will never appear on items with iLvls 1-9 and 16-99. This is the easiest way to get those crappy low-level affixes of higher level drops to ensure that those are useful.
levelreq The general level requirement that your character must meet before he can use an item that has this affix.
classspecific Seems to affect items that grant levels to class skill trees. Assumed to be a fix to an earlier vanilla Diablo II or Lord of Destruction version bug.
class This field controls the character class for whom the class specific level requirement appears.
classlevelreq The level requirement your character must meet before he can use an item with this affix if his class is the class specified in the Class column. So lets say Class is Ama and normal LevelReq is 20 while ClassLevelReq is 25. Then an Amazon will be able to use this item at cLvl 20 while all other classes would need to be cLvl 25.
frequency It controls the probability of this affix being picked by the randomizer within its affix group. In classic days, the game simply rolled a random on all available affixes, ever since v08 they are using this field (badly), which leads to the crappy rare items we see today. Lets say we have 5 affixes inside a group with Frequencies of 1, 5, 10, 50 and 100, then the chance for each of these to appear in case the game selects an affix from this group is: 1/166, 5/166, 10/166, 50/166 and 100/166 (~1%, 3%, 6%, 30% and 60%). In short, the chance for an affix to appear is frequency/total_frequency. This field can hold values from 0 to 255. 0 will effectively make the affix never appear (unless accessed by a cube recipe, but see under Spawnable).
group The group an affix is assigned to. The game cannot pick more then one affix from each group, this is used to prevent an item from spawning say with Ferocious and Cruel at the same time. (be aware that you can put affixes in MagicSuffix, MagicPrefix and AutoMagic in the same group, thus having prefix A never spawn together with suffix B). A blank field obviously puts the affix in group 0, this is not a bug.
mod1code The modifier(s) granted by this affix. This is an ID pointer from PROPERTIES.txt.
mod1param The parameter passed to the associated modifier. Whenever a modifier uses the parameter or not depends on the modifier, see Properties.txt.
mod1min The minimum value passed to the associated modifier. Whenever, and if so how, the modifier uses this value depends on the modifier, see Properties.txt.
mod1max The maximum value passed to the associated modifier. Whenever, and if so how, the modifier uses this value depends on the modifier, see Properties.txt.
mod2code The modifier(s) granted by this affix. This is an ID pointer from PROPERTIES.txt.
mod2param The parameter passed to the associated modifier. Whenever a modifier uses the parameter or not depends on the modifier, see Properties.txt.
mod2min The minimum value passed to the associated modifier. Whenever, and if so how, the modifier uses this value depends on the modifier, see Properties.txt.
mod2max The maximum value passed to the associated modifier. Whenever, and if so how, the modifier uses this value depends on the modifier, see Properties.txt.
mod3code The modifier(s) granted by this affix. This is an ID pointer from PROPERTIES.txt.
mod3param The parameter passed to the associated modifier. Whenever a modifier uses the parameter or not depends on the modifier, see Properties.txt.
mod3min The minimum value passed to the associated modifier. Whenever, and if so how, the modifier uses this value depends on the modifier, see Properties.txt.
mod3max The maximum value passed to the associated modifier. Whenever, and if so how, the modifier uses this value depends on the modifier, see Properties.txt.
transform A boolean that controls whenever or not this affix will alter the color of the item it appears on.
  • 0: Not changing color.
  • 1: Changing the color based on transformcolor.
transformcolor An ID pointer from Colors.txt, this determines what color the modifier will give this item when the Transform boolean is true.
itype1-itype7 These fields are ID pointers to ItemTypes.txt that control what item types this affix can appear on. The affix can appear on all item types that inherit the item type in this field. So putting 'armo' in here will make it appear on all armor (etc).
etype1-etype5 These fields are ID pointers to ItemTypes.txt that control what item types this affix will never appear on. The affix will not appear on any item type that inherits this item type. So putting 'armo' here would prevent it from showing up on all armor (etc).
divide This does not work the way the name suggests (the fields are all filled with 0), if it works at all that is, it doesn't appear to work in ItemStatCost so it probably doesn't here either. But if it did work like that other column is supposed to work, this controls the percentage the price is reduced by in 1024th. Where 1024 equals 100%.
multiply The price of the item is multiplied by this value when this affix is present on it. In 1024ths.
add The hard amount that is added to the price of this item when this affix is present on it.

mod#code Values

Code Modifier
ac +X Defense
ac-miss
ac-hth
red-dmg Physical Damage Taken Reduced by X
red-dmg% Physical Damage Taken Reduced by X%
ac% +X% Enhanced Defense
red-mag Magic Damage Taken Reduced by X
str +X to Strength
dex +X to Dexterity
vit +X to Vitality
enr +X to Energy
mana +X to Mana
mana%
hp +X to Life
hp%
att +X to Attack Rating
block X% Increased Chance of Blocking
cold-min +X Minimum Cold Damage (min value of +X-Y Cold Damage)
cold-max +X Maximum Cold Damage (max value of +X-Y Cold Damage)
cold-len Chilled for X Seconds (hidden status duration component of +X-Y Cold Damage)
fire-min +X Minimum Fire Damage (part of +X-Y Fire Damage)
fire-max +X Maximum Fire Damage (part of +X-Y Fire Damage)
ltng-min +X Minimum Lightning Damage (part of +X-Y Lightning Damage)
ltng-max +X Maximum Lightning Damage (part of +X-Y Lightning Damage)
pois-min +X Minimum Poison Damage (part of +X Poison Damage Over Y Seconds)
pois-max +X Maximum Poison Damage (part of +X Poison Damage Over Y Seconds)
pois-len Poisoned for X Seconds (poison status duration component of +X Poison Damage Over Y Seconds)
dmg-min +X to Minimum Damage
dmg-max +X to Maximum Damage
dmg% X% Enhanced Damage
dmg-to-mana X% Damage Taken Gained as Mana when Hit
res-fire Fire Resist +%
res-fire-max +% to Maximum Fire Resist
res-ltng Lightning Resist +%
res-ltng-max +% to Maximum Lightning Resist
res-cold Cold Resist +%
res-cold-max +% to Maximum Cold Resist
res-mag
res-mag-max
res-pois Poison Resist +%
res-pois-max +% to Maximum Poison Resist
res-all All Resistances +%
res-all-max
abs-fire% Fire Absorb X%
abs-fire
abs-ltng% Lightning Absorb X%
abs-ltng
abs-mag% Magic Absorb X%
abs-mag
abs-cold% Cold Absorb X%
abs-cold
dur
dur%
regen Replenish Life +X
thorns Attacker Takes Damage of X
swing1 +X% Increased Attack Speed
swing2 +X% Increased Attack Speed
swing3 +X% Increased Attack Speed
gold% % Extra Gold from Monsters
mag% % Better Chance of Getting Magic Items
knock Knockback
regen-stam Heal Stamina Plus X%
regen-mana
stam
time
manasteal X% Mana Stolen per Hit
lifesteal X% Life Stolen per Hit
ama +X to Amazon Skill Levels
pal +X to Paladin Skill Levels
nec +X to Necromancer Skill Levels
sor +X to Sorceress Skill Levels
bar +X to Barbarian Skill Levels
herb
light +X to Light Radius
color
ease Requirements -X%
move1 X% Faster Run/Walk
move2 X% Faster Run/Walk
move3 X% Faster Run/Walk
balance1 +X% Faster Hit Recovery
balance2 +X% Faster Hit Recovery
balance3 +X% Faster Hit Recovery
block1 +X% Faster Block Rate
block2 +X% Faster Block Rate
block3 +X% Faster Block Rate
cast1 +X% Faster Cast Rate
cast2 +X% Faster Cast Rate
cast3 +X% Faster Cast Rate
res-pois-len Poison Length Reduced by X%
dmg
howl Hit Causes Monster to Flee X%
stupidity
ignore-ac Ignore Target's Defense
reduce-ac
noheal Prevent Monster Heal
half-freeze Half Freeze Duration
att% X% Bonus to Attack Rating
dmg-ac
dmg-demon +X% Damage to Demons
dmg-undead +X% Damage to Undead
att-demon +X to Attack Rating against Demons
att-undead +X to Attack Rating against Undead
throw
fireskill +X to Fire Skills
allskills +X to All Skills
light-thorns
freeze
openwounds X% Chance of Open Wounds
crush X% Chance of Crushing Blow
kick
mana-kill +X to Mana after each Kill
demon-heal
bloody
deadly X% Deadly Strike
slow
nofreeze
stamdrain
reanimate
pierce +X% Chance to Pierce
magicarrow
explosivearrow
Expansion Note: Doesn't appear to be a modifier, just a section marker in the file.
dru +X to Druid Skill Levels
ass +X to Assassin Skill Levels
skill +X to [Skill] ([Class] Only)
skilltab +X to [Class Skill Tree]
aura
att-skill X% Chance to Cast Level Y [Skill] on Attack
hit-skill X% Chance to Cast Level Y [Skill] on Striking
gethit-skill X% Chance to Cast Level Y [Skill] when Struck
gembonus
regen-dur
fire-fx
ltng-fx
sock Socketed (X)
dmg-fire
dmg-ltng
dmg-mag
dmg-cold
dmg-pois
dmg-throw
dmg-norm
ac/lvl
ac%/lvl
hp/lvl +X to Life (+X per Level)
mana/lvl +X to Mana (+X per Level)
dmg/lvl +X to Maximum Damage (+X per Level)
dmg%/lvl
str/lvl +X to Strength (X per Level)
dex/lvl +X to Dexterity (X per Level)
enr/lvl +X to Energy (X per Level)
vit/lvl +X to Vitality (X per Level)
att/lvl +X to Attack Rating (X per Level)
att%/lvl X% Bonus to Attack Rating (X% per Level)
dmg-cold/lvl
dmg-fire/lvl
dmg-ltng/lvl
dmg-pois/lvl
res-cold/lvl
res-fire/lvl
res-ltng/lvl
res-pois/lvl
abs-cold/lvl
abs-fire/lvl
abs-ltng/lvl
abs-pois/lvl
thorns/lvl
gold%/lvl
mag%/lvl
regen-stam/lvl
stam/lvl
dmg-dem/lvl
dmg-und/lvl
att-dem/lvl
att-und/lvl
crush/lvl
wounds/lvl
kick/lvl
deadly/lvl
gems%/lvl
rep-dur Repairs X Durability in Y Seconds
rep-quant
stack
item%
dmg-slash
dmg-slash%
dmg-crush
dmg-crush%
dmg-thrust
dmg-thrust%
abs-slash
abs-crush
abs-thrust
abs-slash%
abs-crush%
abs-thrust%
ac/time
ac%/time
hp/time
mana/time
dmg/time
dmg%/time
str/time
dex/time
enr/time
vit/time
att/time
att%/time
dmg-cold/time
dmg-fire/time
dmg-ltng/time
dmg-pois/time
res-cold/time
res-fire/time
res-ltng/time
res-pois/time
abs-cold/time
abs-fire/time
abs-ltng/time
abs-pois/time
gold%/time
mag%/time
regen-stam/time
stam/time
dmg-dem/time
dmg-und/time
att-dem/time
att-und/time
crush/time
wounds/time
kick/time
deadly/time
gems%/time
pierce-fire
pierce-ltng
pierce-cold
pierce-pois
dmg-mon
dmg%-mon
att-mon
att%-mon
ac-mon
ac%-mon
indestruct
charged
extra-fire
extra-ltng
extra-cold
extra-pois
extra-magi
dmg-elem
dmg-elem-min
dmg-elem-max
all-stats
addxp
heal-kill
cheap
rip
att-mon%
dmg-mon%
kill-skill
death-skill
levelup-skill
skill-rand
fade
levelreq
ethereal
oskill
state
randclassskill3
splash
corrupt
corruptnum
heroed
randclassskill2
coldskill
ltngskill
poisskill
magskill
velocity%
mapdefense
map-mon-fireres
map-play-fireres
map-play-mag-gold%
map-glob-density
map-play-addxp
map-glob-arealevel
map-glob-monsterrarity
map-mon-fire-min
map-mon-fire-max
map-mon-ltng-min
map-mon-ltng-max
map-mon-mag-min
map-mon-mag-max
map-mon-dmg-cold
map-mon-dmg-pois
map-mon-extra-fire
map-mon-extra-ltng
map-mon-extra-cold
map-mon-extra-pois
map-mon-att-cast-speed
map-mon-att-pierce
map-mon-ac%
map-mon-abs-fire%
map-mon-abs-ltng%
map-mon-abs-mag%
map-mon-abs-cold%
map-mon-red-dmg
map-mon-velocity%
map-mon-regen
map-mon-lifesteal-hp%
map-mon-balance1
map-mon-hp%
map-mon-openwounds
map-mon-crush
map-mon-curseresist-hp%
map-play-ac%
map-play-balance1
map-play-block
map-play-regen
map-mon-pierce-fire
map-mon-pierce-ltng
map-mon-pierce-cold
map-mon-pierce-pois
map-play-res-all
map-play-res-all-max
map-mon-ed%
map-mon-splash
rep-charge
leapspeed
maxcurse
randelemskill
curse-res
heal-hit
randclassskill1
map-mon-phys-as-extra-ltng
map-mon-phys-as-extra-cold
map-mon-phys-as-extra-fire
map-mon-phys-as-extra-pois
map-mon-phys-as-extra-mag
map-glob-add-mon-doll
map-glob-add-mon-succ
map-glob-add-mon-vamp
map-glob-add-mon-cow
map-glob-add-mon-horde
map-glob-add-mon-ghost
extra-bonespears
extra-revives
extra-spirits
pierce-phys
immune-prop
map-mon-deadlystrike
map-mon-cannotbefrozen
map-play-fasterattackrate
map-play-fastercastrate
map-mon-skillondeath
map-play-maxhp-percent
map-play-maxmana-percent
map-play-damageresist
map-play-velocitypercent
map-mon-pierce-all
map-mon-nofreeze-hp%
map-play-swing-cast
map-play-hp%-mp%
map-play-speed-all
map-play-mag
map-play-gold
infinityspeed
silence-fhr-ias
gust-reduction
extra-skele-war
extra-skele-mage
extra-hydra
extra-valk
plague-fcr-pierce
joust-reduction
grims-extra-skele-mage
map-play-lightradius
blood-warp-life-reduction
map-glob-add-mon-souls
map-glob-add-mon-fetish
dclone-clout
maxlevel-clout
dev-clout
extra-skele-archer
extra-golem
dye
socketed-text
inc-splash-radius
ias-frw
rathma-clout
cast-skill X% Chance to Cast Level Y [Skill] on Casting
dragonflight-reduction
dmg%/eth
corpseexplosion-radius
mirrored
dmg%/missinghp%
lifesteal-cap
splash%/missinghp%
eaglehorn-raven
map-glob-skirmish-mode
map-mon-dropjewelry
map-mon-dropweapons
map-mon-droparmor
map-mon-dropcrafting
map-glob-extra-boss
map-glob-add-mon-shriek
map-force-event
uber-difficulty
deep-wounds +X Open Wounds Damage per Second
map-mon-dropcharms
map-glob-dropcorrupted
curse-effectiveness
map-glob-boss-dropskillers
map-glob-boss-dropcorruptedunique
equipped-skill
mindmg/energy
map-glob-boss-dropfacet
map-mon-dropjewels
es-efficiency
sorc-skill-rand-ctc
str-and-vit
block-skill
map-glob-sundermonsters
crit-skill
pierce-skill
desecrate
desecratenum
extra-grizzly
no-wolves
max-deadly
extra-shadow
extra-spiritwolf
joust-reduction-zeraes
map-glob-boss-dropubermats
map-glob-boss-droppuzzlebox

transformcolor Values

Color Code
White whit
Light Grey lgry
Dark Grey dgry
Black blac
Light Blue lblu
Dark Blue dblu
Crystal Blue cblu
Light Red lred
Dark Red dred
Crystal Red cred
Light Green lgrn
Dark Green dgrn
Crystal Green cgrn
Light Yellow lyel
Dark Yellow dyel
Light Gold lgld
Dark Gold dgld
Light Purple lpur
Dark Purple dpur
Orange oran
Bright White bwht
MediaWiki Appliance - Powered by TurnKey Linux