A standalone customized version of Katalash's HKX2 library for Havok packfile deserialization and serialization used in DSMapStudio.
This fork modified classes for Skyrim SE hkx file.
- Serialize and Deserialize .hkx file. (include behaviors, skeleton and aniamtions)
- Export to XML.
XML to HKXuse figment/hkxcmd, nexusSupports Breath of the Wild packfiles used on Wii U and Switch (might support other games that use the same classes).(Skyrim SE only)Supports conversion of packfiles between those two platforms.(SE only)
Ragdoll files (.hkrg) differ from vanilla files because of different fixup ordering. This issue shouldn't affect functionality.- can't deserialize some old FNIS generated hkx files due to malformed(?)
__classname__
or virtualFixup section or wrong assigned member (hkbBlendingTransitionEffec
assign tohkbStateMachineTransitionInfoArray
)
git submodule add https://github.com/ret2end/HKX2Library <your-repo-dir>/some/path/HKX2Library
Then reference it in your solution and project.
using HKX2;
namespace PlatformConverter
{
internal static class Program
{
private static void Main(string[] args)
{
string inFile = args[0];
string outFile = args[1];
string outPlatform = args[2];
HKXHeader header = HKXHeader.SkyrimSE();
using (FileStream rs = File.OpenRead(inFile))
{
var br = new BinaryReaderEx(rs);
var des = new PackFileDeserializer();
var root = (hkRootLevelContainer) des.Deserialize(br);
using (FileStream ws = File.Create(outFile))
{
// to hkx
var bw = new BinaryWriterEx(ws);
var s = new PackFileSerializer();
s.Serialize(root, bw, header);
// or to xml
var xs = new XmlSerializer();
xs.Serialize(root, header, ws);
}
}
}
}
}
./HKX2/Autogen/
contains Havok classes generated from dumped skyrim classes by SKSE plugin../HKX2/Manual/
also contains generated classes with small adjustment.Differences in class structure between games and platforms is dependent on Havok version used and platform's header information (pointer size, endian, padding option).no
- Unit test
- xml to 64bit hkx?
- export animation?
- katalash - The original HKX2 library included in DSMapStudio
- JKAnderson - BinaryReaderEx and BinaryWriterEx included in SoulsFormats
- krenyy - HKX2 library by krenyy
- Dexesttp with hkx research documentary
- SkyrimSE RE and SkyrimGuild community with valuable skse plugin, hkx, animation, behavior information