-
Notifications
You must be signed in to change notification settings - Fork 51
MBIN Header Format v2
See also:
Offset | Size | Type | Name |
---|---|---|---|
0x0000 | 0x0004 | uint32 | MagicID |
0x0004 | 0x0004 | uint32 | FormatID |
0x0008 | 0x0008 | uint16[4] | Version |
0x0010 | 0x0008 | uint64 | TemplateGUID |
0x0018 | 0x0040 | char[64] | TemplateName |
0x0058 | 0x0008 | uint64 | MetaOffset |
MagicID (Vanilla)
FormatID:
In Vanilla this is always 2500 and only requires the first 2 bytes of the int.
We will use the 3rd byte to indicate the libMBIN format version.
For header format v2, this byte would be 2 and the value of the version
field (uint32) would become:
(2 << 16) + 2500 = 133572
(0xC4090200
instead of 0xC4090000
)
As well as what format version, this will serve to identify that the MBIN file was actually compiled with libMBIN.
IE. If this field is 2500, then it's format v0 or v1, otherwise the 3rd byte indicates the actual format version.
Version:
The libMBIN version will now be stored here, overwriting the original timestamp field
instead of overwriting TemplateGUID.
It will no longer be stored as a string. The version will be stored as 4 shorts for a total of 8 bytes.
Each short will store the value of the corresponding version component: Major.Minor.Release.Prerelease
TemplateGUID (Vanilla)
TemplateName (Vanilla)
MetaOffset:
This will have the offset from the start of the file to the end of the MBIN data, where the metadata will be stored.