This guide covers breaking changes when upgrading from ReFrontier 1.x to 2.0.
- Architecture: Static methods replaced with dependency injection
- CLI: Custom argument parser replaced with System.CommandLine
- Auto-preprocessing: FrontierTextTool and FrontierDataTool now auto-detect encrypted/compressed files
- File output behavior: Removed
--noFileRewriteoption - files are no longer overwritten in place - CLI option renamed:
--logrenamed to--saveMetafor clarity - CLI option removed:
--closeremoved - program now always exits immediately
// Old static API
Crypto.DecryptEcd(buffer, key);
Pack.JPKEncode(inputPath, compressionType, level);
Unpack.JPKDecode(inputPath);// New instance-based API with default dependencies
var service = new FileProcessingService();
service.EncryptEcdFile(inputFile, metaFile, cleanUp);
var packingService = new PackingService();
packingService.JPKEncode(inputPath, outputPath, compressionType, level);
var unpackingService = new UnpackingService();
unpackingService.JPKDecode(inputPath, outputPath);// Create with custom dependencies
IFileSystem fileSystem = new RealFileSystem();
ILogger logger = new ConsoleLogger();
var config = FileProcessingConfig.Default();
var service = new FileProcessingService(fileSystem, logger, config);| Interface | Default Implementation | Purpose |
|---|---|---|
IFileSystem |
RealFileSystem |
File I/O operations |
ILogger |
ConsoleLogger |
Console output |
ICodecFactory |
CodecFactory |
JPK codec creation |
The CLI now uses System.CommandLine for argument parsing.
# 1.x syntax
./ReFrontier mhfdat.bin --log
# 2.0 syntax (--log renamed to --saveMeta)
./ReFrontier mhfdat.bin --saveMetaMost CLI arguments remain compatible. Key options:
| Option | Description |
|---|---|
--saveMeta |
Save metadata files for repacking/re-encryption (was --log) |
--nonRecursive |
Disable recursive unpacking (recursive is the default) |
--compress=<type>,<level> |
Compress with specified type (0-4) and level |
--encrypt |
Encrypt output file |
--pack |
Repack directory |
--cleanUp |
Delete intermediate files |
# Extract text to CSV (outputs to mhfdat.csv)
./FrontierTextTool mhfdat.bin --fulldump --trueOffsets --nullStrings
# Insert text from CSV (outputs to output/mhfdat.bin)
./FrontierTextTool mhfdat.bin --insert --csv mhfdat.csv# Extract data structures
./FrontierDataTool --dump --suffix demo --mhfpac mhfpac.bin --mhfdat mhfdat.bin --mhfinf mhfinf.bin
# Import data from CSV (outputs to output/)
./FrontierDataTool --import --csv Melee.csv --mhfdat mhfdat.binFrontierTextTool and FrontierDataTool now automatically handle encrypted (ECD/EXF) and compressed (JPK) files. You no longer need to manually decrypt/decompress before processing.
# 1.x workflow (manual preprocessing required)
./ReFrontier mhfdat.bin --log # Decrypt/decompress first
./FrontierTextTool output/mhfdat.bin.decd --fulldump --trueOffsets --nullStrings
# 2.0 workflow (automatic preprocessing)
./FrontierTextTool mhfdat.bin --fulldump --trueOffsets --nullStringsThe --log option has been renamed to --saveMeta to better describe its purpose: saving metadata files (.meta and .log) required for repacking and re-encryption.
# Before (1.x)
./ReFrontier mhfdat.bin --log
# After (2.0)
./ReFrontier mhfdat.bin --saveMetaThe --close option has been removed. The program now always exits immediately after completion. This was legacy behavior for Windows GUI usage that is no longer needed for a CLI tool.
New service classes provide better separation of concerns:
| Service | Responsibility |
|---|---|
FileProcessingService |
Encryption/decryption operations |
PackingService |
JPK encoding and archive packing |
UnpackingService |
JPK decoding and archive unpacking |
FilePreprocessor |
Auto-detect and preprocess files |
In 1.x, decryption and decompression would overwrite the original file by default. The --noFileRewrite option was added to disable this behavior.
In 2.0, the original file is never overwritten. Output always goes to a new file:
| Operation | Input | Output |
|---|---|---|
| ECD Decryption | file.bin |
file.bin.decd |
| EXF Decryption | file.bin |
file.bin.dexf |
| JPK Decompression | file.jkr |
file.jkr.bin (or similar) |
This is safer and more predictable. If you relied on the old overwrite behavior, update your scripts to use the new output paths.
- Update any code using static methods to use service instances
- Review CLI scripts for argument compatibility
- Remove manual decrypt/decompress steps for FrontierTextTool/FrontierDataTool
- Update any custom integrations to use the new DI pattern
- Update scripts that relied on
--noFileRewriteor in-place file modification - Replace
--logwith--saveMetain all scripts - Remove
--closefrom scripts (no longer needed)