From CloudModding OoT Wiki

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 message_data_static kanji
English nes_message_data_static nes_font_static
PAL English nes_message_data_static
German ger_message_data_static
French fra_message_data_static

The encoding of Japanese and non-Japanese text in these files is described below. Since these files are always uncompressed, editing of text can be done in something as basic as a hex editor, though dedicated editors can of course making using various control codes, or writing in non-English languages, easier.

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???
USA GC?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, fixed to bottom of screen, no vertical centering
5 = No box, text shadow is disabled

Note: Text colors are altered for Type 1 and 5

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

There are two known encoding schemes in use: one for Japanese text, and one for all other languages. While neither exactly matches any standard encoding (leaving tool programmers unable to use premade decoders/encoders on text), they're similar enough to existing standards that looking into ASCII and ISO-8859-1 (for non-Japanese text) and Shift-JIS (for Japanese text) serves as a useful starting point for decoding text. Each scheme is described in detail in its own section below.

Japanese Text

Japanese text is encoded in a modified version of Shift-JIS, perhaps Apple's variation of it (known as MacJapanese; see this text file on how to convert between MacJapanese and Unicode codepoints). All but a couple control codes are valid MacJapanese characters, some followed by additional bytes of information for that code. Another noteworthy change is that byte 0x00 is seen as introducing a two byte value, at least for the relevant control codes listed below, instead of being a single-byte character. Control codes are given in the control codes section below, along with their non-Japanese equivalents.

Special Characters

These characters are special modifications of the usual Shift-JIS set to suit the game's needs. These characters are used to give information about controls, and as can be seen replaced the beginning portion of the greek alphabet in Shift-JIS:


Codepoint Shift-JIS Ocarina of Time
839F Α
83A0 Β
83A1 Γ
83A2 Δ L⃞
83A3 Ε R⃞
83A4 Ζ Z⃞
83A5 Η ⯅⃝
83A6 Θ ⯆⃝
83A7 Ι ⯇⃝
83A8 Κ ⯈⃝
83A9 Λ ▼ (Used in Z-targeting description.)
83AA Μ control stick icon
83AB Ν D-Pad icon. (Unused)

Additionally, the hylian character set seen on textures throughout the game is available starting at 8440 (the start of the Cyrillic alphabet in Shift-JIS and derivatives).

Non-Japanese Text

All other languages use a strange combination of existing character sets, along with the needed control codes. The lower half resembles Code page 895, except that the overline is at 0x7F instead. The upper half, however, starts off like the upper graphical portion of ISO-8859-1, except with unneeded characters removed and starting at 0x80 instead (only î appears to be out of order when looked at in this way), followed by OoT-specific UI glyphs.

Control codes are explained in detail, along with their Japanese equivalents, in the control codes section.

