Character encoding (Generation IV)

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search

The Generation IV games use a proprietary character encoding to store text data. The Generation IV encoding uses a shared two-byte character set for all languages, rather than using multiple character sets depending on the language like in previous generations. The Nintendo DS games Pokémon Diamond, Pearl, Platinum, HeartGold, and SoulSilver and the Wii game My Pokémon Ranch store these values in little endian, while the Wii game Pokémon Battle Revolution stores these values in big endian.

Compatibility

Except for Korean language games, all language versions are able to trade or battle with each other. Nicknames and Original Trainer names are displayed identically across all games, regardless of which language the game is in.

Pal Park

Main article: Pal Park → Nicknames and Original Trainers

When transferring a Pokémon from a Generation III game via Pal Park, its nickname and Original Trainer need to be transcoded from that of the Generation III games to this character encoding. Due to a bug, some accented letters that normally cannot be entered by the player are incorrectly turned into a kana character instead.

Wii

Main article: Wii character encoding (Generation IV)

When the nickname or Original Trainer of a Pokémon from the handheld games is displayed in Pokémon Battle Revolution or My Pokémon Ranch, it needs to be transcoded between this character encoding and that of the Wii game.

Poké Transfer

Main article: Poké Transfer → Modifications to transported Pokémon

When transferring a Pokémon to a Generation V game via Poké Transfer, its nickname and Original Trainer need to be transcoded from this character encoding to that of the Generation V games. Even if an equivalent character is supported in those games, almost all characters that cannot normally be input in names are converted to halfwidth question marks (?). The only exception is the halfwidth ampersand (&), which is preserved on transfer, despite it not normally being enterable.

Character set

Halfwidth and fullwidth forms of numbers, letters, and most symbols have distinct encodings, with the characters on a yellow background in the table below being the fullwidth forms used in Japanese text. Only the characters on a white or light yellow background below can be input in names; the specific characters available for input depend on the language of the game. Those on a light gray or dark yellow background may be used in other text strings (such as dialogue) depending on the language of the game.

Values displayed with a dark gray background are unused, and display as an invisible zero-width character. Values from 0x01FE onward display as a halfwidth question mark (?).

-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -A -B -C -D -E -F
000-  
001-
002-
003-
004-
005-
006-
007-
008-
009-
00A-
00B-
00C-
00D-
00E-
00F- × ÷
010- 😑 ☺ ☹ 😠 ⤴︎
011- ⤵︎ 💤 Items Pocket Key Items Pocket TMs & HMs Pocket Mail Pocket Medicine Pocket Berries Pocket Poké Balls Pocket Battle Items Pocket
012- 0 1 2 3 4 5 6 7 8 9 A B C D E
013- F G H I J K L M N O P Q R S T U
014- V W X Y Z a b c d e f g h i j k
015- l m n o p q r s t u v w x y z À
016- Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð
017- Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à
018- á â ã ä å æ ç è é ê ë ì í î ï ð
019- ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ Œ
01A- œ Ş ş ª º er re r Pokémon Dollar ¡ ¿ ! ? , .
01B- / ' « » ( ) + - *
01C- # = & ~ : ;
01D- @ % 😑 ☺ ☹ 😠 ⤴︎ ⤵︎ 💤 e
01E- PK MN ° _ _
01F-

The characters from 0x01E0 onward were added as extensions to the original encoding used in the Japanese version of Diamond and Pearl:

  • PK, MN, and the various-width spaces are present in the Western and Korean versions of Diamond and Pearl and all versions of Platinum, HeartGold, and SoulSilver;
  • the degree symbol (°) is present in the European and Korean versions of Diamond and Pearl and all versions of Platinum, HeartGold, and SoulSilver;
  • the underscores are present in all versions of Platinum, HeartGold, and SoulSilver; and
  • the one- and two-dot leaders are present in the Korean and Western versions of HeartGold and SoulSilver.

These values display as invisible zero-width characters in games where they are not present.

Korean

The characters in the table below are only included in Korean language games, and display as halfwidth question marks (?) in other language games.

