Character encoding (Generation I): Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 16: Line 16:
Control characters work by intercepting the tile that would normally correspond to the control character and instead perform a different action whether it be end the text or print a lengthy message.
Control characters work by intercepting the tile that would normally correspond to the control character and instead perform a different action whether it be end the text or print a lengthy message.


====Tilemap Sections====
====Tilemap sections====
 
# VRAM address 0x9000 to 0x9480 correspond to a portion of the current tileset of the map. Character codes 0x01 to 0x48 and 0x4D directly correspond to them. For example, when your outdoors, tile #3 is the animated flower meaning character code 0x3 will place the animated flower in text, however if your anywhere else such as in battle, in a cave, or elsewhere a completely different tile will likely print.
# VRAM address 0x9000 to 0x9480 correspond to a portion of the current tileset of the map. Character codes 0x01 to 0x48 and 0x4D directly correspond to them. For example, when your outdoors, tile #3 is the animated flower meaning character code 0x3 will place the animated flower in text, however if your anywhere else such as in battle, in a cave, or elsewhere a completely different tile will likely print.
## Characters 0x49 - 0x5F technically are also in this same section but, apart from one, 0x4D, all the rest are control character and thus link to code rather than the tile they would normally correspond to
## Characters 0x49 - 0x5F technically are also in this same section but, apart from one, 0x4D, all the rest are control character and thus link to code rather than the tile they would normally correspond to
Line 26: Line 25:
## 0xE0 - 0xFF reference tiles similar to section 2, you can consider these the "other half" of that section although some player-typeable characters like "PK", "MN", gender symbols, etc. are here as well as numbers, some symbols, and more ui characters
## 0xE0 - 0xFF reference tiles similar to section 2, you can consider these the "other half" of that section although some player-typeable characters like "PK", "MN", gender symbols, etc. are here as well as numbers, some symbols, and more ui characters


====Character Codes====
====Character codes====
 
As mentioned above, character codes are within the 0x49-0x5F range with the exception of 0x4D which doesn't map to any code and thus, by default, corresponds to tile 4D. All of these are completely usable in game such as names, testing never showed any crashing, however if done so expect to have some small to large graphical glitches that will usually be cleaned up by changing screens or entering a new map through a warp and definitely some annoyances if used long-term.
As mentioned above, character codes are within the 0x49-0x5F range with the exception of 0x4D which doesn't map to any code and thus, by default, corresponds to tile 4D. All of these are completely usable in game such as names, testing never showed any crashing, however if done so expect to have some small to large graphical glitches that will usually be cleaned up by changing screens or entering a new map through a warp and definitely some annoyances if used long-term.


=====Dialogue control codes=====
=====Dialogue control codes=====
These control codes control dialogue text placement, paging, etc... they can be used in names but will have various temporary graphical glitches
These control codes control dialogue text placement, paging, etc... they can be used in names but will have various temporary graphical glitches


Line 47: Line 44:


=====Variable control codes=====
=====Variable control codes=====
These simply expand out to text of their own that can vary or based on other variables, they're perfectly safe to use in names without any graphical glitches however since it expands to larger text you can quickly have dialogue or text spilling over the edges of the container which would just temporarily clutter the screen and may overwrite or overlap other text being printed.
These simply expand out to text of their own that can vary or based on other variables, they're perfectly safe to use in names without any graphical glitches however since it expands to larger text you can quickly have dialogue or text spilling over the edges of the container which would just temporarily clutter the screen and may overwrite or overlap other text being printed.


Line 56: Line 52:


=====Text control codes=====
=====Text control codes=====
These are like variable control codes but always remain consistent and can never change
These are like variable control codes but always remain consistent and can never change


Line 180: Line 175:
0xE4 and 0xE5 cause the following character to be printed with that diacritic above it.
0xE4 and 0xE5 cause the following character to be printed with that diacritic above it.


===Japanese Control characters===
===Japanese control characters===
{{incomplete|section|Incomplete or missing functions for control bytes. Alternate defaults in different games/other languages}}
{{incomplete|section|Incomplete or missing functions for control bytes. Alternate defaults in different games/other languages}}
* 0x4A: Prints <code>が </code>
* 0x4A: Prints <code>が </code>