Skip to main content

A library for manipulating Breath of the Wild Havok packfiles

Project description


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
del hk.files[1].data.contents[0].namedVariants[0][0].rigidBodies[-1]
Converting between formats

from botw_havok import Havok

hk0 = Havok.from_file('/mnt/hdd/0-0.shktmrb')

hk1 = Havok.from_json('/mnt/hdd/0-0.json')
hk1.to_wiiu()  # or hk1.to_switch()
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.files[1].data.contents == hk1.files[1].data.contents

This library comes with these commands:

  • hk_to_json: Havok packfile -> JSON
  • json_to_hk: JSON -> Havok packfile
  • hk_compare: Compare two or more packfiles
  • hkrb_extract: Extract shapes from Static Compound files by HashId
  • hksc_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

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 hashes)

Uploaded source

Built Distribution

botw_havok-0.3.18-py3-none-any.whl (117.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page