Skip to content

Script & Tool Patching

SinsofSloth edited this page Feb 29, 2020 · 4 revisions

Overview

Using game's own patching method by creating patch files automatically

Requirements

Note

Mod Filenames

Your mod files can have any name, but the index number MUST be the first that comes in the file name and not altered, unless doing intentional swaps, testing, etc of similar nature. Existing files in the update romfs do not need an index number but MUST have its filename unedited. You can separate the index number of the file with any character besides a number.

How to Run pack_info.py:

If you have ONLY python 3+ versions installed, double-click pack_info.py to run it. If you have another lower version installed, run command prompt by clicking the directory bar in Windows Explorer and type cmd and press enter. In the command prompt, type py -3 pack_info.py and press enter to run it.

Applying Only New Patches

  1. Create a new folder with any desired name with pack_info.py and run it. Ignore the error log, and three new folders, original_patches and romfs\mods, should be created.

  2. In the original_patches folder, create a new folder named patch4.

  3. Run FETH Archive Manager and click the Save button. Save INFO0.bin in original_patches\patch4. There should be a INFO0.bin and INFO2.bin in original_patches\patch4.

  4. Copy your mods you wish to patch to the game to romfs\mods.

  5. Run pack_info.py. In the romfs folder, copy eveything to \atmosphere\contents\010055D009F78000\romfs on your microSD card.

IMPORTANT: If you deleted a file in your mods folder and run pack_info.py again, that file will not be added to the INFO0.bin and will not show up in the game.

Applying Patches Only to Existing Files in the Update

  1. Create a new folder patch4 in \atmosphere\contents\010055D009F78000\romfs of your microSD card. Emulate the filepath of the file(s) you edited in \atmosphere\contents\010055D009F78000\romfs.

Example: The filepath of fixed_classdata.bin is C:\Users\User\patch4\nx\data\fixed_classdata.bin of the update romfs. To apply the edits, I would have the filepath of fixed_classdata.bin as E:\atmosphere\contents\010055D009F78000\romfs\patch4\nx\data\fixed_classdata.bin.

  1. Copy the INFO0.bin and INFO2.bin found in the same update folder where the edited files came from to atmosphere\contents\010055D009F78000\romfs\patch4.

Applying Both New Patches and Patches to Existing Files in the Update

  1. Create a new folder with any desired name with pack_info.py and run it. Ignore the error log, and three new folders, original_patches and romfs\mods, should be created.

  2. In the original_patches folder, create a new folder named patch4.

  3. Copy the INFO0.bin and INFO2.bin found in the same update folder where the edited files came from to original_patches\patch4.

  4. Copy your mods you wish to patch to the game to romfs\mods. If you edited a file found in the update romfs, emulate the filepath of that file.

Example: The filepath of fixed_classdata.bin is C:\Users\User\patch4\nx\data\fixed_classdata.bin of the update romfs, and I edited it. To apply the edits, I would have the filepath of fixed_classdata.bin as C:Users\User\MyMods\romfs\mods\nx\data\fixed_classdata.bin.

  1. Run pack_info.py. In the romfs folder, copy eveything to \atmosphere\contents\010055D009F78000\romfs on your microSD card.

IMPORTANT: If you deleted a file in your mods folder and run pack_info.py again, that file will not be added to the INFO0.bin and will not show up in the game.