MSBF (Message Studio Binary Flowchart) is a file format that stores flowcharts utilized as event flows.
FLW3 stores every node in all flowcharts.
| Offset | Type | Description |
|---|
| 0x0 | u16 | Node count |
| 0x2 | s16 | Branch ID Count |
| 0x4 | padding [12] | - |
| 0x10 | Nodes [nodeCount] | The node data. |
| s16 [branchIdCount] | Branch table |
| | String table |
Actions defined within the FLW3 section are done via nodes.
| Value | Type | Description |
|---|
| 0x1 | Message | Prompts a message from a MSBT file |
| 0x2 | Branch | Branches to a different node depending on a specific condition |
| 0x3 | Event | Executes a specific action or game event |
| 0x4 | Entry | Node that acts as a starting point for a flowchart |
| 0x5 | Jump | Jumps to a different flowchart |
Parameter types dictate how parameter values may be passed into the node if it takes arguments.
The parameter stream always takes up 4 bytes. Not all values may utilized.
| Value | Type | Description |
|---|
| 0x0 | s32 | Signed 32 bit integer |
| 0x1 | [s16, s16] | Signed 16 bit integers. |
| 0x2 | s16 + s8 [2] | Signed 16 bit integer + Signed 8 bit pair |
| 0x3 | s8 [2] + s16 | Signed 8 bit pair + Signed 16 bit integer |
| 0x4 | s8 [4] | Signed 8 bit integer array |
| 0x5 | string | String value. Stored as a u32 pointer to string table |
| 0x6 | s32 | Signed 32 bit integer |
| Offset | Type | Description |
|---|
| 0x0 | s16 | Next node ID |
| 0x2 | u16 | MSBT file index into folder or archive |
| 0x4 | u16 | Message index into TXT2 |
| 0x6 | padding [2] | - |
| Offset | Type | Description |
|---|
| 0x0 | s16 | -1 (no next node ID) |
| 0x2 | u16 | Node Identifier |
| 0x4 | u16 | Branch table case count |
| 0x6 | u16 | Starting index into the branch table |
| Offset | Type | Description |
|---|
| 0x0 | s16 | Next node ID |
| 0x2 | u16 | Node identifier |
| 0x4 | padding [3] | - |
The node identifier allows a game to link the node to a specific action or condition.
| Offset | Type | Description |
|---|
| 0x0 | s16 | Next node ID |
| 0x2 | padding [6] | - |
| Offset | Type | Description |
|---|
| 0x0 | s16 | Flowchart ID |
| 0x2 | padding [6] | - |
The next node index when marked as -1 is the end of a flowchart unless it is a branch node. Branch nodes will move to the
next node depending on the condition that it is checking.
The next node for a jump node must refer to the ID of the entry node for another flowchart.
Branch nodes will jump to a specific node based on a condition. These function identically to switch statements.
| Offset | Type | Description |
|---|
| 0x0 | s16 [branchIdCount] | List of node IDs |
| Offset | Type | Description |
|---|
| 0x0 | | List of null-terminated strings |
This block contains the flowchart labels. The index of a flowchart is the location of its
Entry node.