List of Opcodes: Difference between revisions

Adex (talk | contribs)
m A bit more opcodes, up to 0x8E
Happylappy (talk | contribs)
m World Map Mode documentation
 
(105 intermediate revisions by 10 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 70: Line 92:
* The Map Background's Layer 1 X-axis.
* The Map Background's Layer 1 X-axis.


Which one the game performs for a given Level seems to be hardcoded.
Which one the game performs for a given Level is hardcoded.
|-
|-
|2
|2
Line 80: Line 102:
* The Map Background's Layer 2 X-axis.
* The Map Background's Layer 2 X-axis.


Which one the game performs for a given Level seems to be hardcoded.
Which one the game performs for a given Level is hardcoded.
|}
|}
=== 0x4 - back_SetBackScrollSpeed ===
=== 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.
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.
Line 96: Line 119:
|-
|-
|1
|1
|sint
|sint16
|speed0
|speed0
|The speed to scroll either:
|The speed to scroll either:
Line 106: Line 129:
|-
|-
|2
|2
|sint
|sint16
|speed1
|speed1
|The speed to scroll either:
|The speed to scroll either:
Line 190: 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 ===
Displays a specific string using the <code>FONT/banner.bin:FONT/b_pal.bin</code> font, editable in the Misc. Graphics tab of SkyTemple. The text chosen is defined in Dungeons tab as a dungeon's <code>back_SetDunegonBanner</code> string. This opcode will delete any actors, objects, and performers that are currently loaded.
Displays a specific string using the <code>FONT/banner.bin:FONT/b_pal.bin</code> font, editable in the Misc. Graphics tab of SkyTemple. The text chosen is defined in Dungeons tab as a dungeon's <code>back_SetDungeonBanner</code> string. This opcode will delete any actors, objects, and performers that are currently loaded.


{| class="wikitable"
{| class="wikitable"
Line 230: Line 254:
|}
|}
=== 0x9 - back_SetGround ===
=== 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.
Sets the Map Background from a Level. Upon using this opcode, the variable <code>$GROUND_MAP</code> will be updated to match the ID of the chosen Level. This opcode will delete any actors, objects, and performers that are currently loaded.


{| class="wikitable"
{| class="wikitable"
Line 327: Line 351:
|String
|String
|title
|title
|The title displayed onscreen.
|The title displayed on the Touch Screen.
|}
|}
=== 0xe - back_SetWeather ===
=== 0xe - back_SetWeather ===
Line 358: Line 382:
|}
|}
=== 0xf - back_SetWeatherEffect ===
=== 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.
Currently unknown. The only values this opcode accepts seems to be 1, 2, and 3. Value 3 was previously used in S02P01A/m00a01a.ssb in Time/Darkness, for its iteration of the personality test. In Sky, its only use is in V00P02/m01a04a.ssb, which is a leftover test script used by the developers to test the visuals of the Time/Darkness iteration of the aura test.


{| class="wikitable"
{| class="wikitable"
Line 373: Line 397:
|Currently unknown.
|Currently unknown.
|}
|}
=== 0x10 - back_SetWeatherScrollOffset ===
=== 0x10 - back_SetWeatherScrollOffset ===
Currently unknown. This opcode is not used in the base game.
Currently unknown. This opcode is not used in the base game.
Line 428: Line 453:
|1
|1
|uint
|uint
|effect
|effect_id
|
|
# The default state of the Animation Palette.
# The default state of the Animation Palette.
Line 533: Line 558:
|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 580: Line 608:
|1
|1
|sint
|sint
|mode_id
|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.
|A value of 0 is no mode. A negative value seems to set the Top Screen to the overworld's current Top Screen setting.


Line 587: Line 615:
# The Map Background S01P01A with the hero idling on a World Map Marker.
# The Map Background S01P01A with the hero idling on a World Map Marker.
# Allows for the Top Screen to display a Map Background from a Level using the <code>back2_SetGround</code> opcode.
# Allows for the Top Screen to display a Map Background from a Level using the <code>back2_SetGround</code> opcode.
# Splits the Map Background used in the Level defined by <code>back_SetGround</code> equally between the Top and Bottom Screen.
# Splits the Map Background used in the Level defined by <code>back_SetGround</code> equally between the Top and Touch Screen.
#Splits the Map Background used in the Level defined by <code>back_SetGround</code> between the Top and Bottom Screen.
#Splits the Map Background used in the Level defined by <code>back_SetGround</code> between the Top and Touch Screen.
|}
|}
=== 0x19 - back2_SetSpecialActing ===
=== 0x19 - back2_SetSpecialActing ===
Line 754: Line 782:
|uint
|uint
|duration
|duration
|The number of frames to fade in the BGM.
|The number of frames used to fade in the BGM.
|-
|-
|3
|3
Line 779: Line 807:
|uint
|uint
|duration
|duration
|The number of frames to change the BGM's volume.
|The number of frames used to change the BGM's volume.
|-
|-
|2
|2
Line 836: Line 864:
|uint
|uint
|duration
|duration
|The number of frames to fade in the BGM.
|The number of frames used to fade in the BGM.
|-
|-
|3
|3
Line 882: Line 910:
|-
|-
|1
|1
|Coroutine
|Routine
|coro_id
|coro_id
|One of the 701 possible Unionall Coroutines.
|One of the 701 possible Unionall Coroutines.
Line 900: Line 928:
|uint
|uint
|speed
|speed
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
|Movement speed. Higher values result in a faster speed.  
Values starting at 32770 and above will be slower than a value of 1.
Values starting at 32770 and above will be slower than a value of 1.
|}
|}
Line 919: Line 947:
|uint
|uint
|speed
|speed
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
|Movement speed. Higher values result in a faster speed.  
Values starting at 32770 and above will be slower than a value of 1.
Values starting at 32770 and above will be slower than a value of 1.
|}
|}
Line 938: Line 966:
|uint
|uint
|speed
|speed
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
|Movement speed. Higher values result in a faster speed.  
Values starting at 32770 and above will be slower than a value of 1.
Values starting at 32770 and above will be slower than a value of 1.
|}
|}
Line 977: Line 1,005:
|uint
|uint
|speed
|speed
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
|Movement speed. Higher values result in a faster speed.  
Values starting at 32770 and above will be slower than a value of 1.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
Line 1,094: Line 1,122:
|uint
|uint
|speed
|speed
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
|Movement speed. Higher values result in a faster speed.  
Values starting at 32770 and above will be slower than a value of 1.
Values starting at 32770 and above will be slower than a value of 1.
|}
|}
Line 1,113: Line 1,141:
|uint
|uint
|speed
|speed
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
|Movement speed. Higher values result in a faster speed.  
Values starting at 32770 and above will be slower than a value of 1.
Values starting at 32770 and above will be slower than a value of 1.
|}
|}
Line 1,132: Line 1,160:
|uint
|uint
|speed
|speed
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
|Movement speed. Higher values result in a faster speed.  
Values starting at 32770 and above will be slower than a value of 1.
Values starting at 32770 and above will be slower than a value of 1.
|}
|}
Line 1,171: Line 1,199:
|uint
|uint
|speed
|speed
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
|Movement speed. Higher values result in a faster speed.  
Values starting at 32770 and above will be slower than a value of 1.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
Line 1,254: Line 1,282:
|uint
|uint
|speed
|speed
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
|Movement speed. Higher values result in a faster speed.  
Values starting at 32770 and above will be slower than a value of 1.
Values starting at 32770 and above will be slower than a value of 1.
|}
|}
Line 1,271: Line 1,299:
|uint
|uint
|speed
|speed
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
|Movement speed. Higher values result in a faster speed.  
Values starting at 32770 and above will be slower than a value of 1.
Values starting at 32770 and above will be slower than a value of 1.
|}
|}
Line 1,288: Line 1,316:
|uint
|uint
|speed
|speed
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
|Movement speed. Higher values result in a faster speed.  
Values starting at 32770 and above will be slower than a value of 1.
Values starting at 32770 and above will be slower than a value of 1.
|}
|}
Line 1,327: Line 1,355:
|uint
|uint
|speed
|speed
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
|Movement speed. Higher values result in a faster speed.  
Values starting at 32770 and above will be slower than a value of 1.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
Line 1,440: Line 1,468:
|uint
|uint
|speed
|speed
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
|Movement speed. Higher values result in a faster speed.  
Values starting at 32770 and above will be slower than a value of 1.
Values starting at 32770 and above will be slower than a value of 1.
|}
|}
Line 1,457: Line 1,485:
|uint
|uint
|speed
|speed
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
|Movement speed. Higher values result in a faster speed.  
Values starting at 32770 and above will be slower than a value of 1.
Values starting at 32770 and above will be slower than a value of 1.
|}
|}
Line 1,474: Line 1,502:
|uint
|uint
|speed
|speed
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
|Movement speed. Higher values result in a faster speed.  
Values starting at 32770 and above will be slower than a value of 1.
Values starting at 32770 and above will be slower than a value of 1.
|}
|}
Line 1,513: Line 1,541:
|uint
|uint
|speed
|speed
|Movement speed. Higher values result in a faster speed. 0 will result in an instant movement.
|Movement speed. Higher values result in a faster speed.  
Values starting at 32770 and above will be slower than a value of 1.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
Line 1,597: Line 1,625:
|-
|-
|1
|1
|Coroutine
|Routine
|coro_id
|coro_id
|One of the 701 possible Unionall Coroutines.
|One of the 701 possible Unionall Coroutines.
Line 1,674: Line 1,702:
|GameVar
|GameVar
|var
|var
|One of the 115 possible script variables. A two-indexed variable (e.g., $SCENARIO_MAIN) is encouraged to use.
|One of the 115 possible script variables. A two-indexed variable (e.g., <code>$SCENARIO_MAIN</code>) is encouraged to use.
|-
|-
|2
|2
Line 1,734: Line 1,762:
|}
|}
=== 0x81 - Flash ===
=== 0x81 - Flash ===
Currently unknown; it does not seem to affect much. This opcode is not used in the base game.
Zeroes-out the return address used by the <code>Return</code> opcode. This opcode is not used in the base game.


No parameters.
No parameters.
Line 1,756: Line 1,784:
|GameVar
|GameVar
|var
|var
|One of the 115 possible script variables.
|One of the indexed variables. Non-indexed values causes the IndexError.
|}
|}
=== 0x84 - item_Set ===
=== 0x84 - item_Set ===
Line 1,762: Line 1,790:


Items in slot 0 may also be added to the player's bag and storage with hardcoded menus, such as <code>message_Menu(MENU_GIVE_ITEM);</code> and <code>message_Menu(MENU_GIVE_ITEM2);</code>, respectively. Additionally, the text tag <code>[s_item:X]</code> will display the item's name, where X is the item slot number.
Items in slot 0 may also be added to the player's bag and storage with hardcoded menus, such as <code>message_Menu(MENU_GIVE_ITEM);</code> and <code>message_Menu(MENU_GIVE_ITEM2);</code>, respectively. Additionally, the text tag <code>[s_item:X]</code> will display the item's name, where X is the item slot number.
Item slots 0-3 are safe to use, but item slots 4 and beyond will begin to overwrite other memory!


{| class="wikitable"
{| class="wikitable"
Line 1,779: Line 1,809:
|uint
|uint
|item_id
|item_id
|The ID of the item, where all are listed in the Items tab of SkyTemple.
|The ID of the item, where all are listed in the Items tab of SkyTemple.  
|-
|-
|3
|3
Line 1,806: Line 1,836:
|2
|2
|uint
|uint
|table
|table_ID
|Some unknown item tables related to Spinda's Cafe.
|Some item tables related to Spinda's Cafe.
|}
|}
=== 0x86 - item_SetVariable ===
The table IDs themselves are as follows. Values above 15 are currently unknown and untested.  
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 <code>message_Menu(MENU_GIVE_ITEM);</code> and <code>message_Menu(MENU_GIVE_ITEM2);</code>, respectively. Additionally, the text tag <code>[s_item:X]</code> will display the item's name, where X is the item slot number.
 
