Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.

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

From Data Crystal
Jump to navigation Jump to search
(→‎[3C] Special Dialogue: 3C 0C is actually a dungeon list)
(correcting section titles and stuff)
Line 7: Line 7:
Below are described the known script commands:
Below are described the known script commands:


==[01 00] Warp To Location==
==[01] Warp To Location==
The 01 Command fades out the current screen, and warps the player to a new location.  
The 01 Command fades out the current screen, and warps the player to a new location.  
<pre>
<pre>
Line 17: Line 17:
For a list of locations avaible, refer to the Location ID List in [[Pokémon Mystery Dungeon: Red Rescue Team:Notes#Location_ID_List|notes page]].
For a list of locations avaible, refer to the Location ID List in [[Pokémon Mystery Dungeon: Red Rescue Team:Notes#Location_ID_List|notes page]].


==[02 00] Warp To Dungeon==
==[02] Warp To Dungeon==
The 02 command warps the player directly into a dungeon.
The 02 command warps the player directly into a dungeon.
<pre>
<pre>
Line 25: Line 25:
</pre>
</pre>


==[03 00] Warp To Friend Area Map==
==[03] Warp To Friend Area Map==
The 03 command warps the player directly to the friend area map.
The 03 command warps the player directly to the friend area map.
<pre>
<pre>
Line 33: Line 33:
</pre>
</pre>


==[04 00] Warp To Dungeon With Map Walking Animation==
==[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.
The 04 command is similar to the 02 command. It warps the player into a dungeon, but plays a map walking animation first.
<pre>
<pre>
Line 41: Line 41:
</pre>
</pre>


==[05 00] Dungeon Rules Entering Confirm==
==[05] Dungeon Rules Entering Confirm==
{{todo|text=Are there other accessible rules besides saving?}}  
{{todo|text=Are there other accessible rules besides saving?}}  
Displays dialogue that asks if it is OK to enter the dungeon with the following rules.
Displays dialogue that asks if it is OK to enter the dungeon with the following rules.
Line 48: Line 48:
</pre>
</pre>


==[30 00] Close Textbox==
==[30] Close Textbox==
Makes the textbox to disappear.
Makes the textbox to disappear.
<pre>
<pre>
Line 54: Line 54:
</pre>
</pre>


==[32 00] Basic Textbox==
==[32] Basic Textbox==
Opens a textbox with a pokepic but without the name of the speaker, or scrolling text.
Opens a textbox with a pokepic but without the name of the speaker, or scrolling text.
<pre>
<pre>
Line 62: Line 62:
</pre>
</pre>


==[33 00] Basic Scrolling Textbox==
==[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.
Opens a textbox with a pokepic and scrolling text but without the name of the speaker or the text scrolling sound.
<pre>
<pre>
Line 70: Line 70:
</pre>
</pre>


==[34 00] Textbox with speaker name==
==[34] Textbox with speaker name==
The most widely used text command.
The most widely used text command.
Opens a textbox with a pokepic, the name of the speaker, scrolling letters, and the scrolling sound.
Opens a textbox with a pokepic, the name of the speaker, scrolling letters, and the scrolling sound.
Line 79: Line 79:
</pre>
</pre>


==[35 00] Basic Textbox with Sound==
==[35] Basic Textbox with Sound==
Opens a textbox with a pokepic, scrolling letters, and the scrolling sound, but without the name of the speaker.
Opens a textbox with a pokepic, scrolling letters, and the scrolling sound, but without the name of the speaker.
<pre>
<pre>
Line 87: Line 87:
</pre>
</pre>


==[36 00] Quick Close Textbox==
==[36] Quick Close Textbox==
Similar to [33 00] - has pokepic, and scrolling letters, but no sound. Immediately closes after finishing scrolling.
Similar to [33] - has pokepic, and scrolling letters, but no sound. Immediately closes after finishing scrolling.
<pre>
<pre>
Format: 32 00 XX XX 00 00 00 00 00 00 00 00 YY YY YY YY
Format: 32 00 XX XX 00 00 00 00 00 00 00 00 YY YY YY YY
Line 95: Line 95:
</pre>
</pre>


==[37 00] Floaty 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 00] or [23 01]).
Prints text out in the center of the screen. Generally to be used with a black bacground (in conjunction with [23] or [23 01]).
<pre>
<pre>
Format: 37 00 00 00 00 00 00 00 00 00 00 00 XX XX XX XX
Format: 37 00 00 00 00 00 00 00 00 00 00 00 XX XX XX XX
Line 102: Line 102:
</pre>
</pre>


==[39 00] Fading Floaty 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.
Prints text out in the center of the screen. Fades from black to white upon entrance and then back to black when done.
<pre>
<pre>
Line 109: Line 109:
</pre>
</pre>


==[3A 00] Yes/No Selection Box==
==[3A] Yes/No Selection Box==
Displays text box with Yes or No Selection Box above. Bound to an event.
Displays text box with Yes or No Selection Box above. Bound to an event.
<pre>
<pre>
Line 122: Line 122:
<pre>
<pre>
3C 02 - Wait For Button Press
3C 02 - Wait For Button Press
3C 04,05 00 00 00 00 00 00 00 00 00 00 XX XX XX XX - Name input box. X = Default Name Pointer
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 06 00 00 00 00 00 00 00 00 00 00 XX XX XX XX - Password Box X = Default Pass Pointer
3C 07,08 - B Menu
3C 07,08 - Overworld Menu
3C 0B - Friend Area List
3C 0B - Friend Area List
3C 0C - Dungeon List
3C 0C - Dungeon List
Line 149: Line 150:
3C 28 - Starts Personality Quiz
3C 28 - Starts Personality Quiz
3C 29 - Scripting Menu Access
3C 29 - Scripting Menu Access
3C 2B 00 00 XX - Rescue Reward X = Item Given
3C 2B 00 00 XX XX - Rescue Reward X = Item Given
3C 2C 00 00 XX - Promised Rescue Reward X = Item Given
3C 2C 00 00 XX XX - Promised Rescue Reward X = Item Given
3C 2D - Team ToolBox A
3C 2D - Team ToolBox A
3C 2E XX XX 00 00 YY YY  - Display Staff Credits Names 00 <= XX <= 1A; YY = Time
3C 2E XX XX 00 00 YY YY  - Display Staff Credits Names 00 <= XX <= 1A; YY = Time
</pre>
</pre>


==[42 00] Stop music abruptly==
==[42] Stop music abruptly==
Immediately cuts out music.
Immediately cuts out music.
<pre>
<pre>
Line 161: Line 162:
</pre>
</pre>


==[43 00] Fade out music==
==[43] Fade out music==
Fades music out.
Fades music out.
<pre>
<pre>
Line 168: Line 169:
</pre>
</pre>


==[44 00] Abruptly play music==
==[44] Abruptly play music==
Stops former song and plays new song.
Stops former song and plays new song.
<pre>
<pre>
Line 175: Line 176:
</pre>
</pre>


==[45 00] Fade in music==
==[45] Fade in music==
Stops former song and fades new song in.
Stops former song and fades new song in.
<pre>
<pre>
Line 183: Line 184:
</pre>
</pre>


==[48 00] Fade out music==
==[48] Fade out music==
Seems to be a duplicate of command [43 00]
Seems to be a duplicate of command [43]


==[4C 00] Play Sound Effect==
==[4C] Play Sound Effect==
Plays a sound effect
Plays a sound effect
<pre>
<pre>
Line 194: Line 195:




==[DB 00] Pause Script Execution==
==[DB] Pause Script Execution==
Indicates a pause to wait before executing the next command.
Indicates a pause to wait before executing the next command.
<pre>
<pre>
Line 201: Line 202:
</pre>
</pre>


==[E8 00] Weird Event Command==
==[E8] 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.
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.
<pre>
<pre>

Revision as of 08:40, 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] 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
        ---  -------------
        04 - Can cause unregistered dialogue script.
	09 - Text Box: invalidity checked underfoot   but there was nothing to be found.
	0B - Text Box: Let's go.
	0C - Talking to pokemon in friend area script.
	0D - Flag Design change script.
	0E - Walks randomly diagonally.
	0F - Like 0E, but disregards laws of physics. Walks over backgrounds.
	11 - Walks in place
	12 - Walks in place and turns.
	13 - Walks in place.
	1C - Player does non ending sleeping animation
	1D,1E,1F - Makes you walk randomly in four basic directions.
	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)