NMS:Tutorials/Getting Started

From STEP Modding Wiki
< NMS:Tutorials
Revision as of 20:13, August 10, 2020 by Lo2k (Talk | contribs)

Getting Started



This quick guide has the goal of quickly introducing fundamental aspects to modding No Man's Sky without going into many specifics.
Primarily this focuses on accessing your game files and introducing some core tools involved with modding.

Unpacking the Game Assets

No Man's Sky stores all of its assets, from textures to models, shaders code to entity behaviors under the No Man's Sky/GAMEDATA/PCBANKS folder, in the form of .PAK files.
.PAK files are compressed archive files originaly designed for PlayStation games.

In order to extract assets from the archives, you may use either the PSARCTool or NMS Modding Station.
For this tutorial, we will use NMS Modding Station as it is easy to use : simply download it, unzip anywhere you like, and follow the instructions - or continue to read as this will guide you on how to use it.

Upon double-clicking the .exe it may initially appear dysfunctional, but this is because you first need go to Setup -> Settings and configure the paths to the PCBANKS folder and a folder for where you want to unpack all the assets.

Each .PAK files stores a part of all the game assets. While some modders prefer to unpack specific files, it is preferable to unpack all of the game's archives. Be sure to have at least up to 25 GB free on your hard drive though as as of the 2.61.1 Update, about 24.1 GB of space is used by all unpacked assets.

Info-Logo.png      Notice:Remember you will need to re-unpack all the game assets each time Hello Games will release a new patch/update.

In order to begin unpacking, you first have to setup a few directories from the Setup menu:

  • Set Path to Unpacked Game Files - This is a folder you will create, in which all the No Man's Sky files will be unpacked. It is preferable to have made your unpacked directory in the same folder as the original /PCBANKS/, like /GAMEDATA/ but it is not essential.
  • Set Path to MBINCompiler - The folder where you stored MBINCompiler, one of the tools you downloaded. It is preferable to place this in a different directory as you will come back to this tool very frequently.
  • Set Path to PCBANKS - The path to the No Man's Sky .pak source files. Its location differs if you got the game on Steam (\Steam\steamapps\common\No Man's Sky\GAMEDATA\PCBANKS\) or GOG (\GOG Galaxy\Games\No Man's Sky\GAMEDATA\PCBANKS\).

After you are done with these steps, simply select Unpack Game Files from the Setup dropdown menu in NMS Modding Station.

Warning-Logo.png      Warning:The unpacking process usually takes anywhere between 10-15 minutes on a SSD and 15-25 minutes on a standard HDD.

Decompiling MBIN files

After NMS Modding Station has finished unpacking, your unpacked directory should now show a lot of folders and files. These are the game assets.

The most common file type you will see throughout these new folders are .MBIN files. These are basically serialized XML files. These files contain the bulk of configurations the game reads such as global settings, procedural generation rules, item databases, behaviors of in-game objects, and so on.

Since .MBIN files are in a raw format, you will need to decompile these files into a more human-readable form with the use of MBINCompiler.

To decompile .MBIN files, just drag them onto the MBINCompiler executable. This will create .EXML files with the same name that can be opened with any text editor. And dragging an .EXML file back onto MBINCompiler will do the reverse, including any change you made.

Info-Logo.png      Notice:Be sure to make a copy of any .MBIN you want to edit in a project folder of your choice before editing them. This way you will keep all the original game files without having to unpack the archives all over again because you once edited them for another project.

Creating your first mod

To start with NMS modding, the most impactful files are the GLOBALS. Globals are configuration files storing all NMS global settings and you will find them all at the root of your unpaked files.
Pick a file with a name that points toward a theme you would like to change in NMS, like SkyGlobals or AISpaceShipGlobals. Then right-click and choose "Decompile" to decompile it and double-click it to open your text editor (Notepad++ is recommended). You can now observe the long list of setting names and values and make your first changes.

When you're done, do not forget to recompile the edited .EXML into a .MBIN by right clicking on the .exml and choosing "Recompile".
Then right-click on the .mbin and choose "Pack Mod" to recreate the .pak from the .mbin file.
You can now right-click and choose "Copy to your MODS folder" and launch NMS to test your changes in game !