List of Opcodes: Difference between revisions

From SkyTemple
Tags: Mobile edit Mobile web edit
→‎Types of parameters: Add some documentation about bitfields
(53 intermediate revisions by 4 users not shown)
Line 2: Line 2:


This article documents the different opcodes, their purpose and parameters. The purpose of unkX parameters is unknown.
This article documents the different opcodes, their purpose and parameters. The purpose of unkX parameters is unknown.
== What is an opcode? ==
An opcode is an instruction to the machine (it tells the machine to 'do' something). In modern programming, it would be most similar to a [https://en.wikipedia.org/wiki/Function_(computer_programming) function]. For a more technical description, see [https://en.wikipedia.org/wiki/Opcode here].
== Types of parameters ==
* uint: An unsigned integer (a number without decimals). It cannot be negative. It is possible that in the game's code, there are only signed integers and no unsigned integers, but not enough research has been done on the matter. For the most part, it shouldn't matter.
* sint: A signed integer (a number without decimals). It can be either positive or negative.
* bitfield: A bitfield is uint where each bits (0 or 1) are treated independantly. They are used to store multiple binary (boolean) values efficiently. Opcodes that use it usually come in the <code>Set</code> and <code>Reset</code> variant. The <code>Set</code> variant define to true the values which are 1 in the input bitfield (while leaving the others untouched), and <code>Reset</code> define to false the values which are 1 in the input bitfield (while also leaving the others untouched).
* String: Text (i.e dialogue). There should always be a quotation mark (") at the beginning and end.
* ConstString: Same as String.
* Routine: Any of the 701 coroutines from [[Unionall]]. Always begins with "CORO_"
* Entity: An actor, performer. (not an object!)
* Object: An object in a scene. (not an actor or perfomer!)
* Level: Any level from the [[Script Engine|Level List]]. Will always begin with "LEVEL_".
* Bgm: Any music in the game. Will always begin with "BGM_". (example: BGM_CRAGGY_COAST)
* PositionMark: A position. Will be written as "Position<'MarkName', x, y>". Once a position mark is written in a script, SkyTemple will show an option to place it visually in the scene.
* Face: A portrait expression. Will always begin with "FACE_". (examples: FACE_NORMAL, FACE_HAPPY, FACE_PAIN)
* FaceMode: A portrait position. Will always begin with "FACE_MODE_".
* Direction: A direction for an entity to move in or turn to. Will always begin with "DIR_". (examples: DIR_UP, DIR_RIGHT)
* ProcessSpecial: One of the games special processes. Can be referred to by its number, or name.
* Effect: A graphical effect.
* GameVar: Any of the game's [[List of Script Variables|Script Variables]]. Will always begin with "$".


== Relevant Opcodes ==
== Relevant Opcodes ==
Line 97: Line 119:
|-
|-
|1
|1
|sint
|sint16
|speed0
|speed0
|The speed to scroll either:
|The speed to scroll either:
Line 107: Line 129:
|-
|-
|2
|2
|sint
|sint16
|speed1
|speed1
|The speed to scroll either:
|The speed to scroll either:
Line 191: Line 213:
|1
|1
|uint
|uint
|duration
|effect
|The number of frames used to play a given effect.
|
* Transitions from Layer 2 to Layer 1.
* Fades in Layer 1 from total darkness.
* Transitions from Layer 2 to Layer 1.
* Fades in Layer 1 from total darkness.
* Transitions from Layer 1 to Layer 2.
* Fades out Layer 1 to total darkness.
* Merges Layer 1 onto Layer 2, but fades in Layer 1 from total darkness.
* Fades in Layer 1 from total darkness.
* Merges Layer onto Layer 2, but fades out Layer 1 to total darkness.
* Fades out Layer 1 to total darkness.
|-
|-
|2
|2
|uint
|uint
|effect
|duration
|
|The number of frames used to play a given effect.
# Transitions from Layer 2 to Layer 1.
 
# Fades in Layer 1 from total darkness.
# Transitions from Layer 2 to Layer 1.
# Fades in Layer 1 from total darkness.
# Transitions from Layer 1 to Layer 2.
# Fades out Layer 1 to total darkness.
# Merges Layer 1 onto Layer 2, but fades in Layer 1 from total darkness.
# Fades in Layer 1 from total darkness.
# Merges Layer onto Layer 2, but fades out Layer 1 to total darkness.
# Fades out Layer 1 to total darkness.
|}
|}
=== 0x8 - back_SetDungeonBanner ===
=== 0x8 - back_SetDungeonBanner ===
Line 429: Line 452:
|1
|1
|uint
|uint
|effect
|effect_id
|
|
# The default state of the Animation Palette.
# The default state of the Animation Palette.
Line 534: Line 557:
|1
|1
|uint
|uint
|duration
|effect
|The number of frames used to play a given effect.
|
* Transitions from Layer 2 to Layer 1.
* Fades in Layer 1 from total darkness.
* Transitions from Layer 2 to Layer 1.
* Fades in Layer 1 from total darkness.
* Transitions from Layer 1 to Layer 2.
* Fades out Layer 1 to total darkness.
* Merges Layer 1 onto Layer 2, but fades in Layer 1 from total darkness.
* Fades in Layer 1 from total darkness.
* Merges Layer onto Layer 2, but fades out Layer 1 to total darkness.
* Fades out Layer 1 to total darkness.
|-
|-
|2
|2
|uint
|uint
|effect
|duration
|
|The number of frames used to play a given effect.
# Transitions from Layer 2 to Layer 1.
 
# Fades in Layer 1 from total darkness.
 
# Transitions from Layer 2 to Layer 1.
 
# Fades in Layer 1 from total darkness.
# Transitions from Layer 1 to Layer 2.
# Fades out Layer 1 to total darkness.
# Merges Layer 1 onto Layer 2, but fades in Layer 1 from total darkness.
# Fades in Layer 1 from total darkness.
# Merges Layer onto Layer 2, but fades out Layer 1 to total darkness.
# Fades out Layer 1 to total darkness.
|}
|}
=== 0x17 - back2_SetGround ===
=== 0x17 - back2_SetGround ===
Line 883: Line 909:
|-
|-
|1
|1
|Coroutine
|Routine
|coro_id
|coro_id
|One of the 701 possible Unionall Coroutines.
|One of the 701 possible Unionall Coroutines.
Line 1,598: Line 1,624:
|-
|-
|1
|1
|Coroutine
|Routine
|coro_id
|coro_id
|One of the 701 possible Unionall Coroutines.
|One of the 701 possible Unionall Coroutines.
Line 1,845: Line 1,871:
|-
|-
|1
|1
|Coroutine
|Routine
|coro_id
|coro_id
|One of the 701 possible Unionall Coroutines.
|One of the 701 possible Unionall Coroutines.
Line 1,908: Line 1,934:
|}
|}
=== 0x8d - main_EnterDungeon ===
=== 0x8d - main_EnterDungeon ===
Exits ground mode and begins dungeon mode at a specific dungeon.
Attempts to exit ground mode and begins dungeon mode at a specific dungeon.
 
If attempting to run this opcode before selecting any option from the Top Menu, the game will not enter any dungeon and instead attempt to load a DEMO Unionall coroutine or the Top Menu.


{| class="wikitable"
{| class="wikitable"
Line 2,511: Line 2,539:
|}
|}
=== 0xb1 - Move2PositionMark ===
=== 0xb1 - Move2PositionMark ===
Moves an entity (i.e., an actor, object, or performer) to a Position Mark without restricting the angles used.
Moves an entity (i.e., an actor, object, or performer) to one or more Position Marks without restricting the angles used.


This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.
Line 2,534: Line 2,562:
This parameter may be repeated multiple times.
This parameter may be repeated multiple times.
|}
|}
=== 0xb2 - Move2PositionMark ===
=== 0xb2 - Move2PositionMark ===
Moves an entity (i.e., an actor, object, or performer) to a Position Mark without restricting the angles used.
Moves an entity (i.e., an actor, object, or performer) to a Position Mark without restricting the angles used.
Line 3,307: Line 3,336:
|-
|-
|1
|1
|uint
|bitfield
|function_bitfield
|function_bitfield
|Most bits' purposes are unknown. Bit 1 appears to be the bit used for allowing an entity to follow a Type 1 actor, like the actor ACTOR_ATTENDANT1 in the overworld.
|Most bits' purposes are unknown. Bit 1 appears to be the bit used for allowing an entity to follow a Type 1 actor, like the actor ACTOR_ATTENDANT1 in the overworld.
Line 3,323: Line 3,352:
|-
|-
|1
|1
|uint
|bitfield
|hit_bitfield
|hit_bitfield
|Most bits' purposes are unknown.
|Most bits' purposes are unknown.
Line 3,343: Line 3,372:
|-
|-
|1
|1
|uint
|bitfield
|output_bitfield
|output_bitfield
|
|
Line 3,367: Line 3,396:
|-
|-
|1
|1
|uint
|bitfield
|reply_bitfield
|reply_bitfield
|Most bits' purposes are unknown.
|Most bits' purposes are unknown.
Line 3,433: Line 3,462:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true.
Line 3,472: Line 3,501:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
Line 3,515: Line 3,544:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
Line 3,536: Line 3,565:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
Line 3,561: Line 3,590:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
Line 3,582: Line 3,611:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
Line 3,653: Line 3,682:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
Line 3,705: Line 3,734:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
Line 3,761: Line 3,790:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true.
Line 3,800: Line 3,829:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
Line 3,885: Line 3,914:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
Line 3,906: Line 3,935:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
Line 3,927: Line 3,956:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true.
Line 3,997: Line 4,026:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
Line 4,039: Line 4,068:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
Line 4,132: Line 4,161:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
Line 4,184: Line 4,213:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
Line 4,236: Line 4,265:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
Line 4,348: Line 4,377:
|-
|-
|1
|1
|bool
|uint
|suspension_flag
|suspension_flag
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
Line 4,696: Line 4,725:
|-
|-
|1
|1
|uint
|bitfield
|unk0
|unk0
|
|
Line 4,728: Line 4,757:
|-
|-
|1
|1
|uint
|bitfield
|unk0
|unk0
|
|
Line 4,770: Line 4,799:
|-
|-
|1
|1
|uint
|bitfield
|unk0
|unk0
|
|
Line 4,885: Line 4,914:
|-
|-
|1
|1
|uint
|bitfield
|unk0
|unk0
|
|
Line 4,965: Line 4,994:


=== 0x112 - Slide2PositionMark ===
=== 0x112 - Slide2PositionMark ===
Moves an entity (i.e., an actor, object, or performer) to a Position Mark without animation, and without restricting the angles used.
Moves an entity (i.e., an actor, object, or performer) to one or more Position Marks without animation, and without restricting the angles used.


This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.
Line 4,990: Line 5,019:


=== 0x113 - Slide2PositionMark ===
=== 0x113 - Slide2PositionMark ===
<TO DO: Opcode description>
Moves an entity (i.e., an actor, object, or performer) to a Position Mark without animation, and without restricting the angles used.
 
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.


{| class="wikitable"
{| class="wikitable"
Line 5,002: Line 5,033:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement. Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|PositionMark
|PositionMark
|pos_mark
|pos_mark
|
|A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.
|}
|}
=== 0x114 - Slide2PositionOffset ===
=== 0x114 - Slide2PositionOffset ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 5,048: Line 5,080:
|1
|1
|uint
|uint
|unk0
|speed
|
|
|-
|-
Line 5,074: Line 5,106:
|1
|1
|uint
|uint
|unk0
|speed
|
|
|-
|-
Line 5,100: Line 5,132:
|1
|1
|uint
|uint
|unk0
|speed
|
|
|-
|-
Line 5,126: Line 5,158:
|1
|1
|uint
|uint
|unk0
|speed
|
|
|-
|-
|2
|2
|uint
|uint
|unk1
|actor_id
|
|
|}
|}
Line 5,168: Line 5,200:
|1
|1
|uint
|uint
|unk0
|speed
|
|
|-
|-
Line 5,189: Line 5,221:
|1
|1
|uint
|uint
|unk0
|num_parameters
|
|
|-
|-
Line 5,214: Line 5,246:
|1
|1
|uint
|uint
|unk0
|speed
|
|
|-
|-
Line 5,240: Line 5,272:
|1
|1
|uint
|uint
|unk0
|speed
|
|
|-
|-
Line 5,457: Line 5,489:
|1
|1
|uint
|uint
|unk0
|speed
|
|
|-
|-
Line 5,495: Line 5,527:
No parameters.
No parameters.
=== 0x12a - supervision_Acting ===
=== 0x12a - supervision_Acting ===
<TO DO: Opcode description>
Loads a sector of the Acting scene.


{| class="wikitable"
{| class="wikitable"
Line 5,508: Line 5,540:
|uint
|uint
|layer_id
|layer_id
|
|The ID of the sector to load.
|}
|}
=== 0x12b - supervision_ActingInvisible ===
=== 0x12b - supervision_ActingInvisible ===
<TO DO: Opcode description>
Loads a sector of the Acting scene. Actors and objects in this sector will be invisible.


{| class="wikitable"
{| class="wikitable"
Line 5,524: Line 5,557:
|uint
|uint
|layer_id
|layer_id
|
|The ID of the sector to load.
|}
|}
=== 0x12c - supervision_ExecuteActing ===
=== 0x12c - supervision_ExecuteActing ===
<TO DO: Opcode description>
Loads a specified Acting script from the specified level from within Enter/Acting/Sub scripts.


{| class="wikitable"
{| class="wikitable"
Line 5,552: Line 5,586:
|
|
|}
|}
=== 0x12d - supervision_ExecuteActingSub ===
=== 0x12d - supervision_ExecuteActingSub ===
<TO DO: Opcode description>
Loads a specified Acting script from the specified level from within Unionall


{| class="wikitable"
{| class="wikitable"
Line 5,578: Line 5,613:
|
|
|}
|}
=== 0x12e - supervision_ExecuteCommon ===
=== 0x12e - supervision_ExecuteCommon ===
<TO DO: Opcode description>
Loads a specified Unionall coroutine from within Enter/Acting/Sub scripts.


{| class="wikitable"
{| class="wikitable"
Line 5,594: Line 5,630:
|
|
|}
|}
=== 0x12f - supervision_ExecuteEnter ===
=== 0x12f - supervision_ExecuteEnter ===
<TO DO: Opcode description>
Loads an Enter script from the specified level.


{| class="wikitable"
{| class="wikitable"
Line 5,607: Line 5,644:
|1
|1
|uint
|uint
|unk0
|level_id
|
|An entry in the Level list.
|}
|}
=== 0x130 - supervision_ExecuteStation ===
=== 0x130 - supervision_ExecuteStation ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 5,705: Line 5,743:
|}
|}
=== 0x134 - supervision_ExecuteExport ===
=== 0x134 - supervision_ExecuteExport ===
<TO DO: Opcode description>
Loads a specified Acting scene of the level S00P01A


{| class="wikitable"
{| class="wikitable"
Line 5,717: Line 5,755:
|1
|1
|ConstString
|ConstString
|const
|script_id
|
|
|}
|}
=== 0x135 - supervision_ExecuteExportSub ===
=== 0x135 - supervision_ExecuteExportSub ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 5,758: Line 5,797:
|}
|}
=== 0x137 - supervision_Remove ===
=== 0x137 - supervision_Remove ===
<TO DO: Opcode description>
Unloads a sector of the Sub scene.


{| class="wikitable"
{| class="wikitable"
Line 5,770: Line 5,809:
|1
|1
|uint
|uint
|unk0
|layer_id
|
|The ID of the sector to unload.
|}
|}
=== 0x138 - supervision_RemoveActing ===
=== 0x138 - supervision_RemoveActing ===
<TO DO: Opcode description>
Unloads a sector of the Acting scene.


{| class="wikitable"
{| class="wikitable"
Line 5,787: Line 5,827:
|uint
|uint
|layer_id
|layer_id
|
|The ID of the sector to unload.
|}
|}
=== 0x139 - supervision_RemoveCommon ===
=== 0x139 - supervision_RemoveCommon ===
<TO DO: Opcode description>
Unloads a sector of the Enter scene.


