Skip to content

Message Binary Flowchart (MSBF)

MSBF (Message Studio Binary Flowchart) is a file format that stores flowcharts utilized as event flows.

TypeDescription
FLW3Nodes
FEN1Flowchart Labels
REF1?

FLW3 stores every node in all flowcharts.

OffsetTypeDescription
0x0u16Node count
0x2s16Branch ID Count
0x4padding [12]-
0x10Nodes [nodeCount]The node data.
s16 [branchIdCount]Branch table
String table

Actions defined within the FLW3 section are done via nodes.

OffsetTypeDescription
0x0u8Node type
0x1u8Parameter type (Only for Branch Nodes and Event Nodes)
0x2padding [2]-
0x4-Parameter value
0x8-Node data
ValueTypeDescription
0x1MessagePrompts a message from a MSBT file
0x2BranchBranches to a different node depending on a specific condition
0x3EventExecutes a specific action or game event
0x4EntryNode that acts as a starting point for a flowchart
0x5JumpJumps 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.

ValueTypeDescription
0x0s32Signed 32 bit integer
0x1[s16, s16]Signed 16 bit integers.
0x2s16 + s8 [2]Signed 16 bit integer + Signed 8 bit pair
0x3s8 [2] + s16Signed 8 bit pair + Signed 16 bit integer
0x4s8 [4]Signed 8 bit integer array
0x5stringString value. Stored as a u32 pointer to string table
0x6s32Signed 32 bit integer
OffsetTypeDescription
0x0s16Next node ID
0x2u16MSBT file index into folder or archive
0x4u16Message index into TXT2
0x6padding [2]-
OffsetTypeDescription
0x0s16-1 (no next node ID)
0x2u16Node Identifier
0x4u16Branch table case count
0x6u16Starting index into the branch table
OffsetTypeDescription
0x0s16Next node ID
0x2u16Node identifier
0x4padding [3]-

The node identifier allows a game to link the node to a specific action or condition.

OffsetTypeDescription
0x0s16Next node ID
0x2padding [6]-
OffsetTypeDescription
0x0s16Flowchart ID
0x2padding [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.

OffsetTypeDescription
0x0s16 [branchIdCount]List of node IDs
OffsetTypeDescription
0x0List of null-terminated strings

This block contains the flowchart labels. The index of a flowchart is the location of its Entry node.