Identify items
SCRIPT_IDENTIFY_ITEMS · opcode 0xe7 · 3 bytes
Script virtual machine · Opcode list · Scripted item identification
Marks as identified the items lying in a block and, when the party stands in that block, the items it carries. No reference script uses this instruction.
Encoding
Offsets count from the opcode byte. Words are little-endian.
| Offset | Type | Field | Meaning |
|---|---|---|---|
| 0 | u8 | opcode | 0xe7 |
| 1 | u16le | block | Block of the current level whose items are identified. |
Behavior
- If
blockis the party's current block, then for each character withCHARACTER_STATUS_PRESENT, dead or alive, the items of its 27 inventory slots are marked, then the arrows of the quiver chain that starts at slot 16. - In every case, the item chain of
blockis followed and each item in it is marked, whatever its position: on the floor, in a niche or in flight.
Marking sets ITEM_RUNTIME_IDENTIFIED of
ItemRuntimeFlags in the item's
ItemRuntime. A chain is followed from
its head until it comes back to it; the chains the game builds are circular,
so the walk ends.1
The item held on the mouse pointer is not marked. The instruction does
nothing else: no message, no sound and no redraw. An
identified item shows its second name
the next time its name is displayed. The other ways an item becomes
identified, such as Improved Identify, are listed under
ItemRuntimeFlags.