Character encoding (Generation III): Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
(I thnk there's strong justification for splitting. And this way I've also got more freedom to structure the information somewhat better)
 
No edit summary
(37 intermediate revisions by 8 users not shown)
Line 1: Line 1:
The [[Generation III]] games use a proprietary '''character encoding''' to store text data. The Generation III encoding is greatly different from the encodings used in previous generations, with characters corresponding to different bytes. Versions of the games in different languages may use different encodings, some more different than others.
The [[Generation III]] games use a proprietary '''character encoding''' to store text data. The Generation III encoding is greatly different from the encodings used in previous generations, with characters corresponding to different bytes. Versions of the games in different languages may use different encodings, some more different than others.


Some text strings are stored in fixed-length structures while others are stored in a block of text with separate strings simply terminated by 0xFF. In the large, variable-length blocks, usually another structure will have pointers to the appropriate string(s) within that block of text. In the fixed-length structures, strings are still terminated by 0xFF, but any remainder of the alotted space is padded out with 0x00.
Some text strings are stored in fixed-length structures while others are stored in a block of text with separate strings simply terminated by 0xFF. In the large, variable-length blocks, usually another structure will have pointers to the appropriate string(s) within that block of text. In the fixed-length structures, strings are still terminated by 0xFF, but any remainder of the allotted space is padded out with 0x00.


