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
m (→‎[E8 00] Weird Event Command: a few more events)
(Added 3C)
Line 116: Line 116:
Y = Pokepic/Speaker ID
Y = Pokepic/Speaker ID
Z = Pointer to text
Z = Pointer to text
</pre>
==[3C] Special Dialogue==
3C needs an extra argument in the second byte. It is responsible for some dialogue events.
<pre>
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 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 0B,0C - Friend Area 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 - Rescue Reward X = Item Given
3C 2C 00 00 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
</pre>
</pre>



Revision as of 20:56, 13 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 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

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 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

[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,05 00 00 00 00 00 00 00 00 00 00 XX XX XX XX - 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 - B Menu
3C 0B,0C - Friend Area 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 - Rescue Reward X = Item Given
3C 2C 00 00 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 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
        ---  -------------
        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)