DataNode

From Milo Modding Wiki
Jump to navigation Jump to search

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 Type Size Function
mValue Varies 4 bytes The value of the DataNode.
mType DataType 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 A length of binary data. Effectively unused.
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. Merging is done by bringing in array elements that are not already defined.
kDataIfndef 0x23 A conditional checking for the non-existence of a global macro (such as _SHIP).
kDataAutorun 0x24 Automatically executes a kDataCommand upon loading.
kDataUndef 0x25 Undefines a defined macro.