{| class="wikitable"
{| class="wikitable"
|+Parameters
|-
!#
!#
!Type
!Description
!Name
!#
!Description
!Description
|-
|0
|Sky Gift Item Pool
|8
|Silver Ticket Win Pool
|-
|-
|1
|1
|uint
|Numel "Give" Item Pool
|slot
|9
|An item slot used by many <code>item_</code> opcodes.
|Silver Ticket Big Win Pool
|-
|-
|2
|2
|GameVar
|Numel "Recieve" Item Pool
|var
|10
|Gold Ticket Loss Pool
|-
|3
|Happiny Lost Item Pool
|11
|Gold Ticket Win Pool
|-
|4
|Prize Ticket Loss Pool
|12
|Gold Ticket Big Win Pool
|-
|5
|Prize Ticket Win Pool
|13
|Prism Ticket Loss Pool
|-
|6
|Prize Ticket Big Win Pool
|14
|Prism Ticket Win Pool
|-
|7
|Silver Ticket Loss Pool
|15
|Prism Ticket Big Win Pool
|}
 
=== 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 <code>message_Menu(MENU_GIVE_ITEM);</code> and <code>message_Menu(MENU_GIVE_ITEM2);</code>, respectively. Additionally, the text tag <code>[s_item:X]</code> will display the item's name, where X is the item slot number.
 
{| class="wikitable"
|+Parameters
|-
!#
!Type
!Name
!Description
|-
|1
|uint
|slot
|An item slot used by many <code>item_</code> opcodes.
|-
|2
|GameVar
|var
|One of the 115 possible script variables.
|One of the 115 possible script variables.
|}
|}
Line 1,844: Line 1,922:
|-
|-
|1
|1
|Coroutine
|Routine
|coro_id
|coro_id
|One of the 701 possible Unionall Coroutines.
|One of the 701 possible Unionall Coroutines.
Line 1,896: Line 1,974:
|sint
|sint
|mode
|mode
|Most modes are not known, but 32767 opens the crossroads menu, and 251 stops the current script to reload Unionall starting from the Coroutine CORO_MOVE_WORLD_MAP.
|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
|2
Line 1,904: Line 1,985:
|}
|}
=== 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 1,917: Line 2,000:
|sint
|sint
|dungeon_id
|dungeon_id
|The dungeon ID to enter, which are all listed in the Dungeons tab of SkyTemple. A value of -1 actually enters the dungeon—it is insufficient to use this opcode a single time to enter a specific dungeon.
|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
|2
|uint
|uint
|duration
|duration
|The number of frames to fade out the screens.
|The number of frames used to fade out the screens.
|}
|}
=== 0x8e - main_EnterGround ===
=== 0x8e - main_EnterGround ===
Stops the current script to reload Unionall starting from the Coroutine CORO_EVENT_DIVIDE. This opcode also updates various <code>$GROUND_</code> variables to reflect the previously-loaded Level and the new Level being entered. In the base game, using this opcode allows for transitioning between Levels in the Overworld, as the game will eventually run the <code>supervision_ExecuteEnter</code> opcode.
Stops the current script to reload Unionall starting from the Coroutine CORO_EVENT_DIVIDE. This opcode also updates the following script variables:
 
* <code>$GROUND_ENTER</code>: This opcode's ''level_id_enter'' parameter.
* <code>$GROUND_ENTER_LINK</code>: Set to 0.
* <code>$GROUND_GETOUT</code>: The value of <code>$GROUND_ENTER</code> prior to using this opcode.
* <code>$GROUND_MAP</code>: The Level ID used to display the Map Background.
* <code>$GROUND_PLACE</code>: The World Map Marker ID that determines where the player appears on the Top Screen when selecting "Map and team" in the overworld.
* <code>$GROUND_START_MODE</code>: 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 <code>supervision_ExecuteEnter</code> opcode.


{| class="wikitable"
{| class="wikitable"
Line 1,943: Line 2,035:
|uint
|uint
|duration
|duration
|The number of frames to fade out the screens.
|The number of frames used to fade out the screens.
|}
|}
=== 0x8f - main_EnterGroundMulti ===
=== 0x8f - main_EnterGroundMulti ===
<TO DO: Opcode description>
Stops the current script to reload Unionall starting from the Coroutine CORO_EVENT_DIVIDE. This opcode also updates the following script variables:
 
* <code>$GROUND_ENTER</code>: This opcode's ''level_id_enter'' parameter.
* <code>$GROUND_ENTER_LINK</code>: This opcode's ''level_id_link'' parameter.
* <code>$GROUND_GETOUT</code>: The value of <code>$GROUND_ENTER</code> prior to using this opcode.
* <code>$GROUND_MAP</code>: The Level ID used to display the Map Background.
* <code>$GROUND_PLACE</code>: The World Map Marker ID that determines where the player appears on the Top Screen when selecting "Map and team" in the overworld.
* <code>$GROUND_START_MODE</code>: 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 <code>supervision_ExecuteEnter</code> opcode.


{| class="wikitable"
{| class="wikitable"
Line 1,957: Line 2,058:
|-
|-
|1
|1
|uint
|Level
|unk0
|level_id_enter
|
|An entry in the Level List. Ideally, this opcode would load the specified Level's Enter00 script.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to fade out the screens.
|-
|-
|3
|3
|uint
|Level
|unk2
|level_id_link
|
|An entry in the Level List. Used to update <code>$GROUND_ENTER_LINK</code>.
|}
|}
=== 0x90 - main_EnterRescueUser ===
=== 0x90 - main_EnterRescueUser ===
<TO DO: Opcode description>
Exits ground mode and begins dungeon mode while taking an SOS Mail. Dungeon selection seems to be determined by the SOS Mail chosen via <code>message_Menu(MENU_S_O_S_MAIL_PICKER);</code>.


{| class="wikitable"
{| class="wikitable"
Line 1,984: Line 2,085:
|1
|1
|uint
|uint
|unk0
|duration
|
|The number of frames used to fade out the screens.
|}
|}
=== 0x91 - main_EnterTraining ===
=== 0x91 - main_EnterTraining ===
<TO DO: Opcode description>
Performs various functions related to entering a dungeon using Marowak Dojo.


{| class="wikitable"
{| class="wikitable"
Line 2,000: Line 2,101:
|1
|1
|uint
|uint
|unk0
|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
|2
|uint
|uint
|unk1
|unk1
|
|Currently unknown.
|}
|}
=== 0x92 - main_EnterTraining2 ===
=== 0x92 - main_EnterTraining2 ===
<TO DO: Opcode description>
Performs various functions related to entering a dungeon using Marowak Dojo's Final Maze.


{| class="wikitable"
{| class="wikitable"
Line 2,021: Line 2,125:
|1
|1
|uint
|uint
|unk0
|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
|2
|uint
|uint
|unk1
|unk1
|
|Currently unknown.
|}
|}
=== 0x93 - main_SetGround ===
=== 0x93 - main_SetGround ===
<TO DO: Opcode description>
Updates the following variables' values to be this opcode's ''level_id'' parameter:
 
* <code>$GROUND_ENTER</code>
* <code>$GROUND_GETOUT</code>


{| class="wikitable"
{| class="wikitable"
Line 2,043: Line 2,153:
|Level
|Level
|level_id
|level_id
|
|An entry in the Level List.
|}
|}
=== 0x94 - me_Play ===
=== 0x94 - me_Play ===
<TO DO: Opcode description>
Instantly plays a special [[sound effect]] that can seamlessly interrupt any BGM tracks that are currently playing.


{| class="wikitable"
{| class="wikitable"
Line 2,059: Line 2,169:
|uint
|uint
|me_id
|me_id
|
|A sound effect defined in SOUND/ME of the ROM.
|}
|}
=== 0x95 - me_Stop ===
=== 0x95 - me_Stop ===
<TO DO: Opcode description>
Instantly stops the currently-playing special [[sound effect]] called with <code>me_Play</code>.


No parameters.
No parameters.
=== 0x96 - message_Close ===
=== 0x96 - message_Close ===
Closes the current message box once the player inputs the A button
Suspends the current routine and allows for closing an active textbox (and portrait, if active) set by one of the following opcodes:
 
* <code>message_ImitationSound</code>
* <code>message_Mail</code>
* <code>message_Monologue</code>
* <code>message_Notice</code>
* <code>message_SpecialTalk</code>
* <code>message_Talk</code>
 
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.
No parameters.
=== 0x97 - message_CloseEnforce ===
=== 0x97 - message_CloseEnforce ===
Closes the current message box immediately after the game reaches the end of the current text string.
Instantly closes an active textbox (and portrait, if active) once the game finishes displaying a string set by one of the following opcodes:
 
* <code>message_ImitationSound</code>
* <code>message_Mail</code>
* <code>message_Monologue</code>
* <code>message_Notice</code>
* <code>message_SpecialTalk</code>
* <code>message_Talk</code>


No parameters.
No parameters.
=== 0x98 - message_Explanation ===
=== 0x98 - message_Explanation ===
Displays the string defined in the first parameter, as it does in the opening scene of the game ("Welcome to the World of Pokemon!") etc.
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 <code>FONT/frameX.wte</code> (as seen in the Misc. Graphics tab of SkyTemple). This opcode does not need <code>message_Close</code> to suspend the routine.
 
This opcode does not support displaying a portrait. No sound will emit from the text scrolling.


{| class="wikitable"
{| class="wikitable"
Line 2,087: Line 2,215:
|String
|String
|txt
|txt
|
|Text to be displayed on the Touch Screen.
|}
|}
=== 0x99 - message_FacePositionOffset ===
=== 0x99 - message_FacePositionOffset ===
<TO DO: Opcode description>
Offsets the active portrait in pixels by multiples of 8.


