Mechanics

itemtypes

Item-type taxonomy and inheritance — body slots, socket caps, class restriction, runeword categories.

itemtypes.txt is the type taxonomy every other item-related table consults. When armor.txt lists a Full Helm with type=helm, when weapons.txt puts a Long Sword in type=swor, when a runeword needs "any axe", or when a magic prefix says "only on clas items" — the meaning of those codes lives here. Each row defines one item type along with its body-slot eligibility, socket caps, item-quality eligibility, class restriction, runeword category, and a parent pointer that lets descendant types inherit those rules.

110 rows, 40 columns. Inheritance is the central idea: most concrete types (swor, helm, glov) point to a parent type via Equiv1, optionally a second parent via Equiv2, and pick up that parent's rules unless they override locally.

What's in a row

The 40 columns split into eight functional groups.

Identity and inheritance

ColumnMeaning
ItemTypeHuman-readable name (Sword, Voodoo Heads, Auric Shields). Reference-only.
CodeUnique 3- or 4-character pointer (swor, head, ashd). This is what armor.txt / weapons.txt / magicprefix.txt / cubemain.txt / skills.txt reference.
Equiv1Parent type code. The row inherits the parent's settings unless overridden. 98 of 110 rows declare a parent.
Equiv2A second parent. 19 rows use this for multiple inheritance — the row belongs to two parent taxonomies at once. Examples: pelt (Druid Pelt) parents helm and drui, so it's both a head-slot armor and a class-restricted Druid item; head (Voodoo Heads) parents shld and necr, so it's both a shield and a Necromancer item. Without Equiv2 these dual-natured types couldn't simultaneously satisfy "is a helm" and "is a Druid item."

A typical inheritance chain: swor (Sword) → blde (Swords and Knives) → mele (Melee Weapon) → weap (Weapon, root). Auto-prefixes scoped to "any melee weapon" reach swor through this chain.

Equipping and body slots

ColumnMeaning
Body1 = the item can be equipped on a character (then BodyLoc1 / BodyLoc2 say where); 0 = inventory/stash/cube only. 43 of 110 rows are equippable.
BodyLoc1 / BodyLoc2Inventory slot codes from BodyLocs.txt. Most equippable types fill both slots with the same value (tors/tors for body armor, head/head for helms), except weapons which use rarm/larm to indicate "right-arm or left-arm slot" — the engine reads either match as valid. Required when Body=1.
Beltable1 = can occupy a belt slot (potions, scrolls, throwing items).
Repair1 = NPC vendors can repair the item; 0 = not repairable.

Quality and rarity rules

ColumnMeaning
Magic1 = the item always spawns Magic-quality (used for jewels, charms, and anything that can never roll white/normal).
Rare1 = the item type is eligible to roll Rare quality.
Normal1 = the item always spawns Normal-quality (used for ammunition, potions, scrolls — items that have no affix system).
TreasureClass1 = the type is allowed in default treasure-class drop pools.
RarityProbabilistic gate for whether a randomly-spawned weapon/armor/misc gets stat rolls. The engine evaluates IF RANDOM(0, Rarity − Current Act Level) > 0 THEN spawn stats, so higher Rarity = more likely to be the chosen item type.

Class restriction

ColumnMeaning
ClassRestricts the item to one player class — the hard equip-time gate. References Code from PlayerClass.txt (ama, bar, nec, pal, sor, dru, ass, war). 20 rows are class-restricted: 4 each for Amazon and Assassin, 2 each for Barbarian, Druid, Necromancer, Paladin, Sorceress, and Warlock. Every Class-restricted row also declares Equiv2 = <the corresponding class taxonomy code> (e.g. Class=dru rows always also have Equiv2=drui). The two mechanisms are co-dependent: Class gates equipping, while Equiv2 → drui/sorc/pala/etc. is what affix-eligibility, runeword, and item-filter systems read to scope class items.
StaffModsGrants class-specific item skill modifiers ("staffmods" — class-skill bonuses that auto-roll on certain bases). The value is the class code that gets the skills. 12 rows carry staffmods, distributed across all classes (Warriors get 3, Sorceresses/Necromancers/Assassins get 2 each, Paladins/Barbarians/Druids get 1 each).

Sockets

The socket-cap system is tiered by item level: an item type can hold up to MaxSockets1 sockets while its iLvl ≤ MaxSocketsLevelThreshold1, up to MaxSockets2 sockets while iLvl ≤ MaxSocketsLevelThreshold2, and up to MaxSockets3 sockets above that. The actual socket count on a specific item is also gated by the base item's Gemsockets field in armor.txt / weapons.txt.

