ReFrontier is a command-line toolset for modding Monster Hunter Frontier Online. It handles the full round-trip workflow: unpacking, decrypting, and decompressing game files for editing, then compressing, encrypting, and repacking them for use in-game.
Originally based on mhvuze/ReFrontier, ReFrontier has been extensively rewritten. Version 2.0 introduced breaking changes—see MIGRATION_2.0.md for upgrade instructions. You can use any release pre-2.0 for a version fully compatible with the original.
Key features:
- Cross-platform: Works on Windows, Linux, and macOS
- Performance: 4x faster single-threaded, with multithreaded unpacking support
- Round-trip editing: Full support for ECD/EXF encryption and FTXT text repacking
- Single command: Compress and encrypt files in one step
- Reliability: Fixed duplicate filename issues
- Security: Removed memory-unsafe code and outdated libraries
- Text tools: Improved CSV parsing and cleaner fulldump output
- Validation: Non-destructive integrity checking of game files (
--validate) - Diff: Structural comparison of two game files through encryption/compression layers (
--diff)
Download the latest release for your operating system.
Unzip the archive to find ReFrontier.exe (or ReFrontier on Linux/macOS).
To get the latest features, you can build from source.
You can drag-and-drop files or folders onto the executable, or use the command line.
-
Copy
mhfdat.bin(or any file or folder) from the MHFrontierdat/folder to the same directory as the executable. -
Decrypt and decompress the file:
./ReFrontier mhfdat.bin --saveMeta
-
Edit the extracted data (see tools and included utilities).
-
Compress and encrypt:
./ReFrontier mhfdat.bin --compress hfi --level 80 --encrypt
-
Replace the original
mhfdat.binwith the new file.
For detailed command reference, see ReFrontier/README.md or run:
./ReFrontier --help| Option | Description |
|---|---|
--help |
Display CLI help |
--saveMeta |
Save metadata files (required for repacking/re-encryption) |
--cleanUp |
Delete intermediate files |
--validate |
Check file integrity without writing output |
--diff <file> |
Structural comparison with another file |
ReFrontier decrypts (ECD → JPK) and decompresses files by default.
To preserve metadata for later re-encryption, use --saveMeta:
./ReFrontier mhfdat.bin --saveMeta --decryptOnlyDecompression replaces the original file. Always backup important data first.
Compressed files are identified by their JKR header (first bytes of the file).
./ReFrontier mhfdat.bin # Decompress if already decryptedOnce files are decrypted and decompressed, you can edit them using:
- FrontierTextTool - Extract and modify game text
- FrontierDataTool - Extract and modify game data structures
- External tools listed in See Also
Compress files using --compress <type> --level <level>:
| Type | Alias | Algorithm | Ratio |
|---|---|---|---|
rw |
0 |
No compression (raw) | 1:1 |
hfirw |
2 |
Huffman coding only | ~60-90% |
lz |
3 |
LZ77 sliding window | ~30-70% |
hfi |
4 |
Huffman + LZ77 (best) | ~20-50% |
The --level parameter (1-100) controls compression aggressiveness for lz and hfi only (ignored by rw and hfirw). Diminishing returns above ~80.
./ReFrontier mhfdat.bin --compress hfi --level 80Output is written to the output/ directory.
For technical details on compression algorithms, see docs/ARCHIVE_FORMATS.md.
Encrypt a compressed file with --encrypt:
./ReFrontier mhfdat.bin --encryptIf a .meta file exists (e.g., mhfdat.bin.meta created during decryption), it will be used.
Otherwise, the default ECD key index (4) is used automatically. This works for all known MHF files, but may not match other game versions or regions.
You can compress and encrypt in a single command:
./ReFrontier mhfdat.bin --compress hfi --level 80 --encryptBoth ECD and EXF encryption formats are fully supported for round-trip editing.
FTXT text files can be extracted and repacked:
# Extract text with metadata
./ReFrontier text.ftxt --saveMeta
# Edit the generated .txt file, then repack
./ReFrontier text.ftxt.txt --packCheck the structural integrity of a game file without writing any output:
./ReFrontier mhfdat.bin --validateRecursively validates encryption, compression, and archive layers (ECD, EXF, JPK, MOMO, MHA, FTXT) with CRC32 verification and bounds checking.
Compare two game files structurally, peeling through encryption and compression layers:
./ReFrontier original.bin --diff modified.binUseful for verifying round-trip correctness (unpack, edit, repack), comparing game versions, or catching regressions. Exit code 0 means identical, 1 means differences found.
Requires .NET 8.0 SDK.
git clone https://github.com/Houmgaor/ReFrontier.git
cd ReFrontier
dotnet build --configuration ReleaseThe executable will be at ./ReFrontier/bin/Release/net8.0/ReFrontier.exe.
Related tools and projects:
| Project | Description |
|---|---|
| Monster-Hunter-Frontier-Patterns | Binary file format templates |
| FrontierTextHandler | Python tool for text editing |
| MHFrontier-Blender-Addon | Import 3D models |
| Erupe | MHFrontier private server |
- Based on mhvuze/ReFrontier
- With additional features from chakratos/ReFrontier
- Special thanks to enler for their help!
Edits in this project are licensed under the MIT License.
See ReFrontier#2 for license information on the original code.
