A library for manipulating Breath of the Wild Havok packfiles
Project description
botw_havok
A library for manipulating Breath of the Wild Havok packfiles.
"""
Removing a RigidBody
"""
from botw_havok import Havok
hk = Havok.from_file('/mnt/hdd/A-1-0.shksc') # can also be Yaz0 compressed
hk.deserialize()
del hk.files[1].data.contents[0].namedVariants[0].variant.systems[0].rigidBodies[-1]
hk.serialize()
hk.to_file('/mnt/hdd/A-1-0_edited.hksc')
"""
Converting between formats
"""
from botw_havok import Havok
hk0 = Havok.from_file('/mnt/hdd/0-0.shktmrb')
hk0.deserialize()
hk0.to_json('/mnt/hdd/0-0.json')
hk1 = Havok.from_json('/mnt/hdd/0-0.json')
hk1.to_wiiu() # or hk1.to_switch()
hk1.serialize()
hk1.to_file('/mnt/hdd/0-0_nx.hktmrb')
"""
Comparing contents
"""
from botw_havok import Havok
hk0 = Havok.from_file('/mnt/hdd/E-4-1_u.shksc')
hk1 = Havok.from_file('/mnt/hdd/E-4-1_nx.shksc')
hk0.deserialize()
hk1.deserialize()
hk0.files[1].data.contents == hk1.files[1].data.contents
This library comes with these commands:
hk_to_json
: Havok packfile -> JSONjson_to_hk
: JSON -> Havok packfilehk_compare
: Compare two or more packfileshkrb_extract
: Extract shapes from Static Compound files by HashIdhksc_to_hkrb
: Convert all Static Compound shapes into a single HKRB
-
At the moment, only Havok Physics files (*.hksc, *.hkrb, *.hktmrb) can be read.
-
Most of the smaller ones deserialize and serialize flawlessly and the resulting packfiles are nearly identical to the originals.
-
The larger files (particularly StaticCompound ones) are usually smaller than the originals after serialization. That's caused by the originals having duplicate Havok objects that are removed and referenced instead.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
botw_havok-0.3.18.tar.gz
(51.6 kB
view details)
Built Distribution
botw_havok-0.3.18-py3-none-any.whl
(117.2 kB
view details)
File details
Details for the file botw_havok-0.3.18.tar.gz
.
File metadata
- Download URL: botw_havok-0.3.18.tar.gz
- Upload date:
- Size: 51.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d92c5d60d7f9ffb63c876e59ceda456e732c15b539a289dd08ed6588afcd310 |
|
MD5 | a226a610cfa7e4d14667226acc01a9e8 |
|
BLAKE2b-256 | 84f6c222ba63f5aa97d260dfb7560ec1a251a4164a564fdc3b0e5a95dd64c687 |
File details
Details for the file botw_havok-0.3.18-py3-none-any.whl
.
File metadata
- Download URL: botw_havok-0.3.18-py3-none-any.whl
- Upload date:
- Size: 117.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8752198d047d5a743e2b3b748af62701f1fbcb8d8dcbef4e5941bd67bcad6487 |
|
MD5 | 4dbd36bba9b9f14ff1dd11a978c340b7 |
|
BLAKE2b-256 | 0f545a17bf0966c61d0ce61979c685213a94743563f52a3fd759ae7a5cd6b84e |