==Character sets==
==Character sets==
Every international game in Generation III (English, French, Italian, German, and Spanish games) contains two character sets: their native set and the Japanese set. The different international character sets are mostly identical save for a few [[#Regional differences|regional differences]].
For most text, the game's native character set is used, but if a Pokémon's origin {{DL|Pokémon data structure (Generation III)|language}} is Japanese, its nickname and its [[Original Trainer]]'s name use the Japanese character set. The Japanese games only have the Japanese character set, but with the exception of <code>0xB8</code>, all inputtable text is identical between international and Japanese character sets.
Note that 0x00 in the following tables is a space (" "), not empty.
Note that 0x00 in the following tables is a space (" "), not empty.
===English===
 
{{spading|Pokéblock character bytes|comment=0x57 - 0x59 are guesses.}}
===International===
The table below shows the English character set in Pokémon Emerald. Some differences do exist between different [[#Differences between games and revisions|revisions and games]] and between different [[#Regional differences|languages]], detailed afterward.
 
Characters on a white background are the only characters that can be input in names; <code>0xF1</code> - <code>0xF6</code> are only available for input in German games. Those on a light gray background may be used in other text strings (such as dialogue) depending on the language of the game. Characters on a dark gray background are unused values that mostly display as spaces in FireRed, LeafGreen, and Emerald; in Ruby and Sapphire, they are holdovers from the Japanese encoding. Characters with a dotted underline differ between regions.
 
:{| style="text-align: center; border-collapse:collapse" cellpadding="2px" width="375px"
:{| style="text-align: center; border-collapse:collapse" cellpadding="2px" width="375px"
|-
|-
! || -0 || -1 || -2 || -3 || -4 || -5 || -6 || -7 || -8 || -9 || -A || -B || -C || -D || -E || -F
! || -0 || -1 || -2 || -3 || -4 || -5 || -6 || -7 || -8 || -9 || -A || -B || -C || -D || -E || -F
|-
|- style="background:#ddd"
! 0-
! style="background:#fff" | 0-
| &nbsp; || style="background-color: #ddd" colspan=15 |
| style="background:#fff" | &nbsp;
|-
| À
! 1-
| Á
| style="background-color: #ddd" colspan=11 | || é || style="background-color: #ddd" colspan=4 |
| Â
|-
| Ç
! 2-
| È
| style="background-color: #ddd" colspan=13 | || & || + || style="background-color: #ddd" |
| É
|-
| Ê
! 3-
| Ë
| style="background-color: #ddd" colspan=5 | || = || style="background-color: #ddd" colspan=10 |
| <font style="font-family: monospace">Ì</font>
|-
| style="background:#bbb" |
! 4- || style="background-color: #ddd" colspan=16|
| <font style="font-family: monospace">Î</font>
|-
| <font style="font-family: monospace">Ï</font>
! 5-
| Ò
| style="background-color: #ddd" colspan=3 | || {{PK}} || {{MN}} || <sup>P</sup><sub>O</sub> || <sup>K</sup><sub>é</sub> || BL || OC || K
| Ó
| style="background-color: #ddd" colspan=2 | || ( || ) || style="background-color: #ddd" colspan=2 |
| Ô
|-
 
! 6- || style="background-color: #ddd" colspan=16 |
|- style="background:#ddd"
|-
! style="background:#fff" | 1-
! 7-
| Œ
| style="background-color: #ddd" colspan=9 | || ⬆ || ⬇ || ⬅ || ➡ || style="background-color: #ddd" colspan=3 |
| Ù
|-
| Ú
! 8- || style="background-color: #ddd" colspan=16 rowspan=2 |
| Û
|-
| Ñ
! 9-
| ß
| à
| á
| style="background:#bbb" |
| ç
| è
| é
| ê
| ë
| ì
| style="background:#bbb" |
 
|- style="background:#ddd"
! style="background:#fff" | 2-
| î
| ï
| ò
| ó
| ô
| œ
| ù
| ú
| û
| ñ
| º
| ª
| ᵉʳ
| &
| +
| style="background:#bbb" |
 
|- style="background:#bbb"
! style="background:#fff" | 3-
|
|
|
|
| style="background:#ddd" | <div style="border-bottom:1px dotted" title="Differs between regions"><small>Lv</small></div>
| style="background:#ddd" | =
| style="background:#ddd" | ;
|
|
|
|
|
|
|
|
|
 
|- style="background:#bbb"
! style="background:#fff" | 4-
| || || || || || || || || || || || || || || ||
 
|- style="background:#ddd"
! style="background:#fff" | 5-
| style="background:#ddd" | ▯
| style="background:#ddd" | ¿
| style="background:#ddd" | ¡
| {{PK}}
| {{MN}}
| <sup>P</sup><sub>O</sub>
| <sup>K</sup><sub>é</sub>
| <div style="border-bottom:1px dotted" title="Differs between regions">[[Image:Character 0x57 iii.png]]</div>
| <div style="border-bottom:1px dotted" title="Differs between regions">[[Image:Character 0x58 iii.png]]</div>
| <div style="border-bottom:1px dotted" title="Differs between regions">[[Image:Character 0x59 iii.png]]</div>
| style="background:#ddd" | <font style="font-family: monospace">Í</font>
| %
| (
| )
| style="background:#bbb" | <div style="border-bottom:1px dotted" title="Differs between regions">&nbsp;</div>
| style="background:#bbb" | <div style="border-bottom:1px dotted" title="Differs between regions">&nbsp;</div>
 
|- style="background:#bbb"
! style="background:#fff" | 6-
| <div style="border-bottom:1px dotted" title="Differs between regions">&nbsp;</div>
| <div style="border-bottom:1px dotted" title="Differs between regions">&nbsp;</div>
| <div style="border-bottom:1px dotted" title="Differs between regions">&nbsp;</div>
| <div style="border-bottom:1px dotted" title="Differs between regions">&nbsp;</div>
| <div style="border-bottom:1px dotted" title="Differs between regions">&nbsp;</div>
| || || || style="background:#ddd" | â
| || || || || || || style="background:#ddd" | í
 
|- style="background:#bbb"
! style="background:#fff" | 7-
| || || || || || || || ||
| style="background:#ddd" | ⬆
| style="background:#ddd" | ⬇
| style="background:#ddd" | ⬅
| style="background:#ddd" | ➡
| style="background:#ddd" | *
| style="background:#ddd" | *
| style="background:#ddd" | *
 
|- style="background:#bbb"
! style="background:#fff" | 8-
| style="background:#ddd" | *
| style="background:#ddd" | *
| style="background:#ddd" | *
| style="background:#ddd" | *
| style="background:#ddd" | ᵉ
| style="background:#ddd" | &lt;
| style="background:#ddd" | &gt;
| || || || || || || || ||
 
|- style="background:#bbb"
! style="background:#fff" | 9-
| || || || || || || || || || || || || || || ||
 
|-
|-
! A-
! A-
| style="background-color: #ddd" |
| style="background:#ddd" | ʳᵉ
| 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 ||! ||? || . || -
| 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 ||! ||? || . || - || style="background:#bbb" |
| style="background-color: #ddd" |
|-
|-
! B-
! B-
| … || “ || || ‘ || ’ || ♂ || ♀ || {{pdollar}} || , || style="background-color: #ddd" |
| ...
| / || A || B || C || D || E
| <div style="border-bottom:1px dotted" title="Differs between regions"></div>
| <div style="border-bottom:1px dotted" title="Differs between regions"></div>
| ‘ || ’ || ♂ || ♀ || style="background:#ddd" | {{pdollar}} || , || style="background:#ddd" | × || / || A || B || C || D || E
|-
|-
! C-
! C-
Line 54: Line 171:
|-
|-
! E-
! E-
| l || m || n || o || p || q || r || s || t || u || v || w || x || y || z
| l || m || n || o || p || q || r || s || t || u || v || w || x || y || z || style="background:#ddd" |
| style="background-color: #ddd" | &nbsp;
 
|-
|- style="background:#fff"
! F-
! F-
| : || style="background-color: #ddd" colspan=9 |
| style="background:#ddd" | :
| style="background-color: #ddd" colspan=6 | ''Control characters''
| Ä
| Ö
| Ü
| ä
| ö
| ü
| style="background:#bbb" |
| style="background:#bbb" |
| style="background:#bbb" |
| colspan=6 style="background:#ddd" | ''Control characters''
|}
|}


===German===
<code>0x7D</code> - <code>0x83</code>, marked by asterisks (*) above, print spaces 1-7 pixels wide (in ascending order of the hex value). While <code>0xB0</code> is "…" in the main fonts of Emerald, FireRed, and LeafGreen, it still displays as "‥" in certain other fonts that exist in the games - for example, the small font used on the party screen and the narrow font used in the Pokédex, bag, and stores.
{{incomplete|section|Are 0x57 - 0x59 different? [[Pokéblock]] is "Pokériegel" in German.}}
 
The German character set primarily adds onto the English character set six characters at 0xF1 to 0xF6, corresponding to Ä, Ö, Ü, ä, ö, and ü.
====Differences between games and revisions====
In all revisions of Ruby and Sapphire, <code>0xB0</code> prints "‥". In certain languages, <code>0x34</code>, <code>0x57</code> - <code>0x59</code>, and <code>0x64</code> also have differences in different games, as detailed in the section below.
 
All other differences concern unused character values.
 
In FireRed and LeafGreen, <code>0x50</code> and <code>0x7D</code> - <code>0x83</code> are not used and print as spaces like other unused characters.
 
In Ruby and Sapphire, many values print Japanese characters, holdovers from the original Japanese encoding. These include:
* All unused characters (on a dark gray background above)
* <code>0x50</code> and <code>0x7D</code> - <code>0x83</code>
* <code>0x36</code>, <code>0x84</code> - <code>0x86</code>, and <code>0xA0</code>, in version 1.0 of the English Ruby and Sapphire only
 
====Regional differences====
A few characters differ between regions, and among them are quotation marks. These can be input into names, which means a Pokémon with quotation marks in its nickname or OT name will display differently if traded to a game of a different region.
 
In the table below, the underscores (<code>_</code>) stand for spaces.
 
:{| class="wikitable" style="text-align: center; background-color: #fff;"
!
! English
! Spanish
! Italian
! German
! French
 
|- style="background-color:#ddd"
! <code>0x34</code>
| <small>Lv</small>
| <small>Nv</small>{{sup/3|RS}}<br><small>Nv.</small>{{sup/3|E}}{{sup/3|FRLG}}
| <small>L.</small>
| <small>Lv.</small>
| <small>N.</small>
 
|- style="background-color:#ddd"
! <code>0x57</code> - <code>0x59</code>
| [[Image:Character 0x57 iii.png]][[Image:Character 0x58 iii.png]][[Image:Character 0x59 iii.png]]
| [[Image:Character 0x57 es iii.png]][[Image:Character 0x58 es iii.png]][[Image:Character 0x59 es iii.png]]
| _, _, <sub>M</sub>{{sup/3|RS}}<br>_, _, _{{sup/3|E}}{{sup/3|FRLG}}
| [[Image:Character 0x57 de iii.png]][[Image:Character 0x58 de iii.png]][[Image:Character 0x59 de iii.png]]
| [[Image:Character 0x57 fr iii.png]][[Image:Character 0x58 fr iii.png]][[Image:Character 0x59 fr iii.png]]
 
|- style="background-color:#bbb"
! <code>0x5E</code> - <code>0x63</code>
| colspan=2 |
| style="background-color:#ddd" | [[Image:Character 0x5E it iii.png]][[Image:Character 0x5F it iii.png]][[Image:Character 0x60 it iii.png]][[Image:Character 0x61 it iii.png]][[Image:Character 0x62 it iii.png]][[Image:Character 0x63 it iii.png]]
| colspan=2 |
 
|-
! <code>0x64</code>
| colspan=4 style="background-color:#bbb" |
| style="background-color:#ddd" | <small>[[Battle Point|Pco]]</small>{{sup/3|E}}
 
|-
! <code>0xB1</code>
| colspan=3 | “
| „
| «
 
|-
! <code>0xB2</code>
| colspan=3 | ”
| “
| »
 
|}


===Japanese===
===Japanese===
Only the characters on a white background below can be input in names. The characters on a dark gray background are printed as spaces in Pokémon FireRed, LeafGreen, and Emerald. Otherwise, the Japanese character set has no differences between games or revisions.
:{| style="text-align: center; border-collapse:collapse" cellpadding="2px" width="375px"
:{| style="text-align: center; border-collapse:collapse" cellpadding="2px" width="375px"
|-
|-
Line 102: Line 294:
|-
|-
! A-
! A-
| ッ || 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || ! || ? || . || -
| ッ || 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || ! || ? || || ||
| style="background-color: #ddd" |
|-
|-
! B-
! B-
| style="letter-spacing:-5px" | <small>・・・・</small> || 『 || style="background-color: #ddd" | || 「 || 」 || ♂ || ♀ || 円 || style="background-color: #ddd" colspan=2 | || / || A || B || C || D || E
| style="letter-spacing:-0.5em" | <small>・・</small> || 『 || || 「 || 」 || ♂ || ♀ || style="background:#ddd" | 円 || style="background:#ddd" | . || style="background:#ddd" | × || / || A || B || C || D || E
|-
|-
! C-
! C-
| F || G || H || I || J || K || L || M || N || O || P || Q || R || S || T || U
| F || G || H || I || J || K || L || M || N || O || P || Q || R || S || T || U
|-
|-
! D-'''
! D-
| V || W || X || Y || Z || a || b || c || d || e || f || g || h || i || j || k
| V || W || X || Y || Z || a || b || c || d || e || f || g || h || i || j || k
|-
|-
! E-
! E-
| l || m || n || o || p || q || r || s || t || u || v || w || x || y || z || style="background-color: #ddd" |
| l || m || n || o || p || q || r || s || t || u || v || w || x || y || z || style="background:#ddd" |
|-
|- style="background:#ddd"
! F-
! style="background:#fff" | F-
| style="background-color: #ddd" colspan=10 | || style="background-color: #ddd" colspan=6 | ''Control characters''
| : || Ä || Ö || Ü || ä || ö || ü || style="background:#bbb"| ⬆ || style="background:#bbb" | || style="background:#bbb" | ⬅ || colspan=6 | ''Control characters''
|}
|}


==Control characters==
==Control characters==
{{incomplete|section|Full description of all the ways to use 0xFC.<br>Reason 2: How 0xFD works (how/what different variables it can access)}}
The characters 0xFA to 0xFF are {{wp|control characters}}.
* 0xFA and 0xFB both mark a prompt for the player to press a button to continue the dialogue. However, they will print the new line of dialogue differently: 0xFA will scroll the previous dialogue up one line before printing the next line, while 0xFB will clear the dialogue box entirely.
* 0xFA and 0xFB both mark a prompt for the player to press a button to continue the dialogue. However, they will print the new line of dialogue differently: 0xFA will scroll the previous dialogue up one line before printing the next line, while 0xFB will clear the dialogue box entirely.
* 0xFC is an {{wp|escape character}} that leads to several different functions.
* 0xFC is an {{wp|escape character}} that leads to several different functions (see [[#0xFC functions|below]]).
**In the Japanese games, when followed by 0x0C and another byte, it can provide access to extra characters (e.g., <code>FC 0C FB</code> produces "=").
* 0xFD is an escape character for variables, such as the player's name or a Pokémon's name (see [[#0xFD variables|below]]).
**When followed by 0x08 and another byte (presumably duration), it produces a pause in the text.
* 0xFD is an escape character for variables, such as the player's name or a Pokémon's name.
* 0xFE is a line break.
* 0xFE is a line break.
* 0xFF is a terminator, marking the ends of strings.
* 0xFF is a terminator, marking the ends of strings.
===0xFC functions===
When 0xFC is followed by...
*0x01, it will change the color of the text, depending on the byte following. The available colors are listed [[#Color values|below]].
*0x02, the text will be highlighted, depending on the byte following. The available colors are listed below.
*0x03, the text's shadow will have its color changed, depending on the byte following. The available colors are listed below.
*0x04, the text will be colored and highlighted. The byte immediately following determines the text's color, while a second byte afterward will determine the highlight color. The available colors are listed below.
*0x06, the text will change size, depending on the byte following. 0x00 will make the font smaller, while anything else will make the font the default size.
*0x08 and another byte, it produces a pause in the text. The byte after 0x08 determines the length of the pause.
*0x09, the game will pause text display, and resume upon pressing a button.
*0x0C, it will escape the byte that follows 0x0C if it is a control character and print a new character. If the second byte after 0xFC is not a control character byte, that byte prints normally.
**When the third byte is 0xFA, "➡" is produced.
**When the third byte is 0xFB, "+" is produced (though in the Japanese games, within the [[Options]] screen, it produces "=").
**The other control characters do not produce any characters. In the English games, nothing is printed, while in the Japanese games, miscellaneous data appears to be printed.
*0x0D, the text will be shifted by a certain amount of pixels, depending on the byte following this one. The effect wears off upon entering a new line.
*0x10, music will begin to play. Music is specified by the two bytes following, in [[wp:Endianness|little endian]] format.
*0x15, text will be rendered in the Japanese font
*0x16, text will be rendered in the International font
*0x17, music will be paused.
*0x18, music will resume playing.
====Color values====
A table of available text, highlight, and shadow colors is shown below.
{| style="border: 1px solid #999; border-collapse: collapse;"
|- style="background: #ccc;"
! Byte
! style="width:80px" | {{gameabbrev3|RS}}
! style="width:80px" | {{gameabbrev3|FRLG}}
! style="width:80px" | {{gameabbrev3|E}}
|-
| 0x00
| Transparent
| style="background: #FFF" |
| style="background: #FFF" |
|-
| 0x01
| style="background: #444" |
| style="background: #FFF" |
| style="background: #FFF" |
|-
| 0x02
| style="background: #F00" |
| style="background: #666" |
| style="background: #666" |
|-
| 0x03
| style="background: #0F0" |
| style="background: #DDD" |
| style="background: #DDD" |
|-
| 0x04
| style="background: #00F" |
| style="background: #F00" |
| style="background: #F00" |
|-
| 0x05
| style="background: #FF0" |
| style="background: #FB7" |
| style="background: #FB7" |
|-
| 0x06
| style="background: #0FF" |
| style="background: #290" |
| style="background: #290" |
|-
| 0x07
| style="background: #F0F" |
| style="background: #9F9" |
| style="background: #9F9" |
|-
| 0x08
| style="background: #DDD" |
| style="background: #35C" |
| style="background: #35C" |
|-
| 0x09
| style="background: #000" |
| style="background: #ACF" |
| style="background: #ACF" |
|-
| 0x0A
| style="background: #000" |
| style="background: #FFF" |
| style="background: #FFF" |
|-
| 0x0B
| style="background: #EEE" |
| style="background: #DEF" |
| style="background: #EEE" |
|-
| 0x0C
| style="background: #FFF" |
| style="background: #ADE" |
| style="background: #FFF" |
|-
| 0x0D
| style="background: #9CF" |
| style="background: #EFF" |
| style="background: #0F9" |
|-
| 0x0E
| style="background: #7BE" |
| style="background: #7AC" |
| style="background: #0CB" |
|-
| 0x0F
| style="background: #FFF" |
| style="background: #47A" |
| style="background: #47A" |
|}
===0xFD variables===
When 0xFD is followed by the bytes below, the following variables are printed.
*0x01: the player's name
*0x02, 0x03, or 0x04: whatever text has been assigned to one of three buffers using a variety of script commands
*0x06: the rival's name
*0x07: the game's name{{sup/3|RSE}}
*0x08: the name of the villainous team{{sup/3|RSE}}
*0x09: the name of the non-villainous team{{sup/3|RSE}}
*0x0A: the name of the villainous team's leader{{sup/3|RSE}}
*0x0B: the name of the non-villainous team's leader{{sup/3|RSE}}
*0x0C: the name of the villainous team's legendary Pokémon{{sup/3|RSE}}
*0x0D: the name of the opposing legendary Pokémon{{sup/3|RSE}}


==Trivia==
==Trivia==

Revision as of 14:18, 3 February 2021

The Generation III games use a proprietary character encoding to store text data. The Generation III encoding is greatly different from the encodings used in previous generations, with characters corresponding to different bytes. Versions of the games in different languages may use different encodings, some more different than others.

Some text strings are stored in fixed-length structures while others are stored in a block of text with separate strings simply terminated by 0xFF. In the large, variable-length blocks, usually another structure will have pointers to the appropriate string(s) within that block of text. In the fixed-length structures, strings are still terminated by 0xFF, but any remainder of the allotted space is padded out with 0x00.

Character sets

Every international game in Generation III (English, French, Italian, German, and Spanish games) contains two character sets: their native set and the Japanese set. The different international character sets are mostly identical save for a few regional differences.

For most text, the game's native character set is used, but if a Pokémon's origin language is Japanese, its nickname and its Original Trainer's name use the Japanese character set. The Japanese games only have the Japanese character set, but with the exception of 0xB8, all inputtable text is identical between international and Japanese character sets.

Note that 0x00 in the following tables is a space (" "), not empty.

International

The table below shows the English character set in Pokémon Emerald. Some differences do exist between different revisions and games and between different languages, detailed afterward.

Characters on a white background are the only characters that can be input in names; 0xF1 - 0xF6 are only available for input in German games. Those on a light gray background may be used in other text strings (such as dialogue) depending on the language of the game. Characters on a dark gray background are unused values that mostly display as spaces in FireRed, LeafGreen, and Emerald; in Ruby and Sapphire, they are holdovers from the Japanese encoding. Characters with a dotted underline differ between regions.

-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -A -B -C -D -E -F
0-   À Á Â Ç È É Ê Ë Ì Î Ï Ò Ó Ô
1- Œ Ù Ú Û Ñ ß à á ç è é ê ë ì
2- î ï ò ó ô œ ù ú û ñ º ª ᵉʳ & +
3-
Lv
= ;
4-
5- ¿ ¡ PK MN PO Ké
Character 0x57 iii.png
Character 0x58 iii.png
Character 0x59 iii.png
Í % ( )
 
 
6-
 
 
 
 
 
â í
7- * * *
8- * * * * < >
9-
A- ʳᵉ 0 1 2 3 4 5 6 7 8 9 ! ? . -
B- ...
$ , × / A B C D E
C- F G H I J K L M N O P Q R S T U
D- V W X Y Z a b c d e f g h i j k
E- l m n o p q r s t u v w x y z
F- : Ä Ö Ü ä ö ü Control characters

0x7D - 0x83, marked by asterisks (*) above, print spaces 1-7 pixels wide (in ascending order of the hex value). While 0xB0 is "…" in the main fonts of Emerald, FireRed, and LeafGreen, it still displays as "‥" in certain other fonts that exist in the games - for example, the small font used on the party screen and the narrow font used in the Pokédex, bag, and stores.

Differences between games and revisions

In all revisions of Ruby and Sapphire, 0xB0 prints "‥". In certain languages, 0x34, 0x57 - 0x59, and 0x64 also have differences in different games, as detailed in the section below.

All other differences concern unused character values.

In FireRed and LeafGreen, 0x50 and 0x7D - 0x83 are not used and print as spaces like other unused characters.

In Ruby and Sapphire, many values print Japanese characters, holdovers from the original Japanese encoding. These include:

  • All unused characters (on a dark gray background above)
  • 0x50 and 0x7D - 0x83
  • 0x36, 0x84 - 0x86, and 0xA0, in version 1.0 of the English Ruby and Sapphire only

Regional differences

A few characters differ between regions, and among them are quotation marks. These can be input into names, which means a Pokémon with quotation marks in its nickname or OT name will display differently if traded to a game of a different region.

In the table below, the underscores (_) stand for spaces.

English Spanish Italian German French
0x34 Lv NvRS
Nv.EFRLG
L. Lv. N.
0x57 - 0x59 Character 0x57 iii.pngCharacter 0x58 iii.pngCharacter 0x59 iii.png Character 0x57 es iii.pngCharacter 0x58 es iii.pngCharacter 0x59 es iii.png _, _, MRS
_, _, _EFRLG
Character 0x57 de iii.pngCharacter 0x58 de iii.pngCharacter 0x59 de iii.png Character 0x57 fr iii.pngCharacter 0x58 fr iii.pngCharacter 0x59 fr iii.png
0x5E - 0x63 Character 0x5E it iii.pngCharacter 0x5F it iii.pngCharacter 0x60 it iii.pngCharacter 0x61 it iii.pngCharacter 0x62 it iii.pngCharacter 0x63 it iii.png
0x64 PcoE
0xB1 «
0xB2 »

Japanese

Only the characters on a white background below can be input in names. The characters on a dark gray background are printed as spaces in Pokémon FireRed, LeafGreen, and Emerald. Otherwise, the Japanese character set has no differences between games or revisions.

-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -A -B -C -D -E -F
0-
1-
2-
3-
4-
5-
6-
7-
8-
9-
A- 0 1 2 3 4 5 6 7 8 9
B- ・・ . × / A B C D E
C- F G H I J K L M N O P Q R S T U
D- V W X Y Z a b c d e f g h i j k
E- l m n o p q r s t u v w x y z
F- : Ä Ö Ü ä ö ü Control characters

Control characters

  • 0xFA and 0xFB both mark a prompt for the player to press a button to continue the dialogue. However, they will print the new line of dialogue differently: 0xFA will scroll the previous dialogue up one line before printing the next line, while 0xFB will clear the dialogue box entirely.
  • 0xFC is an escape character that leads to several different functions (see below).
  • 0xFD is an escape character for variables, such as the player's name or a Pokémon's name (see below).
  • 0xFE is a line break.
  • 0xFF is a terminator, marking the ends of strings.

0xFC functions

When 0xFC is followed by...

  • 0x01, it will change the color of the text, depending on the byte following. The available colors are listed below.
  • 0x02, the text will be highlighted, depending on the byte following. The available colors are listed below.
  • 0x03, the text's shadow will have its color changed, depending on the byte following. The available colors are listed below.
  • 0x04, the text will be colored and highlighted. The byte immediately following determines the text's color, while a second byte afterward will determine the highlight color. The available colors are listed below.
  • 0x06, the text will change size, depending on the byte following. 0x00 will make the font smaller, while anything else will make the font the default size.
  • 0x08 and another byte, it produces a pause in the text. The byte after 0x08 determines the length of the pause.
  • 0x09, the game will pause text display, and resume upon pressing a button.
  • 0x0C, it will escape the byte that follows 0x0C if it is a control character and print a new character. If the second byte after 0xFC is not a control character byte, that byte prints normally.
    • When the third byte is 0xFA, "➡" is produced.
    • When the third byte is 0xFB, "+" is produced (though in the Japanese games, within the Options screen, it produces "=").
    • The other control characters do not produce any characters. In the English games, nothing is printed, while in the Japanese games, miscellaneous data appears to be printed.
  • 0x0D, the text will be shifted by a certain amount of pixels, depending on the byte following this one. The effect wears off upon entering a new line.
  • 0x10, music will begin to play. Music is specified by the two bytes following, in little endian format.
  • 0x15, text will be rendered in the Japanese font
  • 0x16, text will be rendered in the International font
  • 0x17, music will be paused.
  • 0x18, music will resume playing.

Color values

A table of available text, highlight, and shadow colors is shown below.

Byte RS FRLG E
0x00 Transparent
0x01
0x02
0x03
0x04
0x05
0x06
0x07
0x08
0x09
0x0A
0x0B
0x0C
0x0D
0x0E
0x0F

0xFD variables

When 0xFD is followed by the bytes below, the following variables are printed.

  • 0x01: the player's name
  • 0x02, 0x03, or 0x04: whatever text has been assigned to one of three buffers using a variety of script commands
  • 0x06: the rival's name
  • 0x07: the game's nameRSE
  • 0x08: the name of the villainous teamRSE
  • 0x09: the name of the non-villainous teamRSE
  • 0x0A: the name of the villainous team's leaderRSE
  • 0x0B: the name of the non-villainous team's leaderRSE
  • 0x0C: the name of the villainous team's legendary PokémonRSE
  • 0x0D: the name of the opposing legendary PokémonRSE

Trivia

  • In the name field for Eggs, the game places the bytes 0x60 0x6F 0x8B corresponding to タマゴ (tamago, the Japanese word for egg). This remains in the English version even though the characters have been replaced.


Data structure in the Pokémon games
Generation I Pokémon speciesPokémonPoké MartCharacter encodingSave
Generation II Pokémon speciesPokémonTrainerCharacter encoding (Korean) • Save
Generation III Pokémon species (Pokémon evolutionPokédexType chart)
Pokémon (substructures) • MoveContestContest moveItem
Trainer TowerBattle FrontierCharacter encodingSave
Generation IV Pokémon species (Pokémon evolutionLearnsets)
PokémonSaveCharacter encoding
Generation V-present Character encoding
TCG GB and GB2 Character encoding


Project Games logo.png This data structure article is part of Project Games, a Bulbapedia project that aims to write comprehensive articles on the Pokémon games.