List of Opcodes: Difference between revisions

Adex (talk | contribs)
m StopAnimation documentation
RRad (talk | contribs)
 
(12 intermediate revisions by 3 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 ===
Sets certain bits of an entity's (i.e., an actor, object, or performer) "function" attribute to 0.
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
|bitfield
|0b000010
|function_bitfield
|2
|Most bits' purposes are unknown. Bit 1 appears to be the bit used for allowing an entity to follow a Type 1 actor, like the actor ACTOR_ATTENDANT1 in the overworld.
|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 ===
Sets certain bits of an entity's (i.e., an actor, object, or performer) "hit" attribute to 0.
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
|bitfield
|0b00010
|hit_bitfield
|2
|Most bits' purposes are unknown.
|Must be enabled for the entity to interact with layer 2 of map collision.
 
|-
* 2: Entity collision.
|2
* 6: Talk Script upon collision.
|0b00100
* 7: Talk Script upon pressing the A Button near the entity.
|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 ===
Sets certain bits of an entity's (i.e., an actor, object, or performer) "output" attribute to 0.
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
|bitfield
|Unknown.
|output_bitfield
|
# Underlay below entities.
# Overlay above entities.
# Overlay above the current Map Background's Layer 2.
# Overlay above the game's canvas system, which includes the textbox, portrait, and some <code>screen_</code> commands that do not end in <code>All</code>.
# Flicker.
# Transparency.
# Invisibility.
# Displays shadow.
|}
=== 0xd3 - ResetReplyAttribute ===
Sets certain bits of an entity's (i.e., an actor, object, or performer) "reply" attribute to 0.
 
{| class="wikitable"
|+Parameters
|-
!#
!Type
!Name
!Description
|-
|-
|1
|1
|bitfield
|0b0000000000000010
|reply_bitfield
|2
|Most bits' purposes are unknown.
|Underlay below entities.
 
* 1: Talk Script upon collision.
* 2: Talk Script upon pressing the A Button near the entity.
* 6: Underlay below entities.
* 7: Overlay above entities.
|}
=== 0xd4 - ResumeEffect ===
Resumes the current graphical effect of an entity (i.e., an actor, object, or performer) that has been paused with <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"
|+Parameters
|-
|-
!#
|2
!Type
|0b0000000000000100
!Name
|4
!Description
|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.
|-
|-
|1
|15
|Effect
|0b1000000000000000
|effect_id
|32768
|A graphical effect to display relative to an entity.
|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.
|}
|}
=== 0xd6 - SavePosition ===
=== 0xd3 - ResetReplyAttribute ===
Saves various attributes of an entity (i.e., an actor, object, or performer) to the following script variables:
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!
 
* <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"
|+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
|Unknown.
|-
|-
|1
|1
|uint
|0b00010
|index
|2
|Index used by all <code>$POSITION_</code> script variables, ranged from 0-2 (inclusive).
|If enabled, plays talk script if colliding with entity.
|}
|-
=== 0xd7 - screen_FadeChange ===
|2
|0b00100
|4
|If enabled, plays talk script when pressing A near the entity.
|-
|3
|0b01000
|8
|Unknown.
|-
|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"
|+Parameters
|-
!#
!Type
!Name
!Description
|-
|1
|Effect
|effect_id
|A graphical effect to display relative to an entity.
|}
=== 0xd6 - SavePosition ===
Saves various attributes of an entity (i.e., an actor, object, or performer) to the following script variables:
 
* <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"
|+Parameters
|-
!#
!Type
!Name
!Description
|-
|1
|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 across a certain number of frames. This opcode will not affect:
Changes the brightness of the screen across a certain number of frames. This opcode will not affect:


Line 4,482: Line 4,626:
|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.
More research on this parameter may be needed.
|}
|}
=== 0xf6 - se_ChangeVolume ===
=== 0xf6 - se_ChangeVolume ===
Line 4,577: Line 4,721:
|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.
More research on this parameter may be needed.
|}
|}
=== 0xfa - se_PlayPan ===
=== 0xfa - se_PlayPan ===
Line 4,604: Line 4,748:
|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.
More research on this parameter may be needed.
|}
|}
=== 0xfb - se_PlayVolume ===
=== 0xfb - se_PlayVolume ===
Line 4,771: Line 4,915:


