The current URL is datacrystal.tcrf.net.
Pokémon Mystery Dungeon: Red Rescue Team/Scripting
Much of the game uses it's own specific scripts to move along the plot and have characters interact.
Every script command is 16 byte (0x10) long. The first two bytes are the command identifier, and the rest are the arguments. The last four bytes in a statement are usually reserved for a pointer if needed.
Command identifier, argument, and pointer are in little-endian form.
Below are described the known script commands:
[01 00] Warp To Location
The 01 Command fades out the current screen, and warps the player to a new location.
Format: 01 00 XX XX YY YY 00 00 00 00 00 00 00 00 00 00 X = Time to fade out in frames Y = Place to warp to
For a list of locations avaible, refer to the Location ID List in notes page.
[02 00] Warp To Dungeon
The 02 command warps the player directly into a dungeon.
Format: 02 00 XX XX YY YY 00 00 00 00 00 00 00 00 00 00 X = Time to fade out in frames Y = Dungeon ID
[03 00] Warp To Friend Area Map
The 03 command warps the player directly to the friend area map.
Format: 03 00 XX XX YY YY YY YY 00 00 00 00 00 00 00 00 X = Time to fade out in frames Y = Unknown; Command only works if set to zero or one.
[04 00] Warp To Dungeon With Map Walking Animation
The 04 command is similar to the 02 command. It warps the player into a dungeon, but plays a map walking animation first.
Format: 04 00 XX XX YY YY 00 00 00 00 00 00 00 00 00 00 X = Time to fade out in frames Y = Dungeon ID [00 - 2C]
[05 00] Dungeon Rules Entering Confirm
To do: {{{1}}} |
Displays dialogue that asks if it is OK to enter the dungeon with the following rules.
Format: 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[30 00] Close Textbox
Makes the textbox to disappear.
Format: 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[32 00] Basic Textbox
Opens a textbox with a pokepic but without the name of the speaker, or scrolling text.
Format: 32 00 XX XX 00 00 00 00 00 00 00 00 YY YY YY YY X = Pokepic/Speaker ID Y = Pointer to text
[33 00] Basic Scrolling Textbox
Opens a textbox with a pokepic and scrolling text but without the name of the speaker or the text scrolling sound.
Format: 33 00 XX XX 00 00 00 00 00 00 00 00 YY YY YY YY X = Pokepic/Speaker ID Y = Pointer to text
[34 00] Textbox with speaker name
The most widely used text command. Opens a textbox with a pokepic, the name of the speaker, scrolling letters, and the scrolling sound.
Format: 32 00 XX XX 00 00 00 00 00 00 00 00 YY YY YY YY X = Pokepic/Speaker ID Y = Pointer to text
[35 00] Basic Textbox with Sound
Opens a textbox with a pokepic, scrolling letters, and the scrolling sound, but without the name of the speaker.
Format: 35 00 XX XX 00 00 00 00 00 00 00 00 YY YY YY YY X = Pokepic/Speaker ID Y = Pointer to text
[36 00] Quick Close Textbox
Similar to [33 00] - has pokepic, and scrolling letters, but no sound. Immediately closes after finishing scrolling.
Format: 32 00 XX XX 00 00 00 00 00 00 00 00 YY YY YY YY X = Pokepic/Speaker ID Y = Pointer to text
[37 00] Floaty text
Prints text out in the center of the screen. Generally to be used with a black bacground (in conjunction with [23 00] or [23 01]).
Format: 37 00 00 00 00 00 00 00 00 00 00 00 XX XX XX XX X = Pointer to text
[39 00] Fading Floaty text
Prints text out in the center of the screen. Fades from black to white upon entrance and then back to black when done.
Format: 39 00 00 00 00 00 00 00 00 00 00 00 XX XX XX XX X = Pointer to text
[3A 00] Yes/No Selection Box
Displays text box with Yes or No Selection Box above. Bound to an event.
Format: 32 00 XX XX YY YY 00 00 00 00 00 00 ZZ ZZ ZZ ZZ X = Event ID Y = Pokepic/Speaker ID Z = Pointer to text
[42 00] Stop music abruptly
Immediately cuts out music.
Format: 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[43 00] Fade out music
Fades music out.
Format: 43 00 XX XX 00 00 00 00 00 00 00 00 00 00 00 00 X = time to fade (unit unknown).
[44 00] Abruptly play music
Stops former song and plays new song.
Format: 44 00 00 00 XX XX 00 00 00 00 00 00 00 00 00 00 X = song to play.
[45 00] Fade in music
Stops former song and fades new song in.
Format: 44 00 XX XX YY YY 00 00 00 00 00 00 00 00 00 00 X = time to fade (unit unknown). Y = song to play.
[48 00] Fade out music
Seems to be a duplicate of command [43 00]
[4C 00] Play Sound Effect
Plays a sound effect
Format: 4C 00 00 00 XX XX 00 00 00 00 00 00 00 00 00 00 X = Effect to play. Range: [C8 - DB; 01 C7 - 02 06; 02 58 - 03 AB; Possibly more]
[DB 00] Pause Script Execution
Indicates a pause to wait before executing the next command.
Format: DB 00 XX XX 00 00 00 00 00 00 00 00 00 00 00 00 X = Delay amount in frames
[E8 00] Weird Event Command
This command can have all kinds of effects. A notable one is X = 71, which brings up a hidden script menu not even present in the debug room.
Format: E8 00 XX XX 00 00 00 00 00 00 00 00 00 00 00 00 X Description --- ------------- 20 - Player does sleeping animation 21 - Player does looking around animation 22 - Player does backwards looking around animation 23 - Player does backwards double looking around animation 24 - Player does backwards double looking around animation 25 - Player hops 26 - Player hops with sweat 27 - Player hops twice 28 - Exclamation point over player 29 - Question mark over player 2A - Sweat/Tear drop over player 2B - Shocked thing appears over player 2C - Shocked thing appears over player 30 - Anger mark 31 - Player does sleeping animation until stopped 3F - Save Menu (Does not save on its own) 40 - Save Menu (Does not save on its own) 41 - Save Menu Fades to black (Does not save on its own) 42 - Brings up item storage menu (works) 43 - Brings up Check Storage/Save menu that leads to 41 and 42 (item storage works, saving doesn't) 45 - Fades to black, transports player to entrance of map, and fades back in. 47,48,49 - Warps player upwards off of screen (In order of fastest to slowest) 4A,4B,4C - Warps player down onto screen (In order of fastest to slowest) 4D,4E,4F - Warps player up, but lets him maintain control. 51,52,53 - Probably the opposite of 4D, 4E, 4F - Warps player back down. 55,56,57,58 - Plays item recieved sound effect 59 - Plays other congratulatory sound effect. 5A - Fades screen to black, but lets player keep control. 5E - Like 5A, but stops music. 5F - Stops music 71 - !!!!!!!! NEVER BEFORE SEEN SCRIPT MENU!!!!!!!! (so cool) 1D,1E,1F - Makes you walk randomly.