/GNTool

A tool that allows you to modify files in a Naruto GNT ISO file.

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

GNTool

GNTool Logo

GNTool is an application to help with modding the Naruto GNT/Clash of Ninja games. Many of the tools will also work with other games created by Eighting.

Table of Contents

Prerequisites

  • The ISO File you wish to work with.
  • Windows

Currently, only Windows binaries are currently being released. If there is a request for additional operating systems to support please log an issue for it.

Usage

To run the tool, download the latest release zip file from the GNTool releases. Then extract the zip file and run GNTool.bat

Launch

If you click on the wrench button you will access the tools menu. There, you can find many individual tools. For more information on each of the tools please see the Tools Documentation.

If you plan on making many changes to a game, such as for a mod, it is recommended to create a GNTool Workspace. A workspace contains the files from an ISO, including uncompressed files. Hit Create Workspace in the main GNTool menu to create a new workspace.

Workspace Example

For descriptions of each workspace option, see the following reference documents:

Once you are satisfied with your changes, you can build a new ISO by selecting Build ISO under the file menu at the top. By default GNTool will build the ISO with multiple CPU cores. You can disable this and only use one core by disabling Parallel Build in the file menu.

By default, the build will push non-system files to the back of the ISO such that the ISO is exactly 1,459,978,240 bytes (~1.35 GB). If you wish for non-system files to be placed immediately after system files, disable the Push Files to Back of ISO setting under the File menu.

Warning

⚠️ Please be aware of the following ⚠️

  • Do not rename or delete any files in the workspace directory.
  • Do not modify the contents of workspace.bin, codes.json, or any files in the compressed directory.
  • The compression algorithm used by GNTool does not perfectly match Eighting's, therefore newly compressed files may be larger than their original compressed versions.
  • Avoid modifying bytes in main.dol from offset 0x83F58 to 0x843FC, as these are used for Code Injection.

How it Works

FPK files are archives that contain various game related files. Each entry is compressed with an Eighting specific PRS compression algorithm. GNTool can both unpack and repack FPK files with any changes that you've made.

There are multiple steps involved in the execution of this program. First, the contents of the ISO are dumped to the compressed folder in the workspace. The contents are then copied to the uncompressed folder. In the uncompressed folder, each FPK is uncompressed using the Eighting PRS uncompression algorithm. The FPK files in the uncompressed folder are then deleted. This will leave the compressed folder as the compressed version of the game files and the uncompressed folder as the uncompressed version of the game files.

Both of these directories are fully functional copies of the game when run through Dolphin. You can launch either by opening sys/main.dol in Dolphin.

When you are ready to rebuild the ISO, only modified files are repacked. This is the benefit of keeping the compressed folder, the original FPKs are maintained in the workspace state. GNTool calculates which files have changed by comparing each file to its expected CRC32 value.

Logging

To access log files generated by this application, go to your home directory (e.g. C:\Users\{your user}) and look for a log file name that starts with fpk (fpkjava0.log.0 for example). This tool will store 5 log files at a time with different numbers at the end for each instance. Make sure to include all of these for any issue reports.

Contributing

If you have enhancement ideas, defect requests, or generally want to contribute to the project, please read CONTRIBUTING.md.

Authors

Special Thanks

  • tpu - Wrote original PRS uncompression algorithm.
  • RupertAvery - Wrote original PRS compression algorithm.
  • Luigi Auriemma - Ported PRS compression/uncompression algorithms to QuickBMS.
  • Nisto - For writing musyx-extract for sound file reading and writing.
  • Struggleton - For writing TXG2TPL for txg file reading and writing.
  • The Dueling Potato - For writing seq-kage for seq file reading and writing.

License

This project is licensed under the GPL-3.0 - see the LICENSE file for details.