Skip to main content

Item creation overrides

ScriptItemOverrideFlags · 1 byte, operand of Create an item

Scripts · Virtual machine

A created item is a copy of an existing one. These combinable bits let the script replace some of the copy's properties: each set bit adds one byte to the instruction, in the order of the bits below.1

Other bits are unknown.

typedef enum ScriptItemOverrideFlags {
SCRIPT_ITEM_OVERRIDE_VALUE = 0x01, /* A byte follows: the new value byte. */
SCRIPT_ITEM_OVERRIDE_FLAGS = 0x02, /* A byte follows: the new ItemRuntimeFlags byte. */
SCRIPT_ITEM_OVERRIDE_ICON = 0x04 /* A byte follows: the new icon byte. */
} ScriptItemOverrideFlags;

The overridden fields belong to ItemRuntime; the flags byte written by SCRIPT_ITEM_OVERRIDE_FLAGS is described in item state flags.

Sources​

Locations refer to the game executable reference.

Footnotes​

  1. Create an item handler. Comparative source: oeob_createItem_v2 in REF-SCUMM-003. ↩