{| class="wikitable"
{| class="wikitable"
Line 2,103: Line 2,231:
|sint
|sint
|x
|x
|
|The offset to shift the portrait box across the X-axis.
|-
|-
|2
|2
|sint
|sint
|y
|y
|
|The offset to shift the portrait box across the Y-axis.
|}
|}
=== 0x9a - message_ImitationSound ===
=== 0x9a - message_ImitationSound ===
<TO DO: Opcode description>
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 <code>FONT/frameX.wte</code> (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.


{| class="wikitable"
{| class="wikitable"
Line 2,124: Line 2,254:
|String
|String
|txt
|txt
|
|Text to be displayed on the Touch Screen.
|}
|}
=== 0x9b - message_KeyWait ===
=== 0x9b - message_KeyWait ===
<TO DO: Opcode description>
If an active textbox has finished displaying its string and was created by one of the following opcodes:
 
* <code>message_ImitationSound</code>
* <code>message_Mail</code>
* <code>message_Monologue</code>
* <code>message_Notice</code>
* <code>message_SpecialTalk</code>
* <code>message_Talk</code>
 
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.
No parameters.
=== 0x9c - message_Mail ===
=== 0x9c - message_Mail ===
<TO DO: Opcode description>
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 <code>FONT/frameX.wte</code> (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.


{| class="wikitable"
{| class="wikitable"
Line 2,144: Line 2,285:
|String
|String
|txt
|txt
|
|Text to be displayed on the Touch Screen.
|}
|}
=== 0x9d - message_Menu ===
=== 0x9d - message_Menu ===
<TO DO: Opcode description>
Executes various hardcoded "menu" functionalities given a certain ID. Some IDs result in an actual menu, while others simply perform a silent task.


{| class="wikitable"
{| class="wikitable"
Line 2,160: Line 2,301:
|Menu
|Menu
|menu_id
|menu_id
|
|The ID of a menu, the list of which can be seen by typing <code>MENU_</code> in SkyTemple's Script Engine Debugger.
|}
|}
=== 0x9e - message_Monologue ===
=== 0x9e - message_Monologue ===
Displays the string defined in the first parameter, as it does with player speech. Notably, no sound is made as the dialog scrolls.
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 <code>FONT/frameX.wte</code> (as seen in the Misc. Graphics tab of SkyTemple).
 
This opcode supports displaying a portrait. No sound will emit from the text scrolling.


{| class="wikitable"
{| class="wikitable"
Line 2,176: Line 2,319:
|String
|String
|txt
|txt
|
|Text to be displayed on the Touch Screen.
|}
|}
=== 0x9f - message_Narration ===
=== 0x9f - message_Narration ===
Similar to message_Explanation, except for the fact that all text displays instantaneously. The first parameter defines how long it takes for the text to fade in and fade out. An example for its use would be in the ending scenes.
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 <code>FONT/frameX.wte</code> (as seen in the Misc. Graphics tab of SkyTemple). This opcode does not need <code>message_Close</code> 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.


{| class="wikitable"
{| class="wikitable"
Line 2,191: Line 2,334:
|1
|1
|uint
|uint
|frames
|duration
|
|The number of frames used to fade in/out the Touch Screen.
|-
|-
|2
|2
|String
|String
|txt
|txt
|
|Text to be displayed on the Touch Screen.
|}
|}
=== 0xa0 - message_Notice ===
=== 0xa0 - message_Notice ===
Similar to message_Monologue, except for the fact that all text displays instantaneously.
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 <code>FONT/frameX.wte</code> (as seen in the Misc. Graphics tab of SkyTemple).
 
This opcode does not support displaying a portrait.


{| class="wikitable"
{| class="wikitable"
Line 2,213: Line 2,358:
|String
|String
|txt
|txt
|
|Text to be displayed on the Touch Screen.
|}
|}
=== 0xa1 - message_EmptyActor ===
=== 0xa1 - message_EmptyActor ===
Removes an actor's portrait and name from dialog box. Used before other opcodes that display text (eg. message_Talk)
Disallows a portrait from appearing alongside a textbox, along with disallowing a name to appear in the textbox if <code>message_Talk</code> follows this opcode.


No parameters.
No parameters.
=== 0xa2 - message_ResetActor ===
=== 0xa2 - message_ResetActor ===
Removes an actor's portrait and name from dialog box. Replaces the name with a white speech bubble. Used before other opcodes that display text (eg. message_Talk)
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 <code>message_Talk</code> follows this opcode.


No parameters.
No parameters.
=== 0xa3 - message_SetActor ===
=== 0xa3 - message_SetActor ===
Sets an actor's name to be used in the dialog box. Does not show the actor's portrait. Used before other opcodes that display text (eg. message_Talk)
Sets the specified actor's name to the start of the next script string if <code>message_Talk</code> follows this opcode.


{| class="wikitable"
{| class="wikitable"
Line 2,237: Line 2,382:
|Entity
|Entity
|actor_id
|actor_id
|
|An entry in the Actor List.
|}
|}
=== 0xa4 - message_SetFace ===
=== 0xa4 - message_SetFace ===
Set an actor's name to be used in the dialog box. Shows the actor's portrait in the position defined by the user in the third parameter. Uses the portrait defined in the second parameter. Used before other opcodes that display text (eg. message_Talk)
Sets the specified actor's name to the start of the next script string if <code>message_Talk</code> follows this opcode. Will also display a portrait of the actor's species at a specified position if <code>message_Talk</code> or <code>message_Monologue</code> follow this opcode.


{| class="wikitable"
{| class="wikitable"
Line 2,253: Line 2,398:
|Entity
|Entity
|actor_id
|actor_id
|
|An entry in the Actor List.
|-
|-
|2
|2
|Face
|Face
|face_id
|face_id
|
|The ID of a portrait, the list of which can be seen by typing FACE_ in SkyTemple's Script Engine Debugger.
|-
|-
|3
|3
|FaceMode
|FaceMode
|face_mode
|face_mode
|
|The position of a portrait, the list of which can be seen by typing <code>FACE_POS_</code> in SkyTemple's Script Engine Debugger.
|}
|}
=== 0xa5 - message_SetFaceEmpty ===
=== 0xa5 - message_SetFaceEmpty ===
Shows the actor's portrait in the position defined by the user in the third parameter. Uses the portrait defined in the second parameter. Does not display the actor's name in the dialog box. Used before other opcodes that display text (eg. message_Talk)
Displays a portrait of the actor's species at a specified position if <code>message_Talk</code> or <code>message_Monologue</code> follow this opcode.


{| class="wikitable"
{| class="wikitable"
Line 2,279: Line 2,424:
|Entity
|Entity
|actor_id
|actor_id
|
|An entry in the Actor List.
|-
|-
|2
|2
|Face
|Face
|face_id
|face_id
|
|The ID of a portrait, the list of which can be seen by typing FACE_ in SkyTemple's Script Engine Debugger.
|-
|-
|3
|3
|FaceMode
|FaceMode
|face_mode
|face_mode
|
|The position of a portrait, the list of which can be seen by typing <code>FACE_POS_</code> in SkyTemple's Script Engine Debugger.
|}
|}
=== 0xa6 - message_SetFaceOnly ===
=== 0xa6 - message_SetFaceOnly ===
Shows the actor's portrait in the position defined by the user in the third parameter. Uses the portrait defined in the second parameter. Displays a white speech bubble in the dialog box. Used before other opcodes that display text (eg. message_Talk)
Sets a speech bubble (the text tag [M:T1]) to the start of the next script string if <code>message_Talk</code> follows this opcode. Will also display a portrait of the actor's species at a specified position if <code>message_Talk</code> or <code>message_Monologue</code> follow this opcode.


{| class="wikitable"
{| class="wikitable"
Line 2,305: Line 2,450:
|Entity
|Entity
|actor_id
|actor_id
|
|An entry in the Actor List.
|-
|-
|2
|2
|Face
|Face
|face_id
|face_id
|
|The ID of a portrait, the list of which can be seen by typing FACE_ in SkyTemple's Script Engine Debugger.
|-
|-
|3
|3
|FaceMode
|FaceMode
|face_mode
|face_mode
|
|The position of a portrait, the list of which can be seen by typing <code>FACE_POS_</code> in SkyTemple's Script Engine Debugger.
|}
|}
=== 0xa7 - message_SetFacePosition ===
=== 0xa7 - message_SetFacePosition ===
Changes an actor's portrait to be at the position as defined in the first parameter.
Re-positions an actor's portrait.


{| class="wikitable"
{| class="wikitable"
Line 2,331: Line 2,476:
|FaceMode
|FaceMode
|face_mode
|face_mode
|
|The position of a portrait, the list of which can be seen by typing <code>FACE_POS_</code> in SkyTemple's Script Engine Debugger.
|}
|}
=== 0xa8 - message_SetWaitMode ===
=== 0xa8 - message_SetWaitMode ===
<TO DO: Opcode description>
Makes strings displayed with a <code>message_</code> opcode auto-scroll. For both parameters, a value of -1 means the auto-scroll will stop.


{| class="wikitable"
{| class="wikitable"
Line 2,345: Line 2,490:
|-
|-
|1
|1
|uint
|sint
|unk0
|duration0
|
|Sets the frame count for a textbox auto-advancing, once the end of the string has been displayed and the following opcode is <code>message_KeyWait();</code>.
|-
|-
|2
|2
|uint
|sint
|unk1
|duration1
|
|Sets the frame count for text tags such as [K] auto-advancing.
|}
|}
=== 0xa9 - message_SpecialTalk ===
=== 0xa9 - message_SpecialTalk ===
<TO DO: Opcode description>
Displays a random Text String based off of the actor ACTOR_TALK_SUB's Talk Group.


{| class="wikitable"
{| class="wikitable"
Line 2,367: Line 2,512:
|1
|1
|uint
|uint
|unk0
|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 ===
=== 0xae - message_Talk ===
Displays text in the dialog box.  
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 <code>FONT/frameX.wte</code> (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.


{| class="wikitable"
{| class="wikitable"
Line 2,384: Line 2,534:
|String
|String
|txt
|txt
|
|Text to be displayed on the Touch Screen.
|}
|}
=== 0xaf - Move2Position ===
=== 0xaf - Move2Position ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,399: Line 2,551:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|uint
|uint
|x
|x
|
|The pixel position on the X-axis.
|-
|-
|3
|3
|uint
|uint
|y
|y
|
|The pixel position on the Y-axis.
|}
|}
=== 0xb0 - Move2PositionLives ===
=== 0xb0 - Move2PositionLives ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,425: Line 2,580:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|uint
|Entity
|unk1
|actor_id
|
|An entry in the Actor List.
|}
|}
=== 0xb1 - Move2PositionMark ===
=== 0xb1 - Move2PositionMark ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,447: Line 2,605:
|uint
|uint
|num_parameters
|num_parameters
|
|The number of parameters to read from this opcode.
|-
|-
|2+
|2+
|PositionMark
|PositionMark
|pos_marker
|pos_marker
|This parameter may be repeated multiple times
|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 ===
=== 0xb2 - Move2PositionMark ===
Moves an actor to the position marker defined by the user. The speed of the movement is defined by the first parameter, with the actor moving faster with higher numbers. Notably, there exists numbers that will cause the actor to move slower than the speed of 1, generally these are around 32000, such as 32896. The actor will not be bound by the grid and can walk diagonally to reach the position defined.
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.


{| class="wikitable"
{| class="wikitable"
Line 2,467: Line 2,629:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|PositionMark
|PositionMark
|pos_marker
|pos_marker
|
|A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.
|}
|}
=== 0xb3 - Move2PositionOffset ===
=== 0xb3 - Move2PositionOffset ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,489: Line 2,654:
|uint
|uint
|num_parameters
|num_parameters
|
|The number of parameters to read from this opcode.
|-
|-
|2+
|2+
|sint
|sint
|x
|x, y
|This parameter may be repeated multiple times
|The pixel offset to shift the entity across the X or Y-axis.
This parameter may be repeated multiple times.
|}
|}
=== 0xb4 - Move2PositionOffset ===
=== 0xb4 - Move2PositionOffset ===
Moves an actor to a position that is x and y units away from their current x and y position respectively. The speed of the movement is defined by the first parameter, with the actor moving faster with higher numbers. Notably, there exists numbers that will cause the actor to move slower than the speed of 1, generally these are around 32000, such as 32896. The actor will not be bound by the grid and can walk diagonally to reach the position defined.
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.


