List of Opcodes: Difference between revisions

Adex (talk | contribs)
m A bit more opcodes
Adex (talk | contribs)
m A bit more opcodes, up to 0x81
Line 77: Line 77:
|The number of pixels to shift either:
|The number of pixels to shift either:


* The Map Background's Layer 1 and Layer 2 Y-axis
* The Map Background's Layer 1 and Layer 2 Y-axis.
* The Map Background's Layer 2 X-axis.
* The Map Background's Layer 2 X-axis.


Line 1,196: Line 1,196:
|1
|1
|uint
|uint
|behavior
|mode
|Values of 0 or 3+ mean the camera will not shake.
|Values of 0 or 3+ mean the camera will not shake.


Line 1,615: Line 1,615:
|uint
|uint
|unk0
|unk0
|
|Currently unknown.
|}
|}
=== 0x6b - debug_Print ===
=== 0x6b - debug_Print ===
Does nothing in the final game.
Does nothing in the final game.


If the script is running using SkyTemple's debugger and debug logging is enabled, the specified string will be printed to the debug log.
If the script is running using SkyTemple's debugger and the "Script Debug" checkbox is ticked, the specified string will be printed to the Debug Log.


{| class="wikitable"
{| class="wikitable"
Line 1,637: Line 1,637:
=== 0x6c - debug_PrintFlag ===
=== 0x6c - debug_PrintFlag ===
Does nothing in the final game.
Does nothing in the final game.
If the script is running using SkyTemple's debugger and the "Script Debug" checkbox is ticked, the specified string will be printed to the Debug Log, along with the value of the specified script variable.


{| class="wikitable"
{| class="wikitable"
Line 1,649: Line 1,651:
|GameVar
|GameVar
|var
|var
|
|One of the 115 possible script variables. Indexed variables are not encouraged to use, since the Debug Log will only read from the first index.
|-
|-
|2
|2
|ConstString
|ConstString
|txt
|txt
|
|A string to be printed to the Debug Log.
|}
|}
=== 0x6d - debug_PrintScenario ===
=== 0x6d - debug_PrintScenario ===
Does nothing in the final game.
If the script is running using SkyTemple's debugger and the "Script Debug" checkbox is ticked, the specified string will be printed to the Debug Log, along with two indices of the specified script variable.
 
This opcode's Debug Log implementation currently seems broken, as it prints the first index of the specified variable twice.


{| class="wikitable"
{| class="wikitable"
Line 1,670: Line 1,674:
|GameVar
|GameVar
|var
|var
|
|One of the 115 possible script variables. A two-indexed variable (e.g., $SCENARIO_MAIN) is encouraged to use.
|-
|-
|2
|2
|ConstString
|ConstString
|txt
|txt
|
|A string to be printed to the Debug Log.
|}
|}
=== 0x6f - Destroy ===
=== 0x6f - Destroy ===
<TO DO: Opcode description>
Instantly removes an active entity (i.e., an actor, object, or performer) from memory.
 
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.


No parameters.
No parameters.
=== 0x71 - EndAnimation ===
=== 0x71 - EndAnimation ===
<TO DO: Opcode description>
Stops an actor or object's looping animation once it reaches the end of its animation frames.
 
This opcode does not have a parameter for an entity, as it must be used in a with-statement or a targeted routine.


No parameters.
No parameters.
=== 0x72 - ExecuteActing ===
=== 0x72 - ExecuteActing ===
<TO DO: Opcode description>
Currently unknown.


{| class="wikitable"
{| class="wikitable"
Line 1,699: Line 1,708:
|uint
|uint
|unk0
|unk0
|
|Currently unknown.
|}
|}
=== 0x73 - ExecuteCommon ===
=== 0x73 - ExecuteCommon ===
<TO DO: Opcode description>
Jumps to a Unionall Coroutine, runs its code, and returns to the line in which this opcode was called. This opcode should be called if the specified Coroutine ends with <code>hold;</code>. Typically, the base game uses this command with Coroutines whose names end with "FUNC_SERIES".
 
This opcode does not have a parameter for an entity, as it must be used in a with-statement.


{| class="wikitable"
{| class="wikitable"
Line 1,715: Line 1,726:
|Routine
|Routine
|coro_id
|coro_id
|
|One of the 701 possible Unionall Coroutines.
|-
|-
|2
|2
|uint
|uint
|unk1
|unk0
|
|Unknown.
|}
|}
=== 0x81 - Flash ===
=== 0x81 - Flash ===
<TO DO: Opcode description>
Does nothing. This opcode is not used in the base game.


No parameters.
No parameters.