Difference between revisions of "NMS:Tutorials/Mod Creation by Hex Editing MBINs"

From STEP Modding Wiki
(Mod Creation by Hex Editing MBINs)
(Mod Creation by Hex Editing MBINs)
Line 11: Line 11:
 
* Hex Workshop (paid)
 
* Hex Workshop (paid)
 
* HexEdit (mac only?)
 
* HexEdit (mac only?)
 +
* XVI32 (freeware, very small (~1Mb) and portable)
  
 
MBIN Files are all using little indian byte order.<br>
 
MBIN Files are all using little indian byte order.<br>
They all start with a 24 bytes header starting with a 0xCCCCCCCC Magic data.<br>
+
They all start with a 24 (0x18) bytes header starting with a 0xCCCCCCCC Magic data.<br>
Then there's a 72 bytes string reserved for the internal file name.<br>
+
Then there's a 72 (0x48) bytes string reserved for the internal file name.<br>
Rest of the file contains the data.
+
In total the header of an MBINfile is 96 (0x60) bytes.<br>
 +
For details on the header format of MBINfiles see [https://github.com/monkeyman192/MBINCompiler/wiki/MBIN-Header-Format-v0 here]. There are also associated pages which contain the header format for MBIN files produced by MBINCompiler as extra info is added to indicate the version of MBINCompiler used to compile the file.<br>
 +
The rest of the file contains the data.
  
 
{{NMSPageClose}}
 
{{NMSPageClose}}
 
[[Category:No Man's Sky]][[Category:NMS-Tutorial]]
 
[[Category:No Man's Sky]][[Category:NMS-Tutorial]]

Revision as of 03:22, July 31, 2020

BannerLogo
Tutorials // Mod Creation by Hex Editing MBINs

Contents

Mod Creation by Hex Editing MBINs

If the MBIN you want to edit is not supported by MBINCompiler (yet) after an NMS update, you can still edit MBIN files with a hex editor. The MBIN files store the game values in a binary serialized form. In order to update a mod you can use a binary comparison between the original MBIN file (from previous version) and modded MBIN file. Then you can apply the changes you have detected to the new original MBIN file. Sometimes values have shifted and you need to recognize the patterns by human eye.

Here is a HexEditor tool list:

  • 010 (paid, with 30 day trial)
  • HxD (freeware, proprietary)
  • Hex Editor Neo (free, has paid versions)
  • Hex Workshop (paid)
  • HexEdit (mac only?)
  • XVI32 (freeware, very small (~1Mb) and portable)

MBIN Files are all using little indian byte order.
They all start with a 24 (0x18) bytes header starting with a 0xCCCCCCCC Magic data.
Then there's a 72 (0x48) bytes string reserved for the internal file name.
In total the header of an MBINfile is 96 (0x60) bytes.
For details on the header format of MBINfiles see here. There are also associated pages which contain the header format for MBIN files produced by MBINCompiler as extra info is added to indicate the version of MBINCompiler used to compile the file.
The rest of the file contains the data.