DDL Parse Trees - RainMz/NintendoClients GitHub Wiki
You may be surprised to see the real names of parameter and structure members on many of the wiki pages. NEX has automatically generated the code that encodes/decodes method parameters and structures from a data definition language (DDL), and many games contain the parse tree of the DDL declarations in their data segment. It's encoded in big-endian byte order (regardless of the platform) and looks as follows:
Type |
Description |
Uint32 |
Magic number (0xCD652312) |
Uint8 |
Unknown (always 0) |
Uint32 |
Major version |
Uint32 |
Minor version |
Uint32 |
Micro version |
Uint32 |
Build version |
NameSpace |
Root namespace |
NameSpace
Type |
Description |
Uint32 |
Number of elements (N) |
Element (N) |
Namespace elements |
Element
Type |
Description |
Uint8 |
Type id |
|
Body |
String
Type |
Description |
Uint32 |
Length (N) |
Bytes (N) |
String (without null terminator) |
DeclarationUse
Type |
Description |
Uint8 |
Declaration type (see element) |
String |
Full type name |
Only if declaration type is TemplateInstance:
Type |
Description |
String |
Base type name |
Uint8 |
Number of arguments (N) |
DeclarationUse (N) |
Argument declaration use |
ParseTreeItem
NameSpaceItem
The second parse tree item is always the same as the first parse tree item. I don't know why it's stored twice.
Declaration
DOClassDeclaration
DatasetDeclaration
TypeDeclaration
MethodDeclaration
Variable
RMC
Action
AdapterDeclaration
PropertyDeclaration
Type |
Description |
Declaration |
Declaration |
Uint32 |
Category mask |
Uint32 |
Allowed target mask |
ProtocolDeclaration
Parameter
Type |
Description |
Variable |
Variable |
DeclarationUse |
Declaration use |
Uint32 |
Array size |
Uint8 |
Type (1=input, 2=output, 3=both) |
ReturnValue
ClassDeclaration
TemplateDeclaration
Type |
Description |
TypeDeclaration |
Type declaration |
Uint32 |
Number of template arguments |
SimpleTypeDeclaration
TemplateInstance
Type |
Description |
TypeDeclaration |
Type declaration |
String |
Base type name |
Uint32 |
Number of template arguments (N) |
String (N) |
Template arguments |
DDLUnitDeclaration
DupSpaceDeclaration