{| class="wikitable"
{| class="wikitable"
Line 2,509: Line 2,677:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|sint
|sint
|x
|x
|
|The pixel offset to shift the entity across the X-axis.
|-
|-
|3
|3
|sint
|sint
|y
|y
|
|The pixel offset to shift the entity across the Y-axis.
|}
|}
=== 0xb5 - Move2PositionOffsetRandom ===
=== 0xb5 - Move2PositionOffsetRandom ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,535: Line 2,706:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|sint
|sint
|x
|x
|
|Determines something about the random pixel value chosen to apply to the X-axis; somewhat unknown.
|-
|-
|3
|3
|sint
|sint
|y
|y
|
|Determines something about the random pixel value chosen to apply to the Y-axis; somewhat unknown.
|}
|}
=== 0xb6 - Move3Position ===
=== 0xb6 - Move3Position ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,561: Line 2,735:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|uint
|uint
|x
|x
|
|The pixel position on the X-axis.
|-
|-
|3
|3
|uint
|uint
|y
|y
|
|The pixel position on the Y-axis.
|}
|}
=== 0xb7 - Move3PositionLives ===
=== 0xb7 - Move3PositionLives ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,587: Line 2,764:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|uint
|Entity
|unk1
|actor_id
|
|An entry in the Actor List.
|}
|}
=== 0xb8 - Move3PositionMark ===
=== 0xb8 - Move3PositionMark ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,609: Line 2,789:
|uint
|uint
|num_parameters
|num_parameters
|
|The number of parameters to read from this opcode.
|-
|-
|2+
|2+
|PositionMark
|PositionMark
|pos_marker
|pos_marker
|This parameter may be repeated multiple times
|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 ===
=== 0xb9 - Move3PositionMark ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,629: Line 2,812:
|1
|1
|uint
|uint
|num_parameters
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|PositionMark
|PositionMark
|pos_marker
|pos_marker
|
|A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.
|}
|}
=== 0xba - Move3PositionOffset ===
=== 0xba - Move3PositionOffset ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,651: Line 2,837:
|uint
|uint
|num_parameters
|num_parameters
|
|The number of parameters to read from this opcode.
|-
|-
|2+
|2+
|sint
|sint
|x
|x, y
|This parameter may be repeated multiple times
|The pixel offset to shift the entity across the X or Y-axis.
This parameter may be repeated multiple times.
|}
|}
=== 0xbb - Move3PositionOffset ===
=== 0xbb - Move3PositionOffset ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,671: Line 2,860:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|sint
|sint
|x
|x
|
|The pixel offset to shift the entity across the X-axis.
|-
|-
|3
|3
|sint
|sint
|y
|y
|
|The pixel offset to shift the entity across the Y-axis.
|}
|}
=== 0xbc - Move3PositionOffsetRandom ===
=== 0xbc - Move3PositionOffsetRandom ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,697: Line 2,889:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|sint
|sint
|x
|x
|
|Determines something about the random pixel value chosen to apply to the X-axis; somewhat unknown.
|-
|-
|3
|3
|sint
|sint
|y
|y
|
|Determines something about the random pixel value chosen to apply to the Y-axis; somewhat unknown.
|}
|}
=== 0xbd - MoveDirection ===
=== 0xbd - MoveDirection ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,723: Line 2,918:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
|-
|-
|2
|2
|uint
|sint
|unk1
|offset
|
|The pixel offset to shift the entity relative to the entity's direction.
|-
|-
|3
|3
|uint
|Direction
|unk2
|direction
|
|The type of direction, the list of which can be seen by typing <code>DIR_</code> in SkyTemple's Script Engine Debugger.
|}
|}
=== 0xbe - MoveHeight ===
=== 0xbe - MoveHeight ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,749: Line 2,946:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
|-
|-
|2
|2
|uint
|sint
|unk1
|height
|
|The pixel height to set the entity relative to their shadow.
|}
|}
=== 0xbf - MovePosition ===
=== 0xbf - MovePosition ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,770: Line 2,969:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|uint
|uint
|x
|x
|
|The pixel position on the X-axis.
|-
|-
|3
|3
|uint
|uint
|y
|y
|
|The pixel position on the Y-axis.
|}
|}
=== 0xc0 - MovePositionLives ===
=== 0xc0 - MovePositionLives ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,796: Line 2,998:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|uint
|Entity
|unk1
|actor_id
|
|An entry in the Actor List.
|}
|}
=== 0xc1 - MovePositionLivesTime ===
=== 0xc1 - MovePositionLivesTime ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,817: Line 3,022:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|uint
|Entity
|unk1
|actor_id
|
|An entry in the Actor List.
|-
|-
|3
|3
|uint
|uint
|unk2
|duration
|
|The number of frames used to move the entity.
|}
|}
=== 0xc2 - MovePositionMark ===
=== 0xc2 - MovePositionMark ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,844: Line 3,052:
|uint
|uint
|num_parameters
|num_parameters
|
|The number of parameters to read from this opcode.
|-
|-
|2+
|2+
|PositionMark
|PositionMark
|pos_marker
|pos_marker
|This parameter may be repeated multiple times
|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 ===
=== 0xc3 - MovePositionMark ===
Moves an actor to the position marker defined by the user. The speed of the movement is defined by the first parameter, with the actor moving faster with higher numbers. Notably, there exists numbers that will cause the actor to move slower than the speed of 1, generally these are around 32000, such as 32896. The actor is bound by the grid and will move in cardinal directions and diagonally, but only in directions 45 degrees from the cardinal directions.
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.


{| class="wikitable"
{| class="wikitable"
Line 2,864: Line 3,075:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|PositionMark
|PositionMark
|pos_marker
|pos_marker
|
|A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.
|}
|}
=== 0xc4 - MovePositionMarkTime ===
=== 0xc4 - MovePositionMarkTime ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,885: Line 3,099:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|uint
|PositionMark
|unk1
|pos_marker
|
|A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.
|-
|-
|3
|3
|PositionMark
|uint
|pos_marker
|duration
|
|The number of frames used to move the entity.
|}
|}
=== 0xc5 - MovePositionOffset ===
=== 0xc5 - MovePositionOffset ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,912: Line 3,129:
|uint
|uint
|num_parameters
|num_parameters
|
|The number of parameters to read from this opcode.
|-
|-
|2+
|2+
|sint
|sint
|x
|x, y
|This parameter may be repeated multiple times
|The pixel offset to shift the entity across the X or Y-axis.
This parameter may be repeated multiple times.
|}
|}
=== 0xc6 - MovePositionOffset ===
=== 0xc6 - MovePositionOffset ===
Moves an actor to a position that is x and y units away from their current x and y position respectively. The speed of the movement is defined by the first parameter, with the actor moving faster with higher numbers. Notably, there exists numbers that will cause the actor to move slower than the speed of 1, generally these are around 32000, such as 32896. The actor is bound by the grid and will move in cardinal directions and diagonally, but only in directions 45 degrees from the cardinal directions.
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.


{| class="wikitable"
{| class="wikitable"
Line 2,932: Line 3,152:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|sint
|sint
|x
|x
|
|The pixel offset to shift the entity across the X-axis.
|-
|-
|3
|3
|sint
|sint
|y
|y
|
|The pixel offset to shift the entity across the Y-axis.
|}
|}
=== 0xc7 - MoveSpecial ===
=== 0xc7 - MoveSpecial ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 2,958: Line 3,181:
|1
|1
|uint
|uint
|unk0
|mode
|
|Determines the kind of action.
 
# Spin and move in a circular motion.
# Spin and move in a circular motion.
# Currently unknown.
# Currently unknown.
# Currently unknown. Seems to be the most commonly-used value, as a part of the Unionall Coroutine CORO_LIVES_REPLY_NOMRAL.
|-
|-
|2
|2
|uint
|uint
|unk1
|unk1
|
|Currently unknown. Seems to affect how far the entity will move?
|-
|-
|3
|3
|uint
|uint
|unk2
|unk2
|
|Currently unknown.
|}
|}
=== 0xc8 - MoveTurn ===
=== 0xc8 - MoveTurn ===
<TO DO: Opcode description>
Moves an entity (i.e., an actor, object, or performer) based on a certain pattern. Unlike other <code>Move</code> 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.


{| class="wikitable"
{| class="wikitable"
Line 2,984: Line 3,215:
|1
|1
|uint
|uint
|unk0
|distance
|
|How far the entity will move. Higher values result in greater distance being covered.
|-
|-
|2
|2
|uint
|uint
|unk1
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
 
This parameter also seems to affect the distance traveled.
|-
|-
|3
|3
|uint
|uint
|unk2
|pattern
|
|A hardcoded pattern to move in.
 
# Moves in a circle clockwise.
# Moves in a circle counterclockwise.
# Moves in a square clockwise.
# Moves in a square counterclockwise.
# Zig-zags back and forth.
 
Values 6 and above seem to be variations of random movement.
|}
|}
=== 0xca - PauseEffect ===
=== 0xca - PauseEffect ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 3,009: Line 3,253:
|-
|-
|1
|1
|uint
|Effect
|unk0
|effect_id
|
|A graphical effect to display relative to an entity.
|}
|}
=== 0xcc - ProcessSpecial ===
=== 0xcc - ProcessSpecial ===
<TO DO: Opcode description>
Executes one of the game's Special Processes. The return value of a Special Process can be checked by encasing this opcode in a <code>switch</code> statement. A negative return value is not acceptable and will cause the game to suspend indefinitely.
 
This opcode cannot be used in targeted routines.


{| class="wikitable"
{| class="wikitable"
Line 3,027: Line 3,273:
|ProcessSpecial
|ProcessSpecial
|process_id
|process_id
|
|One of the game's Special Processes.
|-
|-
|2
|2
|uint
|sint
|unk1
|process_param1
|
|The first parameter used by the Special Process.
|-
|-
|3
|3
|uint
|sint
|unk2
|process_param2
|
|The first parameter used by the Special Process.
|}
|}
=== 0xcd - PursueTurnLives ===
=== 0xcd - PursueTurnLives ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 3,052: Line 3,300:
|1
|1
|uint
|uint
|unk0
|duration
|
|The number of frames used to make the entity turn. A value of 0 will make the entity turn forever.
|-
|-
|2
|2
|uint
|uint
|unk1
|speed
|
|Turning speed. Higher values result in a slower speed.
|-
|-
|3
|3
|uint
|Entity
|unk2
|actor_id
|
|The actor to turn toward.
|-
|-
|4
|4
|uint
|uint
|unk3
|rotation
|
|
# Clockwise.
# Counterclockwise.
A value of 10 will make the entity choose the nearest rotation.
|}
|}
=== 0xce - PursueTurnLives2 ===
=== 0xce - PursueTurnLives2 ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 3,083: Line 3,337:
|1
|1
|uint
|uint
|unk0
|duration
|
|The number of frames used to make the entity turn. A value of 0 will make the entity turn forever.
|-
|-
|2
|2
|uint
|uint
|unk1
|speed
|
|Turning speed. Higher values result in a slower speed.
|-
|-
|3
|3
|uint
|Entity
|unk2
|actor_id
|
|The actor to turn toward.
|-
|-
|4
|4
|uint
|uint
|unk3
|rotation
|
|
# Clockwise.
# Counterclockwise.
A value of 10 will make the entity choose the nearest rotation.
|}
|}
=== 0xcf - ResetAttribute ===
=== 0xcf - ResetAttribute ===
<TO DO: Opcode description>
Currently unknown. Seems to get ignored when parsed in the scripting engine.


{| class="wikitable"
{| class="wikitable"
Line 3,115: Line 3,373:
|uint
|uint
|unk0
|unk0
|
|Currently unknown.
|}
|}
=== 0xd0 - ResetFunctionAttribute ===
=== 0xd0 - ResetFunctionAttribute ===
<TO DO: Opcode description>
Sets certain bits of an entity's (i.e., an actor, object, or performer) "function" attribute to 0.


