Skip to main content

Python package for extracting Houkai Gakuen 2 assets data

Project description

About

hg2-data-extractor is a Python package for downloading, decrypting, and extracting Houkai Gakuen 2 Unity text asset data.

Installation

From PyPi

pip install hg2-data-extractor

Usage

To get help, type --help with any command or even with the package itself.

Download

To download the data_all file, use:

hg2-data-extractor download server version              # Downloads to ./data_all/
hg2-data-extractor download server version path/to/dir  # Downloads to path/to/dir

Where server must be JP or CN and version must be a valid game version (e.g 11_1 or 9.8)

Decrypt

To decrypt the downloaded data_all file, use:

hg2-data-extractor decrypt                                              # Decrypts ./data_all/data_all.unity3d to ./data_all/data_all_dec.unity3d
hg2-data-extractor decrypt path/to/file.unity3d                         # Decrypts file.unity3d to ./data_all/data_all_dec.unity3d
hg2-data-extractor decrypt path/to/file1.unity3d path/to/file2.unity3d  # Decrypts file1.unity3d to file2.unity3d

Extract

To extract text asset data from data_all_dec, use:

hg2-data-extractor extract                                                                  # Extracts all ItemData assets from ./data_all/data_all_dec.unity3d to ./extracted/
hg2-data-extractor extract AssetName1,AssetName2                                            # Extracts AssetName1,AssetName2 from ./data_all/data_all_dec.unity3d to ./extracted/
hg2-data-extractor extract AssetName1,AssetName2 path/to/dir                                # Extracts AssetName1,AssetName2 from ./data_all/data_all_dec.unity3d to path/to/dir
hg2-data-extractor extract AssetName1,AssetName2 path/to/dir path/to/data_all_dec.unity3d   # Extracts AssetName1,AssetName2 from data_all_dec.unity3d to path/to/dir

List

To create a file with all valid asset names in data_all_dec, use:

hg2-data-extractor lst                                                # Writes from ./data_all/data_all_dec.unity3d to ./extracted/asset_names.txt
hg2-data-extractor lst path/to/file.txt                               # Writes from ./data_all/data_all_dec.unity3d to file.txt
hg2-data-extractor lst path/to/file.txt path/to/data_all_dec.unity3d  # Writes from data_all_dec.unity3d to file.txt

Credits

This project is a modified version of the hg2-downloader project by BLUEALiCE

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

hg2_data_extractor-0.4.12.tar.gz (43.4 kB view details)

Uploaded Source

Built Distribution

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

hg2_data_extractor-0.4.12-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file hg2_data_extractor-0.4.12.tar.gz.

File metadata

  • Download URL: hg2_data_extractor-0.4.12.tar.gz
  • Upload date:
  • Size: 43.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.24

File hashes

Hashes for hg2_data_extractor-0.4.12.tar.gz
Algorithm Hash digest
SHA256 ac90ef08519d0e2414af5c5373164023ec3ae885fd90d62a667e9411f7d5235f
MD5 c562f153b1564011510b33d23c713a02
BLAKE2b-256 fc8e92cabfd8da324e5b4fa7627abcd322d7d5fe70f2ee7a6075bb3e72735209

See more details on using hashes here.

File details

Details for the file hg2_data_extractor-0.4.12-py3-none-any.whl.

File metadata

File hashes

Hashes for hg2_data_extractor-0.4.12-py3-none-any.whl
Algorithm Hash digest
SHA256 e68c96aa13699a296236e0e70e09126abf4cfff76000f169f6c7650277050aa0
MD5 b46a684d6dc2521a1fe67b920d4e529c
BLAKE2b-256 57339f8377c2bb4888229a9843fdf3cd6eee5599dbfa841dff8fa1acf124362e

See more details on using hashes here.

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