List of Opcodes: Difference between revisions
| (26 intermediate revisions by 5 users not shown) | |||
| Line 1,988: | Line 1,988: | ||
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. | 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. | ||
Entering a given dungeon is made in two time: first by calling this function with dungeon_id set to the dungeon you want to enter, the second time with dungeon_id set to -1. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 3,376: | Line 3,378: | ||
|} | |} | ||
=== 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,384: | Line 3,386: | ||
!Type | !Type | ||
!Name | !Name | ||
!Index | |||
! colspan="2" |Bit value | |||
!Description | !Description | ||
|- | |||
| rowspan="6" |1 | |||
| rowspan="6" |bitfield | |||
| rowspan="6" |function_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. | |||
|} | |} | ||
=== 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,400: | Line 3,432: | ||
!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). | |||
|} | |} | ||
=== 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,420: | Line 3,473: | ||
!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 | |||
|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 === | ||
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,490: | Line 3,568: | ||
!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 | |1 | ||
| | |0b00010 | ||
| | |2 | ||
| | |If enabled, plays talk script if colliding with entity. | ||
|- | |- | ||
|2 | |2 | ||
| | |0b00100 | ||
| | |4 | ||
| | |If enabled, plays talk script when pressing A near the entity. | ||
|- | |- | ||
|3 | |3 | ||
| | |0b01000 | ||
| | |8 | ||
| | |Unknown. | ||
|- | |- | ||
|4 | |4 | ||
| | |0b10000 | ||
| | |16 | ||
| | |Unknown. | ||
|} | |||
=== 0xd4 - ResumeEffect === | |||
Resumes the current graphical effect of an entity (i.e., an actor, object, or performer) that has been paused with <code>PauseEffect</code> prior to using this opcode. | |||
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 3,552: | Line 3,614: | ||
|- | |- | ||
|1 | |1 | ||
| | |Effect | ||
| | |effect_id | ||
| | |A graphical effect to display relative to an entity. | ||
|- | |} | ||
=== 0xd6 - SavePosition === | |||
Saves various attributes of an entity (i.e., an actor, object, or performer) to the following script variables: | |||
* <code>$POSITION_X</code>: The pixel position of the entity on the X-axis multiplied by 256. | |||
* <code>$POSITION_Y</code>: The pixel position of the entity on the Y-axis multiplied by 256. | |||
* <code>$POSITION_HEIGHT</code>: The pixel height (i.e., displacement of the entity from their shadow) of the entity multiplied by 256. | |||
* <code>$POSITION_DIRECTION</code>: The direction the entity is facing. | |||
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 3,596: | Line 3,638: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |index | ||
| | |Index used by all <code>$POSITION_</code> script variables, ranged from 0-2 (inclusive). | ||
|} | |} | ||
=== | === 0xd7 - screen_FadeChange === | ||
Changes the brightness of the screen | Changes the brightness of the screen across a certain number of frames. This opcode will not affect: | ||
* Entities who have had their 4th "output" bit set to 1 (e.g., by using <code>SetOutputAttribute(16);</code> with them). | |||
* Portraits. | |||
* Textboxes. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 3,618: | Line 3,659: | ||
|uint | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true. | ||
|- | |- | ||
|2 | |2 | ||
| Line 3,624: | Line 3,665: | ||
|duration | |duration | ||
|The number of frames used to change the Touch Screen's brightness. | |The number of frames used to change the Touch Screen's brightness. | ||
| | |- | ||
|3 | |||
|uint | |||
|start_brightness | |||
|The brightness level the opcode will begin at. | |||
* The minimum brightness is 0, which results in a black screen. | |||
* The default brightness is 256. | |||
* The maximum brightness is 512, which results in a white screen. | |||
|- | |||
|4 | |||
|uint | |||
|end_brightness | |||
|The brightness level the opcode will end at. | |||
* | * The minimum brightness is 0, which results in a black screen. | ||
* | * The default brightness is 256. | ||
* | * The maximum brightness is 512, which results in a white screen. | ||
|} | |||
=== 0xd8 - screen_FadeChangeAll === | |||
Changes the brightness of the screen across a certain number of frames. This opcode will affect everything on the Touch Screen. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 3,649: | Line 3,704: | ||
|duration | |duration | ||
|The number of frames used to change the Touch Screen's brightness. | |The number of frames used to change the Touch Screen's brightness. | ||
|- | |||
|3 | |||
|uint | |||
|start_brightness | |||
|The brightness level the opcode will begin at. | |||
* The minimum brightness is 0, which results in a black screen. | |||
* The default brightness is 256. | |||
* The maximum brightness is 512, which results in a white screen. | |||
|- | |||
|4 | |||
|uint | |||
|end_brightness | |||
|The brightness level the opcode will end at. | |||
* The minimum brightness is 0, which results in a black screen. | |||
* The default brightness is 256. | |||
* The maximum brightness is 512, which results in a white screen. | |||
|} | |} | ||
=== | === 0xd9 - screen_FadeIn === | ||
Changes the brightness of the screen to its | Changes the brightness of the screen to its default state across a certain number of frames. This opcode will not affect: | ||
* Entities who have had their 4th "output" bit set to 1 (e.g., by using <code>SetOutputAttribute(16);</code> with them). | |||
* Portraits. | |||
* Textboxes. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 3,671: | Line 3,748: | ||
|The number of frames used to change the Touch Screen's brightness. | |The number of frames used to change the Touch Screen's brightness. | ||
|} | |} | ||
=== | === 0xda - screen_FadeInAll === | ||
Changes the brightness of the screen to its default state across a certain number of frames. This opcode will affect everything on the Touch Screen. | |||
{| class="wikitable" | {| class="wikitable" | ||
|+Parameters | |+Parameters | ||
|- | |||
!# | !# | ||
!Type | !Type | ||
| Line 3,682: | Line 3,761: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |suspension_flag | ||
| | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |duration | ||
| | |The number of frames used to change the Touch Screen's brightness. | ||
|} | |} | ||
=== 0xdb - screen_FadeOut === | |||
Changes the brightness of the screen to its minimum (i.e., a black screen) across a certain number of frames. This opcode will not affect: | |||
* Entities who have had their 4th "output" bit set to 1 (e.g., by using <code>SetOutputAttribute(16);</code> with them). | |||
* Portraits. | |||
* Textboxes. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 3,740: | Line 3,792: | ||
|uint | |uint | ||
|duration | |duration | ||
|The number of frames used to change the Touch Screen's | |The number of frames used to change the Touch Screen's brightness. | ||
|} | |} | ||
=== | === 0xdc - screen_FadeOutAll === | ||
Changes the | Changes the brightness of the screen to its minimum (i.e., a black screen) across a certain number of frames. This opcode will affect everything on the Touch Screen. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 3,792: | Line 3,813: | ||
|uint | |uint | ||
|duration | |duration | ||
|The number of frames used to change the Touch Screen's | |The number of frames used to change the Touch Screen's brightness. | ||
|} | |||
=== 0xdd - screen_FlushChange === | |||
Does nothing. | |||
{| class="wikitable" | |||
|+Parameters | |||
!# | |||
!Type | |||
!Name | |||
!Description | |||
|- | |- | ||
| | |1 | ||
|uint | |uint | ||
| | |unk0 | ||
| | |Does nothing. | ||
|- | |||
|2 | |||
|uint | |||
|unk1 | |||
|Does nothing. | |||
|- | |||
|3 | |||
|uint | |||
|unk2 | |||
|Does nothing. | |||
|- | |- | ||
|4 | |4 | ||
|uint | |uint | ||
| | |unk3 | ||
| | |Does nothing. | ||
|- | |- | ||
|5 | |5 | ||
|uint | |uint | ||
| | |unk4 | ||
| | |Does nothing. | ||
|- | |- | ||
|6 | |6 | ||
|uint | |uint | ||
| | |unk5 | ||
| | |Does nothing. | ||
|- | |||
|7 | |||
|uint | |||
|unk6 | |||
|Does nothing. | |||
|- | |||
|8 | |||
|uint | |||
|unk7 | |||
|Does nothing. | |||
|} | |} | ||
=== 0xde - screen_FlushIn === | |||
Changes the color of the screen from a specific state (given by the opcode's parameters, which affect the Touch Screen instantly) to its default state across a certain number of frames. This opcode will affect all entities (i.e., actors, objects, and performers) on the Touch Screen. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 3,843: | Line 3,879: | ||
|uint | |uint | ||
|suspension_flag | |suspension_flag | ||
|Determines whether the script will suspend until this opcode's operation is complete. 0 is false and | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
|duration | |duration | ||
|The number of frames used to change the Touch Screen's | |The number of frames used to change the Touch Screen's color. | ||
|- | |- | ||
|3 | |3 | ||
|uint | |uint | ||
| | |mode | ||
| | | | ||
# Completely darkens the Touch Screen. | |||
# Completely turns the Touch Screen to a certain color. | |||
# Instantly darkens the Touch Screen? | |||
# Overlays the Touch Screen with a certain color. | |||
# Instantly darkens the Touch Screen? | |||
# Overlays the Touch Screen with hardcoded color bytes: 144, 144, and 255. | |||
# Instantly darkens the Touch Screen? | |||
# Overlays the Touch Screen with hardcoded color bytes: 255, 192, and 128. | |||
# Instantly darkens the Touch Screen? | |||
# Overlays the Touch Screen with hardcoded color bytes: All 255. The Touch Screen is not turned completely white. | |||
# Instantly overlays the Touch Screen with hardcoded color bytes: All 255. The Touch Screen is not turned completely white. | |||
|- | |- | ||
|4 | |4 | ||
|uint | |uint | ||
| | |r | ||
| | |Unused if ''mode'' is not 2 or 4. Byte used for the color red. Has a minimum of 0 and a maximium of 255. | ||
|- | |||
|5 | |||
|uint | |||
|g | |||
|Unused if ''mode'' is not 2 or 4. Byte used for the color green. Has a minimum of 0 and a maximium of 255. | |||
|- | |||
|6 | |||
|uint | |||
|b | |||
|Unused if ''mode'' is not 2 or 4. Byte used for the color blue. Has a minimum of 0 and a maximium of 255. | |||
|} | |} | ||
=== | === 0xdf - screen_FlushOut === | ||
Changes the | Changes the color of the screen across a certain number of frames. This opcode will affect all entities (i.e., actors, objects, and performers) on the Touch Screen. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 3,887: | Line 3,936: | ||
|uint | |uint | ||
|duration | |duration | ||
|The number of frames used to change the Touch Screen's | |The number of frames used to change the Touch Screen's color. | ||
|- | |- | ||
|3 | |3 | ||
|uint | |uint | ||
| | |mode | ||
| | | | ||
# Completely darkens the Touch Screen. | |||
# Completely turns the Touch Screen to a certain color. | |||
# Instantly darkens the Touch Screen? | |||
# Overlays the Touch Screen with a certain color. | |||
# Instantly darkens the Touch Screen? | |||
# Overlays the Touch Screen with hardcoded color bytes: 144, 144, and 255. | |||
# Instantly darkens the Touch Screen? | |||
# Overlays the Touch Screen with hardcoded color bytes: 255, 192, and 128. | |||
# Instantly darkens the Touch Screen? | |||
# Overlays the Touch Screen with hardcoded color bytes: All 255. The Touch Screen is not turned completely white. | |||
# Instantly overlays the Touch Screen with hardcoded color bytes: All 255. The Touch Screen is not turned completely white. | |||
|- | |- | ||
|4 | |4 | ||
|uint | |uint | ||
| | |r | ||
| | |Unused if ''mode'' is not 2 or 4. Byte used for the color red. Has a minimum of 0 and a maximium of 255. | ||
|- | |||
|5 | |||
|uint | |||
|g | |||
|Unused if ''mode'' is not 2 or 4. Byte used for the color green. Has a minimum of 0 and a maximium of 255. | |||
|- | |||
|6 | |||
|uint | |||
|b | |||
|Unused if ''mode'' is not 2 or 4. Byte used for the color blue. Has a minimum of 0 and a maximium of 255. | |||
|} | |||
=== 0xe0 - screen_WhiteChange === | |||
Changes the brightness of the screen across a certain number of frames. This opcode will not affect: | |||
* | * Entities who have had their 4th "output" bit set to 1 (e.g., by using <code>SetOutputAttribute(16);</code> with them). | ||
* Portraits. | |||
* Textboxes. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 3,920: | Line 3,986: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |suspension_flag | ||
| | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |duration | ||
| | |The number of frames used to change the Touch Screen's brightness. | ||
|- | |- | ||
|3 | |||
| | |||
|uint | |uint | ||
| | |start_brightness | ||
| | |The brightness level the opcode will begin at. | ||
* The minimum brightness is 0, which results in a white screen. | |||
* The default brightness is 256. | |||
* The maximum brightness is 512, which results in a black screen. | |||
|- | |- | ||
| | |4 | ||
|uint | |uint | ||
| | |end_brightness | ||
| | |The brightness level the opcode will end at. | ||
* The minimum brightness is 0, which results in a white screen. | |||
* The default brightness is 256. | |||
* The maximum brightness is 512, which results in a black screen. | |||
|} | |} | ||
=== | === 0xe1 - screen_WhiteChangeAll === | ||
Changes the brightness of the screen | Changes the brightness of the screen across a certain number of frames. This opcode will affect everything on the Touch Screen. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 3,973: | Line 4,032: | ||
|duration | |duration | ||
|The number of frames used to change the Touch Screen's brightness. | |The number of frames used to change the Touch Screen's brightness. | ||
|- | |- | ||
|3 | |||
|3 | |||
|uint | |uint | ||
|start_brightness | |start_brightness | ||
|The brightness level the opcode will begin at. | |The brightness level the opcode will begin at. | ||
* The minimum brightness is 0, which results in a | * The minimum brightness is 0, which results in a white screen. | ||
* The default brightness is 256. | * The default brightness is 256. | ||
* The maximum brightness is 512, which results in a | * The maximum brightness is 512, which results in a black screen. | ||
|- | |- | ||
|4 | |4 | ||
| Line 4,030: | Line 4,047: | ||
|The brightness level the opcode will end at. | |The brightness level the opcode will end at. | ||
* The minimum brightness is 0, which results in a | * The minimum brightness is 0, which results in a white screen. | ||
* The default brightness is 256. | * The default brightness is 256. | ||
* The maximum brightness is 512, which results in a | * The maximum brightness is 512, which results in a black screen. | ||
|} | |} | ||
=== | === 0xe2 - screen_WhiteIn === | ||
Does nothing. | Does nothing. Do not be deceived by this opcode's name: After using <code>screen_WhiteOut</code>, use <code>screen_FadeIn</code> to restore the Touch Screen's brightness level! | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,054: | Line 4,071: | ||
|unk1 | |unk1 | ||
|Does nothing. | |Does nothing. | ||
|} | |||
=== 0xe3 - screen_WhiteInAll === | |||
Does nothing. Do not be deceived by this opcode's name: After using <code>screen_WhiteOutAll</code>, use <code>screen_FadeInAll</code> to restore the Touch Screen's brightness level! | |||
|} | |||
=== | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,078: | Line 4,085: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |unk0 | ||
| | |Does nothing. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |unk1 | ||
| | |Does nothing. | ||
|} | |} | ||
=== | === 0xe4 - screen_WhiteOut === | ||
Changes the brightness of the screen to its maximum (i.e., a white screen) across a certain number of frames. This opcode will not affect: | |||
* Entities who have had their 4th "output" bit set to 1 (e.g., by using <code>SetOutputAttribute(16);</code> with them). | |||
* Portraits. | |||
* Textboxes. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,099: | Line 4,110: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |suspension_flag | ||
| | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |duration | ||
| | |The number of frames used to change the Touch Screen's brightness. | ||
|} | |} | ||
=== | === 0xe5 - screen_WhiteOutAll === | ||
Changes the brightness of the screen to its | Changes the brightness of the screen to its maximum (i.e., a white screen) across a certain number of frames. This opcode will affect everything on the Touch Screen. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,126: | Line 4,137: | ||
|uint | |uint | ||
|duration | |duration | ||
|The number of frames used to change the | |The number of frames used to change the Touch Screen's brightness. | ||
|} | |} | ||
=== | === 0xe6 - screen2_FadeChange === | ||
Changes the brightness of the screen across a certain number of frames. This opcode will affect everything on the Top Screen. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,141: | Line 4,152: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |suspension_flag | ||
| | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and 1 is true. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |duration | ||
| | |The number of frames used to change the Top Screen's brightness. | ||
|- | |||
|3 | |||
|uint | |||
|start_brightness | |||
|The brightness level the opcode will begin at. | |||
* The minimum brightness is 0, which results in a black screen. | |||
* The default brightness is 256. | |||
* The maximum brightness is 512, which results in a white screen. | |||
|- | |||
|4 | |||
|uint | |||
|end_brightness | |||
|The brightness level the opcode will end at. | |||
* The minimum brightness is 0, which results in a black screen. | |||
* The default brightness is 256. | |||
* The maximum brightness is 512, which results in a white screen. | |||
|} | |} | ||
=== | === 0xe7 - screen2_FadeChangeAll === | ||
Does nothing. | Does nothing. | ||
| Line 4,179: | Line 4,208: | ||
|unk3 | |unk3 | ||
|Does nothing. | |Does nothing. | ||
|} | |||
=== 0xe8 - screen2_FadeIn === | |||
Changes the brightness of the screen to its default state across a certain number of frames. This opcode will affect everything on the Top Screen. | |||
{| class="wikitable" | |||
|+Parameters | |||
|- | |- | ||
!# | |||
!Type | |||
!Name | |||
!Description | |||
|- | |- | ||
| | |1 | ||
|uint | |uint | ||
| | |suspension_flag | ||
| | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
|- | |- | ||
| | |2 | ||
|uint | |uint | ||
| | |duration | ||
|The number of frames used to change the Top Screen's brightness. | |||
|} | |||
=== 0xe9 - screen2_FadeInAll === | |||
Does nothing. | |||
{| class="wikitable" | |||
|+Parameters | |||
|- | |||
!# | |||
!Type | |||
!Name | |||
!Description | |||
|- | |||
|1 | |||
|uint | |||
|unk0 | |||
|Does nothing. | |Does nothing. | ||
|- | |- | ||
| | |2 | ||
|uint | |uint | ||
| | |unk1 | ||
|Does nothing. | |Does nothing. | ||
|} | |} | ||
=== | === 0xea - screen2_FadeOut === | ||
Changes the brightness of the screen to its minimum (i.e., a black screen) across a certain number of frames. This opcode will affect everything on the Top Screen. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,219: | Line 4,270: | ||
|uint | |uint | ||
|duration | |duration | ||
|The number of frames used to change the Top Screen's | |The number of frames used to change the Top Screen's brightness. | ||
|} | |||
=== 0xeb - screen2_FadeOutAll === | |||
Does nothing. | |||
{| class="wikitable" | |||
|+Parameters | |||
|- | |||
!# | |||
!Type | |||
!Name | |||
!Description | |||
|- | |||
|1 | |||
|uint | |||
|unk0 | |||
|Does nothing. | |||
|- | |- | ||
| | |2 | ||
|uint | |uint | ||
| | |unk1 | ||
| | |Does nothing. | ||
|} | |} | ||
=== | === 0xec - screen2_FlushChange === | ||
Does nothing. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,265: | Line 4,306: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |unk0 | ||
| | |Does nothing. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |unk1 | ||
| | |Does nothing. | ||
|- | |- | ||
|3 | |3 | ||
|uint | |uint | ||
| | |unk2 | ||
| | |Does nothing. | ||
|- | |||
|4 | |||
|uint | |||
|unk3 | |||
|Does nothing. | |||
|- | |||
|5 | |||
|uint | |||
|unk4 | |||
|Does nothing. | |||
|- | |- | ||
| | |6 | ||
|uint | |uint | ||
| | |unk5 | ||
| | |Does nothing. | ||
|- | |- | ||
| | |7 | ||
|uint | |uint | ||
| | |unk6 | ||
| | |Does nothing. | ||
|- | |- | ||
| | |8 | ||
|uint | |uint | ||
| | |unk7 | ||
| | |Does nothing. | ||
|} | |} | ||
=== | === 0xed - screen2_FlushIn === | ||
The same as <code>screen_FlushIn</code>, but for the Top Screen. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,323: | Line 4,363: | ||
|uint | |uint | ||
|duration | |duration | ||
|The number of frames used to change the Top Screen's | |The number of frames used to change the Top Screen's color. | ||
|- | |- | ||
|3 | |3 | ||
|uint | |uint | ||
| | |mode | ||
| | | | ||
# Completely darkens the Top Screen. | |||
# Completely turns the Top Screen to a certain color. | |||
# Instantly darkens the Top Screen? | |||
# Overlays the Top Screen with a certain color. | |||
|- | # Instantly darkens the Top Screen? | ||
# Overlays the Top Screen with hardcoded color bytes: 144, 144, and 255. | |||
# Instantly darkens the Top Screen? | |||
# Overlays the Top Screen with hardcoded color bytes: 255, 192, and 128. | |||
# Instantly darkens the Top Screen? | |||
# Overlays the Top Screen with hardcoded color bytes: All 255. The Top Screen is not turned completely white. | |||
# Instantly overlays the Top Screen with hardcoded color bytes: All 255. The Top Screen is not turned completely white. | |||
|- | |||
|4 | |4 | ||
|uint | |uint | ||
| | |r | ||
| | |Unused if ''mode'' is not 2 or 4. Byte used for the color red. Has a minimum of 0 and a maximium of 255. | ||
|- | |||
|5 | |||
|uint | |||
|g | |||
|Unused if ''mode'' is not 2 or 4. Byte used for the color green. Has a minimum of 0 and a maximium of 255. | |||
|- | |||
|6 | |||
|uint | |||
|b | |||
|Unused if ''mode'' is not 2 or 4. Byte used for the color blue. Has a minimum of 0 and a maximium of 255. | |||
|} | |} | ||
=== | === 0xee - screen2_FlushOut === | ||
The same as <code>screen_FlushOut</code>, but for the Top Screen. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,356: | Line 4,409: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |suspension_flag | ||
| | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |duration | ||
| | |The number of frames used to change the Top Screen's color. | ||
|- | |- | ||
|3 | |3 | ||
|uint | |uint | ||
| | |mode | ||
| | | | ||
# Completely darkens the Top Screen. | |||
# Completely turns the Top Screen to a certain color. | |||
# Instantly darkens the Top Screen? | |||
# Overlays the Top Screen with a certain color. | |||
# Instantly darkens the Top Screen? | |||
# Overlays the Top Screen with hardcoded color bytes: 144, 144, and 255. | |||
# Instantly darkens the Top Screen? | |||
# Overlays the Top Screen with hardcoded color bytes: 255, 192, and 128. | |||
# Instantly darkens the Top Screen? | |||
# Overlays the Top Screen with hardcoded color bytes: All 255. The Top Screen is not turned completely white. | |||
# Instantly overlays the Top Screen with hardcoded color bytes: All 255. The Top Screen is not turned completely white. | |||
|- | |- | ||
|4 | |||
|uint | |||
|r | |||
|Unused if ''mode'' is not 2 or 4. Byte used for the color red. Has a minimum of 0 and a maximium of 255. | |||
|- | |- | ||
| | |5 | ||
|uint | |uint | ||
| | |g | ||
| | |Unused if ''mode'' is not 2 or 4. Byte used for the color green. Has a minimum of 0 and a maximium of 255. | ||
|- | |- | ||
| | |6 | ||
|uint | |uint | ||
| | |b | ||
| | |Unused if ''mode'' is not 2 or 4. Byte used for the color blue. Has a minimum of 0 and a maximium of 255. | ||
|} | |} | ||
=== | === 0xef - screen2_WhiteChange === | ||
Changes the brightness of the screen across a certain number of frames. This opcode will affect everything on the Top Screen. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,408: | Line 4,461: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |suspension_flag | ||
| | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |duration | ||
| | |The number of frames used to change the Top Screen's brightness. | ||
| | |- | ||
|3 | |||
|uint | |||
|start_brightness | |||
|The brightness level the opcode will begin at. | |||
* The minimum brightness is 0, which results in a white screen. | |||
* The default brightness is 256. | |||
* The maximum brightness is 512, which results in a black screen. | |||
|- | |||
|4 | |||
|uint | |||
|end_brightness | |||
|The brightness level the opcode will end at. | |||
* The minimum brightness is 0, which results in a white screen. | |||
* The default brightness is 256. | |||
* The maximum brightness is 512, which results in a black screen. | |||
|} | |||
=== 0xf0 - screen2_WhiteChangeAll === | |||
Does nothing. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,429: | Line 4,500: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |unk0 | ||
| | |Does nothing. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |unk1 | ||
| | |Does nothing. | ||
|- | |||
|3 | |||
|uint | |||
|unk2 | |||
|Does nothing. | |||
|- | |||
|4 | |||
|uint | |||
|unk3 | |||
|Does nothing. | |||
|} | |} | ||
=== | === 0xf1 - screen2_WhiteIn === | ||
Does nothing. | Does nothing. Do not be deceived by this opcode's name: After using <code>screen2_WhiteOut</code>, use <code>screen2_FadeIn</code> to restore the Top Screen's brightness level! | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,458: | Line 4,539: | ||
|Does nothing. | |Does nothing. | ||
|} | |} | ||
=== | === 0xf2 - screen2_WhiteInAll === | ||
Does nothing. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,471: | Line 4,552: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |unk0 | ||
| | |Does nothing. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |unk1 | ||
| | |Does nothing. | ||
|} | |} | ||
=== | === 0xf3 - screen2_WhiteOut === | ||
Changes the | Changes the brightness of the screen to its maximum (i.e., a white screen) across a certain number of frames. This opcode will affect everything on the Top Screen. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,503: | Line 4,573: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |suspension_flag | ||
| | |Determines whether the script will suspend until this opcode's operation is complete. 0 is false and anything else is true. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
|duration | |duration | ||
|The number of frames used to change the | |The number of frames used to change the Top Screen's brightness. | ||
|} | |} | ||
=== | === 0xf4 - screen2_WhiteOutAll === | ||
Does nothing. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,529: | Line 4,594: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |unk0 | ||
| | |Does nothing. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |unk1 | ||
| | |Does nothing. | ||
|} | |} | ||
=== | === 0xf5 - se_ChangePan === | ||
Changes the panning of the currently-playing [[sound effect]] across a certain number of frames. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,552: | Line 4,617: | ||
|se_id | |se_id | ||
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer. | |A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer. | ||
|- | |- | ||
|2 | |||
| | |||
|uint | |uint | ||
| | |duration | ||
| | |The number of frames used to change the SE's panning. | ||
|- | |- | ||
|3 | |3 | ||
|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 === | ||
Changes the volume of the currently-playing [[sound effect]] across a certain number of frames. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,603: | Line 4,652: | ||
|2 | |2 | ||
|uint | |uint | ||
| | |duration | ||
|The | |The number of frames used to change the SE's volume. | ||
|- | |||
|3 | |||
|uint | |||
|volume | |||
|The volume that the SE will play at. It has a maximum of 256 and a minimum of 0. | |||
|} | |} | ||
=== | === 0xf7 - se_FadeOut === | ||
Fades out the currently-playing [[sound effect]] across a certain number of frames. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,630: | Line 4,678: | ||
|2 | |2 | ||
|uint | |uint | ||
| | |duration | ||
|The | |The number of frames used to fade out and silence a given SE. | ||
|} | |} | ||
=== | === 0xf8 - se_Play === | ||
Instantly | Instantly plays a [[sound effect]]. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,649: | Line 4,697: | ||
|A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer. | |A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer. | ||
|} | |} | ||
=== | === 0xf9 - se_PlayFull === | ||
Instantly plays a [[sound effect]] at a specified volume and panning. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,662: | Line 4,710: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |se_id | ||
| | |A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer. | ||
|- | |||
|2 | |||
|uint | |||
|volume | |||
|The volume that the SE will play at. It has a maximum of 256 and a minimum of 0. | |||
|- | |||
|3 | |||
|uint | |||
|pan | |||
|The panning of the SE. 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: | |||
* 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. | |||
|} | |} | ||
=== | === 0xfa - se_PlayPan === | ||
Instantly plays a [[sound effect]] at a specified panning. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,678: | Line 4,742: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |se_id | ||
| | |A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer. | ||
|- | |||
|2 | |||
|uint | |||
|pan | |||
|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: | |||
* 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. | |||
|} | |} | ||
=== | === 0xfb - se_PlayVolume === | ||
Instantly plays a [[sound effect]] at a specified volume. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,696: | Line 4,769: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |se_id | ||
| | |A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer. | ||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
| | |volume | ||
|The | |The volume that the SE will play at. It has a maximum of 256 and a minimum of 0. | ||
|} | |} | ||
=== | === 0xfc - se_Stop === | ||
Instantly | Instantly stops a specified sound effect. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,718: | Line 4,789: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
| | |se_id | ||
| | |A sound effect defined in SOUND/SE of the ROM. Actually encoded as <code>sound_bank_id << 8 + sound_id</code>, but it can also be represented as an integer. | ||
|} | |} | ||
=== | === 0xfd - SetAnimation === | ||
Plays a sprite's animation, optionally changing its speed and animation flags. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,735: | Line 4,806: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |id | ||
|Animation table index. Converted to an [[Animation ID]] for the current sprite using the [https://docs.google.com/spreadsheets/d/11xHv80Def5mtF60ZsfI1lF1eNX0dBE2It837Q08AlRk/htmlview SetAnimation table]. | |||
| | |||
|} | |} | ||
=== | === 0xfe - SetAttribute === | ||
Does nothing. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,755: | Line 4,821: | ||
|- | |- | ||
|1 | |1 | ||
|uint | |uint | ||
| | |unk0 | ||
| | |Does nothing. | ||
|} | |} | ||
=== 0xff - SetBlink === | |||
Sets a specific entity (i.e., an actor, object, or performer) to continuously flicker in and out of view at a certain interval. | |||
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,778: | Line 4,839: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
| | |visible_interval | ||
| | |The number of frames to wait for while the entity is visible. | ||
|} | |- | ||
=== | |2 | ||
|uint | |||
|invisible_interval | |||
|The number of frames to wait for while the entity is invisible. | |||
|} | |||
=== 0x100 - SetDirection === | |||
Instantly sets a specific entity (i.e., an actor, object, or performer) to a specified direction. | |||
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,794: | Line 4,862: | ||
|- | |- | ||
|1 | |1 | ||
| | |Direction | ||
| | |direction | ||
| | |The type of direction, the list of which can be seen by typing <code>DIR_</code> in SkyTemple's Script Engine Debugger. | ||
|} | |} | ||
=== | === 0x101 - SetDirectionLives === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 4,810: | Line 4,878: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|unk0 | |unk0 | ||
| | |||
|- | |||
|2 | |||
|uint | |||
|unk1 | |||
| | | | ||
|} | |} | ||
=== | === 0x102 - SetEffect === | ||
Plays back an [[List of Effect Animations|effect animation]] assigned to an actor or performer. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,826: | Line 4,899: | ||
|- | |- | ||
|1 | |1 | ||
| | |Effect | ||
| | |effect_id | ||
| | |The ID of a given effect. | ||
|- | |- | ||
| | |2 | ||
|uint | |uint | ||
| | |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 === | |||
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" | ||
|+Parameters | |+Parameters | ||
| Line 4,848: | Line 4,923: | ||
!Type | !Type | ||
!Name | !Name | ||
!Index | |||
! colspan="2" |Bit value | |||
!Description | !Description | ||
|- | |- | ||
| rowspan="6" |1 | |||
| rowspan="6" |bitfield | |||
| rowspan="6" |func_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. | |||
|} | |} | ||
=== | === 0x104 - SetHeight === | ||
Moves an actor "vertically" by distancing it from its shadow. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,876: | Line 4,973: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |unk0 | ||
|number of pixels to move up or down by. | |||
| | |||
|} | |} | ||
=== | === 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,897: | Line 4,985: | ||
!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 === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 4,918: | Line 5,031: | ||
|PositionMark | |PositionMark | ||
|pos_marker | |pos_marker | ||
| | |||
|- | |||
|5 | |||
|uint | |||
|unk4 | |||
| | |||
|- | |||
|6 | |||
|uint | |||
|unk5 | |||
| | | | ||
|} | |} | ||
=== | === 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,929: | Line 5,051: | ||
!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 | |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. (Further detail is not currently known) | |||
|} | |} | ||
=== | === 0x108 - SetPosition === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 4,953: | Line 5,150: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|x | |x | ||
| | | | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
|y | |y | ||
| | | | ||
|} | |} | ||
=== | === 0x109 - SetPositionInitial === | ||
<TO DO: Opcode description> | |||
No parameters. | |||
=== 0x10a - SetPositionLives === | |||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 4,974: | Line 5,175: | ||
|- | |- | ||
|1 | |1 | ||
| | |uint | ||
|unk0 | |unk0 | ||
| | | | ||
|} | |} | ||
=== | === 0x10b - SetPositionMark === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 4,990: | Line 5,191: | ||
|- | |- | ||
|1 | |1 | ||
| | |PositionMark | ||
| | |pos_marker | ||
| | | | ||
|} | |} | ||
=== | === 0x10c - SetPositionOffset === | ||
<TO DO: Opcode description> | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 5,016: | Line 5,207: | ||
|- | |- | ||
|1 | |1 | ||
| | |sint | ||
| | |x | ||
| | | | ||
|- | |- | ||
|2 | |2 | ||
| | |sint | ||
|y | |y | ||
| | | | ||
|} | |} | ||
=== 0x10d - SetPositionOffsetRandom === | |||
=== | <TO DO: Opcode description> | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 5,043: | Line 5,228: | ||
|- | |- | ||
|1 | |1 | ||
| | |sint | ||
| | |x | ||
| | | | ||
|- | |- | ||
|2 | |2 | ||
| | |sint | ||
| | |y | ||
| | | | ||
|} | |} | ||
=== 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 5,064: | Line 5,245: | ||
!Type | !Type | ||
!Name | !Name | ||
!Index | |||
! colspan="2" |Bit value | |||
!Description | !Description | ||
|- | |||
| rowspan="5" |1 | |||
| rowspan="5" |bitfield | |||
| rowspan="5" |reply_bitfield | |||
|0 | |||
|0b00001 | |||
|1 | |||
|Unknown. | |||
|- | |- | ||
|1 | |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. | ||
|} | |} | ||
=== 0x10f - SetupOutputAttributeAndAnimation === | |||
=== | <TO DO: Opcode description> | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 5,093: | Line 5,290: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |unk0 | ||
| | | | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
| | |unk1 | ||
| | | | ||
|- | |||
|3 | |||
|uint | |||
|unk2 | |||
| | |||
|} | |} | ||
=== 0x110 - Slide2Position === | |||
=== | Moves an entity (i.e., an actor, object, or performer) to a specific pixel position without animation. Must be used in a with-statement or a targeted routine. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 5,115: | Line 5,316: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |speed | ||
| | |Movement speed. Higher values result in a faster speed. Values starting at 32770 and above will be slower than a value of 1. | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
|x | |x | ||
| | |The pixel position on the X-axis. | ||
|- | |- | ||
|3 | |3 | ||
| | |uint | ||
|y | |y | ||
|The pixel position on the Y-axis. | |||
|} | |} | ||
=== | |||
=== 0x111 - Slide2PositionLives === | |||
Moves an entity (i.e., an actor, object, or performer) to an actor without animation. Must be used in a with-statement or a targeted routine. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 5,141: | Line 5,344: | ||
|uint | |uint | ||
|speed | |speed | ||
| | |Movement speed. Higher values result in a faster speed. Values starting at 32770 and above will be slower than a value of 1. | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
| | |actor_id | ||
|The ID of the actor to move the entity to. | |||
| | |||
|} | |} | ||
=== | |||
=== 0x112 - Slide2PositionMark === | |||
Moves an entity (i.e., an actor, object, or performer) to one or more Position Marks without animation, and without restricting the angles used. | |||
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 5,166: | Line 5,367: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |num_parameters | ||
| | |The number of parameters to read from this opcode. | ||
|- | |- | ||
|2 | |2+ | ||
| | |PositionMark | ||
| | |pos_marker | ||
| | |A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels. | ||
This parameter may be repeated multiple times. | |||
|} | |} | ||
=== | |||
=== 0x113 - Slide2PositionMark === | |||
Moves an entity (i.e., an actor, object, or performer) to a Position Mark without animation, and without restricting the angles used. | |||
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 5,193: | Line 5,393: | ||
|uint | |uint | ||
|speed | |speed | ||
| | |Movement speed. Higher values result in a faster speed. Values starting at 32770 and above will be slower than a value of 1. | ||
|- | |- | ||
|2 | |2 | ||
| | |PositionMark | ||
| | |pos_mark | ||
|A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels. | |||
| | |||
|} | |} | ||
=== | |||
=== 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,218: | Line 5,416: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |num_parameters | ||
| | | | ||
|- | |- | ||
|2 | |2+ | ||
| | |sint | ||
| | |x | ||
| | | rowspan="2" |These two parameters may be repeated multiple times | ||
|- | |||
|3+ | |||
|sint | |||
|y | |||
|} | |} | ||
=== | === 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,239: | Line 5,443: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |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 | |||
|sint | |||
|x | |||
|How much the entity is offset in the x direction. | |||
|- | |- | ||
| | |3 | ||
| | |sint | ||
| | |y | ||
| | |How much the entity is offset in the y direction. | ||
|} | |} | ||
=== | === 0x116 - Slide2PositionOffsetRandom === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 5,264: | Line 5,473: | ||
|- | |- | ||
|2 | |2 | ||
| | |sint | ||
| | |x | ||
| | |||
|- | |||
|3 | |||
|sint | |||
|y | |||
| | | | ||
|} | |} | ||
=== | === 0x117 - Slide3Position === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 5,281: | Line 5,495: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |speed | ||
| | | | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
|x | |x | ||
| | | | ||
|- | |- | ||
|3 | |3 | ||
| | |uint | ||
|y | |y | ||
| | |||
|} | |} | ||
=== | === 0x118 - Slide3PositionLives === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 5,310: | Line 5,525: | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
| | |actor_id | ||
| | | | ||
|} | |} | ||
=== | === 0x119 - Slide3PositionMark === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 5,332: | Line 5,542: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |num_parameters | ||
| | | | ||
|- | |- | ||
|2 | |2+ | ||
| | |PositionMark | ||
| | |pos_marker | ||
|This parameter may be repeated multiple times | |||
| | |||
|} | |} | ||
=== | === 0x11a - Slide3PositionMark === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 5,358: | Line 5,563: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |speed | ||
| | | | ||
|- | |- | ||
|2 | |2 | ||
| | |PositionMark | ||
| | |pos_marker | ||
| | | | ||
|} | |} | ||
=== | === 0x11b - Slide3PositionOffset === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 5,379: | Line 5,584: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |num_parameters | ||
| | | | ||
|- | |- | ||
|2 | |2+ | ||
| | |sint | ||
|x | |x | ||
| | | rowspan="2" |These two parameters may be repeated multiple times | ||
|- | |- | ||
|3 | |3+ | ||
| | |sint | ||
|y | |y | ||
|} | |} | ||
=== | === 0x11c - Slide3PositionOffset === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 5,405: | Line 5,609: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |speed | ||
| | | | ||
|- | |- | ||
|2 | |2 | ||
| | |sint | ||
| | |x | ||
| | |||
|- | |||
|3 | |||
|sint | |||
|y | |||
| | | | ||
|} | |} | ||
=== | === 0x11d - Slide3PositionOffsetRandom === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 5,426: | Line 5,635: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |speed | ||
| | | | ||
|- | |- | ||
|2 | |2 | ||
| | |sint | ||
| | |x | ||
| | | | ||
|- | |- | ||
|3 | |3 | ||
| | |sint | ||
| | |y | ||
| | | | ||
|} | |} | ||
=== | === 0x11e - SlideHeight === | ||
<TO DO: Opcode description> | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 5,454: | Line 5,661: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |unk0 | ||
| | | | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
| | |unk1 | ||
| | | | ||
|} | |} | ||
=== 0x11f - SlidePosition === | |||
=== | <TO DO: Opcode description> | ||
<TO DO: Opcode description> | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 5,507: | Line 5,687: | ||
|2 | |2 | ||
|uint | |uint | ||
| | |x | ||
| | | | ||
|- | |- | ||
|3 | |3 | ||
| | |uint | ||
| | |y | ||
| | | | ||
|} | |} | ||
=== | === 0x120 - SlidePositionLives === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 5,528: | Line 5,708: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |unk0 | ||
| | | | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
| | |unk1 | ||
| | | | ||
|} | |} | ||
=== | === 0x121 - SlidePositionLivesTime === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 5,549: | Line 5,729: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |unk0 | ||
| | | | ||
|- | |- | ||
|2 | |2 | ||
| | |uint | ||
| | |unk1 | ||
| | | | ||
|- | |- | ||
|3 | |3 | ||
| | |uint | ||
| | |unk2 | ||
| | | | ||
|} | |} | ||
=== | === 0x122 - SlidePositionMark === | ||
Moves an entity (i.e., an actor, object, or performer) to a Position Mark while restricting movement by eight angles—as if movement was performed using the D-Pad. Unlike MovePositionMark, this will not turn the entity to face the direction they are moving in. | |||
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 5,575: | Line 5,757: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |num_parameters | ||
| | |The number of parameters to read from this opcode. | ||
|- | |||
|2+ | |||
|PositionMark | |||
|pos_marker | |||
|A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels. | |||
This parameter may be repeated multiple times. | |||
|} | |} | ||
=== 0x123 - SlidePositionMark === | |||
=== | Moves an entity (i.e., an actor, object, or performer) to a Position Mark while restricting movement by eight angles—as if movement was performed using the D-Pad. Unlike MovePositionMark, this will not turn the entity to face the direction they are moving in. | ||
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 5,599: | Line 5,782: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |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 | |||
|PositionMark | |||
|pos_marker | |||
|A structure consisting of a name, X unit, and Y unit. Units are defined as 8 pixels. | |||
|} | |} | ||
=== | === 0x124 - SlidePositionMarkTime === | ||
<TO DO: Opcode description> | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 5,616: | Line 5,805: | ||
|1 | |1 | ||
|uint | |uint | ||
|layer_id | |unk0 | ||
|The ID of the sector to load. | | | ||
|} | |- | ||
|2 | |||
=== 0x12c - supervision_ExecuteActing === | |uint | ||
Loads a specified Acting script from the specified level from within Enter/Acting/Sub scripts. | |unk1 | ||
| | |||
{| class="wikitable" | |- | ||
|+Parameters | |3 | ||
|- | |PositionMark | ||
!# | |pos_marker | ||
!Type | | | ||
|} | |||
=== 0x125 - SlidePositionOffset === | |||
<TO DO: Opcode description> | |||
{| class="wikitable" | |||
|+Parameters | |||
|- | |||
!# | |||
!Type | |||
!Name | |||
!Description | |||
|- | |||
|1 | |||
|uint | |||
|num_parameters | |||
| | |||
|- | |||
|2+ | |||
|sint | |||
|x | |||
|This parameter may be repeated multiple times | |||
|} | |||
=== 0x126 - SlidePositionOffset === | |||
<TO DO: Opcode description> | |||
{| class="wikitable" | |||
|+Parameters | |||
|- | |||
!# | |||
!Type | |||
!Name | |||
!Description | |||
|- | |||
|1 | |||
|uint | |||
|speed | |||
| | |||
|- | |||
|2 | |||
|sint | |||
|x | |||
| | |||
|- | |||
|3 | |||
|sint | |||
|y | |||
| | |||
|} | |||
=== 0x127 - sound_FadeOut === | |||
<TO DO: Opcode description> | |||
{| class="wikitable" | |||
|+Parameters | |||
|- | |||
!# | |||
!Type | |||
!Name | |||
!Description | |||
|- | |||
|1 | |||
|uint | |||
|unk0 | |||
| | |||
|} | |||
=== 0x128 - sound_Stop === | |||
<TO DO: Opcode description> | |||
No parameters. | |||
=== 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. | |||
=== 0x12a - supervision_Acting === | |||
Loads a sector of the Acting scene. | |||
{| class="wikitable" | |||
|+Parameters | |||
|- | |||
!# | |||
!Type | |||
!Name | |||
!Description | |||
|- | |||
|1 | |||
|uint | |||
|layer_id | |||
|The ID of the sector to load. | |||
|} | |||
=== 0x12b - supervision_ActingInvisible === | |||
Loads a sector of the Acting scene. Actors and objects in this sector will be invisible. | |||
{| class="wikitable" | |||
|+Parameters | |||
|- | |||
!# | |||
!Type | |||
!Name | |||
!Description | |||
|- | |||
|1 | |||
|uint | |||
|layer_id | |||
|The ID of the sector to load. | |||
|} | |||
=== 0x12c - supervision_ExecuteActing === | |||
Loads a specified Acting script from the specified level from within Enter/Acting/Sub scripts. | |||
{| class="wikitable" | |||
|+Parameters | |||
|- | |||
!# | |||
!Type | |||
!Name | |||
!Description | |||
|- | |||
|1 | |||
|Level | |||
|level | |||
|Map LEVEL the script should be located in. | |||
|- | |||
|2 | |||
|ConstString | |||
|script_id | |||
|Name of the script itself, only the first 8 characters are read. | |||
|- | |||
|3 | |||
|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 === | |||
Loads a specified Acting script from the specified level from within Unionall. | |||
{| class="wikitable" | |||
|+Parameters | |||
|- | |||
!# | |||
!Type | |||
!Name | !Name | ||
!Description | !Description | ||
| Line 5,644: | Line 5,976: | ||
|uint | |uint | ||
|script_sector | |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. | |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,908: | Line 6,213: | ||
=== 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 5,921: | Line 6,226: | ||
|uint | |uint | ||
|unk0 | |unk0 | ||
| | |Performs the following effect/function: | ||
# <li value="3">Exclusively used when scenes end. Related to screen fadeouts/whiteouts? <TODO: Details?></li> | |||
# Bubble stream (only used in base game by the Krabby in V01P04B scenes) <TODO: Details?> | |||
# Bubble stream 2 (only used in base game by the Krabby in V01P05B scenes) <TODO: Details?> | |||
# Unsure; only used in scene <code>m26a0606</code> (beach bubble or light effect related) <TODO: Details> | |||
# Waterfall Cave flood. <TODO: Details?> | |||
# <li value="10">"Glass shards" effect used when Primal Dialga stops Celebi in scene <code>m19b1008</code>. <TODO: Details?></li> | |||
# <li value="13">"Boss battle starts" wipe. <TODO: Details?></li> | |||
# Crystal effect used while Azelf blocks off the Crystal Lake in scene <code>m15b0908</code>. <TODO: Details?> | |||
# <li value="16">Unsure; used by <code>V00P03/m01a01a</code>, a debug Waterfall Cave geyser script. <TODO: Details></li> | |||
# "Frozen time zone expands to left" electric effect used in scene <code>m14a0802</code> (Underground Lake). <TODO: Details?> | |||
# "Frozen time zone expands to right" electric effect used in scene <code>m14a0803</code>. <TODO: Details?> | |||
# Unsure; used by the Luminous Spring <code>evolve</code> script. <TODO: Details> | |||
# Unsure; one of the effects in scene <code>m24a0204</code> (finding Hidden Land scene). <TODO: Details> | |||
# Floating Beach bubbles. <TODO: Details?> | |||
# <li value="23">Unsure; effect related to the staff credits scene. <TODO: Details></li> | |||
# Related to special Team Charm "Boss battle starts" wipe (heart effect). <TODO: Details> | |||
# Related to special Team Charm "Boss battle starts" wipe (heart effect). <TODO: Details> | |||
# Related to special Team Charm "Boss battle starts" wipe (heart effect). <TODO: Details> | |||
# <li value="27">Allocating memory for the spotlight (see <code>n01a0101</code>, the SE1 intro scene); MUST USE ONCE WHEN CREATING A SPOTLIGHT</li> | |||
# Sets the center of the spotlight at X and Y coordinates (in pixels) | |||
# SIZE parameter is the size of the spotlight. Third parameter seems unused. | |||
# FRAMES parameter is the amount of frames it will take for the spotlight to close. Third parameter seems unused. | |||
# FRAMES parameter is the amount of frames it will take for the spotlight to open. Third parameter seems unused. | |||
# Frees up the memory; MUST USE ONCE WHEN ENDING A SPOTLIGHT! | |||
# <li value="34">Unsure; used solely alongside <code>back_SetWeather(11);</code> (purple smog) in Sky Peak Summit cutscenes, but the smog seems functional without this. <TODO: Details></li> | |||
|- | |- | ||
|2 | |2 | ||
|uint | |uint | ||
|unk1 | |unk1 | ||
| | |Function is dependent on parameter 1. | ||
|- | |- | ||
|3 | |3 | ||
|uint | |uint | ||
|unk2 | |unk2 | ||
| | |Function is dependent on parameter 1. | ||
|} | |} | ||
=== 0x13b - supervision_Station === | === 0x13b - supervision_Station === | ||
Loads a sector of the Sub scene. | Loads a sector of the Sub scene. | ||
| Line 5,986: | Line 6,317: | ||
|} | |} | ||
=== 0x13e - supervision2_SpecialActing === | === 0x13e - supervision2_SpecialActing === | ||
<TO DO: | Appears to perform similar functions as <code>[[#0x13a - supervision_SpecialActing|supervision_SpecialActing]]</code>, specifically for the Top Screen. | ||
<TO DO: Details> | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,352: | Line 6,685: | ||
=== 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,607: | Line 6,942: | ||
=== 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,619: | Line 6,954: | ||
|1 | |1 | ||
|uint | |uint | ||
| | |world_map_level | ||
| | |Level to transition the world map state to. | ||
|} | |} | ||
=== 0x175 - worldmap_DeleteArrow === | === 0x175 - worldmap_DeleteArrow === | ||
| Line 6,641: | Line 6,976: | ||
|uint | |uint | ||
|world_map_marker_id | |world_map_marker_id | ||
| | |The world map id to move the camera to. | ||
|} | |} | ||
| Line 6,667: | Line 7,002: | ||
=== 0x179 - worldmap_SetCamera === | === 0x179 - worldmap_SetCamera === | ||
Centers the world map camera on a specific world map marker. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 6,679: | Line 7,014: | ||
|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,695: | Line 7,030: | ||
|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,711: | Line 7,046: | ||
|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,748: | Line 7,085: | ||
=== 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,760: | Line 7,107: | ||
|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,064: | Line 7,411: | ||
|} | |} | ||
=== 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,075: | Line 7,422: | ||
|- | |- | ||
|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,745: | Line 8,103: | ||
Same as _SwitchMonologue, but typically uses <code>$PARTNER_TALK_KIND</code> as an argument, and the cases used vary. | Same as _SwitchMonologue, but typically uses <code>$PARTNER_TALK_KIND</code> as an argument, and the cases used vary. | ||
Of the | Of the game's partner options: | ||
<code>case 1:</code> used if Squirtle, | <code>case 1:</code> used if male Squirtle, Totodile, Chimchar, Meowth, or Munchlax | ||
<code>case 2:</code> | <code>case 2:</code> default (all other male partners in vanilla) | ||
<code>case 3:</code> used | <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 | <code>default:</code> used when <code>$PARTNER_TALK_KIND</code>'s Talk Group has a value other than 1, 2, or 3 | ||
| Line 7,770: | Line 8,128: | ||
|<code>$x_TALK_KIND</code>, contains Talk Group number | |<code>$x_TALK_KIND</code>, contains Talk Group number | ||
|} | |} | ||
=== 0xc9 - object === | === 0xc9 - object === | ||
<TO DO: Opcode description> | <TO DO: Opcode description> | ||
| Line 7,971: | Line 8,330: | ||
|} | |} | ||
=== 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> | ||