Skip to content

Latest commit

 

History

History
101 lines (80 loc) · 3.68 KB

README.md

File metadata and controls

101 lines (80 loc) · 3.68 KB

Havok Behavior Serialization/Deserialization Library

Features

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

Download CLI(For behavior creator)

./hkxc --help

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

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

#[tokio::main]
async fn main() -> Result<()> {
  let input = "./defaultmale.hkx"; // file or dir path
  let out_fmt = OutFormat::from_input(&input)?; // `.hkx` -> OutFormat::Xml, `.xml` -> OutFormat::Amd64
  let output: Option<PathBuf> = 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 = "0.7.0" }
serde_hkx = { git = "https://github.com/SARDONYX-sard/serde-hkx", tag = "0.7.0" }

Documentation

implementation progress

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

  • XML Serializer
  • XML Deserializer
  • Bytes Serializer
  • Bytes Deserializer
  • Generate Havok Classes
  • Testing the API & CI.
  • Modify the code based on the test data.