Skip to content

Tutorial: Translating EarthBound

mrtenda edited this page Apr 21, 2015 · 8 revisions

Translating EarthBound

This guide aims to help anyone who would like to translate EarthBound into another language, dialect, or even create an alternative English version of EarthBound by following these steps:

  • Translate the main game text
  • Translate items and enemies
  • Translate and adjust menus
  • Translate/Modify game sprites
  • Translate/Modify game map tiles
  • Modify game fonts
  • Export and Modify compressed graphics

If any of that sounds confusing or difficult, don't worry! I'll do my best to describe each process in detail, and I'm available to help anyone who may have any questions about how to translate EarthBound, and there are a ton of great people who can help at the PKHack help thread.

Things to Consider

Before you begin, let me outline some potential problems with translating EarthBound so you can determine whether or not your language will work out.

  • This process currently does not support printing text from Right to Left - This could eventually be fixed someday
  • This process only allows for up to 128 characters TOTAL, including punctuation and formatting characters - As far as I can tell, 128 characters is the absolute limit in EarthBound, though in theory the game could someday support up to 176, it is probably not a simple process, but I will look into it if someone really needs more than 128 characters

Translating the Main Game Text

Getting Started with CoilSnake

The first thing you'll need to do is get CoilSnake setup on your computer. Make sure you at least have CoilSnake 2.1, but I would always recommend downloading the latest. The AWESOME thing about CoilSnake these days is it has CCSript and CCScriptWriter stuff baked right into it, so that's super helpful. Just go to that link, hit the download link, and follow the directions.

Creating your Translation Project

Now that you have CoilSnake, you'll need an EarthBound ROM. I can't tell you how to get one, but they're pretty easy to find. Just ask your pal google and don't click on any questionable ads/links in the process.

  1. Open up CoilSnake and select the Decompile tab
  2. Click on the "Browse..." button next to the ROM: field
  3. Select your EarthBound ROM
  4. Now click on the "Browse" button next to the "Output Directory:" field
  5. Choose where you want to save your translation project (YES, this is where all the files for your translation project will be stored, choose a good place!)
  6. Now press the big "Decompile" button at the bottom
    "Watch a video of these steps":https://youtu.be/qxIq2JK-4Ms

Adding Text to Your Translation Project

Now that we have our base project created, it's time to add all of EarthBound's text to it

  1. Back the project you just made somewhere - This helps if something goes wrong or you want to look at original files at some point
  2. Click on the Decompile Script tab in CoilSnake
  3. Click on the "Browse..." button next to the ROM: field
  4. Select your EarthBound ROM
  5. Now click on the "Browse..." button next to the Project: field and go to the directory of the coilsnake project we created above
  6. Make sure that the path in the Project: field is to the actual folder where all your project files are stored
  7. Now click on the big "Decompile Script" button
    "Watch a video of these steps":http://youtu.be/C6bkgrGB-n8

Another thing you will want to do now is go into your project directory and copy the ccscript folder and back it up somewhere. It contains all of the game text for EarthBound, and having an original copy somewhere will be an invaluable reference in the future.

Congratulations, you now have everything you need to start translating the main game text!

Translating the Main Text

All of the main game text is now located in the ccscript folder in your translation files. If you haven't backed up a copy of this folder I would recommend doing that before you edit it. Having the original English somewhere for reference is a good idea. Just put a copy of it somewhere outside of your project folder.

The ccscript folder now contains ccs files, most of which are data_xx.ccs. Please don't worry about main.ccs, this is a file that allows the game to know where all your translated text is, which means you don't have to worry how long or short your translation is compared to the original English, it's all handled for you. This may sound standard, but back in the day this wasn't the case, and translating EarthBound back then was a PAIN!

In all the data files, you'll notice that it's not just plain text you're looking at. Here are some descriptions of what you're seeing:

  • Normal Text: You can tell if something is normal text if it is surrounded by quotation marks AND doesn't appear between square [ ] or curly { } braces. The Normal Text is really all you need to worry about translating, at least for now. Keep reading to learn more.
  • Labels: labels are what ccscript uses to organize blocks of text. They are a name, followed by a colon, such as l_0xc52d54: You do NOT want to edit these.
  • Control codes: These are hexidecimal values surrounded by square brackets, such as [1C 02 00]. Again, you do NOT want to edit these, they tell the game all kinds of vital instructions. Later on, we will talk about how to move these around and better understand what they do to make your translation perfect.
  • CCScript Commands: These are normal commands that ccscript uses to tell the game what to do. They are usually outside of quotation marks or between curly braces. The most common are linebreak, which tells the game to jump to the next line when printing out text, next, which waits for the player to press a button before going to the next line while printing out text (this shows the little downward arrow prompt), eob, which means the end of a text block, etc. You really don't have to worry about any of them right now, but I would recommend reading about the basic commands "here":http://starmen.net/pkhack/ccscript/Reference.html#2.1.
  • Comments: These occur after forward slashes // or between a /* and a */. They are meant to tell you what is going on in the script and can be left exactly as they are.
  • @: The @ character simply represents the little circle dot that starts at the beginning of most sentences in EarthBound. You can leave these where they are for now