{| class="wikitable"
{| class="wikitable"
Line 3,129: Line 3,387:
|-
|-
|1
|1
|uint
|bitfield
|unk0
|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 ===
=== 0xd1 - ResetHitAttribute ===
<TO DO: Opcode description>
Sets certain bits of an entity's (i.e., an actor, object, or performer) "hit" attribute to 0.


{| class="wikitable"
{| class="wikitable"
Line 3,145: Line 3,403:
|-
|-
|1
|1
|uint
|bitfield
|unk0
|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 ===
=== 0xd2 - ResetOutputAttribute ===
<TO DO: Opcode description>
Sets certain bits of an entity's (i.e., an actor, object, or performer) "output" attribute to 0.


{| class="wikitable"
{| class="wikitable"
Line 3,161: Line 3,423:
|-
|-
|1
|1
|uint
|bitfield
|unk0
|output_bitfield
|
|
# Underlay below entities.
# Overlay above entities.
# Overlay above the current Map Background's Layer 2.
# Overlay above the game's canvas system, which includes the textbox, portrait, and some <code>screen_</code> commands that do not end in <code>All</code>.
# Flicker.
# Transparency.
# Invisibility.
# Displays shadow.
|}
|}
=== 0xd3 - ResetReplyAttribute ===
=== 0xd3 - ResetReplyAttribute ===
<TO DO: Opcode description>
Sets certain bits of an entity's (i.e., an actor, object, or performer) "reply" attribute to 0.


{| class="wikitable"
{| class="wikitable"
Line 3,177: Line 3,447:
|-
|-
|1
|1
|uint
|bitfield
|unk0
|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 ===
=== 0xd4 - ResumeEffect ===
<TO DO: Opcode description>
Resumes the current graphical effect of an entity (i.e., an actor, object, or performer) that has been paused with <code>PauseEffect</code> 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.


{| class="wikitable"
{| class="wikitable"
Line 3,193: Line 3,470:
|-
|-
|1
|1
|uint
|Effect
|unk0
|effect_id
|
|A graphical effect to display relative to an entity.
|}
|}
=== 0xd6 - SavePosition ===
=== 0xd6 - SavePosition ===
<TO DO: Opcode description>
Saves various attributes of an entity (i.e., an actor, object, or performer) to the following script variables:
 
* <code>$POSITION_X</code>: The pixel position of the entity on the X-axis multiplied by 256.
* <code>$POSITION_Y</code>: The pixel position of the entity on the Y-axis multiplied by 256.
* <code>$POSITION_HEIGHT</code>: The pixel height (i.e., displacement of the entity from their shadow) of the entity multiplied by 256.
* <code>$POSITION_DIRECTION</code>: 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.


{| class="wikitable"
{| class="wikitable"
Line 3,210: Line 3,494:
|1
|1
|uint
|uint
|unk0
|index
|
|Index used by all <code>$POSITION_</code> script variables, ranged from 0-2 (inclusive).
|}
|}
=== 0xd7 - screen_FadeChange ===
=== 0xd7 - screen_FadeChange ===
Changes the brightness level of the screen.
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 <code>SetOutputAttribute(16);</code> with them).
* Portraits.
* Textboxes.


{| class="wikitable"
{| class="wikitable"
Line 3,225: Line 3,513:
|-
|-
|1
|1
|bool
|uint
|wait
|suspension_flag
|If true, the game will wait for the brightness operation to finish before continuing
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true.
|-
|-
|2
|2
|uint
|uint
|frames
|duration
|Number of frames taken to change the brightness
|The number of frames used to change the Touch Screen's brightness.
|-
|-
|3
|3
|uint
|uint
|start_brightness
|start_brightness
|Starting brightness level. Default brightness is 256.
|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
|4
|uint
|uint
|end_brightness
|end_brightness
|Final brightness level. Default brightness is 256.
|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 ===
=== 0xd8 - screen_FadeChangeAll ===
<TO DO: Opcode description>
Changes the brightness of the screen across a certain number of frames. This opcode will affect everything on the Touch Screen.


{| class="wikitable"
{| class="wikitable"
Line 3,257: Line 3,553:
|1
|1
|uint
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to change the Touch Screen's brightness.
|-
|-
|3
|3
|uint
|uint
|unk2
|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
|4
|uint
|uint
|unk3
|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 ===
=== 0xd9 - screen_FadeIn ===
<TO DO: Opcode description>
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 <code>SetOutputAttribute(16);</code> with them).
* Portraits.
* Textboxes.


{| class="wikitable"
{| class="wikitable"
Line 3,287: Line 3,595:
|-
|-
|1
|1
|bool
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|-
|-
|2
|2
|uint
|uint
|duration
|duration
|
|The number of frames used to change the Touch Screen's brightness.
|}
|}
=== 0xda - screen_FadeInAll ===
=== 0xda - screen_FadeInAll ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 3,308: Line 3,616:
|-
|-
|1
|1
|bool
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|-
|-
|2
|2
|uint
|uint
|duration
|duration
|
|The number of frames used to change the Touch Screen's brightness.
|}
|}
=== 0xdb - screen_FadeOut ===
=== 0xdb - screen_FadeOut ===
<TO DO: Opcode description>
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 <code>SetOutputAttribute(16);</code> with them).
* Portraits.
* Textboxes.


{| class="wikitable"
{| class="wikitable"
Line 3,329: Line 3,641:
|-
|-
|1
|1
|bool
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|-
|-
|2
|2
|uint
|uint
|duration
|duration
|
|The number of frames used to change the Touch Screen's brightness.
|}
|}
=== 0xdc - screen_FadeOutAll ===
=== 0xdc - screen_FadeOutAll ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 3,350: Line 3,662:
|-
|-
|1
|1
|bool
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|-
|-
|2
|2
|uint
|uint
|duration
|duration
|
|The number of frames used to change the Touch Screen's brightness.
|}
|}
=== 0xdd - screen_FlushChange ===
=== 0xdd - screen_FlushChange ===
<TO DO: Opcode description>
Does nothing.
 
{| class="wikitable"
{| class="wikitable"
|+Parameters
|+Parameters
|-
!#
!#
!Type
!Type
Line 3,373: Line 3,683:
|uint
|uint
|unk0
|unk0
|
|Does nothing.
|-
|-
|2
|2
|uint
|uint
|unk1
|unk1
|
|Does nothing.
|-
|-
|3
|3
|uint
|uint
|unk2
|unk2
|
|Does nothing.
|-
|-
|4
|4
|uint
|uint
|unk3
|unk3
|
|Does nothing.
|-
|-
|5
|5
|uint
|uint
|unk4
|unk4
|
|Does nothing.
|-
|-
|6
|6
|uint
|uint
|unk5
|unk5
|
|Does nothing.
|-
|-
|7
|7
|uint
|uint
|unk6
|unk6
|
|Does nothing.
|-
|-
|8
|8
|uint
|uint
|unk7
|unk7
|
|Does nothing.
|}
|}
=== 0xde - screen_FlushIn ===
=== 0xde - screen_FlushIn ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 3,423: Line 3,734:
|1
|1
|uint
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to change the Touch Screen's color.
|-
|-
|3
|3
|uint
|uint
|unk2
|mode
|
|
# Completely darkens the Touch Screen.
# Completely turns the Touch Screen to a certain color.
# Instantly darkens the Touch Screen?
# Overlays the Touch Screen with a certain color.
# Instantly darkens the Touch Screen?
# Overlays the Touch Screen with hardcoded color bytes: 144, 144, and 255.
# Instantly darkens the Touch Screen?
# Overlays the Touch Screen with hardcoded color bytes: 255, 192, and 128.
# Instantly darkens the Touch Screen?
# Overlays the Touch Screen with hardcoded color bytes: All 255. The Touch Screen is not turned completely white.
# Instantly overlays the Touch Screen with hardcoded color bytes: All 255. The Touch Screen is not turned completely white.
|-
|-
|4
|4
|uint
|uint
|unk3
|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
|5
|uint
|uint
|unk4
|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
|6
|uint
|uint
|unk5
|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 ===
=== 0xdf - screen_FlushOut ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 3,464: Line 3,786:
|1
|1
|uint
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to change the Touch Screen's color.
|-
|-
|3
|3
|uint
|uint
|unk2
|mode
|
|
# Completely darkens the Touch Screen.
# Completely turns the Touch Screen to a certain color.
# Instantly darkens the Touch Screen?
# Overlays the Touch Screen with a certain color.
# Instantly darkens the Touch Screen?
# Overlays the Touch Screen with hardcoded color bytes: 144, 144, and 255.
# Instantly darkens the Touch Screen?
# Overlays the Touch Screen with hardcoded color bytes: 255, 192, and 128.
# Instantly darkens the Touch Screen?
# Overlays the Touch Screen with hardcoded color bytes: All 255. The Touch Screen is not turned completely white.
# Instantly overlays the Touch Screen with hardcoded color bytes: All 255. The Touch Screen is not turned completely white.
|-
|-
|4
|4
|uint
|uint
|unk3
|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
|5
|uint
|uint
|unk4
|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
|6
|uint
|uint
|unk5
|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 ===
=== 0xe0 - screen_WhiteChange ===
<TO DO: Opcode description>
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 <code>SetOutputAttribute(16);</code> with them).
* Portraits.
* Textboxes.


{| class="wikitable"
{| class="wikitable"
Line 3,505: Line 3,842:
|1
|1
|uint
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to change the Touch Screen's brightness.
|-
|-
|3
|3
|uint
|uint
|unk2
|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
|4
|uint
|uint
|unk3
|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 ===
=== 0xe1 - screen_WhiteChangeAll ===
<TO DO: Opcode description>
Changes the brightness of the screen across a certain number of frames. This opcode will affect everything on the Touch Screen.


{| class="wikitable"
{| class="wikitable"
Line 3,536: Line 3,881:
|1
|1
|uint
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to change the Touch Screen's brightness.
|-
|-
|3
|3
|uint
|uint
|unk2
|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
|4
|uint
|uint
|unk3
|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 ===
=== 0xe2 - screen_WhiteIn ===
<TO DO: Opcode description>
Does nothing. Do not be deceived by this opcode's name: After using <code>screen_WhiteOut</code>, use <code>screen_FadeIn</code> to restore the Touch Screen's brightness level!


{| class="wikitable"
{| class="wikitable"
Line 3,568: Line 3,921:
|uint
|uint
|unk0
|unk0
|
|Does nothing.
|-
|-
|2
|2
|uint
|uint
|unk1
|unk1
|
|Does nothing.
|}
|}
=== 0xe3 - screen_WhiteInAll ===
=== 0xe3 - screen_WhiteInAll ===
<TO DO: Opcode description>
Does nothing. Do not be deceived by this opcode's name: After using <code>screen_WhiteOutAll</code>, use <code>screen_FadeInAll</code> to restore the Touch Screen's brightness level!


{| class="wikitable"
{| class="wikitable"
Line 3,589: Line 3,942:
|uint
|uint
|unk0
|unk0
|
|Does nothing.
|-
|-
|2
|2
|uint
|uint
|unk1
|unk1
|
|Does nothing.
|}
|}
=== 0xe4 - screen_WhiteOut ===
=== 0xe4 - screen_WhiteOut ===
<TO DO: Opcode description>
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 <code>SetOutputAttribute(16);</code> with them).
* Portraits.
* Textboxes.


{| class="wikitable"
{| class="wikitable"
Line 3,609: Line 3,966:
|1
|1
|uint
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to change the Touch Screen's brightness.
|}
|}
=== 0xe5 - screen_WhiteOutAll ===
=== 0xe5 - screen_WhiteOutAll ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 3,630: Line 3,987:
|1
|1
|uint
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to change the Touch Screen's brightness.
|}
|}
=== 0xe6 - screen2_FadeChange ===
=== 0xe6 - screen2_FadeChange ===
<TO DO: Opcode description>
Changes the brightness of the screen across a certain number of frames. This opcode will affect everything on the Top Screen.


{| class="wikitable"
{| class="wikitable"
Line 3,651: Line 4,008:
|1
|1
|uint
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to change the Top Screen's brightness.
|-
|-
|3
|3
|uint
|uint
|unk2
|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
|4
|uint
|uint
|unk3
|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 ===
=== 0xe7 - screen2_FadeChangeAll ===
<TO DO: Opcode description>
Does nothing.


{| class="wikitable"
{| class="wikitable"
Line 3,683: Line 4,048:
|uint
|uint
|unk0
|unk0
|
|Does nothing.
|-
|-
|2
|2
|uint
|uint
|unk1
|unk1
|
|Does nothing.
|-
|-
|3
|3
|uint
|uint
|unk2
|unk2
|
|Does nothing.
|-
|-
|4
|4
|uint
|uint
|unk3
|unk3
|
|Does nothing.
|}
|}
=== 0xe8 - screen2_FadeIn ===
=== 0xe8 - screen2_FadeIn ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 3,712: Line 4,077:
|-
|-
|1
|1
|bool
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|-
|-
|2
|2
|uint
|uint
|duration
|duration
|
|The number of frames used to change the Top Screen's brightness.
|}
|}
=== 0xe9 - screen2_FadeInAll ===
=== 0xe9 - screen2_FadeInAll ===
<TO DO: Opcode description>
Does nothing.


{| class="wikitable"
{| class="wikitable"
Line 3,733: Line 4,098:
|-
|-
|1
|1
|bool
|uint
|unk0
|unk0
|
|Does nothing.
|-
|-
|2
|2
|uint
|uint
|duration
|unk1
|
|Does nothing.
|}
|}
=== 0xea - screen2_FadeOut ===
=== 0xea - screen2_FadeOut ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 3,754: Line 4,119:
|-
|-
|1
|1
|bool
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|-
|-
|2
|2
|uint
|uint
|duration
|duration
|
|The number of frames used to change the Top Screen's brightness.
|}
|}
=== 0xeb - screen2_FadeOutAll ===
=== 0xeb - screen2_FadeOutAll ===
<TO DO: Opcode description>
Does nothing.


{| class="wikitable"
{| class="wikitable"
Line 3,775: Line 4,140:
|-
|-
|1
|1
|bool
|uint
|unk0
|unk0
|
|Does nothing.
|-
|-
|2
|2
|uint
|uint
|duration
|unk1
|
|Does nothing.
|}
|}
=== 0xec - screen2_FlushChange ===
=== 0xec - screen2_FlushChange ===
<TO DO: Opcode description>
Does nothing.


{| class="wikitable"
{| class="wikitable"
Line 3,798: Line 4,163:
|uint
|uint
|unk0
|unk0
|
|Does nothing.
|-
|-
|2
|2
|uint
|uint
|unk1
|unk1
|
|Does nothing.
|-
|-
|3
|3
|uint
|uint
|unk2
|unk2
|
|Does nothing.
|-
|-
|4
|4
|uint
|uint
|unk3
|unk3
|
|Does nothing.
|-
|-
|5
|5
|uint
|uint
|unk4
|unk4
|
|Does nothing.
|-
|-
|6
|6
|uint
|uint
|unk5
|unk5
|
|Does nothing.
|-
|-
|7
|7
|uint
|uint
|unk6
|unk6
|
|Does nothing.
|-
|-
|8
|8
|uint
|uint
|unk7
|unk7
|
|Does nothing.
|}
|}
=== 0xed - screen2_FlushIn ===
=== 0xed - screen2_FlushIn ===
<TO DO: Opcode description>
The same as <code>screen_FlushIn</code>, but for the Top Screen.


{| class="wikitable"
{| class="wikitable"
Line 3,848: Line 4,213:
|1
|1
|uint
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to change the Top Screen's color.
|-
|-
|3
|3
|uint
|uint
|unk2
|mode
|
|
# Completely darkens the Top Screen.
# Completely turns the Top Screen to a certain color.
# Instantly darkens the Top Screen?
# Overlays the Top Screen with a certain color.
# Instantly darkens the Top Screen?
# Overlays the Top Screen with hardcoded color bytes: 144, 144, and 255.
# Instantly darkens the Top Screen?
# Overlays the Top Screen with hardcoded color bytes: 255, 192, and 128.
# Instantly darkens the Top Screen?
# Overlays the Top Screen with hardcoded color bytes: All 255. The Top Screen is not turned completely white.
# Instantly overlays the Top Screen with hardcoded color bytes: All 255. The Top Screen is not turned completely white.
|-
|-
|4
|4
|uint
|uint
|unk3
|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
|5
|uint
|uint
|unk4
|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
|6
|uint
|uint
|unk5
|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 ===
=== 0xee - screen2_FlushOut ===
<TO DO: Opcode description>
The same as <code>screen_FlushOut</code>, but for the Top Screen.


{| class="wikitable"
{| class="wikitable"
Line 3,889: Line 4,265:
|1
|1
|uint
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to change the Top Screen's color.
|-
|-
|3
|3
|uint
|uint
|unk2
|mode
|
|
# Completely darkens the Top Screen.
# Completely turns the Top Screen to a certain color.
# Instantly darkens the Top Screen?
# Overlays the Top Screen with a certain color.
# Instantly darkens the Top Screen?
# Overlays the Top Screen with hardcoded color bytes: 144, 144, and 255.
# Instantly darkens the Top Screen?
# Overlays the Top Screen with hardcoded color bytes: 255, 192, and 128.
# Instantly darkens the Top Screen?
# Overlays the Top Screen with hardcoded color bytes: All 255. The Top Screen is not turned completely white.
# Instantly overlays the Top Screen with hardcoded color bytes: All 255. The Top Screen is not turned completely white.
|-
|-
|4
|4
|uint
|uint
|unk3
|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
|5
|uint
|uint
|unk4
|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
|6
|uint
|uint
|unk5
|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 ===
=== 0xef - screen2_WhiteChange ===
<TO DO: Opcode description>
Changes the brightness of the screen across a certain number of frames. This opcode will affect everything on the Top Screen.


{| class="wikitable"
{| class="wikitable"
Line 3,930: Line 4,317:
|1
|1
|uint
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to change the Top Screen's brightness.
|-
|-
|3
|3
|uint
|uint
|unk2
|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
|4
|uint
|uint
|unk3
|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 ===
=== 0xf0 - screen2_WhiteChangeAll ===
<TO DO: Opcode description>
Does nothing.


{| class="wikitable"
{| class="wikitable"
Line 3,962: Line 4,357:
|uint
|uint
|unk0
|unk0
|
|Does nothing.
|-
|-
|2
|2
|uint
|uint
|unk1
|unk1
|
|Does nothing.
|-
|-
|3
|3
|uint
|uint
|unk2
|unk2
|
|Does nothing.
|-
|-
|4
|4
|uint
|uint
|unk3
|unk3
|
|Does nothing.
|}
|}
=== 0xf1 - screen2_WhiteIn ===
=== 0xf1 - screen2_WhiteIn ===
<TO DO: Opcode description>
Does nothing. Do not be deceived by this opcode's name: After using <code>screen2_WhiteOut</code>, use <code>screen2_FadeIn</code> to restore the Top Screen's brightness level!


{| class="wikitable"
{| class="wikitable"
Line 3,993: Line 4,388:
|uint
|uint
|unk0
|unk0
|
|Does nothing.
|-
|-
|2
|2
|uint
|uint
|unk1
|unk1
|
|Does nothing.
|}
|}
=== 0xf2 - screen2_WhiteInAll ===
=== 0xf2 - screen2_WhiteInAll ===
<TO DO: Opcode description>
Does nothing.


{| class="wikitable"
{| class="wikitable"
Line 4,014: Line 4,409:
|uint
|uint
|unk0
|unk0
|
|Does nothing.
|-
|-
|2
|2
|uint
|uint
|unk1
|unk1
|
|Does nothing.
|}
|}
=== 0xf3 - screen2_WhiteOut ===
=== 0xf3 - screen2_WhiteOut ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 4,034: Line 4,429:
|1
|1
|uint
|uint
|unk0
|suspension_flag
|
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to change the Top Screen's brightness.
|}
|}
=== 0xf4 - screen2_WhiteOutAll ===
=== 0xf4 - screen2_WhiteOutAll ===
<TO DO: Opcode description>
Does nothing.


{| class="wikitable"
{| class="wikitable"
Line 4,056: Line 4,451:
|uint
|uint
|unk0
|unk0
|
|Does nothing.
|-
|-
|2
|2
|uint
|uint
|unk1
|unk1
|
|Does nothing.
|}
|}
=== 0xf5 - se_ChangePan ===
=== 0xf5 - se_ChangePan ===
<TO DO: Opcode description>
Changes the panning of the currently-playing [[sound effect]] across a certain number of frames.


{| class="wikitable"
{| class="wikitable"
Line 4,076: Line 4,471:
|1
|1
|uint
|uint
|unk0
|se_id
|
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to change the SE's panning.
|-
|-
|3
|3
|uint
|uint
|unk2
|pan
|
|The panning of the SE. This parameter gets recalculated internally as  <code>((''pan'' * 0x3f + ((''pan'' * 0x3f >> 7) >> 0x18)) >> 8) + 0x40</code>, 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 ===
=== 0xf6 - se_ChangeVolume ===
<TO DO: Opcode description>
Changes the volume of the currently-playing [[sound effect]] across a certain number of frames.


{| class="wikitable"
{| class="wikitable"
Line 4,102: Line 4,503:
|1
|1
|uint
|uint
|unk0
|se_id
|
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to change the SE's volume.
|-
|-
|3
|3
|uint
|uint
|unk2
|volume
|
|The volume that the SE will play at. It has a maximum of 256 and a minimum of 0.
|}
|}
=== 0xf7 - se_FadeOut ===
=== 0xf7 - se_FadeOut ===
<TO DO: Opcode description>
Fades out the currently-playing [[sound effect]] across a certain number of frames.


{| class="wikitable"
{| class="wikitable"
Line 4,128: Line 4,529:
|1
|1
|uint
|uint
|unk0
|se_id
|
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer.
|-
|-
|2
|2
|uint
|uint
|unk1
|duration
|
|The number of frames used to fade out and silence a given SE.
|}
|}
=== 0xf8 - se_Play ===
=== 0xf8 - se_Play ===
Plays a sound effect.
Instantly plays a [[sound effect]].


{| class="wikitable"
{| class="wikitable"
Line 4,150: Line 4,551:
|uint
|uint
|se_id
|se_id
|Sound effect ID. It's actually encoded as sound_bank_id << 8 + sound_id, but it can also be represented as an integer.
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer.
|}
|}
=== 0xf9 - se_PlayFull ===
=== 0xf9 - se_PlayFull ===
<TO DO: Opcode description>
Instantly plays a [[sound effect]] at a specified volume and panning.


{| class="wikitable"
{| class="wikitable"
Line 4,165: Line 4,566:
|1
|1
|uint
|uint
|unk0
|se_id
|
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer.
|-
|-
|2
|2
|uint
|uint
|unk1
|volume
|
|The volume that the SE will play at. It has a maximum of 256 and a minimum of 0.
|-
|-
|3
|3
|uint
|uint
|unk2
|pan
|
|The panning of the SE. This parameter gets recalculated internally as  <code>((''pan'' * 0x3f + ((''pan'' * 0x3f >> 7) >> 0x18)) >> 8) + 0x40</code>, 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 ===
=== 0xfa - se_PlayPan ===
<TO DO: Opcode description>
Instantly plays a [[sound effect]] at a specified panning.


{| class="wikitable"
{| class="wikitable"
Line 4,191: Line 4,598:
|1
|1
|uint
|uint
|unk0
|se_id
|
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer.
|-
|-
|2
|2
|uint
|uint
|unk1
|pan
|
|The panning of the SE. This parameter gets recalculated internally as  <code>((''pan'' * 0x3f + ((''pan'' * 0x3f >> 7) >> 0x18)) >> 8) + 0x40</code>, 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 ===
=== 0xfb - se_PlayVolume ===
<TO DO: Opcode description>
Instantly plays a [[sound effect]] at a specified volume.


{| class="wikitable"
{| class="wikitable"
Line 4,212: Line 4,625:
|1
|1
|uint
|uint
|unk0
|se_id
|
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer.
|-
|-
|2
|2
|uint
|uint
|unk1
|volume
|
|The volume that the SE will play at. It has a maximum of 256 and a minimum of 0.
|}
|}
=== 0xfc - se_Stop ===
=== 0xfc - se_Stop ===
<TO DO: Opcode description>
Instantly stops a specified sound effect.


{| class="wikitable"
{| class="wikitable"
Line 4,233: Line 4,646:
|1
|1
|uint
|uint
|unk0
|se_id
|
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer.
|}
|}
=== 0xfd - SetAnimation ===
=== 0xfd - SetAnimation ===
Line 4,250: Line 4,663:
|uint
|uint
|id
|id
|Animation table index. Converted to an animation id for the current sprite using the [https://docs.google.com/spreadsheets/d/11xHv80Def5mtF60ZsfI1lF1eNX0dBE2It837Q08AlRk/htmlview SetAnimation table].
|Animation table index. Converted to an [[Animation ID]] for the current sprite using the [https://docs.google.com/spreadsheets/d/11xHv80Def5mtF60ZsfI1lF1eNX0dBE2It837Q08AlRk/htmlview SetAnimation table].
|}
|}
=== 0xfe - SetAttribute ===
=== 0xfe - SetAttribute ===
<TO DO: Opcode description>
Does nothing.


{| class="wikitable"
{| class="wikitable"
Line 4,266: Line 4,679:
|uint
|uint
|unk0
|unk0
|
|Does nothing.
|}
|}
=== 0xff - SetBlink ===
=== 0xff - SetBlink ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 4,281: Line 4,696:
|1
|1
|uint
|uint
|unk0
|visible_interval
|
|The number of frames to wait for while the entity is visible.
|-
|-
|2
|2
|uint
|uint
|unk1
|invisible_interval
|
|The number of frames to wait for while the entity is invisible.
|}
|}
=== 0x100 - SetDirection ===
=== 0x100 - SetDirection ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 4,303: Line 4,720:
|Direction
|Direction
|direction
|direction
|
|The type of direction, the list of which can be seen by typing <code>DIR_</code> in SkyTemple's Script Engine Debugger.
|}
|}
=== 0x101 - SetDirectionLives ===
=== 0x101 - SetDirectionLives ===
Line 4,327: Line 4,744:
|}
|}
=== 0x102 - SetEffect ===
=== 0x102 - SetEffect ===
<TO DO: Opcode description>
Plays back an [[List of Effect Animations|effect animation]] assigned to an actor or performer.


{| class="wikitable"
{| class="wikitable"
Line 4,340: Line 4,757:
|Effect
|Effect
|effect_id
|effect_id
|
|The ID of a given effect.
|-
|-
|2
|2
|uint
|uint
|position_marker_id?
|position_marker_id?
|
|Set to one of the following character sprite offsets:
0: Head<br>1: Right Hand<br>2: Left Hand<br>3: Center<br>4: No offset (bottom of sprite)
|}
|}
=== 0x103 - SetFunctionAttribute ===
=== 0x103 - SetFunctionAttribute ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 4,359: Line 4,778:
|-
|-
|1
|1
|uint
|bitfield
|unk0
|unk0
|
|
|}
|}
=== 0x104 - SetHeight ===
=== 0x104 - SetHeight ===
<TO DO: Opcode description>
Moves an actor "vertically" by distancing it from its shadow.


{| class="wikitable"
{| class="wikitable"
Line 4,377: Line 4,796:
|uint
|uint
|unk0
|unk0
|
|number of pixels to move up or down by.
|}
|}
=== 0x105 - SetHitAttribute ===
=== 0x105 - SetHitAttribute ===
Line 4,391: Line 4,810:
|-
|-
|1
|1
|uint
|bitfield
|unk0
|unk0
|
|
Line 4,422: Line 4,841:
|}
|}
=== 0x107 - SetOutputAttribute ===
=== 0x107 - SetOutputAttribute ===
<TO DO: Opcode description>
Sets certain bits of an entity's (i.e., an actor, object, or performer) "output" attribute to 1.
 
{| class="wikitable"
{| class="wikitable"
|+Parameters
|+Parameters
Line 4,433: Line 4,851:
|-
|-
|1
|1
|uint
|bitfield
|unk0
|output_bitfield
|
|
# Underlay below entities.
# Overlay above entities.
# Overlay above the current Map Background's Layer 2.
# Overlay above the game's canvas system, which includes the textbox, portrait, and some <code>screen_</code> commands that do not end in <code>All</code>.
# Flicker.
# Transparency.
# Invisibility.
# Displays shadow.
|}
|}
=== 0x108 - SetPosition ===
=== 0x108 - SetPosition ===
Line 4,548: Line 4,974:
|-
|-
|1
|1
|uint
|bitfield
|unk0
|unk0
|
|
Line 4,579: Line 5,005:
|}
|}
=== 0x110 - Slide2Position ===
=== 0x110 - Slide2Position ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 4,591: Line 5,017:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed. Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|uint
|uint
|x
|x
|
|The pixel position on the X-axis.
|-
|-
|3
|3
|uint
|uint
|y
|y
|
|The pixel position on the Y-axis.
|}
|}
=== 0x111 - Slide2PositionLives ===
=== 0x111 - Slide2PositionLives ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 4,617: Line 5,044:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed. Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|uint
|uint
|unk1
|actor_id
|
|The ID of the actor to move the entity to.
|}
|}
=== 0x112 - Slide2PositionMark ===
=== 0x112 - Slide2PositionMark ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 4,639: Line 5,069:
|uint
|uint
|num_parameters
|num_parameters
|
|The number of parameters to read from this opcode.
|-
|-
|2+
|2+
|PositionMark
|PositionMark
|pos_marker
|pos_marker
|This parameter may be repeated multiple times
|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 ===
=== 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 4,659: Line 5,093:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.  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 4,705: Line 5,140:
|1
|1
|uint
|uint
|unk0
|speed
|
|
|-
|-
Line 4,731: Line 5,166:
|1
|1
|uint
|uint
|unk0
|speed
|
|
|-
|-
Line 4,757: Line 5,192:
|1
|1
|uint
|uint
|unk0
|speed
|
|
|-
|-
Line 4,783: Line 5,218:
|1
|1
|uint
|uint
|unk0
|speed
|
|
|-
|-
|2
|2
|uint
|uint
|unk1
|actor_id
|
|
|}
|}
Line 4,825: Line 5,260:
|1
|1
|uint
|uint
|unk0
|speed
|
|
|-
|-
Line 4,846: Line 5,281:
|1
|1
|uint
|uint
|unk0
|num_parameters
|
|
|-
|-
Line 4,871: Line 5,306:
|1
|1
|uint
|uint
|unk0
|speed
|
|
|-
|-
Line 4,897: Line 5,332:
|1
|1
|uint
|uint
|unk0
|speed
|
|
|-
|-
Line 5,005: Line 5,440:
|}
|}
=== 0x122 - SlidePositionMark ===
=== 0x122 - SlidePositionMark ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 5,018: Line 5,455:
|uint
|uint
|num_parameters
|num_parameters
|
|The number of parameters to read from this opcode.
|-
|-
|2+
|2+
|PositionMark
|PositionMark
|pos_marker
|pos_marker
|This parameter may be repeated multiple times
|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 ===
=== 0x123 - SlidePositionMark ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 5,038: Line 5,479:
|1
|1
|uint
|uint
|unk0
|speed
|
|Movement speed. Higher values result in a faster speed.
Values starting at 32770 and above will be slower than a value of 1.
|-
|-
|2
|2
|PositionMark
|PositionMark
|pos_marker
|pos_marker
|
|A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels.
|}
|}
=== 0x124 - SlidePositionMarkTime ===
=== 0x124 - SlidePositionMarkTime ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 5,106: Line 5,549:
|1
|1
|uint
|uint
|unk0
|speed
|
|
|-
|-
Line 5,144: Line 5,587:
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,157: Line 5,600:
|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,173: Line 5,617:
|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,189: Line 5,634:
|Level
|Level
|level
|level
|
|Map LEVEL the script should be located in.
|-
|-
|2
|2
|ConstString
|ConstString
|script_id
|script_id
|
|Name of the script itself, only the first 8 characters are read.
|-
|-
|3
|3
|uint
|uint
|unk2
|script_sector
|
|The "sector" of the script, and the value <code>switch(sector())</code> will return in def 0. Often used to determine whether a cutscene should be played as a flashback or not.
|}
|}
=== 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,215: Line 5,661:
|Level
|Level
|level
|level
|
|Map LEVEL the script should be located in.
|-
|-
|2
|2
|ConstString
|ConstString
|script_id
|script_id
|
|Name of the script itself, only the first 8 characters are read.
|-
|-
|3
|3
|uint
|uint
|unk2
|script_sector
|
|The "sector" of the script, and the value <code>switch(sector())</code> will return in def 0. Often used to determine whether a cutscene should be played as a flashback or not.
|}
|}
=== 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,243: Line 5,690:
|
|
|}
|}
=== 0x12f - supervision_ExecuteEnter ===
=== 0x12f - supervision_ExecuteEnter ===
<TO DO: Opcode description>
Loads an Enter script from the specified level.


