Skip to main content

Kinds, slots and records

Items · The item types · Initial items (ITEM.DAT)

In brief​

The item types grouped by kind and by slot mask, then the 434 records of ITEM.DAT: 95 templates that the game and the scripts copy, 5 free entries for conjured weapons and 334 items lying in the levels, with the flag bytes they carry.

Types by kind​

The kinds of the 64 types, and what an item's value means for each:

KindTypesThe value is
ITEM_KIND_WORN19 banded armor, 20 chainmail, 21 helmets, 22 leather armor, 24 plate mail, 25 scale mail, 27 shields, 32 boots, 41 robes and cloaks, 42 Ring of Protection, 43 bracers, 57 Medusa Shield, 59 Jhonas' Cloak; 51 to 56, the conjured-weapon pool (ITEM_KIND_MELEE once reserved)Enchantment
ITEM_KIND_MELEE0 axes (also the empty hand, entry 0), 1 long swords, 2 short swords, 8 femurs, 10 polearms, 11 maces, 12 flail, 13 staves, 23 trident, 45 two-handed swords, 60 Crystal HammerEnchantment
ITEM_KIND_THROWN4 (no item), 5 daggers, 6 skulls, 9 spear, 15 darts, 16 arrows, 18 rocksEnchantment
ITEM_KIND_LAUNCHER7 bows, 14 slingEnchantment
ITEM_KIND_MISC3 (no item), 28 lock picks, 44 amulets and a necklace, 46 quest items, 49 (no item), 63 Sticky PaperAmulets, quest items, other types
ITEM_KIND_SPELLBOOK29 spellbookOther types
ITEM_KIND_HOLY_SYMBOL30 holy symbolsOther types
ITEM_KIND_FOOD31 rations and rotten foodFood points
ITEM_KIND_BONES33 sets of bonesThe character brought back
ITEM_KIND_MAGE_SCROLL26 Fire Sphere and magic dust, 34 mage scrollsSpell definition
ITEM_KIND_CLERIC_SCROLL35 cleric scrolls, 58 an amulet (only a template)Spell definition
ITEM_KIND_TEXT36 parchments and a tomeText or part of the map
ITEM_KIND_STONE37 stone itemsWhich stone
ITEM_KIND_KEY38 keys, the Tooth and the Tuning ForkWhich key
ITEM_KIND_POTION39 potionsWhich potion
ITEM_KIND_GEM40 gems and tropelet seedsWhich gem
ITEM_KIND_RING47 ringsWhich ring
ITEM_KIND_UNKNOWN_17none—
ITEM_KIND_WAND48 and 62 wands, 50 two items with no nameWhich spell
ITEM_KIND_HORN17 hornsWhich horn
ITEM_KIND_LIFE_DEATH_AMULET61 amulets of Life and DeathLife or death

Types by slot mask​

The types grouped by the bits of their mask, without the INVENTORY_SLOT_ prefix. In the original data, every type with a mask has HAND:

BitsTypes
none51–56, the conjured-weapon types
HAND0–3, 7–14, 23, 27, 33, 45, 57, 60, 62, 63: most weapons, shields, bones, a wand type, Sticky Paper
HAND, BODY_ARMOUR19, 20, 22, 24, 25: armour; 41, 59: robes and cloaks
HAND, BRACERS43: bracers
HAND, BOOTS32: boots
HAND, HELMET21: helmets
HAND, NECK58: an amulet
HAND, BELT4–6, 15, 18, 26, 28–31, 34–40, 48–50: small weapons, spheres, scrolls, potions, keys, gems, wands and others
HAND, BELT, QUIVER16: arrows
HAND, BELT, NECK44, 46, 61: amulets, necklaces and the parts of Talon
HAND, RING42: Ring of Protection; 47: rings
HAND, BELT, RING17: horns; see the anomaly

Templates and records​

The 434 records of ITEM.DAT fall into three groups:

  • Entries 0 to 10 and 16 to 99 are templates: they lie nowhere and exist to be copied. Entry 0, the Mouse Pointer, stands for the empty hand.
  • Entries 11 to 15, named NULL, are the free entries of conjured weapons.
  • Entries 100 to 433 lie on a level:
Level12345678910111213141516
Records30377570471635352101612282

In the original data, every copy is taken from the first hundred entries: scripts create items from templates 0 to 94 and launch template 49, the monsters of the levels name items up to 58 as random_item and up to 89 as fixed_item, and the only weapon a monster throws is item 4, a dagger.1 Each of the 123 names is used by at least one record; slot 1 is empty, which is how a record says it has no second name.

Flag bytes in the file​

The whole ItemRuntimeFlags byte in the 434 records:2

ByteRecordsBits, without the ITEM_RUNTIME_ prefixItems
0x00228none
0x80123MAGICAL
0xc066MAGICAL, IDENTIFIED
0xa09MAGICAL, CURSEDSeven weapons of negative value, an amulet, a Sticky Paper
0x402IDENTIFIEDThe two Paladin's Holy Symbols
0xc42MAGICAL, IDENTIFIED, 4 in the chargesThe two items of type 50; see wands
0x871MAGICAL, 7 chargesWand
0x851MAGICAL, 5 chargesWand
0x821MAGICAL, 2 chargesWand
0x781IDENTIFIED, CURSED, VANISHES_AFTER_HIT, DRAINS_HIT_POINTSRing template 47, which no script or monster copies

Sources​

Locations refer to the game executable reference, and the reference files are identified in the file inventory.

Footnotes​

  1. The 16 reference INF files: the initial monster records, the monster types' ranged weapons and the reachable SCRIPT_CREATE_ITEM, SCRIPT_LAUNCH_OBJECT and SCRIPT_SPAWN_MONSTER instructions, decoded with script_decoder.py. ↩

  2. Records of the reference ITEM.DAT, and the item numbers of the 16 reference INF files, decoded with script_decoder.py. ↩