This tool allows the building of stand-alone patch archives for Hitman 2 (2018). Files found in patch archives shadow all files with the same runtimeID in archives lower in the hierarchy. As a consequence, the use of patch archives makes the modification of native game archives obsolete which in turn makes the process of modding Hitman 2 a lot easier and quicker. All dependency-free file formats are supported, this includes audio, texture and json-resources to name a few.
The patch builder accepts an arbitrary number (within reason) of files and packs them into a single patch archive. The game also doesn't seem to impose any restrictions on the number of patch files you can use at the same time, which allows the creation of mods with a very modular structure. This is not only great for testing, but also allows for great compatibility between mods as longs as two patch archives don't modify the same files.
- Unpack the game archive you want to modify with the included QuickBMS script
Hitman2_rpkg.bms
. - Find the files you want to modify and copy them into a separate folder. The unpacked files are named after their runtimeID and can't be renamed.
- Modify the files to your liking.
- Pass the folder with the modified files into the patch builder to pack them into a patch file. You can do this by either dragging the folder onto the exe or by using
./ZHM5PatchBuilder.exe ..\FolderWithFilesToPack\ [..\\ExportPath\\chunk0patch4.rpkg]
- Copy the newly generated patchrpkg into the game's runtime folder and name it appropriately. If you are building a
chunk0
patch file for example and the highest numbered patch in your folder ischunk0patch3.rpkg
then name your patch filechunk0patch4.rpkg
. - Decrypt
HITMAN2\Runtime\packagedefinition.txt
withh6xxtea.exe
and adjust thepatchlevel
of the archive you generated a patch for to match the highest patch number. The game will just ignore all patch archives it can't find so if you don't want to worry about this step in the future, you can just set all the patchlevels to some high value. You can find the xxtea decryption tool at https://github.com/HHCHunter/HITMAN/tree/master/h6xxtea.
- Some patches will trigger a "read error" during startup. The cause is not entirely clear at the moment but the error didn't have any effect on the functionality of any of the mods I tested so far. Let me know if you come across any other issues.
Some important files are fetched from IOIs server while playing online, those files have priority over any files located in the local archives. Consequently, patches that modify those files do not and are not intended to work during online play. For obvious reasons, I'll not provide any further info or help regarding this issue.
MIT Licence