Modhold
Skyrim SE
Freev2.0.0

serde-hkx (HKX converter)

A pure Rust cross-platform Havok behavior (De)Serialization library.(ver. hk_2010.2.0-r1)

SARDONYX-sard4 @SARDONYX-sardCredited author
Sign in to download One-click install with the free Modhold app. Get the app
Share
X Facebook Reddit

Sign in to get 25 XP when someone opens your link.

0Unique downloads
1.5kDownloads, all sites
21Views
0Vouches
–no scores yetScore
Shared under its open licence (Apache-2.0)
Made by SARDONYX-sard. Its licence lets anyone share it, with credit. See the proof · Original page · Are you SARDONYX-sard?

Havok Behavior Serialization/Deserialization Library

Features

  • [x] 32bit to 64bit (reverse) conversion of hkx.
  • [x] XML to 32bit/64bit hkx (reverse) conversion.
  • [x] Display of hkx/XML reference dependency tree.
  • [x] Output logs that make it possible to determine the binary data location of hkx.
  • [x] Hexdump the binary data of hkx.
  • [x] Display data differences between two hkx/XML.

Download CLI(For behavior creator)

./hkxc --help

Build CLI(For contributor)

git clone https://github.com/SARDONYX-sard/serde-hkx.git;
cd ./serde-hkx && cargo build --release-lto;

When used as a library(For developer)

NOTE: Currently there is a stack overflow problem of unknown cause. This occurs with debug build (cargo build) but not with release (cargo build --release).

According to this CAO issue report, it was found that passing through a function (fn) can prevent stack overflow without requiring Classes to be wrapped in Box. Thank you. (I made the changes using a macro and have verified that they actually work.)

# in Cargo.toml
tokio = { version = "1.41.0", features = ["full"] } # Async runtime
serde_hkx_features = { git = "https://github.com/SARDONYX-sard/serde-hkx", tag = "2.0.0" }
use serde_hkx_features::{convert, Format, Result};
use std::path::PathBuf;

#[tokio::main]
async fn main() -> Result<()> {
  let input = "./defaultmale.hkx"; // file or dir path
  let out_fmt = Format::Xml; // Format::Xml, Format::Amd64, Format::Win32
  let output: Option = None; // `None` is same as input. Or `Some("./output/defaultmale.xml".into())`
  convert(input, output, out_fmt).await
}
# in Cargo.toml
havok_classes = { git = "https://github.com/SARDONYX-sard/serde-hkx", tag = "2.0.0" }
serde_hkx = { git = "https://github.com/SARDONYX-sard/serde-hkx", tag = "2.0.0" }
  • When using C or other languages (FFI)

    1.First build serde_hkx_ffi.

    cargo build -p serde_hkx_ffi --release # output: /target/release/serde_hkx_ffi.lib
    

    2.See C Example

Documentation

Implementation progress

The only way to find out if it is possible or not is to try it out.

  • [x] XML Serializer
  • [x] XML Deserializer
  • [x] Bytes Serializer
  • [x] Bytes Deserializer
  • [x] Generate Havok Classes
  • [x] Testing the API & CI.
  • [x] Modify the code based on the test data.
cli/gui
└── serde_hkx_features
    ├── havok_classes <- (generated by class_generator)
    │   ├── havok_serde
    │   │   └── havok_types
    │   ├── havok_types
    │   └── havok_types_derive
    │       └── havok_types_derive_proc_macros
    └─ serde_hkx
        ├── havok_serde
        └── havok_types

Install

Unzip it into its own folder anywhere (not inside the game's Data folder) and run it. If you use MO2, add it as an executable so it sees your load order.

New to Skyrim mods? Read how to install Skyrim mods, or see the best Skyrim mods players pick.

Credits

SARDONYX-sard and the contributors on GitHub. Original page: https://github.com/SARDONYX-sard/serde-hkx

Permissions

Open licence: Apache-2.0. Source code: https://github.com/SARDONYX-sard/serde-hkx. Original page: https://github.com/SARDONYX-sard/serde-hkx. Shared on Modhold under that licence and credited to its authors; the files are the author's own release, unchanged.

Permission proof

Why this mod is on Modhold

The mod's original page, where it says what the mod is:

The top of the mod's original page: its name, author and details

This mod is released under an open licence, Apache-2.0, which lets anyone share it as long as its authors are credited and the licence comes with it. Its source code: github.com/SARDONYX-sard/serde-hkx · The licence

Captured 20 Nov 2026 from the original page. The author can claim this page, or have it taken down, at any time.