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
| Column | Meaning |
|---|---|
Name | Display name (Fletcher's, of the Jackal). Doesn't need to be uniquely named. |
version | Game-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
| Column | Meaning |
|---|---|
spawnable | 1 = used by the randomizer when an item spawns. 0 = never used. All 44 named rows are spawnable=1 in current data. |
rare | 1 = also eligible on rare-quality items. Blank = magic-only. 9 rows are magic-only — see Magic-only entries below. |
level | Minimum item qlvl for this row to be eligible. |
maxlevel | Optional 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). |
levelreq | Player clvl required to equip an item carrying this affix. Independent of level. |
Class restriction
| Column | Meaning |
|---|---|
classspecific | Class 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. |
class | Companion class code for classlevelreq. 0 rows set this. |
classlevelreq | Class-specific clvl gate (defaults to levelreq if null). 0 rows set this. |
Pool weighting
| Column | Meaning |
|---|---|
frequency | Relative 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)
| Column | Meaning |
|---|---|
group | Numeric 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)
| Column | Meaning |
|---|---|
mod1code … mod3max | Up 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
| Column | Meaning |
|---|---|
itype1 … itype7 | Allowed 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. |
etype1 … etype5 | Excluded item types. Blank on every automagic row in current data. |
Cosmetic / value
| Column | Meaning |
|---|---|
transformcolor | Color 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. |
multiply | Multiplicative buy/sell cost modifier. Calculated in 1024ths for buy cost and 4096ths for sell cost. |
add | Flat 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:
- It looks up
auto prefixon the base. - Filters
automagic.txtto rows in the matchinggroupwhere the item's qlvl is in[level, maxlevel]and the itype matches (always satisfied, since every automagic row usesarmo/weap). - Picks one row weighted by
frequency(with themagic lvlmultiplier applied if the base has a non-zeromagic lvl). - 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
group | Theme | Track(s) | Rows |
|---|---|---|---|
300 | Amazon Bow & Crossbow skilltab | skilltab (param 0): Fletcher's → Bowyer's → Archer's (+1 → +3) | 3 |
301 | Amazon Passive & Magic skilltab | skilltab (param 1): Acrobat's → Gymnast's → Athlete's (+1 → +3) | 3 |
302 | Amazon Javelin & Spear skilltab | skilltab (param 2): Harpoonist's → Spearmaiden's → Lancer's (+1 → +3) | 3 |
303 | Life and mana | hp (Jackal → Colossus) and mana (Lizard → Great Wyrm) | 13 |
304 | Resists and attack rating | res-all (Shimmering → Chromatic) and att (Sharp → Knight's) | 10 |
305 | Poison damage | pois-min (of Blight → of Anthrax) | 4 |
306 | Magic and fire damage | dmg-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:
| Name | qlvl | clvl req | Mod | Range | freq |
|---|---|---|---|---|---|
| of the Jackal | 1 | 3 | hp | 1–5 | 6 |
| Lizard's | 3 | 2 | mana | 1–5 | 4 |
| of the Fox | 11 | 8 | hp | 6–10 | 5 |
| Snake's | 12 | 9 | mana | 5–10 | 3 |
| Serpent's | 23 | 16 | mana | 11–20 | 2 |
| of the Wolf | 27 | 20 | hp | 11–20 | 4 |
| Drake's | 34 | 26 | mana | 21–30 | 2 |
| of the Tiger | 43 | 35 | hp | 21–30 | 3 |
| Dragon's | 45 | 37 | mana | 31–40 | 1 |
| Wyrm's | 56 | 48 | mana | 41–60 | 1 |
| of the Mammoth | 59 | 51 | hp | 31–40 | 2 |
| Great Wyrm's | 67 | 59 | mana | 61–80 | 1 |
| of the Colossus | 75 | 67 | hp | 41–60 | 1 |
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:
| Name | Group | qlvl | Mod |
|---|---|---|---|
| Archer's | 300 | 60 | skilltab 0, +3 (top tier of group 300) |
| Athlete's | 301 | 60 | skilltab 1, +3 (top tier of group 301) |
| Lancer's | 302 | 60 | skilltab 2, +3 (top tier of group 302) |
| Great Wyrm's | 303 | 67 | mana 61–80 (top mana tier) |
| of the Colossus | 303 | 75 | hp 41–60 (top hp tier) |
| Chromatic | 304 | 50 | res-all 35–45 (top res-all tier) |
| of Anthrax | 305 | 33 | pois-min 64 (top poison tier) |
| of Nightmares | 306 | 33 | dmg-mag 21–30 (top magic dmg tier) |
| of Inferno | 306 | 33 | fire-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
armorandweapons— theauto prefixcolumn on those tables points at thegroupvalue here. Every base item that carries an auto-mod setsauto prefixto one of 300–306.itemtypes—itype1/itype2reference the item-type taxonomy. Every automagic row uses the maximally-broadarmo+weap, leaving the actual scoping toauto prefixon the base.magicprefix,magicsuffix— separate, much larger affix pools. Auto-mods don't consume a magic-affix slot; they're attached in addition.itemstatcost—mod*Coderesolves throughProperties.txtto stats defined here.Properties.txt— defines what eachmod*Coderesolves to.Colors.txt— thetransformcolorcolumn references color codes defined here.PlayerClass.txt— class codes for the (currently-unused)classspecific/classcolumns.