NoMansSky:Creating Mods From MBINs: Difference between revisions

From Step Mods | Change The Game
mNo edit summary
Line 11: Line 11:
{{Notice Small|text=Beware, sometimes new values are added into the files and some values have shifted. In that case, you will need to recognize the patterns by human eye.}}
{{Notice Small|text=Beware, sometimes new values are added into the files and some values have shifted. In that case, you will need to recognize the patterns by human eye.}}


Here is a list of Hexadecimal Editors:
== Hexadecimal Editors ==
there are a lot of Hexadecimal editor available. Here is a list of some of them:
* 010 (paid, with 30 day trial)
* 010 (paid, with 30 day trial)
* HxD (freeware, proprietary)
* HxD (freeware, proprietary)
Line 19: Line 20:
* XVI32 (freeware, very small (~1Mb) and portable)
* XVI32 (freeware, very small (~1Mb) and portable)


== What's inside MBIN files ? ==
== The Header ==
First, you need to know that MBIN Files are all using little indian byte order. So before anything, set your Hexadecimal editor to read values in little indian order.<br>
 
All MBIN files start with a 24 (0x18) bytes header composed as follow :
All MBIN files start with a 24 (0x18) bytes header composed as follow :
* Magic Data which is 4 bytes long. It is 0xCCCCCCCC for MBIN files and is 0xDDDDDDDD for MBIN.PC files.<br>
* Magic Data which is 4 bytes long. It is 0xCCCCCCCC for MBIN files and is 0xDDDDDDDD for MBIN.PC files.<br>
Line 33: Line 32:
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>
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. This can't be detailed here as each MBIN file has a different data structure.
The rest of the file contains the data. This can't be detailed here as each MBIN file has a different data structure but this won't be an issue as most of the time, we don't need the structure to make the needed changes.
 
== Editing MBIN files ==
First, you need to know that MBIN Files are all using little indian byte order. So before anything, set your Hexadecimal editor to read values in little indian order.<br>


{{NMSPageClose}}
{{NMSPageClose}}
[[Category:No Man's Sky]][[Category:NMS-Tutorial]]
[[Category:No Man's Sky]][[Category:NMS-Tutorial]]

Revision as of 08:39, August 11, 2020

Template:TOC right

Mod Creation by Hex Editing MBINs[edit | edit source]

If the MBIN you want to edit is not yet supported by MBINCompiler after an NMS update, you can still edit it with an hexadecimal editor.

For example, you want to update a mod that does not work anymore after the update.

  1. Use a binary comparison between the original MBIN files and modded MBIN files (both from previous NMS version).
  2. Note the changes and apply them to the new MBIN files from latest NMS version.
  3. Done

Template:Notice Small

Hexadecimal Editors[edit | edit source]

there are a lot of Hexadecimal editor available. Here is a list of some of them:

  • 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)

The Header[edit | edit source]

All MBIN files start with a 24 (0x18) bytes header composed as follow :

  • Magic Data which is 4 bytes long. It is 0xCCCCCCCC for MBIN files and is 0xDDDDDDDD for MBIN.PC files.
  • Format ID, a 4 bytes long integer
  • Time stamp, an 8 bytes long integer
  • Template GUID, an 8 bytes long integer

Then there's a 72 (0x48) bytes string reserved for the internal file name.
So 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. This can't be detailed here as each MBIN file has a different data structure but this won't be an issue as most of the time, we don't need the structure to make the needed changes.

Editing MBIN files[edit | edit source]

First, you need to know that MBIN Files are all using little indian byte order. So before anything, set your Hexadecimal editor to read values in little indian order.

Template:NMSPageClose