=== 0x103 - SetFunctionAttribute ===
=== 0x103 - SetFunctionAttribute ===
<TO DO: Opcode description>
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,779: 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
|bitfield
|Must be OFF for an actor to follow. Potentially signals leader?
|unk0
|-
|
|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,803: Line 4,977:
|}
|}
=== 0x105 - SetHitAttribute ===
=== 0x105 - SetHitAttribute ===
<TO DO: Opcode description>
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,811: 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
|bitfield
|0b00010
|unk0
|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,845: Line 5,044:
|}
|}
=== 0x107 - SetOutputAttribute ===
=== 0x107 - SetOutputAttribute ===
Sets certain bits of an entity's (i.e., an actor, object, or performer) "output" attribute to 1.
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,852: 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
|bitfield
|Unknown.
|output_bitfield
|
# Underlay below entities.
# Overlay above entities.
# Overlay above the current Map Background's Layer 2.
# Overlay above the game's canvas system, which includes the textbox, portrait, and some <code>screen_</code> commands that do not end in <code>All</code>.
# Flicker.
# Transparency.
# Invisibility.
# Displays shadow.
|}
=== 0x108 - SetPosition ===
<TO DO: Opcode description>
 
{| class="wikitable"
|+Parameters
|-
|-
!#
|1
!Type
|0b0000000000000010
!Name
|2
!Description
|Underlay below entities.
|-
|-
|1
|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>
 
{| class="wikitable"
|+Parameters
|-
!#
!Type
!Name
!Description
|-
|1
|uint
|uint
|x
|x
Line 4,967: Line 5,238:
|}
|}
=== 0x10e - SetReplyAttribute ===
=== 0x10e - SetReplyAttribute ===
<TO DO: Opcode description>
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,975: 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
|1
|bitfield
|Unknown.
|unk0
|
|}
=== 0x10f - SetupOutputAttributeAndAnimation ===
<TO DO: Opcode description>
 
{| class="wikitable"
|+Parameters
|-
|-
!#
|1
!Type
|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"
|+Parameters
|-
!#
!Type
!Name
!Name
!Description
!Description
Line 5,918: 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
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,931: 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,996: Line 6,317:
|}
|}
=== 0x13e - supervision2_SpecialActing ===
=== 0x13e - supervision2_SpecialActing ===
<TO DO: Opcode description>
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 7,737: Line 8,060:
!Name
!Name
!Description
!Description
|-
|-
|1
|1
|uint
|uint
|cancel
|cancel
|If player can use the B button to back out of a menu. 0 for false, 1 for true.
|If player can use the B button to back out of a menu. 0 for false, 1 for true.
|-
|-
|2
|2
|uint
|uint
|init
|init
|Entry number to start the cursor at, starting at 1
|Entry number to start the cursor at, starting at 1
|-
|-
|3
|3
|uint
|uint
|unk2
|unk2
|Bitfield $VAR
|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.
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 4:</code> used when the player is male or genderless
 
 
<code>case 5:</code> used when the player is female
<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
<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.
This opcode supports displaying a portrait. No sound effect is used when text is scrolling.
 
{| class="wikitable"
|+Parameters
|-
!#
!Type
!Name
!Description
|-
|1
|GameVar
|var
|<code>$x_TALK_KIND</code>, contains Talk Group number
|}
=== 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,777: Line 8,128:
|<code>$x_TALK_KIND</code>, contains Talk Group number
|<code>$x_TALK_KIND</code>, contains Talk Group number
|}
|}
=== 0xad - message_SwitchTalk ===
Same as _SwitchMonologue, but typically uses <code>$PARTNER_TALK_KIND</code> as an argument, and the cases used vary.
Of the vanilla game partner options:
<code>case 1:</code> used if Squirtle, Tododile, Chimchar, Meowth, or Munchlax
<code>case 2:</code> used for all other male partners
<code>case 3:</code> used for all female partners
<code>default:</code> used when <code>$PARTNER_TALK_KIND</code>'s Talk Group has a value other than 1, 2, or 3
This opcode supports displaying a portrait. The [[sound effect]] 16133 will emit from the each character scrolling in the text.


{| class="wikitable"
|+Parameters
|-
!#
!Type
!Name
!Description
|-
|1
|GameVar
|var
|<code>$x_TALK_KIND</code>, contains Talk Group number
|}
=== 0xc9 - object ===
=== 0xc9 - object ===
<TO DO: Opcode description>
<TO DO: Opcode description>