{| class="wikitable"
{| class="wikitable"
Line 5,802: Line 5,843:
|1
|1
|uint
|uint
|unk0
|layer_id
|
|The ID of the sector to unload.
|}
|}
=== 0x13a - supervision_SpecialActing ===
=== 0x13a - supervision_SpecialActing ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 5,908: Line 5,950:
|}
|}
=== 0x14c - Turn2Direction ===
=== 0x14c - Turn2Direction ===
<TO DO: Opcode description>
Makes an actor rotate to a specified direction.
 
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.


{| class="wikitable"
{| class="wikitable"
Line 5,920: Line 5,964:
|1
|1
|uint
|uint
|unk0
|speed
|
|How fast the actor turns. The higher the number, the slower the turn.
|-
|-
|2
|2
|uint
|uint
|unk1
|rotationdirection
|
|The way that the actor will turn to face the specified direction. 1 = clockwise, 2 = counterclockwise, 10 = the most efficient direction to turn.
|-
|-
|3
|3
|Direction
|Direction
|direction
|direction
|
|The direction that the actor will turn to face.
|}
|}
=== 0x14d - Turn2DirectionLives ===
=== 0x14d - Turn2DirectionLives ===
<TO DO: Opcode description>
Makes an actor rotate to face another actor. Must be used in a with-statement or a targeted routine.


{| class="wikitable"
{| class="wikitable"
Line 5,946: Line 5,991:
|1
|1
|uint
|uint
|unk0
|speed
|
|How fast the actor turns. The higher the number, the slower the turn.
|-
|-
|2
|2
|uint
|uint
|unk1
|rotationdirection
|
|The way that the actor will turn to face the specified direction. 1 = clockwise, 2 = counterclockwise, 10 = the most efficient direction to turn.
|-
|-
|3
|3
|Entity
|Entity
|actor_id
|actor_id
|
|The target actor that the actor will turn to face.
|}
|}
=== 0x14e - Turn2DirectionLives2 ===
=== 0x14e - Turn2DirectionLives2 ===
<TO DO: Opcode description>
Makes an actor rotate to face another actor. Must be used in a with-statement or a targeted routine.


{| class="wikitable"
{| class="wikitable"
Line 5,972: Line 6,018:
|1
|1
|uint
|uint
|unk0
|speed
|
|How fast the actor turns. The higher the number, the slower the turn.
|-
|-
|2
|2
|uint
|uint
|unk1
|rotationdirection
|
|The way that the actor will turn to face the specified direction. 1 = clockwise, 2 = counterclockwise, 10 = the most efficient direction to turn.
|-
|-
|3
|3
|uint
|uint
|unk2
|actor_id
|
|ID of the target actor from Level List that the actor will turn to face.
|}
|}
=== 0x14f - Turn2DirectionMark ===
=== 0x14f - Turn2DirectionMark ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 6,022: Line 6,069:
|}
|}
=== 0x150 - Turn2DirectionTurn ===
=== 0x150 - Turn2DirectionTurn ===
<TO DO: Opcode description>
Makes an actor turn at a certain angle.
 
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.


{| class="wikitable"
{| class="wikitable"
Line 6,034: Line 6,083:
|1
|1
|uint
|uint
|unk0
|speed
|
|How fast the actor turns. The higher the number, the slower the turn.
|-
|-
|2
|2
|uint
|uint
|unk1
|rotationdirection
|
|The way that the actor will turn to face the specified direction. 1 = clockwise, 2 = counterclockwise, 10 = the most efficient direction to turn.
|-
|-
|3
|3
|uint
|uint
|unk2
|angle
|
|1: 45 degrees left, 2: 45 degrees right, 3: 90 degrees right, 4: 90 degrees left, 5: 180 degrees
|}
|}
=== 0x151 - Turn3 ===
=== 0x151 - Turn3 ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 6,196: Line 6,246:


