LMS > Overview > Flow Chart (MSBF)
This file is identified by the magic number MsgFlwBn. The format holds flowcharts.
This page describes file format version 3.
This section stores a global pool of all nodes in the file.
Actions defined within the FLW3 Section are done via nodes.
Value Type Description
1 Message Prompts a message from an MSBT file
2 Branch Branches to a different node depending on a specific condition
3 Event Executes a specific action or game event
4 Entry Node that acts as a starting point for a flowchart
5 Jump Jumps to a node in the current file or an external MSBF
The parameter type determines how the 4 byte parameter data will be parsed by the game. Once the data has been interpreted, the values obtained are passed to the node as arguments.
Value Arguments
0 u32
1 u16, u16
2 u16, u8, u8
3 u8, u8, u16
4 u8, u8, u8, u8
5 str (offset from start of block to string in string table )
6 u32
Offset Size Description
0x0 2 Next node index
0x2 2 MSBT file index
0x4 2 Message index into TXT2
0x6 2 Unused
The MSBT file index refers to a file in the CTI1 block of an MSBP fiile or a game-specific mapping.
Offset Size Description
0x0 2 0xFFFF
0x2 2 Condition identifier
0x4 2 Branch table case count
0x6 2 Starting index into the branch table
Offset Size Description
0x0 2 Next node index
0x2 2 Event identifier
0x4 4 Unused
The node identifier allows a game to link the node to a specific action or condition. Duplicate identifiers can exist, it is up to the game to determine how these route to their own functionality.
Offset Size Description
0x0 2 Next node index
0x2 6 Unused
Offset Size Description
0x0 2 Next node index
0x2 2 MSBF file index (0xFFFF for current file)
0x4 4 Unused
The MSBF file index refers to a file in the CTI1 block of an MSBP file or a game-specific mapping.
The next node index when marked as 0xFFFF is the end of a flowchart unless it is a branch node.
Nodes that are branch will jump to a specific case based on a condition. These function like switch statements.
Offset Size Description
0x0 List of node indices
Offset Size 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 .