It includes all 2,350 Hangul syllables present in the KS X 1001 standard, as well as the 33 jamo present on a Korean keyboard and 5 additional syllables (뢔, 쌰, 쎼, 쓔, 쬬) necessary to input them. Values displayed with a dark gray background are unused, and display in Korean games as a space with the width of a Hangul syllable ( ).

-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -A -B -C -D -E -F
040-
041-
042-
043-
044-
045-
046-
047-
048- 굿
049- 귿
04A-
04B-
04C-
04D-
04E- 꼿
04F-
050- 뀀
051-
052-
053-
054-
055-
056-
057-
058-
059-
05A-
05B-
05C-
05D-
05E-
05F-
060-
061-
062-
063-
064-
065-
066-
067-
068-
069-
06A-
06B-
06C-
06D-
06E-
06F-
070- 릿
071-
072-
073-
074-
075-
076-
077- 믿
078-
079-
07A-
07B-
07C-
07D-
07E-
07F-
080-
081-
082-
083-
084-
085-
086-
087-
088-
089-
08A-
08B-
08C-
08D-
08E-
08F-
090-
091-
092-
093-
094-
095-
096-
097-
098-
099-
09A-
09B-
09C-
09D-
09E-
09F-
0A0-
0A1-
0A2-
0A3-
0A4-
0A5-
0A6-
0A7-
0A8-
0A9-
0AA-
0AB-
0AC-
0AD-
0AE-
0AF-
0B0-
0B1-
0B2-
0B3-
0B4-
0B5-
0B6-
0B7-
0B8-
0B9-
0BA- 퀀
0BB-
0BC-
0BD-
0BE-
0BF-
0C0-
0C1-
0C2-
0C3-
0C4-
0C5-
0C6-
0C7-
0C8-
0C9-
0CA-
0CB-
0CC-
0CD-
0CE-
0CF-
0D0-
0D1-
0D2-
0D3-
0D4-
0D5-
0D6-
0D7-

Special characters

Unown symbols are mapped to the same code points as the corresponding fullwidth and halfwidth letters, exclamation mark, and question mark. A 7-pixel-wide space is mapped to the fullwidth space, while a 6-pixel-wide space is mapped to the halfiwdth space.

Control characters

  • 0x25BC and 0x25BD 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: 0x25BC will clear the dialogue box entirely before printing the next line, while 0x25BD will scroll the previous dialogue up one line before printing it. Note that these two values correspond to the Unicode codepoints for the characters ▼ (U+25BC) and ▽ (U+25BD).
  • 0xE000 is a line break.
  • 0xF100 is an escape character that indicates that the string is compressed, using 9 bits per character instead of 16 bits per character.
  • 0xFFFE is an escape character for functions and variables. It is followed by a 16-bit integer indicating the index of the function to call, a 16-bit integer indicating the number of arguments to the function, and lastly the specified number of arguments.
  • 0xFFFF is a terminator, marking the ends of strings.

0xFFFE variables

