-
Notifications
You must be signed in to change notification settings - Fork 8
MSBT File Format
This file is identified by the magic number MsgStdBn
. It contains text strings that are looked up by label.
Type | Description |
---|---|
LBL1 | Message labels |
TXT2 | Message strings |
ATR1 | Attributes |
TSY1 | Text style |
This block contains labels for the TXT2, ATR1 and TSY1 blocks.
This block contains the actual text strings.
Offset | Size | Description |
---|---|---|
0x0 | 4 | Number of messages |
0x4 | 4 per message | Offsets to message strings |
Null-terminated message strings |
A message string may contain control tags, which may for example change the style of the text. A control tag always starts with character 0xE or 0xF.
Character 0xE is always followed by the following data:
Offset | Size | Description |
---|---|---|
0x0 | 2 | Command type |
0x2 | 2 | Subcommand type |
0x4 | 2 | Size of parameters |
0x6 | Parameters |
Note that the size of this tag depends on both the message encoding (which defines the size of the 0xE character) and on the size of the parameters.
Character 0xF is a bit different. It always takes up exactly 6 bytes (including the 0xF character). Its purpose is unknown.
Command type 0 seems to contain predefined commands, while all other command types are game-specific. The following subcommands seem to be defined under command type 0:
ID | Description | Parameters |
---|---|---|
0 | Ruby | |
1 | Font | |
2 | Size | 16-bit integer (font size) |
3 | Color | 4 8-bit integers (RGBA) |
However, it's up to the game to implement these commands, so they are not necessarily supported by every game.
This block contains attributes for each message. The format of the attributes is game-specific. Depending on the game, the attributes may contain offsets to strings that are stored behind the attribute table.
Offset | Size | Description |
---|---|---|
0x0 | 4 | Number of attributes |
0x4 | 4 | Bytes per attribute |
0x8 | Attributes | |
Strings |
Offset | Size | Description |
---|---|---|
0x0 | 4 per message | Style index in MSBP file |