{| class="wikitable"
{| class="wikitable"
Line 5,256: Line 5,704:
|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,354: Line 5,803:
|}
|}
=== 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,366: Line 5,815:
|1
|1
|ConstString
|ConstString
|const
|script_id
|
|
|}
|}
=== 0x135 - supervision_ExecuteExportSub ===
=== 0x135 - supervision_ExecuteExportSub ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 5,407: Line 5,857:
|}
|}
=== 0x137 - supervision_Remove ===
=== 0x137 - supervision_Remove ===
<TO DO: Opcode description>
Unloads a sector of the Sub scene.


{| class="wikitable"
{| class="wikitable"
Line 5,419: Line 5,869:
|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,436: Line 5,887:
|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,451: Line 5,903:
|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,481: Line 5,934:
|}
|}
=== 0x13b - supervision_Station ===
=== 0x13b - supervision_Station ===
<TO DO: Opcode description>
Loads a sector of the Sub scene.


{| class="wikitable"
{| class="wikitable"
Line 5,494: Line 5,947:
|uint
|uint
|station_id
|station_id
|
|The ID of the sector to load.
|}
|}
=== 0x13c - supervision_StationCommon ===
=== 0x13c - supervision_StationCommon ===
<TO DO: Opcode description>
Loads a sector of the Enter scene.
 
