Text Format

From CloudModding OoT Wiki
Jump to: navigation, search

Overview

Text that appears in textboxes is stored within *_message_data_static files, where * represents one of the 4 (possibly 5 if we ever get to analyze the iQue version) languages that the N64 version of Ocarina of Time was written in/translated into. Since NTSC and PAL support different languages, the *_message_data_static files found within them are different, as seen below.

Region Language Textbank Files Font
NTSC Japanese jpn_message_data_static jpn_font_static
English nes_message_data_static nes_font_static
PAL English nes_message_data_static
German ger_message_data_static
French fra_message_data_static

Excluding textbox codes, the Japanese message_data_static file is encoded in Shift-JIS, while the English, German, and French message_data_static files are encoded in the ASCII subset of Shift-JIS. This makes it easy to perform simple edits in a hex editor, even in compressed ROMs since message_data_static files aren't compressed.

The only difference from standard US-ASCII is "\" is replaced by "¥".

Message Entry Table

code (File)
Textbox Message Table
VersionOffsetVRomVRam
Debug12E4C000BC24C000BCA9048014B32080153764
NTSC 1.00F98AC00B808AC?8010A94C?
NTSC 1.1?00B80A6C???
NTSC 1.2?00B8091C???
PAL 1.0?00B801DC???
PAL 1.1?00B8021C???
NTSC GCN?00B7EFAC???
PAL MQ0F68F000B7E8F0?801077F0?

The message entry table breaks down the message_data_static files into dialogs. NTSC releases have a slightly different table format than PAL (Debug Rom) releases because of the different supported languages.

Region Format Languages
NTSC iiii xy00 ssoo oooo Japanese, English entries
PAL iiii xy00 ssoo oooo English entries
PAL ssoo oooo German, French entries
  • i = Message Id. This is the two byte number addressed by actors. 0xFFFC contains a character set used for the Title Screen's "PRESS START" and "NO CONTROLLER" logos, as well as the File Select screen. 0xFFFD marks the end offset of the last valid text box. 0xFFFF marks the end of the table for that language
  • x = Text box type
  • y = Text box y position
  • s = Segment Id. 07 for English/German/French text banks, 08 for Japanese
  • o = Message offset, relative to the start of the text bank file (*_message_data_static)

Notes

In NTSC versions, only the Japanese message entry table contains data for Message Id 0xFFFC.
In PAL versions, only the English message entry table contains data for Message ID 0xFFFC.

The start and end segment address for message Id 0xFFFC is hardcoded within a function that loads the "File Select" character set.

In NTSC versions, the Japanese entries are listed one after another until id 0xFFFF is encountered, then is followed with the English entries.
In PAL version, the English entries are listed first and use the same format as NTSC, but the the German and French tables that follow (in that order) afterwards simply list the bank/offset addresses for each message. This means two things:

  • Changing the textbox settings for the English table in PAL will change the settings for the other two languages (if you wanted to support multiple languages)
  • The NTSC Japanese/English and PAL's English/German/French tables end up being the same size

Message Id

Main article: Text Ids

Text box types

0 = Black box
1 = Wooden box
2 = Blue box
3 = Ocarina input box
4 = No box
5 = No box, default text color is black
6-F = No box

Text box position values

0 = Top/bottom screen (maybe influenced by view angle)
1 = Top screen
2 = Middle screen
3 = Bottom screen

Notes

  • The message offset should NOT be pointing to a 00 (null) byte, as it would freeze the game. It must point to a valid character or text control code.
  • Message length is determined by looking at the address of the next message. If the following address is equal to the current address, the game will softlock when the message should be displayed. If the following address is less than the current address, the game will freeze (information by DeathBasket).
  • Invalid Message IDs seem to result in the first message (0001: obtaining the Pocket Egg) being called up instead

Text Format

This information is only fully valid for Ocarina of Time. Majora's Mask has its own format.

Also note that only Japanese text has its own codes and values; other languages share a common set.

