List of Opcodes: Difference between revisions
→0x12f - supervision_ExecuteEnter: Added description for supervision_ExecuteEnter Tags: Mobile edit Mobile web edit |
Happylappy (talk | contribs) m World Map Mode documentation |
||
| (57 intermediate revisions by 8 users not shown) | |||
| Line 2: | Line 2: | ||
This article documents the different opcodes, their purpose and parameters. The purpose of unkX parameters is unknown. | This article documents the different opcodes, their purpose and parameters. The purpose of unkX parameters is unknown. | ||
== What is an opcode? == | |||
An opcode is an instruction to the machine (it tells the machine to 'do' something). In modern programming, it would be most similar to a [https://en.wikipedia.org/wiki/Function_(computer_programming) function]. For a more technical description, see [https://en.wikipedia.org/wiki/Opcode here]. | |||
== Types of parameters == | |||
* uint: An unsigned integer (a number without decimals). It cannot be negative. It is possible that in the game's code, there are only signed integers and no unsigned integers, but not enough research has been done on the matter. For the most part, it shouldn't matter. | |||
* sint: A signed integer (a number without decimals). It can be either positive or negative. | |||
* bitfield: A bitfield is uint where each bits (0 or 1) are treated independantly. They are used to store multiple binary (boolean) values efficiently. Opcodes that use it usually come in the <code>Set</code> and <code>Reset</code> variant. The <code>Set</code> variant define to true the values which are 1 in the input bitfield (while leaving the others untouched), and <code>Reset</code> define to false the values which are 1 in the input bitfield (while also leaving the others untouched). | |||
* String: Text (i.e dialogue). There should always be a quotation mark (") at the beginning and end. | |||
* ConstString: Same as String. | |||
* Routine: Any of the 701 coroutines from [[Unionall]]. Always begins with "CORO_" | |||
* Entity: An actor, performer. (not an object!) | |||
* Object: An object in a scene. (not an actor or perfomer!) | |||
* Level: Any level from the [[Script Engine|Level List]]. Will always begin with "LEVEL_". | |||
* Bgm: Any music in the game. Will always begin with "BGM_". (example: BGM_CRAGGY_COAST) | |||
* PositionMark: A position. Will be written as "Position<'MarkName', x, y>". Once a position mark is written in a script, SkyTemple will show an option to place it visually in the scene. | |||
* Face: A portrait expression. Will always begin with "FACE_". (examples: FACE_NORMAL, FACE_HAPPY, FACE_PAIN) | |||
* FaceMode: A portrait position. Will always begin with "FACE_MODE_". | |||
* Direction: A direction for an entity to move in or turn to. Will always begin with "DIR_". (examples: DIR_UP, DIR_RIGHT) | |||
* ProcessSpecial: One of the games special processes. Can be referred to by its number, or name. | |||
* Effect: A graphical effect. | |||
* GameVar: Any of the game's [[List of Script Variables|Script Variables]]. Will always begin with "$". | |||
== Relevant Opcodes == | == Relevant Opcodes == | ||
| Line 97: | Line 119: | ||
|- | |- | ||
|1 | |1 | ||
| | |sint16 | ||
|speed0 | |speed0 | ||
|The speed to scroll either: | |The speed to scroll either: | ||
| Line 107: | Line 129: | ||
|- | |- | ||
|2 | |2 | ||
| | |sint16 | ||
|speed1 | |speed1 | ||
|The speed to scroll either: | |The speed to scroll either: | ||
| Line 191: | Line 213: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |effect | ||
| | | | ||
* Transitions from Layer 2 to Layer 1. | |||
* Fades in Layer 1 from total darkness. | |||
* Transitions from Layer 2 to Layer 1. | |||
* Fades in Layer 1 from total darkness. | |||
* Transitions from Layer 1 to Layer 2. | |||
* Fades out Layer 1 to total darkness. | |||
* Merges Layer 1 onto Layer 2, but fades in Layer 1 from total darkness. | |||
* Fades in Layer 1 from total darkness. | |||
* Merges Layer onto Layer 2, but fades out Layer 1 to total darkness. | |||
* Fades out Layer 1 to total darkness. | |||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |duration | ||
| | |The number of frames used to play a given effect. | ||
|} | |} | ||
=== 0x8 - back_SetDungeonBanner === | === 0x8 - back_SetDungeonBanner === | ||
| Line 359: | Line 382: | ||
|} | |} | ||
=== 0xf - back_SetWeatherEffect === | === 0xf - back_SetWeatherEffect === | ||
Currently unknown. The only values this opcode accepts seems to be 1, 2, and 3. | 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 374: | 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 429: | Line 453: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |effect_id | ||
| | | | ||
# The default state of the Animation Palette. | # The default state of the Animation Palette. | ||
| Line 534: | Line 558: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |effect | ||
| | | | ||
* Transitions from Layer 2 to Layer 1. | |||
* Fades in Layer 1 from total darkness. | |||
* Transitions from Layer 2 to Layer 1. | |||
* Fades in Layer 1 from total darkness. | |||
* Transitions from Layer 1 to Layer 2. | |||
* Fades out Layer 1 to total darkness. | |||
* Merges Layer 1 onto Layer 2, but fades in Layer 1 from total darkness. | |||
* Fades in Layer 1 from total darkness. | |||
* Merges Layer onto Layer 2, but fades out Layer 1 to total darkness. | |||
* Fades out Layer 1 to total darkness. | |||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |duration | ||
| | |The number of frames used to play a given effect. | ||
|} | |} | ||
=== 0x17 - back2_SetGround === | === 0x17 - back2_SetGround === | ||
| Line 883: | Line 910: | ||
|- | |- | ||
|1 | |1 | ||
| | |Routine | ||
|coro_id | |coro_id | ||
|One of the 701 possible Unionall Coroutines. | |One of the 701 possible Unionall Coroutines. | ||
| Line 901: | Line 928: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 920: | Line 947: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 939: | Line 966: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 978: | Line 1,005: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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,095: | Line 1,122: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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,114: | Line 1,141: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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,133: | Line 1,160: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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,172: | Line 1,199: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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,255: | Line 1,282: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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,272: | Line 1,299: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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,289: | Line 1,316: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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,328: | Line 1,355: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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,441: | Line 1,468: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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,458: | Line 1,485: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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,475: | Line 1,502: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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,514: | Line 1,541: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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,598: | Line 1,625: | ||
|- | |- | ||
|1 | |1 | ||
| | |Routine | ||
|coro_id | |coro_id | ||
|One of the 701 possible Unionall Coroutines. | |One of the 701 possible Unionall Coroutines. | ||
| Line 1,735: | Line 1,762: | ||
|} | |} | ||
=== 0x81 - Flash === | === 0x81 - Flash === | ||
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,757: | Line 1,784: | ||
|GameVar | |GameVar | ||
|var | |var | ||
|One of the | |One of the indexed variables. Non-indexed values causes the IndexError. | ||
|} | |} | ||
=== 0x84 - item_Set === | === 0x84 - item_Set === | ||
| Line 1,763: | 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,780: | 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,807: | Line 1,836: | ||
|2 | |2 | ||
|uint | |uint | ||
| | |table_ID | ||
|Some | |Some item tables related to Spinda's Cafe. | ||
|} | |||
The table IDs themselves are as follows. Values above 15 are currently unknown and untested. | |||
{| class="wikitable" | |||
!# | |||
!Description | |||
!# | |||
!Description | |||
|- | |||
|0 | |||
|Sky Gift Item Pool | |||
|8 | |||
|Silver Ticket Win Pool | |||
|- | |||
|1 | |||
|Numel "Give" Item Pool | |||
|9 | |||
|Silver Ticket Big Win Pool | |||
|- | |||
|2 | |||
|Numel "Recieve" Item Pool | |||
|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 === | === 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. | 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. | ||
| Line 1,845: | Line 1,922: | ||
|- | |- | ||
|1 | |1 | ||
| | |Routine | ||
|coro_id | |coro_id | ||
|One of the 701 possible Unionall Coroutines. | |One of the 701 possible Unionall Coroutines. | ||
| Line 1,908: | Line 1,985: | ||
|} | |} | ||
=== 0x8d - main_EnterDungeon === | === 0x8d - main_EnterDungeon === | ||
Attempts to exit ground mode and begins dungeon mode at a specific dungeon. | |||
If attempting to run this opcode before selecting any option from the Top Menu, the game will not enter any dungeon and instead attempt to load a DEMO Unionall coroutine or the Top Menu. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 2,473: | Line 2,552: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 2,502: | Line 2,581: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 2,551: | Line 2,630: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 2,599: | Line 2,678: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 2,628: | Line 2,707: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 2,657: | Line 2,736: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 2,686: | Line 2,765: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 2,734: | Line 2,813: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 2,782: | Line 2,861: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 2,811: | Line 2,890: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 2,840: | Line 2,919: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |Movement speed. Higher values result in a faster speed. | ||
|- | |- | ||
|2 | |2 | ||
| Line 2,868: | Line 2,947: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |Movement speed. Higher values result in a faster speed. | ||
|- | |- | ||
|2 | |2 | ||
| Line 2,891: | Line 2,970: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 2,920: | Line 2,999: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 2,944: | Line 3,023: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 2,997: | Line 3,076: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 3,021: | Line 3,100: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 3,074: | Line 3,153: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 3,142: | Line 3,221: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 3,308: | Line 3,387: | ||
|- | |- | ||
|1 | |1 | ||
| | |bitfield | ||
|function_bitfield | |function_bitfield | ||
|Most bits' purposes are unknown. Bit 1 appears to be the bit used for allowing an entity to follow a Type 1 actor, like the actor ACTOR_ATTENDANT1 in the overworld. | |Most bits' purposes are unknown. Bit 1 appears to be the bit used for allowing an entity to follow a Type 1 actor, like the actor ACTOR_ATTENDANT1 in the overworld. | ||
| Line 3,324: | Line 3,403: | ||
|- | |- | ||
|1 | |1 | ||
| | |bitfield | ||
|hit_bitfield | |hit_bitfield | ||
|Most bits' purposes are unknown. | |Most bits' purposes are unknown. | ||
| Line 3,344: | Line 3,423: | ||
|- | |- | ||
|1 | |1 | ||
| | |bitfield | ||
|output_bitfield | |output_bitfield | ||
| | | | ||
| Line 3,368: | Line 3,447: | ||
|- | |- | ||
|1 | |1 | ||
| | |bitfield | ||
|reply_bitfield | |reply_bitfield | ||
|Most bits' purposes are unknown. | |Most bits' purposes are unknown. | ||
| Line 3,434: | Line 3,513: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true. | ||
| Line 3,473: | Line 3,552: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
| Line 3,516: | Line 3,595: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
| Line 3,537: | Line 3,616: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
| Line 3,562: | Line 3,641: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
| Line 3,583: | Line 3,662: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
| Line 3,654: | Line 3,733: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
| Line 3,706: | Line 3,785: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
| Line 3,762: | Line 3,841: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true. | ||
| Line 3,801: | Line 3,880: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
| Line 3,886: | Line 3,965: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
| Line 3,907: | Line 3,986: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
| Line 3,928: | Line 4,007: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true. | ||
| Line 3,998: | Line 4,077: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
| Line 4,040: | Line 4,119: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
| Line 4,133: | Line 4,212: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
| Line 4,185: | Line 4,264: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
| Line 4,237: | Line 4,316: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
| Line 4,349: | Line 4,428: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
| Line 4,665: | Line 4,744: | ||
|} | |} | ||
=== 0x102 - SetEffect === | === 0x102 - SetEffect === | ||
Plays back an [[List of Effect Animations|effect animation]] assigned to an actor or performer. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,678: | 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,697: | Line 4,778: | ||
|- | |- | ||
|1 | |1 | ||
| | |bitfield | ||
|unk0 | |unk0 | ||
| | | | ||
|} | |} | ||
=== 0x104 - SetHeight === | === 0x104 - SetHeight === | ||
Moves an actor "vertically" by distancing it from its shadow. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,715: | Line 4,796: | ||
|uint | |uint | ||
|unk0 | |unk0 | ||
| | |number of pixels to move up or down by. | ||
|} | |} | ||
=== 0x105 - SetHitAttribute === | === 0x105 - SetHitAttribute === | ||
| Line 4,729: | Line 4,810: | ||
|- | |- | ||
|1 | |1 | ||
| | |bitfield | ||
|unk0 | |unk0 | ||
| | | | ||
| Line 4,760: | Line 4,841: | ||
|} | |} | ||
=== 0x107 - SetOutputAttribute === | === 0x107 - SetOutputAttribute === | ||
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,771: | Line 4,851: | ||
|- | |- | ||
|1 | |1 | ||
| | |bitfield | ||
| | |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,886: | Line 4,974: | ||
|- | |- | ||
|1 | |1 | ||
| | |bitfield | ||
|unk0 | |unk0 | ||
| | | | ||
| Line 4,930: | Line 5,018: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster 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 | ||
| Line 4,957: | Line 5,045: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster 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 | ||
| Line 5,006: | Line 5,094: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster 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 | ||
| Line 5,052: | Line 5,140: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |speed | ||
| | | | ||
|- | |- | ||
| Line 5,078: | Line 5,166: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |speed | ||
| | | | ||
|- | |- | ||
| Line 5,104: | Line 5,192: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |speed | ||
| | | | ||
|- | |- | ||
| Line 5,130: | Line 5,218: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |speed | ||
| | | | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |actor_id | ||
| | | | ||
|} | |} | ||
| Line 5,172: | Line 5,260: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |speed | ||
| | | | ||
|- | |- | ||
| Line 5,193: | Line 5,281: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |num_parameters | ||
| | | | ||
|- | |- | ||
| Line 5,218: | Line 5,306: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |speed | ||
| | | | ||
|- | |- | ||
| Line 5,244: | Line 5,332: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |speed | ||
| | | | ||
|- | |- | ||
| Line 5,392: | Line 5,480: | ||
|uint | |uint | ||
|speed | |speed | ||
|Movement speed. Higher values result in a faster speed | |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 5,461: | Line 5,549: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |speed | ||
| | | | ||
|- | |- | ||
| Line 5,546: | 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 | ||
| | |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 === | ||
Loads a specified Acting script from the specified level from within Unionall | Loads a specified Acting script from the specified level from within Unionall. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 5,573: | 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 | ||
| | |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. | ||
|} | |} | ||
| Line 5,864: | Line 5,952: | ||
=== 0x13c - supervision_StationCommon === | === 0x13c - supervision_StationCommon === | ||
Loads a sector of the Enter scene. | 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,978: | Line 6,068: | ||
=== 0x14e - Turn2DirectionLives2 === | === 0x14e - Turn2DirectionLives2 === | ||
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,990: | Line 6,080: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |speed | ||
| | |How fast the actor turns. The higher the number, the slower the turn. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |rotationdirection | ||
| | |The way that the actor will turn to face the specified direction. 1 = clockwise, 2 = counterclockwise, 10 = the most efficient direction to turn. | ||
|- | |- | ||
|3 | |3 | ||
|uint | |uint | ||
| | |actor_id | ||
| | |ID of the target actor from Level List that the actor will turn to face. | ||
|} | |} | ||
=== 0x14f - Turn2DirectionMark === | === 0x14f - Turn2DirectionMark === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 6,217: | Line 6,308: | ||
=== 0x159 - WaitBackEffect === | === 0x159 - WaitBackEffect === | ||
Pauses the current routine until [[List of Opcodes#0x2 - back SetBackEffect|back_SetBackEffect]] is called. | |||
No parameters. | No parameters. | ||
=== 0x15a - WaitBack2Effect === | === 0x15a - WaitBack2Effect === | ||
Pauses the current routine until [[List of Opcodes#0x12 - back2 SetBackEffect|back2_SetBackEffect]] is called. | |||
No parameters. | No parameters. | ||
=== 0x15b - WaitBgm === | === 0x15b - WaitBgm === | ||
Pauses the current routine until the specified BGM on the first BGM track has ended. After the BGM ends, the routine will resume. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,238: | 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 === | ||
Pauses the current routine until the specified BGM on the second BGM track has ended. After the BGM ends, the routine will resume. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,254: | 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 === | ||
Pauses the routine until a DSE event with ID 0xF6 on the current BGM track is triggered. This can be used to sync certain parts of the scene to the background music. | |||
No parameters. | No parameters. | ||
| Line 6,321: | Line 6,415: | ||
=== 0x163 - WaitFadeIn === | === 0x163 - WaitFadeIn === | ||
Pauses the current routine and waits for the screen to fade in. After the screen fades in, the routine will resume. | |||
No parameters. | No parameters. | ||
=== 0x164 - WaitLockLives === | === 0x164 - WaitLockLives === | ||
Pauses the current routine until a [[List of Opcodes#0x8b - Lock|Lock]] opcode with the specified ''lock_id'' is reached in the specified actor's targeted routine. After the lock is reached, the routine will resume. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,345: | Line 6,440: | ||
| | | | ||
|} | |} | ||
=== 0x165 - WaitLockObject === | === 0x165 - WaitLockObject === | ||
Pauses the current routine until a [[List of Opcodes#0x8b - Lock|Lock]] opcode with the specified ''lock_id'' is reached in the specified object's targeted routine. After the lock is reached, the routine will resume. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,366: | Line 6,462: | ||
| | | | ||
|} | |} | ||
=== 0x166 - WaitLockPerformer === | === 0x166 - WaitLockPerformer === | ||
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,387: | Line 6,484: | ||
| | | | ||
|} | |} | ||
=== 0x167 - WaitLockSupervision === | === 0x167 - WaitLockSupervision === | ||
< | 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,400: | Line 6,498: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |lock_id | ||
| | | | ||
|} | |} | ||
=== 0x168 - WaitMe === | === 0x168 - WaitMe === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 6,428: | Line 6,527: | ||
No parameters. | No parameters. | ||
=== 0x16b - WaitRandom === | === 0x16b - WaitRandom === | ||
Pauses the routine for a random number of frames. After the number of frames, the routine will resume. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,440: | Line 6,539: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |duration_min | ||
| | |Minimum number of frames that the routine will wait for before resuming. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |duration_max | ||
| | |Maximum number of frames that the routine will wait for before resuming. | ||
|} | |} | ||
=== 0x16c - WaitScreenFade === | === 0x16c - WaitScreenFade === | ||
Waits until screen_FadeIn finishes executing. | |||
No parameters. | No parameters. | ||
=== 0x16d - WaitScreenFadeAll === | === 0x16d - WaitScreenFadeAll === | ||
Waits until screen_FadeInAll finishes executing. | |||
No parameters. | No parameters. | ||
=== 0x16e - WaitScreen2Fade === | === 0x16e - WaitScreen2Fade === | ||
Waits until screen2_FadeIn finishes executing. | |||
No parameters. | No parameters. | ||
| Line 6,490: | Line 6,590: | ||
No parameters. | No parameters. | ||
=== 0x173 - worldmap_BlinkMark === | === 0x173 - worldmap_BlinkMark === | ||
Shows a blinking world map marker. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,502: | Line 6,602: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |world_map_marker_id | ||
| | | | ||
|} | |} | ||
=== 0x174 - worldmap_ChangeLevel === | === 0x174 - worldmap_ChangeLevel === | ||
Causes the clouds parting animation on the world map, presumably hardcoded by vanilla use-case. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,518: | Line 6,619: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |world_map_level | ||
| | |Level to transition the world map state to. | ||
|} | |} | ||
=== 0x175 - worldmap_DeleteArrow === | === 0x175 - worldmap_DeleteArrow === | ||
Remove the yellow arrow from the world map. | |||
No parameters. | No parameters. | ||
=== 0x176 - worldmap_MoveCamera === | === 0x176 - worldmap_MoveCamera === | ||
Moves the camera to the specified world map marker. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,538: | Line 6,640: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |world_map_marker_id | ||
| | |The world map id to move the camera to. | ||
|} | |} | ||
=== 0x177 - worldmap_OffMessage === | === 0x177 - worldmap_OffMessage === | ||
Removes a textbox with the world map marker's name from the Top Screen | |||
No parameters. | No parameters. | ||
=== 0x178 - worldmap_SetArrow === | === 0x178 - worldmap_SetArrow === | ||
Shows an arrow pointing to a specified world map marker | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,558: | Line 6,662: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |world_map_marker_id | ||
| | | | ||
|} | |} | ||
=== 0x179 - worldmap_SetCamera === | === 0x179 - worldmap_SetCamera === | ||
Centers the world map camera on a specific world map marker. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,574: | Line 6,679: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |world_map_marker_id | ||
| | |The world map id to set the camera to. | ||
|} | |} | ||
=== 0x17a - worldmap_SetLevel === | === 0x17a - worldmap_SetLevel === | ||
Sets the current world map state. Additionally updates $WORLD_MAP_LEVEL | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,590: | Line 6,695: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |world_map_level | ||
| | |Level to assign the world map state to. | ||
|} | |} | ||
=== 0x17b - worldmap_SetMark === | === 0x17b - worldmap_SetMark === | ||
Enables a yellow dot for the specified world map marker. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,606: | Line 6,711: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |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,626: | Line 6,733: | ||
|} | |} | ||
=== 0x17d - worldmap_SetMessagePlace === | === 0x17d - worldmap_SetMessagePlace === | ||
Shows a textbox on the Top Screen with the specified world map marker's name. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,638: | Line 6,745: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |world_map_marker_id | ||
| | | | ||
|} | |} | ||
=== 0x17e - worldmap_SetMode === | === 0x17e - worldmap_SetMode === | ||
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,654: | Line 6,772: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |world_map_mode | ||
| | | | ||
|} | |} | ||
| Line 6,683: | Line 6,801: | ||
|- | |- | ||
|3 | |3 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 6,709: | Line 6,827: | ||
|- | |- | ||
|3 | |3 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 6,725: | Line 6,843: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|param | |param | ||
| | | | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 6,751: | Line 6,869: | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 6,772: | Line 6,890: | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 6,793: | Line 6,911: | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
|value | |value | ||
| | | | ||
|- | |- | ||
|3 | |3 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 6,829: | Line 6,947: | ||
|- | |- | ||
|4 | |4 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 6,860: | Line 6,978: | ||
|- | |- | ||
|4 | |4 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 6,891: | Line 7,009: | ||
|- | |- | ||
|4 | |4 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 6,922: | Line 7,040: | ||
|- | |- | ||
|4 | |4 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 6,953: | Line 7,071: | ||
|- | |- | ||
|4 | |4 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 6,984: | Line 7,102: | ||
|- | |- | ||
|4 | |4 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 7,005: | Line 7,123: | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
|operator | |operator | ||
| | | | ||
| Line 7,015: | Line 7,133: | ||
|- | |- | ||
|4 | |4 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 7,036: | Line 7,154: | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
|operator | |operator | ||
| | | | ||
| Line 7,046: | Line 7,164: | ||
|- | |- | ||
|4 | |4 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
|} | |} | ||
=== 0x36 - BranchVariation === | === 0x36 - BranchVariation === | ||
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 7,064: | Line 7,184: | ||
|uint | |uint | ||
|param | |param | ||
| | |Unknown. Always 3. | ||
|- | |- | ||
|2 | |2 | ||
| | |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 7,083: | Line 7,205: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|jump_address | |jump_address | ||
|The address to call, e.g., <code>call @label_0;</code> if <code>§label_0;</code> is defined in the script. | |The address to call, e.g., <code>call @label_0;</code> if <code>§label_0;</code> is defined in the script. | ||
| Line 7,104: | Line 7,226: | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 7,125: | Line 7,247: | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 7,146: | Line 7,268: | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 7,162: | Line 7,284: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|operator | |operator | ||
| | | | ||
| Line 7,172: | Line 7,294: | ||
|- | |- | ||
|3 | |3 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 7,209: | Line 7,331: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|operator | |operator | ||
| | | | ||
| Line 7,219: | Line 7,341: | ||
|- | |- | ||
|3 | |3 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 7,235: | Line 7,357: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|operator | |operator | ||
| | | | ||
| Line 7,245: | Line 7,367: | ||
|- | |- | ||
|3 | |3 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 7,291: | Line 7,413: | ||
|- | |- | ||
|3 | |3 | ||
| | |uint | ||
|value | |value | ||
| | | | ||
| Line 7,312: | Line 7,434: | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
|calc_operator | |calc_operator | ||
| | | | ||
| Line 7,338: | Line 7,460: | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
|calc_operator | |calc_operator | ||
| | | | ||
| Line 7,495: | Line 7,617: | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
|value | |value | ||
| | | | ||
| Line 7,526: | Line 7,648: | ||
|} | |} | ||
=== 0x82 - Hold === | === 0x82 - Hold === | ||
Will stall a script forever. | |||
No parameters. | No parameters. | ||
| Line 7,541: | Line 7,663: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|jump_address | |jump_address | ||
| | | | ||
| Line 7,562: | Line 7,684: | ||
|} | |} | ||
=== 0xaa - message_SwitchMenu === | === 0xaa - message_SwitchMenu === | ||
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,574: | Line 7,696: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |cancel | ||
| | |If player can use the B button to back out of a menu. 0 for false, 1 for true. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |init | ||
| | |Entry number to start the cursor at, starting at 1 | ||
|} | |} | ||
=== 0xab - message_SwitchMenu2 === | === 0xab - message_SwitchMenu2 === | ||
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,595: | Line 7,717: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |cancel | ||
| | |If player can use the B button to back out of a menu. 0 for false, 1 for true. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |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 === | ||
< | 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,622: | Line 7,752: | ||
|GameVar | |GameVar | ||
|var | |var | ||
| | |<code>$x_TALK_KIND</code>, contains Talk Group number | ||
|} | |} | ||
=== 0xad - message_SwitchTalk === | === 0xad - message_SwitchTalk === | ||
< | 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,638: | Line 7,780: | ||
|GameVar | |GameVar | ||
|var | |var | ||
| | |<code>$x_TALK_KIND</code>, contains Talk Group number | ||
|} | |} | ||
=== 0xc9 - object === | === 0xc9 - object === | ||
| Line 7,673: | Line 7,815: | ||
|} | |} | ||
=== 0xd5 - Return === | === 0xd5 - Return === | ||
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,773: | Line 7,919: | ||
|} | |} | ||
=== 0x145 - SwitchLives === | === 0x145 - SwitchLives === | ||
If inside a Switch Case, take the case equal to the species ID of the specified Actor! | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 7,784: | Line 7,930: | ||
|- | |- | ||
|1 | |1 | ||
| | |Entity | ||
| | |actor_id | ||
| | |An entry in the Actor List. | ||
|} | |} | ||
=== 0x146 - SwitchRandom === | === 0x146 - SwitchRandom === | ||
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,802: | Line 7,948: | ||
|uint | |uint | ||
|max_value | |max_value | ||
| | |Largest random output, plus 1 | ||
|} | |} | ||
=== 0x147 - SwitchScenario === | === 0x147 - SwitchScenario === | ||
| Line 7,893: | Line 8,039: | ||
|} | |} | ||
{{NavScriptTerms}} | {{NavScriptTerms}} | ||
[[Category:Documentation]] | |||