List of Opcodes: Difference between revisions
m Changed Item_GetVariable Tags: Visual edit Mobile edit Mobile web edit |
Happylappy (talk | contribs) m Added Opcode Descriptions (Call, Return, and a few others) |
||
| Line 1,789: | Line 1,789: | ||
Items in slot 0 may also be added to the player's bag and storage with hardcoded menus, such as <code>message_Menu(MENU_GIVE_ITEM);</code> and <code>message_Menu(MENU_GIVE_ITEM2);</code>, respectively. Additionally, the text tag <code>[s_item:X]</code> will display the item's name, where X is the item slot number. | Items in slot 0 may also be added to the player's bag and storage with hardcoded menus, such as <code>message_Menu(MENU_GIVE_ITEM);</code> and <code>message_Menu(MENU_GIVE_ITEM2);</code>, respectively. Additionally, the text tag <code>[s_item:X]</code> will display the item's name, where X is the item slot number. | ||
Item slots 0-3 are safe to use, but item slots 4 and beyond will begin to overwrite other memory! | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 1,806: | Line 1,808: | ||
|uint | |uint | ||
|item_id | |item_id | ||
|The ID of the item, where all are listed in the Items tab of SkyTemple. | |The ID of the item, where all are listed in the Items tab of SkyTemple. | ||
|- | |- | ||
|3 | |3 | ||
| Line 4,730: | Line 4,732: | ||
|} | |} | ||
=== 0x104 - SetHeight === | === 0x104 - SetHeight === | ||
Moves an actor "vertically" by distancing it from its shadow. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 4,743: | Line 4,745: | ||
|uint | |uint | ||
|unk0 | |unk0 | ||
| | |number of pixels to move up or down by. | ||
|} | |} | ||
=== 0x105 - SetHitAttribute === | === 0x105 - SetHitAttribute === | ||
| Line 5,892: | Line 5,894: | ||
=== 0x13c - supervision_StationCommon === | === 0x13c - supervision_StationCommon === | ||
Loads a sector of the Enter scene. | Loads a sector of the Enter scene. | ||
Can be used to call sectors of an enter scene within acting scenes! | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 7,116: | Line 7,120: | ||
|} | |} | ||
=== 0x37 - Call === | === 0x37 - Call === | ||
Jumps to the specified address, runs code, and returns to the line of code in which this opcode was used (only if <code>return;</code> was used in the routine this opcode calls). | Jumps to the specified address, runs code, and returns to the line of code in which this opcode was used (only if <code>return;</code> was used in the routine this opcode calls). Only one call can be stored at a time! | ||
Use within macros is ill-advised, as using <code>return;</code> within a macro will just end the macro! | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 7,570: | Line 7,576: | ||
|} | |} | ||
=== 0x82 - Hold === | === 0x82 - Hold === | ||
Will stall a script forever. | |||
No parameters. | No parameters. | ||
| Line 7,717: | Line 7,723: | ||
|} | |} | ||
=== 0xd5 - Return === | === 0xd5 - Return === | ||
If run from within a macro, ends the macro. | |||
If run after the "call" opcode was used, will return to the address of the call opcode. | |||
If used within a script, ends the script. | |||
No parameters. | No parameters. | ||