The following values insert a string into the displayed text. They all take one argument, indicating the buffer to read from. Note that these buffers are populated by the calling script, so all of these values behave identically.

  • 0x0100: prints the species name of a Pokémon
  • 0x0101: prints the nickname of a Pokémon (or other player input)
  • 0x0102: prints the gender of a Pokémon stored in the Pokémon Day Care
  • 0x0103: prints the name of the player (or the name of another player or NPC)
  • 0x0104: prints the name of a location
  • 0x0105: prints the name of an Ability
  • 0x0106: prints the name of a move
  • 0x0107: prints the name of a nature
  • 0x0108: prints the name of an item (or a Bag pocket)
  • 0x0109: prints the name of a Poffin
  • 0x010A: prints the name of a decoration or Seal
  • 0x010B: prints the name of a box in the Pokémon Storage System
  • 0x010C: unused
  • 0x010D: prints the name of a stat
  • 0x010E: prints the name of a Trainer class
  • 0x010F: prints the name of a type
  • 0x0110: prints the reaction of a Pokémon that dislikes a Berry that may cause confusion ("too spicy", "too dry", etc.)
  • 0x0111: prints the name of a status condition
  • 0x0112: prints the name of a Bag pocket
  • 0x0113: prints the description of an item
  • 0x0114-0x0117: unused
  • 0x0118: prints the name of a Pokétch app
  • 0x0119: prints the name of an item in the Underground
  • 0x011A: prints the name of a rule variant ("STANDARD", "LIGHT", etc.)
  • 0x011B: prints the icon and name of a Bag pocket
  • 0x011C: prints a word from the easy chat system
  • 0x011D: prints the question when asking another player a question in the Underground ("Favorite color", "Favorite sport", etc.)
  • 0x011E: prints the answer when responding to another player's question in the Underground ("Red", "Baseball", etc.)
  • 0x011F: prints the name of an Accessory (or the icon and name of a Bag pocket)
  • 0x0120: prints the name of a Gym ("Oreburgh Gym", "Eterna Gym", etc.)
  • 0x0121: prints the name of a time of day ("MORNING", "DAY", etc.)
  • 0x0122: prints the category of a Pokémon Super Contest ("COOL CONTEST", "BEAUTY CONTEST", etc.)
  • 0x0123: prints the rank of a Pokémon Super Contest ("NORMAL RANK", "GREAT RANK", etc.)
  • 0x0124: prints the name of a country selected in Geonet
  • 0x0125: prints the name of a region selected in Geonet
  • 0x0126: unused
  • 0x0127: prints the name of a Ribbon
  • 0x0128: prints the selected GTS filter for gender ("EITHER", "♂", "♀")
  • 0x0129: prints the selected GTS filter for level ("Lv. 9 and under", "Lv. 10 and up", etc.)
  • 0x012A-0x0131: unused
  • 0x0132: prints a one-digit number
  • 0x0133: prints a two-digit number
  • 0x0134: prints a three-digit number
  • 0x0135: prints a four-digit number
  • 0x0136: prints a five-digit number
  • 0x0137: prints a six-digit number
  • 0x0138: prints a seven-digit number
  • 0x0139: prints a eight-digit number
  • 0x013A: unused
  • 0x013B: prints a ten-digit number
  • 0x013C: prints the icon of a Bag pocket (only used in Western and Korean games)
  • 0x013D: prints the name of a group (only used in Western and Korean games)
  • 0x013E-0x0141: unused
  • 0x0142: prints the name of an item (only used in Western games)
  • 0x0143: prints the name of a player or another Pokémon Trainer (only used in Western games)
  • 0x0144: prints the nickname of a Pokémon (only used in Western games)
  • 0x0145: prints the species name of a Pokémon (only used in Western games)
  • 0x0146-0x0149: prints the name of a location (only used in Western games)
  • 0x014A: prints the name of a month (only used in Western games)
  • 0x014B: prints the name of a player or another Pokémon Trainer (only used in Western games)
  • 0x014C-0x01FF: unused
In Japanese Platinum and all versions of HeartGold and SoulSilver
  • 0x0300: prints the name of a Plaza Game in the Wi-Fi Plaza
  • 0x0301: prints the name of a Time Event in the Wi-Fi Plaza
  • 0x0302: prints the name of a Tap Toy in the Wi-Fi Plaza
  • 0x0303: prints a greeting in Japanese in the Wi-Fi Plaza ("おはよう!", "こんにちは!", "こんばんは!")
  • 0x0304: prints a greeting in English in the Wi-Fi Plaza ("Good morning.", "Hello.", "Good evening.")
  • 0x0305: prints a greeting in French in the Wi-Fi Plaza ("Bonjour.", "Bonsoir.")
  • 0x0306: prints a greeting in German in the Wi-Fi Plaza ("Guten Morgen.", "Guten Tag.", "Guten Abend.")
  • 0x0307: prints a greeting in Italian in the Wi-Fi Plaza ("Buongiorno.", "Buona sera.")
  • 0x0308: prints a greeting in Spanish in the Wi-Fi Plaza ("Buenos días.", "Hola.", "Buenas noches.")
  • 0x0309-0x03FF: unused