So! Go ahead and open up each of the data files and edit the normal text that appears between the quotation marks, leaving all the labels, control codes, ccscript commands and comments just as they are. To get started, I would recommend translating a line or two. The first line you will probably want to edit will be the line Tracy says to Ness in the very beginning of the game, which can be found in the file data_21.ccs, line 463, just after the label l_0xc66aa4:

A Note on Editing Text

To edit text, you'll need a good text editor. In windows, I would recommend using Notepad++ instead of the default notepad program windows comes with. When using Linux, I personally prefer gedit, but any good text editor you prefer will do fine.

Trying Out Your Translation

Compiling Your ROM

Now that you have edited a line that you can easily find in the game, save your changes and go into CoilSnake once more. Before getting started, you'll need to copy your EarthBound ROM:

  1. Copy your EarthBound ROM and rename it to something like EarthBoundExpanded.smc
  2. Click on the Compile tab in CoilSnake
  3. Click on the "Browse..." button next to the Base ROM field
  4. Find the ROM you renamed to EarthBoundExpanded.smc
  5. Click on "Browse..." next to the Project: field and navigate to your project folder
  6. Click on "Browse..." next to the Output ROM: field and create a new file with whatever name you want
  7. Click on the big "Compile" button
  8. CoilSnake will ask you if you want to expand your ROM. Say yes and it will expand your EarthBoundExpanded rom for you
  9. Now sit back and let the compilation process complete
    "Watch a video of these steps":http://youtu.be/cjVKUQSSkhQ

Now open up the newly created file with an emulator, and you'll be testing out your translation!

A Note on Testing

Verify your translation often by compiling and then running it periodically. This will allow you to catch any errors you may have caused or see if you made any mistakes while translating. If you have any problems, ask a question at the help topic on the PK Hack boards.

A NOTE ON LETTERS

If your language uses characters outside of the 26 letters that English uses you will need to modify the font to support your language's character set. I will go over this in the section "Modifying game fonts". For now, you should do two things: First, test that a simple change that only involves the Roman alphabet works when you compile. Then, go ahead and start translating and using your full language's character set in the ccs files when you translate them. Once you use any character outside of the Roman alphabet (such as ã in Portuguese), your game text will no longer compile, but that's okay. We'll go over how to fix this in the Font section.

Translating Items and Enemies

This is probably one of the simplest steps! All you have to do is edit:

  • enemy_configuration_table.yml
  • item_configuration_table.yml

Simple, right!

Enemy Configuration Table

This file contains information about all the enemies. Each enemy is represented by a number value, followed by all their attributes, such as Name, their Vulnerabilities, Item dropped, etc.

For a translation, there are only TWO attributes you need to change for an enemy:

  • Name
  • Gender

BUT WAIT?! Why would I change an enemy's gender?!

In English, when you use an article to refer to someone or something, you might use something like 'the' or 'a'. Articles in English do not reflect gender. But in other languages, articles can.

If your language DOES reflect gender in an article, then I would change the gender of the enemy to match what an article would indicate. For most enemies that are people, this will likely be the same gender as the individual. But with a lot of the animal, robot, or even abstract enemies, the gender will depend on the NAME. For example, in Portuguese, if I'm referring to a Coil Snake (which is called a Cobra Espiral), the name Cobra Espiral is feminine, and so I set the gender for the Coil Snake to be female. If your language also has neutral reflection in articles or verbs or any other type of word, you can use that as well.

EarthBound supports three gender options:

  • male
  • female
  • neutral

In my translation, since Portuguese doesn't need the neutral form, I used neutral to indicate that the enemy's name is a proper noun. This allows me to provide options in the text to NOT include an article when referring to the enemy.

Modifying Game Fonts

Just a reminder: Make sure you are using at least CoilSnake 2.1 for the following to work.

First off, you are going to need to get a graphics editing program. Photoshop works perfectly, but you can also use the free version of GraphicsGale.

Preparing Your Font Images

The first step to expanding your font is making more space for fonts in your images. Luckily, CoilSnake does this for you! Here are some things to keep in mind:

  • The main three fonts (fonts 0, 1 and 2) are made up of 16 x 16 pixel tiles
  • Font 3 is made up of 8 x 16 pixel tiles
  • Font 4 is made up of 8 x 8 pixel tiles
  • The normal fonts are made up of 6 rows of 16 characters, making a total of 96 characters
  • The credits font doesn't follow this pattern, and we will not be expanding it
  • CoilSnake 2.1 will expand the font images to allow for an additional 32 characters in each of the main fonts (0-4)

