Skip to main content

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.

OffsetTypeFieldMeaning
0u8opcode0xe7
1u16leblockBlock of the current level whose items are identified.

Behavior​

  1. If block is the party's current block, then for each character with CHARACTER_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.
  2. In every case, the item chain of block is 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.

Sources​

Footnotes​

  1. Handler for 0xe7, the chain identification routine, the item insertion, the party block, the characters and the item records. Comparative source: oeob_identifyItems in REF-SCUMM-003. Usage comes from decoding the scripts reachable in the 16 reference INF files. ↩