Okay, so this is it. You've figured out how to use the EarthBound Text Editor, its basic functions, and the main text control codes. Now you're ready to spice up your text! The following is a listing of control codes used by the EarthBound game engine. As compared to other ROMs, the EB engine is incredibly more flexible, and it allows for a great deal more actual creativity in plot development. I've built this chrestomathy with different sections to focus on the different control codes, fitting each one into different categories based on what they do. Codes are also listed alphanumerically with no variable numbers filled in, with one exception - codes that start with 1F are quite diverse and not all that well-documented or understood, so some have the variable numbers filled. Go ahead, have at it!
Remember, a text block always ends with [02], which signifies... duh, the end of the block. All control codes are isolated by [ ] brackets, so when you want to use one of these, put them around it. If two blocks are next to each other, you don't have to put in closing and opening brackets for them - but it won't matter if you do.
One more thing to keep in mind is arguments. Some codes will accept a range of values as part of them. I have these indicated as "." Don't worry, your font isn't screwing up, I meant to use the character. I have also color coded them to make them stand out. Good luck to you!
Difficulty Classes (DC)
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
|
|
|
|
|
![]() |
Drop down to the next line. It's like pressing ENTER in your word processor. | |
|
![]() |
Clear the text box out. | |
|
![]() |
End of the text block. Only use it when you mean to. Also, the EBTE will sometimes see these in unlisted codes. | |
|
![]() |
Wait for player to push "A," with a blinking arrow. Use this to show the player that there's more text to come. | |
|
![]() |
Wait for player to push "A," without the blinking arrow. | |
|
![]() |
Wait for player to push "A," with a blinking arrow in battle. If you use [03] in battle it only pauses for a moment. | |
|
![]() |
Brief Pause. Fill in the with any hex number from 00 to FF to indicate length. Experiment to get a feel for how long values are. | |
|
|
Base window control code. You should have some experience
before you play with these. Here are the various options:
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|
|
![]() |
This code opens the phone list. | |
|
![]() |
Display stats and stuff.
[1C 01 00]: Current Character - This is mostly used with battle statements and If-Then codes. [1C 01 01]: Player name 1 (Input when Tony calls you in Toto) [1C 01 02]: Player name 2 (Input when you free the Tenda of shyness) [1C 01 03]: Your dog [1C 01 04]: Favorite food [1C 01 05]: Favorite thing [1C 01 06]: Money on hand [1C 01 07]: Money in ATM [1C 01 08]: Char 1 [1C 01 09]: Char 1 level [1C 01 0A]: Char 1 Exp. Points [1C 01 0B]: Char 1 Current HP? [1C 01 0C]: Char 1 Roll HP? [1C 01 0D]: Char 1 Max HP? [1C 01 0E]: Char 1 Current PP? [1C 01 0F]: Char 1 Roll PP? [1C 01 10]: Char 1 Max PP? [1C 01 11]: Char 1 Offense [1C 01 12]: Char 1 Defense |
|
|
![]() |
Display Names
@Hi, my name is [1C 02 0A].[13 02]
[1C 02 00]: Current Character. (Use it in attack text, when
using an item, or such things)
|
|
|
![]() |
Opens the character HP/PP windows. | |
|
![]() |
Display item names. This one gets an average because it requires you to know the Hex number of the item you want to use. To find that, select the item in PK Hack, put the list number into the Windows calculator, and hit Hex. [1C 05 00] indicates an item currently being used. | |
|
![]() |
Town names (used in the teleportation menu in PK Hack.) You
could use the empy slots as a shortcut for phrases you often use!
[1C 06 01]: Onett [1C 06 02]: Twoson [1C 06 03]: Threed [1C 06 04]: Saturn Valley [1C 06 05]: Fourside [1C 06 06]: Winters [1C 06 07]: Summers [1C 06 08]: Scaraba [1C 06 09]: Dalaam [1C 06 0A]: Deep Darkness [1C 06 0B]: Tenda Village [1C 06 0C]: Underworld [1C 06 0D]: (Blank) [1C 06 0E]: Dusty Dunes [1C 06 0F]: (Blank) [1C 06 10]: (Blank) |
|
|
![]() |
Uses special text images.
[1C 08 01]: SMAAASH! [1C 08 02]: You Won! |
|
|
![]() |
In a nutshell, the character or enemy performing the action.
This is for the user of an item, the performer of an attack, the character
defeating an enemy (good for death quotes) and possibly the enemy speaking
a specific start quote. Versatile, isn't it?
Use it like: @[1C 0D] used the [1C 05 CB].[13 02]
|
|
|
![]() |
Like the reverse of 1C 0D, the target of the action. This
is for the target of an item, the recipient of an attack, and the enemy
being defeated... Use it like @[1C 0D] used the [1C 05 CB].[03
00] [1C 0E] said, <Argle bargle morble woosh?>
|
|
|
![]() |
Change to the normal font. Why would you want to do that, you say? Well, because... | |
|
![]() |
Change to the Mr. Saturn font! |
CC | DC | Description |
|
![]() |
Gives character # item # . The item # is in hex, of course, and the character # is the same as the one in the [1C 02 ] list. Also keep in mind you can use character # FF, which indicates either all characters or the first available one. You can also use the byte 00, but I'll explain that later in the conditional modifiers section. |
|
![]() |
Takes an item away from a character in the same form as above. Read the conditional modifiers section for information on how you might make EB check to see if someone has an item. |
|
![]() |
Give money to the party in the amount specified by the two-byte number represented by . Remember, like pointers, you do this backwards. To take 2 dollars away, use 02 00, not 00 02. |
|
![]() |
Take money from the party in the same form as above. |
|
![]() |
Heal the entire party's HP. |
|
![]() |
Restore the entire party's PP. |
|
![]() |
Sets character # 's (Remember, you can use FF) level as level . It automatically calculates all stats and PSI. |
|
![]() |
Adds a character to your party. Again, use the [1C 02 ] list. Anything out of that range can lead to buggy shit. |
|
![]() |
Removes a character from your party as in [1F 11 ]. You probably shouldn't remove people who aren't there. |
|
![]() |
Give player a PSI power. 01 is Teleport a, 02 is Teleport b, 03 is Starstorm a, 04 is Starstorm W. Using characters other than Ness and Poo for these powers (and then only Poo for the Starstorms) does nothing. |
|
![]() |
Make Ness ride a bike. This will only work correctly if nobody is following him, and if he's in his normal street clothes. |
|
![]() |
[0E 01 0D 01 1B 04 1B 00 1B 01 19 05 00 ]: Afflict somebody with status state . An explanation on how to use this correctly can be found here. |
CC | DC | Description |
|
![]() |
This is the basic event flag code. It marks event as having happened. We assume that all event flags are unset at the beginning, but as the game progresses things happen and various flags are set. Most event flags are undocumented; thus, if you come across one and you know without a doubt what it does, TELL US at the PK Hack forum. Here is a list of known ones. |
|
![]() |
This unsets an event flag. |
|
![]() |
This is the base teleport code. Bow down and praise Falcon24 for documenting all the arguments... You should probably close the text window before you do this. |
|
![]() |
This triggers a battle. You should probably close the text window before you do this. A list of battle arguments has been prepared by ROFISH, MrRoboto2040, Tomato, and myself. |
|
![]() |
Call a special event.
[1F 41 01]: Coffee Scene 1 [1F 41 02]: Coffee Scene 2 [1F 41 03]: Register your name (1) [1F 41 04]: Register your name (2) [1F 41 05]: Place after a teleport code to make it fade to white? Sometimes it doesn't work though. [1F 41 07]: Display town map [1F 41 09]: Sound stone [1F 41 0A]: Show the title screen [1F 41 0B]: Show cast of characters [1F 41 0C]: Show credits [1F 41 10]: Sound stone
|
|
![]() |
Putting this after a teleport code makes it do the Phase Distorter back-in-time teleport. |
CC | DC | Description | |||
|
![]() |
Link to address and return to the location of this code once that block resolves itself. Look in the EBTE section for a thorough explanation on how to use this and the next two codes. | |||
|
![]() |
Link to address . The text will stop once that block resolves itself. | |||
|
![]() |
If event flag is set, link to the address . The [06] link works like a [0A] link, in that it does not return to the original text block once the linked block finishes. | |||
|
![]() |
This code is the True/False Pointer. This code, discovered
in Summer 2001, is a very important bit of hex. If you have another
code that sets a true/false flag (they'll all be identified hereafter),
put this there. If that true/false flag is set to FALSE, it will
go to address . Here's an example:
[1D 14 0A 00 00 00 1B 03 00 00 C5 00]@You're rich, kid![03 02] would check to see if you have $10, if you don't, it'll branch to $C50000, if you do, it'll tell you that you're rich. |
|||
|
![]() |
This checks to see if character has item . As always, you can use FF in the character slot to check to see if ANYBODY in the party has one. If you have the item, a "false" flag is set, so the link location in the following [1B 03] needs to go to a location that assumes that you have it. | |||
|
![]() |
Looks to see if you have the specified amount of money. If it's false, a true/false flag totally separate from everything we've known about 'till about is set. Use the T/F Selector above with it. | |||
|
![]() |
This code "selects" the person in position #
in your party. What I mean by that is codes following it that take
a character argument can be given a 00, and they will use whatever character
is selected - like this:
[1C 10 01]@Hi, [1C 02 00].[13 02] If Ness is in the front of the group, it says
But if Ness fainted, and Paula's in front, it says
This trick applies to a lot of other codes as well. |
|||
|
![]() |
This allows for customization based on which party position a specific
character is in.
Let's say we use the same example. [1C 10 01]@Hi, [1C 02 00].[03 0B 01] That's a nice hat.[0B 02] That hairbow is pretty.[13 02] If Ness is in the front of the group, it says
But if Ness fainted, and Paula's in front, it says
Another example would be,
|
|||
|
![]() |
If character is in the party, link to address . Pretty basic compared to these others. | |||
|
![]() |
This is the number chooser code. The indicates how many digits you can select with - though anything over 6 or 7 will not work or something. If the next code uses a 00 argument, they'll use the number you input. Like, [1F 52 03 1B 04 1C 05 00 03 02] will print the name of the item you choose. It's three digits long because of the number you input is in decimal form, not Hex. | |||
|
![]() |
This link goes to address
if a character or monster performing an action is also the target of the
same action. This is used in food like so:
[1D 20 1B 03 AB 7B C9 00 01]@[1C 0D] took[00] the [1C 05 00] out and[03 00]@[1C 0E] ate it.[03 02] That translates to two different possibilities: Let's say Ness just gave Poo a bowl of rice gruel.
|
|||
|
![]() |
[03 18 04 1C 04 1A 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 1D 0D 00 01 02 1B 01 1B 04] This will open a party window like you see in the hospital, showing the names of all living party members. As before, you can use the 00 argument for following character codes to do all sorts of groovy stuff! |
CC | DC | Description |
|
![]() |
This makes the character selected disappear. It will remain invisible until... |
|
![]() |
...you use this code to make a character reappear. |
|
![]() |
This code makes the selected character or sprite face in the direction
indicated by . The if you use a character
and not a sprite, make the second byte in the code a 00. Here is
a list of acceptable numbers.
[1F E4 01]: Up [1F E4 03]: right [1F E4 05]: down [1F E4 07]: left [1F E4 09]: diagonal up right [1F E4 0A]: diagonal down left [1F E4 0B]: diagonal down left [1F E4 0C]: diagonal up left There are other values but they just repeat. Thanks to flynman for this info! |
|
![]() |
Using this makes Captain Strong's walkie talkie appear in sprite/character 's hand. It's best if they face down. |
|
![]() |
This gets rid of the walkie talkie - otherwise it floats there with a hand attached to it. Use the same sprite # as before. |
|
![]() |
Change to pallet . This is cool, but sometime's it's just wrong. |
|
![]() |
Cause sprite # to appear. Byte is believed to be movement #, but it's unconfirmed. It's unlikely that the sprites will be documented anytime soon, because there's just so many... :p |
|
![]() |
Basic movement code. This makes a sprite appear (not one using the pointer table, mind you, but simply an image.) and move around the screen. is a two byte sprite number. This is not the same as the other set of two byte sprite numbers. Here is a list of the sprites. is movement number. The movement numbers are mostly undocumened, but we know that some of them have to do with the coordinate system. See, the EB map is one giant map, and the coordinates dictate not only teleports but certain movement codes as well. So if you were to use a particular code that made a walking cow, it might end up 'mooving' right through a wall on its way to Dalaam from Saturn Valley... |
|
![]() |
Cause sprite # to disappear. Byte seems to be the method of disappearing (06 just vanishes, 08 does horizontal lines, and 09 does vertical lines.) |
|
![]() |
Causes sprite to appear around sprite # . A list for this code and [1F 1C] has been compiled by flynman, take a look! |
|
![]() |
Makes a sprite generated by [1F 1A] to vanish. |
|
![]() |
Causes sprite to appear around character #. |
|
![]() |
Makes a sprite generated by [1F 1C] to vanish. |
|
![]() |
looks at , simply. This is a cool little code! |
|
![]() |
An addendum to the above code, I think this might lock 's view on the previously selected sprite. |
CC | DC | Description |
|
![]() |
This is a seperate page on sounds and music. |
|
![]() |
MrAccident figured out a way to access stores from the text! Here is an explanation of how to do it. |
|
![]() |
[1D 09 18 1F 02 0B 08 33 30 C6 00 02]: Phone call! This will take $ from you and open the phone menu. is either 0A or 0B, the former indicating dictation wallet window will open and the latter indicating it won't. You'd probably want to add a [1D 14 ] money checker with a [1B 03 00] true/false pointer to make sure they actually have that money. (The pointer links to a place that says you don't have enough.) |
[Animations] |
![]() |
I discovered a control code that allows you to display battle animations during battle! And again, flynman has risen to the occasion and mapped out the arguments (at least, a practical set of them.) Check it out. |