Editing Your Fonts:

Okay, so, you're using CoilSnake and your font images all have some extra space on the bottom. Using the information I provided just above, map out where all the tiles are in each of the different images.

This can be done in Photoshop by going to Edit > Preferences > Guides, Grides & Slices

  • Under the Grid section, set Gridline Every: to the size that fits your font
  • For fonts 0, 1, and 2, that's going to be every 16 pixels
  • For fonts 3 and 4, I used every 8 pixels, just remember that font 3 the characters are 16 pixels tall, so two 8 pixel boxes represent a single character
  • Set the color to something easy to see. I usually use red

In GraphicsGale, you can do this by selecting the "Custom Grid" (looks like a grid made up of little white squares) and choosing which grid you want to use.

  • For fonts 0, 1, and 2 I use the 16x16 custom grid
  • For fonts 3 and 4 I use the 8x8 custom grid
  • Remember that font 3 is 8x16, so each character will be 2 8x8 blocks tall, and 1 block wide

Now that you can see where each tile is, edit the tiles with your language's characters. If you plan on using the original 96 characters in EarthBound, simply leave them as they are and draw your new characters in the 32 new font tiles.

You can also edit the entire font if you'd like by filling in all the original characters with the background color and drawing in your own custom font.

The ONLY thing you should remember is that EVERY FONT needs to follow the same pattern. The same position in each of the fonts should all have the same character in them for the sake of consistency.

So... Why do I have to make all the fonts follow the same order?

Not doing so can cause quite a bit of headache, especially because font 0,1, 2 and 3 can be used to display character names, fonts 0 and 1 are going to show item names, and font 4 is going to be used for some UI stuff, mainly headers for some windows in the game. So a lot of these fonts display shared text, and if the order of your characters is different between the fonts you can get some funky results where you aren't expecting them.

There has been a lot of discussion about using portions of the Mr. Saturn font for additional characters. I tried this, and it just didn't work out. Basically I was using the lowercase letters in the Saturn font (because they are identical to the uppercase letters) and re-purposing them for other characters. The problem is, if you go to a Mr. Saturn to sell it an item, it will confirm the item you want to sell using the saturn font. And item names have lowercase letters. So the lowercase letters would all come out as my additional characters and that's ugly.

Additionally, if you have any names for enemies and items that need characters from the Mr. Saturn font, you're out of luck. You cannot use these characters outside of the main game text, so that REALLY limits this option. If after adding 32 new characters you still find you need more space, contact me and we'll try and find a solution for you.

Updating Font Widths

Okay! So you've changed the font! Now you need to update your character widths!

Do this by going into your Fonts folder and opening the font widths file for each of your fonts, such as 0_widths.yml. These files contain the width values for each of the characters in your variable width fonts (Fonts 0, 1, and 2). How do you know your character widths, you ask? Simply look at how wide the character is in pixels and put that value in the corresponding spot in your widths file.

The order in the widths file goes from left to right. The very first tile is usually reserved for the space character (' '), so I would keep that tile blank if your language uses spaces to separate words.

You don't need to worry about adding an extra pixel to your characters to keep them separate, either. EarthBound automatically inserts a single pixel between each character.

Remember

  • AGAIN, every single font needs to follow the same pattern. If you add a character in one spot on one font, that same character needs to be in the same spot in all your other fonts (except for credits, because that one is different)
  • You can replace every single character in the whole font if you need to, allowing you to have up to 128 custom characters for your translation.

Using Your Expanded Fonts

Assuming you haven't changed the original 6 rows of your fonts, you can use them normally.

The expanded area in your text can be used by adding the code for each expanded character.

  • The codes run from b0 until cf
  • The whole font is technically all represented by codes, and the normal font codes run from 50 until af
  • A code will always need to be surrounded by square brackets [ ]

For example, if I wanted to type out "Olá!" using my expanded font, I would first need to check which tile in my font the á character is in:

So! The á character is on the last row. It's in the [c0] spot, so to write Olá!, it would be written like this: Ol[c0]!

So, the codes for each of the characters in the entire font, with the rows and columns corresponding to each tile in your image file, would look like this:

50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F  
60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F  
70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F  
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F  
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F  
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF  
B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF  
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF

The easiest way to do this, or at least the way I did, was to write all the translation normally, and then do a search and replace for each of the special characters in my expanded font. So, in my original ccs files I would have written "Olá!", but then I would have done a find and replace and replaced all occurrences of á with [c0] when I was done.

Please message me with any suggestions you may have for this guide

Clone this wiki locally