Difference between revisions of "DataNode"

From Milo Modding Wiki
Jump to navigation Jump to search
m (whoops forgot 0x06)
m (Switch to official type names from RBVR PDB)
Line 27: Line 27:
!Description
!Description
|-
|-
|INT
|kDataInteger
|0x0
|0x0
|An integer value.
|An integer value.
|-
|-
|FLOAT
|kDataFloat
|0x1
|0x1
|A 32-bit floating point value.
|A 32-bit floating point value.
|-
|-
|VAR
|kDataVar
|0x2
|0x2
|A generic variable. Prefixed by <code>$</code> in DTA.
|A generic variable. Prefixed by <code>$</code> in DTA.
|-
|-
|FUNC
|kDataFunc
|0x3
|0x3
|A function declaration.
|A function declaration.
|-
|-
|OBJECT
|kDataObject(?)
|0x4
|0x4
|A pointer to some sort of object.
|A pointer to some sort of object.
|-
|-
|SYMBOL
|kDataSymbol
|0x5
|0x5
|A pointer to a [[Symbol]].
|A pointer to a [[Symbol]].
|-
|-
|EMPTY
|kDataUnhandled
|0x6
|0x6
|No value. Equivalent to <code>kDataUnhandled</code> in DTA.
|No value.
|-
|-
|IFDEF
|kDataIfdef
|0x7
|0x7
|A conditional checking for the existence of a global macro (such as _SHIP).
|A conditional checking for the existence of a global macro (such as _SHIP).
|-
|-
|ELSE
|kDataElse
|0x8
|0x8
|The 'else' conditional.
|The 'else' conditional.
|-
|-
|ENDIF
|kDataEndif
|0x9
|0x9
|The 'endif' conditional.
|The 'endif' conditional.
|-
|-
|ARRAY
|kDataArray
|0x10
|0x10
|A pointer to a [[DataArray]]. Denoted by <code>()</code> in DTA.
|A pointer to a [[DataArray]]. Denoted by <code>()</code> in DTA.
|-
|-
|COMMAND
|kDataCommand
|0x11
|0x11
|Executable statements/DataFunc calls. Denoted by <code>{}</code> in DTA.
|Executable statements/DataFunc calls. Denoted by <code>{}</code> in DTA.
|-
|-
|STRING
|kDataString
|0x12
|0x12
|A string value. Usually delimited by single or double quotes in DTA.
|A string value. Usually delimited by single or double quotes in DTA.
|-
|-
|OBJECT_PROP_REF
|kDataProperty
|0x13
|0x13
|A pointer to the property of an object. Denoted by <code>[]</code> in DTA.
|A pointer to the property of an object. Denoted by <code>[]</code> in DTA.
|-
|-
|GLOB
|kDataGlob
|0x14
|0x14
|Unknown.
|Unknown.
|-
|-
|DEFINE
|kDataDefine
|0x20
|0x20
|A Macro definition.
|A Macro definition.
|-
|-
|INCLUDE
|kDataInclude
|0x21
|0x21
|A marker indicating that another DTA/DTB should be included in the current file.
|A marker indicating that another DTA/DTB should be included in the current file.
|-
|-
|MERGE
|kDataMerge
|0x22
|0x22
|A marker indicating that another DTA/DTB should be merged into the current file.
|A marker indicating that another DTA/DTB should be merged into the current file.
|-
|-
|IFNDEF
|kDataIfndef
|0x23
|0x23
|A conditional checking for the non-existence of a global macro (such as _SHIP).
|A conditional checking for the non-existence of a global macro (such as _SHIP).
|-
|-
|AUTORUN
|kDataAutorun
|0x24
|0x24
|Unknown.
|Unknown.
|-
|-
|UNDEF
|kDataUndef
|0x25
|0x25
|Undefined value.
|Undefined value.
|}
|}

Revision as of 20:10, 15 April 2022

An object used internally by the Milo engine to represent a value of some type. Arrays of DataNodes are called DataArrays. In a DTB file, the type is explicitly stored, but in DTA files, it is guessed based on the syntax and keywords.

Structure

Name Size Function
Value 4 bytes The value of the DataNode.
Type 4 bytes The type of the DataNode.

Types

Each Milo game supports a different set of types for a DataNode. The amount of types gradually increased as Milo's scripting engine became more capable over the years.

Rock Band 3

Type Name Value Description
kDataInteger 0x0 An integer value.
kDataFloat 0x1 A 32-bit floating point value.
kDataVar 0x2 A generic variable. Prefixed by $ in DTA.
kDataFunc 0x3 A function declaration.
kDataObject(?) 0x4 A pointer to some sort of object.
kDataSymbol 0x5 A pointer to a Symbol.
kDataUnhandled 0x6 No value.
kDataIfdef 0x7 A conditional checking for the existence of a global macro (such as _SHIP).
kDataElse 0x8 The 'else' conditional.
kDataEndif 0x9 The 'endif' conditional.
kDataArray 0x10 A pointer to a DataArray. Denoted by () in DTA.
kDataCommand 0x11 Executable statements/DataFunc calls. Denoted by {} in DTA.
kDataString 0x12 A string value. Usually delimited by single or double quotes in DTA.
kDataProperty 0x13 A pointer to the property of an object. Denoted by [] in DTA.
kDataGlob 0x14 Unknown.
kDataDefine 0x20 A Macro definition.
kDataInclude 0x21 A marker indicating that another DTA/DTB should be included in the current file.
kDataMerge 0x22 A marker indicating that another DTA/DTB should be merged into the current file.
kDataIfndef 0x23 A conditional checking for the non-existence of a global macro (such as _SHIP).
kDataAutorun 0x24 Unknown.
kDataUndef 0x25 Undefined value.