Skip to content

Easy to use Python tools to import/export text data from Monster Hunter Frontier files.

License

Notifications You must be signed in to change notification settings

Houmgaor/FrontierTextHandler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FrontierTextHandler

A utility to read text from Monster Hunter Frontier, edit and reinsert. It is roughly a Python rewrite of FrontierTextTool (from ReFrontier, by mhvuze) in Python.

Install

Download the repository and run command from the main folder.

git clone https://github.com/Houmgaor/FrontierTextHandler.git
cd FrontierTextHandler

Usage

# This can save lives
python main.py --help

To extract the data:

  1. Decrypt, decompile MHFrontier source code with ReFrontier.
  2. Place the binary files mhfdat.bin, mhfpac.bin or mhfinf.bin in a data/ folder.
  3. Run main.py.

Output data will be in output/*.csv. The file output/refrontier.csv is compatible with ReFrontier.

Extract specific data

You can customize with data will be extracted. For instance to extract only the legs armor names from mhfdat.bin:

python main.py --xpath=dat/armors/legs

It will create a file output/dat-armors-legs.csv.

Change the game files

Using a CSV file, you can insert new strings (such as translations) in the original MHFrontier game.

The CSV file should follow this convention:

  1. The first column (location) of the file should be the original datum location (with format [offset]@[original file name]).
  2. The second column (source) is the original string value.
  3. The third column (target) is the new string value.

To update the file, use --csv-to-bin [input CSV] [output BIN file]. It will only add strings if "target" is different from "source". For instance:

python main.py --csv-to-bin output/dat-armors-legs.csv data/mhfdat.bin

Compatibility with ReFrontier

You can also convert any translation CSV to ReFrontier

python main.py --refrontier-to-csv

Currently, you can extract all names and descriptions for: weapons, armors, items as well as skills.

Credits

This software was realized with the support of @ezemania2 from the MezeLounge Discord community as well as the Mogapédia, the French Monster Hunter wiki.

See also

About

Easy to use Python tools to import/export text data from Monster Hunter Frontier files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages