Jump to content

[WIP/Tool] HKXPack - extract .hkx files


DexesTTP

Recommended Posts

Plz tell me how to use it actually? jar file? and what i need to do with it??? how to use - i didnt get it....

The Jar file is a command-line tool.

You should just be able to type

java -jar hkxpack-cli.jar unpack <path/to/your/file>/<your file name>.hkx
in the Windows console.

It will give you a XML describing what data is in the HKX file.

If any of the above instructions seems too difficult, then you won't need the tool. I'll add a graphical interface later when there is useful stuff to be done.

 

That's it. I'm working at this moment on a way to do the operation the other way (give a XML and get a valid HKX) but I'm not finished yet. Then, useful things can begin to be done with the tool.

Link to comment
Share on other sites

  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

 

Plz tell me how to use it actually? jar file? and what i need to do with it??? how to use - i didnt get it....

The Jar file is a command-line tool.

You should just be able to type

java -jar hkxpack-cli.jar unpack <path/to/your/file>/<your file name>.hkx
in the Windows console.

It will give you a XML describing what data is in the HKX file.

If any of the above instructions seems too difficult, then you won't need the tool. I'll add a graphical interface later when there is useful stuff to be done.

 

That's it. I'm working at this moment on a way to do the operation the other way (give a XML and get a valid HKX) but I'm not finished yet. Then, useful things can begin to be done with the tool.

 

 

Does your tool support only animations or will we also be able to modify the physics for clothing? Using the bathrobe physics gets some less than desirable results when using a non-vanilla body or if the mesh the physics are being applied to is shorter than the vanilla bathrobe.

Edited by ShinraStrife
Link to comment
Share on other sites

Does your tool support only animations or will we also be able to modify the physics for clothing? Using the bathrobe physics gets some less than desirable results when using a non-vanilla body or if the mesh the physics are being applied to is shorter than the vanilla bathrobe.

Actually, you will be able to modify almost every Havok file, except for the Skeletons (which have an unknown data structure in them). Of course I intend to solve this down the line, and hopefully all havok files and embedded files will be packable and unpackable.

 

Jut a quick update, I have results repacking files (meaning I can repack and then unpack the created hkx files) but it crashes in game. I have some ideas why and I'll try to fix it later this week.

Link to comment
Share on other sites

Ok, so I released a version that supports packing : here. Use the "pack" option to go from XML to HKX.

 

There's still two problems the tool can't handle :

  • one thing called "arrsize", which is a value I don't consider while reading/writing the file and therefore I am not reading some values (they don't show up in the XML and are set to 0 in the output file). This will be my main focus for the next release, as I have some good ideas about how to make it work.
  • Another thing called RelArray, which is the main data structure for skeletons. I have no idea how it works, so I'll tinker with it later and try to solve it. Basically, it makes the tool unable to read the skeleton data (you'll see a bunch of errors while using the tool as well as a lot of "error" comments in the output XML).
If you compile a XML file and you don't manage to make the output work in-game, please consider giving me the file name so that i can see what is happening exactly. There's some error messages scattered through the tool but I don't think it would be enough to understand the cause of the bug directly.

 

As always, I won't yet give support for the tool, as it is still an alpha version. If you don't understand how to use it after reading the instructions, the tool is probably not ready for you yet. A GUI [Graphical User Interface] will come eventually (once all the bugs are ironed out).

 

edit : just in case, the how-to.

 

edit 2 : there was a bug where MATRIX_4 throwed errors. It was fixed in the latest patch. Please re-download the tool to fix it.

Edited by DexesTTP
Link to comment
Share on other sites

Nice! What can we do with the XML files currently? Should we just try exporting and importing random animations to/from Fallout 4 to see if they work for testing purposes?

Link to comment
Share on other sites

The best you can do as of now is to change the values inside the files. For animations, it's kind of pointless (as the data is stored in big data blobs that I can barely begin to understand).

 

However, all physics files should be accessible - I'm thinking cloth data and such. The contents of these files should be mostly bones and weights, so you may be able to chnage thesevalues and have "good" results in game.

 

To be honest, all of that is still heavily experimental and as of now it might lead to nowhere.

 

Just some infos about animations specifically : the "data" in the animations files is stored in blocs of what I assume are transformations on bones. Each bloc contains several frames (about 256 usually, but it's defined in the file). However, the bloc contains data for a specific skeleton, so to edit it via a animation software we need to also read skeletons... you can see above for that.

I'm working with another person (CPU) on decrypting these blocs of data. This will be handle by a special tool on the side of the HKXPack core (i'm thinking about simply calling it "anim" but we'll see). There will be special commands and of course an option using the GUI to use the animation converter.

Link to comment
Share on other sites

Alright thanks. That's what I thought when I skimmed over the file and I noticed he lack of any thing that looks like the name of the bones. Regardless, you're making good progress, so great work so far! I'm excited to see a project involving this so active. Really looking forward to making some great things using it.

Edited by bizzclaw
Link to comment
Share on other sites

Ok, so I released a version that supports packing : here. Use the "pack" option to go from XML to HKX.

 

There's still two problems the tool can't handle :

  • one thing called "arrsize", which is a value I don't consider while reading/writing the file and therefore I am not reading some values (they don't show up in the XML and are set to 0 in the output file). This will be my main focus for the next release, as I have some good ideas about how to make it work.
  • Another thing called RelArray, which is the main data structure for skeletons. I have no idea how it works, so I'll tinker with it later and try to solve it. Basically, it makes the tool unable to read the skeleton data (you'll see a bunch of errors while using the tool as well as a lot of "error" comments in the output XML).
If you compile a XML file and you don't manage to make the output work in-game, please consider giving me the file name so that i can see what is happening exactly. There's some error messages scattered through the tool but I don't think it would be enough to understand the cause of the bug directly.

 

As always, I won't yet give support for the tool, as it is still an alpha version. If you don't understand how to use it after reading the instructions, the tool is probably not ready for you yet. A GUI [Graphical User Interface] will come eventually (once all the bugs are ironed out).

 

edit : just in case, the how-to.

 

edit 2 : there was a bug where MATRIX_4 throwed errors. It was fixed in the latest patch. Please re-download the tool to fix it.

 

 

Brilliant work!

 

Edit: which JRE version is this for?

Edited by ShinraStrife
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...