Tool for extracting data from NMS pak files
Project description
HGPAK tool
This tool is able to read .pak files for the game No Man's Sky on all platforms. Note that this tool only works on .pak files after the NMS 5.50 (Worlds Part II) update.
Installation
HGPAKtool can be installed in one of two ways:
Precompiled binary
Precompiled binaries are provided for both windows and linux OS's (macOS can be created on request but someone will need to test it). These can be found here.
These binaries contain everything you need to run the tool - no need to install python or any other dependencies.
Python library
If you wish to use HGPAKtool from code, the wheel is published on pypi.
Install by running python -m pip install hgpaktool.
If you would like to support the json5 format, there is an optional dependency which can be included:
python -m pip install hgpaktool[json5]
API docs will come soon.
Usage
Note: The following is only relevant if using a precompiled binary
For decompiling files on PC, mac or linux, the tool will automatically detect the platform, however if you want to decompile .pak files from a specific platform provide the --platform flag (see --help for extra details).
If you are unpacking files from a switch you will requires the Oodle dll which is not particularly freely available.
This code contains a way to download it, however you should always verify that the downloaded dll contains no malicious content by scanning it with a virus checker.
I do not own the link contained in the code and take no responsibility for any issues caused by using the dll which it downloads.
I have tested it and it seems fine, but you should check yourself.
To use this, specify --platform switch when running hgpaktool.
Drag and drop usage
The easiest way to use HGPAKtool is by dragging the files you wish to decompile directly onto the binary.
This will unpack them in the same directory as the .pak files but under a folder called EXTRACTED.
To unpack all of the games' files, simply drag the PCBANKS folder onto the binary and go and make a drink as this will take a little bit of time to complete.
Command line usage
Note If you installed via python above instead of a precompiled binary, the following section can be used, however you can drop the .exe part and simply call hgpaktool directly as the installation will build this binary in your python scripts folder.
If you want more control, it is recommended that you run the script directly like so:
hgpaktool.exe -U <path to PCBANKS folder>
If you do this, you can provide a number of other options such as the -f flag which will export only the files which match the pattern provided.
So for example to export all files which contain the phrase "debris", you would do:
hgpaktool.exe -U -f="*debris*" <path to PCBANKS folder>
Multiple -f flags can be provided to filter multiple sets of files out. Note that these combine additively (as in -f="*debris*" -f="*crystal*" will extract all files containing debris in their path AND all files containing crystal in their path).
The flag can also be used to pull out one or more specific files if the complete path to the file (within the pak files) is known/provided.
For a complete list of the possible options, run hgpaktool.exe --help
Re-packing files
Note that repacking files currently has very limited support.
On windows it is not required to make mods so is currently not implemented (see the community docs regarding modding for how to add mods to the game).
Re-packing switch games does work but may have some issues, so should be considered not fully functional for now. I don't have any way to test re-packed .pak file on a modded switch so unless someone is willing to contribute some effort to properly test it and improve it it's likely it will stay this way.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hgpaktool-1.1.1.tar.gz.
File metadata
- Download URL: hgpaktool-1.1.1.tar.gz
- Upload date:
- Size: 890.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e477ba74c2df342630a33aa1ae3205aae65f733e35f60a24296e194883fb3232
|
|
| MD5 |
61bcfe1faa1dcca13840b7a9e0521f90
|
|
| BLAKE2b-256 |
563f7946883aa9645abd942efe1a93aee40ea067f3163708d5a4c8788a0905d9
|
Provenance
The following attestation bundles were made for hgpaktool-1.1.1.tar.gz:
Publisher:
pipeline.yml on monkeyman192/HGPAKtool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hgpaktool-1.1.1.tar.gz -
Subject digest:
e477ba74c2df342630a33aa1ae3205aae65f733e35f60a24296e194883fb3232 - Sigstore transparency entry: 781155026
- Sigstore integration time:
-
Permalink:
monkeyman192/HGPAKtool@a45e79136292769c8aa0292becf44bdc7a95571f -
Branch / Tag:
refs/tags/1.1.1 - Owner: https://github.com/monkeyman192
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pipeline.yml@a45e79136292769c8aa0292becf44bdc7a95571f -
Trigger Event:
push
-
Statement type:
File details
Details for the file hgpaktool-1.1.1-py3-none-any.whl.
File metadata
- Download URL: hgpaktool-1.1.1-py3-none-any.whl
- Upload date:
- Size: 23.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
695a4a01d6e47b0879278e286b20e5cf7c034d87d767789e377ecb5b7bd819e7
|
|
| MD5 |
1948adf37af19ca7fb2458e693952f62
|
|
| BLAKE2b-256 |
3ee9b9901187d8326002811b554d7a3c70aacaa385f2f869d4dc9beba365b1a8
|
Provenance
The following attestation bundles were made for hgpaktool-1.1.1-py3-none-any.whl:
Publisher:
pipeline.yml on monkeyman192/HGPAKtool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hgpaktool-1.1.1-py3-none-any.whl -
Subject digest:
695a4a01d6e47b0879278e286b20e5cf7c034d87d767789e377ecb5b7bd819e7 - Sigstore transparency entry: 781155029
- Sigstore integration time:
-
Permalink:
monkeyman192/HGPAKtool@a45e79136292769c8aa0292becf44bdc7a95571f -
Branch / Tag:
refs/tags/1.1.1 - Owner: https://github.com/monkeyman192
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pipeline.yml@a45e79136292769c8aa0292becf44bdc7a95571f -
Trigger Event:
push
-
Statement type: