BMG (File Format): Difference between revisions
Jump to navigation
Jump to search
(Created page with "Category:File formats '''BMG''' is a file format used to hold text in SMG1. This was replaced by the MSBT file format in SMG2. Unlike the messages in SMG2, SMG1 uses a single, region specific BMG file (Region/message.arc/message.bmg) to hold ''ALL'' text. = Format Specifications = Below you'll find helpful tables on how the file is structured. '''THIS IS SPECIFIC TO SMG1/3D All Stars. Other games that use BMG might be different!''' ''All Char[] types are in...") |
m (→Header: Fix red link) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 17: | Line 17: | ||
| 0x4 || Char[4] || File magic. "bmg1" for SMG1. "1gmb" for 3D All Stars. | | 0x4 || Char[4] || File magic. "bmg1" for SMG1. "1gmb" for 3D All Stars. | ||
|- | |- | ||
| 0x8 || UInt32 || [[ | | 0x8 || UInt32 || [[BMG_(File_Format)#FLW1|FLW1 Section]] Offset. | ||
|- | |- | ||
| 0x0C || UInt32 || Section Number. | | 0x0C || UInt32 || Section Number. | ||
Line 35: | Line 35: | ||
|} | |} | ||
== Section Types == | == Section Types == | ||
This is where things get a little weird. Depending on the Magic from the [[BMG#Section_Base|Section Base]], it can be one of the following types below. | This is where things get a little weird. Depending on the Magic from the [[BMG (File Format)#Section_Base|Section Base]], it can be one of the following types below. | ||
=== INF1 Section === | === INF1 Section === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 47: | Line 47: | ||
|} | |} | ||
=== DAT1 === | === DAT1 === | ||
{| class="wikitable" | |||
! Offset !! Type !! Description | |||
|- | |||
| 0x0 || UInt8[] || Section Data, determined by Section Size. Contains wchar_t strings. | |||
|} | |||
=== FLW1 === | === FLW1 === | ||
{| class="wikitable" | {| class="wikitable" |
Latest revision as of 21:00, 10 July 2024
BMG is a file format used to hold text in SMG1. This was replaced by the MSBT file format in SMG2. Unlike the messages in SMG2, SMG1 uses a single, region specific BMG file (Region/message.arc/message.bmg) to hold ALL text.
Format Specifications
Below you'll find helpful tables on how the file is structured.
THIS IS SPECIFIC TO SMG1/3D All Stars. Other games that use BMG might be different!
All Char[] types are in ASCII encoding.
Header
Offset | Type | Description |
---|---|---|
0x0 | Char[4] | File magic. "MESG" for SMG1, "GSEM" for 3D All Stars. |
0x4 | Char[4] | File magic. "bmg1" for SMG1. "1gmb" for 3D All Stars. |
0x8 | UInt32 | FLW1 Section Offset. |
0x0C | UInt32 | Section Number. |
0x10 | UInt8 | Unknown. Believed to be a definition of encoding in some games. |
0x11 | UInt8[15] | Padding. |
Section Base
Offset | Type | Description |
---|---|---|
0x0 | Char[4] | Magic. Relates to the Section Type it is. |
0x4 | UInt32 | Section Size. |
Section Types
This is where things get a little weird. Depending on the Magic from the Section Base, it can be one of the following types below.
INF1 Section
Offset | Type | Description |
---|---|---|
0x0 | UInt16 | Section Number. |
0x2 | UInt16 | Section Size. |
0x4 | UInt8[4] | Padding. |
DAT1
Offset | Type | Description |
---|---|---|
0x0 | UInt8[] | Section Data, determined by Section Size. Contains wchar_t strings. |
FLW1
Offset | Type | Description |
---|---|---|
0x0 | UInt16 | Node Number. |
0x2 | UInt16 | Brach Node Number. |
0x4 | UInt8[4] | Padding. |
FLI1
Not used/supported in SMG1/3D All Stars.
Tools
The following tools can handle SMG1's BMG (some may have 3D All Stars support, but most don't.)
- Wiimms SZS Tools (wbmgt) (Can convert a BMG to a TXT file. High chance of crashing if you edit with this.)
- Tomato (Can convert a BMG + the TBL file to a XML file and vise versa. Has 3D All Stars Support)