Back to the Main Page

Main Database - All the PK Hack knowledge you could ever want!

Download programs and tools

Learn from the hackers!

An introduction to the PK Hack community

Find out how to do some hacking of your own!

Download IRC scripts and learn how to chat with us!

PK Hack Message Board, hosted by Starmen.Net

Link us!


The Control Code Chrestomathy

   Welcome. I'm not going to repeat myself too much here - if you haven't yet, go back and read the EB Text System tutorial. You're not going to understand a lot of the stuff in here if you don't. What are you waiting for? Get your butt back there.

...

   Okay, ready? Let's begin. There are five distinct divisions to control codes. They are, in order of general simplicity, Text, Gameplay, Audio, Visual, and Logic. Control codes are grouped and listed alphanumerically according to this format. Click on any code for an in-depth description and a coding example. (Thanks to MrTenda for the Javascript.)

If you wish to download this you will want all these CCs in one file. Unforunately, this collection is rather out of date, and in-depth descriptions of the more recently discovered code have not been written, but short descriptions can be found in codelist.txt. People working on discovering what unknown CCs do may also be interested in the list of all CCs.

Text Control Codes

[00]: A standard text line break.
[01]: Erases all the text in the current window.
[02]: Ends the current text block.
[03]: Pauses the text, prompting the player to press A. Effect in battle text depends on in-game text speed setting.
[10 XX]: Pauses the text for a period of time marked by XX.
[12]: Clears out the current line of text.
[13]: Pauses the text, waiting for the player to press A.
[14]: Pauses the text, prompting the player to press A.
[18 XX YY]: Controls text windows. Extreme variety of options.
[1A 0A]: Opens the phone number selection window.
[1C 01 XX]: Displays player names and statistics.
[1C 02 XX]: Displays character names.
[1C 04]: Opens the character HP/PP status windows.
[1C 05 XX]: Displays item names as stored in the game's data.
[1C 06 XX]: Displays teleport destination names as stored in the game's data.
[1C 08 XX]: Displays special text graphics.
[1C 0D]: Displays the name of the character or enemy currently performing an action.
[1C 0E]: Displays the name of the character or enemy currently targeted by an action.
[1F 30]: Changes from normal text to Mr. Saturn font.
[1F 31]: Changes from Mr. Saturn font to normal text.

Gameplay Control Codes

[0E 01 0D 01 1B 04 1B 00 1B 01 19 05 00 XX XX]: : Afflict a character with status state XX XX.
[1D 01 XX YY]: Remove item YY from character XX's inventory.
[1D 06 XX XX XX]: Adds XX XX XX dollars to the amount stored in the player's ATM account. (In the game, not in real life... )
[1D 08 XX XX]: Adds XX XX dollars to the amount stored in the player's wallet. (See note above.)
[1D 09 XX XX]: Removes XX XX dollars from the amount stored in the player's wallet. (Do I even have to say it this time?)
[1D 0E XX YY]: Adds item YY to character XX's inventory.
[1E XX YY ZZ]: Modifies character health and statistics.
[1F 11 XX]: Adds character XX to the character party.
[1F 12 XX]: Removes character XX from the character party.
[1F 20 XX YY]: Teleports the party á la PSI Teleport, using the data therein.
[1F 21 XX]: Teleports the party as defined in the 1F 21 data table.
[1F 23 XX XX]: Triggers a battle sequence.
[1F 41 XX]: Calls a special event.
[1F 50]: Completely stops all activity and permanently blocks player activity.
[1F 71 XX YY]: Character XX realizes a PSI power.
[1F B0]: Saves the game to the save slot chosen when the game began.
[1F E5 FF]: Locks out player control until the end of the text block.
[1F F0 02]: Activates the Bicycle.

Audio Control Codes

[1F 00 00 XX]: Plays a background audio track.
[1F 01 02]: Disables background music within all adjacent map areas of the same music.
[1F 02 XX]: Plays a sound effect.
[1F 03]: Returns music settings to the current location's default.
[1F 07 XX]: Applies an effect to the currently playing background music.

Visual Control Codes

[19 22 XX XX YY YY 1F 13 XX XX]: Changes the facing direction of character XX XX to "look at" TPT entry YY YY.
[19 23 XX XX YY YY 1F 16 XX XX]: Changes the facing direction of TPT entry XX XX to "look at" TPT entry YY YY.
[1C 13 XX YY]: Displays a battle animation effect (only works in battle).
[1F 15 XX XX YY YY ZZ]: Generates sprite XX XX and moves it according to advanced movement function YY YY.
[1F 17 XX XX YY ZZ ZZ]: Generates TPT entry XX XX. The code has unknown location-specific properties.
[1F 1A XX XX YY]: Generates a small sprite image near TPT entry XX XX.
[1F 1B YY]: Deletes a sprite image generated by [1F 1A].
[1F 1C XX YY]: Generates a small sprite image near character XX.
[1F 1D YY]: Deletes a sprite image generated by [1F 1C].
[1F 1E XX XX YY]: Causes TPT sprite XX XX to disappear.
[1F 1F XX XX YY]: Deletes a sprite image as generated by [1F 15].
[1F 61]: Movement code actuator. Triggers all movement codes placed before it simultaneously.
[1F E1 XX XX YY]: Changes the current map color pallet.
[1F E4 XX XX YY]: Changes the facing direction of character or TPT entry XX XX.
[1F EB XX YY]: Causes character XX to disappear.
[1F EC XX YY]: Causes character XX to reappear.
[1F F1 XX XX YY]: Changes the movement pattern of TPT entry XX XX.
[1F F2 XX XX YY]: Changes the movement pattern of sprite XX XX.
[1F F3 XX XX 02]: Generates a sprite image near character or TPT entry XX XX's hand.
[1F F4 02]: Deletes a sprite image generated by [1F F3].

Logic Control Codes

[04 XX XX]: Sets an event flag.
[05 XX XX]: Unsets an event flag.
[06 XX XX YY YY YY 00]: If-event pointer.
[07 XX XX]: Sets the true/false flag based on the set/unset status of event flag XX XX.
[08 XX XX XX 00]: Standard go-and-return text pointer.
[09 XX (YY YY YY 00)]: Multiple-address pointer table.
[0A XX XX XX 00]: Standard go-and-break text pointer.
[0B XX]: It's a secret to everybody. (Set the true/false flag if the current number is XX?)
[19]: Generates a selection menu. Used with [09].
[1B 02 XX XX XX 00]: If-true pointer.
[1B 03 XX XX XX 00]: If-false pointer.
[1B 04]: Variable preparer. "Grabs" a number currently in memory to use with variable-dependant control codes.
[1C 10 XX]: Targets the character in position XX in the party.
[1D 03 XX]: Sets a true/false flag depending on whether character XX's inventory is full or not.
[1D 05 XX YY]: Sets a false flag if character XX has item YY. (Sets to true if YY is not in the inventory.)
[1D 0D XX XX YY]: Sets a true/false flag depending on if character YY has status ailment XX XX.
[1D 14 XX XX XX XX]: Sets a true/false flag depending on whether the player has the coded amount of money.
[1D 17 XX XX XX XX]: Sets a true flag if the player's ATM account has the coded amount of money, or more. (Sets to false if less.)
[1D 20]: Sets a true flag if the character or monster performing the current action is the target of the said action.
[1D 21 XX]: Generates a random number between 0 and XX.
[1F 52 XX]: Generates a number selector like that of the ATM.
[1F 63 XX XX XX 00]: If-door pointer.
[1F 66 XX YY ZZ ZZ ZZ 00]: Hotspot activation pointer.
[1F 67 XX]: Hotspot deactivator.