Code JP Code Description
01 000A Line Break.
02 8170 End Marker.
04 81A5 Box Break; begin next message box.
05 xx 000B 0Cxx Color the following text with color xx.
06 xx 86C7 00xx Shift text that follows it x pixels to the right.
07 xx xx 81CB xxxx Go to (follow up with) Message ID xxxx.
08 8189 Enable instantaneous text.
09 818A Disable instantaneous text.
0A 86C8 Keep message box opened; no reaction to buttons. Used in shop item descriptions.
0B 819F Trigger an event? Used in minigame text, shop text, sidequest text, fairy fountains, and when being rewarded by uncursed skulltulas, among others. Used to indicate receiving something, perhaps? Appears to always occur before 02 (End Marker).
0C xx 81A3 00xx Box Break with delay; wait xx visual frames before next message box.
0D  ???? (Unused?) Wait for button press, continue in same box or line.
0E xx 819E 00xx Fade out after waiting xx visual frames?
0F 874F Print the player's name.
10 81F0 Initialize Ocarina playing.
11  ???? (Unused?) Fade out and wait; ignore following text.
12 xxxx 81F3 xxxx Play sound effect xxxx.
13 xx 819A 00xx Display icon xx.
14 xx 86C9 00xx Set text speed to xx. (Delay printing each character by xx frames.)
15 xx xx xx 86B3 00xx xxxx Set message background to xxxxxx. Values unknown.
16 8791 Print Marathon time.
17 8792 Print Race time.
18 879B Print number of points.
19 86A3 Print number of Gold Skulltulas collected.
1A 8199 Prevent the following text from being skipped by the B button.
1B 81BC Initialize a two-choice selection.
1C 81B8 Initialize a three-choice selection.
1D 86A4 Print the length (Japanese only) or weight of the caught fish.
1E xx 869F 00xx Print various highscore values.
1F 81A1 Print the in-game world time.

Special Characters

Code JP Code Character
7F n/a
80 n/a À
81 n/a Î
82 n/a Â
83 n/a Ä
84 n/a Ç
85 n/a È
86 n/a É
87 n/a Ê
88 n/a Ë
89 n/a Ï
8A n/a Ô
8B n/a Ö
8C n/a Ù
8D n/a Û
8E n/a Ü
8F n/a ß
90 n/a à
91 n/a á
92 n/a â
93 n/a ä
94 n/a ç
95 n/a è
96 n/a é
97 n/a ê
98 n/a ë
99 n/a ï
9A n/a ô
9B n/a ö
9C n/a ù
9D n/a û
9E n/a ü
9F 839F [A] Button Icon.
A0 83A0 [B] Button Icon.
A1 83A1 [C] Button Icon.
A2 83A2 [L] Button Icon.
A3 83A3 [R] Button Icon.
A4 83A4 [Z] Button Icon.
A5 83A5 [C Up] Button Icon.
A6 83A6 [C Down] Button Icon.
A7 83A7 [C Left] Button Icon.
A8 83A8 [C Right] Button Icon.
A9 83A9 Triangle: ▼.

Used in Z-targeting description.

AA 83AA [Control Stick] Icon.
AB 83AB [D-Pad] Icon. Unused.

Color Values

Value JP Value Regular Color Wooden Color
40 00 White #FFFFFF White #FFFFFF
41 01 Red #FF3C3C Orange #FF7800
42 02 Green #46FF50 Green #46FF50
43 03 Blue #505AFF Blue #506EFF
44 04 Light Blue #64B4FF Light Blue #5AB4FF
45 05 Pink #FF96B4 Purple #D264FF
46 06 Yellow #E1FF32 Yellow #FFFF1E
47 07 Black #000000 Black #000000

Sound Values

Can take the value of any sound effect ID. These values are used in-game:

Value Description
28DF Cow mooing
28E3 Frog ribbit sound
28E4 Frog ribbit sound
3880 Deku squeak
3882 Deku cry
38EC Poe laugh
4807 Changes text box to blue (?)
5965 Nabooru's scream
6844 Navi hello
6852 Talon Ehh?
6855 Carpenter WAAAAA!
685F Navi HEY!
6863 Saria giggle
6867 YAAAAAAA!
6869 Zelda heh
686B Zelda awww
686C Zelda huh
686D Generic giggle

Values documented by OriginalLink and petrie911.

Highscore Values

Value Description
00 Horseback Archery Score
01 Poe Points
02 Largest Fish
03 Horse Race Time
04 Marathon Time
06 Dampé Race Time

Miscellaneous

JP: 8440: Hylian character set (~48 characters)

Non-JP: 00 is used as padding after an end marker; both 00 and 03 yield garbage when used in a message.