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.0.0.tar.gz (114.3 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.0.0-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hgpaktool-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3fb2dc2185c040dfa3d262f6f62f486f2e82ed18bb73ca7fe85ca9a87d56c394
MD5 678f26d8278750eab6400fd3997c8350
BLAKE2b-256 3782aedbe92a16df70f33f6183732ba70ddd00cd3025a5b4231775eae19eeae3

See more details on using hashes here.

Provenance

The following attestation bundles were made for hgpaktool-1.0.0.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.0.0-py3-none-any.whl.

File metadata

  • Download URL: hgpaktool-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 21.5 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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b83f4e71280300c94a124be598e4b90f2fb205f17170757ae4309867d7956631
MD5 4f3ff992bdd99bca3408b3a8ee64ea93
BLAKE2b-256 412c33652aa2212751e98823e23ca0be809ccc9469c9347a780d26f9951f0f1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for hgpaktool-1.0.0-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