Can be used to call sectors of an enter scene within acting scenes!


{| class="wikitable"
{| class="wikitable"
Line 5,510: Line 5,966:
|uint
|uint
|station_id
|station_id
|
|The ID of the sector to load.
|}
|}
=== 0x13d - supervision_Suspend ===
=== 0x13d - supervision_Suspend ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 5,555: Line 6,012:
|}
|}
=== 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,567: Line 6,026:
|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,593: Line 6,053:
|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,619: Line 6,080:
|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 5,669: Line 6,131:
|}
|}
=== 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 5,681: Line 6,145:
|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 5,821: Line 6,286:
|}
|}
=== 0x157 - Wait ===
=== 0x157 - Wait ===
<TO DO: Opcode description>
Pauses the routine for a set number of frames. After the number of frames, the routine will resume.


{| class="wikitable"
{| class="wikitable"
Line 5,834: Line 6,299:
|uint
|uint
|duration
|duration
|
|The number of frames that the routine will wait for before resuming.
|}
|}
=== 0x158 - WaitAnimation ===
=== 0x158 - WaitAnimation ===
<TO DO: Opcode description>
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.


No parameters.
=== 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 5,862: Line 6,330:
|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 5,878: Line 6,347:
|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.
=== 0x15e - WaitEffect ===
=== 0x15e - WaitEffect ===
<TO DO: Opcode description>
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.


No parameters.
=== 0x15f - WaitEndAnimation ===
=== 0x15f - WaitEndAnimation ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 5,893: Line 6,364:
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 5,906: Line 6,377:
|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 5,922: Line 6,394:
|Object
|Object
|object_id
|object_id
|
|The ID of the object that the routine will wait for.
|}
|}
=== 0x162 - WaitExecutePerformer ===
=== 0x162 - WaitExecutePerformer ===
<TO DO: Opcode description>
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.


