| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Decomp Names | DSPRE Names | Parameters | Function | Notes | ||||||||||||||||||||||
2 | 0000 | Noop | Nop | Nothing | |||||||||||||||||||||||
3 | 0001 | Dummy | Dummy | Nothing | Has exactly the same ASM code as Nop. | ||||||||||||||||||||||
4 | 0002 | End | End | End script execution | |||||||||||||||||||||||
5 | 0003 | WaitTime | WaitTime | u16: Time; Var: Countdown Variable | Stop script execution for Time frames, storing the remaining time in the Countdown Variable | ||||||||||||||||||||||
6 | 0004 | RegValueSet | RegValueSet | u8: Script Register; u8: Value | Assigns Value to Script Register value | ||||||||||||||||||||||
7 | 0005 | RegDataSet | RegDataSet | u8: Script Register; u32: Value | Assigns Value to Script Register value | ||||||||||||||||||||||
8 | 0006 | RegAdrsSet | RegAdrsSet | u8: Script Register; u32: Address | Assigns data in Address offset to Script Register value | ||||||||||||||||||||||
9 | 0007 | AdrsValueSet | AdrsValueSet | u32: Address; u8: Value | Assigns Value to the Address offset | ||||||||||||||||||||||
10 | 0008 | AdrsRegSet | AdrsRegSet | u32: Address; u8: Script Register | Assigns Script Register value to the Address offset | ||||||||||||||||||||||
11 | 0009 | RegRegSet | RegRegSet | u8: Script Register 1; u8: Script Register 2 | Assigns Script Register 2 value to Script Register 1 value | ||||||||||||||||||||||
12 | 000A | AdrsAdrsSet | AdrsAdrsSet | u32: Address 1; u32: Address 2 | Assigns data in Address 2 to the Address 1 offset | ||||||||||||||||||||||
13 | 000B | CompareRegs | CompareRegs | u8: Script Register; u8: Script Register | Compares two Script Register | ||||||||||||||||||||||
14 | 000C | CompareRegValue | CompareRegValue | u8: Script Register; u8: Value | Compares Script Register value with Value | ||||||||||||||||||||||
15 | 000D | CompareRegAdrs | CompareRegAdrs | u8: Script Register; u32: Address | Compares Script Register value with data in Address | ||||||||||||||||||||||
16 | 000E | CompareAdrsReg | CompareAdrsReg | u32: Address; u8: Script Register | Compares data in Address with Script Register value | ||||||||||||||||||||||
17 | 000F | CompareAdrsValue | CompareAdrsValue | u32: Address; u8: Value | Compares data in Address with Value | ||||||||||||||||||||||
18 | 0010 | CompareAdrsAdrs | CompareAdrsAdrs | u32: Address 1; u32: Address 2 | Compares data in Address 1 with data in Address 2 | ||||||||||||||||||||||
19 | 0011 | CompareVarToValue | CompareVarValue | Var: Variable; u16: Value | Compares Variable value with Value | ||||||||||||||||||||||
20 | 0012 | CompareVarToVar | CompareVars | Var: Variable 1; Var: Variable 2 | Compares Variable 1 value with Variable 2 value | ||||||||||||||||||||||
21 | 0013 | ParallelCommonScript | ParallelCommonScript | u16: ??? | ??? | Somehow related with parallel common script execution. | |||||||||||||||||||||
22 | 0014 | CallCommonScript | CommonScript | u16: Global Script ID | Calls Global Script ID script | See the HGSS sheet for more info. Table in DPPt hasn't been found yet. | |||||||||||||||||||||
23 | 0015 | ReturnCommonScript | LocalScript | Returns to the invoking script/function after a Common Script | |||||||||||||||||||||||
24 | 0016 | GoTo | Jump | u32: Relative Jump | Jumps to a function, Relative Jump bytes forward or backward | Relative Jump can have negative values (backward jump). | |||||||||||||||||||||
25 | 0017 | JumpIfObjID | JumpIfObjID | u8: Event ID; u32: Relative Jump | Jumps to a function, Relative Jump bytes forward or backward, if invoking event has Event ID as ID | ||||||||||||||||||||||
26 | 0018 | JumpIfEventID | JumpIfEventID | u8: ???; u32: Relative Jump | ??? | Maybe jumps to a function if invoking event has a specific ID. | |||||||||||||||||||||
27 | 0019 | JumpIfPlayerDir | JumpIfPlayerDir | u8: Player Direction; u32: Relative Jump | Jumps to a function, Relative Jump bytes forward or backward, if player is looking in Player Direction | Supposed. Needs to be tested in game. | |||||||||||||||||||||
28 | 001A | Call | Call | u32: Relative Jump | Calls a function, Relative Jump bytes forward or backward | Can be used to make loops when calling the own invoking function. | |||||||||||||||||||||
29 | 001B | Return | Return | Returns to the invoking script/function after a Call | |||||||||||||||||||||||
30 | 001C | GoToIf | JumpIf | u8: Condition; u32: Relative Jump | If Condition in the condition table, jumps to a function | Ask AdAstra for the condition list. Condition table is updated after a IfVarValue, IfVarVar, CheckFlag... | |||||||||||||||||||||
31 | 001D | CallIf | CallIf | u8: Condition; u32: Relative Jump | If Condition in the condition table, calls a function | ||||||||||||||||||||||
32 | 001E | SetFlag | SetFlag | u16: Flag | Sets Flag to 1 | ||||||||||||||||||||||
33 | 001F | ClearFlag | ClearFlag | u16: Flag | Sets Flag to 0 | ||||||||||||||||||||||
34 | 0020 | CheckFlag | CheckFlag | u16: Flag | Checks if Flag is set | It updates the internal condition flag and maybe part of the condition table. | |||||||||||||||||||||
35 | 0021 | CheckFlagFromVar | CheckFlagToVar | Var: Flag; Var: Variable | Checks if Flag is set and store the result in Variable | ||||||||||||||||||||||
36 | 0022 | SetFlagFromVar | SetFlagFromVar | Var: Flag | Sets the flag whose ID is stored in Flag | ||||||||||||||||||||||
37 | 0023 | SetTrainerFlag | SetTrainerFlag | Flex: Trainer ID | Sets the flag of Trainer ID, so marks it as beaten trainer | So this trainer will not battle against you. Used in every Gym after the leader is beaten. | |||||||||||||||||||||
38 | 0024 | ClearTrainerFlag | ClearTrainerFlag | Flex: Trainer ID | Clears the flag of Trainer ID, so marks it as unbeaten trainer | So this trainer can be challenged again. | |||||||||||||||||||||
39 | 0025 | CheckTrainerFlag | CheckTrainerFlag | Flex: Trainer ID | Checks if Trainer ID has been beaten | It updates the internal condition flag and maybe part of the condition table. | |||||||||||||||||||||
40 | 0026 | AddVar | IncrementVar | Var: Variable; Flex: Operand | Stores the operation Variable + Operand in Variable | ||||||||||||||||||||||
41 | 0027 | SubVar | DecrementVar | Var: Variable; Flex: Operand | Stores the operation Variable - Operand in Variable | ||||||||||||||||||||||
42 | 0028 | SetVarFromValue | SetVar | Var: Variable; u16: Value | Stores Value in Variable | ||||||||||||||||||||||
43 | 0029 | SetVarFromVar | SetVarFromVariable | Var: Variable 1; Var: Variable 2 | Assigns value of Variable 2 to Variable 1 | ||||||||||||||||||||||
44 | 002A | SetVarFromFlexible | SetVarFromFlexible | Var: Variable; u16: Flexible Value | Stores Flexible Value (or its value if Variable) in Variable | ||||||||||||||||||||||
45 | 002B | MessageInstant | MessageAll | u8: Text Slot | Display line Text Slot from the text file, all at once | ||||||||||||||||||||||
46 | 002C | Message | Message | u8: Text Slot | Display line Text Slot from the text file | ||||||||||||||||||||||
47 | 002D | MessageVar | MessageFlex | Flex: Text Slot | Display line Text Slot from the text file | Unlike 002C, this command also accepts a variable as the input field. | |||||||||||||||||||||
48 | 002E | MessageNoSkip | MessageNoSkip | u16: Text Slot | ??? | ||||||||||||||||||||||
49 | 002F | MessageSynchronized | CMD_47 | u8: Text Slot | ??? | ||||||||||||||||||||||
50 | 0030 | WaitABPress | WaitAB | Waits for button A or button B to be pressed | Somehow it uses ScrReg 0 as countdown. | ||||||||||||||||||||||
51 | 0031 | WaitABXPadPress | WaitButton | Waits for a button to be pressed | It seems only A, B, X and direction pad buttons work. | ||||||||||||||||||||||
52 | 0032 | WaitABPadPress | WaitABPad | Waits for button A, button B or pad buttons to be pressed | Supposed. Needs to be tested in game. | ||||||||||||||||||||||
53 | 0033 | OpenMessage | OpenMessage | ??? | |||||||||||||||||||||||
54 | 0034 | CloseMessage | CloseMessage | Closes message box | SDSME name is misleading, for no button is needed to be pressed. | ||||||||||||||||||||||
55 | 0035 | CloseMessageWithoutErasing | FreezeMessage | ??? | Probably keeps the message box alive after a script. ASM differs with CloseMessage only in a BL instruction. | ||||||||||||||||||||||
56 | 0036 | DrawSignpostInstantMessage | SetIconBoard | u8: Text Slot; u8: Type; u16: Icon; u16: Unused | Prepares an icon board message box displaying Text Slot message, of Type type, and with Icon image if chosen type supports it | Type values from 0 to 3 are: brown (with icon), green (with icon), gray and blue. | |||||||||||||||||||||
57 | 0037 | DrawSignpostTextBox | SetTextBoard | u8: Type; u16: Icon | Prepares a text board message box of Type type, and with Icon image if chosen type supports it | Type values from 0 to 3 are: brown (with icon), green (with icon), gray and blue. | |||||||||||||||||||||
58 | 0038 | SetSignpostCommand | ShowBoard | u8: Process | Triggers different Process processes for the board | Process value 0 keeps the board, value 1 creates the board, value 2 hides the board, value 3 shows the board and value 4 deletes the board. | |||||||||||||||||||||
59 | 0039 | WaitForSignpostDone | WaitBoard | Waits the board last process to end | Supposed. | ||||||||||||||||||||||
60 | 003A | DrawSignpostScrollingMessage | BoardMessage | u8: Text Slot; Flex: Variable | Displays Text Slot message in the current text box, stores the current text box status in Variable | ||||||||||||||||||||||
61 | 003B | GetSignpostInput | CloseBoard | Var: Variable | Returns 1 to Variable if the player has pressed a button so the board must close, 0 otherwise | Variable is stored in ScrReg 0. Command waits for a button to be pressed and stores result in Variable. | |||||||||||||||||||||
62 | 003C | ShowStartMenu | ShowStartMenu | ??? | |||||||||||||||||||||||
63 | 003D | ScrollBG3 | CMD_61 | u8: ???; u8: ???; u8: ???; u8: ???; u8: ???; u8: ??? | ??? | ||||||||||||||||||||||
64 | 003E | ShowYesNoMenu | YesNoBox | Var: Variable | Opens a Yes-No dialog and stores user response in Variable | Variable is stored in ScrReg 0. | |||||||||||||||||||||
65 | 003F | ScrCmd_Unused_03F | DummyGuinnessBox | Nothing | |||||||||||||||||||||||
66 | 0040 | InitGlobalTextMenu | MultiStandardText | u8: X; u8: Y; u8: Cursor; u8: Cancel; Var: Selection | Prepares a multiple selection menu at X and Y screen position, with Cursor default selected option and possibility of cancelling depending on Cancel, with text bank #361, returns selected slot ID in Selection | If Cancel is 1, the user can select the last option by pressing B button. | |||||||||||||||||||||
67 | 0041 | InitLocalTextMenu | MultiLocalText | u8: X; u8: Y; u8: Cursor; u8: Cancel; Var: Selection | Prepares a multiple selection menu at X and Y screen position, with Cursor default selected option and possibility of cancelling depending on Cancel, with local texts, returns selected slot ID in Selection | If Cancel is 1, the user can select the last option by pressing B button. | |||||||||||||||||||||
68 | 0042 | AddMenuEntryImm | AddMultiOption | u8: Text Slot; u8: Multi Slot | Adds an option with Multi Slot ID showing Text Slot text | ||||||||||||||||||||||
69 | 0043 | ShowMenu | ShowMulti | Shows the prepared multi in screen | The game will hide it when the player has selected an option. | ||||||||||||||||||||||
70 | 0044 | InitGlobalTextListMenu | ListStandardText | u8: X; u8: Y; u8: Cursor; u8: Cancel; Var: Selection | Prepares a multiple selection list at X and Y screen position, with Cursor default selected option and possibility of cancelling depending on Cancel, with text bank #361, returns selected slot ID in Selection | If Cancel is 1, the user can select the last option by pressing B button. The difference between a Multi and a List seems to be that lists are scrollable. | |||||||||||||||||||||
71 | 0045 | InitLocalTextListMenu | ListLocalText | u8: X; u8: Y; u8: Cursor; u8: Cancel; Var: Selection | Prepares a multiple selection list at X and Y screen position, with Cursor default selected option and possibility of cancelling depending on Cancel, with local texts, returns selected slot ID in Selection | If Cancel is 1, the user can select the last option by pressing B button. The difference between a Multi and a List seems to be that lists are scrollable. | |||||||||||||||||||||
72 | 0046 | AddListMenuEntry | AddListOption | Flex: Option Msg; Flex: Highlight Msg; Flex: List Slot | Adds a new option to the list, with List Slot ID and showing text line Option MSG. It also displays text line Highlight MSG when that option is highlighted. | If Highlight MSG is set to 255 [0xFF], no message will be displayed when the option is highlighted. This command relies on an open message box in order to display the highlight messages. Trying to highlight an option with Highlight MSG different than 255 [0xFF] will result in a crash if no message box is already being displayed. | |||||||||||||||||||||
73 | 0047 | ShowListMenu | ShowList | Shows the prepared list in screen | The game will hide it when the player has selected an option. | ||||||||||||||||||||||
74 | 0048 | ShowMenuMultiColumn | MultiColumn | u8: Columns | Splits the multi window in Columns different columns | ||||||||||||||||||||||
75 | 0049 | PlayFanfare | PlayFanfare | Flex: Sound | Plays Sound | ||||||||||||||||||||||
76 | 004A | StopFanfare | StopFanfare | Flex: Sound | Stops Sound | ||||||||||||||||||||||
77 | 004B | WaitFanfare | WaitFanfare | Flex: Sound | Waits for Sound to finish | ||||||||||||||||||||||
78 | 004C | PlayCry | PlayCry | Flex: Pokémon; Flex: Unused | Plays a Pokémon cry | ||||||||||||||||||||||
79 | 004D | WaitCry | WaitCry | Waits the current cry to finish | |||||||||||||||||||||||
80 | 004E | PlaySound | PlaySound | u16: Sound | Pauses current music, then Plays Sound | ||||||||||||||||||||||
81 | 004F | WaitSound | WaitSound | Waits for Sound to finish, then resumes music | |||||||||||||||||||||||
82 | 0050 | PlayMusic | PlayMusic | u16: Music | Plays Music | ||||||||||||||||||||||
83 | 0051 | StopMusic | StopMusic | u16: Unused | Stops current music | Parameter is ignored because the game identifies what music is playing. | |||||||||||||||||||||
84 | 0052 | PlayDefaultMusic | PlayDefaultMusic | Plays map default music | |||||||||||||||||||||||
85 | 0053 | SetSpecialBGM | SetMusic | u16: Music | ??? | Refers to a "special bgm". | |||||||||||||||||||||
86 | 0054 | FadeOutBGM | FadeOutMusic | u16: Volume; u16: Time | Fades out the current music to Volume in Time frames | ||||||||||||||||||||||
87 | 0055 | FadeInBGM | FadeInMusic | u16: Time | Fades in the current music to normal volume in Time frames | ||||||||||||||||||||||
88 | 0056 | SetBGMPlayerPaused | SetMusicPauseStatus | u8: Sseq Player ID; u8: Status | If Status = 1, the track that's currently played by chosen Player ID will pause. If Status = 0, Player ID will resume the previously paused music. | ||||||||||||||||||||||
89 | 0057 | PlayFieldBGM | PlayFieldBGM | u16: Music | While in the field overworld, plays Music using SSEQ Player #7 (PLAYER_BGM) | ||||||||||||||||||||||
90 | 0058 | SetBGMFixed | CMD_88 | u8: ??? | ??? | Seems to set a flag related to the music system. | |||||||||||||||||||||
91 | 0059 | CheckRecordedChatotCryIsPlayable | CheckChatotCry | Var: Variable | Checks if Chatot has custom sound, stores answer in Variable | Returns 0 or 1 to the specified Variable. Not for a specific Chatot but for all (they share a custom sound). | |||||||||||||||||||||
92 | 005A | TryRecordChatotCry | StartChatotCry | Var: Variable | Starts Chatot microphone record, stores answer in Variable | Returns 0 or 1 to the specified Variable depending on successful recording. | |||||||||||||||||||||
93 | 005B | StopRecordingChatotCry | StopChatotCry | Stops recording Chatot custom sound | |||||||||||||||||||||||
94 | 005C | StoreRecordedChatotCry | SaveChatotCry | ??? | Maybe saves the custom Chatot sound in the savegame. | ||||||||||||||||||||||
95 | 005D | SetSubScene63 | LoadSpearPillarAudio | Loads Spear Pillar cutscene sound data (GROUP_SE_CLIMAX in the SDAT) | |||||||||||||||||||||||
96 | 005E | ApplyMovement | Movement | Flex: Event ID; u32: Relative Jump | Applies movement at Relative Jump to Event ID | It seems that movements must be halfword-aligned in the script file. | |||||||||||||||||||||
97 | 005F | WaitMovement | WaitMovement | Waits for all movements to finish | |||||||||||||||||||||||
98 | 0060 | LockAll | LockAll | Locks every event in the map | |||||||||||||||||||||||
99 | 0061 | ReleaseAll | ReleaseAll | Releases every event in the map | |||||||||||||||||||||||
100 | 0062 | LockObject | Lock | u16: Event ID | Locks Event ID |