An Inside Look at Video Game Control Codes!

Besides taking a look at different games and comparing them, from time to time I’d also like to share inside looks at the translation and localization process. Mostly for games, but maybe we’ll occasionally look at other media too.

This time, I want to focus on something known as “control codes”. I use this term a lot in my more in-depth articles, so let’s take a look at what exactly control codes are!

What’s a Control Code?

Well, first off, I guess I should mention that “control codes” can go by a lot of different names, but it’s the term most commonly used among game hackers and fan translators. Other terms I’ve come across are “script codes” or even just sometimes “non-text data”.

Basically, when you’re translating a line in a video game’s script, that line obviously contains text. So you translate it. But sometimes there’s other stuff mixed in with the text that modifies – or “controls” – the text in some way.

For example, some games let you name your character. And when there’s a line of text in the game that references this user-created name, it’s written in the actual script as a “fill-in-the-blanks” type of thing:

Hello, [PLAYER_NAME]! How are you?

When writing or translating a game, this is what a line would look like in the actual script file. But when you’re playing the game, the programming will replace the [PLAYER_NAME] control code with whatever’s supposed to go there. Simple enough, right?

Control Codes in Action

Here’s an example from the start of Bahamut Lagoon:

Captain [name00]!! Shouldn’t you go[cr]over the details once more before we[cr]attack?[end]

As you can see in this example, [name00] is replaced in the game with “Byuu”, which was the name the player chose.

If you look closer, you’ll see that there’s not just a name control code in that line, but some text formatting control codes too. In this particular example, the [cr] code is used for line breaks, and the [end] code denotes the end of a line or scene.

Here’s another example of a text-formatting control code in action. The original Star Ocean had text color control codes that were often used for key words or location names:

[Character 01]:[nl]If only we had the herb at the top of [colour 04]Mt. Metox[colour 02]…[pause][end]

