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:
| Kind | Types | The value is |
|---|---|---|
ITEM_KIND_WORN | 19 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_MELEE | 0 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 Hammer | Enchantment |
ITEM_KIND_THROWN | 4 (no item), 5 daggers, 6 skulls, 9 spear, 15 darts, 16 arrows, 18 rocks | Enchantment |
ITEM_KIND_LAUNCHER | 7 bows, 14 sling | Enchantment |
ITEM_KIND_MISC | 3 (no item), 28 lock picks, 44 amulets and a necklace, 46 quest items, 49 (no item), 63 Sticky Paper | Amulets, quest items, other types |
ITEM_KIND_SPELLBOOK | 29 spellbook | Other types |
ITEM_KIND_HOLY_SYMBOL | 30 holy symbols | Other types |
ITEM_KIND_FOOD | 31 rations and rotten food | Food points |
ITEM_KIND_BONES | 33 sets of bones | The character brought back |
ITEM_KIND_MAGE_SCROLL | 26 Fire Sphere and magic dust, 34 mage scrolls | Spell definition |
ITEM_KIND_CLERIC_SCROLL | 35 cleric scrolls, 58 an amulet (only a template) | Spell definition |
ITEM_KIND_TEXT | 36 parchments and a tome | Text or part of the map |
ITEM_KIND_STONE | 37 stone items | Which stone |
ITEM_KIND_KEY | 38 keys, the Tooth and the Tuning Fork | Which key |
ITEM_KIND_POTION | 39 potions | Which potion |
ITEM_KIND_GEM | 40 gems and tropelet seeds | Which gem |
ITEM_KIND_RING | 47 rings | Which ring |
ITEM_KIND_UNKNOWN_17 | none | — |
ITEM_KIND_WAND | 48 and 62 wands, 50 two items with no name | Which spell |
ITEM_KIND_HORN | 17 horns | Which horn |
ITEM_KIND_LIFE_DEATH_AMULET | 61 amulets of Life and Death | Life 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:
| Bits | Types |
|---|---|
| none | 51–56, the conjured-weapon types |
HAND | 0–3, 7–14, 23, 27, 33, 45, 57, 60, 62, 63: most weapons, shields, bones, a wand type, Sticky Paper |
HAND, BODY_ARMOUR | 19, 20, 22, 24, 25: armour; 41, 59: robes and cloaks |
HAND, BRACERS | 43: bracers |
HAND, BOOTS | 32: boots |
HAND, HELMET | 21: helmets |
HAND, NECK | 58: an amulet |
HAND, BELT | 4–6, 15, 18, 26, 28–31, 34–40, 48–50: small weapons, spheres, scrolls, potions, keys, gems, wands and others |
HAND, BELT, QUIVER | 16: arrows |
HAND, BELT, NECK | 44, 46, 61: amulets, necklaces and the parts of Talon |
HAND, RING | 42: Ring of Protection; 47: rings |
HAND, BELT, RING | 17: 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:
| Level | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Records | 30 | 37 | 75 | 7 | 0 | 47 | 16 | 35 | 35 | 2 | 10 | 16 | 12 | 2 | 8 | 2 |
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
| Byte | Records | Bits, without the ITEM_RUNTIME_ prefix | Items |
|---|---|---|---|
0x00 | 228 | none | |
0x80 | 123 | MAGICAL | |
0xc0 | 66 | MAGICAL, IDENTIFIED | |
0xa0 | 9 | MAGICAL, CURSED | Seven weapons of negative value, an amulet, a Sticky Paper |
0x40 | 2 | IDENTIFIED | The two Paladin's Holy Symbols |
0xc4 | 2 | MAGICAL, IDENTIFIED, 4 in the charges | The two items of type 50; see wands |
0x87 | 1 | MAGICAL, 7 charges | Wand |
0x85 | 1 | MAGICAL, 5 charges | Wand |
0x82 | 1 | MAGICAL, 2 charges | Wand |
0x78 | 1 | IDENTIFIED, CURSED, VANISHES_AFTER_HIT, DRAINS_HIT_POINTS | Ring 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.