Character encoding (Generation I) and User talk:NoaDaBest: Difference between pages

From Bulbapedia, the community-driven Pokémon encyclopedia.
(Difference between pages)
⧼bulbapediamonobook-jumptonavigation⧽⧼bulbapediamonobook-jumptosearch⧽
English: Adding a lot more detail
 
Created page with "{{subst:welcome}}"
 
Line 1: Line 1:
{{incomplete|needs=French, German, Italian, and Spanish character encodings}}
The [[Generation I]] games use a proprietary '''character encoding''' to store text data. Versions of the games in different languages may use different encodings, some more different than others.


Fixed-length user-input strings are terminated with 0x50. If a fixed-length string is terminated before using its full capacity, the contents of the remaining space are not specified.
{|class="roundy" style="border-spacing:7px;border-collapse:separate;margin:auto;border:1px solid #c4e673;box-shadow: 0 0 0.2em #999999;background:#FFF;max-width:1000px"
 
| style="{{roundytop|5px}}background:#c4e673;font-size:160%;padding-left:20px;height:50px;" | '''Welcome to Bulbapedia, NoaDaBest!'''
Note that 0x7F is a space (" "), not empty. All characters that are not control characters print in one character.
 
In some contexts, some characters may display differently than suggested below. For example, in the character input table, <sup>E</sup><sub>D</sub> is 0xF0 instead of the [[Pokémon Dollar]] symbol, and in the Pokédex (in English), the feet (') and inches (") marks are 0x60 and 0x61.
 
==English==
Due to how text is rendered in the Generation I Pokémon games, all characters take up the exact same amount of space (i.e. they games effectively use a [[wikipedia:monospaced font|monospaced font]]). Some ligature characters exist to display two characters within the width of one (e.g. the character <code>'s</code> is the same width as <code>s</code>).
 
{| class="wikitable" 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-
| style="background: #FFD" | <span style="font-size: 150%">{{tt|␀|Null}}</span> || colspan=15 style="background: #DDD" |
|-
! 1-
| style="background: #DDD" colspan=16 rowspan=3 | ''Map tiles''
|-
! 2-
|-
! 3-
|-
! 4-
| style="background: #DDD" colspan=9 | || style="background: #FFD" colspan=4 |  || style="background: #DDD"|  || style="background: #FFD" colspan=2 |
|-
! 5-
| style="background: #FFD" colspan=16 | ''Control characters''
|-
! 6-
|style="background: #FEE"| '''A'''
|style="background: #FEE"| '''B'''
|style="background: #FEE"| '''C'''
|style="background: #FEE"| '''D'''
|style="background: #FEE"| '''E'''
|style="background: #FEE"| '''F'''
|style="background: #FEE"| '''G'''
|style="background: #FEE"| '''H'''
|style="background: #FEE"| '''I'''
|style="background: #FEE"| '''V'''
|style="background: #FEE"| '''S'''
|style="background: #FEE"| '''L'''
|style="background: #FEE"| '''M'''
|style="background: #FEE"| :
|style="background: #FEE"| ぃ
|style="background: #FEE"| ぅ
|-
! 7-
|style="background: #FEE"| ‘
|style="background: #FEE"| ’
|style="background: #FEE"| “
|style="background: #FEE"| ”
|style="background: #FEE"| ・
|style="background: #FEE"| ⋯
|style="background: #FEE"| ぁ
|style="background: #FEE"| ぇ
|style="background: #FEE"| ぉ
|style="background: #FEE"| ╔
|style="background: #FEE"| ═
|style="background: #FEE"| ╗
|style="background: #FEE"| ║
|style="background: #FEE"| ╚
|style="background: #FEE"| ╝
| <span style="font-size: 150%">{{tt|␠|Space}}</span>
|-
! 8-
| A || B || C || D || E || F || G || H || I || J || K || L || M || N || O || P
|-
! 9-
| Q || R || S || T || U || V || W || X || Y || Z || ( || ) || ''':''' || ''';''' || [ || ]
|-
! A-
| a || b || c || d || e || f || g || h || i || j || k || l || m || n || o || p
|-
! B-
| q || r || s || t || u || v || w || x || y || z  || é || 'd || 'l || 's || 't || 'v
|-
! C-
| colspan=16 rowspan=2 style="background: #FEE" | ''Blanks''
|-
! D-
|-
! E-
| ' || <sup>P</sup><sub>K</sub> || <sup>M</sup><sub>N</sub> || - || 'r || 'm || ? || ! || . || ァ || ゥ || ェ || ▷ ||style="background: #FEE"| ▶ || ▼ || ♂
|-
! F-
|style="background: #FEE"| {{PDollar}} || × || . || / || , || ♀ || 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9
|}
 
;Legend
{{Colorswatch|FFF|Standard text characters}}
{{Colorswatch|FEE|Variable text characters}}
{{Colorswatch|FFD|Control characters}}
{{Colorswatch|DDD|Map tiles}}
 
* Variable text characters are characters whose values are overwritten in certain contexts to render different characters. Their default values are displayed in the table above; alternate possible values are detailed [[#Variable characters|below]].
* Control characters are special code points that either print a particular multi-character string or serve some functional purpose (such as marking the end of a line of text).
* Map tiles are sprites loaded from the current map's tileset. They are usually graphical rather than text.
 
The full list of characters that are available for user input are: A-Z and a-z, space, and the following: <code>×():;[]{{PK}}{{MN}}-?!♂♀/.,</code>.
 
===Notes===
* 0x00 is a [[wikipedia:null character|null character]], used to mark null values and occasionally used as a delimiter.
* 0x60-0x6C are bold letters leftover from the Japanese version. Only <code>'''V'''</code> and <code>'''S'''</code> are used in the English version, appearing on the VS screen at the start of a link battle.
* 0x6D (default value) and 0x9C are both [[wikipedia:colon|colons]], but are visually distinct: 0x9C is bold relative to 0x6D. 0x9C is used in almost all cases (including in user input), except in the display of total playtime.
* 0x6E-0x6F, 0x76-0x78, and 0xE9-0xEB are Japanese [[wikipedia:katakana|katakana]] leftover in the character table from the Japanese version. They are not used in the English version.
* 0x74 is an [[wikipedia:interpunct|interpunct]] leftover from the Japanese version. It is not used in the English version.
* 0x79 are [[wikipedia:box-drawing characters|box-drawing characters]] used to draw the boundaries of text boxes. In the games themselves, they are rendered with Poké Balls in the corners.
* 0x7F is a [[wikipedia:Space (punctuation)|space]].
* 0xBB-0xBF and 0xE4-0xE5 represent an apostrophe followed by a letter. These characters are used to render contractions in dialogue, so that the apostrophe does not take up an entire character-worth of space.
* 0xC0-0xDF are usually blank, although some parts of the game may load characters in these code points.
** Letters with [[wikipedia:umlaut|umlaut]]s that are user-enterable in the German version (<code>ÄÖÜäöü</code>) are located at 0xC0-0xC5 in other European languages.
* 0xE8 and 0xF2 are both [[wikipedia:Full stop|periods]] that render identically.
** [[#Japanese|In the Japanese games]], the two code points represent visually distinct characters: 0xF2 is a decimal point and 0xE8 is punctuation. 0xF2 is used for user input; 0xE8 is used in the name of {{p|Mr. Mime}}.
 
===Control characters===
Code points within the 0x49-0x5F range (with the exception of code point 0x4D, which defaults to tile 0x4D) are control characters. Instead of loading the tile they would correspond to from VRAM, they execute a piece of code. Additionally, the null code point 0x00 (which is not in this range) can be considered a control character.
 
There are three main categories of control character:
* Functional: Performs some function other than simply displaying text
* Static display: Prints a fixed string (which may contain multiple characters)
* Variable display: Prints the value of a text variable (which may contain multiple characters)
 
The static display control character 0x5D "TRAINER" is used as the [[Original Trainer]] of Pokémon obtained in [[in-game trade]]s. Due to being a control character, this means that if the Pokémon is traded to a game in a different language, the Original Trainer is automatically updated to display "TRAINER" in that game's own language.
 
{| class="wikitable sortable"
! class="unsortable" | Code point
! Short name
! Control type
! Description
|-
| 0x00 || null || none || Marks a null value
|-
| 0x49 || page || Functional || Begins a new Pokédex page
|-
| 0x4A || pkmn || Static display || Prints "<code>{{PK}}{{MN}}</code>"
|-
| 0x4B || _cont || Functional || Stops and waits for confirmation before scrolling the dialogue down by 1
|-
| 0x4C || autocont || Functional || Scroll dialogue down 1 without waiting for confirmation
|-
|-
| 0x4E || next line || Functional || Move 1 line down in dialogue
| style="vertical-align:top;color:#000;" |
<div style="float:right;background:#FFF;border:1px solid #FFF;padding:8px;{{roundy|110px}}">[[File:Bulbapedia bulb.png|110px|center]]</div>
Thank you for joining our community! By creating an account you are now able to edit pages, join discussions, and expand the community-driven Pokémon encyclopedia. This is a brief introduction to Bulbapedia's rules and resources to help you get started:
* All users are expected to follow the '''{{bp|code of conduct}}''' and to be kind to one another.
* If you have a question, check out our '''{{bp|FAQ}}'''; the '''{{bp|manual of style}}''' provides detailed editing guidance, and the '''{{bp|wikicode|wikicode page}}''' provides details about how to use wikicode. You can always ask for help by contacting a '''{{bp|staff}}''' member.
* Please <!--'''{{redlink|Help:Previewing edits|preview}}'''-->preview your edits before saving them; this helps you double-check your changes and reduces the need for repeated minor edits.
* Use '''{{bp|Talk page policy|talk pages}}''' to discuss changes and resolve editing disputes.
* Creating a userpage is allowed after you've added to the encyclopedia; for more details, see the '''{{bp|userspace policy}}'''.
* '''{{bp|Signature policy|Sign}}''' all talk page posts with four tildes (~~<nowiki/>~~). This will turn into your name and the time you wrote the comment.
* For more handy links and information, check out the '''{{bp|welcome|welcome portal}}'''.
|-
|-
| 0x4F || bottom line || Functional || Write at the last line of dialogue
|
|-
|-
| 0x50 || end || Functional || Marks the end of a string
| style="{{roundybottom|5px}}background:#c4e673;border:1px solid #c4e673;padding-left:20px;" |  
|-
<div style="display:flex;justify-content:space-between;"><b style="font-size:110%;">Thank you, and have a good time editing here!</b><div style="display:flex">
| 0x51 || paragraph || Functional || Begin a new dialogue page with button confirmation
<div style="background:#D3EC95;width:10px;height:100%;display:inline-block">&nbsp;</div>
|-
<div style="background:#DFF2B1;width:10px;height:100%;display:inline-block">&nbsp;</div>
| 0x52 || players name || Variable display || Prints the player's name
<div style="background:#f3f5f1;width:10px;height:100%;display:inline-block">&nbsp;</div>
|-
<div style="{{roundybr|3px}}background:#FFF;height:100%;display:inline-flex;align-items:center;padding:0 5px;"><span>→ [[User:SuperPikaPool13|<span style="color:#FAC000">Super</span>]][[User talk:SuperPikaPool13|<span style="color:#E62829">Pika</span>]][[Special:Contribs/SuperPikaPool13|<span style="color:#2E50D8">Pool13</span>]] 08:13, 20 September 2024 (UTC)</span></div>
| 0x53 || rivals name || Variable display || Prints the [[rival]]'s name
</div>
|-
</div>
| 0x54 || poke || Static display || Prints "<code>POKé</code>"
|-
| 0x55 || cont || Functional || A variation of 0x4B and 0x4C
|-
| 0x56 || …… || Static display || Prints "<code>……</code>"
|-
| 0x57 || done || Functional || Ends text box
|-
| 0x58 || prompt || Functional || Prompts to end textbox
|-
| 0x59 || target || Variable display || Prints the target of a move. If referring to the opponent's Pokémon, "<code>Enemy </code>" is prepended to the Pokémon's name. Used in battle; outside of battle, it will retain the last value that it stored.
|-
| 0x5A || user || Variable display || Prints the user of a move. If referring to the opponent's Pokémon, "<code>Enemy </code>" is prepended to the Pokémon's name. Used in battle; outside of battle, it will retain the last value that it stored.
|-
| 0x5B || pc || Static display || Prints "<code>PC</code>"
|-
| 0x5C || tm || Static display || Prints "<code>TM</code>"
|-
| 0x5D || trainer || Static display || Prints "<code>TRAINER</code>"
|-
| 0x5E || rocket || Static display || Prints "<code>ROCKET</code>"
|-
| 0x5F || dex || Functional || Prints "<code>.</code>" and ends the Pokédex entry
|}
|}
===Variable characters===
Code points in the 0x60-0x7E range vary depending on the context in which they are rendered. Normally these code points contain the characters listed in the table above, but in certain contexts different characters overwrite them. Even when some characters from this set are replaced, others may remain as their default values.
The alternate tilesets listed below are some of the alternate characters that use these codepoints. They are not necessarily a complete list of all cases in which these codepoints are overwritten.
====HP bar tileset====
This tileset is loaded when the game needs to draw HP bars, such as in battle and on status screens. (Note that screens that load this tileset may load additional tilesets that override some of these characters as well.)
{| class="wikitable"
! Code point
! Original<br />character
! New<br />character
! Notes
|-
| 0x62
| '''C'''
| HP:
| Right half of <code>HP:</code> (looks like <code>ↄ:</code>), with left tip of an HP bar
|-
| 0x63
| '''D'''
| rowspan=10 |
| HP bar segment (empty)
|-
| 0x64
| '''E'''
| HP bar segment (1/8)
|-
| 0x65
| '''F'''
| HP bar segment (1/4)
|-
| 0x66
| '''G'''
| HP bar segment (3/8)
|-
| 0x67
| '''H'''
| HP bar segment (1/2)
|-
| 0x68
| '''I'''
| HP bar segment (5/8)
|-
| 0x69
| '''V'''
| HP bar segment (3/4)
|-
| 0x6A
| '''S'''
| HP bar segment (7/8)
|-
| 0x6B
| '''L'''
| HP bar segment (full)
|-
| 0x6C
| '''M'''
| Right tip of an HP bar.
|-
| 0x6D
| :
| ║
| Vertical text box boundary, with the right tip of an HP bar.
|-
| 0x6E
| ぃ
| :L
| Abbreviation for "[[Level]]"
|-
| 0x6F
| ぅ
| ◢ <!-- box-drawing character

Revision as of 08:13, 20 September 2024

Welcome to Bulbapedia, NoaDaBest!

Thank you for joining our community! By creating an account you are now able to edit pages, join discussions, and expand the community-driven Pokémon encyclopedia. This is a brief introduction to Bulbapedia's rules and resources to help you get started:

  • All users are expected to follow the code of conduct and to be kind to one another.
  • If you have a question, check out our FAQ; the manual of style provides detailed editing guidance, and the wikicode page provides details about how to use wikicode. You can always ask for help by contacting a staff member.
  • Please preview your edits before saving them; this helps you double-check your changes and reduces the need for repeated minor edits.
  • Use talk pages to discuss changes and resolve editing disputes.
  • Creating a userpage is allowed after you've added to the encyclopedia; for more details, see the userspace policy.
  • Sign all talk page posts with four tildes (~~~~). This will turn into your name and the time you wrote the comment.
  • For more handy links and information, check out the welcome portal.
Thank you, and have a good time editing here!