=== 0x159 - WaitBackEffect ===
=== 0x159 - WaitBackEffect ===
<TO DO: Opcode description>
Pauses the current routine until [[List of Opcodes#0x2 - back SetBackEffect|back_SetBackEffect]] is called.


No parameters.
No parameters.
=== 0x15a - WaitBack2Effect ===
=== 0x15a - WaitBack2Effect ===
<TO DO: Opcode description>
Pauses the current routine until [[List of Opcodes#0x12 - back2 SetBackEffect|back2_SetBackEffect]] is called.


No parameters.
No parameters.
=== 0x15b - WaitBgm ===
=== 0x15b - WaitBgm ===
<TO DO: Opcode description>
Pauses the current routine until the specified BGM on the first BGM track has ended. After the BGM ends, the routine will resume.


{| class="wikitable"
{| class="wikitable"
Line 6,217: Line 6,268:
|Bgm
|Bgm
|bgm_id
|bgm_id
|
|A non-looped music track defined in SOUND/BGM of the ROM. Looped music tracks softlocks the game.
|}
|}
=== 0x15c - WaitBgm2 ===
=== 0x15c - WaitBgm2 ===
<TO DO: Opcode description>
Pauses the current routine until the specified BGM on the second BGM track has ended. After the BGM ends, the routine will resume.


{| class="wikitable"
{| class="wikitable"
Line 6,233: Line 6,285:
|Bgm
|Bgm
|bgm_id
|bgm_id
|
|A non-looped music track defined in SOUND/BGM of the ROM. Looped music tracks softlocks the game.
|}
|}
=== 0x15d - WaitBgmSignal ===
=== 0x15d - WaitBgmSignal ===
<TO DO: Opcode description>
Pauses the routine until a DSE event with ID 0xF6 on the current BGM track is triggered. This can be used to sync certain parts of the scene to the background music.


No parameters.
No parameters.
Line 6,249: Line 6,302:
No parameters.
No parameters.
=== 0x160 - WaitExecuteLives ===
=== 0x160 - WaitExecuteLives ===
<TO DO: Opcode description>
Pauses the routine until the specified actor has finished its action (Move2Position, Slide2Position, etc.). After the actor finishes its action, the routine will resume.


{| class="wikitable"
{| class="wikitable"
Line 6,262: Line 6,315:
|Entity
|Entity
|actor_id
|actor_id
|
|The actor that the routine will wait for.
|}
|}
=== 0x161 - WaitExecuteObject ===
=== 0x161 - WaitExecuteObject ===
<TO DO: Opcode description>
Pauses the current routine until the specified object has finished its action (Move2Position, Slide2Position, etc.). After the object finishes its action, the routine will resume.


{| class="wikitable"
{| class="wikitable"
Line 6,278: Line 6,332:
|Object
|Object
|object_id
|object_id
|
|The ID of the object that the routine will wait for.
|}
|}
=== 0x162 - WaitExecutePerformer ===
=== 0x162 - WaitExecutePerformer ===
Pauses the current routine until the specified performer has finished its current action (Move2Position, Slide2Position, etc.) After the performer has finished its action, the routine will resume.
Pauses the current routine until the specified performer has finished its current action (Move2Position, Slide2Position, etc.) After the performer has finished its action, the routine will resume.
Line 6,298: Line 6,353:


=== 0x163 - WaitFadeIn ===
=== 0x163 - WaitFadeIn ===
<TO DO: Opcode description>
Pauses the current routine and waits for the screen to fade in. After the screen fades in, the routine will resume.


No parameters.
No parameters.
=== 0x164 - WaitLockLives ===
=== 0x164 - WaitLockLives ===
<TO DO: Opcode description>
Pauses the current routine until a [[List of Opcodes#0x8b - Lock|Lock]] opcode with the specified ''lock_id'' is reached in the specified actor's targeted routine. After the lock is reached, the routine will resume.


{| class="wikitable"
{| class="wikitable"
Line 6,322: Line 6,378:
|
|
|}
|}
=== 0x165 - WaitLockObject ===
=== 0x165 - WaitLockObject ===
<TO DO: Opcode description>
Pauses the current routine until a [[List of Opcodes#0x8b - Lock|Lock]] opcode with the specified ''lock_id'' is reached in the specified object's targeted routine. After the lock is reached, the routine will resume.


{| class="wikitable"
{| class="wikitable"
Line 6,343: Line 6,400:
|
|
|}
|}
=== 0x166 - WaitLockPerformer ===
=== 0x166 - WaitLockPerformer ===
<TO DO: Opcode description>
Pauses the current routine until a [[List of Opcodes#0x8b - Lock|Lock]] opcode with the specified ''lock_id'' is reached in the specified performer's targeted routine. After the lock is reached, the routine will resume.


{| class="wikitable"
{| class="wikitable"
Line 6,364: Line 6,422:
|
|
|}
|}
=== 0x167 - WaitLockSupervision ===
=== 0x167 - WaitLockSupervision ===
<TO DO: Opcode description>
Pauses the current routine until a [[List of Opcodes#0x8b - Lock|Lock]] opcode with the specified ''lock_id'' is reached in <code>def 0</code>. After the lock is reached, the routine will resume.


{| class="wikitable"
{| class="wikitable"
Line 6,377: Line 6,436:
|1
|1
|uint
|uint
|unk0
|lock_id
|
|
|}
|}
=== 0x168 - WaitMe ===
=== 0x168 - WaitMe ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 6,405: Line 6,465:
No parameters.
No parameters.
=== 0x16b - WaitRandom ===
=== 0x16b - WaitRandom ===
<TO DO: Opcode description>
Pauses the routine for a random number of frames. After the number of frames, the routine will resume.


{| class="wikitable"
{| class="wikitable"
Line 6,417: Line 6,477:
|1
|1
|uint
|uint
|unk0
|duration_min
|
|Minimum number of frames that the routine will wait for before resuming.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration_max
|
|Maximum number of frames that the routine will wait for before resuming.
|}
|}
=== 0x16c - WaitScreenFade ===
=== 0x16c - WaitScreenFade ===
<TO DO: Opcode description>
Waits until screen_FadeIn finishes executing.


No parameters.
No parameters.
=== 0x16d - WaitScreenFadeAll ===
=== 0x16d - WaitScreenFadeAll ===
<TO DO: Opcode description>
Waits until screen_FadeInAll finishes executing.


No parameters.
No parameters.
=== 0x16e - WaitScreen2Fade ===
=== 0x16e - WaitScreen2Fade ===
<TO DO: Opcode description>
Waits until screen2_FadeIn finishes executing.


No parameters.
No parameters.
=== 0x16f - WaitSe ===
=== 0x16f - WaitSe ===
<TO DO: Opcode description>
Pauses the current routine until the specified sound effect has ended. After the sound effect ends, the routine will resume.


{| class="wikitable"
{| class="wikitable"
Line 6,451: Line 6,512:
|uint
|uint
|se_id
|se_id
|
|The ID of the sound to wait for the end of before resuming the routine.
|}
|}
=== 0x170 - WaitSpecialActing ===
=== 0x170 - WaitSpecialActing ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 6,466: Line 6,528:
No parameters.
No parameters.
=== 0x173 - worldmap_BlinkMark ===
=== 0x173 - worldmap_BlinkMark ===
<TO DO: Opcode description>
Shows a blinking world map marker.


{| class="wikitable"
{| class="wikitable"
Line 6,478: Line 6,540:
|1
|1
|uint
|uint
|unk0
|world_map_marker_id
|
|
|}
|}
=== 0x174 - worldmap_ChangeLevel ===
=== 0x174 - worldmap_ChangeLevel ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 6,498: Line 6,561:
|}
|}
=== 0x175 - worldmap_DeleteArrow ===
=== 0x175 - worldmap_DeleteArrow ===
<TO DO: Opcode description>
Remove the yellow arrow from the world map.


No parameters.
No parameters.
=== 0x176 - worldmap_MoveCamera ===
=== 0x176 - worldmap_MoveCamera ===
<TO DO: Opcode description>
Moves the camera to the specified world map marker.


{| class="wikitable"
{| class="wikitable"
Line 6,514: Line 6,578:
|1
|1
|uint
|uint
|unk0
|world_map_marker_id
|
|
|}
|}
=== 0x177 - worldmap_OffMessage ===
=== 0x177 - worldmap_OffMessage ===
<TO DO: Opcode description>
Removes a textbox with the world map marker's name from the Top Screen


No parameters.
No parameters.
=== 0x178 - worldmap_SetArrow ===
=== 0x178 - worldmap_SetArrow ===
<TO DO: Opcode description>
Shows an arrow pointing to a specified world map marker


{| class="wikitable"
{| class="wikitable"
Line 6,534: Line 6,600:
|1
|1
|uint
|uint
|unk0
|world_map_marker_id
|
|
|}
|}
=== 0x179 - worldmap_SetCamera ===
=== 0x179 - worldmap_SetCamera ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 6,602: Line 6,669:
|}
|}
=== 0x17d - worldmap_SetMessagePlace ===
=== 0x17d - worldmap_SetMessagePlace ===
<TO DO: Opcode description>
Shows a textbox on the Top Screen with the specified world map marker's name.


{| class="wikitable"
{| class="wikitable"
Line 6,614: Line 6,681:
|1
|1
|uint
|uint
|unk0
|world_map_marker_id
|
|
|}
|}
=== 0x17e - worldmap_SetMode ===
=== 0x17e - worldmap_SetMode ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 6,659: Line 6,727:
|-
|-
|3
|3
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,685: Line 6,753:
|-
|-
|3
|3
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,701: Line 6,769:
|-
|-
|1
|1
|bool
|uint
|param
|param
|
|
|-
|-
|2
|2
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,727: Line 6,795:
|-
|-
|2
|2
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,748: Line 6,816:
|-
|-
|2
|2
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,769: Line 6,837:
|-
|-
|2
|2
|bool
|uint
|value
|value
|
|
|-
|-
|3
|3
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,805: Line 6,873:
|-
|-
|4
|4
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,836: Line 6,904:
|-
|-
|4
|4
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,867: Line 6,935:
|-
|-
|4
|4
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,898: Line 6,966:
|-
|-
|4
|4
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,929: Line 6,997:
|-
|-
|4
|4
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,960: Line 7,028:
|-
|-
|4
|4
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,981: Line 7,049:
|-
|-
|2
|2
|Operator
|uint
|operator
|operator
|
|
Line 6,991: Line 7,059:
|-
|-
|4
|4
|Addr
|uint
|jump_address
|jump_address
|
|
Line 7,012: Line 7,080:
|-
|-
|2
|2
|Operator
|uint
|operator
|operator
|
|
Line 7,022: Line 7,090:
|-
|-
|4
|4
|Addr
|uint
|jump_address
|jump_address
|
|
Line 7,043: Line 7,111:
|-
|-
|2
|2
|Addr
|uint
|jump_address
|jump_address
|
|
Line 7,059: Line 7,127:
|-
|-
|1
|1
|Addr
|uint
|jump_address
|jump_address
|The address to call, e.g., <code>call @label_0;</code> if <code>§label_0;</code> is defined in the script.
|The address to call, e.g., <code>call @label_0;</code> if <code>§label_0;</code> is defined in the script.
Line 7,080: Line 7,148:
|-
|-
|2
|2
|Addr
|uint
|jump_address
|jump_address
|
|
Line 7,101: Line 7,169:
|-
|-
|2
|2
|Addr
|uint
|jump_address
|jump_address
|
|
Line 7,122: Line 7,190:
|-
|-
|2
|2
|Addr
|uint
|jump_address
|jump_address
|
|
Line 7,138: Line 7,206:
|-
|-
|1
|1
|Operator
|uint
|operator
|operator
|
|
Line 7,148: Line 7,216:
|-
|-
|3
|3
|Addr
|uint
|jump_address
|jump_address
|
|
Line 7,185: Line 7,253:
|-
|-
|1
|1
|Operator
|uint
|operator
|operator
|
|
Line 7,195: Line 7,263:
|-
|-
|3
|3
|Addr
|uint
|jump_address
|jump_address
|
|
Line 7,211: Line 7,279:
|-
|-
|1
|1
|Operator
|uint
|operator
|operator
|
|
Line 7,221: Line 7,289:
|-
|-
|3
|3
|Addr
|uint
|jump_address
|jump_address
|
|
Line 7,267: Line 7,335:
|-
|-
|3
|3
|bool
|uint
|value
|value
|
|
Line 7,288: Line 7,356:
|-
|-
|2
|2
|CalcOperator
|uint
|calc_operator
|calc_operator
|
|
Line 7,314: Line 7,382:
|-
|-
|2
|2
|CalcOperator
|uint
|calc_operator
|calc_operator
|
|
Line 7,471: Line 7,539:
|-
|-
|2
|2
|bool
|uint
|value
|value
|
|
Line 7,517: Line 7,585:
|-
|-
|1
|1
|Addr
|uint
|jump_address
|jump_address
|
|
Line 7,869: Line 7,937:
|}
|}
{{NavScriptTerms}}
{{NavScriptTerms}}
[[Category:Documentation]]

Revision as of 17:46, 30 August 2024

The scripting engine used in Explorers of Sky has different opcodes. ExplorerScript translates most of them literally, preserving the same parameters and functionality. However, some opcodes are translated to ExplorerScript constructs, such as if statements.

This article documents the different opcodes, their purpose and parameters. The purpose of unkX parameters is unknown.

What is an opcode?

An opcode is an instruction to the machine (it tells the machine to 'do' something). In modern programming, it would be most similar to a function. For a more technical description, see here.

Types of parameters

  • uint: An unsigned integer (a number without decimals). It cannot be negative. It is possible that in the game's code, there are only signed integers and no unsigned integers, but not enough research has been done on the matter. For the most part, it shouldn't matter.
  • sint: A signed integer (a number without decimals). It can be either positive or negative.
  • bitfield: A bitfield is uint where each bits (0 or 1) are treated independantly. They are used to store multiple binary (boolean) values efficiently. Opcodes that use it usually come in the Set and Reset variant. The Set variant define to true the values which are 1 in the input bitfield (while leaving the others untouched), and Reset define to false the values which are 1 in the input bitfield (while also leaving the others untouched).
  • String: Text (i.e dialogue). There should always be a quotation mark (") at the beginning and end.
  • ConstString: Same as String.
  • Routine: Any of the 701 coroutines from Unionall. Always begins with "CORO_"
  • Entity: An actor, performer. (not an object!)
  • Object: An object in a scene. (not an actor or perfomer!)
  • Level: Any level from the Level List. Will always begin with "LEVEL_".
  • Bgm: Any music in the game. Will always begin with "BGM_". (example: BGM_CRAGGY_COAST)
  • PositionMark: A position. Will be written as "Position<'MarkName', x, y>". Once a position mark is written in a script, SkyTemple will show an option to place it visually in the scene.
  • Face: A portrait expression. Will always begin with "FACE_". (examples: FACE_NORMAL, FACE_HAPPY, FACE_PAIN)
  • FaceMode: A portrait position. Will always begin with "FACE_MODE_".
  • Direction: A direction for an entity to move in or turn to. Will always begin with "DIR_". (examples: DIR_UP, DIR_RIGHT)
  • ProcessSpecial: One of the games special processes. Can be referred to by its number, or name.
  • Effect: A graphical effect.
  • GameVar: Any of the game's Script Variables. Will always begin with "$".

Relevant Opcodes

These opcodes can be directly called from ExplorerScript.

0x0 - Null

Does nothing.

No parameters.

0x1 - back_ChangeGround

Sets the Map Background from a Level without changing the chunks from the currently loaded Map Background. Entities such as actors, objects, and performers will not be deleted when this opcode is executed.

This has very few uses in the game—a notable use is how Wigglytuff's Chamber has its door open, as seen via LEVEL_G01P04A and LEVEL_G01P04A2.

Parameters
# Type Name Description
1 Level level_id An entry in the Level List. This opcode will pull from the Level's Map Background.

0x2 - back_SetBackEffect

Performs various effects related to the currently loaded Animation Palettes.

Parameters
# Type Name Description
1 uint effect
  1. The default state of the Animation Palette.
  2. Plays the Animation Palette in a loop.
  3. Plays the Animation Palette once.
  4. Freezes the Animation Palette at its current frame.
  5. Resumes the Animation Palette.

0x3 - back_SetBackScrollOffset

Shifts the background by a certain number of pixels, without affecting entities such as actors, objects, or performers. Backgrounds used with this opcode will display a "loop" effect, i.e., it has the appearance of scrolling forever.

This opcode seems to only work for only a few Levels, such as LEVEL_P13P01A, LEVEL_S13P06A, and LEVEL_V03P11A.

Parameters
# Type Name Description
1 sint offset0 The number of pixels to shift either:
  • The Map Background's Layer 1 and Layer 2 X-axis.
  • The Map Background's Layer 1 X-axis.

Which one the game performs for a given Level is hardcoded.

2 sint offset1 The number of pixels to shift either:
  • The Map Background's Layer 1 and Layer 2 Y-axis.
  • The Map Background's Layer 2 X-axis.

Which one the game performs for a given Level is hardcoded.

0x4 - back_SetBackScrollSpeed

Continuously scrolls the background at a certain speed, without affecting entities such as actors, objects, or performers. Backgrounds used with this opcode will display a "loop" effect, i.e., it has the appearance of scrolling forever.

This opcode seems to only work for only a few Levels, such as LEVEL_P13P01A, LEVEL_S13P06A, and LEVEL_V03P11A.

Parameters
# Type Name Description
1 sint16 speed0 The speed to scroll either:
  • The Map Background's Layer 1 and Layer 2 X-axis.
  • The Map Background's Layer 1 X-axis.

Which one the game performs for a given Level seems to be hardcoded.

2 sint16 speed1 The speed to scroll either:
  • The Map Background's Layer 1 and Layer 2 Y-axis.
  • The Map Background's Layer 2 X-axis.

Which one the game performs for a given Level seems to be hardcoded.

0x5 - back_SetBanner

Displays broken text using the FONT/banner.bin:FONT/b_pal.bin font, editable in the Misc. Graphics tab of SkyTemple. This opcode will delete any actors, objects, and performers that are currently loaded.

Parameters
# Type Name Description
1 sint chapter_number The chapter number displayed for the banner. A value of -1 will be "Final Chapter".
2 uint unk1 Currently unknown.

0x6 - back_SetBanner2

Displays text using the FONT/banner.bin:FONT/b_pal.bin font, editable in the Misc. Graphics tab of SkyTemple. This opcode is typically used for chapter introductions, which includes chapter text and a subtitle displayed over a Map Background. This opcode will delete any actors, objects, and performers that are currently loaded.

Parameters
# Type Name Description
1 Level level An entry in the Level List. This opcode will pull from the Level's Map Background.
2 uint unk1 Currently unknown. Typically, the game uses 0 for this parameter, but it seems to have no effect.
3 uint x The pixel position the camera will center the Map Background on its X-axis.
4 uint y The pixel position the camera will center the Map Background on its Y-axis.
5 sint chapter_number The chapter number displayed for the banner. A value of -1 will be "Final Chapter".
6 String title The title of the chapter, e.g., "A Storm At Sea" for Chapter 1.

0x7 - back_SetEffect

Performs various effects related to the current Map Background's layers across a certain number of frames.

Parameters
# Type Name Description
1 uint effect
  • Transitions from Layer 2 to Layer 1.
  • Fades in Layer 1 from total darkness.
  • Transitions from Layer 2 to Layer 1.
  • Fades in Layer 1 from total darkness.
  • Transitions from Layer 1 to Layer 2.
  • Fades out Layer 1 to total darkness.
  • Merges Layer 1 onto Layer 2, but fades in Layer 1 from total darkness.
  • Fades in Layer 1 from total darkness.
  • Merges Layer onto Layer 2, but fades out Layer 1 to total darkness.
  • Fades out Layer 1 to total darkness.
2 uint duration The number of frames used to play a given effect.

0x8 - back_SetDungeonBanner

Displays a specific string using the FONT/banner.bin:FONT/b_pal.bin font, editable in the Misc. Graphics tab of SkyTemple. The text chosen is defined in Dungeons tab as a dungeon's back_SetDungeonBanner string. This opcode will delete any actors, objects, and performers that are currently loaded.

Parameters
# Type Name Description
1 uint dungeon_id The ID of a dungeon, as listed in the Dungeons tab of SkyTemple.
2 uint unk1 Currently unknown. Does not seem to affect much.

0x9 - back_SetGround

Sets the Map Background from a Level. Upon using this opcode, the variable $GROUND_MAP will be updated to match the ID of the chosen Level. This opcode will delete any actors, objects, and performers that are currently loaded.

Parameters
# Type Name Description
1 Level level_id An entry in the Level List. This opcode will pull from the Level's Map Background.

0xa - back_SetSpecialEpisodeBanner

Displays text using the FONT/banner.bin:FONT/b_pal.bin font, editable in the Misc. Graphics tab of SkyTemple. This opcode is used for Special Episodes 1-3. This opcode plays a short animation of a green line shooting across the screen, followed by text scrolling across the screen horizontally from opposite directions. This opcode will delete any actors, objects, and performers that are currently loaded.

Parameters
# Type Name Description
1 sint episode_number The episode number displayed for the banner. A value of -1 will be "Final Chapter".
2 String title The title of the episode, e.g., "Bidoof's Wish" for Special Episode 1.

0xb - back_SetSpecialEpisodeBanner2

Displays text using the FONT/banner_c.bin:FONT/b_pal_r.bin font, editable in the Misc. Graphics tab of SkyTemple. This opcode is only used for Special Episode 4. This opcode features an elaborate animation featuring hearts and sparkles, along with text scrolling across the screen horizontally from opposite directions. This opcode will delete any actors, objects, and performers that are currently loaded.

Parameters
# Type Name Description
1 sint episode_number The episode number displayed for the banner. A value of -1 will be "Final Chapter".
2 String title The title of the episode, e.g., "Bidoof's Wish" for Special Episode 1.

0xc - back_SetSpecialEpisodeBanner3

Displays text using the FONT/banner.bin:FONT/b_pal.bin font, editable in the Misc. Graphics tab of SkyTemple. This opcode is only used for Special Episode 5. This opcode features no animation, but the end result is similar to the opcode back_SetSpecialEpisodeBanner. This opcode will delete any actors, objects, and performers that are currently loaded.

Parameters
# Type Name Description
1 sint episode_number The episode number displayed for the banner. A value of -1 will be "Final Chapter".
2 String title The title of the episode, e.g., "Bidoof's Wish" for Special Episode 1.

0xd - back_SetTitleBanner

Displays user-defined text using the FONT/banner.bin:FONT/b_pal.bin font, editable in the Misc. Graphics tab of SkyTemple. This opcode will delete any actors, objects, and performers that are currently loaded.

Parameters
# Type Name Description
1 uint y The Y-axis pixel position of the title.
2 String title The title displayed on the Touch Screen.

0xe - back_SetWeather

Displays a weather effect that overlays the current Map Background.

Parameters
# Type Name Description
1 sint weather_id Values of 0 and below mean no weather effect is to be displayed.
  1. Dark, unmoving clouds.
  2. Dark, unmoving clouds.
  3. Clouds.
  4. No weather.
  5. Clouds.
  6. Unknown; seems to either softlock the game or drastically change the current Map Background.
  7. Fog.
  8. No weather.
  9. Unknown; does not seem to have a visible effect, but it loads something into memory.
  10. Unknown; seems to either softlock the game or drastically change the current Map Background.
  11. Purple smog.

0xf - back_SetWeatherEffect

Currently unknown. The only values this opcode accepts seems to be 1, 2, and 3. Its only known use is in V00P02/m01a04a.ssb, which is a test script used by the developers.

Parameters
# Type Name Description
1 uint unk0 Currently unknown.

0x10 - back_SetWeatherScrollOffset

Currently unknown. This opcode is not used in the base game.

Parameters
# Type Name Description
1 uint unk0 Currently unknown.
2 uint unk1 Currently unknown.

0x11 - back_SetWeatherScrollSpeed

Currently unknown. This opcode is not used in the base game.

Parameters
# Type Name Description
1 uint unk0 Currently unknown.
2 uint unk1 Currently unknown.

0x12 - back2_SetBackEffect

The same as back_SetBackEffect, but for the Top Screen.

Parameters
# Type Name Description
1 uint effect_id
  1. The default state of the Animation Palette.
  2. Plays the Animation Palette in a loop.
  3. Plays the Animation Palette once.
  4. Freezes the Animation Palette at its current frame.
  5. Resumes the Animation Palette.

0x13 - back2_SetBackScrollOffset

The same as back_SetBackScrollOffset, but for the Top Screen.

Parameters
# Type Name Description
1 sint offset0 The number of pixels to shift either:
  • The Map Background's Layer 1 and Layer 2 X-axis.
  • The Map Background's Layer 1 X-axis.

Which one the game performs for a given Level seems to be hardcoded.

2 sint offset1 The number of pixels to shift either:
  • The Map Background's Layer 1 and Layer 2 Y-axis.
  • The Map Background's Layer 2 X-axis.

Which one the game performs for a given Level seems to be hardcoded.

0x14 - back2_SetBackScrollSpeed

The same as back_SetBackScrollSpeed, but for the Top Screen.

Parameters
# Type Name Description
1 sint speed0 The speed to scroll either:
  • The Map Background's Layer 1 and Layer 2 X-axis.
  • The Map Background's Layer 1 X-axis.

Which one the game performs for a given Level seems to be hardcoded.

2 sint speed1 The speed to scroll either:
  • The Map Background's Layer 1 and Layer 2 Y-axis.
  • The Map Background's Layer 2 X-axis.

Which one the game performs for a given Level seems to be hardcoded.

0x15 - back2_SetData

Currently unknown. This opcode is not used in the base game.

Parameters
# Type Name Description
1 uint unk0 Currently unknown.
2 uint unk1 Currently unknown.

0x16 - back2_SetEffect

The same as back_SetEffect, but for the Top Screen.

Parameters
# Type Name Description
1 uint effect
  • Transitions from Layer 2 to Layer 1.
  • Fades in Layer 1 from total darkness.
  • Transitions from Layer 2 to Layer 1.
  • Fades in Layer 1 from total darkness.
  • Transitions from Layer 1 to Layer 2.
  • Fades out Layer 1 to total darkness.
  • Merges Layer 1 onto Layer 2, but fades in Layer 1 from total darkness.
  • Fades in Layer 1 from total darkness.
  • Merges Layer onto Layer 2, but fades out Layer 1 to total darkness.
  • Fades out Layer 1 to total darkness.
2 uint duration The number of frames used to play a given effect.


0x17 - back2_SetGround

Mostly the same as back_SetGround, but for the Top Screen. This opcode only works if back2_SetMode(4); is used prior to this opcode.

Parameters
# Type Name Description
1 Level level_id An entry in the Level List. This opcode will pull from the Level's Map Background.

0x18 - back2_SetMode

Determines a hardcoded status of the Top Screen.

Parameters
# Type Name Description
1 sint mode A value of 0 is no mode. A negative value seems to set the Top Screen to the overworld's current Top Screen setting.
  1. Fades out the Top Screen.
  2. Team Stats.
  3. The Map Background S01P01A with the hero idling on a World Map Marker.
  4. Allows for the Top Screen to display a Map Background from a Level using the back2_SetGround opcode.
  5. Splits the Map Background used in the Level defined by back_SetGround equally between the Top and Touch Screen.
  6. Splits the Map Background used in the Level defined by back_SetGround between the Top and Touch Screen.

0x19 - back2_SetSpecialActing

Currently unknown.

Parameters
# Type Name Description
1 uint unk0 Currently unknown.
2 uint unk1 Currently unknown.
3 uint unk2 Currently unknown.

0x1a - back2_SetWeather

The same as back_SetWeather, but for the Top Screen.

Parameters
# Type Name Description
1 sint weather_id Values of 0 and below mean no weather effect is to be displayed.
  1. Dark, unmoving clouds.
  2. Dark, unmoving clouds.
  3. Clouds.
  4. No weather.
  5. Clouds.
  6. Unknown; seems to either softlock the game or drastically change the current Map Background.
  7. Fog.
  8. No weather.
  9. Unknown; does not seem to have a visible effect, but it loads something into memory.
  10. Unknown; seems to either softlock the game or drastically change the current Map Background.
  11. Purple smog.

0x1b - back2_SetWeatherEffect

Currently unknown. Potentially has similar functionality as back_SetWeatherEffect, but for the Top Screen.

Parameters
# Type Name Description
1 uint unk0 Currently unknown.

0x1c - back2_SetWeatherScrollOffset

Currently unknown. Potentially has similar functionality as back_SetWeatherScrollOffset, but for the Top Screen.

Parameters
# Type Name Description
1 uint unk0 Currently unknown.
2 uint unk1 Currently unknown.

0x1d - back2_SetWeatherScrollSpeed

Currently unknown. Potentially has similar functionality as back_SetWeatherScrollSpeed, but for the Top Screen.

Parameters
# Type Name Description
1 uint unk0 Currently unknown.
2 uint unk1 Currently unknown.

0x1e - bgm_FadeOut

Fades out the BGM that is currently playing over a certain period of time on the first BGM track.

Parameters
# Type Name Description
1 uint duration The number of frames used to fade out and silence a given BGM.

0x1f - bgm_Play

Instantly plays a BGM on the first BGM track.

Parameters
# Type Name Description
1 Bgm bgm_id A music track defined in SOUND/BGM of the ROM.

0x20 - bgm_PlayFadeIn

Starts playing a BGM over a certain period of time and at a certain volume on the first BGM track.

Parameters
# Type Name Description
1 Bgm bgm_id A music track defined in SOUND/BGM of the ROM.
2 uint duration The number of frames used to fade in the BGM.
3 uint volume The volume that the BGM will play at. It has a maximum of 256 and a minimum of 0.

0x21 - bgm_Stop

Instantly stops the BGM that is currently playing on the first BGM track.

No parameters.

0x22 - bgm_ChangeVolume

Changes the volume of the BGM that is currently playing on the first BGM track.

Parameters
# Type Name Description
1 uint duration The number of frames used to change the BGM's volume.
2 uint volume The volume that the BGM will play at. It has a maximum of 256 and a minimum of 0.

0x23 - bgm2_FadeOut

Fades out the BGM that is currently playing over a certain period of time on the second BGM track.

Parameters
# Type Name Description
1 uint duration The number of frames used to fade out and silence a given BGM.

0x24 - bgm2_Play

Instantly plays a BGM on the second BGM track.

Parameters
# Type Name Description
1 Bgm bgm_id A music track defined in SOUND/BGM of the ROM.

0x25 - bgm2_PlayFadeIn

Starts playing a BGM over a certain period of time and at a certain volume on the second BGM track.

Parameters
# Type Name Description
1 Bgm bgm_id A music track defined in SOUND/BGM of the ROM.
2 uint duration The number of frames used to fade in the BGM.
3 uint volume The volume that the BGM will play at. It has a maximum of 256 and a minimum of 0.

0x26 - bgm2_Stop

Instantly stops the BGM that is currently playing on the second BGM track.

No parameters.

0x27 - bgm2_ChangeVolume

Changes the volume of the BGM that is currently playing on the second BGM track.

Parameters
# Type Name Description
1 uint duration The number of frames to change the BGM's volume.
2 uint volume The volume that the BGM will play at. It has a maximum of 256 and a minimum of 0.

0x38 - CallCommon

Jumps to the specified Unionall Coroutine, runs its code, and returns to the line of code in which this opcode was used (only if return; was used in the Coroutine). This opcode can be used in any script, no matter the type (Common, Enter, Acting, or Sub).

If used in the context of an actor/object/performer, this should not be used in with-statements.

Parameters
# Type Name Description
1 Routine coro_id One of the 701 possible Unionall Coroutines.

0x39 - camera_Move2Default

Moves the camera toward an active Type 1 actor (e.g., ACTOR_PLAYER) without restricting the angles used.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

0x3a - camera_Move2MyPosition

Moves the camera toward a specific entity's position (i.e., an actor, object, or performer) without restricting the angles used.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

0x3b - camera_Move2Myself

Moves the camera toward a specific entity (i.e., an actor, object, or performer) without restricting the angles used.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

0x3c - camera_Move2PositionMark

Moves the camera to one or more Position Marks without restricting the angles used.

Parameters
# Type Name Description
1 uint num_parameters The number of parameters to read from this opcode.
2+ PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

This parameter may be repeated multiple times.

0x3d - camera_Move2PositionMark

Moves the camera to a Position Mark without restricting the angles used.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

0x3e - camera_Move3Default

Moves the camera toward an active Type 1 actor (e.g., ACTOR_PLAYER) in a rapid, strange motion.

Parameters
# Type Name Description
1 uint speed Supposedly movement speed based off of similar opcodes, but does not seem to affect much.

0x3f - camera_Move3MyPosition

Moves the camera toward a specific entity's position (i.e., an actor, object, or performer) in a rapid, strange motion.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Supposedly movement speed based off of similar opcodes, but does not seem to affect much.

0x40 - camera_Move3Myself

Moves the camera toward a specific entity (i.e., an actor, object, or performer) in a rapid, strange motion.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Supposedly movement speed based off of similar opcodes, but does not seem to affect much.

0x41 - camera_Move3PositionMark

Moves the camera to one or more Position Marks in a rapid, strange motion.

Parameters
# Type Name Description
1 uint num_parameters The number of parameters to read from this opcode.
2+ PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

This parameter may be repeated multiple times.

0x42 - camera_Move3PositionMark

Moves the camera to a Position Mark without restricting the angles used.

Parameters
# Type Name Description
1 uint speed Supposedly movement speed based off of similar opcodes, but does not seem to affect much.
2 PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

0x43 - camera_MoveDefault

Moves the camera toward an active Type 1 actor (e.g., ACTOR_PLAYER) while restricting movement by eight angles—as if movement was performed using the D-Pad.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

0x44 - camera_MoveMyPosition

Moves the camera toward a specific entity's position (i.e., an actor, object, or performer) while restricting movement by eight angles—as if movement was performed using the D-Pad.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

0x45 - camera_MoveMyself

Moves the camera toward a specific entity (i.e., an actor, object, or performer) while restricting movement by eight angles—as if movement was performed using the D-Pad.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

0x46 - camera_MovePositionMark

Moves the camera to one or more Position Marks while restricting movement by eight angles—as if movement was performed using the D-Pad.

Parameters
# Type Name Description
1 uint num_parameters The number of parameters to read from this opcode.
2+ PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

This parameter may be repeated multiple times.

0x47 - camera_MovePositionMark

Moves the camera to a Position Mark while restricting movement by eight angles—as if movement was performed using the D-Pad.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

0x48 - camera_SetDefault

Instantly sets the camera to a Type 1 actor (e.g., ACTOR_PLAYER).

No parameters.

0x49 - camera_SetEffect

Continuously shakes the camera at specified intensities. Entities will be affected by the camera shaking, but not textboxes and portraits. The camera will continue to shake even if it is moved using another opcode.

Parameters
# Type Name Description
1 uint mode Values of 0 or 3+ mean the camera will not shake.
  1. Erratic, jerky shaking.
  2. Subdued, smoother shaking.
2 uint intensity The intensity of the shake. Higher values will result in a more intense shake.
3 uint speed Movement speed. Higher values result in a slower speed.

0x4a - camera_SetMyPosition

Instantly sets the camera toward a specific entity's position (i.e., an actor, object, or performer).

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

No parameters.

0x4b - camera_SetMyself

Instantly sets the camera to a specific entity (i.e., an actor, object, or performer). Once performed, the camera will now follow the entity wherever it moves.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

No parameters.

0x4c - camera_SetPositionMark

Instantly sets the camera to a Position Mark.

Parameters
# Type Name Description
1 PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

0x4d - camera2_Move2Default

The same as camera_Move2Default, but for the Top Screen.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

0x4e - camera2_Move2MyPosition

The same as camera_Move2MyPosition, but for the Top Screen.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

0x4f - camera2_Move2Myself

The same as camera_Move2Myself, but for the Top Screen.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

0x50 - camera2_Move2PositionMark

The same as camera_Move2PositionMark, but for the Top Screen.

Parameters
# Type Name Description
1 uint num_parameters The number of parameters to read from this opcode.
2+ PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

This parameter may be repeated multiple times.

0x51 - camera2_Move2PositionMark

The same as camera_Move2PositionMark, but for the Top Screen.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

0x52 - camera2_Move3Default

The same as camera_Move3Default, but for the Top Screen.

Parameters
# Type Name Description
1 uint speed Supposedly movement speed based off of similar opcodes, but does not seem to affect much.

0x53 - camera2_Move3MyPosition

The same as camera_Move3MyPosition, but for the Top Screen.

Parameters
# Type Name Description
1 uint speed Supposedly movement speed based off of similar opcodes, but does not seem to affect much.

0x54 - camera2_Move3Myself

The same as camera_Move3Myself, but for the Top Screen.

Parameters
# Type Name Description
1 uint speed Supposedly movement speed based off of similar opcodes, but does not seem to affect much.

0x55 - camera2_Move3PositionMark

The same as camera_Move3PositionMark, but for the Top Screen.

Parameters
# Type Name Description
1 uint num_parameters The number of parameters to read from this opcode.
2+ PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

This parameter may be repeated multiple times.

0x56 - camera2_Move3PositionMark

The same as camera_Move3PositionMark, but for the Top Screen.

Parameters
# Type Name Description
1 uint speed Supposedly movement speed based off of similar opcodes, but does not seem to affect much.
2 PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

0x57 - camera2_MoveDefault

The same as camera_MoveDefault, but for the Top Screen.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

0x58 - camera2_MoveMyPosition

The same as camera_MoveMyPosition, but for the Top Screen.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

0x59 - camera2_MoveMyself

The same as camera_MoveMyself, but for the Top Screen.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

0x5a - camera2_MovePositionMark

The same as camera_MovePositionMark, but for the Top Screen.

Parameters
# Type Name Description
1 uint num_parameters The number of parameters to read from this opcode.
2+ PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

This parameter may be repeated multiple times.

0x5b - camera2_MovePositionMark

The same as camera_MovePositionMark, but for the Top Screen.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

0x5c - camera2_SetDefault

The same as camera_SetDefault, but for the Top Screen.

No parameters.

0x5d - camera2_SetEffect

The same as camera_SetEffect, but for the Top Screen.

Parameters
# Type Name Description
1 uint mode Values of 0 or 3+ mean the camera will not shake.
  1. Erratic, jerky shaking.
  2. Subdued, smoother shaking.
2 uint intensity The intensity of the shake. Higher values will result in a more intense shake.
3 uint speed Movement speed. Higher values result in a slower speed.

0x5e - camera2_SetMyPosition

The same as camera_SetMyPosition, but for the Top Screen.

No parameters.

0x5f - camera2_SetMyself

The same as camera_SetMyself, but for the Top Screen.

No parameters.

0x60 - camera2_SetPositionMark

The same as camera_SetPositionMark, but for the Top Screen.

Parameters
# Type Name Description
1 PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

This parameter may be repeated multiple times.

0x61 - CancelCut

Reverses the effects of the opcode CancelRecoverCommon, i.e., disallows the game from reloading Unionall at a Coroutine by pressing the Start button.

No parameters.

0x62 - CancelRecoverCommon

Allows reloading Unionall at a specified Coroutine by pressing the Start button. This can be done in a cutscene and the overworld.

Once the Start button is pressed, the game will stop the current script, fade out the entire screen, and reload Unionall and begin running code at the specified Coroutine.

Parameters
# Type Name Description
1 Routine coro_id One of the 701 possible Unionall Coroutines.

0x6a - debug_Assert

Does nothing in the final game.

Parameters
# Type Name Description
1 uint unk0 Currently unknown.

0x6b - debug_Print

Does nothing in the final game.

If the script is running using SkyTemple's debugger and the "Script Debug" checkbox is ticked, the specified string will be printed to the Debug Log.

Parameters
# Type Name Description
1 ConstString txt A string to be printed to the Debug Log.

0x6c - debug_PrintFlag

Does nothing in the final game.

If the script is running using SkyTemple's debugger and the "Script Debug" checkbox is ticked, the specified string will be printed to the Debug Log, along with the value of the specified script variable.

Parameters
# Type Name Description
1 GameVar var One of the 115 possible script variables. Indexed variables are not encouraged to use, since the Debug Log will only read from the first index.
2 ConstString txt A string to be printed to the Debug Log.

0x6d - debug_PrintScenario

If the script is running using SkyTemple's debugger and the "Script Debug" checkbox is ticked, the specified string will be printed to the Debug Log, along with two indices of the specified script variable.

This opcode's Debug Log implementation currently seems broken, as it prints the first index of the specified variable twice.

Parameters
# Type Name Description
1 GameVar var One of the 115 possible script variables. A two-indexed variable (e.g., $SCENARIO_MAIN) is encouraged to use.
2 ConstString txt A string to be printed to the Debug Log.

0x6f - Destroy

Instantly removes an active entity (i.e., an actor, object, or performer) from memory.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

No parameters.

0x71 - EndAnimation

Stops an actor or object's looping animation once it reaches the end of its animation frames.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

No parameters.

0x72 - ExecuteActing

Currently unknown.

Parameters
# Type Name Description
1 uint unk0 Currently unknown.

0x73 - ExecuteCommon

Jumps to a Unionall Coroutine, runs its code, and returns to the line in which this opcode was called. This opcode should be called if the specified Coroutine ends with hold;. Typically, the base game uses this command with Coroutines whose names end with "FUNC_SERIES".

This opcode does not have a parameter for an entity, as it must be used in a with-statement.

Parameters
# Type Name Description
1 Routine coro_id One of the 701 possible Unionall Coroutines.
2 uint unk1 Unknown.

0x81 - Flash

Currently unknown; it does not seem to affect much. This opcode is not used in the base game.

No parameters.

0x83 - item_GetVariable

Saves the value in a specific item slot (set by item_Set) to a script variable.

Parameters
# Type Name Description
1 uint slot An item slot used by many item_ opcodes.
2 GameVar var One of the 115 possible script variables.

0x84 - item_Set

Sets an item into an item slot, which can be used by other various item_ opcodes.

Items in slot 0 may also be added to the player's bag and storage with hardcoded menus, such as message_Menu(MENU_GIVE_ITEM); and message_Menu(MENU_GIVE_ITEM2);, respectively. Additionally, the text tag [s_item:X] will display the item's name, where X is the item slot number.

Parameters
# Type Name Description
1 uint slot An item slot used by many item_ opcodes.
2 uint item_id The ID of the item, where all are listed in the Items tab of SkyTemple.
3 uint item_stack The stack count of an item, if it belongs to a Thrown category. Treasure Boxes will also use this as the item earned when opening the box at Xatu's Appraisal.

0x85 - item_SetTableData

Sets a random item from predefined tables into an item slot, which can be used by other various item_ opcodes. This opcode is used mainly in Spinda's Cafe, for redeeming a random Recycle Shop prize and for receiving items from Treasure Town NPCs after giving them Sky Gifts.

Items in slot 0 may also be added to the player's bag and storage with hardcoded menus, such as message_Menu(MENU_GIVE_ITEM); and message_Menu(MENU_GIVE_ITEM2);, respectively. Additionally, the text tag [s_item:X] will display the item's name, where X is the item slot number.

Parameters
# Type Name Description
1 uint slot An item slot used by many item_ opcodes.
2 uint table Some unknown item tables related to Spinda's Cafe.

0x86 - item_SetVariable

Saves the value of a script variable to an item slot. Items in slot 0 may also be added to the player's bag and storage with hardcoded menus, such as message_Menu(MENU_GIVE_ITEM); and message_Menu(MENU_GIVE_ITEM2);, respectively. Additionally, the text tag [s_item:X] will display the item's name, where X is the item slot number.

Parameters
# Type Name Description
1 uint slot An item slot used by many item_ opcodes.
2 GameVar var One of the 115 possible script variables.

0x88 - JumpCommon

Jumps to the specified Unionall Coroutine and runs its code, without returning to the line in which this opcode was first used. This opcode can be used in any script, no matter the type (Common, Enter, Acting, or Sub), but is mostly used by the base game in Unionall.

If attempting to execute a Unionall Coroutine from inside an Enter, Acting, or Sub script to play Acting scripts, use supervision_ExecuteCommon instead.

Parameters
# Type Name Description
1 Routine coro_id One of the 701 possible Unionall Coroutines.

0x8a - LoadPosition

Sets various attributes of an entity (i.e., an actor, object, or performer) to the values of all indexed $POSITION_ script variables. These include changing the entity's X and Y coordinates, height, and direction.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint index Index used by all $POSITION_ script variables, ranged from 0-2 (inclusive).

0x8b - Lock

Suspends the current routine until the opcode Unlock is called with the same lock_id.

Parameters
# Type Name Description
1 uint lock_id The ID of a Lock, ranged from 0-19 (inclusive).

0x8c - main_EnterAdventure

Performs various functions related to entering a dungeon using the crossroads menu.

Parameters
# Type Name Description
1 sint mode Most modes are not known, but:
  • 32767 opens the dungeon selection menu.
  • 251 stops the current script to reload Unionall starting from the Coroutine CORO_MOVE_WORLD_MAP.
2 uint unk1 Currently unknown.

0x8d - main_EnterDungeon

Attempts to exit ground mode and begins dungeon mode at a specific dungeon.

If attempting to run this opcode before selecting any option from the Top Menu, the game will not enter any dungeon and instead attempt to load a DEMO Unionall coroutine or the Top Menu.

Parameters
# Type Name Description
1 sint dungeon_id The dungeon ID to enter, which are all listed in the Dungeons tab of SkyTemple. A value of -1 actually enters dungeon mode—it is insufficient to use this opcode a single time to enter a specific dungeon.
2 uint duration The number of frames used to fade out the screens.

0x8e - main_EnterGround

Stops the current script to reload Unionall starting from the Coroutine CORO_EVENT_DIVIDE. This opcode also updates the following script variables:

  • $GROUND_ENTER: This opcode's level_id_enter parameter.
  • $GROUND_ENTER_LINK: Set to 0.
  • $GROUND_GETOUT: The value of $GROUND_ENTER prior to using this opcode.
  • $GROUND_MAP: The Level ID used to display the Map Background.
  • $GROUND_PLACE: The World Map Marker ID that determines where the player appears on the Top Screen when selecting "Map and team" in the overworld.
  • $GROUND_START_MODE: Set to 3.

In the base game, using this opcode allows for transitioning between Levels in the Overworld, as the game will eventually run the supervision_ExecuteEnter opcode.

Parameters
# Type Name Description
1 Level level_id An entry in the Level List. Ideally, this opcode would load the specified Level's Enter00 script.
2 uint duration The number of frames used to fade out the screens.

0x8f - main_EnterGroundMulti

Stops the current script to reload Unionall starting from the Coroutine CORO_EVENT_DIVIDE. This opcode also updates the following script variables:

  • $GROUND_ENTER: This opcode's level_id_enter parameter.
  • $GROUND_ENTER_LINK: This opcode's level_id_link parameter.
  • $GROUND_GETOUT: The value of $GROUND_ENTER prior to using this opcode.
  • $GROUND_MAP: The Level ID used to display the Map Background.
  • $GROUND_PLACE: The World Map Marker ID that determines where the player appears on the Top Screen when selecting "Map and team" in the overworld.
  • $GROUND_START_MODE: Set to 3.

In the base game, using this opcode allows for transitioning between Levels in the Overworld, as the game will eventually run the supervision_ExecuteEnter opcode.

Parameters
# Type Name Description
1 Level level_id_enter An entry in the Level List. Ideally, this opcode would load the specified Level's Enter00 script.
2 uint duration The number of frames used to fade out the screens.
3 Level level_id_link An entry in the Level List. Used to update $GROUND_ENTER_LINK.

0x90 - main_EnterRescueUser

Exits ground mode and begins dungeon mode while taking an SOS Mail. Dungeon selection seems to be determined by the SOS Mail chosen via message_Menu(MENU_S_O_S_MAIL_PICKER);.

Parameters
# Type Name Description
1 uint duration The number of frames used to fade out the screens.

0x91 - main_EnterTraining

Performs various functions related to entering a dungeon using Marowak Dojo.

Parameters
# Type Name Description
1 uint mode Most modes are not known, but:
  • 32767 opens the generic dojo selection menu
  • 251 goes to the Coroutine CORO_GOTO_TRAINING_DUNGEON, which later stops the current script to reload Unionall starting from the Coroutine CORO_ENTER_TRAINING_DUNGEON.
2 uint unk1 Currently unknown.

0x92 - main_EnterTraining2

Performs various functions related to entering a dungeon using Marowak Dojo's Final Maze.

Parameters
# Type Name Description
1 uint mode Most modes are not known, but:
  • 32767 opens a dojo selection menu that only involves Final Maze.
  • 251 goes to the Coroutine CORO_GOTO_TRAINING_DUNGEON, which later stops the current script to reload Unionall starting from the Coroutine CORO_ENTER_TRAINING_DUNGEON.
2 uint unk1 Currently unknown.

0x93 - main_SetGround

Updates the following variables' values to be this opcode's level_id parameter:

  • $GROUND_ENTER
  • $GROUND_GETOUT
Parameters
# Type Name Description
1 Level level_id An entry in the Level List.

0x94 - me_Play

Instantly plays a special sound effect that can seamlessly interrupt any BGM tracks that are currently playing.

Parameters
# Type Name Description
1 uint me_id A sound effect defined in SOUND/ME of the ROM.

0x95 - me_Stop

Instantly stops the currently-playing special sound effect called with me_Play.

No parameters.

0x96 - message_Close

Suspends the current routine and allows for closing an active textbox (and portrait, if active) set by one of the following opcodes:

  • message_ImitationSound
  • message_Mail
  • message_Monologue
  • message_Notice
  • message_SpecialTalk
  • message_Talk

By pressing the A Button, B Button, or tapping the textbox via the Touch Screen. Once the textbox is closed, the current routine resumes.

No parameters.

0x97 - message_CloseEnforce

Instantly closes an active textbox (and portrait, if active) once the game finishes displaying a string set by one of the following opcodes:

  • message_ImitationSound
  • message_Mail
  • message_Monologue
  • message_Notice
  • message_SpecialTalk
  • message_Talk

No parameters.

0x98 - message_Explanation

Displays the string defined in the txt parameter centered in the middle of the Touch Screen. The string will appear without any frame defined in FONT/frameX.wte (as seen in the Misc. Graphics tab of SkyTemple). This opcode does not need message_Close to suspend the routine.

This opcode does not support displaying a portrait. No sound will emit from the text scrolling.

Parameters
# Type Name Description
1 String txt Text to be displayed on the Touch Screen.

0x99 - message_FacePositionOffset

Offsets the active portrait in pixels by multiples of 8.

Parameters
# Type Name Description
1 sint x The offset to shift the portrait box across the X-axis.
2 sint y The offset to shift the portrait box across the Y-axis.

0x9a - message_ImitationSound

Displays the string defined in the txt parameter at the bottom of the Touch Screen. The string will appear surrounded by a player-chosen frame defined in FONT/frameX.wte (as seen in the Misc. Graphics tab of SkyTemple).

This opcode does not support displaying a portrait. No sound will emit from the text scrolling.

Parameters
# Type Name Description
1 String txt Text to be displayed on the Touch Screen.

0x9b - message_KeyWait

If an active textbox has finished displaying its string and was created by one of the following opcodes:

  • message_ImitationSound
  • message_Mail
  • message_Monologue
  • message_Notice
  • message_SpecialTalk
  • message_Talk

This opcode suspends the current routine until the A Button, B Button or textbox is pressed (via the Touch Screen). Once done so, the textbox will not close, but the current routine will resume.

No parameters.

0x9c - message_Mail

Displays the string defined in the txt parameter at the bottom of the Touch Screen. The string will appear surrounded by a player-chosen frame defined in FONT/frameX.wte (as seen in the Misc. Graphics tab of SkyTemple).

This opcode does not support displaying a portrait. No sound will emit from the text scrolling.

Parameters
# Type Name Description
1 String txt Text to be displayed on the Touch Screen.

0x9d - message_Menu

Executes various hardcoded "menu" functionalities given a certain ID. Some IDs result in an actual menu, while others simply perform a silent task.

Parameters
# Type Name Description
1 Menu menu_id The ID of a menu, the list of which can be seen by typing MENU_ in SkyTemple's Script Engine Debugger.

0x9e - message_Monologue

Displays the string defined in the txt parameter at the bottom of the Touch Screen. The string will appear surrounded by a player-chosen frame defined in FONT/frameX.wte (as seen in the Misc. Graphics tab of SkyTemple).

This opcode supports displaying a portrait. No sound will emit from the text scrolling.

Parameters
# Type Name Description
1 String txt Text to be displayed on the Touch Screen.

0x9f - message_Narration

Fades in the screen and instantly displays the string defined in the txt parameter centered in the middle of the Touch Screen. The string will appear without any frame defined in FONT/frameX.wte (as seen in the Misc. Graphics tab of SkyTemple). This opcode does not need message_Close to suspend the routine. Once the routine is resumed (by pressing the A Button, B Button, or text via the Touch Screen), the screen will fade out, including the string.

Parameters
# Type Name Description
1 uint duration The number of frames used to fade in/out the Touch Screen.
2 String txt Text to be displayed on the Touch Screen.

0xa0 - message_Notice

Instantly displays the string defined in the txt parameter at the bottom of the Touch Screen. The string will appear surrounded by a player-chosen frame defined in FONT/frameX.wte (as seen in the Misc. Graphics tab of SkyTemple).

This opcode does not support displaying a portrait.

Parameters
# Type Name Description
1 String txt Text to be displayed on the Touch Screen.

0xa1 - message_EmptyActor

Disallows a portrait from appearing alongside a textbox, along with disallowing a name to appear in the textbox if message_Talk follows this opcode.

No parameters.

0xa2 - message_ResetActor

Disallows a portrait from appearing alongside a textbox, along with setting a speech bubble (the text tag [M:T1]) to the start of next script string if message_Talk follows this opcode.

No parameters.

0xa3 - message_SetActor

Sets the specified actor's name to the start of the next script string if message_Talk follows this opcode.

Parameters
# Type Name Description
1 Entity actor_id An entry in the Actor List.

0xa4 - message_SetFace

Sets the specified actor's name to the start of the next script string if message_Talk follows this opcode. Will also display a portrait of the actor's species at a specified position if message_Talk or message_Monologue follow this opcode.

Parameters
# Type Name Description
1 Entity actor_id An entry in the Actor List.
2 Face face_id The ID of a portrait, the list of which can be seen by typing FACE_ in SkyTemple's Script Engine Debugger.
3 FaceMode face_mode The position of a portrait, the list of which can be seen by typing FACE_POS_ in SkyTemple's Script Engine Debugger.

0xa5 - message_SetFaceEmpty

Displays a portrait of the actor's species at a specified position if message_Talk or message_Monologue follow this opcode.

Parameters
# Type Name Description
1 Entity actor_id An entry in the Actor List.
2 Face face_id The ID of a portrait, the list of which can be seen by typing FACE_ in SkyTemple's Script Engine Debugger.
3 FaceMode face_mode The position of a portrait, the list of which can be seen by typing FACE_POS_ in SkyTemple's Script Engine Debugger.

0xa6 - message_SetFaceOnly

Sets a speech bubble (the text tag [M:T1]) to the start of the next script string if message_Talk follows this opcode. Will also display a portrait of the actor's species at a specified position if message_Talk or message_Monologue follow this opcode.

Parameters
# Type Name Description
1 Entity actor_id An entry in the Actor List.
2 Face face_id The ID of a portrait, the list of which can be seen by typing FACE_ in SkyTemple's Script Engine Debugger.
3 FaceMode face_mode The position of a portrait, the list of which can be seen by typing FACE_POS_ in SkyTemple's Script Engine Debugger.

0xa7 - message_SetFacePosition

Re-positions an actor's portrait.

Parameters
# Type Name Description
1 FaceMode face_mode The position of a portrait, the list of which can be seen by typing FACE_POS_ in SkyTemple's Script Engine Debugger.

0xa8 - message_SetWaitMode

Makes strings displayed with a message_ opcode auto-scroll. For both parameters, a value of -1 means the auto-scroll will stop.

Parameters
# Type Name Description
1 sint duration0 Sets the frame count for a textbox auto-advancing, once the end of the string has been displayed and the following opcode is message_KeyWait();.
2 sint duration1 Sets the frame count for text tags such as [K] auto-advancing.

0xa9 - message_SpecialTalk

Displays a random Text String based off of the actor ACTOR_TALK_SUB's Talk Group.

Parameters
# Type Name Description
1 uint category A category of Text String.
  • 0 seems to use Text Strings while not in a dungeon (e.g., teammates waiting at Spinda's Cafe).
  • 1 seems to be use Text Strings while mid-dungeon (e.g., teammates at Amp Plains).

0xae - message_Talk

Displays the string defined in the txt parameter at the bottom of the Touch Screen. The string will appear surrounded by a player-chosen frame defined in FONT/frameX.wte (as seen in the Misc. Graphics tab of SkyTemple).

This opcode supports displaying a portrait. The sound effect 16133 will emit from the each character scrolling in the text.

Parameters
# Type Name Description
1 String txt Text to be displayed on the Touch Screen.

0xaf - Move2Position

Moves an entity (i.e., an actor, object, or performer) to a specific pixel position without restricting the angles used.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 uint x The pixel position on the X-axis.
3 uint y The pixel position on the Y-axis.

0xb0 - Move2PositionLives

Moves an entity (i.e., an actor, object, or performer) to an actor without restricting the angles used.

This opcode must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 Entity actor_id An entry in the Actor List.

0xb1 - Move2PositionMark

Moves an entity (i.e., an actor, object, or performer) to one or more Position Marks without restricting the angles used.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint num_parameters The number of parameters to read from this opcode.
2+ PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

This parameter may be repeated multiple times.

0xb2 - Move2PositionMark

Moves an entity (i.e., an actor, object, or performer) to a Position Mark without restricting the angles used.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

0xb3 - Move2PositionOffset

Offsets an entity (i.e., an actor, object, or performer) from its current position across both axes without restricting the angles used.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint num_parameters The number of parameters to read from this opcode.
2+ sint x, y The pixel offset to shift the entity across the X or Y-axis.

This parameter may be repeated multiple times.

0xb4 - Move2PositionOffset

Offsets an entity (i.e., an actor, object, or performer) from its current position across both axes without restricting the angles used.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 sint x The pixel offset to shift the entity across the X-axis.
3 sint y The pixel offset to shift the entity across the Y-axis.

0xb5 - Move2PositionOffsetRandom

Continuously and randomly offsets an entity (i.e., an actor, object, or performer) from its current position across both axes without restricting the angles used.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 sint x Determines something about the random pixel value chosen to apply to the X-axis; somewhat unknown.
3 sint y Determines something about the random pixel value chosen to apply to the Y-axis; somewhat unknown.

0xb6 - Move3Position

Moves an entity (i.e., an actor, object, or performer) to a specific pixel position in a rapid, strange motion.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 uint x The pixel position on the X-axis.
3 uint y The pixel position on the Y-axis.

0xb7 - Move3PositionLives

Moves an entity (i.e., an actor, object, or performer) to an actor in a rapid, strange motion.

This opcode must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 Entity actor_id An entry in the Actor List.

0xb8 - Move3PositionMark

Moves an entity (i.e., an actor, object, or performer) to a Position Mark in a rapid, strange motion.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint num_parameters The number of parameters to read from this opcode.
2+ PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

This parameter may be repeated multiple times.

0xb9 - Move3PositionMark

Moves an entity (i.e., an actor, object, or performer) to a Position Mark in a rapid, strange motion.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

0xba - Move3PositionOffset

Offsets an entity (i.e., an actor, object, or performer) from its current position across both axes in a rapid, strange motion.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint num_parameters The number of parameters to read from this opcode.
2+ sint x, y The pixel offset to shift the entity across the X or Y-axis.

This parameter may be repeated multiple times.

0xbb - Move3PositionOffset

Offsets an entity (i.e., an actor, object, or performer) from its current position across both axes in a rapid, strange motion.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 sint x The pixel offset to shift the entity across the X-axis.
3 sint y The pixel offset to shift the entity across the Y-axis.

0xbc - Move3PositionOffsetRandom

Continuously and randomly offsets an entity (i.e., an actor, object, or performer) from its current position across both axes in a rapid, strange motion.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 sint x Determines something about the random pixel value chosen to apply to the X-axis; somewhat unknown.
3 sint y Determines something about the random pixel value chosen to apply to the Y-axis; somewhat unknown.

0xbd - MoveDirection

Offsets an entity (i.e., an actor, object, or performer) by a certain number of pixels based on a given direction. Movement is performed while restricting movement by eight angles—as if movement was performed using the D-Pad.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
2 sint offset The pixel offset to shift the entity relative to the entity's direction.
3 Direction direction The type of direction, the list of which can be seen by typing DIR_ in SkyTemple's Script Engine Debugger.

0xbe - MoveHeight

Moves an entity (i.e., an actor, object, or performer) to a certain pixel height, displacing it from its shadow. When used, the entity's animation and direction will not change.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
2 sint height The pixel height to set the entity relative to their shadow.

0xbf - MovePosition

Moves an entity (i.e., an actor, object, or performer) to a specific pixel position while restricting movement by eight angles—as if movement was performed using the D-Pad.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 uint x The pixel position on the X-axis.
3 uint y The pixel position on the Y-axis.

0xc0 - MovePositionLives

Moves an entity (i.e., an actor, object, or performer) to an actor while restricting movement by eight angles—as if movement was performed using the D-Pad.

This opcode must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 Entity actor_id An entry in the Actor List.

0xc1 - MovePositionLivesTime

Moves an entity (i.e., an actor, object, or performer) to an actor while restricting movement by eight angles—as if movement was performed using the D-Pad. Movement will end once either the entity reaches the actor or after a certain number of frames have passed—whichever comes first.

This opcode must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 Entity actor_id An entry in the Actor List.
3 uint duration The number of frames used to move the entity.

0xc2 - MovePositionMark

Moves an entity (i.e., an actor, object, or performer) to a Position Mark while restricting movement by eight angles—as if movement was performed using the D-Pad.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint num_parameters The number of parameters to read from this opcode.
2+ PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

This parameter may be repeated multiple times.

0xc3 - MovePositionMark

Moves an entity (i.e., an actor, object, or performer) to a Position Mark while restricting movement by eight angles—as if movement was performed using the D-Pad.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

0xc4 - MovePositionMarkTime

Moves an entity (i.e., an actor, object, or performer) to an Position Mark while restricting movement by eight angles—as if movement was performed using the D-Pad. Movement will end once either the entity reaches the Position Mark or after a certain number of frames have passed—whichever comes first.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.
3 uint duration The number of frames used to move the entity.

0xc5 - MovePositionOffset

Offsets an entity (i.e., an actor, object, or performer) from its current position across both axes while restricting movement by eight angles—as if movement was performed using the D-Pad.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint num_parameters The number of parameters to read from this opcode.
2+ sint x, y The pixel offset to shift the entity across the X or Y-axis.

This parameter may be repeated multiple times.

0xc6 - MovePositionOffset

Offsets an entity (i.e., an actor, object, or performer) from its current position across both axes while restricting movement by eight angles—as if movement was performed using the D-Pad.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 sint x The pixel offset to shift the entity across the X-axis.
3 sint y The pixel offset to shift the entity across the Y-axis.

0xc7 - MoveSpecial

Currently unknown. Seems to move an entity (i.e., an actor, object, or performer) based on some hardcoded behaviors.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint mode Determines the kind of action.
  1. Spin and move in a circular motion.
  2. Spin and move in a circular motion.
  3. Currently unknown.
  4. Currently unknown.
  5. Currently unknown. Seems to be the most commonly-used value, as a part of the Unionall Coroutine CORO_LIVES_REPLY_NOMRAL.
2 uint unk1 Currently unknown. Seems to affect how far the entity will move?
3 uint unk2 Currently unknown.

0xc8 - MoveTurn

Moves an entity (i.e., an actor, object, or performer) based on a certain pattern. Unlike other Move opcodes, this opcode will make the entity interact with the currently loaded Map Background's collision (i.e., the entity stops when hitting a wall).

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint distance How far the entity will move. Higher values result in greater distance being covered.
2 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

This parameter also seems to affect the distance traveled.

3 uint pattern A hardcoded pattern to move in.
  1. Moves in a circle clockwise.
  2. Moves in a circle counterclockwise.
  3. Moves in a square clockwise.
  4. Moves in a square counterclockwise.
  5. Zig-zags back and forth.

Values 6 and above seem to be variations of random movement.

0xca - PauseEffect

Instantly pauses the current graphical effect of an entity (i.e., an actor, object, or performer). The effect will freeze mid-frame.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 Effect effect_id A graphical effect to display relative to an entity.

0xcc - ProcessSpecial

Executes one of the game's Special Processes. The return value of a Special Process can be checked by encasing this opcode in a switch statement. A negative return value is not acceptable and will cause the game to suspend indefinitely.

This opcode cannot be used in targeted routines.

Parameters
# Type Name Description
1 ProcessSpecial process_id One of the game's Special Processes.
2 sint process_param1 The first parameter used by the Special Process.
3 sint process_param2 The first parameter used by the Special Process.

0xcd - PursueTurnLives

Causes an entity (i.e., an actor, object, or performer) to continuously turn toward an actor for a certain number of frames.

This opcode must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint duration The number of frames used to make the entity turn. A value of 0 will make the entity turn forever.
2 uint speed Turning speed. Higher values result in a slower speed.
3 Entity actor_id The actor to turn toward.
4 uint rotation
  1. Clockwise.
  2. Counterclockwise.

A value of 10 will make the entity choose the nearest rotation.

0xce - PursueTurnLives2

Causes an entity (i.e., an actor, object, or performer) to continuously turn toward an actor for a certain number of frames.

This opcode must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint duration The number of frames used to make the entity turn. A value of 0 will make the entity turn forever.
2 uint speed Turning speed. Higher values result in a slower speed.
3 Entity actor_id The actor to turn toward.
4 uint rotation
  1. Clockwise.
  2. Counterclockwise.

A value of 10 will make the entity choose the nearest rotation.

0xcf - ResetAttribute

Currently unknown. Seems to get ignored when parsed in the scripting engine.

Parameters
# Type Name Description
1 uint unk0 Currently unknown.

0xd0 - ResetFunctionAttribute

Sets certain bits of an entity's (i.e., an actor, object, or performer) "function" attribute to 0.

Parameters
# Type Name Description
1 bitfield function_bitfield Most bits' purposes are unknown. Bit 1 appears to be the bit used for allowing an entity to follow a Type 1 actor, like the actor ACTOR_ATTENDANT1 in the overworld.

0xd1 - ResetHitAttribute

Sets certain bits of an entity's (i.e., an actor, object, or performer) "hit" attribute to 0.

Parameters
# Type Name Description
1 bitfield hit_bitfield Most bits' purposes are unknown.
  • 2: Entity collision.
  • 6: Talk Script upon collision.
  • 7: Talk Script upon pressing the A Button near the entity.

0xd2 - ResetOutputAttribute

Sets certain bits of an entity's (i.e., an actor, object, or performer) "output" attribute to 0.

Parameters
# Type Name Description
1 bitfield output_bitfield
  1. Underlay below entities.
  2. Overlay above entities.
  3. Overlay above the current Map Background's Layer 2.
  4. Overlay above the game's canvas system, which includes the textbox, portrait, and some screen_ commands that do not end in All.
  5. Flicker.
  6. Transparency.
  7. Invisibility.
  8. Displays shadow.

0xd3 - ResetReplyAttribute

Sets certain bits of an entity's (i.e., an actor, object, or performer) "reply" attribute to 0.

Parameters
# Type Name Description
1 bitfield reply_bitfield Most bits' purposes are unknown.
  • 1: Talk Script upon collision.
  • 2: Talk Script upon pressing the A Button near the entity.
  • 6: Underlay below entities.
  • 7: Overlay above entities.

0xd4 - ResumeEffect

Resumes the current graphical effect of an entity (i.e., an actor, object, or performer) that has been paused with PauseEffect prior to using this opcode.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 Effect effect_id A graphical effect to display relative to an entity.

0xd6 - SavePosition

Saves various attributes of an entity (i.e., an actor, object, or performer) to the following script variables:

  • $POSITION_X: The pixel position of the entity on the X-axis multiplied by 256.
  • $POSITION_Y: The pixel position of the entity on the Y-axis multiplied by 256.
  • $POSITION_HEIGHT: The pixel height (i.e., displacement of the entity from their shadow) of the entity multiplied by 256.
  • $POSITION_DIRECTION: The direction the entity is facing.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint index Index used by all $POSITION_ script variables, ranged from 0-2 (inclusive).

0xd7 - screen_FadeChange

Changes the brightness of the screen across a certain number of frames. This opcode will not affect:

  • Entities who have had their 4th "output" bit set to 1 (e.g., by using SetOutputAttribute(16); with them).
  • Portraits.
  • Textboxes.
Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true.
2 uint duration The number of frames used to change the Touch Screen's brightness.
3 uint start_brightness The brightness level the opcode will begin at.
  • The minimum brightness is 0, which results in a black screen.
  • The default brightness is 256.
  • The maximum brightness is 512, which results in a white screen.
4 uint end_brightness The brightness level the opcode will end at.
  • The minimum brightness is 0, which results in a black screen.
  • The default brightness is 256.
  • The maximum brightness is 512, which results in a white screen.

0xd8 - screen_FadeChangeAll

Changes the brightness of the screen across a certain number of frames. This opcode will affect everything on the Touch Screen.

Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
2 uint duration The number of frames used to change the Touch Screen's brightness.
3 uint start_brightness The brightness level the opcode will begin at.
  • The minimum brightness is 0, which results in a black screen.
  • The default brightness is 256.
  • The maximum brightness is 512, which results in a white screen.
4 uint end_brightness The brightness level the opcode will end at.
  • The minimum brightness is 0, which results in a black screen.
  • The default brightness is 256.
  • The maximum brightness is 512, which results in a white screen.

0xd9 - screen_FadeIn

Changes the brightness of the screen to its default state across a certain number of frames. This opcode will not affect:

  • Entities who have had their 4th "output" bit set to 1 (e.g., by using SetOutputAttribute(16); with them).
  • Portraits.
  • Textboxes.
Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
2 uint duration The number of frames used to change the Touch Screen's brightness.

0xda - screen_FadeInAll

Changes the brightness of the screen to its default state across a certain number of frames. This opcode will affect everything on the Touch Screen.

Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
2 uint duration The number of frames used to change the Touch Screen's brightness.

0xdb - screen_FadeOut

Changes the brightness of the screen to its minimum (i.e., a black screen) across a certain number of frames. This opcode will not affect:

  • Entities who have had their 4th "output" bit set to 1 (e.g., by using SetOutputAttribute(16); with them).
  • Portraits.
  • Textboxes.
Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
2 uint duration The number of frames used to change the Touch Screen's brightness.

0xdc - screen_FadeOutAll

Changes the brightness of the screen to its minimum (i.e., a black screen) across a certain number of frames. This opcode will affect everything on the Touch Screen.

Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
2 uint duration The number of frames used to change the Touch Screen's brightness.

0xdd - screen_FlushChange

Does nothing.

Parameters
# Type Name Description
1 uint unk0 Does nothing.
2 uint unk1 Does nothing.
3 uint unk2 Does nothing.
4 uint unk3 Does nothing.
5 uint unk4 Does nothing.
6 uint unk5 Does nothing.
7 uint unk6 Does nothing.
8 uint unk7 Does nothing.

0xde - screen_FlushIn

Changes the color of the screen from a specific state (given by the opcode's parameters, which affect the Touch Screen instantly) to its default state across a certain number of frames. This opcode will affect all entities (i.e., actors, objects, and performers) on the Touch Screen.

Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
2 uint duration The number of frames used to change the Touch Screen's color.
3 uint mode
  1. Completely darkens the Touch Screen.
  2. Completely turns the Touch Screen to a certain color.
  3. Instantly darkens the Touch Screen?
  4. Overlays the Touch Screen with a certain color.
  5. Instantly darkens the Touch Screen?
  6. Overlays the Touch Screen with hardcoded color bytes: 144, 144, and 255.
  7. Instantly darkens the Touch Screen?
  8. Overlays the Touch Screen with hardcoded color bytes: 255, 192, and 128.
  9. Instantly darkens the Touch Screen?
  10. Overlays the Touch Screen with hardcoded color bytes: All 255. The Touch Screen is not turned completely white.
  11. Instantly overlays the Touch Screen with hardcoded color bytes: All 255. The Touch Screen is not turned completely white.
4 uint r Unused if mode is not 2 or 4. Byte used for the color red. Has a minimum of 0 and a maximium of 255.
5 uint g Unused if mode is not 2 or 4. Byte used for the color green. Has a minimum of 0 and a maximium of 255.
6 uint b Unused if mode is not 2 or 4. Byte used for the color blue. Has a minimum of 0 and a maximium of 255.

0xdf - screen_FlushOut

Changes the color of the screen across a certain number of frames. This opcode will affect all entities (i.e., actors, objects, and performers) on the Touch Screen.

Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
2 uint duration The number of frames used to change the Touch Screen's color.
3 uint mode
  1. Completely darkens the Touch Screen.
  2. Completely turns the Touch Screen to a certain color.
  3. Instantly darkens the Touch Screen?
  4. Overlays the Touch Screen with a certain color.
  5. Instantly darkens the Touch Screen?
  6. Overlays the Touch Screen with hardcoded color bytes: 144, 144, and 255.
  7. Instantly darkens the Touch Screen?
  8. Overlays the Touch Screen with hardcoded color bytes: 255, 192, and 128.
  9. Instantly darkens the Touch Screen?
  10. Overlays the Touch Screen with hardcoded color bytes: All 255. The Touch Screen is not turned completely white.
  11. Instantly overlays the Touch Screen with hardcoded color bytes: All 255. The Touch Screen is not turned completely white.
4 uint r Unused if mode is not 2 or 4. Byte used for the color red. Has a minimum of 0 and a maximium of 255.
5 uint g Unused if mode is not 2 or 4. Byte used for the color green. Has a minimum of 0 and a maximium of 255.
6 uint b Unused if mode is not 2 or 4. Byte used for the color blue. Has a minimum of 0 and a maximium of 255.

0xe0 - screen_WhiteChange

Changes the brightness of the screen across a certain number of frames. This opcode will not affect:

  • Entities who have had their 4th "output" bit set to 1 (e.g., by using SetOutputAttribute(16); with them).
  • Portraits.
  • Textboxes.
Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true.
2 uint duration The number of frames used to change the Touch Screen's brightness.
3 uint start_brightness The brightness level the opcode will begin at.
  • The minimum brightness is 0, which results in a white screen.
  • The default brightness is 256.
  • The maximum brightness is 512, which results in a black screen.
4 uint end_brightness The brightness level the opcode will end at.
  • The minimum brightness is 0, which results in a white screen.
  • The default brightness is 256.
  • The maximum brightness is 512, which results in a black screen.

0xe1 - screen_WhiteChangeAll

Changes the brightness of the screen across a certain number of frames. This opcode will affect everything on the Touch Screen.

Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
2 uint duration The number of frames used to change the Touch Screen's brightness.
3 uint start_brightness The brightness level the opcode will begin at.
  • The minimum brightness is 0, which results in a white screen.
  • The default brightness is 256.
  • The maximum brightness is 512, which results in a black screen.
4 uint end_brightness The brightness level the opcode will end at.
  • The minimum brightness is 0, which results in a white screen.
  • The default brightness is 256.
  • The maximum brightness is 512, which results in a black screen.

0xe2 - screen_WhiteIn

Does nothing. Do not be deceived by this opcode's name: After using screen_WhiteOut, use screen_FadeIn to restore the Touch Screen's brightness level!

Parameters
# Type Name Description
1 uint unk0 Does nothing.
2 uint unk1 Does nothing.

0xe3 - screen_WhiteInAll

Does nothing. Do not be deceived by this opcode's name: After using screen_WhiteOutAll, use screen_FadeInAll to restore the Touch Screen's brightness level!

Parameters
# Type Name Description
1 uint unk0 Does nothing.
2 uint unk1 Does nothing.

0xe4 - screen_WhiteOut

Changes the brightness of the screen to its maximum (i.e., a white screen) across a certain number of frames. This opcode will not affect:

  • Entities who have had their 4th "output" bit set to 1 (e.g., by using SetOutputAttribute(16); with them).
  • Portraits.
  • Textboxes.
Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
2 uint duration The number of frames used to change the Touch Screen's brightness.

0xe5 - screen_WhiteOutAll

Changes the brightness of the screen to its maximum (i.e., a white screen) across a certain number of frames. This opcode will affect everything on the Touch Screen.

Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
2 uint duration The number of frames used to change the Touch Screen's brightness.

0xe6 - screen2_FadeChange

Changes the brightness of the screen across a certain number of frames. This opcode will affect everything on the Top Screen.

Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true.
2 uint duration The number of frames used to change the Top Screen's brightness.
3 uint start_brightness The brightness level the opcode will begin at.
  • The minimum brightness is 0, which results in a black screen.
  • The default brightness is 256.
  • The maximum brightness is 512, which results in a white screen.
4 uint end_brightness The brightness level the opcode will end at.
  • The minimum brightness is 0, which results in a black screen.
  • The default brightness is 256.
  • The maximum brightness is 512, which results in a white screen.

0xe7 - screen2_FadeChangeAll

Does nothing.

Parameters
# Type Name Description
1 uint unk0 Does nothing.
2 uint unk1 Does nothing.
3 uint unk2 Does nothing.
4 uint unk3 Does nothing.

0xe8 - screen2_FadeIn

Changes the brightness of the screen to its default state across a certain number of frames. This opcode will affect everything on the Top Screen.

Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
2 uint duration The number of frames used to change the Top Screen's brightness.

0xe9 - screen2_FadeInAll

Does nothing.

Parameters
# Type Name Description
1 uint unk0 Does nothing.
2 uint unk1 Does nothing.

0xea - screen2_FadeOut

Changes the brightness of the screen to its minimum (i.e., a black screen) across a certain number of frames. This opcode will affect everything on the Top Screen.

Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
2 uint duration The number of frames used to change the Top Screen's brightness.

0xeb - screen2_FadeOutAll

Does nothing.

Parameters
# Type Name Description
1 uint unk0 Does nothing.
2 uint unk1 Does nothing.

0xec - screen2_FlushChange

Does nothing.

Parameters
# Type Name Description
1 uint unk0 Does nothing.
2 uint unk1 Does nothing.
3 uint unk2 Does nothing.
4 uint unk3 Does nothing.
5 uint unk4 Does nothing.
6 uint unk5 Does nothing.
7 uint unk6 Does nothing.
8 uint unk7 Does nothing.

0xed - screen2_FlushIn

The same as screen_FlushIn, but for the Top Screen.

Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
2 uint duration The number of frames used to change the Top Screen's color.
3 uint mode
  1. Completely darkens the Top Screen.
  2. Completely turns the Top Screen to a certain color.
  3. Instantly darkens the Top Screen?
  4. Overlays the Top Screen with a certain color.
  5. Instantly darkens the Top Screen?
  6. Overlays the Top Screen with hardcoded color bytes: 144, 144, and 255.
  7. Instantly darkens the Top Screen?
  8. Overlays the Top Screen with hardcoded color bytes: 255, 192, and 128.
  9. Instantly darkens the Top Screen?
  10. Overlays the Top Screen with hardcoded color bytes: All 255. The Top Screen is not turned completely white.
  11. Instantly overlays the Top Screen with hardcoded color bytes: All 255. The Top Screen is not turned completely white.
4 uint r Unused if mode is not 2 or 4. Byte used for the color red. Has a minimum of 0 and a maximium of 255.
5 uint g Unused if mode is not 2 or 4. Byte used for the color green. Has a minimum of 0 and a maximium of 255.
6 uint b Unused if mode is not 2 or 4. Byte used for the color blue. Has a minimum of 0 and a maximium of 255.

0xee - screen2_FlushOut

The same as screen_FlushOut, but for the Top Screen.

Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
2 uint duration The number of frames used to change the Top Screen's color.
3 uint mode
  1. Completely darkens the Top Screen.
  2. Completely turns the Top Screen to a certain color.
  3. Instantly darkens the Top Screen?
  4. Overlays the Top Screen with a certain color.
  5. Instantly darkens the Top Screen?
  6. Overlays the Top Screen with hardcoded color bytes: 144, 144, and 255.
  7. Instantly darkens the Top Screen?
  8. Overlays the Top Screen with hardcoded color bytes: 255, 192, and 128.
  9. Instantly darkens the Top Screen?
  10. Overlays the Top Screen with hardcoded color bytes: All 255. The Top Screen is not turned completely white.
  11. Instantly overlays the Top Screen with hardcoded color bytes: All 255. The Top Screen is not turned completely white.
4 uint r Unused if mode is not 2 or 4. Byte used for the color red. Has a minimum of 0 and a maximium of 255.
5 uint g Unused if mode is not 2 or 4. Byte used for the color green. Has a minimum of 0 and a maximium of 255.
6 uint b Unused if mode is not 2 or 4. Byte used for the color blue. Has a minimum of 0 and a maximium of 255.

0xef - screen2_WhiteChange

Changes the brightness of the screen across a certain number of frames. This opcode will affect everything on the Top Screen.

Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
2 uint duration The number of frames used to change the Top Screen's brightness.
3 uint start_brightness The brightness level the opcode will begin at.
  • The minimum brightness is 0, which results in a white screen.
  • The default brightness is 256.
  • The maximum brightness is 512, which results in a black screen.
4 uint end_brightness The brightness level the opcode will end at.
  • The minimum brightness is 0, which results in a white screen.
  • The default brightness is 256.
  • The maximum brightness is 512, which results in a black screen.

0xf0 - screen2_WhiteChangeAll

Does nothing.

Parameters
# Type Name Description
1 uint unk0 Does nothing.
2 uint unk1 Does nothing.
3 uint unk2 Does nothing.
4 uint unk3 Does nothing.

0xf1 - screen2_WhiteIn

Does nothing. Do not be deceived by this opcode's name: After using screen2_WhiteOut, use screen2_FadeIn to restore the Top Screen's brightness level!

Parameters
# Type Name Description
1 uint unk0 Does nothing.
2 uint unk1 Does nothing.

0xf2 - screen2_WhiteInAll

Does nothing.

Parameters
# Type Name Description
1 uint unk0 Does nothing.
2 uint unk1 Does nothing.

0xf3 - screen2_WhiteOut

Changes the brightness of the screen to its maximum (i.e., a white screen) across a certain number of frames. This opcode will affect everything on the Top Screen.

Parameters
# Type Name Description
1 uint suspension_flag Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
2 uint duration The number of frames used to change the Top Screen's brightness.

0xf4 - screen2_WhiteOutAll

Does nothing.

Parameters
# Type Name Description
1 uint unk0 Does nothing.
2 uint unk1 Does nothing.

0xf5 - se_ChangePan

Changes the panning of the currently-playing sound effect across a certain number of frames.

Parameters
# Type Name Description
1 uint se_id A sound effect defined in SOUND/SE of the ROM. Actually encoded as sound_bank_id << 8 + sound_id, but it can also be represented as an integer.
2 uint duration The number of frames used to change the SE's panning.
3 uint pan The panning of the SE. This parameter gets recalculated internally as ((pan * 0x3f + ((pan * 0x3f >> 7) >> 0x18)) >> 8) + 0x40, which is eventually split up into two halfwords, then recalculated further into a signed byte.

What this means is that:

  • A pan parameter of 260 will result in sound panning only to the right channel.
  • A pan parameter of 261 will result in sound panning only to the left channel.

More research on this parameter may be needed.

0xf6 - se_ChangeVolume

Changes the volume of the currently-playing sound effect across a certain number of frames.

Parameters
# Type Name Description
1 uint se_id A sound effect defined in SOUND/SE of the ROM. Actually encoded as sound_bank_id << 8 + sound_id, but it can also be represented as an integer.
2 uint duration The number of frames used to change the SE's volume.
3 uint volume The volume that the SE will play at. It has a maximum of 256 and a minimum of 0.

0xf7 - se_FadeOut

Fades out the currently-playing sound effect across a certain number of frames.

Parameters
# Type Name Description
1 uint se_id A sound effect defined in SOUND/SE of the ROM. Actually encoded as sound_bank_id << 8 + sound_id, but it can also be represented as an integer.
2 uint duration The number of frames used to fade out and silence a given SE.

0xf8 - se_Play

Instantly plays a sound effect.

Parameters
# Type Name Description
1 uint se_id A sound effect defined in SOUND/SE of the ROM. Actually encoded as sound_bank_id << 8 + sound_id, but it can also be represented as an integer.

0xf9 - se_PlayFull

Instantly plays a sound effect at a specified volume and panning.

Parameters
# Type Name Description
1 uint se_id A sound effect defined in SOUND/SE of the ROM. Actually encoded as sound_bank_id << 8 + sound_id, but it can also be represented as an integer.
2 uint volume The volume that the SE will play at. It has a maximum of 256 and a minimum of 0.
3 uint pan The panning of the SE. This parameter gets recalculated internally as ((pan * 0x3f + ((pan * 0x3f >> 7) >> 0x18)) >> 8) + 0x40, which is eventually split up into two halfwords, then recalculated further into a signed byte.

What this means is that:

  • A pan parameter of 260 will result in sound panning only to the right channel.
  • A pan parameter of 261 will result in sound panning only to the left channel.

More research on this parameter may be needed.

0xfa - se_PlayPan

Instantly plays a sound effect at a specified panning.

Parameters
# Type Name Description
1 uint se_id A sound effect defined in SOUND/SE of the ROM. Actually encoded as sound_bank_id << 8 + sound_id, but it can also be represented as an integer.
2 uint pan The panning of the SE. This parameter gets recalculated internally as ((pan * 0x3f + ((pan * 0x3f >> 7) >> 0x18)) >> 8) + 0x40, which is eventually split up into two halfwords, then recalculated further into a signed byte.

What this means is that:

  • A pan parameter of 260 will result in sound panning only to the right channel.
  • A pan parameter of 261 will result in sound panning only to the left channel.

More research on this parameter may be needed.

0xfb - se_PlayVolume

Instantly plays a sound effect at a specified volume.

Parameters
# Type Name Description
1 uint se_id A sound effect defined in SOUND/SE of the ROM. Actually encoded as sound_bank_id << 8 + sound_id, but it can also be represented as an integer.
2 uint volume The volume that the SE will play at. It has a maximum of 256 and a minimum of 0.

0xfc - se_Stop

Instantly stops a specified sound effect.

Parameters
# Type Name Description
1 uint se_id A sound effect defined in SOUND/SE of the ROM. Actually encoded as sound_bank_id << 8 + sound_id, but it can also be represented as an integer.

0xfd - SetAnimation

Plays a sprite's animation, optionally changing its speed and animation flags.

Parameters
# Type Name Description
1 uint id Animation table index. Converted to an Animation ID for the current sprite using the SetAnimation table.

0xfe - SetAttribute

Does nothing.

Parameters
# Type Name Description
1 uint unk0 Does nothing.

0xff - SetBlink

Sets a specific entity (i.e., an actor, object, or performer) to continuously flicker in and out of view at a certain interval.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint visible_interval The number of frames to wait for while the entity is visible.
2 uint invisible_interval The number of frames to wait for while the entity is invisible.

0x100 - SetDirection

Instantly sets a specific entity (i.e., an actor, object, or performer) to a specified direction.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 Direction direction The type of direction, the list of which can be seen by typing DIR_ in SkyTemple's Script Engine Debugger.

0x101 - SetDirectionLives

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint unk1

0x102 - SetEffect

<TO DO: Opcode description>

Parameters
# Type Name Description
1 Effect effect_id
2 uint position_marker_id?

0x103 - SetFunctionAttribute

<TO DO: Opcode description>

Parameters
# Type Name Description
1 bitfield unk0

0x104 - SetHeight

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0

0x105 - SetHitAttribute

<TO DO: Opcode description>

Parameters
# Type Name Description
1 bitfield unk0

0x106 - SetMoveRange

<TO DO: Opcode description>

Parameters
# Type Name Description
1 PositionMark pos_marker
5 uint unk4
6 uint unk5

0x107 - SetOutputAttribute

<TO DO: Opcode description>

Parameters
# Type Name Description
1 bitfield unk0

0x108 - SetPosition

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint x
2 uint y

0x109 - SetPositionInitial

<TO DO: Opcode description>

No parameters.

0x10a - SetPositionLives

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0

0x10b - SetPositionMark

<TO DO: Opcode description>

Parameters
# Type Name Description
1 PositionMark pos_marker

0x10c - SetPositionOffset

<TO DO: Opcode description>

Parameters
# Type Name Description
1 sint x
2 sint y

0x10d - SetPositionOffsetRandom

<TO DO: Opcode description>

Parameters
# Type Name Description
1 sint x
2 sint y

0x10e - SetReplyAttribute

<TO DO: Opcode description>

Parameters
# Type Name Description
1 bitfield unk0

0x10f - SetupOutputAttributeAndAnimation

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint unk1
3 uint unk2

0x110 - Slide2Position

Moves an entity (i.e., an actor, object, or performer) to a specific pixel position without animation. Must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.Values starting at 32770 and above will be slower than a value of 1.
2 uint x The pixel position on the X-axis.
3 uint y The pixel position on the Y-axis.

0x111 - Slide2PositionLives

Moves an entity (i.e., an actor, object, or performer) to an actor without animation. Must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.Values starting at 32770 and above will be slower than a value of 1.
2 uint actor_id The ID of the actor to move the entity to.

0x112 - Slide2PositionMark

Moves an entity (i.e., an actor, object, or performer) to one or more Position Marks without animation, and without restricting the angles used.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint num_parameters The number of parameters to read from this opcode.
2+ PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

This parameter may be repeated multiple times.

0x113 - Slide2PositionMark

Moves an entity (i.e., an actor, object, or performer) to a Position Mark without animation, and without restricting the angles used.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement. Values starting at 32770 and above will be slower than a value of 1.
2 PositionMark pos_mark A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

0x114 - Slide2PositionOffset

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint num_parameters
2+ sint x These two parameters may be repeated multiple times
3+ sint y

0x115 - Slide2PositionOffset

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint speed
2 sint x
3 sint y

0x116 - Slide2PositionOffsetRandom

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint speed
2 sint x
3 sint y

0x117 - Slide3Position

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint speed
2 uint x
3 uint y

0x118 - Slide3PositionLives

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint speed
2 uint actor_id

0x119 - Slide3PositionMark

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint num_parameters
2+ PositionMark pos_marker This parameter may be repeated multiple times

0x11a - Slide3PositionMark

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint speed
2 PositionMark pos_marker

0x11b - Slide3PositionOffset

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint num_parameters
2+ sint x These two parameters may be repeated multiple times
3+ sint y

0x11c - Slide3PositionOffset

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint speed
2 sint x
3 sint y

0x11d - Slide3PositionOffsetRandom

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint speed
2 sint x
3 sint y

0x11e - SlideHeight

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint unk1

0x11f - SlidePosition

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint x
3 uint y

0x120 - SlidePositionLives

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint unk1

0x121 - SlidePositionLivesTime

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint unk1
3 uint unk2

0x122 - SlidePositionMark

Moves an entity (i.e., an actor, object, or performer) to a Position Mark while restricting movement by eight angles—as if movement was performed using the D-Pad. Unlike MovePositionMark, this will not turn the entity to face the direction they are moving in.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint num_parameters The number of parameters to read from this opcode.
2+ PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

This parameter may be repeated multiple times.

0x123 - SlidePositionMark

Moves an entity (i.e., an actor, object, or performer) to a Position Mark while restricting movement by eight angles—as if movement was performed using the D-Pad. Unlike MovePositionMark, this will not turn the entity to face the direction they are moving in.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.

Values starting at 32770 and above will be slower than a value of 1.

2 PositionMark pos_marker A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.

0x124 - SlidePositionMarkTime

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint unk1
3 PositionMark pos_marker

0x125 - SlidePositionOffset

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint num_parameters
2+ sint x This parameter may be repeated multiple times

0x126 - SlidePositionOffset

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint speed
2 sint x
3 sint y

0x127 - sound_FadeOut

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0

0x128 - sound_Stop

<TO DO: Opcode description>

No parameters.

0x129 - StopAnimation

<TO DO: Opcode description>

No parameters.

0x12a - supervision_Acting

Loads a sector of the Acting scene.

Parameters
# Type Name Description
1 uint layer_id The ID of the sector to load.

0x12b - supervision_ActingInvisible

Loads a sector of the Acting scene. Actors and objects in this sector will be invisible.

Parameters
# Type Name Description
1 uint layer_id The ID of the sector to load.

0x12c - supervision_ExecuteActing

Loads a specified Acting script from the specified level from within Enter/Acting/Sub scripts.

Parameters
# Type Name Description
1 Level level
2 ConstString script_id
3 uint unk2

0x12d - supervision_ExecuteActingSub

Loads a specified Acting script from the specified level from within Unionall

Parameters
# Type Name Description
1 Level level
2 ConstString script_id
3 uint unk2

0x12e - supervision_ExecuteCommon

Loads a specified Unionall coroutine from within Enter/Acting/Sub scripts.

Parameters
# Type Name Description
1 Routine coro_id

0x12f - supervision_ExecuteEnter

Loads an Enter script from the specified level.

Parameters
# Type Name Description
1 uint level_id An entry in the Level list.

0x130 - supervision_ExecuteStation

<TO DO: Opcode description>

Parameters
# Type Name Description
1 Level level
2 ConstString script_id
3 uint unk2

0x131 - supervision_ExecuteStationCommon

<TO DO: Opcode description>

Parameters
# Type Name Description
1 Level level
2 uint unk1

0x132 - supervision_ExecuteStationCommonSub

<TO DO: Opcode description>

Parameters
# Type Name Description
1 Level level
2 uint unk1

0x133 - supervision_ExecuteStationSub

<TO DO: Opcode description>

Parameters
# Type Name Description
1 Level level
2 ConstString script_id
3 uint unk2

0x134 - supervision_ExecuteExport

Loads a specified Acting scene of the level S00P01A

Parameters
# Type Name Description
1 ConstString script_id

0x135 - supervision_ExecuteExportSub

<TO DO: Opcode description>

Parameters
# Type Name Description
1 ConstString const

0x136 - supervision_LoadStation

<TO DO: Opcode description>

Parameters
# Type Name Description
1 Level level
2 ConstString script_id

0x137 - supervision_Remove

Unloads a sector of the Sub scene.

Parameters
# Type Name Description
1 uint layer_id The ID of the sector to unload.

0x138 - supervision_RemoveActing

Unloads a sector of the Acting scene.

Parameters
# Type Name Description
1 uint layer_id The ID of the sector to unload.

0x139 - supervision_RemoveCommon

Unloads a sector of the Enter scene.

Parameters
# Type Name Description
1 uint layer_id The ID of the sector to unload.

0x13a - supervision_SpecialActing

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint unk1
3 uint unk2

0x13b - supervision_Station

Loads a sector of the Sub scene.

Parameters
# Type Name Description
1 uint station_id The ID of the sector to load.

0x13c - supervision_StationCommon

Loads a sector of the Enter scene.

Parameters
# Type Name Description
1 uint station_id The ID of the sector to load.

0x13d - supervision_Suspend

<TO DO: Opcode description>

Parameters
# Type Name Description
1 sint unk0

0x13e - supervision2_SpecialActing

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint unk1
3 uint unk2

0x14c - Turn2Direction

Makes an actor rotate to a specified direction.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed How fast the actor turns. The higher the number, the slower the turn.
2 uint rotationdirection The way that the actor will turn to face the specified direction. 1 = clockwise, 2 = counterclockwise, 10 = the most efficient direction to turn.
3 Direction direction The direction that the actor will turn to face.

0x14d - Turn2DirectionLives

Makes an actor rotate to face another actor. Must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed How fast the actor turns. The higher the number, the slower the turn.
2 uint rotationdirection The way that the actor will turn to face the specified direction. 1 = clockwise, 2 = counterclockwise, 10 = the most efficient direction to turn.
3 Entity actor_id The target actor that the actor will turn to face.

0x14e - Turn2DirectionLives2

Makes an actor rotate to face another actor. Must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed How fast the actor turns. The higher the number, the slower the turn.
2 uint rotationdirection The way that the actor will turn to face the specified direction. 1 = clockwise, 2 = counterclockwise, 10 = the most efficient direction to turn.
3 uint actor_id ID of the target actor from Level List that the actor will turn to face.

0x14f - Turn2DirectionMark

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint unk1
3 PositionMark pos_marker
4 uint unk6
5 uint unk7

0x150 - Turn2DirectionTurn

Makes an actor turn at a certain angle.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

Parameters
# Type Name Description
1 uint speed How fast the actor turns. The higher the number, the slower the turn.
2 uint rotationdirection The way that the actor will turn to face the specified direction. 1 = clockwise, 2 = counterclockwise, 10 = the most efficient direction to turn.
3 uint angle 1: 45 degrees left, 2: 45 degrees right, 3: 90 degrees right, 4: 90 degrees left, 5: 180 degrees

0x151 - Turn3

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint unk1
3 uint unk2
4 uint unk3

0x152 - TurnDirection

<TO DO: Opcode description>

Parameters
# Type Name Description
1 Direction direction

0x153 - TurnDirectionLives

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint unk1

0x154 - TurnDirectionLives2

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint unk1

0x155 - TurnDirectionMark

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 PositionMark pos_marker

0x156 - Unlock

Resumes the routine that was suspended when Lock was called with the specified lock_id.

Parameters
# Type Name Description
1 uint lock_id The ID of a Lock, ranged from 0-19 (inclusive).

0x157 - Wait

Pauses the routine for a set number of frames. After the number of frames, the routine will resume.

Parameters
# Type Name Description
1 uint duration The number of frames that the routine will wait for before resuming.

0x158 - WaitAnimation

Pauses the routine until the specified actor has finished its animation. After the actor finishes its animation, the routine will resume.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

0x159 - WaitBackEffect

Pauses the current routine until back_SetBackEffect is called.

No parameters.

0x15a - WaitBack2Effect

Pauses the current routine until back2_SetBackEffect is called.

No parameters.

0x15b - WaitBgm

Pauses the current routine until the specified BGM on the first BGM track has ended. After the BGM ends, the routine will resume.

Parameters
# Type Name Description
1 Bgm bgm_id A non-looped music track defined in SOUND/BGM of the ROM. Looped music tracks softlocks the game.

0x15c - WaitBgm2

Pauses the current routine until the specified BGM on the second BGM track has ended. After the BGM ends, the routine will resume.

Parameters
# Type Name Description
1 Bgm bgm_id A non-looped music track defined in SOUND/BGM of the ROM. Looped music tracks softlocks the game.

0x15d - WaitBgmSignal

Pauses the routine until a DSE event with ID 0xF6 on the current BGM track is triggered. This can be used to sync certain parts of the scene to the background music.

No parameters.

0x15e - WaitEffect

Pauses the routine until the effect on the specified actor/peformer has ended. After the effect ends, the routine will resume.

This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.

0x15f - WaitEndAnimation

<TO DO: Opcode description>

No parameters.

0x160 - WaitExecuteLives

Pauses the routine until the specified actor has finished its action (Move2Position, Slide2Position, etc.). After the actor finishes its action, the routine will resume.

Parameters
# Type Name Description
1 Entity actor_id The actor that the routine will wait for.

0x161 - WaitExecuteObject

Pauses the current routine until the specified object has finished its action (Move2Position, Slide2Position, etc.). After the object finishes its action, the routine will resume.

Parameters
# Type Name Description
1 Object object_id The ID of the object that the routine will wait for.

0x162 - WaitExecutePerformer

Pauses the current routine until the specified performer has finished its current action (Move2Position, Slide2Position, etc.) After the performer has finished its action, the routine will resume.

Parameters
# Type Name Description
1 uint performer_id The ID of the performer that the routine will wait for.

0x163 - WaitFadeIn

Pauses the current routine and waits for the screen to fade in. After the screen fades in, the routine will resume.

No parameters.

0x164 - WaitLockLives

Pauses the current routine until a Lock opcode with the specified lock_id is reached in the specified actor's targeted routine. After the lock is reached, the routine will resume.

Parameters
# Type Name Description
1 uint lock_id
2 Entity actor

0x165 - WaitLockObject

Pauses the current routine until a Lock opcode with the specified lock_id is reached in the specified object's targeted routine. After the lock is reached, the routine will resume.

Parameters
# Type Name Description
1 uint lock_id
2 Object object

0x166 - WaitLockPerformer

Pauses the current routine until a Lock opcode with the specified lock_id is reached in the specified performer's targeted routine. After the lock is reached, the routine will resume.

Parameters
# Type Name Description
1 uint lock_id
2 uint performer

0x167 - WaitLockSupervision

Pauses the current routine until a Lock opcode with the specified lock_id is reached in def 0. After the lock is reached, the routine will resume.

Parameters
# Type Name Description
1 uint lock_id

0x168 - WaitMe

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0

0x169 - WaitMoveCamera

<TO DO: Opcode description>

No parameters.

0x16a - WaitMoveCamera2

<TO DO: Opcode description>

No parameters.

0x16b - WaitRandom

Pauses the routine for a random number of frames. After the number of frames, the routine will resume.

Parameters
# Type Name Description
1 uint duration_min Minimum number of frames that the routine will wait for before resuming.
2 uint duration_max Maximum number of frames that the routine will wait for before resuming.

0x16c - WaitScreenFade

Waits until screen_FadeIn finishes executing.

No parameters.

0x16d - WaitScreenFadeAll

Waits until screen_FadeInAll finishes executing.

No parameters.

0x16e - WaitScreen2Fade

Waits until screen2_FadeIn finishes executing.

No parameters.

0x16f - WaitSe

Pauses the current routine until the specified sound effect has ended. After the sound effect ends, the routine will resume.

Parameters
# Type Name Description
1 uint se_id The ID of the sound to wait for the end of before resuming the routine.

0x170 - WaitSpecialActing

<TO DO: Opcode description>

No parameters.

0x171 - WaitSubScreen

<TO DO: Opcode description>

No parameters.

0x172 - WaitSubSpecialActing

<TO DO: Opcode description>

No parameters.

0x173 - worldmap_BlinkMark

Shows a blinking world map marker.

Parameters
# Type Name Description
1 uint world_map_marker_id

0x174 - worldmap_ChangeLevel

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0

0x175 - worldmap_DeleteArrow

Remove the yellow arrow from the world map.

No parameters.

0x176 - worldmap_MoveCamera

Moves the camera to the specified world map marker.

Parameters
# Type Name Description
1 uint world_map_marker_id

0x177 - worldmap_OffMessage

Removes a textbox with the world map marker's name from the Top Screen

No parameters.

0x178 - worldmap_SetArrow

Shows an arrow pointing to a specified world map marker

Parameters
# Type Name Description
1 uint world_map_marker_id

0x179 - worldmap_SetCamera

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0

0x17a - worldmap_SetLevel

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0

0x17b - worldmap_SetMark

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0

0x17c - worldmap_SetMessage

<TO DO: Opcode description>

Parameters
# Type Name Description
1 String txt

0x17d - worldmap_SetMessagePlace

Shows a textbox on the Top Screen with the specified world map marker's name.

Parameters
# Type Name Description
1 uint world_map_marker_id

0x17e - worldmap_SetMode

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0

Other Opcodes

These opcodes cannot be directly called from ExplorerScript, since they are represented as higher-level constructs.

0x28 - Branch

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var
2 uint value
3 uint jump_address

0x29 - BranchBit

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var
2 uint index
3 uint jump_address

0x2a - BranchDebug

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint param
2 uint jump_address

0x2b - BranchEdit

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint param
2 uint jump_address

0x2c - BranchExecuteSub

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint jump_address

0x2d - BranchPerformance

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint index
2 uint value
3 uint jump_address

0x2e - BranchScenarioNow

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var
2 uint unk1
3 uint unk2
4 uint jump_address

0x2f - BranchScenarioNowAfter

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var
2 uint unk1
3 uint unk2
4 uint jump_address

0x30 - BranchScenarioNowBefore

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var
2 uint unk1
3 uint unk2
4 uint jump_address

0x31 - BranchScenarioAfter

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var
2 uint unk1
3 uint unk2
4 uint jump_address

0x32 - BranchScenarioBefore

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var
2 uint unk1
3 uint unk2
4 uint jump_address

0x33 - BranchSum

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint unk1
3 uint unk2
4 uint jump_address

0x34 - BranchValue

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var
2 uint operator
3 uint value
4 uint jump_address

0x35 - BranchVariable

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var
2 uint operator
3 GameVar cmp_var
4 uint jump_address

0x36 - BranchVariation

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint param
2 uint jump_address

0x37 - Call

Jumps to the specified address, runs code, and returns to the line of code in which this opcode was used (only if return; was used in the routine this opcode calls).

Parameters
# Type Name Description
1 uint jump_address The address to call, e.g., call @label_0; if §label_0; is defined in the script.

0x63 - Case

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint value
2 uint jump_address

0x64 - CaseMenu

<TO DO: Opcode description>

Parameters
# Type Name Description
1 String choice
2 uint jump_address

0x65 - CaseMenu2

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint? choice?
2 uint jump_address

0x66 - CaseScenario

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint operator
2 uint value
3 uint jump_address

0x67 - CaseText

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint value
2 String display

0x68 - CaseValue

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint operator
2 uint value
3 uint jump_address

0x69 - CaseVariable

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint operator
2 GameVar var
3 uint jump_address

0x6e - DefaultText

<TO DO: Opcode description>

Parameters
# Type Name Description
1 String txt

0x70 - End

<TO DO: Opcode description>

No parameters.

0x74 - flag_CalcBit

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var
2 uint index
3 uint value

0x75 - flag_CalcValue

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var
2 uint calc_operator
3 uint value

0x76 - flag_CalcVariable

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var
2 uint calc_operator
3 GameVar var_to_set_from

0x77 - flag_Clear

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var

0x78 - flag_Initial

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var

0x79 - flag_Set

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var
2 uint value

0x7a - flag_ResetDungeonResult

<TO DO: Opcode description>

No parameters.

0x7b - flag_ResetScenario

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var

0x7c - flag_SetAdventureLog

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0

0x7d - flag_SetDungeonMode

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint dungeon_id
2 DungeonMode dungen_mode

0x7e - flag_SetDungeonResult

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint unk1

0x7f - flag_SetPerformance

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint index
2 uint value

0x80 - flag_SetScenario

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var
2 uint scenario_value
3 uint level_value

0x82 - Hold

<TO DO: Opcode description>

No parameters.

0x87 - Jump

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint jump_address

0x89 - lives

<TO DO: Opcode description>

Parameters
# Type Name Description
1 Entity actor_id

0xaa - message_SwitchMenu

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint unk1

0xab - message_SwitchMenu2

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0
2 uint unk1
3 uint unk2

0xac - message_SwitchMonologue

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var

0xad - message_SwitchTalk

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var

0xc9 - object

<TO DO: Opcode description>

Parameters
# Type Name Description
1 Object object_id

0xcb - performer

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint performer_id

0xd5 - Return

<TO DO: Opcode description>

No parameters.

0x13f - Switch

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var

0x140 - SwitchDirection

<TO DO: Opcode description>

Parameters
# Type Name Description
1 Direction direction

0x141 - SwitchDirectionLives

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0

0x142 - SwitchDirectionLives2

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0

0x143 - SwitchDirectionMark

<TO DO: Opcode description>

Parameters
# Type Name Description
1 PositionMark pos_marker

0x144 - SwitchDungeonMode

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint dungeon_id

0x145 - SwitchLives

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint unk0

0x146 - SwitchRandom

<TO DO: Opcode description>

Parameters
# Type Name Description
1 uint max_value

0x147 - SwitchScenario

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var

0x148 - SwitchScenarioLevel

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var

0x149 - SwitchSector

<TO DO: Opcode description>

No parameters.

0x14a - SwitchValue

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var
2 uint unk1
3 uint unk2

0x14b - SwitchVariable

<TO DO: Opcode description>

Parameters
# Type Name Description
1 GameVar var
2 uint unk1
3 uint unk2