{| class="wikitable"
{| class="wikitable"
Line 5,938: Line 6,411:
|uint
|uint
|performer_id
|performer_id
|
|The ID of the performer that the routine will wait for.
|}
|}
=== 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 5,965: Line 6,440:
|
|
|}
|}
=== 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 5,986: Line 6,462:
|
|
|}
|}
=== 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,007: Line 6,484:
|
|
|}
|}
=== 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,020: Line 6,498:
|1
|1
|uint
|uint
|unk0
|lock_id
|
|
|}
|}
=== 0x168 - WaitMe ===
=== 0x168 - WaitMe ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Line 6,048: Line 6,527:
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,060: Line 6,539:
|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,094: Line 6,574:
|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,109: Line 6,590:
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,121: Line 6,602:
|1
|1
|uint
|uint
|unk0
|world_map_marker_id
|
|
|}
|}
=== 0x174 - worldmap_ChangeLevel ===
=== 0x174 - worldmap_ChangeLevel ===
<TO DO: Opcode description>
Causes the clouds parting animation on the world map, presumably hardcoded by vanilla use-case.


{| class="wikitable"
{| class="wikitable"
Line 6,137: Line 6,619:
|1
|1
|uint
|uint
|unk0
|world_map_level
|
|Level to transition the world map state to.
|}
|}
=== 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,157: Line 6,640:
|1
|1
|uint
|uint
|unk0
|world_map_marker_id
|
|The world map id to move the camera to.
|}
|}
=== 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,177: Line 6,662:
|1
|1
|uint
|uint
|unk0
|world_map_marker_id
|
|
|}
|}
=== 0x179 - worldmap_SetCamera ===
=== 0x179 - worldmap_SetCamera ===
<TO DO: Opcode description>
Centers the world map camera on a specific world map marker.


{| class="wikitable"
{| class="wikitable"
Line 6,193: Line 6,679:
|1
|1
|uint
|uint
|unk0
|world_map_marker_id
|
|The world map id to set the camera to.
|}
|}
=== 0x17a - worldmap_SetLevel ===
=== 0x17a - worldmap_SetLevel ===
<TO DO: Opcode description>
Sets the current world map state. Additionally updates $WORLD_MAP_LEVEL


{| class="wikitable"
{| class="wikitable"
Line 6,209: Line 6,695:
|1
|1
|uint
|uint
|unk0
|world_map_level
|
|Level to assign the world map state to.
|}
|}
=== 0x17b - worldmap_SetMark ===
=== 0x17b - worldmap_SetMark ===
<TO DO: Opcode description>
Enables a yellow dot for the specified world map marker.


{| class="wikitable"
{| class="wikitable"
Line 6,225: Line 6,711:
|1
|1
|uint
|uint
|unk0
|world_map_marker_id
|
|The world map id to enable the yellow dot for.
|}
|}
=== 0x17c - worldmap_SetMessage ===
=== 0x17c - worldmap_SetMessage ===
<TO DO: Opcode description>
<TO DO: Opcode description>
Seemingly unused in vanilla.


{| class="wikitable"
{| class="wikitable"
Line 6,245: Line 6,733:
|}
|}
=== 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,257: Line 6,745:
|1
|1
|uint
|uint
|unk0
|world_map_marker_id
|
|
|}
|}
=== 0x17e - worldmap_SetMode ===
=== 0x17e - worldmap_SetMode ===
<TO DO: Opcode description>
Sets the "mode" of the world map, to align with a particular purpose.
 
Mode 1 seems to be for handling travel to a dungeon or area.
 
Mode 2 is only used by debug scripts.
 
Mode 3 is for handling moving clouds.
 
Mode 4 is for cutscene use, or for showing where things are on a map.
 
All other modes are unused.


{| class="wikitable"
{| class="wikitable"
Line 6,273: Line 6,772:
|1
|1
|uint
|uint
|unk0
|world_map_mode
|
|
|}
|}
Line 6,302: Line 6,801:
|-
|-
|3
|3
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,328: Line 6,827:
|-
|-
|3
|3
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,344: Line 6,843:
|-
|-
|1
|1
|bool
|uint
|param
|param
|
|
|-
|-
|2
|2
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,370: Line 6,869:
|-
|-
|2
|2
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,391: Line 6,890:
|-
|-
|2
|2
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,412: Line 6,911:
|-
|-
|2
|2
|bool
|uint
|value
|value
|
|
|-
|-
|3
|3
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,448: Line 6,947:
|-
|-
|4
|4
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,479: Line 6,978:
|-
|-
|4
|4
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,510: Line 7,009:
|-
|-
|4
|4
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,541: Line 7,040:
|-
|-
|4
|4
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,572: Line 7,071:
|-
|-
|4
|4
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,603: Line 7,102:
|-
|-
|4
|4
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,624: Line 7,123:
|-
|-
|2
|2
|Operator
|uint
|operator
|operator
|
|
Line 6,634: Line 7,133:
|-
|-
|4
|4
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,655: Line 7,154:
|-
|-
|2
|2
|Operator
|uint
|operator
|operator
|
|
Line 6,665: Line 7,164:
|-
|-
|4
|4
|Addr
|uint
|jump_address
|jump_address
|
|
|}
|}
=== 0x36 - BranchVariation ===
=== 0x36 - BranchVariation ===
<TO DO: Opcode description>
Used for demo cutscenes.
 
Jumps to the specified address if the first parameter is 0. On the demo version of the game, jumps if the first parameter is 3.


{| class="wikitable"
{| class="wikitable"
Line 6,683: Line 7,184:
|uint
|uint
|param
|param
|
|Unknown. Always 3.
|-
|-
|2
|2
|Addr
|uint
|jump_address
|jump_address
|
|Address to jump to.
|}
|}
=== 0x37 - Call ===
=== 0x37 - Call ===
Jumps to the specified address, runs code, and returns to the line of code in which this opcode was used (only if <code>return;</code> was used in the routine this opcode calls).
Jumps to the specified address, runs code, and returns to the line of code in which this opcode was used (only if <code>return;</code> was used in the routine this opcode calls). Only one call can be stored at a time!
 
Use within macros is ill-advised, as using <code>return;</code> within a macro will just end the macro!


{| class="wikitable"
{| class="wikitable"
Line 6,702: Line 7,205:
|-
|-
|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 6,723: Line 7,226:
|-
|-
|2
|2
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,744: Line 7,247:
|-
|-
|2
|2
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,765: Line 7,268:
|-
|-
|2
|2
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,781: Line 7,284:
|-
|-
|1
|1
|Operator
|uint
|operator
|operator
|
|
Line 6,791: Line 7,294:
|-
|-
|3
|3
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,828: Line 7,331:
|-
|-
|1
|1
|Operator
|uint
|operator
|operator
|
|
Line 6,838: Line 7,341:
|-
|-
|3
|3
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,854: Line 7,357:
|-
|-
|1
|1
|Operator
|uint
|operator
|operator
|
|
Line 6,864: Line 7,367:
|-
|-
|3
|3
|Addr
|uint
|jump_address
|jump_address
|
|
Line 6,910: Line 7,413:
|-
|-
|3
|3
|bool
|uint
|value
|value
|
|
Line 6,931: Line 7,434:
|-
|-
|2
|2
|CalcOperator
|uint
|calc_operator
|calc_operator
|
|
Line 6,957: Line 7,460:
|-
|-
|2
|2
|CalcOperator
|uint
|calc_operator
|calc_operator
|
|
Line 7,114: Line 7,617:
|-
|-
|2
|2
|bool
|uint
|value
|value
|
|
Line 7,145: Line 7,648:
|}
|}
=== 0x82 - Hold ===
=== 0x82 - Hold ===
<TO DO: Opcode description>
Will stall a script forever.


No parameters.
No parameters.
Line 7,160: Line 7,663:
|-
|-
|1
|1
|Addr
|uint
|jump_address
|jump_address
|
|
Line 7,181: Line 7,684:
|}
|}
=== 0xaa - message_SwitchMenu ===
=== 0xaa - message_SwitchMenu ===
<TO DO: Opcode description>
Enclose within a switch case, and generates a dialogue prompt with the options present in subsequent "case menu("text"):"


{| class="wikitable"
{| class="wikitable"
Line 7,193: Line 7,696:
|1
|1
|uint
|uint
|unk0
|cancel
|
|If player can use the B button to back out of a menu. 0 for false, 1 for true.
|-
|-
|2
|2
|uint
|uint
|unk1
|init
|
|Entry number to start the cursor at, starting at 1
|}
|}
=== 0xab - message_SwitchMenu2 ===
=== 0xab - message_SwitchMenu2 ===
<TO DO: Opcode description>
Same as message_SwitchMenu, but it also takes an argument for a bitfield, and will only display dialogue options for which the corresponding bit is enabled (set to 1).


{| class="wikitable"
{| class="wikitable"
Line 7,214: Line 7,717:
|1
|1
|uint
|uint
|unk0
|cancel
|
|If player can use the B button to back out of a menu. 0 for false, 1 for true.
|-
|-
|2
|2
|uint
|uint
|unk1
|init
|
|Entry number to start the cursor at, starting at 1
|-
|-
|3
|3
|uint
|uint
|unk2
|unk2
|
|Bitfield $VAR
|}
|}
=== 0xac - message_SwitchMonologue ===
=== 0xac - message_SwitchMonologue ===
<TO DO: Opcode description>
Structured similarly to a switch statement. Typically uses <code>$HERO_TALK_KIND</code> as an argument, and uses multiple cases to display certain dialogue strings.
 
<code>case 4:</code> used when the player is male or genderless
 
<code>case 5:</code> used when the player is female
 
<code>default:</code> used when <code>$HERO_TALK_KIND</code>'s Talk Group has a value other than 4 or 5
 
This opcode supports displaying a portrait. No sound effect is used when text is scrolling.


{| class="wikitable"
{| class="wikitable"
Line 7,241: Line 7,752:
|GameVar
|GameVar
|var
|var
|
|<code>$x_TALK_KIND</code>, contains Talk Group number
|}
|}
=== 0xad - message_SwitchTalk ===
=== 0xad - message_SwitchTalk ===
<TO DO: Opcode description>
Same as _SwitchMonologue, but typically uses <code>$PARTNER_TALK_KIND</code> as an argument, and the cases used vary.
 
Of the vanilla game partner options:
 
<code>case 1:</code> used if Squirtle, Tododile, Chimchar, Meowth, or Munchlax
 
<code>case 2:</code> used for all other male partners
 
<code>case 3:</code> used for all female partners
 
<code>default:</code> used when <code>$PARTNER_TALK_KIND</code>'s Talk Group has a value other than 1, 2, or 3
 
This opcode supports displaying a portrait. The [[sound effect]] 16133 will emit from the each character scrolling in the text.


{| class="wikitable"
{| class="wikitable"
Line 7,257: Line 7,780:
|GameVar
|GameVar
|var
|var
|
|<code>$x_TALK_KIND</code>, contains Talk Group number
|}
|}
=== 0xc9 - object ===
=== 0xc9 - object ===
Line 7,292: Line 7,815:
|}
|}
=== 0xd5 - Return ===
=== 0xd5 - Return ===
<TO DO: Opcode description>
If run from within a macro, ends the macro.
 
If run after the "call" opcode was used, will return to the address of the call opcode.
 
If used within a script, ends the script.


No parameters.
No parameters.
Line 7,392: Line 7,919:
|}
|}
=== 0x145 - SwitchLives ===
=== 0x145 - SwitchLives ===
<TO DO: Opcode description>
If inside a Switch Case, take the case equal to the species ID of the specified Actor!


{| class="wikitable"
{| class="wikitable"
Line 7,403: Line 7,930:
|-
|-
|1
|1
|uint
|Entity
|unk0
|actor_id
|
|An entry in the Actor List.
|}
|}
=== 0x146 - SwitchRandom ===
=== 0x146 - SwitchRandom ===
<TO DO: Opcode description>
To be used in a switch statement. Will switch to a case of a random number below the specified integer.


{| class="wikitable"
{| class="wikitable"
Line 7,421: Line 7,948:
|uint
|uint
|max_value
|max_value
|
|Largest random output, plus 1
|}
|}
=== 0x147 - SwitchScenario ===
=== 0x147 - SwitchScenario ===
Line 7,511: Line 8,038:
|
|
|}
|}
{{NavScriptTerms}}
[[Category:Documentation]]