List of Opcodes: Difference between revisions
Happylappy (talk | contribs) m SwitchLives & SwitchRandom |
|||
| (38 intermediate revisions by 7 users not shown) | |||
| Line 382: | 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 397: | 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 927: | 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 946: | 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 965: | 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 1,004: | 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,121: | 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,140: | 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,159: | 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,198: | 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,281: | 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,298: | 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,315: | 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,354: | 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,467: | 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,484: | 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,501: | 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,540: | 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,761: | 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,835: | 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 2,503: | 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,532: | 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,581: | 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,629: | 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,658: | 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,687: | 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,716: | 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,764: | 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,812: | 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,841: | 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,870: | 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,898: | 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,921: | 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,950: | 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,974: | 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 3,027: | 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,051: | 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,104: | 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,172: | 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,327: | Line 3,376: | ||
|} | |} | ||
=== 0xd0 - ResetFunctionAttribute === | === 0xd0 - ResetFunctionAttribute === | ||
Enables bits that change properties of entities, namely how they follow other actors and how their talk script can be triggered, to 0. Is only intended to disable bits of a shared "attribute" bitfield on the range [0,5], but larger values seem to affect other bitfields. Skytemple accepts binary inputs for params, it is recommended you use them for this opcode! | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 3,335: | Line 3,384: | ||
!Type | !Type | ||
!Name | !Name | ||
!Index | |||
! colspan="2" |Bit value | |||
!Description | !Description | ||
|- | |- | ||
| rowspan="6" |1 | |||
| rowspan="6" |bitfield | |||
| rowspan="6" |function_bitfield | |||
|0 | |||
|0b000001 | |||
|1 | |1 | ||
| | |Must be OFF for an actor to follow. Potentially signals leader? | ||
| | |- | ||
| | |1 | ||
|0b000010 | |||
|2 | |||
|Must be ON for an actor to follow. Potentially signals follower? | |||
|- | |||
|2 | |||
|0b000100 | |||
|4 | |||
|Unknown. | |||
|- | |||
|3 | |||
|0b001000 | |||
|8 | |||
|Unknown. Seems to prevent the actor from turning to face you if disabled. May be interfering with assignment of ACTOR_TALK_SUB or ACTOR_TALK_MAIN, or just preventing movement? | |||
|- | |||
|4 | |||
|0b010000 | |||
|16 | |||
|Unknown. | |||
|- | |||
|5 | |||
|0b100000 | |||
|32 | |||
|Related to follower status and shadow. If a follower has it enabled, output 8 will be enabled. | |||
|} | |} | ||
=== 0xd1 - ResetHitAttribute === | === 0xd1 - ResetHitAttribute === | ||
Resets bits that change properties of entities, namely how their collision works, to 0. Is only intended to disable bits of a shared "attribute" bitfield on the range [6,10], but larger values seem to affect other bitfields. Skytemple accepts binary inputs for params, it is recommended you use them for this opcode! | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 3,351: | Line 3,430: | ||
!Type | !Type | ||
!Name | !Name | ||
!Index | |||
! colspan="2" |Bit value | |||
!Description | !Description | ||
|- | |- | ||
| rowspan="5" |1 | |||
| rowspan="5" |bitfield | |||
| rowspan="5" |hit_bitfield | |||
|0 | |||
|0b00001 | |||
|1 | |1 | ||
| | |Must be enabled for the entity to interact with layer 1 of map collision. | ||
| | |- | ||
| | |1 | ||
|0b00010 | |||
|2 | |||
|Must be enabled for the entity to interact with layer 2 of map collision. | |||
|- | |||
|2 | |||
|0b00100 | |||
|4 | |||
|Must be enabled for actor collisions to be recognized (GetCollidingActorID). | |||
|- | |||
|3 | |||
|0b01000 | |||
|8 | |||
|Must be enabled for object collisions to be recognized (GetCollidingObjectID). | |||
|- | |||
|4 | |||
|0b10000 | |||
|16 | |||
|Must be enabled for event (trigger) collisions to be recognized (GetCollidingEventID). | |||
|} | |} | ||
=== 0xd2 - ResetOutputAttribute === | === 0xd2 - ResetOutputAttribute === | ||
Resets certain bits of an entity's (i.e., an actor, object, or performer) "output" attribute to 0. Is only intended to disable bits of a shared "attribute" bitfield on the range [16,31]. Skytemple accepts binary inputs for params, it is recommended you use them for this opcode! | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 3,371: | Line 3,471: | ||
!Type | !Type | ||
!Name | !Name | ||
!Id | |||
! colspan="2" |Bit value | |||
!Description | !Description | ||
|- | |- | ||
| rowspan="16" |1 | |||
| rowspan="16" |bitfield | |||
| rowspan="16" |output_bitfield | |||
|0 | |||
|0b0000000000000001 | |||
|1 | |1 | ||
| | |Unknown. | ||
| | |- | ||
| | |1 | ||
|0b0000000000000010 | |||
|2 | |||
|Underlay below entities. | |||
|- | |||
|2 | |||
|0b0000000000000100 | |||
|4 | |||
|Overlay above entities. | |||
|} | |- | ||
|3 | |||
|0b0000000000001000 | |||
|8 | |||
|Overlay above the current Map Background's Layer 2. | |||
|- | |||
|4 | |||
|0b0000000000010000 | |||
|16 | |||
|Overlay above the game's canvas system, including textbox, portrait, and some screen_ commands not ending in <code>All</code>. | |||
|- | |||
|5 | |||
|0b0000000000100000 | |||
|32 | |||
|Flicker. | |||
|- | |||
|6 | |||
|0b0000000001000000 | |||
|64 | |||
|Transparency. | |||
|- | |||
|7 | |||
|0b0000000010000000 | |||
|128 | |||
|Invisibility. | |||
|- | |||
|8 | |||
|0b0000000100000000 | |||
|256 | |||
|Displays shadow. | |||
|- | |||
|9 | |||
|0b0000001000000000 | |||
|512 | |||
|Unknown. | |||
|- | |||
|10 | |||
|0b0000010000000000 | |||
|1024 | |||
|Always render, regardless of distance from the screen. | |||
|- | |||
|11 | |||
|0b0000100000000000 | |||
|2048 | |||
|Makes coordinates relative to the screen rather than the map. (Likely only for rendering and not collision, untested.) | |||
|- | |||
|12 | |||
|0b0001000000000000 | |||
|4096 | |||
|Unknown. | |||
|- | |||
|13 | |||
|0b0010000000000000 | |||
|8192 | |||
|Unknown. | |||
|- | |||
|14 | |||
|0b0100000000000000 | |||
|16384 | |||
|Unknown. | |||
|- | |||
|15 | |||
|0b1000000000000000 | |||
|32768 | |||
|In 0x22F655C [EU], determines the first bit of alloc_flags for <code>LoadWanTableEntryFromPack</code>. Seems to be enabled in 0x22F8818 [EU] if its fifth param is true. | |||
|} | |||
=== 0xd3 - ResetReplyAttribute === | === 0xd3 - ResetReplyAttribute === | ||
Resets bits that change properties of entities, namely how their talk script is triggered, to 0. Is only intended to enable bits of a shared "attribute" bitfield on the range [11,15], but larger values seem to affect other bitfields. Skytemple accepts binary inputs for params, it is recommended you use them for this opcode! | |||
{| class="wikitable" | {| class="wikitable" | ||
|+Parameters | |+Parameters | ||
| Line 3,395: | Line 3,566: | ||
!Type | !Type | ||
!Name | !Name | ||
!Index | |||
! colspan="2" |Bit value | |||
!Description | !Description | ||
|- | |- | ||
| rowspan="5" |1 | |||
| rowspan="5" |bitfield | |||
| rowspan="5" |reply_bitfield | |||
|0 | |||
|0b00001 | |||
|1 | |1 | ||
| | |Unknown. | ||
| | |- | ||
| | |1 | ||
|0b00010 | |||
|2 | |||
|If enabled, plays talk script if colliding with entity. | |||
|- | |||
|2 | |||
|0b00100 | |||
|4 | |||
|If enabled, plays talk script when pressing A near the entity. | |||
|- | |||
|3 | |||
|0b01000 | |||
|8 | |||
|Unknown. | |||
|- | |||
|4 | |||
|0b10000 | |||
|16 | |||
|Unknown. | |||
|} | |} | ||
=== 0xd4 - ResumeEffect === | === 0xd4 - ResumeEffect === | ||
| Line 4,433: | Line 4,624: | ||
|uint | |uint | ||
|pan | |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. | |The panning of the SE. Has an intended range of -260 (left) to 260 (right), with 0 being the center. | ||
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: | What this means is that: | ||
* A ''pan'' parameter of 260 will result in sound panning only to the right channel. | * 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. | * A ''pan'' parameter of 261 will result in sound panning only to the left channel. | ||
|} | |} | ||
=== 0xf6 - se_ChangeVolume === | === 0xf6 - se_ChangeVolume === | ||
| Line 4,528: | Line 4,719: | ||
|uint | |uint | ||
|pan | |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. | |The panning of the SE. Has an intended range of -260 (left) to 260 (right), with 0 being the center. | ||
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: | What this means is that: | ||
* A ''pan'' parameter of 260 will result in sound panning only to the right channel. | * 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. | * A ''pan'' parameter of 261 will result in sound panning only to the left channel. | ||
|} | |} | ||
=== 0xfa - se_PlayPan === | === 0xfa - se_PlayPan === | ||
| Line 4,555: | Line 4,746: | ||
|uint | |uint | ||
|pan | |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. | |The panning of the SE. Has an intended range of -260 (left) to 260 (right), with 0 being the center. | ||
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: | What this means is that: | ||
* A ''pan'' parameter of 260 will result in sound panning only to the right channel. | * 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. | * A ''pan'' parameter of 261 will result in sound panning only to the left channel. | ||
|} | |} | ||
=== 0xfb - se_PlayVolume === | === 0xfb - se_PlayVolume === | ||
| Line 4,695: | Line 4,886: | ||
|} | |} | ||
=== 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,708: | Line 4,899: | ||
|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: | ||
# <li value="0">Head</li> | |||
# Right Hand | |||
# Left Hand | |||
# Center | |||
# No offset (bottom of sprite) | |||
|} | |} | ||
=== 0x103 - SetFunctionAttribute === | === 0x103 - SetFunctionAttribute === | ||
Enables bits that change properties of entities, namely how they follow other actors and how their talk script can be triggered, to 1. Is only intended to enable bits of a shared "attribute" bitfield on the range [0,5], but larger values seem to affect other bitfields. Skytemple accepts binary inputs for params, it is recommended you use them for this opcode! | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,724: | Line 4,921: | ||
!Type | !Type | ||
!Name | !Name | ||
!Index | |||
! colspan="2" |Bit value | |||
!Description | !Description | ||
|- | |||
| rowspan="6" |1 | |||
| rowspan="6" |bitfield | |||
| rowspan="6" |func_bitfield | |||
|0 | |||
|0b000001 | |||
|1 | |||
|Must be OFF for an actor to follow. Potentially signals leader? | |||
|- | |- | ||
|1 | |1 | ||
| | |0b000010 | ||
| | |2 | ||
| | |Must be ON for an actor to follow. Potentially signals follower? | ||
|- | |||
|2 | |||
|0b000100 | |||
|4 | |||
|Unknown. | |||
|- | |||
|3 | |||
|0b001000 | |||
|8 | |||
|Unknown. Seems to prevent the actor from turning to face you if disabled. May be interfering with assignment of ACTOR_TALK_SUB or ACTOR_TALK_MAIN, or just preventing movement? | |||
|- | |||
|4 | |||
|0b010000 | |||
|16 | |||
|Unknown. | |||
|- | |||
|5 | |||
|0b100000 | |||
|32 | |||
|Related to follower status and shadow. If a follower has it enabled, output 8 will be enabled. | |||
|} | |} | ||
=== 0x104 - SetHeight === | === 0x104 - SetHeight === | ||
| Line 4,748: | Line 4,975: | ||
|} | |} | ||
=== 0x105 - SetHitAttribute === | === 0x105 - SetHitAttribute === | ||
Sets bits that change properties of entities, namely how their collision works, to 1. Is only intended to enable bits of a shared "attribute" bitfield on the range [6,10], but larger values seem to affect other bitfields. Skytemple accepts binary inputs for params, it is recommended you use them for this opcode! | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,756: | Line 4,983: | ||
!Type | !Type | ||
!Name | !Name | ||
!Index | |||
! colspan="2" |Bit value | |||
!Description | !Description | ||
|- | |||
| rowspan="5" |1 | |||
| rowspan="5" |bitfield | |||
| rowspan="5" |hit_bitfield | |||
|0 | |||
|0b00001 | |||
|1 | |||
|Must be enabled for the entity to interact with layer 1 of map collision. | |||
|- | |- | ||
|1 | |1 | ||
| | |0b00010 | ||
| | |2 | ||
| | |Must be enabled for the entity to interact with layer 2 of map collision. | ||
|- | |||
|2 | |||
|0b00100 | |||
|4 | |||
|Must be enabled for actor collisions to be recognized (GetCollidingActorID). | |||
|- | |||
|3 | |||
|0b01000 | |||
|8 | |||
|Must be enabled for object collisions to be recognized (GetCollidingObjectID). | |||
|- | |||
|4 | |||
|0b10000 | |||
|16 | |||
|Must be enabled for event (trigger) collisions to be recognized (GetCollidingEventID). | |||
|} | |} | ||
=== 0x106 - SetMoveRange === | === 0x106 - SetMoveRange === | ||
| Line 4,790: | Line 5,042: | ||
|} | |} | ||
=== 0x107 - SetOutputAttribute === | === 0x107 - SetOutputAttribute === | ||
Sets certain bits of an entity's (i.e., an actor, object, or performer) "output" attribute to 1. Is only intended to enable bits of a shared "attribute" bitfield on the range [16,31]. Skytemple accepts binary inputs for params, it is recommended you use them for this opcode! | |||
{| class="wikitable" | {| class="wikitable" | ||
|+Parameters | |+Parameters | ||
| Line 4,798: | Line 5,049: | ||
!Type | !Type | ||
!Name | !Name | ||
!Id | |||
! colspan="2" |Bit value | |||
!Description | !Description | ||
|- | |- | ||
| rowspan="16" |1 | |||
| rowspan="16" |bitfield | |||
| rowspan="16" |output_bitfield | |||
|0 | |||
|0b0000000000000001 | |||
|1 | |1 | ||
| | |Unknown. | ||
|- | |- | ||
|1 | |1 | ||
| | |0b0000000000000010 | ||
| | |2 | ||
| | |Underlay below entities. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |0b0000000000000100 | ||
|4 | |||
|Overlay above entities. | |||
|- | |||
|3 | |||
|0b0000000000001000 | |||
|8 | |||
|Overlay above the current Map Background's Layer 2. | |||
|- | |||
|4 | |||
|0b0000000000010000 | |||
|16 | |||
|Overlay above the game's canvas system, including textbox, portrait, and some screen_ commands not ending in <code>All</code>. | |||
|- | |||
|5 | |||
|0b0000000000100000 | |||
|32 | |||
|Flicker. | |||
|- | |||
|6 | |||
|0b0000000001000000 | |||
|64 | |||
|Transparency. | |||
|- | |||
|7 | |||
|0b0000000010000000 | |||
|128 | |||
|Invisibility. | |||
|- | |||
|8 | |||
|0b0000000100000000 | |||
|256 | |||
|Displays shadow. | |||
|- | |||
|9 | |||
|0b0000001000000000 | |||
|512 | |||
|Unknown. | |||
|- | |||
|10 | |||
|0b0000010000000000 | |||
|1024 | |||
|Always render, regardless of distance from the screen. | |||
|- | |||
|11 | |||
|0b0000100000000000 | |||
|2048 | |||
|Makes coordinates relative to the screen rather than the map. (Likely only for rendering and not collision, untested.) | |||
|- | |||
|12 | |||
|0b0001000000000000 | |||
|4096 | |||
|Unknown. | |||
|- | |||
|13 | |||
|0b0010000000000000 | |||
|8192 | |||
|Unknown. | |||
|- | |||
|14 | |||
|0b0100000000000000 | |||
|16384 | |||
|Unknown. | |||
|- | |||
|15 | |||
|0b1000000000000000 | |||
|32768 | |||
|In 0x22F655C [EU], determines the first bit of alloc_flags for <code>LoadWanTableEntryFromPack</code>. Seems to be enabled in 0x22F8818 [EU] if its fifth param is true. (Further detail is not currently known) | |||
|} | |||
=== 0x108 - SetPosition === | |||
<TO DO: Opcode description> | |||
{| class="wikitable" | |||
|+Parameters | |||
|- | |||
!# | |||
!Type | |||
!Name | |||
!Description | |||
|- | |||
|1 | |||
|uint | |||
|x | |||
| | |||
|- | |||
|2 | |||
|uint | |||
|y | |y | ||
| | | | ||
| Line 4,905: | Line 5,236: | ||
|} | |} | ||
=== 0x10e - SetReplyAttribute === | === 0x10e - SetReplyAttribute === | ||
Sets bits that change properties of entities, namely how their talk script is triggered, to 1. Is only intended to enable bits of a shared "attribute" bitfield on the range [11,15], but larger values seem to affect other bitfields. Skytemple accepts binary inputs for params, it is recommended you use them for this opcode! | |||
{| class="wikitable" | {| class="wikitable" | ||
|+Parameters | |+Parameters | ||
| Line 4,913: | Line 5,243: | ||
!Type | !Type | ||
!Name | !Name | ||
!Index | |||
! colspan="2" |Bit value | |||
!Description | !Description | ||
|- | |- | ||
| rowspan="5" |1 | |||
| rowspan="5" |bitfield | |||
| rowspan="5" |reply_bitfield | |||
|0 | |||
|0b00001 | |||
|1 | |1 | ||
| | |Unknown. | ||
| | |- | ||
| | |1 | ||
|} | |0b00010 | ||
=== 0x10f - SetupOutputAttributeAndAnimation === | |2 | ||
<TO DO: Opcode description> | |If enabled, plays talk script if colliding with entity. | ||
|- | |||
{| class="wikitable" | |2 | ||
|+Parameters | |0b00100 | ||
|4 | |||
|If enabled, plays talk script when pressing A near the entity. | |||
|- | |||
|3 | |||
|0b01000 | |||
|8 | |||
|Unknown. | |||
|- | |||
|4 | |||
|0b10000 | |||
|16 | |||
|Unknown. | |||
|} | |||
=== 0x10f - SetupOutputAttributeAndAnimation === | |||
<TO DO: Opcode description> | |||
{| class="wikitable" | |||
|+Parameters | |||
|- | |- | ||
!# | !# | ||
| Line 4,960: | Line 5,315: | ||
|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,987: | Line 5,342: | ||
|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,036: | Line 5,391: | ||
|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,045: | Line 5,400: | ||
=== 0x114 - Slide2PositionOffset === | === 0x114 - Slide2PositionOffset === | ||
Offsets an entity (i.e., an actor, object, or performer) from its current position across both axes without restricting the angles used. The entity does not change the direction that it faces. | |||
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,070: | Line 5,427: | ||
|} | |} | ||
=== 0x115 - Slide2PositionOffset === | === 0x115 - Slide2PositionOffset === | ||
Offsets an entity (i.e., an actor, object, or performer) from its current position across both axes without restricting the angles used. The entity does not change the direction that it faces. | |||
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,083: | Line 5,442: | ||
|uint | |uint | ||
|speed | |speed | ||
| | |Movement speed. Higher values result in a faster speed. Values starting at 32770 or above will be slower than a value of 1. | ||
|- | |- | ||
|2 | |2 | ||
|sint | |sint | ||
|x | |x | ||
| | |How much the entity is offset in the x direction. | ||
|- | |- | ||
|3 | |3 | ||
|sint | |sint | ||
|y | |y | ||
| | |How much the entity is offset in the y direction. | ||
|} | |} | ||
=== 0x116 - Slide2PositionOffsetRandom === | === 0x116 - Slide2PositionOffsetRandom === | ||
| Line 5,422: | Line 5,781: | ||
|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,525: | Line 5,884: | ||
No parameters. | No parameters. | ||
=== 0x129 - StopAnimation === | === 0x129 - StopAnimation === | ||
Stops a sprite's current animation, freezing it to its first frame. | |||
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. | No parameters. | ||
| Line 5,576: | Line 5,937: | ||
|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. Sector ids above a certain threshold do not function. Perhaps 100, or 127? | ||
|} | |} | ||
=== 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,603: | Line 5,964: | ||
|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. Note: Sector ids above a certain threshold do not function. Perhaps 100, or 127? | ||
|} | |} | ||
| Line 5,850: | Line 6,211: | ||
=== 0x13a - supervision_SpecialActing === | === 0x13a - supervision_SpecialActing === | ||
It performs various hardcoded functionalities, mostly fancy graphical things like the Waterfall Cave flood, the beach bubbles, SE1 spotlight, etc | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,294: | Line 6,655: | ||
=== 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. | 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. | ||
Also unpauses if there is no BGM playing, making it a general purpose WaitBgm. | |||
No parameters. | No parameters. | ||
| Line 6,549: | Line 6,912: | ||
=== 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,561: | Line 6,924: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |world_map_level | ||
| | |Level to transition the world map state to. | ||
|} | |} | ||
=== 0x175 - worldmap_DeleteArrow === | === 0x175 - worldmap_DeleteArrow === | ||
| Line 6,583: | Line 6,946: | ||
|uint | |uint | ||
|world_map_marker_id | |world_map_marker_id | ||
| | |The world map id to move the camera to. | ||
|} | |} | ||
| Line 6,609: | Line 6,972: | ||
=== 0x179 - worldmap_SetCamera === | === 0x179 - worldmap_SetCamera === | ||
Centers the world map camera on a specific world map marker. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,621: | Line 6,984: | ||
|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,637: | Line 7,000: | ||
|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,653: | Line 7,016: | ||
|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,690: | Line 7,055: | ||
=== 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,702: | Line 7,077: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |world_map_mode | ||
| | | | ||
|} | |} | ||
== Other Opcodes == | == Other Opcodes == | ||
These opcodes cannot be directly called from ExplorerScript, since they are represented as higher-level constructs. | These opcodes cannot be directly called from ExplorerScript, since they are represented as higher-level constructs, but are present in [[SSBScript]]. | ||
=== 0x28 - Branch === | === 0x28 - Branch === | ||
| Line 7,006: | Line 7,381: | ||
|} | |} | ||
=== 0x33 - BranchSum === | === 0x33 - BranchSum === | ||
Calculates the sum of an indexed variable, compares it against a value, and jumps to a relative address if a certain condition is met (e.g., equal). | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 7,017: | Line 7,392: | ||
|- | |- | ||
|1 | |1 | ||
| | |GameVar | ||
| | |var | ||
| | |One of the 115 possible script variables. Specifically, an indexed variable is expected. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |operator | ||
| | |Comparison operator used when comparing variable sum against a value. | ||
# <li value="0">Always true</li> | |||
# Always false | |||
# Equal | |||
# Greater than | |||
# Less than | |||
# Greater than or equal | |||
# Less than or equal | |||
# Not equal | |||
# Bitwise AND | |||
# Bitwise XOR | |||
# Test specific bit | |||
|- | |- | ||
|3 | |3 | ||
|uint | |uint | ||
| | |value | ||
| | |Value used in comparison. | ||
|- | |- | ||
|4 | |4 | ||
|uint | |uint | ||
|jump_address | |jump_address | ||
| | |Address to jump to if the comparison meets the condition. | ||
|} | |} | ||
=== 0x34 - BranchValue === | === 0x34 - BranchValue === | ||
| Line 7,099: | Line 7,485: | ||
|} | |} | ||
=== 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,112: | Line 7,500: | ||
|uint | |uint | ||
|param | |param | ||
| | |Unknown. Always 3. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
|jump_address | |jump_address | ||
| | |Address to jump to. | ||
|} | |} | ||
=== 0x37 - Call === | === 0x37 - Call === | ||
| Line 7,612: | Line 8,000: | ||
|} | |} | ||
=== 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,624: | Line 8,012: | ||
|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,645: | Line 8,033: | ||
|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,672: | Line 8,068: | ||
|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 game's partner options: | |||
<code>case 1:</code> used if male Squirtle, Totodile, Chimchar, Meowth, or Munchlax | |||
<code>case 2:</code> default (all other male partners in vanilla) | |||
<code>case 3:</code> used if female Vulpix, Eevee, Chikorita, Torchic or Skitty (all female partners in vanilla) | |||
<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,688: | Line 8,096: | ||
|GameVar | |GameVar | ||
|var | |var | ||
| | |<code>$x_TALK_KIND</code>, contains Talk Group number | ||
|} | |} | ||
=== 0xc9 - object === | === 0xc9 - object === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 7,891: | Line 8,300: | ||
|} | |} | ||
=== 0x149 - SwitchSector === | === 0x149 - SwitchSector === | ||
< | Returns the currently-loaded "sector" for a given routine. When used in targeted routines, this returns the sector the entity is loaded on. When used in the main routine, this returns a value passed in to load the scene, e.g., the final parameter of <code>supervision_ExecuteActingSub</code>. Most often used in Enter scenes to mark a Cutscene -> Overworld transition, but can also be checked within Acting scenes. | ||
In ExplorerScript, this can be simply represented as <code>switch(sector())</code>. | |||
No parameters. | No parameters. | ||
Note: Sector ids above a certain threshold do not function. Perhaps 100, or 127? | |||
=== 0x14a - SwitchValue === | === 0x14a - SwitchValue === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||