Pokémon Mystery Dungeon: Red Rescue Team/Scripting: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
(→‎[E8] Weird Event Command: pressing start or select during 9501 and 9601)
m (E8 title)
Line 202: Line 202:
</pre>
</pre>


==[E8] Weird Event Command==
==[E8] Execute Script==
This command executes a script (see [[Pokémon Mystery Dungeon: Red Rescue Team:Script Debug Names|Script Debug Names]]). A notable one is X = 7100, which brings up a list of cutscene script to execute.
This command executes a script (see [[Pokémon Mystery Dungeon: Red Rescue Team:Script Debug Names|Script Debug Names]]). A notable one is X = 7100, which brings up a list of cutscene script to execute.
<pre>
<pre>

Revision as of 21:53, 14 April 2016

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] 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] 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] 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] 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] Dungeon Rules Entering Confirm

Hmmm...
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] 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] 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] 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] 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] 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] Quick Close Textbox

Similar to [33] - 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] Floaty text

Prints text out in the center of the screen. Generally to be used with a black bacground (in conjunction with [23] 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] 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] 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

[3C] Special Dialogue

3C needs an extra argument in the second byte. It is responsible for some dialogue events.

3C 02 - Wait For Button Press
3C 04 00 00 00 00 00 00 00 00 00 00 XX XX XX XX - Your Name input box. X = Default Name Pointer
3C 05 00 00 00 00 00 00 00 00 00 00 XX XX XX XX - Rescue Team Name input box. X = Default Name Pointer
3C 06 00 00 00 00 00 00 00 00 00 00 XX XX XX XX - Password Box	X = Default Pass Pointer
3C 07,08 - Overworld Menu
3C 0B - Friend Area List
3C 0C - Dungeon List
3C 0D - Dojo List
3C 0E,0F - Saving
3C 10 - Welcome to Kangaskhan Storage
3C 11 - Storage Menu
3C 13 - Felicity Bank Menu
3C 16 - Who would you like to visit, friend menu.
3C 17 - Green Kecleon Shop
3C 18 - Purple Kecleon Shop
3C 19 - Gulpin Link Shop
3C 1A - Luminous Cave
3C 1B - Wigglytuff Friend Shop
3C 1C - Friend Rescue Counter
3C 1E - Thank You Mail Counter
3C 1F - Pelliper Post Office Help Counter
3C 20 - Bulletin Board Job List
3C 21 - Bulletin Board
3C 24 - Makuhita Dojo Enter Dialogue
3C 25 - Makuhita Dojo Success Dialogue
3C 26 - Makuhita Dojo Failure Dialogue
3C 27 - Makuhita Dojo Beat Every Dojo Dialogue
3C 28 - Starts Personality Quiz
3C 29 - Scripting Menu Access
3C 2B 00 00 XX XX - Rescue Reward X = Item Given
3C 2C 00 00 XX XX - Promised Rescue Reward X = Item Given
3C 2D - Team ToolBox A
3C 2E XX XX 00 00 YY YY  - Display Staff Credits Names 00 <= XX <= 1A; YY = Time

[42] 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] 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] 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] 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] Fade out music

Seems to be a duplicate of command [43]

[4C] 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] 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] Execute Script

This command executes a script (see Script Debug Names). A notable one is X = 7100, which brings up a list of cutscene script to execute.

Format: E8 00 XX XX 00 00 00 00 00 00 00 00 00 00 00 00

XXXX    Description
----   -------------
0400 - Can cause unregistered dialogue script.
0900 - Text Box: invalidity checked underfoot   but there was nothing to be found.
0B00 - Text Box: Let's go.
0C00 - Talking to pokemon in friend area script.
0D00 - Flag Design change script.
0E00 - Walks randomly diagonally.
0F00 - Like 0E, but disregards laws of physics. Walks over backgrounds.
1100 - Walks in place
1200 - Walks in place and turns.
1300 - Walks in place.
1C00 - Player does non ending sleeping animation
1D00,1E00,1F00 - Makes you walk randomly in four basic directions.
2000 - Player does sleeping animation
2100 - Player does looking around animation
2200 - Player does backwards looking around animation
2300 - Player does backwards double looking around animation
2400 - Player does backwards double looking around animation
2500 - Player hops
2600 - Player hops with sweat
2700 - Player hops twice
2800 - Exclamation point over player
2900 - Question mark over player
2A00 - Sweat/Tear drop over player
2B00 - Shocked thing appears over player
2C00 - Shocked thing appears over player
3000 - Anger mark
3100 - Player does sleeping animation until stopped
3F00 - Save Menu (Does not save on its own)
4000 - Save Menu (Does not save on its own)
4100 - Save Menu Fades to black (Does not save on its own)
4200 - Brings up item storage menu (works)
4300 - Brings up Check Storage/Save menu that leads to 41 and 42 (item storage works, saving doesn't)
4500 - Fades to black, transports player to entrance of map, and fades back in.
4700,4800,4900 - Warps player upwards off of screen (In order of fastest to slowest)
4A00,4B00,4C00 - Warps player down onto screen (In order of fastest to slowest)
4D00,4E00,4F00 - Warps player up, but lets him maintain control.
5100,5200,5300 - Probably the opposite of 4D, 4E, 4F - Warps player back down.
5500,5600,5700,5800 - Plays item recieved sound effect
5900 - Plays other congratulatory sound effect.
5A00 - Fades screen to black, but lets player keep control.
5E00 - Like 5A, but stops music.
5F00 - Stops music
7100 - Cutscene script list selection (unused debug function).
6301, 6401 - Stops script execution and allows to control player. The camera is fixated.
6601 - Warp to friend area map selection.
9501 - Stops script execution and allows to move camera over the area. If Start or Select is pressed, the camera will point to the player sprite and both the sprite and the camera will be controlled by directional keys.
9601 - Stops script execution and allows to move the player sprite and camera over the map. If Start or Select is pressed, the camera will point to the map 0, 0 coordinate.