NoMansSky:The Modding Basics

From Step Mods | Change The Game
(Redirected from NoMansSky/Getting Started)
Nomanssky flare.png

The Modding Basics

Introduction

This guide will tell you how to access game files to be able to modify and then repack them into a working mod.

NMS modding essentialy requires 2 simple tools  :

Unpacking the game assets

No Man's Sky stores all of its assets, from textures to models, shaders code to entity behaviors in the form of .pak files.
These .pak files are compressed using the known Playstation PSARC Format initially and they each stores a specific part of all the game assets.

The simplest way to extract (and later repack) these files is PSARCTool.
For this tutorial, you simply need to download PSARCTool and unzip it anywhere you like.

All the .pak files are located in the game PCBANKS folder but its path is different for Steam and for Gog :

  • for Steam : /Steam/steamapps/common/No Man's Sky/GAMEDATA/PCBANKS
  • for Gog : /GOG Galaxy/Games/No Man's Sky/GAMEDATA/PCBANKS/

All you have to do now is to drag and drop any or all the .pak files over the Psarctools executable (for our example here, we would just need to extract NMSARC.globals.pak file) and it will unpack the game assets stored in these files.

Warning-Logo.png
WARNING:
- Be sure to have some free space on your hard drive. As of the 5.12 Update, the whole assets occupy 45 GB !
- The unpacking process usually takes anywhere between 2 minutes on a fast NVME SSD and 15-25 minutes on a standard HDD.

Decompiling MBIN files

Once all the Psarctools command windows will be closed, you might notice a lot of new .MBIN files and folders in the PCBANKS folder. These are the game assets folders.

The most common file type you will see throughout these new folders are indeed .MBIN files.
These are basically compiled XML files containing the bulk of configurations the game reads such as global settings, procedural generation rules, item databases, behaviors of in-game objects, and so on. But in a binary format. So they need a second step to be decompiled into a more human-readable form and this can be done thanks to a tool named MBINCompiler.

Once again, you just need to unzip MBINCompiler anywhere and it is ready to use.

All the details on how to use MBINCompiler are summed up in the How to use MBINCompiler page but basically, you can just drag and drop any .MBIN file over the MBINCompiler executable and it will convert it into an .EXML file.

To start with NMS modding, the most impactful files are GLOBALS. Globals are configuration files storing all the NMS global settings and you will find them at the root of your unpaked files. In order to create your first mod, convert an .MBIN file with a name pointing toward a theme you would like to change in NMS, like GCSKYGLOBALS.GLOBALS.MBIN or GCSPACESHIPGLOBALS.GLOBALS.MBIN.

Editing files

Once in .EXML format, you can now open the file with a text editor (Notepad++ is highly recommended).

You can now observe the long list of setting names and values and make your first changes. Don't be shy. Even if there's plenty of them and they are sometimes weirdly labelled, most properties are self-explanatory. Choose one you guessed the effect in game and change its value.

Of course, guesses are not always immeditalety rewarding. The result can sometimes greatly vary from what you initialy guessed so if you see no change in game, be sure to try another change.

Creating your first mod

When you're done with your changes, save the .exml file.

You will now need to do the reversed operations :

  • Drag and drop the .EXML file on MBINCompiler will rebuild a .MBIN file
  • Drag and drop the .MBIN file over PsarcTool will rebuild a .pak file

Note that you don't need to repack all the files you initaly extracted from the .pak. In fact, to get small and compatible mods, it's better to only repack files you needed to edit for the mod (here, a single .MBIN file).

Also note that if the edited files are in a game subfolder (like TEXTURES), you will need to keep the folder and drag it over PsarcTools to store the file path. Here again, you only need to include the modified files and the folders that contain them. You can get more details about this on this page describing PSARCTool.

Testing your mod

A psarc.pak file has appeared in the same folder as the Psarctools executable ?

Well done, you created your very first mod ! Just rename it to something more tasty and copy this .pak like any mod in the PCBANKS/MODS folder (and be sure you removed the DISABLEMODS.txt file).

It is now time to start the game and check in game if you guessed well and if your changes are impactful. The first of many many tests to come :)