Skip to main content

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

hgpaktool-1.1.3.tar.gz (896.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hgpaktool-1.1.3-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file hgpaktool-1.1.3.tar.gz.

File metadata

  • Download URL: hgpaktool-1.1.3.tar.gz
  • Upload date:
  • Size: 896.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hgpaktool-1.1.3.tar.gz
Algorithm Hash digest
SHA256 dee81a12fb8b18cc481a2dfd023c315a31fc755cc4e562e1b44b1eb5a5d2b84f
MD5 df055d597f3ff8442c479fac740be84a
BLAKE2b-256 fb49d6dc77fde974a3489fb8dfaa351e6ac8083ed91f943340b75bec7ada18d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for hgpaktool-1.1.3.tar.gz:

Publisher: pipeline.yml on monkeyman192/HGPAKtool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hgpaktool-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: hgpaktool-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hgpaktool-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9b628ab7117ddb31941fbaccc3bfc0808a93e696359fb05d47d3cea2736feba4
MD5 0ec548d59b9d76b0d9671d8a31947576
BLAKE2b-256 b727d7083386d8c91ca250e8f29b7c3dc82bac37f8a0bf8f836e197514148f3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hgpaktool-1.1.3-py3-none-any.whl:

Publisher: pipeline.yml on monkeyman192/HGPAKtool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page