TREE (File Format)

The TREE format is used to set up the pause menu hierarchy in Metroid Prime 2: Echoes. It's found in 95b61279.DUMB in LogBook.pak. The format name comes from the  fourCC at the beginning of the file.

Format
After the file header, the TREE format embeds a script layer using the scriptable layers format.

Script Objects
The TREE format uses script objects to set up the hierarchy. There are five object types present, each representing a different node type in the hierarchy: a category, a scan, an inventory item description, an options slider, or an options menu. There are a few common parameters to all these object types:


 * They all include EditorProperties, which contains an instance name, an "active" flag, and a position/rotation/scale, even though none of them actually needs it.
 * Every node has a name. In the data, this is represented with a resource ID for a STRG file and the name of one of the strings in that file. The name is used to look up the actual string, which is then displayed ingame in the pause menu.

SCND (Category)
The  object represents a category. Categories don't have very many properties; they do most of their work through the connections system instead. Category nodes are able to use their connections to mark other nodes as children. They do this by sending the message Attach to the target child node on state Connect. The progress bars that appear on the right side of the pause screen are set up automatically based on how many children the category has and how many of them are visible.

SCSN (Scan)
represents a scan node in the logbook. They're initially invisible, but they appear when the player obtains the corresponding scan.

SCIN (Inventory)
works basically the same way as, except it's used to display descriptions of inventory items instead of logbook scans. The main difference is that  nodes have an inventory slot parameter; they're initially hidden, and they appear when the player collects an upgrade in the corresponding slot.

SCSL (Slider)
is used to represent a slider for the options menu.

SCMN (Menu)
represents a multiple-choice menu for the options menu. It supports up to four menu options, although the game only uses three.