TagTools icon indicating copy to clipboard operation
TagTools copied to clipboard

Havok HKX Files 2015 > 2014?

Open ModdingBiz06 opened this issue 1 year ago • 17 comments

Hello,

Please remove this if this question if it is not suitable, and my apologies if so.

Myself and many other modders have used this tool for back porting creatures from Fallout 76 to Fallout 4 (havok 2015 down to havok 2014) via the process of converting a 2015 hkx file down to havok 2012 and then editing the XML output files by hand and repackaging the XML into hkx (an extremely painful process)

We are all wondering if it is possible to create a version of this tool that would convert the hkx files to havok 2014 version instead of 2012?

I'm sure we would be happy to pay a fee for this if it is possible, but at the moment, we are unsure if it is. There are a number of hkx files we would need downgrading to 2014 such as behaviors (from havok animation tool) which is our main problem. Conversion of skeleton and animation hkx would be a bonus but this is possible to convert ourselves via 3dsmax.

Thanks for your time

Some very grateful modders.

ModdingBiz06 avatar Dec 26 '23 11:12 ModdingBiz06

You shouldn't need to edit the XML files. AssetCc2 is capable of upgrading the version of the XML/HKX files to the version of the SDK it's from. Have you tried simply feeding 2014 AssetCc2 the results of TagTools?

blueskythlikesclouds avatar Dec 26 '23 11:12 blueskythlikesclouds

Thank you for the incredible speedy reply!

The only process we are aware of is by dragging and dropping the hkx onto the tagtools.exe. We did notice that dropping the skeleton hkx files resulted in no xml files being created, behaviour files did however.

May I ask what the process might be for the method you mentioned above? Or where the 2014 version of AssetCc2 might be? If this works, we can't put into words how incredible it will be. Huge thanks again.

ModdingBiz06 avatar Dec 26 '23 11:12 ModdingBiz06

You can find the SDKs in the description of this video: https://www.youtube.com/watch?v=U88C9K-mSHs

Try replacing TagTools' AssetCc2 with the one from Havok 2014, and see if that results in 2014 HKX files when backporting with it.

blueskythlikesclouds avatar Dec 26 '23 12:12 blueskythlikesclouds

Thank you very much - I have replaced it with the AssetCc2 from there and upon dragging it onto the tagtools, it is still creating 2012 version XMLs.

Is there a method of using the AssetCc2 to create a hkx/xml file I am missing maybe? Dragging and dropping onto it does not appear to do anything, so I am not sure how to feed any outputted files to it. Perhaps the newly output 2012 xml files can be updated to 2014 if I need to use the new AssetCc2 correctly.

ModdingBiz06 avatar Dec 26 '23 13:12 ModdingBiz06

That doesn't sound right, when AssetCc2 is placed next to TagTools, it uses it to convert the XML file to a binary HKX file. I suppose it wouldn't work if you aren't on Windows or something.

You can still use AssetCc2 manually. IIRC, it should be used like:

AssetCc2 --rules4101 --strip input.xml input.hkx

--rules4101 makes it convert for PC. --strip removes the reflection data from the output HKX.

blueskythlikesclouds avatar Dec 26 '23 13:12 blueskythlikesclouds

That's what I was thinking, it's definitely an AssetCc2 from the SDK, and I have now tried 5 (2014) versions.

The only thing I can think of is that I am using a slightly edited version of the tagtools you made, but all this edited version does is not delete the exported xml file. In your original tool, the xml is exported (for some), but only for a second before it disappears, or it doesn't appear at all for others, (We don't know why).

I will try with your original tool but for myself, I don't get any exported file at all with the fallout 4 hkx files.

ModdingBiz06 avatar Dec 26 '23 13:12 ModdingBiz06

Could you tell me how you are editing the output XML file exactly? And what do you use to convert it to binary?

blueskythlikesclouds avatar Dec 26 '23 13:12 blueskythlikesclouds