In this example, [nl] denotes a line break, character names have [Character ##] control codes, text color can be changed with the [colour ##] code, and there’s even a [pause] control code that pauses the text until the player presses a button. Already, we can see that control codes can actually control quite a lot of a game’s text and a game’s flow!

Some games have more control codes than others – it depends primarily on the developer and the type of game in question. Some games have almost no control codes, while others have so many control codes that it’s pretty much a nightmare.

For example, MOTHER 2 and EarthBound have EXTREMELY complicated control code systems… They’re so complex, in fact, that I’d call them scripting languages instead. I’d say 90+ percent of the game is done entirely using control codes. It’s insane. Here’s a sample from just a tiny scene!

[GOSUB C69082][FLAGON 00B][1F 41 05][1F EB 03 06][1F 15 03 00 0E 01 01][1F 61][1F E7 03 00][1F F3 03 00 03][DELAY 3C][1F F4 03][LINE][OPENWIN 01]@Ah![DELAY 14] Here’s the problem, and it’s not too tough to fix.[PAUSE][LINE]@Hang on for a second or two…[PAUSE][CLOSEALLWIN][DELAY 1E][1F EA 03 00][1F 61][1F 00 00 B3][1F F1 E2 01 10 01][1F 61][1F E6 E2 01][1F 07 02][DELAY 3C][1F 03][OPENWIN 01]@There![PAUSE][LINE]@That should do it![PAUSE][LINE]@Now, if [GOSUB C91FBA] board,[DELAY 0F] the Sky Runner will take [GOSUB C91FDB][PAUSE][LINE]@back to Winters.[PAUSE][LINE]@With Dr. Andonuts’ help,[DELAY 0F] I can modify the machine to fly to Summers.[PAUSE][LINE]@…If Dad, I mean Dr. Andonuts,[PAUSE][LINE]@is not available, I’ll have to figure it out by myself.[PAUSE][LINE]@Anyway, let’s go back to the lab in Winters.[PAUSE][LINE]@…That’s it…[DELAY 14][LINE] Go, machine,[DELAY 0F] go![PAUSE][CLOSEALLWIN][1F 15 6A 00 0F 01 01][DELAY 01][1F EF 6A 00][1F E8 FF][1F 61][1F EB FF 06][FLAGON 28F][GOSUB C7DD7D][1F ED][1F E5 FF][1F E9 E2 01][1F 61][DELAY 0F][1F 1E E0 01 06][DELAY 5A][1F 15 D1 00 A2 00 FF][1F 15 E6 00 A5 00 FF][1F 21 C2][1F EF E6 00][1F E8 FF][DELAY 01][1F 61][1F ED][1F 15 D1 00 96 00 FF][1F 21 BB][1F EF D1 00][1F 61][1F ED][1F 15 D1 00 9E 00 FF][1F 15 E6 00 A0 00 FF][1F 21 C0][1F EF E6 00][1F 61][1F ED][1F 15 D1 00 97 00 FF][1F 21 BB][1F EF D1 00][1F 61][1F ED][1F 15 D1 00 9A 00 FF][1F 15 E6 00 9C 00 FF][1F 21 BE][1F EF E6 00][1F 61][1F ED][1F 15 D1 00 98 00 FF][1F 21 BB][1F EF D1 00][1F 61][1F ED][1F 15 D1 00 A6 00 FF][1F 21 BA][1F EF D1 00][1F 61][1F ED][FLAGON 26D][1F 21 DA][1F 17 6F 02 A7 00 01][DELAY 64][1F 17 6D 02 A8 00 01][1F 61][FLAGOFF 28F][GOSUB C7DD7D][1F 15 6A 00 A9 00 01][DELAY 01][1F EF 6A 00][1F EC FF 01][1F 61][1F ED][1F E5 FF][1F F1 69 02 8D 00][1F 61][1F E6 67 02][1F E6 69 02][1F E6 6A 02][GOSUB C6CB97][1F F1 6A 02 8E 00][1F 61][1F E6 6A 02][GOSUB C6CC31][1F F1 6A 02 90 00][1F 61][1F F1 69 02 8F 00][1F 61][19 26 06][FLAGOFF 26D][FLAGOFF 2EC][FLAGOFF 030][FLAGOFF 305][FLAGON 276][FLAGOFF 00B][1F 41 06][1F E8 FF][END]

The game’s complex control code system is a big reason why so few translations into other languages exist. It’s also why my MOTHER 1+2 translation patch doesn’t really do much to the MOTHER 2 side of things.

Anyway, as a translator, it’s important to translate everything properly while avoiding as many typos and such as possible. On top of that, though, you have the added pressure of not screwing up any control codes. The bigger the script, the easier it is to mess up something on accident. And, worst of all, if you do mess something up it won’t be obvious until after your project is long finished!

Control Codes Gone Wild!

It’s not uncommon to see control code mistakes in official game releases. In Final Fantasy IV for the Game Boy Advance, for example, someone on the localization team accidentally used the control code for Kain’s name instead of Cid in one line, which changes things quite a bit when you think about it:

The original translation had a control code goof of its own, again relating to Kain!

In this scene near the end of the game, Kain’s name is accidentally used instead of Cecil. This is especially jarring since Kain not only isn’t in the party at the time, he’s actually on the bad guys’ side!

Good ol’ Breath of Fire 2 is infamous for its wacky translation job. It commits every mistake in the book, including control code problems!

In this instance, I’m guessing the translator simply forgot to put brackets or whatever around Nina’s name control code:

I don’t know what it is about Final Fantasy IV that results in so many control code problems, but here’s another infamous one among Spanish-speaking fans:

In this case, it looks like the translator didn’t include the first bracket and/or parenthesis, which made the game think the stuff inside was normal text rather than a control code.

So, that’s a quick look at control codes, what they do, and the problems translators face when dealing with mountains of text. In future updates I’d like to cover other topics of this nature, like script formats, translation tools, super-tricky typos, constantly-changing source files, deadline woes, and more.

For now, though, if you know of any other control code mistakes in games, share them here! I’d like to create a page showcasing some of the funnier ones someday 😀

Get the Very First Legends of Localization Book!

My very first Legends of Localization book is now on sale! Check it out!

This book covers the original The Legend of Zelda and includes tons of new content, updated info, and more! It features a hardback cover, 208 full-color pages, a reversible book obi, a localization survey card, and many extras!

Whether you're a fan of the Zelda series, a fan of Legends of Localization, a retro gamer, or even just an aspiring translator / localizer, this book is for you!

Related Reading

Read more articles »


    1. Oh my god, I’m not the only one who noticed this one? I remember seeing someone in the game say “Vinceum” and it took me a minute until I figured out what exactly was going on there…

  1. The playable epilogue in Lunar 2: Eternal Blue Complete has a few instances of showing the wrong character portraits in dialogue boxes, leading to the images of Ruby and Hiro directly addressing THEMSELVES.

    “Do you remember the first time we found this room, Ruby? We were so green!” says Ruby.

    And later…

    “Ha! Look, Hiro! We did it! Now we can get inside!” says Hiro.

    1. Oh, hey, LunarNET’s screenshots are back up.

      First instance:

      This conversation actually goes on for several more text boxes, with Ruby eventually responding to stuff Hiro is supposed to be saying. I actually genuinely don’t know at what point the the speaker stops being mistake-Ruby and starts being actual-Ruby.

      Second instance:

      Straightforward mistake. The response ( was probably supposed to be Hiro’s line, but that’s unknowable for certain.

      1. Ooh, cool, thanks! It’s been a good 10+ years since I played that myself, so I don’t remember much at all. That looks like a goofy, confusing mix-up though!

  2. Wow, really interesting stuff!! Mother 2 gave me a headache just looking at it though… was Mother 3 just as complicated, or even more so?

    1. Mother 3 was pretty normal and standard for the most part. I think it might’ve been because it was developed by a completely different team that handled the game’s design/implementation with a totally different approach.

  3. Alright, WHY does EarthBound have that many those flags? I know that certain flags are required for ellipse delays and certain word-scroll timing and maybe the Mr. Saturn font, but boy that’s a lot of hexadecimal numbers. Is this the same deal in MOTHER 2?

      1. From what I understand, the cutscene animations in EarthBound are handled by the control codes within it’s text script. That is why Mato refers to EB’s control codes as a script language, and it also explains why there are so many control codes in that scene.

    1. Yeah, Mother 2 has crazy codes too. They’re slightly different from EarthBound’s for some reason, but I’m not sure why. That’s a big reason why you can’t just plop EarthBound’s script into the Mother 2 ROM and have anything work.

      EarthBound still has a lot of unknown/undocumented codes so there are a zillion different lists out there, but here’s a look at a bunch of the game’s control codes:

  4. Here’s some fun from Duel Savior.


    @v declares a voice file (looks for a file name in either of the voice packs, there’s a seperate @s I believe for sounds)
    @t forces text display speed. ms I think.
    @h I honestly forget. I think it may be a hold (no input allowed)
    @w is an output delay wait.
    @g declares one of their text special emoticons.
    ^ are post processing that I added so it could linebreak accurately.

    And my favorite line from Romanesque’s script:

    @balloon id=”一同” ,z=Front ,x=114 ,y=116 ,w=450 ,h=230 ,shape=Cloud ,tail=None ,effect=Tap ,voice=”orivia20042_mix.ogg,orga20025_mix.ogg,cons20017_mix.ogg,sepha20004_mix.ogg,tillet20014_mix.ogg,tupi20000_mix.ogg,domino20249.ogg, fianna20021_mix.ogg,mariella20051_mix.ogg,rosetta20013_mix.ogg”

    1. (I tried to make it look better somewhat)

      That scripting language looks pretty interesting and like you could do a lot with it. But oh god I’d be scared of accidentally messing something up and then I’d never ever know until a year later 😯

  5. I like how you used a screenshot from Byuu. Did he work on the Bahamut Lagoon translation? That guy’s a genius. bsnes/higan is a work of genius. And art!

    1. Actually, Byuu is the default name of the character in Bahamut Lagoon, and it’s partly where bsnes byuu got his name.

      But I totally agree, he’s a crazy genius!

    2. He worked on his own unfinished translation patch.
      Though he recently said he’d still like to finish it because he doesn’t like to give up on stuff, regardless of anyone else’s opinion. 🙂

      1. Thirded. I’ve found a number of interesting tidbits from even the original BoF translation in my own attempts at retranslating that game, and since the second game’s translation quality was visibly worse, I’d be interested to see what might be hiding under its surface.

  6. I read a Let’s Play of Mega Man Battle Network 4 and it was full of moments with wrong portraits.

    Then again the game had dozens of typos and TWO different game-breaking bugs, one outright made the GAME unusable. Makes portraits fails look okay in comparison :p.

  7. In Mega Man 7, the ending has Mega Man about to shoot and kill Wily. Wily tells Mega Man that a robot cannot kill a human according to the laws of robotics. In the Japanese version, Mega Man hesitates with a “…”, but in the English version, he says “I am more than a robot! Die Wily!”. The reason I bring it up here is that the text crawls reeeaaallly slowly during this line. It must be because the control code for text speed is still set to a slow speed to match the original “…” line.

    1. Oh man, what is it about these Mega Man games that causes so much trouble? In fact, it sounds like it’s a regular problem with Capcom games in general now that I think about it…

      1. There’s something worse in the latest Harvest Moon 3DS game. If you are just acquaintances with the Harvest Goddess, and you talk to her on your birthday, you get this:

        “Happy b”

        And, due to the script not being read, she says this with a straight, generic face.

        When I came across it, I cracked up laughing. I had gotten jack squat for my in-game birthday that year, and to top it off the script wasn’t even being properly coded.

        If you search up that line of dialogue on Google, you can see what some other people had to say about it.

  8. For the Nintendo DS, there’s SNK vs. Capcom: Card Fighter’s DS. There are some typos and false information, but I recall seeing a cutscene where a character named Miyuki (I think that was her name, I can’t remember) who would mention the name of her deck, and in one cutscene, instead of the name of the deck, it said [deck_name]. That’s just one of many mistakes with the script. Someone was really lazy when it came to translating that game.

  9. The Harvest Moon series has a decent number of control code mistakes in it. One game that has an awful lot of them is the Game Boy Advance installment, Friends of Mineral Town–especially its updated rerelease, More Friends of Mineral Town. Now, a quick primer for those unfamiliar with the series: Friends of Mineral Town only has a male player character, but the HM series is very popular with women. So they released an update version of the game with a female PC, and whereas the male character in the original game can romance and marry the town’s single ladies, the female PC in the second game can go after the town’s eligible bachelors. You follow so far? Well, in the game, you can receive letters from people in town. In the “girl version,” some of those letters were copy-and-pasted from the male version of the game–so not only does the male Player’s control code slip through, one letter you can possibly receive, if you marry a certain character, actually references your WIFE and refers to a female character instead of your male husband! Whoops! The game also had connectivity with a GameCube Harvest Moon game, but that didn’t seem to work properly either, and segments that were meant to refer to the name of your character in the GC version are bugged and often display either control garble or blank text. 😛

    Even the recent games have a few… issues. The most recent 3DS game (A Tale of Two Towns) has a bad one if you try to talk to a specific character on your birthday. The control code for formatting her face sprite slips into the text box! So instead of saying “Happy birthday!” to you with a “cheerful” face sprite, she has a neutral face sprite and the code telling her to show a “cheerful” sprite slips into her birthday message.

  10. When I play Final Fantasy VII, I usually rename Aeris to Aerith, since that’s her official name in all the newer material. However, at some points, the name “Aeris” pops up, since apparently the name was hardcoded into the script instead of using the corresponding control code.

    I should note that sometimes I play the (horrible) English translation and sometimes I play the (horrible) German translation (which seems to be based on the horrible English translation as well), but I don’t remember if the error exists in both translations or only in one of them.

  11. What fascinates me the most with control codes is the simple line break one: The games that do or don’t do automatic line breaking are sometimes really not those you’d expect!

    Also, games that don’t do it are probably very annoying to translate. That’s a leaky abstraction that shows you how constrained you are by the text boxes.

  12. Control codes are both your best friend and your worst enemy. Especially when they’re written in a lower-level script (i.e. closer to computer code, like a lot of the binhex codes shown above from Earthbound) I’m doing some indy game development, and I misstyped a control-code in the FIRST AREA, and it was months later, after myself and more than a few testers had gone over MANY areas with a fine-toothed-comb, that someone actually caught the error because it was a dialogue that only happened if several non-optimal conditions were met.

    While I may still laugh at some of these slips in official games, some programmer at their HQ is crying and I know that pain. I’ll never look at these errors quite the same way again…

    Also off-topic, but, if you read this Tom/Clyde: Awesome site and awesome work, one more proverbial thumbs-up for you! 🙂

  13. The joys of control codes. I have been researching the ones in gyakuten kenji 2 and there sure are a lot of them, more than two hundred in fact! The fun comes when you realize that all they are is a number. No textual description. But at least they were nice enough to use the unicode private use area for them. Of course, the entire script, and only the script, was xor scrambled with a two byte key…

  14. I don’t remember where, but I recall there being a sign somewhere in the overworld of Alundra where the text screws up somehow when you read it.


Post a Comment

Your email is kept private. Required fields are marked *