Spoiler

Python 2.7.11 (Don't worry, no heavy console-fu needed, at least for the HANS method)

Pillow (Used for Texture Stuff)

Harddrive with at least ~10GB free disk space.

A 3DS with either CFW OR Homebrew (for MH4U)



Homebrew A 3DS with CFW (for MHX)

1. Prerequisites

2. Acquire your romfs.bin



3. Extract romfs.bin and arc files

All you need to do for this step is place your romfs.bin (it has to be named like this) in the MH Mod Tools folder next to the .bat files (You should make sure that there is no space in the path to your modfolder).

Then double click 1_extract_romfs.bat.

Wait for it to finish.

Then double click on 2_extract_arcfs.bat.

This step will take some time. arcfs consists of ~100.000 files.



4. Modifying Files

After Step 3 you will end up with 2 folders: romfs and arcfs. Basically romfs contains all uncompressed files of the game and arcfs are all the compressed files (which are nearly all) extracted. e.g. you will find battle BGM in romfs, but SFX in arcfs.



4.1 Modifying Sound Files

Sound files have the filesuffix .mca .



4.1.1 Convert .mca to .wav

Find an .mca file in romfs or arcfs and copy it to the main folder (next to the .bat files). Then drag & drop it onto 3_mca2wav.bat. After the black window closes you will end up with a wav file which you can play back in any common media player.



4.1.2 Convert .wav to .mca

To inject your own music into the game you have to convert it to a .mca file. If you have your music not in .wav format use something like audacity to convert it to .wav first. Then copy your .wav file in the main folder (next to the .bat files) and drag & drop it onto either 3_wav2mca_mh4.bat or 3_wav2mca_mhx.bat, depending on which game you're currently modifying. After the black window closes you will end up with your .mca file which you can then use to replace any .mca in romfs or arcfs.



4.2 Modifying Textures

Texture files have the filesuffix .tex .



4.2.1 Convert .tex to .png

Find an .tex file in arcfs and copy it to the main folder (next to the .bat files). Then drag & drop it onto 3_tex2png.bat. After the black window closes you will end up with a single .png and a .meta file depending on the texture there could also be a second png file with the alpha/reflection channel. Don't mess with the .meta file you will need it to convert the png back to .tex. Now you can edit your .png in your favorite image editor.



4.2.2 Convert .png to .tex



To convert the modified .png back to a .tex drag & drop it onto 3_tex2png.bat. After the black window closes you will end up with your modified .tex which you can then use to replace the original one.

Attention:

Due to preserving the best quality the encoding will autmatically be uncompressed, so the modified file will be multiple times bigger than the original. If you want to control the compression you will have to learn console-fu and have look at the .bat and tools/textool.py.



4.3 Modifying any File



Just open files of interest to you in your favorite hex editor and start hacking

5. Repack Everything

After you did all your modifications and replaced the original files in arcfs and romfs it's time to repackage everything.

For this just double click on 4_repack_arcfs_mh4.bat or 4_repack_arcfs_mhx.bat, depending on the game your modifying. This Step will take a lot of time due to all files being recompressed and packaged.

After the black window closes double click on 5_repack_romfs.bat and you will end up with a new romfs file called modded_romfs.bin.



6. Getting your mod on your 3ds

6.1 HANS (only MH4U)

Copy your modded_romfs.bin onto your SD card under:

/HANS/00126100.bin for EU copy

/HANS/00126300.bin for US copy

/HANS/0011D700.bin for MH4G copy

Then start your game with HANS and your modded romfs enabled.



6.2 CIA repack (MH4U and MHX)

6.3 LayeredFS (MH4U and MHX v1.00) [Advanced Users]

You actually don't need the modded_romfs.bin, you just need to copy the modified files from romfs onto your SD card with the configured path of the layeredfs plugin. Files you modified in the arcfs folder got repacked into .arc files. You have to figure out which one under romfs/arc/ contains your modified file and you only need to copy that one or just copy it all.



7. Done, enjoy your mod!

I hope my tutorial was understandable and of help to you. If you managed to put a cool mod together don't hesitate to reply here, pm me or tweet me screenshots of your work. I would appreciate that a lot!



Also tell me if you have suggestions on improving this guide or the tools.



8. Bonus



Try to mod it into your game



Textures

Result Screenshots I ripped the Attack on Titan Deviljho Texture from the MHXR Smartphone game for you.Try to mod it into your game

Credits







@Asia81 for his guide on CIA repackaging @dnasdw for 3dstool @moghedien for etc1 decoding @Gericom for etc1 encoding