Of course, we use Notepad++ to edit the 2012 outputted xml and then we use https://github.com/Dexesttp/hkxpack to get the XML back into HKX format afaik.

This is the error I get from CMD -

>AssetCc2 --rules=4101 --strip foxroot.xml foxroot.hkx Could not load the file 'foxroot.xml'. Patching to latest version failed. Have you registered the necessary patches? Patches may be missing because your assets are older than HK_SERIALIZE_MIN_COMPATIBLE_VERSION (if defined). Make sure that the patches are registered properly (see hkRegisterPatches.cxx, included by hkProductFeatures.cxx). See the hkError output for more details.

ModdingBiz06 avatar Dec 26 '23 13:12 ModdingBiz06

What do you edit in the file? Version numbers? Sounds like there are newer types in 2015 SDK which don't get recognized by 2014 SDK.

blueskythlikesclouds avatar Dec 26 '23 13:12 blueskythlikesclouds

A huge amount is edited (and added) into the xmls which is what we are trying to avoid, average time is around a month of work.

Hmm I am not sure where to go next, we have Havok 2018 which has a file convert but knowledge is very low currently.

ModdingBiz06 avatar Dec 26 '23 13:12 ModdingBiz06

Havok 2018 won't help since it can't convert to old packfile formats.

If you could show me what you are exactly doing I could perhaps cook something up, but no promises. The Python script has a TagTypeBackporter class which is where all the required changes would be applied to the types.

blueskythlikesclouds avatar Dec 26 '23 14:12 blueskythlikesclouds

I can't thank you enough, your replies are already greatly appriciated let alone any more potential work.

  • We use F4AK_HKXPackUI - https://mega.nz/file/2IggCDIA#-Qym0dDb3D5_WnQqxq_uMH6afqVBGWKJ21yYow_Hoco - to get XMLs from the 2014 version of Havok.
  • Here are some Havok 2015 files with exported XML using your tools - https://mega.nz/file/TZ4yCL4I#3Ugkq_q1Q9vktLkZaT477zdLhFc8SV48xBvhj5atFxU
  • Here are some Havok 2014 files - https://mega.nz/file/nJhFlKaK#5UfYL0jfP2AIl4rb23Ovs_f4xRN4rDi75wKv8ZrJIcU with exported XML using the F4AK_HKXPackUI tool mentioned above.

Our goal, if possible, is to convert the 2015 hkx files (all if possible, but mostly behaviors in the behavior folders, characterroot.hkx etc) to the 2014 format.

From our extremely limited guide: Building New Behavior in 2014 Format: Create new behavior files in the 2014 format. This involves editing text files, incorporating elements from Fallout 4 (FO4) behaviors, and replacing values with those from Fallout 76 XML files. Then repacking into HKX.

The answer is potentially inside F4AK_HKXPackUI considering that can create a 2014 version of an XML.

ModdingBiz06 avatar Dec 26 '23 14:12 ModdingBiz06

Cool! Thanks for the datasets. I have one last question, are these games 64-bit?

blueskythlikesclouds avatar Dec 26 '23 14:12 blueskythlikesclouds

They are indeed both 64bit

ModdingBiz06 avatar Dec 26 '23 14:12 ModdingBiz06

In that case, AssetCc2 output wouldn't even work in these games since all the available Havok SDKs are for 32-bit. Great to know.

blueskythlikesclouds avatar Dec 26 '23 14:12 blueskythlikesclouds

Damn. We are probably asking the impossible, but our thoughts are, if your tool can export our 2015 havok to 2012, which is three versions lower, then one version lower should be possible as well, with further editing still likely (but hopefully a lot less!). If we can help in any way, we would be more than happy to.

This is useful, lots of info here - https://forums.nexusmods.com/topic/9329348-fallout-4-havok-guide/

ModdingBiz06 avatar Dec 26 '23 14:12 ModdingBiz06