Only in Western/Korean Platinum
  • 0x0600: prints the name of a Plaza Game in the Wi-Fi Plaza
  • 0x0601: prints the name of a Time Event in the Wi-Fi Plaza
  • 0x0602: prints the name of a Tap Toy in the Wi-Fi Plaza
  • 0x0603: prints a greeting in Japanese/Korean in the Wi-Fi Plaza ("おはよう!", "こんにちは!", "こんばんは!" in Western games; "안녕!" in Korean games)
  • 0x0604: prints a greeting in English in the Wi-Fi Plaza ("Good morning.", "Hello.", "Good evening.")
  • 0x0605: prints a greeting in French in the Wi-Fi Plaza ("Bonjour.", "Bonsoir.")
  • 0x0606: prints a greeting in German in the Wi-Fi Plaza ("Guten Morgen.", "Guten Tag.", "Guten Abend.")
  • 0x0607: prints a greeting in Italian in the Wi-Fi Plaza ("Buongiorno.", "Buona sera.")
  • 0x0608: prints a greeting in Spanish in the Wi-Fi Plaza ("Buenos días.", "Hola.", "Buenas noches.")
  • 0x0609-0x06FF: unused
All versions of HeartGold and SoulSilver
  • 0x0400: prints the name of a Pokéathlon event ("Hurdle Dash", "Ring Drop", etc.)
  • 0x0401: prints the name of a Pokéathlon course ("Speed Course", "Power Course", etc.)
  • 0x0402: unused
  • 0x0403: prints the name of a Pokéathlon medal ("Speed Medal", "Power Medal", etc.)
  • 0x0404-0x04FF: unused
Only in Western/Korean HeartGold and SoulSilver
  • 0x3400-0x3402: unused
  • 0x3403: prints the name of a group (only used in Western and Korean games)
  • 0x3404-0x340F: unused
  • 0x3410: prints the name of a month (only used in Western and Korean games)
  • 0x3411: unused
  • 0x3412: prints the secret password for Buena's Password (only used in Western and Korean games)
  • 0x3413: prints the name of a Pokéwalker Route (only used in Western and Korean games)
  • 0x3414-0x34FF: unused

0xFFFE functions

Index Function Arguments Values
0x0200 show a mark in the message window 1 index (0-3)
  • 0: Icon, indicates the player can interact with the Touch Screen
  • 1: Icon, indicates the player should look at the Touch Screen (used when the Pokétch is obtained)
  • 2: Icon, indicates the player can interact with the top screen (used when a Pokémon evolves after a battle)
  • 3: Icon, indicates the player should look at the top screen (unused)
0x0201 pause for a period of time 1 number of frames (15, 20, 60, 90, 120 are used)
0x0202 wait for a sound effect to finish 1 index (1-5 are used)
0x0203 set the X coordinate of the cursor 1 number of pixels (7, 11, 51, 58, 60, 68, 70, 80, 86, 90, 96, 97, 100, 102, 103, 120, 138, 140, 176 are used)
0x0204 set the Y coordinate of the cursor 1 number of pixels (24, 72, and 120 are used)
0x0205 align centerHGSS 0
0x0206 align rightHGSS 0
0x0207 same effect as control character 0x25BC (only used in Japanese games)HGSS 0
0x0208 same effect as control character 0x25BD (only used in Japanese games)HGSS 0
0xFF00 change font color 1 index (0, 1-5, 101, 255 are used)
0xFF01 change font size 1 size in percent (100 and 200 are used)
0xFF02 unknown (only used in Japanese games)HGSS 2 unknown
  • 1 is used when preparing microphone for Chatter, asking for a Battle Room Number at the Battle Tower, and in debug/unused text for the Pokéwalker
  • 2 is used in the message displayed when a communication error occurs

unknown

  • 0 is used in all of the uses above


Data structure in the Pokémon games
General Character encoding
Generation I Pokémon speciesPokémonPoké MartCharacter encodingSave
Generation II Pokémon speciesPokémonTrainerCharacter encoding (Korean) • Save
Generation III Pokémon species (EvolutionPokédexType chart)
Pokémon (substructures) • MoveContestContest moveItem
Trainer TowerBattle FrontierCharacter encoding (GameCube) • Save
Generation IV Pokémon species (EvolutionLearnsets)
PokémonSaveCharacter encoding (Wii)
Generation V–present Character encoding
Generation VIII Save
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.