MBIN: Difference between revisions
(Created page with "Category:TechDocs MBIN files are located inside the GAMEDATA folder inside the PAK files. They are a binary serialization of the XML Data values uses to populate each property only (strings, ints, etc) but contain no information on the data structure, such as the name or type of each value. The data structure of the MBIN (and XML) is stored inside the NMS.EXE executable. However, the name of each property in cases like *GLOBALS*.MBIN files were missing in p...") |
EthanRDoesMC (talk | contribs) m (→Naming) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
[[MBINCompiler]] can be used to decompile and recompile MBIN files, however as each No Man's Sky version has changes to it's main executable, a different MBINCompiler version is needed that matches the No Man's Sky version that the MBIN files come from. | [[MBINCompiler]] can be used to decompile and recompile MBIN files, however as each No Man's Sky version has changes to it's main executable, a different MBINCompiler version is needed that matches the No Man's Sky version that the MBIN files come from. | ||
== EXML == | |||
MBINs extracted with MBINCompiler use an XML variant called EXML, which is based off of the mXML format that Hello Games uses. | |||
Each EXML document has a root element <code><Data></code>, which has one required attribute, <code>template</code>. This tells MBINCompiler what class it should <sup>de?</sup>serialize the EXML into. | |||
The children of the Data element are all <code><Property></code> elements, each of which represents a property of the class. A property element can have a <code>name</code>, a <code>value</code>, or both, but not neither. <code>name</code> represents the name of the property. <code>value</code> can be the literal value of the property, with an implicit type, or it can represent a data type (usually vectors or other classes) by being set to <code>datatype.xml</code>, where datatype is the class you want to use. When doing this, the children of the Property element will reflect a standalone EXML of that data type, minus the Data tag. | |||
An example of a .mXml document can be found in <code>/BINARIES/SETTINGS</code>. | |||
== Naming == | |||
[[PAK]]s are case-insensitive for file names. Thus, all extracted MBINs have uppercase file names. Based on information gathered from the game’s MBINs<sup>[example?]</sup>, though, we can infer a few things about how Hello Games tends to capitalize files. | |||
* Files and folders are named using PascalCase. | |||
* File sub-extensions are lowercased. | |||
* The proper name of the XML format that No Man’s Sky uses is “mXml”. | |||
For example, we can assume that the mXml corresponding to <code>MATERIALS/BACKGROUNDFROMTEXTURE.MATERIAL.MBIN</code> is <code>Materials/BackgroundFromTexture.material.mXml</code>. | |||
This is a much simpler way to refer to files in the game.<sup>[how so?]</sup> |
Latest revision as of 08:40, 20 March 2023
MBIN files are located inside the GAMEDATA folder inside the PAK files. They are a binary serialization of the XML Data values uses to populate each property only (strings, ints, etc) but contain no information on the data structure, such as the name or type of each value.
The data structure of the MBIN (and XML) is stored inside the NMS.EXE executable. However, the name of each property in cases like *GLOBALS*.MBIN files were missing in pre-NEXT versions. In these cases "Unknown" is used instead.
MBINCompiler can be used to decompile and recompile MBIN files, however as each No Man's Sky version has changes to it's main executable, a different MBINCompiler version is needed that matches the No Man's Sky version that the MBIN files come from.
EXML
MBINs extracted with MBINCompiler use an XML variant called EXML, which is based off of the mXML format that Hello Games uses.
Each EXML document has a root element , which has one required attribute,
template
. This tells MBINCompiler what class it should de?serialize the EXML into.
The children of the Data element are all <Property>
elements, each of which represents a property of the class. A property element can have a name
, a value
, or both, but not neither. name
represents the name of the property. value
can be the literal value of the property, with an implicit type, or it can represent a data type (usually vectors or other classes) by being set to datatype.xml
, where datatype is the class you want to use. When doing this, the children of the Property element will reflect a standalone EXML of that data type, minus the Data tag.
An example of a .mXml document can be found in /BINARIES/SETTINGS
.
Naming
PAKs are case-insensitive for file names. Thus, all extracted MBINs have uppercase file names. Based on information gathered from the game’s MBINs[example?], though, we can infer a few things about how Hello Games tends to capitalize files.
- Files and folders are named using PascalCase.
- File sub-extensions are lowercased.
- The proper name of the XML format that No Man’s Sky uses is “mXml”.
For example, we can assume that the mXml corresponding to MATERIALS/BACKGROUNDFROMTEXTURE.MATERIAL.MBIN
is Materials/BackgroundFromTexture.material.mXml
.
This is a much simpler way to refer to files in the game.[how so?]