About this mod
Repacks No Man's Sky base game files with compression disabled for performance benefits and elimination of many lag spikes.
- Permissions and credits
- Mirrors
HelloGames has finally addressed the lag spikes issue by changing the archive format to an entirely new one that is less heavy to decompress. This page will remain up for potential uses by the No Man's Sky Retro community. Thanks for using NMS-Decompressinator, but it should no longer be necessary! Have fun out there, Travellers!
Original Description:
Decompressinator is a Windows batch script that uses PSARC and NMSResign to automatically process the game .pak files by unpacking them and repacking with compression disabled.
This, in most cases, will significantly improve game performance by eliminating CPU spikes caused by on-the-fly .pak decompression without running the game files fully unpacked, which is another method that itself introduces significantly longer loading times due to the file system strain caused by the game needing to open handles to thousands of files.
In most cases, it completely eliminates commonly experienced lag spikes when leaving the atmosphere of a planet, calling in freighters, and many other similar lag spikes that occur when the game needs to decompress data from a .pak file during gameplay. It may also improve loading times more generally, such as when loading into a save file, warping from system to system, or using teleporters. Because it addresses these lag spikes, other similar mods that may address these some of these things individually are rendered moot by using this, so you may be want to adjust what mods you load accordingly.
Anecdotally, I've been told that this seems to improve performance more for Worlds Part 1 than previous updates. Perhaps Worlds introduces more decompression-caused chokepoints? Feel free to let me know of your experiences in the posts section above.
So, how and why does this work?
Basically, this improvement happens because decompressing and repacking the files as is, you are dropping the requirement for the game to spend CPU cycles on decompression during any loading situation, and are instead relying on your disk's raw read speed to get the necessary files quicker instead. Decompressed .pak files are much larger than compressed .pak files, so it's highly recommended you store No Man's Sky on a very fast reading disk, such as any decent quality SSD from a reputable brand. Extremely poor quality/no-name brand SSDs and slow or fragmented mechanical hard disks may actually see performance losses in some cases if this script is used, since the reason the performance gains occur depends on having fast file access to begin with. Because of this, the amount of improvement this has on performance is variable from computer to computer, but assuming you are running the game from any even half-decent SSD, even older SATA ones, it should improve performance and reduce lag spikes as intended.
Obviously this performance boost comes at the cost of storage space. Uncompressing the files will roughly triple the amount of required storage space. As of No Man's Sky Worlds Part 1, assuming you delete the backup of the compressed files afterwards or ran with the -no-backup argument, the game takes up ~44.8GB of storage total.
Features:
- Works on all No Man's Sky versions, theoretically including all future updates.
- Doesn't conflict with any mods loading through the typical mod loading system.
- Tries to be smart about running again after No Man's Sky updates or branch switches by checking file timestamps. (Can be bypassed using -force.)
- Backs up the base game files in a sub folder in case things go wrong. (Can be bypassed by using -no-backup, which also slightly reduces the required free space footprint during runtime by ~10GB or so.)
- Disables the "File Tampering" warning by using NMSResign to generate BankSignatures.bin.
Usage:
- Download and extract the mod file from above. (A Github mirror is available here.)
- Copy NMS-Decompressinator.bat, psarc.exe, and NMSResign.exe over to your No Man's Sky\GAMEDATA\PCBANKS folder.
- Ensure you have sufficient free space. As of No Man's Sky Worlds Part 1, the uncompressed .pak files will consume 44.7GB of storage, and you should have at least 15GB of additional headroom for the unpacking process. Meaning, the disk ideally needs at least 60GB of free space before running the script.
- Run the NMS-Decompressinator.bat.
- Wait patiently. This takes quite a while to run. You will see a completion message when it is done.
- Test the game and make sure it works.
- (Optional) Delete PackedFileBackup folder to reclaim the storage space that the original packed files take up.
After updates or changing beta branches, you may see a "File Tampering" warning upon starting up No Man's Sky. You can simply run the script again anytime to unpack the updated files and get rid of the Tamper warning. Running the game without rerunning the script shouldn't cause any problems, but it's definitely recommended you run the script again after updates, since updates will cause the .pak files to become stock compressed ones again whenever they are updated.
Subsequent runs of the script should also always be faster than the initial runs, as it tries to skip files that haven't been updated by checking file timestamps. This behavior can be bypassed using the -force argument.
Happy Exploring Travelers!
Technical Info and Source Code:
NMS-Decompressinator uses the official PSARC (same version bundled in PsArcTool) and an open source fork of NMSResign to accomplish it's goals. The script is written in batch, and is fairly well commented. I have a Github Repo as well, if anyone would like to contribute or read the script directly in the browser. The script itself is licensed as Public Domain under WTFPL. NMSResign's code is licensed GPL-3.0.
Are you a Linux user? There's also a bash script on the GitHub that uses Wine to run the same operations on Linux. Simply download the bash script directly from the repo, and grab the latest release to get the required windows executables.
Problems or Bugs?
If you think you've found a bug, run into some sort of problem, or otherwise need some sort of help, feel free to submit an issue or post a comment in one of the following places (in order of my preference):
- Ping @cheatfreak in #modding on the Official No Man's Sky Discord
- NexusMods Comment Section
- Github Issue Tracker
- NexusMods Bug Tracker