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.0.tar.gz (116.6 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.0-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hgpaktool-1.1.0.tar.gz
  • Upload date:
  • Size: 116.6 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.0.tar.gz
Algorithm Hash digest
SHA256 76da5d976cd83eb9f3138012fd126942145dbdf58196c6f5d2d2860dcf121c2c
MD5 07efd1b66906bfc12737b5594c792ae4
BLAKE2b-256 d9f7ce60defa8dfc25afcc6a68b9bba2a6381c6166e87e526652ed42ba3a6cfb

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: hgpaktool-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 491108d5f07fd9ff64111071fc67715c7aa730a094f77b264bd43b978e491337
MD5 7c54fec6fbf17cbce31e3fdb2748161b
BLAKE2b-256 0d5f236a1b436b887473ebe3321ab0456d41d1a8de21980612be87f10762785c

See more details on using hashes here.

Provenance

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