Skip to content

Message Binary Text (MSBT)

MSBT (Message Studio Binary Text) is a file format that maps labels to text.

TypeDescription
LBL1Labels
TXT2Strings
ATO1Attribute offsets
ATR1Attributes
TSY1Styles

LBL1 stores labels that directly map entries in the TXT2, ATR1, and TSY1 sections.

TXT2 stores text in the encoding defined in the file header.

OffsetTypeDescription
0x0u32String count
0x4u32 [messageCount]Array of offsets to each string
--Null-terminated Strings

Control tags extend the functionality that text may provide. These are inserted directly into text and in the official libMessageStudio tool, follow the BB-code convention [{GROUP}:{TAG} {parameters}].

Tags are indicated by 0x0E, marking an opening tag, and 0x0F marking a closing tag. Both Aligned to the width of the encoding.

OffsetTypeDescription
0x0INDICATORTag indicator
0x2u16Tag group id into TGG2
0x4u16Tag index in the group

For opening tags:

OffsetTypeDescription
0x4u16Parameter size
0x6-Parameters

Parameters can be read by using a MSBP file and the structure defined in the TGP2 section.

MSBP files always define a default group called System at group ID 0.

Tag IndexNameDescription
0x0RubyDisplays a RUBY character
0x1Font Adjusts the font of the text
0x2SizeAdjusts the size of the text
0x3ColorAlters the color of a text region
0x4PageBreakDisplays the text on a different page
0x5ReferenceReferences text from a different file and label

Following defines the parameters for all tags in the System group.

Varies between games. Extra byteSpan may be provided.

NameTypeDescription
rtstringThe ruby character
NameTypeDescription
byteSpanu16Amount of bytes to render the ruby character over
rtstringThe ruby character

Varies between games. face may be an index (game specific index into archive?).

NameTypeDescription
facestringThe font face name
NameTypeDescription
faces16Font face index

Varies between games, rgba or id parameter.

NameTypeDescription
ru8Red
gu8Green
bu8Blue
au8Alpha
NameTypeDescription
ids16Color ID into CLR1

Contains no parameters.

NameTypeDescription
mstxtstringThe message source files
labelstringThe label in the source file
langstringLanguage code

ATO1 defines which attributes to include from the defined structure in the MSBP file. This is useful to omit certain attributes that may not need to be displayed.

OffsetTypeDescription
0x0s32 [sectionSize / 4]Attribute offsets (-1 = no value)

This section be removed for games that do not require it.

ATR1 maps labels to a set of attributes.

OffsetTypeDescription
0x0u32Attribute count
0x4u32Bytes per attribute container
0x8-Attributes
--String table

TSY1 stores the index of styles for lookup in the SYL3 section.

OffsetTypeDescription
0x0u32Style index