Help:Creating mods: Difference between revisions

no edit summary
imported>BravelyPeculiar
No edit summary
imported>BravelyPeculiar
No edit summary
Line 1: Line 1:
Welcome, modders! This page is intended to be a collection of useful information for anybody who wants to create mods. If you want to simply use other people's mods, see [[Help:Setting up mods|Help:Playing with mods]].
Welcome, modders! This page is intended to be a collection of useful information for anybody who wants to create mods. If you want to simply use other people's mods, see [[Help:Setting up mods|Help:Playing with mods]].
== Dumping Game files ==


== Files, Tools and Tutorials ==
== Files, Tools and Tutorials ==
Line 5: Line 7:


If you're not sure which tool to use on a file, search for its extension on this wiki to find what file format that extension is used for.
If you're not sure which tool to use on a file, search for its extension on this wiki to find what file format that extension is used for.
* Many files in the game are compressed with [[Yaz0]] compression. Compressed files generally have the letter <code>s</code> prefixed to their file extension. To decompress and recompress these files, use [https://szs.wiimm.de/wszst/ wszst](use the download marked Cygwin if you're running Windows).
 
** <code>wszst decompress INPUT_FILE.sbactorpack OUTPUT_FILE.bactorpack</code>
=== Yaz0 compression ===
** <code>wszst compress INPUT_FILE.bfres OUTPUT_FILE.sbfres</code>
Many files in the game are compressed with [[Yaz0]] compression. Compressed files generally have the letter <code>s</code> prefixed to their file extension. To decompress and recompress these files, use [https://szs.wiimm.de/wszst/ wszst](use the download marked Cygwin if you're running Windows).
* The file [[ResourceSizeTable.product.rsizetable]] (referred to as the RSTB file) contains a list of size limits for almost every file in the game (calculated from the non-Yaz0-compressed file sizes). If you edit a file to make its filesize bigger, you'll need to edit this file to prevent errors. For details, see [[Help:Editing the RSTB]].
* <code>wszst decompress INPUT_FILE.sbactorpack OUTPUT_FILE.bactorpack</code>
* [[SARC]] archives contain collections of other files and folders, like .zip folders. Unpack, edit and re-pack them with leoetlino's [https://pypi.org/project/sarc/ <code>sarc</code> tool]. This tool automatically decompresses Yaz0-encoded archives, and re-compresses them when you repack if the extension starts with an <code>s</code>.
* <code>wszst compress INPUT_FILE.bfres OUTPUT_FILE.sbfres</code>
** <code>sarc extract INPUT_FILE.pack</code>
 
** <code>sarc create [-b] INPUT_FOLDER OUTPUT_FILE.sbactorpack</code> (Use <code>-b</code>for Wii U only).
=== The RSTB file ===
* [[BYML]] files contain game parameters. Convert them to an editable format (and back) with leoetlino's [https://pypi.org/project/byml/ <code>byml</code> tool]. This tool automatically decompresses Yaz0-encoded files, and re-compresses them if the extension starts with an <code>s</code>.
The file [[ResourceSizeTable.product.rsizetable]] (referred to as the RSTB file) contains a list of size limits for almost every file in the game (calculated from the non-Yaz0-compressed file sizes). If you edit a file to make its filesize bigger, you'll need to edit this file to prevent errors. For details, see [[Help:Editing the RSTB]].
** <code>byml_to_yml INPUT_FILE.byml OUTPUT_FILE.yml</code>
 
** <code>yml_to_byml [-b] INPUT_FILE.yml OUTPUT_FILE.sbyml</code> (Use <code>-b</code> for Wii U only).
=== SARC archives ===
* [[AAMP]] files also contain game parameters. Convert them to an editable format (and back) with leoetlino's [https://pypi.org/project/aamp/ <code>aamp</code> tool].
[[SARC]] archives contain collections of other files and folders, like .zip folders. Unpack, edit and re-pack them with leoetlino's [https://pypi.org/project/sarc/ <code>sarc</code> tool]. This tool automatically decompresses Yaz0-encoded archives, and re-compresses them when you repack if the extension starts with an <code>s</code>.
** <code>aamp_to_yml INPUT_FILE.bxml OUTPUT_FILE.yml</code>
* <code>sarc extract INPUT_FILE.pack</code>
** <code>yml_to_aamp INPUT_FILE.yml OUTPUT_FILE.bgparamlist</code>
* <code>sarc create [-b] INPUT_FOLDER OUTPUT_FILE.sbactorpack</code> (Use <code>-b</code>for Wii U only).
* [[BFRES]] files contain the game's models and textures. Tutorials on how to edit these for Wii U can be found in [https://drive.google.com/drive/folders/1Z1_A3w0VvPHp22H_Yh_dSdzI5hr4OAv9 Fooni's Tutorials].
 
** <code>.sbfres</code> files contain models.
=== BYML files ===
** <code>.Tex1.sbfres</code> files contain textures (Wii U).
[[BYML]] files contain game parameters. Convert them to an editable format (and back) with leoetlino's [https://pypi.org/project/byml/ <code>byml</code> tool]. This tool automatically decompresses Yaz0-encoded files, and re-compresses them if the extension starts with an <code>s</code>.
** <code>.Tex2.sbfres</code> files contain mipmaps for textures (Wii U). Since we can't edit these on Wii U yet, they need to be disabled.
* <code>byml_to_yml INPUT_FILE.byml OUTPUT_FILE.yml</code>
** <code>.Tex.sbfres</code> files contain both textures and mipmaps (Switch). Unlike on Wii U, mipmaps don't cause any problems here.
* <code>yml_to_byml [-b] INPUT_FILE.yml OUTPUT_FILE.sbyml</code> (Use <code>-b</code> for Wii U only).
 
=== AAMP files ===
[[AAMP]] files also contain game parameters. Convert them to an editable format (and back) with leoetlino's [https://pypi.org/project/aamp/ <code>aamp</code> tool].
* <code>aamp_to_yml INPUT_FILE.bxml OUTPUT_FILE.yml</code>
* <code>yml_to_aamp INPUT_FILE.yml OUTPUT_FILE.bgparamlist</code>
 
=== BFRES files ===
[[BFRES]] files contain the game's models and textures. Tutorials on how to edit these for Wii U can be found in [https://drive.google.com/drive/folders/1Z1_A3w0VvPHp22H_Yh_dSdzI5hr4OAv9 Fooni's Tutorials].
* <code>.sbfres</code> files contain models.
* <code>.Tex1.sbfres</code> files contain textures (Wii U).
* <code>.Tex2.sbfres</code> files contain mipmaps for textures (Wii U). Since we can't edit these on Wii U yet, they need to be disabled.
* <code>.Tex.sbfres</code> files contain both textures and mipmaps (Switch). Unlike on Wii U, mipmaps don't cause any problems here.