Help:Creating mods: Difference between revisions

From ZeldaMods (Breath of the Wild)
Jump to navigation Jump to search
imported>BravelyPeculiar
No edit summary
(Update state of modding)
(28 intermediate revisions by 4 users not shown)
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]].
Welcome, modders! This page contains useful information for anybody who wants to create mods. If you just want to use other people's mods, see [[Help:Using mods]].


== Files, Tools and Tutorials ==
== What can currently be modded? ==
Since BotW uses a lot of Nintendo's own file formats, you'll need tools to be able to edit them. To use leoetlino's tools, you need to install the latest version of Python (64 bit version), and tick the "Add to PATH" / "Add to environment variables" box in the installer. Then, to install the tool, run <code>pip install TOOL_NAME</code> in the command line.


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.
* Textures
* 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).
* Models
** <code>wszst decompress INPUT_FILE.sbactorpack OUTPUT_FILE.bactorpack</code>
* Actor parameters, including enemies, weapons, and armors
** <code>wszst compress INPUT_FILE.bfres OUTPUT_FILE.sbfres</code>
* Adding new actors
* 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]].
* Overworld and dungeon map files
* [[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>.
* Event flows, and as a direct consequence: cutscenes, NPC interactions, quests, minigames, etc.
** <code>sarc extract INPUT_FILE.pack</code>
* Rigid body collisions
** <code>sarc create [-b] INPUT_FOLDER OUTPUT_FILE.sbactorpack</code> (Use <code>-b</code>for Wii U only).
* Text / dialogue
* [[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>.
* UI elements (HUD, title screen, logos, etc.)
** <code>byml_to_yml INPUT_FILE.byml OUTPUT_FILE.yml</code>
* Music and audio (cannot add new tracks, only edit/replace existing)
** <code>yml_to_byml [-b] INPUT_FILE.yml OUTPUT_FILE.sbyml</code> (Use <code>-b</code> for Wii U only).
* Effects and shaders (limited)
* [[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>
== Getting set up ==
** <code>yml_to_aamp INPUT_FILE.yml OUTPUT_FILE.bgparamlist</code>
<br>
* [[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].
{{linkbox
** <code>.sbfres</code> files contain models.
| title = [[help:Dumping games|Dumping the game files]]
** <code>.Tex1.sbfres</code> files contain textures (Wii U).
| text = To make mods, you'll need to start by dumping the unedited game files from your copy of BotW.
** <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.
| faiconc = fas fa-copy
** <code>.Tex.sbfres</code> files contain both textures and mipmaps (Switch). Unlike on Wii U, mipmaps don't cause any problems here.
}}
{{linkbox
| title = [[help:Setting up tools|Setting up tools]]
| text = Since BotW uses a lot of Nintendo's own file formats, you'll need tools to be able to edit them.
| faiconc = fas fa-toolbox
}}
 
== Rules ==
 
=== The RSTB file ===
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:Updating the RSTB]].
 
=== File names and caching ===
The game assumes that any 2 files with the exact same filename also have the exact same contents. If you don't follow this rule when editing files, the game might load the wrong version of the file, leading to errors. The same rule applies to texture names - all unique textures should have unique names, even if they're located in different files.
 
=== File extensions for compressed resources ===
In most cases, file extensions that start with ".s" are used for [[Yaz0]]-compressed files. Ensure that any file with such extensions is compressed. Some tools (for example {{ltool|BotW Unpacker}}, {{ltool|byml-v2}} or {{ltool|sarc}}) will automatically compress files when needed.
 
Example: .bactorpack -> .sbactorpack (after compression)
 
=== Edit priority ===
If a file exists in your update dump, edit that copy of it. If it doesn't exist there, edit the one in your DLC dump. If it doesn't exist in either the update files or the DLC files, edit the one from the base game dump.

Revision as of 21:58, 8 December 2020

Welcome, modders! This page contains useful information for anybody who wants to create mods. If you just want to use other people's mods, see Help:Using mods.

What can currently be modded?

  • Textures
  • Models
  • Actor parameters, including enemies, weapons, and armors
  • Adding new actors
  • Overworld and dungeon map files
  • Event flows, and as a direct consequence: cutscenes, NPC interactions, quests, minigames, etc.
  • Rigid body collisions
  • Text / dialogue
  • UI elements (HUD, title screen, logos, etc.)
  • Music and audio (cannot add new tracks, only edit/replace existing)
  • Effects and shaders (limited)

Getting set up


Rules

The RSTB file

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:Updating the RSTB.

File names and caching

The game assumes that any 2 files with the exact same filename also have the exact same contents. If you don't follow this rule when editing files, the game might load the wrong version of the file, leading to errors. The same rule applies to texture names - all unique textures should have unique names, even if they're located in different files.

File extensions for compressed resources

In most cases, file extensions that start with ".s" are used for Yaz0-compressed files. Ensure that any file with such extensions is compressed. Some tools (for example BotW Unpacker, byml-v2 or sarc) will automatically compress files when needed.

Example: .bactorpack -> .sbactorpack (after compression)

Edit priority

If a file exists in your update dump, edit that copy of it. If it doesn't exist there, edit the one in your DLC dump. If it doesn't exist in either the update files or the DLC files, edit the one from the base game dump.