Frequently Asked Questions: Difference between revisions

m Fix link
m Add StatsUtil instructions for other operating systems
Line 364: Line 364:


=== StatsUtil ===
=== StatsUtil ===
StatsUtil is a tool created by PsyCommando that can be used to export some of the game’s binary files and scripts to XML files and then import them back into the game after making changes. SkyTemple can now do almost everything that StatsUtil can, so there’s no real reason to use it unless SkyTemple isn’t working for you, you want to manually edit some data without an UI, or you want to mass import and export scripts.
StatsUtil is a tool created by PsyCommando as part of [https://github.com/PsyCommando/ppmdu_2 his ppmdu suite]. It can be used to export some of the game’s binary files and scripts to XML files and then import them back into the game after making changes. SkyTemple can now do almost everything that StatsUtil can, so there’s no need to use it unless SkyTemple isn’t working for you, you want to manually edit some data without an UI, or you want to mass import and export scripts.


Unlike SkyTemple, StatsUtil is a command line tool, it doesn’t have an interface and must be run using the terminal or batch files to execute commands. If you want to try it out it’s recommended to download [https://projectpokemon.org/home/applications/core/interface/file/attachment.php?id=45770 Psy’s modding setup folder], which contains StatsUtil + Ndstool (needed to unpack the rom so StatsUtil can read and write the files) + Some .bat files you can use to run StatsUtil without having to type commands yourself.
Unlike SkyTemple, StatsUtil is a command line tool, it doesn’t have an interface and must be run using the terminal or batch files to execute commands. Under Windows, the easiest way to use it is to download [https://projectpokemon.org/home/applications/core/interface/file/attachment.php?id=45770 Psy’s modding setup folder], which contains StatsUtil + Ndstool (needed to unpack the rom so StatsUtil can read and write the files) + Some .bat files you can use to run StatsUtil without having to type commands yourself.


After you download the folder, copy your rom into it and rename it to “rom.nds”. Then run “1b_ExtractRomNamed_rom.nds.bat”. Wait for the terminal to close, after it does you should have a new folder named “rom” containing some subfolders. Now run “2a_DecompileEverything.bat”. Once it finishes you should have a new folder called “romstats”. That folder contains the XML files you can edit to make changes to the game.
After you download the folder, copy your rom into it and rename it to “rom.nds”. Then run “1b_ExtractRomNamed_rom.nds.bat”. Wait for the terminal to close, after it does you should have a new folder named “rom” containing some subfolders. Now run “2a_DecompileEverything.bat”. Once it finishes you should have a new folder called “romstats”. That folder contains the XML files you can edit to make changes to the game.


Once you are done with the changes, apply them to the rom by running “3a_CompileEverythingAndMakeRom.bat”. Once the process finishes your rom will be patched (check the modification date, it should have changed). After this you can copy the rom back to its original location and test your changes.
Once you are done with the changes, apply them to the rom by running “3a_CompileEverythingAndMakeRom.bat”. Once the process finishes your rom will be patched (check the modification date, it should have changed). After this you can copy the rom back to its original location and test your changes.
If your operating system is not Windows, you will have to build the tool from source following the instructions in the repository. Once you do so, you'll need some other tool to unpack and repack the ROM, since StatsUtil can only work with the ROM data after it's unpacked.