The following is a list of instructions opcodes used by Yoda Stories.

TODO: Check if Indy uses the same opcodes

OpcodeName# of argumentsDescription
0x000PlaceTile4Place tile arg_3 at arg_0xarg_1xarg_2. To remove a tile the id -1 is used.
0x001RemoveTile3Remove tile at arg_0xarg_1xarg_2
0x002MoveTile5Move Tile at arg_0xarg_0xarg_2 to arg_3xarg_4xarg_2. Note that this can not be used to move tiles between layers!
0x004SpeakHero0Show speech bubble next to hero. Uses text attribute.
0x005SpeakNpc2Show speech bubble at arg_0xarg_1. Uses text attribute. The characters ¢ and ¥ are used as placeholders for provided and required items of the current zone, respectively.
0x006SetTileNeedsDisplay2Redraw tile at arg_0xarg_1
0x007SetRectNeedsDisplay4Redraw the part of the current scene, specified by a rectangle positioned at arg_0xarg_1 with width arg_2 and height arg_3.
0x008Wait0Pause script execution for one tick.
0x009Redraw0Redraw the whole scene immediately
0x00aPlaySound1Play sound specified by arg_0
0x00bStopSound0Stop playing sounds. _TODO: check if only music need to be stopped`
0x00cRollDice1Set current zone's random to a random value between 1 and arg_0.
0x00dSetCounter1Set current zone's counter value to a arg_0
0x00eAddToCounter1Add arg_0 to current zone's counter value
0x00fSetVariable4Set variable identified by arg_0arg_1arg_2 to arg_3. Internally this is implemented as opcode 0x00, setting tile at arg_0xarg_1xarg_2 to arg_3.
0x010HideHero0Hide hero
0x011ShowHero0Show hero
0x012MoveHeroTo2Set hero's position to arg_0xarg_1 ignoring impassable tiles. Execute hotspot actions, redraw the current scene and move camera if the hero is not hidden.
0x014DisableAction0Disable current action
0x015EnableHotspot1Enable hotspot arg_0
0x016DisableHotspot1Disable hotspot arg_0
0x017EnableMonster1Enable monster arg_0
0x018DisableMonster1Disable monster arg_0
0x019EnableAllMonsters0Enable all monsters
0x01aDisableAllMonsters0Disable all monsters
0x01bDropItem3Drops item arg_0 for pickup at arg_1xarg_2. If the item is -1, it drops the current sector's find item. instead
0x01cAddItem1Add item with id arg_0 to inventory
0x01dRemoveItem1Remove one instance of item arg_0 from the inventory
0x021ChangeZone3Change current zone to arg_0. Hero will be placed at arg_1xarg_2 in the new zone.
0x022SetSectorCounter1Set current zone's sector-counter value to a arg_0
0x023AddToSectorCounter1Add arg_0 to current zone's sector-counter value
0x024SetRandom1Set current zone's random value to a arg_0
0x025AddHealth1Increase hero's health by arg_0. New health is capped at hero's max health (0x300).