Skip to content

Event Flows

In Tomodachi Life (3DS), a core component of the games engine revolves around event flows. Event flows create cutscenes by describing actions preformed on objects and or Miis in a flowchart style format.

Tomodachi Life utilizes the MSBF file format to make this work. MSBF is closely linked with MSBT files and their attributes so several properties of scenes can be modified.

In the case of folders like Drama, all events must contain the three following files (example event name):

romfs/message/Drama
Drama_Tool:
>> ToolBath.msbf
>> ToolBath.msbt
>> ToolBath_Build.msbt

ToolBath.msbf is a MSBF file that stores the event flow.

ToolBath.msbt is a MSBT file that stores normal message text data for referencing.

ToolBath_Build.msbt is a MSBT files store which relevant scene data as Attributes.

Each label in the file follows the bottom list of attributes, however not all attribute fields are necessary.

NameDatatypeDescription
FolderlistThe name of the folder the event is located in.
RequestedScenelistThe requested scene folder.
bl_LabelstringAlias for how the item should be referenced. May be utilized in other attribute labels or in MSBF node parameters
bl_BinaryPassstringAbsolute path to the file reference
bl_FileLabelstringA bl_label alias. Used in other labels to reference a file set to the alias.
bl_DataNamestringLabel of an item in the alias.
bl_SceneLabelstringThe scene to set the data to (?).
bl_Screenlist_scene attributes only. To display the scene on the upper or lower 3DS screen.
bl_LightSetstring-
bl_SRTBonestring-
bl_Posstring-
bl_AnimstringAnimation name (if applicable).
bl_ExpFlagstring_mii attributes only. Mii Expression flag (Examples: 1,9, 1,9,0,8).
bl_Bodystring_mii attributes only. Sets the clothing for a Mii.
bl_Headwearstring_mii attributes only. Sets the hat for a Mii.
bl_RoomIds8-
bl_ItemListstring-
bl_LightParentCamerastring-
bl_AnimControlleru8-
bl_MiiResolutionlistSets the resolution of Mii faces in the scene.
bl_MiiNoMaskWhenHoldingbool-
bl_ItemEffectlistDetermines if items have effects in the scene.

Folder

  • Confession
  • Drama
  • Dream
  • External
  • SnapShot
  • StaffRoll
  • Tool
  • WandererWatch

RequestedScene

  • Drama
  • Dream
  • Tool
  • Propose
  • WandererWatch
  • Snapshot
  • StaffRoll
  • Ar
  • Etc

bl_Screen

  • Upper
  • Lower
  • None

bl_MiiResolution

  • CFL_RESOLUTION_64
  • CFL_RESOLUTION_128
  • CFL_RESOLUTION_256
  • CFL_RESOLUTION_64M
  • CFL_RESOLUTION_128M
  • CFL_RESOLUTION_256M

bl_ItemEffect

  • EffectOff
  • EffectOn

Following describes and document node types and their identifers to build a comprehensive view on MSBF functions.

Message Nodes reference a message in a MSBT file. These may be used for when Miis talk, buttons are prompted or a caption is shown on screen.

Message Nodes always take in two parameters:

  • FileIndex: Refers to the index of the the MSBT file in an archive.
  • MessageIndex refers to the index of the message in that file.

Branch Nodes alter the flow of the event depending on a specific condition.

NameIdentifierParametersParameter typeNode Description
EvalulateVariable0expression5Acts like a normal boolean check. 0 = False, 1 = True. Example: $s < 3
SwitchVariable1var5Acts like a switch statement. Matches against the value of the variable
EvaluateMiiGender15mii5Evalutes the gender of a Mii. 0 = Male 1 = Female

Event Nodes preform a wide range of actions on objects, the game state or Miis.

NameIdentifierParametersParameter typeNode Description
SetVariableValue3expression5Sets the value of a variable in a string expresion (i.e. $s = 5)
SelectMii39mii5Selects a Mii for use in the scene
SetMiiPos41mii5Sets the position of a Mii in the scene. Utilizes nodes from the bcres scene loaded
PlayMiiAnimation44mii5Plays an animation on a selected mii. Must use selectMii before running this node
SetupMessage48?, ?1Setup a message. Always runs before a Message node.
SetupUiButtonPrompt58var5Setup a Ui button prompt and store the user selection in var. Next node must be a Message Node
LoadSEGroup90name5Loads a sound effect group
PlaySE96name5Plays a sound effect from the loaded group

In event flows, the game can create and store values in variables created utilizing nodes. Variables always start with the $ prefix.

Values can be reassigned, modified and or evaluated to alter the flow of the event. This very common across all event flows present in the game.

A common example is diverting the flow to a specific flowchart depending on a button that was clicked. SetupUiButtonPrompt prompts a set of buttons. Once a button is clicked, it returns the index of the button selected and stores the value in the var parameter. This variable can now be evaluated using the SwitchVariable node to determine which button was clicked.