Difference between revisions of "MSBT (File Format)"

From MK8
Jump to navigation Jump to search
m
(4 intermediate revisions by 3 users not shown)
Line 4: Line 4:
 
The MSBT file format starts with a header structure.
 
The MSBT file format starts with a header structure.
  
{| class="wikitable"
+
{|class="wikitable"
 
|-
 
|-
 
! Offset !! Type !! Description
 
! Offset !! Type !! Description
Line 10: Line 10:
 
| 0x00 || String || '''File magic'''. Always ''MsgStdBn'' in ASCII.
 
| 0x00 || String || '''File magic'''. Always ''MsgStdBn'' in ASCII.
 
|-
 
|-
| 0x08 || UInt16 || '''Byte order mark'''. 0xFEFF for big endian and 0xFFFE for little endian.
+
| 0x08 || UInt16 || {{BOM}}
 
|-
 
|-
 
| 0x0A || UInt16 || '''Unknown'''. Always 0x0000.
 
| 0x0A || UInt16 || '''Unknown'''. Always 0x0000.
Line 30: Line 30:
 
The NLI1 section starts with a section header.
 
The NLI1 section starts with a section header.
  
{| class="wikitable"
+
{|class="wikitable"
 
|-
 
|-
 
! Offset !! Type !! Description
 
! Offset !! Type !! Description
Line 44: Line 44:
 
| 0x14
 
| 0x14
 
| colspan=2 {{unknown|End of NLI1 header}}
 
| colspan=2 {{unknown|End of NLI1 header}}
 +
|}
 +
 +
After the header comes the entries. Each entry has the following structure:
 +
 +
{|class="wikitable"
 +
|-
 +
! Offset !! Type !! Description
 +
|-
 +
| 0x00 || UInt32 || '''Unknown'''. Could be a message index.
 +
|-
 +
| 0x04 || UInt32 || Index into the [[#TXT2|TXT2 strings]].
 
|}
 
|}
  
Line 49: Line 60:
 
The TXT2 section starts with a header.
 
The TXT2 section starts with a header.
  
{| class="wikitable"
+
{|class="wikitable"
 
|-
 
|-
 
! Offset !! Type !! Description
 
! Offset !! Type !! Description
Line 66: Line 77:
 
After the TXT2 header, there are four bytes for each entry, containing the offset to the UTF16 string.
 
After the TXT2 header, there are four bytes for each entry, containing the offset to the UTF16 string.
  
= Tools =
+
== Tools ==
 
The following tool can handle MSBT files:
 
The following tool can handle MSBT files:
 
+
* [https://github.com/IcySon55/3DLandMSBTeditor/releases/tag/v0.9.7 MSBT Editor Reloaded], by [[User:IcySon55|IcySon55]]
* [https://github.com/IcySon55/3DLandMSBTeditor/releases/tag/v0.9.7 MSBT Editor], by [[User:IcySon55|IcySon55]]
 
  
 
[[Category:File Format]]
 
[[Category:File Format]]

Revision as of 14:08, 18 July 2017

MSBT files contains the game's text. The files have been used in many different games on the Wii, 3DS and Wii U. In Mario Kart 8 the file has a main header (MSBT) and two sections with their own headers (NLI1 and TXT2). 0xAB is used as padding.

Header

The MSBT file format starts with a header structure.

Offset Type Description
0x00 String File magic. Always MsgStdBn in ASCII.
0x08 UInt16 Byte Order Mark (BOM): 0xFEFF for big endian and 0xFFFE for little endian.
0x0A UInt16 Unknown. Always 0x0000.
0x0C UInt16 Unknown. Always 0x0103.
0x0E UInt16 Number of sections.
0x10 UInt16 Unknown. Always 0x0000.
0x12 UInt32 File size.
0x16 Byte[10] Unknown. Always 0.
0x20 End of file header

NLI1

The NLI1 section starts with a section header.

Offset Type Description
0x00 String Section magic. Always NLI1 in ASCII.
0x04 UInt32 Section size (starting from 0x10).
0x08 Byte[8] Unknown. Always 0.
0x10 UInt32 Number of entries.
0x14 End of NLI1 header

After the header comes the entries. Each entry has the following structure:

Offset Type Description
0x00 UInt32 Unknown. Could be a message index.
0x04 UInt32 Index into the TXT2 strings.

TXT2

The TXT2 section starts with a header.

Offset Type Description
0x00 String Section magic. Always TXT2 in ASCII.
0x04 UInt32 Section size (starting from 0x10).
0x08 Byte[8] Unknown. Always 0.
0x10 UInt32 Number of entries.
0x14 End of TXT2 header

After the TXT2 header, there are four bytes for each entry, containing the offset to the UTF16 string.

Tools

The following tool can handle MSBT files: