< Back to the tutorial index

Two steps to changing out a text string: finding the relevant string in one of the game's locale files, and then editing it. You can also define new text strings if you've added new sections, guitars, chart authors, and the like to your disc.

Locale files

GH2 looks in DTAs that are designated as locale files for text strings. In the vanilla game, all of the game's strings were in a single file, ui/eng/locale.dta. In Guitar Hero II Deluxe 2.0, we instead split this file up into several locale files in that same folder. The scripts the game looks in for strings are listed in config/gh2.dta:

(locale ../ui/eng/locale_milo.dta ../ui/eng/locale.dta ../ui/eng/locale_authors.dta ../ui/eng/locale_career.dta ../ui/eng/locale_chars.dta ../ui/eng/locale_guitars.dta ../ui/eng/locale_loading.dta ../ui/eng/locale_mc.dta ../ui/eng/locale_newspaper.dta ../ui/eng/locale_sections.dta  ../ui/eng/locale_shop.dta ../ui/eng/locale_tiers.dta ../ui/eng/locale_tutorials.dta ../ui/eng/locale_venues.dta)

Of course, what you see in the name is what'll be in the file. The only less obvious one is locale_milo.dta, which stores our custom strings for note streaks and easter eggs. In vanilla GH2, it's a blank file, but still perfectly usable for whatever you'd like to store in it. In any case, load up one of these files in your text editor.

Editing strings

A text string looks like this:

(splash_anybutton "PRESS ANY BUTTON TO BEGIN")

Type literally anything you want in between the quotes. Anything. For many screens, the game will intelligently resize the text to fit in a "bounding box" on-screen. Still, long text gets really small, so keep things around the same length as the original string.

The splash screen with the copyright text changed
You can even blank out strings if you don't want them to appear, fun fact.

Rebuild your ARK and rebuild your disc. The text will be changed to whatever you want it to be.

If you'd like to break to a new line for some reason (like in the career finale screens), use \n where you want the line break to be. Similarly, if you want to insert literal quotation marks into a string of text, use /q.

(splash_legal "FOR MILOHAX'S EYES ONLY.\n\nIF LEAKED, CALL ATTENDANT.")

Adding strings

You can also add new strings by adding a new array in a locale file. If you're not familiar with arrays, go ahead and read my introduction to Data Array, but in short, arrays use parentheses and have items separated by a space each. The first item in a locale string is the shortname, or the string name the game will replace with the string itself, and the second item is the string literal in quotes.

Without a string to go with the shortname, the game will either display the shortname literally (which is ugly) or outright crash for certain strings (which is bad). So, if in my custom chart, I had a section name called epic_gtr_solo, the game would display that literally unless I were to add a matching string to a locale file.

Shortname with no matching string

This is as easy as opening up ui/eng/locale_sections.dta and at the bottom of the file, adding one new line:

(epic_gtr_solo "Epic guitar solo!!!")

And now, in-game:

Brand new string!

Clear as mud?

A warning on text encodings

One thing you should be aware of is that the text encoding of the locale file very much matters. Text editors these days like to save files as UTF-8 when you're not looking (as they should), but GH2 wants to read its strings in ANSI format. Most of the time, you won't notice a difference, but if you start getting accented characters appearing wrong (like the infamous Matley Crae glitch), your locale file has the wrong character encoding. Convert it to ANSI in your text editor, however yours does that.

(Why does this happen? In short, text encodings are gigantic tables that translate strings of bits into recognizable characters to our eyes. For the most basic characters, A-Z, 0-9, text encodings all agree and match one another. For fancier characters, especially symbols and accented letters, they very much do not.)

Adding new locale files

You can define new locale scripts for further granularity. Simply make a new DTA in ui/eng/ and add its path to the (locale) array in gh2.dta. Remember that the file needs to be saved with an ANSI file encoding, not UTF-8, or accents and fancier characters won't display right in-game.

Be careful—if you list a locale file that doesn't actually exist in the ARK, debug won't boot and you'll get TLB misses in PCSX2 with the retail executable. (This likely means your disc won't boot on a real PS2 either.)

< Back to the tutorial index

Advertisement