Items

automagic

Auto-attached prefix groups for class-specific base items.

automagic.txt is not a filter or override on the magic-affix pool. It's a separate, much smaller system: every row defines one auto-attached prefix that the engine applies to specific base items at drop time, regardless of the item's quality (white, magic, rare, or crafted). The classic examples are Sorc orbs (which always carry an auto-prefix granting class skills), Paladin auric shields, Necro voodoo heads, Druid pelts, Warlock tomes, and Amazon class weapons — everything that "comes with" a built-in mod outside the magic-affix system.

44 rows total, all version=100 (LoD/D2R-era), all spawnable=1, partitioned into 7 numeric groups (300–306). The schema is identical to magicprefix and magicsuffix — same 39 columns, same Code/Param/Min/Max mod-block pattern — because the engine uses the same internal affix machinery to apply them. The auto-prefix consumer (auto prefix field on armor/weapons rows) scopes lookup by group, so at runtime each pool typically contains a single group's rows competing for the auto-mod slot.

What's in a row

The 39 columns split into seven groups.

Identity

ColumnMeaning
NameDisplay name (Fletcher's, of the Jackal). Doesn't need to be uniquely named.
versionGame-version gate. 0 = Classic, 100 = LoD/D2R. All 44 named automagic rows are version=100 — the auto-prefix system is an LoD-era addition.

Spawn gating

ColumnMeaning
spawnable1 = used by the randomizer when an item spawns. 0 = never used. All 44 named rows are spawnable=1 in current data.
rare1 = also eligible on rare-quality items. Blank = magic-only. 9 rows are magic-only — see Magic-only entries below.
levelMinimum item qlvl for this row to be eligible.
maxlevelOptional upper qlvl cap. Once item qlvl exceeds this, the row drops out of eligibility. Currently blank on every named automagic row (no row caps out).
levelreqPlayer clvl required to equip an item carrying this affix. Independent of level.

Class restriction

ColumnMeaning
classspecificClass code from PlayerClass.txt for class-restricted affixes. Currently 0 rows set this in automagic data — the auto-prefix system handles class scoping via the consumer (auto prefix field on the base item) rather than via this column.
classCompanion class code for classlevelreq. 0 rows set this.
classlevelreqClass-specific clvl gate (defaults to levelreq if null). 0 rows set this.

Pool weighting

ColumnMeaning
frequencyRelative weight in the auto-mod pool. Selection formula: frequency / Σ(eligible-frequencies) within the scoped group. Per locbones, when the item has a magic lvl set, the magic-level value is multiplied with the affix's frequency before the sum. (For magicprefix/magicsuffix, assembly disassembly showed the multiplier is actually frequency × affix.level; auto-prefix selection is less empirically scrutinized, but the magic lvl interaction is documented to apply here too.)

Group exclusion (used as the auto-prefix attachment target)

ColumnMeaning
groupNumeric group ID. Schematically this is an exclusion group — same as in magicprefix/magicsuffix, where two affixes sharing a group can't co-exist on one item. The auto-prefix consumer (auto prefix on the base in armor or weapons) scopes lookup by matching its value against group here. Because each auto prefix value selects exactly one group, the exclusion semantics collapse — within the scoped pool there's only one group anyway, and the engine picks one row regardless. 7 distinct groups (300–306) — see The 7 groups.

Mod block (×3)

ColumnMeaning
mod1codemod3maxUp to 3 stats per affix, each as Code / Param / Min / Max. Code is a property name from Properties.txt (which composes one or more itemstatcost stats with display logic). Param is stat-specific (0/1/2 selecting Amazon skilltabs in groups 300–302; blank for the simpler stat mods in 303–306). Min/Max is the value range — equal for fixed-value mods, otherwise rolls within.

Item-type filter

ColumnMeaning
itype1itype7Allowed item types (itemtypes codes). Every automagic row uses the maximally-broad armo + weap — actual scoping happens via auto prefix on the base item, not here.
etype1etype5Excluded item types. Blank on every automagic row in current data.

Cosmetic / value

ColumnMeaning
transformcolorColor change applied to the item when this affix attaches. Empty = no color change. References the Code column in Colors.txt. 5 rows have this set.
multiplyMultiplicative buy/sell cost modifier. Calculated in 1024ths for buy cost and 4096ths for sell cost.
addFlat integer modifier added to the item's buy and sell costs.

How it works

Each affected base item declares an auto prefix field on its row in armor or weapons. When the engine spawns that base:

  1. It looks up auto prefix on the base.
  2. Filters automagic.txt to rows in the matching group where the item's qlvl is in [level, maxlevel] and the itype matches (always satisfied, since every automagic row uses armo/weap).
  3. Picks one row weighted by frequency (with the magic lvl multiplier applied if the base has a non-zero magic lvl).
  4. Rolls the mod within the row's Min/Max.

The chosen row is attached as a prefix on every drop of that base, independent of whether the item is white (no other affixes), magic (one prefix + one suffix), rare (multiple affixes), or crafted (recipe-specific affixes). The auto-mod is additional — it doesn't consume a magic-affix slot.

The levelreq from the chosen row factors into the item's required clvl to equip — only enforced on magic-quality items per the original D2 spec.

The 7 groups

groupThemeTrack(s)Rows
300Amazon Bow & Crossbow skilltabskilltab (param 0): Fletcher'sBowyer'sArcher's (+1 → +3)3
301Amazon Passive & Magic skilltabskilltab (param 1): Acrobat'sGymnast'sAthlete's (+1 → +3)3
302Amazon Javelin & Spear skilltabskilltab (param 2): Harpoonist'sSpearmaiden'sLancer's (+1 → +3)3
303Life and manahp (Jackal → Colossus) and mana (Lizard → Great Wyrm)13
304Resists and attack ratingres-all (Shimmering → Chromatic) and att (Sharp → Knight's)10
305Poison damagepois-min (of Blight → of Anthrax)4
306Magic and fire damagedmg-mag (of Shadows → of Nightmares) and fire-min (of Ember → of Inferno)8

Groups 300/301/302 are Amazon-class-weapon scoped — they grant skill-tree bonuses using the skilltab mod with a Param value identifying the tree. Groups 303–306 are the universal pools used by the rest of the auto-mod-eligible bases, mixing two related affix tracks (e.g. life vs mana in 303) within one group.

Worked example: group 303 (life / mana)

The largest group, attached to most class-specific armor bases:

Nameqlvlclvl reqModRangefreq
of the Jackal13hp1–56
Lizard's32mana1–54
of the Fox118hp6–105
Snake's129mana5–103
Serpent's2316mana11–202
of the Wolf2720hp11–204
Drake's3426mana21–302
of the Tiger4335hp21–303
Dragon's4537mana31–401
Wyrm's5648mana41–601
of the Mammoth5951hp31–402
Great Wyrm's6759mana61–801
of the Colossus7567hp41–601

A qlvl-30 base with auto prefix=303 would draw from rows where level ≤ 30 (Jackal/Lizard/Fox/Snake/Serpent/Wolf/Drake all eligible) and pick one weighted by frequency — Wolf's hp 11–20 is the most common outcome at that level (frequency 4), Snake's mana 5–10 next (3), Drake's mana 21–30 rare (2).

Magic-only entries

9 rows are magic-only (rare blank) — they can attach to magic-quality items but not to rare-quality items:

NameGroupqlvlMod
Archer's30060skilltab 0, +3 (top tier of group 300)
Athlete's30160skilltab 1, +3 (top tier of group 301)
Lancer's30260skilltab 2, +3 (top tier of group 302)
Great Wyrm's30367mana 61–80 (top mana tier)
of the Colossus30375hp 41–60 (top hp tier)
Chromatic30450res-all 35–45 (top res-all tier)
of Anthrax30533pois-min 64 (top poison tier)
of Nightmares30633dmg-mag 21–30 (top magic dmg tier)
of Inferno30633fire-min 16 (top fire dmg tier)

The pattern: every group's top tier is magic-only. Rare items attaching from these groups draw from the lower tiers only.

Same names, different tables

Several names that appear in automagic.txt (Sharp, Fine, Shimmering, Rainbow, of Blight, of Venom, etc.) also exist as entries in magicprefix or magicsuffix — separate definitions, different mod ranges, different roll mechanisms. A "Sharp" auto-mod on a Necromancer voodoo head and a "Sharp" magic prefix on a regular sword are not the same row, even though they share the display name. Don't deduplicate by Name across these three tables — they're independent affix pools.

Cross-references

  • armor and weapons — the auto prefix column on those tables points at the group value here. Every base item that carries an auto-mod sets auto prefix to one of 300–306.
  • itemtypesitype1/itype2 reference the item-type taxonomy. Every automagic row uses the maximally-broad armo + weap, leaving the actual scoping to auto prefix on the base.
  • magicprefix, magicsuffix — separate, much larger affix pools. Auto-mods don't consume a magic-affix slot; they're attached in addition.
  • itemstatcostmod*Code resolves through Properties.txt to stats defined here.
  • Properties.txt — defines what each mod*Code resolves to.
  • Colors.txt — the transformcolor column references color codes defined here.
  • PlayerClass.txt — class codes for the (currently-unused) classspecific/class columns.