Item data
Data · Routines · Address index
Item and item-type records, the item held with the mouse, the inventory layout, and the tables of potions, wands, horns and launchers. The data page explains how the entries are written.
DS:0x2362 — Inventory-slot masks
- Layout: 27 words, one per inventory slot (file offset
0x306c2) - Role: Tested against the
InventorySlotMaskof an item type by the placement check and, low byte only, the portrait hand swap. Values: slots 0–10x0008; 2–150xffff; 160x0001; 170x0002; 180x0004; 190x0020; 200x0040; 210x0010; 220xffff(DS:0x238e, file offset0x306ee, the location of the belt-slot anomaly); 23–240x0080; 25–260x0100. - Used by: The inventory › Inventory slots, The inventory, Inventory slot masks, Item types (ITEMTYPE.DAT), Character record, Anomalies and bugs
DS:0x2590 — Item shape by icon
- Layout: one signed byte per item icon
- Role: The item shape of each icon, an index into the item shapes at
DS:0xde20: below 15 a large shape fromITEML1.CPS(11 are loaded), 15 and above a small shape fromITEMS1.CPS(26 are loaded), both cut by the item and thrown shape loader. The view draws items on the floor and flying items with it. A value of 15 or more, a small shape, also makes an item eligible in the transfer and flight checks. - Comparative source: REF-SCUMM-016,
_dscItemShapeMap. - Used by: Move an inventory item to a block › Behavior, Move an inventory item to a block, Scripted movement, monsters and items › Items
DS:0x2601, DS:0x06c3, DS:0xe404 — Flying-object shapes
- Layout:
0x2601: one signed byte per item shape, 41 entries;0x6c3: 4 × 4 bytes;0xe404: 13 far pointers - Role: For a flying item, the first of the two thrown shapes of its item
shape (
0x2601; −1 for none, set only for item shapes 15, 18 and 20, to 2, 4 and 6); whether a flying object is mirrored, by direction of flight × 4 + position in its block (0x6c3: 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0); and the thrown shapes (0xe404), cut fromTHROWN.CPSby the item and thrown shape loader: shapes 0–8 at column 4 × (k / 8), row 24 × (k mod 8), 4 columns by 24 rows; shapes 9–12 at column 8, row 32 × (k − 9), 6 columns by 32 rows. - Comparative source: REF-SCUMM-016,
drawFlyingObjects(_flightObjShpMap,_flightObjFlipIndex,_thrownItemShapes). - Used by: Spots and wall decorations › Where objects are drawn
DS:0x2558 — Magic flight properties
- Layout: 4 bytes per magic object type: spell definition whose second routine is the hit, range in blocks (255: unlimited), flags, flying shape
- Role: Read by create a magic flying object. Types
0 to 7 belong to Magic Missile (definition 4, flags
0x41), Melf's Acid Arrow (11,0x04), Fireball (13,0x7a), Hold Person (15,0x4a), Lightning Bolt (17, range 6,0x38), Ice Storm (20, range 6,0x7a), Hold Monster (24,0x4a) and Flame Strike (54,0x4b); types 8 to 13 name definitions 63, 65, 66, 67, 68 and 69, the monster spells (flags0x4b, range unlimited for type 8 and 6 for the others). The table has 14 entries. The flags are those of the magic object hit. - Comparative source: REF-SCUMM-001,
kEoB2MagicFlightPropsDOS. - Used by: Ranged attacks › Monster spells, Attack spells › Notation, Launch an object › Behavior, Level 15: reference tables, Level 16: reference tables
DS:0x6dd6 — Item held with the mouse
- Layout: word
- Role: The held item when the control-state byte is 0; see
the held-item selector. Written only by
0x1e5bc; nothing writes it on a level change. - Used by: Item properties in conditions › Which item is tested, Loading, failures and the end of the game › Loading a saved game, How input works › The pointer and the item it carries
DS:0x71ca — Item records
- Layout: 600 records of 14 bytes
- Role: Every item of the game, one
ItemRuntimeeach. - Used by: Identify items › Behavior, Initial items (ITEM.DAT) › What it becomes in memory, Item entry › In brief, Move the party, monsters or items › Moving items, Saving and restoring › What a saved game holds, Values passed on to other routines › The routines, Saved games (SAV)
DS:0x946e — Item-type records
- Layout: 16-byte records
- Role: Shared item-type properties, one
ItemTypeRuntimeeach. Types 51 to 56 (fromDS:0x979e) are reserved at run time for conjured weapons and saved with the game. Fields+2,+0x0cand+0x0dand bits0x0100–0x8000of+0x0ehave no reader: every literal access to the table, the dice pointer (0x1f713, fields+7to+0x0b), the loader's pointer and the conjured-type pointer were examined, and no pointer to the table is stored in the data segment. - Anomaly:
ANOMALY-154: the horn's type is record 17,DS:0x957ein memory, offset0x112ofITEMTYPE.DAT, with slot mask0x0188(bytes88 01); bit0x0100otherwise occurs only on types 42 and 47. - Used by: Item type entry › How the game uses it, Item type entry › In brief, Item types (ITEMTYPE.DAT) › Reading the file, Monster capabilities › Where it is used, Saving and restoring › What a saved game holds, Values passed on to other routines › The routines, The inventory, The item types, Saved games (SAV), Item kinds, Anomalies and bugs
DS:0xcc32 — Item in use
- Layout: word
- Role: The item being used while
using an inventory item dispatches block event
0x100. - Used by: Item properties in conditions › Which item is tested, Events that start scripts, Level 9: reference tables › The will-o'-wisp guards
DS:0xd1c8, DS:0xe5a0 — ITEM.DAT counts
- Layout: words
- Role: Number of item records and of item names loaded from
ITEM.DAT. Neither is compared with the capacity of its table; see loadITEM.DAT. - Used by: Initial items (ITEM.DAT) › Reading the file
DS:0x5540 — Defense slot list
- Layout: 4 signed bytes, {17, 0, 1, 18} (file offset
0x338a0) - Role: The inventory slots read by the defense recomputation: body armour, the two hands, bracers. The helmet slot, 19, is not among them.
- Used by: What worn items change › Defense and rings, What worn items change, Anomalies and bugs
DS:0x2127, DS:0x215d, DS:0x3702 — Inventory page layout
- Layout: 27 words (x), 27 bytes (y) and 27 bytes (drawing kind: 0
normal, 1 quiver with a count, 2 small ring slot); sizes at
DS:0x371d - Role: Where each inventory slot is drawn on the inventory page.
- Used by: The inventory › Inventory slots
DS:0x3806, DS:0x3829, DS:0x3857 — Inventory messages
- Layout: zero-terminated strings
- Role: "%s can't wear that type of armor.", "%s cannot release the weapon! It is cursed!" and "You can't put that item there.", printed by the placement check; the last one also by the held-item setter and the niche handler.
- Used by: The inventory › Moving and equipping items, Texts
DS:0x3634, DS:0x3661, DS:0x36b6, DS:0x37bb–DS:0x37fd — Item name parts
- Layout: lists of zero-terminated strings stored one after the other,
with no stored length (the ring list at file offset
0x31994) - Role: Ring names (Adornment, Wizardry, Sustenance, Feather Fall and two empty strings), potion names (Giant Strength, Healing, Extra Healing, Poison, Vitality, Speed, Invisibility, Cure Poison, empty) and wand names (Stick, Lightning, Frost, Curing, Fireball, Starfire, Magic Missile, Dispel Magic), then the formats "%d Cursed %s", "+%d %s", the labels "Mage Scroll", "Cleric Scroll", "Ring", "Potion", "Wand" and "%s of %s", used by the item name routine. A ring value above 5 reads the potion list: the location of the ring-name bug.
- Used by: Items › Item names, Items, The item types, Texts, Anomalies and bugs
DS:0x3720 — Potion messages
- Layout: 8 consecutive zero-terminated strings, read by the nth-string routine
- Role: The end of "name feels …!" for potion values 0 to 7, used by drink a potion; a larger value reads past the list.
- Used by: Potions, scrolls and wands › Potions, Texts
DS:0x377e — Wand spell table
- Layout: 8 signed bytes
- Role: Spell definition cast by a wand of each value: 0, 17, 23, 49, 13, −1, 4, 12; value 0 is refused and value 5 is replaced by definition 64 before the table is read (use a wand). A value of 8 or more reads past the table.
- Used by: Potions, scrolls and wands, The item types
DS:0x3786 — Horn messages
- Layout: 4 far pointers to strings at
DS:0x38b7,0x38df,0x3904and0x392c - Role: The message of a horn of value 1 to 4 (blow a horn); value 0 reads the four bytes before the table, those of the wand spell table.
- Used by: Using items › Food and other uses, The item types, Texts
DS:0x5531 — Launcher ammunition
- Layout: one byte per item type
- Status: the byte is read only for item types of kind 3, which in the original data are types 7 and 14; bytes 8–13 are 255 (no ammunition); where the table ends is unknown, and the first seven bytes are bytes 1 to 7 of the party-hit character table.
- Role: The item type of the ammunition of a launcher type: 16, arrows, for type 7; 18, rocks, for type 14. The launcher routine treats 16 specially: hands, then the quiver.
- Used by: On the floor and in the air › Throwing and launching items, Item types
DS:0x2342 — Launch and drop positions
- Layout: 4 × 4 signed bytes, indexed by direction and zone or row
- Role: The same values as the floor position table: for each direction, entries 0 and 1 are the front-left and front-right positions of a block, 2 and 3 the back ones. Used by the throw buttons and the keyboard take (by zone), by thrown weapons and launchers (by row: character slots 0–1 → entries 0–1, slots 2–5 → entries 2–3), and for a random front position (entries 0–1) when an item is put in the party's block by a script, a removed character or the held-item setter.
- Used by: On the floor and in the air › Throwing and launching items, Recruiting and dismissing characters, Create an item
DS:0x3598, DS:0x35a0, DS:0x35a6 — Keyboard item positions
- Layout: 4 × 2 bytes; 6 bytes; 4 words
- Role:
0x3598gives, per direction, the front-left and front-right positions of the party's block (0 1, 1 3, 3 2, 2 0);0x35a0the side of each character slot (0 1 0 1 0 1). The keyboard drop and throw use them.0x35a6(0, 0, 1, 1) tells the keyboard take which zones are in the block ahead. - Used by: