TREE (File Format): Difference between revisions

m
>Aruki
(Created page with "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...")
 
>Aruki
 
(3 intermediate revisions by the same user not shown)
Line 24: Line 24:
| 0x4
| 0x4
| u32
| u32
| '''Root Node Index'''
| '''Root Node Instance ID'''
| Points to a SCND object named RootTreeNode.
| Should point to a <code>SCND</code> object. The original file points to one named RootTreeNode.
|-
|-
| 0x8
| 0x8
Line 42: Line 42:
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:
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 [[EditorParameters]], which contains an instance name, an "active" flag, and a position/rotation/scale, even though none of them actually needs it.
* 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 (Metroid Prime)|STRG file]] that 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.
* Every node has a name. In the data, this is represented with a resource ID for a [[STRG (Metroid Prime)|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) ===
=== SCND (Category) ===


The <code>SCND</code> 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'' (<code>ATCH</code>) to the target child node on state ''Connect'' (<code>CONN</code>). The progress bars that appear on the right side of the  
The <code>SCND</code> 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'' (<code>ATCH</code>) to the target child node on state ''Connect'' (<code>CONN</code>). 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.


{| class="wikitable"
{| class="wikitable"
Anonymous user