_0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _A _B _C _D _E _F
0_ Newline End Text Next Box Color Arbitrary Space Goto Message Start Instant Text End Instant Text Keep Box Open Delegate Control Next Box After Time Wait for Button End With Fade Player Name
1_ Start Ocarina End With Fade? Play SFX Show Icon Text Speed Set Background Marathon Time Race Time Points Gold Skulltulas Can't Skip Two Choices Three Choices Fish Weight Show Score World Time
2_ Space
20
!
21
"
22
#
23
$
24
%
25
&
26
'
27
(
28
)
29
*
2A
+
2B
,
2C
-
2D
.
2E
/
2F
3_ 0
30
1
31
2
32
3
33
4
34
5
35
6
36
7
37
8
38
9
39
:
3A
;
3B
<
3C
=
3D
>
3E
?
3F
4_ @
40
A
41
B
42
C
43
D
44
E
45
F
46
G
47
H
48
I
49
J
4A
K
4B
L
4C
M
4D
N
4E
O
4F
5_ P
50
Q
51
R
52
S
53
T
54
U
55
V
56
W
57
X
58
Y
59
Z
5A
[
5B
¥
A5
]
5D
^
5E
_
5F
6_ `
60
a
61
b
62
c
63
d
64
e
65
f
66
g
67
h
68
i
69
j
6A
k
6B
l
6C
m
6D
n
6E
o
6F
7_ p
70
q
71
r
72
s
73
t
74
u
75
v
76
w
77
x
78
y
79
z
7A
{
7B
|
7C
}
7D

203E
8_ À
C0
î
EE
Â
C2
Ä
C4
Ç
C7
È
C8
É
C9
Ê
CA
Ë
CB
Ï
CF
Ô
D4
Ö
D6
Ù
D9
Û
DB
Ü
DC
ß
DF
9_ à
E0
á
E1
â
E2
ä
E4
ç
E7
è
E8
é
E9
ê
EA
ë
EB
ï
EF
ô
F4
ö
F6
ù
F9
û
FB
ü
FC
A_ L⃞ R⃞ Z⃞ ⯅⃝ ⯆⃝ ⯇⃝ ⯈⃝ Control Stick D-Pad
B_
C_
D_
E_
F_
Non-Japanese text encoding table. Values underneath characters are matching Unicode codepoints.

Legend: Graphical character Control character Undefined/unknown

Note that character 0x81, the î, was replaced with Á in the GameCube releases of the game. This mistake was likely due to the fact that, as previously mentioned, î is the only character "out-of-order" in the upper section of this encoding, with respect to the order of characters in ISO-8859-1; in fact, Á does go between À and  in ISO-8859-1.


Control Codes

The game makes use of a variety of special-purpose control codes to acheive all the effects needed in messages. This table shows the control codes as they appear in the game's files for both Japanese and non-Japanese text, as well as how those control codes were represented in the files used during development (as seen in the iQue leak). For these format illustrations, a d represents a decimal digit, and x a hex digit. Specially-colored rows highlight codes that only exist in the development files, and get left out of the final, raw format.

Line breaks and text colors were not handled like other control codes in the development files, which is why they have no representation associated with them.

JP Game JP Dev Files Non-JP Game Non-JP Dev Files Description
000A N/A 01 N/A Line Break.
000B xxxx N/A 05 xx N/A Color the following text with color xxxx.
8146 03 \ Causes all text before it to be dropped from the final, raw output placed in the game. Allows the developers to add message IDs to their files, as well as comments explaining each message's context. It's unknown what happens if you attempt to use this in the game.
816F 01? { Used in development files along with the end marker (8170/02) to surround a message. It's unknown why the leak's English text format document claims this turns into a 01, since that code represents line breaks, and those are represented in an unusual way. What effect the Japanese code would have in Japanese text in the game is unknown.
8170 02 } End Marker.
8189 08 [ Enable instantaneous text.
818A 09 ] Disable instantaneous text.
8199 1A @07 Prevent the following text from being skipped by the B button.
819A 00xx ddd 13 xx &ddd Display icon xx.
819E 00xx dd 0E xx =dd Fade out after waiting xx visual frames?
819F 0B @01 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 8170 (End Marker).
81A1 1F @12 Print the in-game world time.
81A3 00xx dd 0C xx +dd Box Break with delay; wait xx visual frames before next message box.
81A4 0D @02 (Unused?) Wait for button press, continue in same box or line.
81A5 04 / Box Break; begin next message box.
81B8 1C @09 Initialize a three-choice selection.
81BC 1B @08 Initialize a two-choice selection.
81CB xxxx xxxx 07 xx xx #xxxx Go to (follow up with) Message ID xxxx.
81F0 Å 10 @03 Initialize Ocarina playing.
81F3 xxxx xxxx 12 xx xx $xxxx Play sound effect xxxx.
869F 00xx dd 1E xx <dd Print various highscore values.
86A3 19 @10 Print number of Gold Skulltulas collected.
86A4 1D @11 Print the length (JP)/weight (non-JP) of the caught fish.
86B3 00xx xxxx dddddd 15 xx xx xx ^dddddd Set message background to xxxxxx. Values unknown.
86C7 00xx dd 06 xx _dd Shift text that follows it xx pixels to the right.
86C8 0A @00 Keep message box opened; no reaction to buttons. Used in shop item descriptions.
86C9 00xx dd 14 xx ~dd Set text speed to xx. (Delay printing each character by xx frames.)
874F 0F % Print the player's name.
8791 大⃝ 16 @04 Print Marathon time.
8792 小⃝ 17 @05 Print Race time.
879B 18 @06 Print number of points.[for what?]
 ????  ???? 11 ?? *ddd (Unused?) Fade out and wait; ignore following text. iQue leak claims it's used for "STAFF" (staff credits?) in the English text documentation. No equivalent code appears to exist in the Japanese text documentation.

Note: if you wish to use these representations in your own modding software for Japanese text, keep in mind that 8791 and 8792 require multiple Unicode codepoints to be represented properly.

Color Values

Only the 4 lowest bits are used to determine color, even though they are specified as 0x40 - 0x47 and 0x0C00 - 0x0C07. The "types" in this table refer to specific styles of text boxes.

Any value above 7 will execute the same code as value 0, and therefore have the same color.

Value JP Value Default Colors Type 1 Colors Type 5 Colors
40 0C00 White #FFFFFF Black #000000
41 0C01 Red #FF3C3C Orange #FF7800
42 0C02 Green #46FF50 Green #46FF50
43 0C03 Blue #505AFF Blue #506EFF
44 0C04 Light Blue #64B4FF Light Blue #5AB4FF
45 0C05 Pink #FF96B4 Purple #D264FF
46 0C06 Yellow #E1FF32 Yellow #FFFF1E
47 0C07 Black #000000

Note that even though type 1 color 42 / 02 is the same as default, it is separate in code.

Sound Effects Used in Text Boxes

Because the original releases of Ocarina of Time lack filenames for audio files, the names below were taken from the 3DS remake of the game and applied retroactively.

# Filename Translation Identification
28DF NA_SE_EV_COW_CRY Environment - Cow - Cry Cow - Moo
28E3 NA_SE_EV_FROG_CRY_0 Environment - Frog - Cry - 0 Frog - Croak When Jumping in Water
28E4 NA_SE_EV_FROG_CRY_1 Environment - Frog - Cry - 1 Frog - Croak After Increasing in Size
3880 NA_SE_EN_NUTS_DAMAGE Enemy - Scrub - Damage Mad Scrub - Take Damage
3882 NA_SE_EN_NUTS_FAINT Enemy - Scrub - Faint Business Scrub - Squeak
38EC NA_SE_EN_PO_LAUGH Enemy - Poe - Laugh Poe - Laugh
4807 NA_SE_SY_TRE_BOX_APPEAR System - Treasure - Chest - Appear Reveal Treasure Chest
Play Song Correctly
Sell Mask
6844 NA_SE_VO_NA_HELLO_3 Voice - Navi - Hello - 3 Navi - "H'lo!"
6852 NA_SE_VO_TA_CRY_0 Voice - Talon - Cry - 0 Talon - "Huh?"
6855 NA_SE_VO_IN_LOST Voice - Ingo - Lost Ingo & Carpenter Boss - Frustrated
685F NA_SE_VO_NA_HELLO_2 Voice - Navi - Hello - 2 Navi - "Hey!"
6863 NA_SE_VO_RT_LAUGH_0 Voice - Ruto - Laugh - 0 Ruto - Laugh
6867 NA_SE_VO_ST_DAMAGE Voice - Skulltula - Damage Cursed Skulltula Man - Scared of Mask
6869 NA_SE_VO_Z0_HURRY Voice - Zelda 0 - Hurry Child Zelda - Gasp Before Retelling Legend
686B NA_SE_VO_Z0_QUESTION Voice - Zelda 0 - Question Child Zelda - Question Link's Honesty
686C NA_SE_VO_Z0_SIGH_0 Voice - Zelda 0 - Sigh - 0 Child Zelda - Sigh
686D NA_SE_VO_Z0_SMILE_0 Voice - Zelda 0 - Smile - 0 Child Zelda - Laugh Gently

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