-
Notifications
You must be signed in to change notification settings - Fork 2
Introduction
The idea behind these patterns is to illustrate and explain how Monster Hunter Frontier reads data. My goal is to recreate this process as accurately as possible, so ImHex can read these files effectively. This includes reading item names from pointer tables and reading the file without relying on hardcoded locations of interest.
To use these patterns with ImHex, I recommend first creating a project folder. Create your ImHex project files within this folder. Then, adjacent to these files, create a folder named patterns
, and place your patterns in there. Alternatively, clone this repository into your project folder, then rename the repository folder from Monster-Hunter-Frontier-Patterns
to simply patterns
.
Monster Hunter Frontier's files are packed and encrypted at rest, and as such aren't workable. To modify these files, first decrypt and unpack them with ReFrontier. I recommend first copying the file you want to modify into a working directory. Then unpack and decrypt this file. On Windows, this command would be .\wherever\ReFrontier.exe '.\working\directory\file.bin' -log
. This will additionally create a log file, in this case called file.bin.meta
. This log file is required to re-encrypt later!
The decrypted file can now be properly read and modified at your leisure.
Once you've finished modifying files, they must be repacked and re-encrypted before they will work with Frontier. The method to repack files differs based on its type. Since these pattern files mainly focus on the non-archive .bin
files, that is what will be outlined for repacking here.
First, you need to repack the file into a jpk
file. This is a type of compressed archive. The command to do this on Windows is .\wherever\ReFrontier.exe '.\working\directory\file.bin' -compress 4,16
. This will create a file at .\wherever\output\file.bin
. In the prior command, the 4
is the archive type, and 16
is the compression level.
Either move the output jpk
file back into the working directory, or copy the .meta
log file next to the output file. Assuming you copied the jpk
file into the working directory, the command to re-encrypt the file is .\wherever\ReFrontier.exe '.\working\directory\file.bin' -encrypt
. This will read the ecd
header from the log file, and re-encrypt the archive into a format suitable for Frontier to read.