ColumnMeaning
MaxSockets1Max sockets for items with iLvl 1 to MaxSocketsLevelThreshold1.
MaxSocketsLevelThreshold1Upper iLvl bound for the first tier. Most rows use 25.
MaxSockets2Max sockets for items with iLvl MaxSocketsLevelThreshold1+1 to MaxSocketsLevelThreshold2.
MaxSocketsLevelThreshold2Upper iLvl bound for the second tier. Most rows use 40.
MaxSockets3Max sockets for items with iLvl above MaxSocketsLevelThreshold2 (no upper bound — this is the high-iLvl ceiling).

For example, Body Armor (tors) is 3 / 25 / 4 / 40 / 6: up to 3 sockets at iLvl ≤25, up to 4 at iLvl ≤40, up to 6 at higher iLvl. Helms (helm) cap at 2 / 2 / 3 across the same thresholds. Shields (shie) at 3 / 3 / 4.

Ammunition and stacking

ColumnMeaning
ShootsPointer to the item-type code this type fires as ammunition (e.g. bow → arrow quiver).
QuiverReverse pointer: the item-type code this type is fired by (e.g. aqv arrow quiver → bow).
Throwable1 = a throwing weapon (consumes itself on throw). 7 rows are throwable.
Reload1 = ammunition will auto-transfer from inventory to the equip slot when the equipped quantity hits zero.
ReEquip1 = an inventory copy will replace an equipped item destroyed mid-combat.
AutoStack1 = picking up matching items auto-stacks them.

Cosmetic and UI

ColumnMeaning
VarInvGfxHow many inventory-graphic variations this type has. The number must equal the count of populated InvGfx# fields below.
InvGfx1InvGfx6Up to six DC6 file references for inventory graphics. The engine picks one at item-spawn time for visual variety.
StorePageCode from StorePage.txt controlling which NPC-shop UI tab displays the item type after sale.
UICategoryCategorizes the type for vendor and inventory UI display. 37 distinct values in use (bows, helms, gems, runes, circl, palad, etc.).

Runewords and restrictions

ColumnMeaning
RunewordCategory1 / RunewordCategory2Pointers used by the runeword-eligibility check. Five distinct first-category values are in use: r_mel (melee — 24 types), r_arm (body armor — 7), r_mis (missile weapon — 6), r_off (offhand/shield — 5), r_hel (helm — 4). A runeword whose itype field references one of these tags applies to every itemtype tagged with the matching value.
Restricted1 = the type is excluded from certain general-item systems. Only one row in shipped data: Colossal Jewel (cjwl), the high-roll jewel variant.

Row terminator

ColumnMeaning
*eolEnd-of-row marker, always 0. Reference-only.

Worked example: the Druid Pelt (pelt)

Druid pelts illustrate why the schema needs both Equiv2 and class-keyed StaffMods:

ColumnValueNotes
ItemTypePeltDisplay name.
CodepeltWhat armor.txt references for Wolf Head, Hawk Helm, Antlers, etc.
Equiv1helmInherits all helm rules — body-slot head, helm socket caps, helm runeword category r_hel.
Equiv2druiAlso belongs to the drui (Druid Item) taxonomy, which itself inherits from clas (Class Specific). This is what makes pelts class-restricted.
Body / BodyLoc1 / BodyLoc21 / head / headEquippable in the head slot (inherited from helm, restated locally).
MaxSockets1/2/32 / 3 / 3Up to 2 sockets at iLvl ≤25, 3 at iLvl ≤40, 3 above.
ClassdruLocally restricted to Druids (independent of the Equiv2 = drui taxonomy match — Class is the hard player-class gate).
StaffModsdruPelts can roll Druid-skill staffmods (the +1-to-skill auto-prefixes that make pelts a Druid-only base).
RunewordCategory1r_helInherits the helm runeword category, so a runeword with itype=r_hel is craftable in a pelt.
UICategorydruidCategorized under the Druid bucket in the UI.

The combined effect: a Druid pelt is treated as a helm by socket-cap, body-slot, and runeword logic; treated as a Druid item by affix and class-skill logic; gated to the Druid class for equipping; and rolls Druid staffmods at item-creation time.

Cross-references

  • armor.txt, weapons.txt, misc.txt — the type column on each base item references an itemtypes.Code from this table.
  • BodyLocs.txt — defines the BodyLoc1 / BodyLoc2 slot codes.
  • PlayerClass.txt — defines the Class and StaffMods codes.
  • magicprefix.txt, magicsuffix.txt, automagic.txt — affix itype and etype columns reference itemtypes.Code to scope eligibility.
  • cubemain.txt — recipe input/output codes that aren't a literal base-item code reference itemtypes.Code (e.g. helm,nor,nos matches any normal-quality unsocketed helm).
  • runes.txt — runeword itype and etype columns reference both itemtypes.Code and RunewordCategory1 values to scope which bases can hold the runeword.
  • skills.txtitypea1itypea3 / etypea1etypea2 columns reference itemtypes.Code to gate which weapon types can use a skill.
  • StorePage.txt — defines the StorePage codes.