Open gregstein opened 6 years ago
You can do it from the editor on the site. Upload your 5.0+ hki file, then select a different version and download.
It should be noted that (at least as far as I know), there's no reason to downgrade the version. A HD 5.0+ file works fine for AoC as well, it just can't use the extra hotkeys encoded in it.
For some details on how the conversion currently works on the hotkeys site programmatically (sorry, it's a bit convoluted):
Hopefully that makes sense. Some of that convolution may not be necessary, if, as @Jineapple states, any version of the game will accept a *.hki file from any version. If the game rejects the file header, then it's only necessary to set the .version attribute of the HotkeyFile then .serialize() it, rather than copy the hotkeys into it from the first version.
@Jineapple thank you!! I didn't know that
@crimsoncantab Beautiful answer! Thank you so much! It would be great if you could add an argument to load and download a hotkey file to the respected version using your method.
@gregstein are you looking to do this programmatically (i.e. adding a utility script to the codebase), or have a utility on the site to do that?
@crimsoncantab I need this so badly for my project AoE2Tools project and I would also love to credit/link to your project. "utility script to the codebase" just like the one you have in hkizip.py d <player0.hki> player0.bin
.
Sorry @gregstein, this issue fell through the cracks since it was already closed. I think I can whip something up real quick, if you're still needing it. As mentioned above downgraded versions seem to pull in the hotkeys file just fine, but it doesn't hurt to have one that matches the version you're downgrading to.
Hello,
I was wondering if your python project has a command to convert HD 5.0+ hotkeys version to AoC/FE/HD 2.0?