Pmd2 text strings: Difference between revisions

From ProjectPokemon Wiki
Jump to navigation Jump to search
No edit summary
(Redirect)
Line 6: Line 6:
{{DISPLAYTITLE:text_*.str File Format}}
{{DISPLAYTITLE:text_*.str File Format}}


The "text_e.str" file contains a table of pointers to null terminated strings contained further down in the file.
{{#externalredierct: https://projectpokemon.org/docs/mystery-dungeon-nds/text_str-file-format-r57/}}
In other languages versions of the game, the letter "e" is changed to indicate the language. For example, "text_j.str" is the name of the file for the Japanese version of the game.
 
== More Details ==
In addition to the characters from the character sets used, the game sometimes uses [[#Special Characters|unprintable character sequences]] to represent special characters in-game.
The game also uses several [[#Tags|square brackets enclosed tags]] that can trigger a wide range of things, going from replacing the tag with a value or string, adding a pause for input, changing the text formatting, playing a sound/music, etc..
 
The file also appears to be somehow linked to the "[[Pmd2_tbl_talk.tlk|tbl_talk.tlk]]" file.
 
==== Notes ====
:* The number of strings varies by game and region.  The US version of Explorers of Sky the English file contains 18,452 strings.  Each language in the European version contains 18,482.  The Japanese version contains 19,010.
:* In Explorers of Time/Darkness the English file contains 13,666 strings.
 
==== Known Character Encoding ====
 
 
{|class="wikitable"
!File
!Encoding
|-
| text_e.str
| 8-bits, [http://en.wikipedia.org/wiki/ISO/IEC_8859-1 ISO 8859-1] aka Windows-28591, or [http://en.wikipedia.org/wiki/Windows-1252 Windows-1252]
|-
| text_j.str
| 8-bits, [http://en.wikipedia.org/wiki/Shift_JIS Shift JIS] or [http://en.wikipedia.org/wiki/Code_page_932 Windows-31J]
|}
 
* '''Warning:''' There is also a possibility the strings are actually stored as multi-byte [https://en.wikipedia.org/wiki/UTF-8 utf-8] strings! Considering special characters like the music note are made of several characters, and also considering that ASCII characters are interpreted correctly.
 
== File Structure ==
 
=== Overview ===
A quick overview of the main parts of the file.
Note that there is no padding between the Pointer Table and the Strings Block!
 
{| class="wikitable"
! Offset
! Length
! Endianness
! Type
! Name
! Description
|-
| 0x00
| Varies
|
|
| [[#Pointer Table|Pointer Table]]
| A table of pointers to every null-terminate strings in the [[#Strings Block|Strings Block]].
|-
| After Pointer Table
| Varies
|
|
| [[#Strings Block|Strings Block]]
| A block containing null-terminated strings of characters one after the other. The last pointer points to the end of the file, after the last string.
|}
 
=== Pointer Table ===
A very straightforward list of 4 bytes pointers to every strings in the file. Pointers are all little endian, as usual.
* '''NOTE:''' The last pointer in the table must points to the end of the file, after the last string.
 
=== Strings Block ===
Again, this is very straightforward. All null-terminated strings are simply stored one after the other. There is no padding at the end of the file.
 
== Special Characters ==
As mentioned above, the game uses several special sequences of unprintable characters for displaying some in-game characters or pictogram.
 
Here are some of the known ones:
{| class="wikitable"
! Sequence
! Description
|-
|
|}
 
== Tags ==
As mentioned above the game uses square brackets enclosed expressions for runtime text replacement, formatting, or triggering various events.
 
Here are some of the known ones:
{| class="wikitable"
! Expression
! Description
|-
|
|}

Revision as of 21:41, 14 October 2017