Skip to content

MSBT File Format

Yannik Marchand edited this page Sep 20, 2020 · 19 revisions

LMS > Overview > Message File (MSBT)

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

LBL1 Block

This block contains labels for the TXT2, ATR1 and TSY1 blocks.

TXT2 Block

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 tags, which contain control information about the text. A tag is indicated by 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, as it always has a fixed size. The command type is stored right after the 0xF character. Then it is padded until the whole tag (including the 0xF character) takes up exactly 6 bytes. Note that it's not possible for this tag to have additional parameters besides the command type.

ATR1 Block

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

TSY1 Block

Offset Size Description
0x0 4 per message Style index in MSBP file
Clone this wiki locally