AIDef:AI/PriestBossPhaseThird and Help:Adding items: Difference between pages

From ZeldaMods (Breath of the Wild)
(Difference between pages)
Jump to navigation Jump to search
imported>Leoetlino
(import AI definitions from 1.5.0 (add missing AITreeVariables))
 
imported>Ginger
m (Normalizing header names)
 
Line 1: Line 1:
{{AIDef
{{in creation}}
|name=PriestBossPhaseThird
Mods that deal with items will often edit items that already exist in the game. However, this can lead to conflicts between mods, so it is generally advised to make a new item, instead. This tutorial will cover all of the steps needed to add new items, as well as multiple methods for completing each step.
|type=AI
}}


== AITreeVariables ==
== Required tools ==
{|class="wikitable"
Adding new items requires several tools, most of which are described and are available [[Help:Setting up tools|here]].
! Name !! Type !! Default value !! Description
|-
| MetaAILife || Int || 10 ||
|-
| MetaAIMaxLife || Int || 10 ||
|-
| PriestBossMetaAIUnit || AITreeVariablePointer ||  ||
|-
|}


* [https://www.python.org/downloads/release/python-374/ Python 3.7] is necessary for just about every tool (Python 3.8 exists, but is not currently compatible with [[Help:Tools/aamp|aamp]] or [[Help:Tools/BCML|BCML]])
* A text editor like [https://notepad-plus-plus.org/downloads/ Notepad++]
* Wild Bits {{Install py package help|package=wildbits}}
* Breath of the Wild Cemu Mod Loader (or <code>bcml</code>) {{Install py package help|package=bcml}}
* [https://github.com/KillzXGaming/Switch-Toolbox/releases Switch Toolbox]
* BotW Duplicator Tools {{Install py package help|package=botw-duplicator-tools}}
* [https://gitlab.com/jkcclemens/msyt/ msyt], [https://github.com/polarbunny/msyt-tools/releases/latest msyt-tools], [https://github.com/IcySon55/3DLandMSBTeditor/releases MSBT Editor], or [https://github.com/IcySon55/Kuriimu/releases/latest Kuriimu]


== StaticInstParams ==
== Tutorial ==
{|class="wikitable"
! Name !! Type !! Default value !! Description
|-
| BreakIronBallCount || Int ||  ||
|-
| PercentLifeTransition || Float ||  ||
|-
| PercentLifePrevious || Float ||  ||
|-
|}


=== Before we begin ===
'''Do not skip this section, it is very important.'''


== Derived definitions ==
This tutorial will use several terms that you may not be familiar with, or will have specific definitions you may not have used before:
=== 段階_巨大化 (Priest_Boss_MetaAI, Root) ===
 
{{AIDefDerived
* File name (or FileName) - the name of a file. For example, for the file <code>Armor_001.sbfres</code>, the FileName is <code>Armor_001</code>
|name=段階_巨大化
* File extension (or FileExtension) - the type/extension of a file. For example, for the file <code>Armor_001.sbfres</code>, the FileExtension is <code>sbfres</code>
|group_name=Root
* Actor name (or ActorName) - the code name of the item, and the FileName of the actor pack. For example, the Hylian Tunic is <code>Armor_001_Upper</code>.
|derived_from=PriestBossPhaseThird
* <code>bfres</code> name (or BfresName) - the code name of the resource files containing the model and texture data for the actor, and the FileName of the <code>bfres</code> for an actor. For example, the Hylian Tunic is part of the Hylian Set and all Hylian Set resources are contained inside <code>Armor_001</code>. In general, an armor's BfresName is the first two parts of its ActorName (e.g. <code>Armor_001</code> out of <code>Armor_001_Upper</code>). This tutorial uses <code>sbfres</code> and <code>bfres</code> mostly interchangeably, but you can think of an <code>sbfres</code> as a ZIP archive that contains a <code>bfres</code>.
|aiprog=Priest_Boss_MetaAI
* Model name (or ModelName) - the code name of the model inside the resource files to be used. In almost all cases, this is the same as the ActorName. The only exceptions to this are for head armor models that have a mantle variant, like <code>Armor_001</code>. Their ActorName will end in <code>_Head</code>, and their ModelName will end in <code>_Head_A</code>.
}}
* Old - if something is referred to as "old," that means any files you are using as the base files for your new item. For example, if you are creating a new shield that performs similarly to <code>Weapon_Shield_001</code> (is a shield, is wooden, etc.) and you were copying its files to your mod, then <code>Weapon_Shield_001</code> would be the "old" actor name.
{|class="wikitable"
* New - anything that refers to the new item you are making. If something is not referred to as "old" or "new," then it is new. For example, if you are making <code>Armor_9001_Head</code> then that will be referred to as either the NewActorName and the ActorName.
! Name !! Value
 
|-
Vanilla weapons have the same name as their actor, model, and <code>bfres</code> names. For example, the actor <code>Weapon_Sword_001</code> has the model name <code>Weapon_Sword_001</code> and its resource files are in <code>Weapon_Sword_001.sbfres</code>.
| BreakIronBallCount || 3
 
|-
Note that anytime brackets are used, this means that whatever is inside the brackets should be replaced with something else. For example, <code>Bootup_[XXxx].pack</code> could be replaced with <code>Bootup_USen.pack</code> or <code>Bootup_EUen.pack</code> or other names. Do NOT leave the brackets in there. Another example might be <code>[FileName].[FileExtension]</code> which could be replaced with just about anything, like <code>Weapon_Sword_001.bxml</code> or <code>Link.Tex1.sbfres</code>. (Note that, in this case, "Link.Tex1" is the file name and <code>sbfres</code> is the file extension)
| PercentLifeTransition || 0.25
 
|-
If you are ever told to open a Powershell window and run a command, you can do that by holding shift, right-clicking somewhere inside the folder and clicking on "Open Powershell window here." Anytime you do this, it will be to run a Python script. All BotW modding Python scripts do not print '''anything''' to the Powershell window if they run successfully. If, at any time, one of the commands prints something to the Powershell window, stop right there and see if you can figure out what the problem is, or ask in the Discord. If you try to continue on, then 99% of the time you won't be able to, and the other 1% of the time, everything will have broken horribly. If worse comes to worst, you can also try one of the other methods. That's why this tutorial contains multiple, wherever possible.
| PercentLifePrevious || 0.5
 
|-
=== Setting up your folder structure ===
|}
The folder structure is important, as BotW will only load files if they're in a certain location. To begin with, you will want to create a folder structure that looks like this:
 
* BreathOfTheWild_[MyAwesomeModName]
** content
*** Actor
**** Pack
*** Model
*** Pack
*** UI
**** StockItem
 
Note that these names are case-sensitive.
 
=== Creating the actor ===
First, figure out what item (that already exists in game) behaves closest to your new item. Find the <code>sbactorpack</code> file for that item, and copy it to <code>content\Actor\Pack</code>. You will find the original file in your dumped UPDATE files (not the base game files), in the same location. (<code>content\Actor\Pack</code>) Make sure you copy it, and don't move the original.
 
==== Unpacking the actor pack ====
Not every file in the actor pack will need to be edited, and there are multiple ways to obtain the file from the actor pack. Any of the following three ways should work. You need only use one method. If one doesn't work for you, try another one. You will be editing any file that contains the actor name as its file name, or contains that actor name inside it. For most actors, that means the files with file extensions <code>bxml</code>, <code>bmodellist</code>, <code>bgparamlist</code>, and <code>bphysics</code>. If the item is craftable, you will also need to change the file with file extension <code>brecipe</code>. If the actor has physics, you will also need to change the files with file extensions <code>bphyssb</code> and <code>hkcl</code>. Other actor types may have additional files to change, so look thoroughly.
 
===== Using Switch Toolbox =====
Open Switch Toolbox, and then open the actor pack file in it. Expand the folders on the left side to find the files you need to edit, right click on them, and select Export Raw Data To File Location. You can then find the files in the same folder as the actor pack. Then, open a Powershell window in that folder, and use the command <code>aamp [FileName].[FileExtension] [FileName].[FileExtension].yml</code> for each file you extracted. Then open the files in the editor of your choice.
 
===== Using Wild Bits =====
Open Wild Bits, navigate to the SARC Tools tab, then open the actor pack file in it. You will see a hierarchy of the folders. Search for one of the files you need to modify, right-click on it, and open it in the AAMP editor. Wild Bits will automatically take you to the YAML Tools tab and open the file for editing.
 
===== Using <code>sarc</code> =====
Open Powershell window in the folder containing the actor pack. Use the command <code>sarc extract [FileName].sbactorpack</code>. This will create a new folder with all of the individual files. For each file you modify, you will need to open another Powershell window in that folder and use the command <code>aamp [FileName].[FileExtension] !!.yml</code>. Then open the files in the editor of your choice.
 
==== Editing the actor pack files ====
Once you've got the actor files opened in the editor you want, there will be certain parts of the files that you need to change. All instances of the old actor, model, and BFRES names will need to be changed to the new actor, model, and BFRES names. The following is a list of many of the changes that need to be made, but note that some of these may not apply to your item, and there are some changes that may not appear in this list. Be thorough when you look through the files for things that may need to be changed.
[[File:Addingitems_aampfilenames.png|alt=Actor pack file name changes|thumb|The underlined items need to be changed for this actor pack (in addition to the actor pack name and the contents of each file)]]
 
* File/Folder names:
** changing the name of the <code>[ActorName].bmodellist</code> file inside <code>Actor/ModelList</code>
** changing the name of the <code>[ModelName].bphysics</code> file inside <code>Actor/Physics</code>
** changing the name of the <code>[ActorName].bxml</code> file inside <code>Actor/ActorLink</code>
** changing the name of the <code>[ActorName].bgparamlist</code> file inside <code>Actor/GeneralParamList</code>
** changing the name of the <code>[BfresName]</code> folder inside <code>Physics/SupportBone</code>
** changing the name of the <code>[ModelName].bphyssb</code> file inside <code>Physics/SupportBone/[BfresName]</code>
** changing the name of the <code>[BfresName]</code> folder inside <code>Physics/Cloth</code>
** changing the name of the <code>[ModelName].hkcl</code> file inside <code>Physics/Cloth/[BfresName]</code>
* Inside <code>bmodellist</code>:
** changing the line that says <code>Folder: !str64 [BfresName]</code> to the new <code>bfres</code> name
** changing the line that says <code>UnitName: !str64 [modelName]</code> to the new model name
* Inside <code>bphysics</code>:
** changing the line that says <code>support_bone_setup_file_path: !str256 [BfresName]/[ModelName].bphyssb</code> to the new <code>bfres</code> and model names
** changing the line that says <code>cloth_setup_file_path: !str256 [BfresName]/[ModelName].hkcl</code> to the new <code>bfres</code> and model names
** '''Do not change anything with "Havok" in the name as those point to data inside the hkcl file which we cannot change.''' Physics should work fine without changing data ''inside'' the <code>hkcl</code> file, as long as you do change the ''name'' of the <code>hkcl</code> file.
* Inside <code>bxml</code>:
** changing the line that says <code>ActorCaptureUser: !strRef [ActorName]</code> to the new actor name
** changing the line that says <code>GParamUser: !strRef [ActorName]</code> to the new actor name
** changing the line that says <code>ModelUser: !strRef [ActorName]</code> to the new actor name
** changing the line that says <code>PhysicsUser: !StrRef [ModelName]</code> to the new model name[[File:Addingitems_bgparamlist.jpg|thumb|Example of two parameters commonly changed, inside the bgparamlist file.]]
* Inside <code>bgparamlist</code>:
** If your armor is upgradeable, changing the line that says <code>NextRankName: [ActorName]</code> to the actor name for the actor that this one upgrades into. (In game terms, "upgradeable" means via the Great Fairies)
** The <code>bgparamlist</code> file also contains most of the information about the stats of items. For example, a weapon/shield's durability, a weapon's damage, a shield's block rate, an armor's defense, an armor's set (and therefore set bonus) are all stored here. You may want to change some of these things. A comprehensive list of the things inside the <code>bgparamlist</code> file is available [[Bgparamlist|here]]. Commonly changed parameters include: <code>Life</code> (the durability of the item, in the <code>General</code> category), <code>Power</code> (a weapons' damage, in the <code>Attack</code> category), <code>DefenceAddLevel</code> (an armor's defense rating, in the <code>Armor</code> category).
 
Once you've made your changes, '''make sure to save'''.
 
==== Packing the actor pack ====
Once all the edits have been made, you are ready to put everything back into the actor pack. As with unpacking it, each method has its own way of packing it again.
 
===== Using Switch Toolbox =====
First you will need to convert the text actor files back to their corresponding types. Open a Powershell window in the folder that contains the files you changed, and use the command <code>aamp [FileName].[FileExtension].yml [FileName].[FileExtension]</code> for each file you extracted.
 
Open the actor pack in Switch Toolbox again. Switch Toolbox is kind of wonky, and doesn't like replacing data for existing files, but it can import new data just fine. So, for every file you're going to add back into the actor pack, you will delete the original file, then right-click on the folder that contained it, and select to import the new file. Then click to save the file. Make sure you change the name of the file to the new actor name! You will be asked to Yaz0 compress the file. Click yes. And now you're done.
 
===== Using Wild Bits =====
When you've made your changes to the files in the YAML Tools tab and saved them, just click the button to save the actor pack, then change the name of the actor pack file to the new actor name. That's it, you're done.
 
===== Using <code>sarc</code> =====
First, convert the text actor files back to their corresponding types. Open a Powershell window in the folder that contains the files you changed, and use the command <code>aamp [FileName].yml !!.[FileExtension]</code> for each file you extracted. Once you have converted a yml file back to its original file type, make sure you delete the yml file. If you do not, it will be packed into the actor pack and that will cause errors and crashes.
 
Once you have converted all of the files back to their original types and deleted all the yml files, return to the <code>content\Actor\Pack</code> folder of your mod, and open another Powershell window, then pack everything back into the actor pack with the command <code>sarc create [FolderName] [FileName].sbactorpack</code>. '''If you are modding for WiiU or Cemu, the command is, instead, <code>sarc create [FolderName] [FileName].sbactorpack -b</code>'''. Once you have done so, make sure you change the name of the actor pack to the new actor name (you can also just use the new actor name as the FileName in the Powershell command). After that, make sure you delete the folder of un-sarc'ed actor files, and the old actor pack, if applicable. And you are now done.
 
=== Adding the actor info to the ActorInfo.product file ===
The previous step saw you creating the actual actor. This step is for creating the actor metadata that the game uses so that it knows your new actor exists. It also stores most data that appears in menus like the pause menu, crafting menu, or store menus. There are two main ways to do this, but first we need to copy the file so we can edit it. Find the original ActorInfo.product.sbyml file in your dumped UPDATE files (not the base game files), in <code>content\Actor</code>, and copy it to the same place in your mod's files. (<code>content\Actor</code>) Make sure you copy it, and don't move the original.
 
Then, open a Powershell window where your copied ActorInfo.product file is, and run the command <code>actorinfo_tool ActorInfo.product.sbyml duplicate [OldActorName] [NewActorName]</code> where the old actor name is the actor you copied during the Create the Actor step of this tutorial. '''If you are modding for WiiU or Cemu, the command is, instead, <code>actorinfo_tool -b ActorInfo.product.sbyml duplicate [OldActorName] [NewActorName]</code>'''.
 
==== Using Wild Bits ====
Open Wild Bits, and go to the YAML Tools tab. Open your ActorInfo.product file. Find the entry you duplicated (it will have your new actor name on the line <code>name: [NewActorName]</code>). Change the following lines:
 
* <code>bfres: [BfresName]</code> to your new <code>bfres</code> name
* <code>itemUseIconActorName: [ActorName]</code> to your new actor name
* <code>mainModel: [ModelName]</code> to your new model name
* Any additional information you changed in the actor pack that might be shown in any menu. For example, armor value of armor, defensive value of shields, damage of weapons, buying/selling price of items from/to a shop, crafting ingredients if the item is craftable, etc.
 
Once all the info is changed, click save.
 
==== Using a text editor ====
Open a Powershell window where your copied ActorInfo.product is (you probably already have one open from when you ran the <code>actorinfo_tool</code> command) and run the command <code>byml_to_yml ActorInfo.product.sbyml !!.yml</code>. Open the new ActorInfo.product.yml file in your file editor of choice. Find the entry you duplicated (it will have your new actor name on the line <code>name: [NewActorName]</code>). Change the following lines:
 
* <code>bfres: [BfresName]</code> to your new <code>bfres</code> name
* <code>itemUseIconActorName: [ActorName]</code> to your new actor name
* <code>mainModel: [ModelName]</code> to your new model name
* Any additional information you changed in the actor pack that might be shown in any menu. For example, armor value of armor, defensive value of shields, damage of weapons, buying/selling price of items from/to a shop, crafting ingredients if the item is craftable, etc.
 
Once all the info is changed, click save. Open another Powershell window where <code>ActorInfo.product.yml</code> is (you might have left the previous one open, you can use that), and run the command <code>yml_to_byml ActorInfo.product.yml !!.sbyml</code>. '''If you are modding for WiiU or Cemu, the command is, instead,<code>yml_to_byml -b ActorInfo.product.yml !!.sbyml</code>'''. Delete <code>ActorInfo.product.yml</code>, because it has been converted back and is no longer needed.
 
=== Creating the resource files ===
This section will cover the files that actually tell the game what the 3D model of the item looks like, in game. You'll need to copy the resources for the original item that you're modifying to your mod's <code>content\Model</code> folder. You will find the original resource files in your dumped UPDATE files (not the base game files), in the same location. (<code>content\Model</code>) The files will be called <code>[OldBfresName].sbfres</code> and <code>[OldBfresName].Tex.sbfres</code>. '''If you are modding for WiiU or Cemu, there are actually three files you will need: <code>[OldBfresName].sbfres</code>, <code>[OldBfresName].Tex1.sbfres</code>, and <code>[OldBfresName].Tex2.sbfres</code>. If <code>[OldBfresName].Tex1.sbfres</code> is not present in your UPDATE files, you will need to find it in your BASE GAME dumped files. This is the case for most, if not all, vanilla (non-DLC) items.'''
 
Once you have copied the old files to the new location, you will rename them to your new <code>bfres</code> name. Note that this name needs to match the <code>bfres</code> name you used when editing the actor pack files.
 
The bulk of the [[Help:Replacing models|model replacement]] and [[Help:Replacing textures|texture replacement]] is explained in other tutorials. Once you've used those tutorials to replace the bulk of the data, we can change the names that BotW uses to refer to that data. All the rest of this section assumes that you have both <code>sbfres</code> files for your actor open in Switch Toolbox. (If on WiiU, you don't need to open the Tex2 file. Switch Toolbox will read its data whenever you open the Tex1 file, as long as they are in the same folder.)
 
The first thing to change is the <code>bfres</code> name. This does not happen automatically when you change the <code>sbfres</code> name. You can do this by right-clicking on the orange file labeled "FRES" on the left side and selecting Rename.
 
Some important terms in modeling:
A "model" is the 3D data for a whole actor. The models are everything that is inside the <code>Models</code> folder of the <code>[BfresName].sbfres</code> file.
An "object" is the 3D data for a piece of an actor. The objects are everything that is inside the <code>Models\[ModelName]\Objects</code> folder.
A single model will be made up of one or more objects.
A "material" is the data the game uses to "paint" a model, so that it knows what color it is, how it reflects light, whether or not it's shiny or dull, etc. The materials are everything that is inside the <code>Models\[ModelName]\Materials</code> folder.
A "texture" (or "map") is a single picture that contains color, light reflection, metallic, or other data for a material. Textures are contained separately, in the <code>[BfresName].Tex.sbfres</code> file. (<code>[BfresName].Tex1.sbfres</code> for WiiU/Cemu)
A material will consist of one or more textures, plus shader data. (The author of this tutorial doesn't even really understand shaders. Sorry.)
Each model will contain one or more materials. Each object will be assigned one material. A single material may be assigned to any number of objects.
 
The ModelName is important, as the game will not load the actor if the ModelName here does not match the ModelName used in the actor pack files and actor info file! Object names can be arbitrary, but they generally follow the rule: <code>[ObjectName]__[MaterialName]</code> where <code>[ObjectName]</code> is whatever you want, and <code>[MaterialName]</code> is the name of the material assigned to it. Adhering to this naming convention is encouraged, so that if anyone else ever tries to reuse your files, they can make sense of them.
Click on the model name on the left side that you need to change. On the right side, near the top, the model name will be displayed. Click on that to edit it, and change it to your new mesh name that you used in the actor pack and actor info files. If successful, it will also change on the left side.
You may also change the names of the objects and materials in the same way.
When changing the names of the materials, on the right side, there will be a tab labeled Textures that will be selected by default. It will contain the names of all the textures being used by that material, and these will all be the names of the old textures. Switch over to the texture <code>sbfres</code> now, and change all the textures to names that fit your new actor.
When you are done changing all the names of the textures, switch back to the model <code>sbfres</code> and look at the Textures section of the material. Click on one of the entries in the table (for example, <code>[OldModelName]_Alb</code>) and then click on Edit. A new window will pop up, with a list of all the textures contained in the texture <code>sbfres</code>. Choose the one that corresponds with the new texture (for example, <code>[NewModelName]_Alb</code> or <code>[NewModelName]_Alb.0</code>) and click save. Do this for all the entries in the Textures table for this material, and then repeat the process for every other material.
[[File:Addingitems_bftxp.png|alt=Bftxp file editing|thumb|Some of the parts of a bftxp file that need to be edited (underlined in red)]]
If you are editing an armor that is dyeable, you then need to expand the Animations folder on the left, then Texture Pattern Animations, then right-click the folder that corresponds to your item (Head for the head, Upper for the torso, Lower for the legs). Select Export, and save it somewhere. Open the new <code>bftxp</code> file that you just saved in a text editor. It will contain a lot of gibberish and empty space. '''Make sure you only edit data that is in plain English, editing anything else will break the file.''' You will need to edit all the texture and material names to the new ones. For example, changing <code>[OldModelName]_Alb.0</code> to <code>[NewModelName]_Alb.0</code> and <code>[OldMaterialName]</code> to <code>[NewMaterialName]</code> (e.g. <code>Mt_Hood_001</code> to <code>Mt_Hood_9001</code>). Save it, then, back in Switch Toolbox, right-click on the folder inside Texture Pattern Animations that corresponds to your item, and select Replace. Select the <code>bftxp</code> you edited.
 
When you are done, select any file or folder from the model <code>sbfres</code>, in the list on the left, and save it. Switch Toolbox will ask if you want to Yaz0 compress the file, click Yes. Then click on any file or folder from the texture <code>sbfres</code>, in the list on the left, and save it. Switch Toolbox will again ask if you want to Yaz0 compress the file, click Yes. If you are editing a WiiU texture <code>sbfres</code>, it will then ask you to save the Tex2 sbfres, so save it and Yaz0 compress it, as well. And that's it, you are done with the files that tell the game what the new item looks like.
 
=== Creating an inventory icon ===
This section covers the inventory icons, the square images you see in the inventory grid in the pause menu. These files are kept in <code>content\UI\StockItem</code> for inventory items. Copy the old <code>sbitemco</code> file for the item you are using as your foundation, to the same location in your mod files (<code>content\UI\StockItem</code>). An <code>sbitemco</code> file is pretty much the same thing as an <code>sbfres</code> for textures, so you will edit it the same way, using Switch Toolbox. Make sure to change the name of the file to <code>[NewActorName].sbitemco</code>, the name of the file it contains in Toolbox to <code>[NewActorName].bitemco</code>, and the texture it contains to <code>[NewActorName]</code>
 
=== Creating an inventory name and description ===
There are many ways to add text to the game, some work better for single items, some work better for large-scale mods that edit lots of text. There are three main ways to edit the text files of the game: by converting them to text with <code>msyt</code> or <code>msyt-tools</code>, by editing them "directly" with Wild Bits, or by using a GUI like MSBT Editor or Kuriimu.
 
==== Using <code>msyt</code> or <code>msyt-tools</code> ====
{{Empty section}}
 
==== Using Wild Bits ====
{{Empty section}}
 
==== Using MSBT Editor or Kuriimu ====
First, you will need to copy the text archive to your files, so navigate to the <code>content\Pack</code> folder of the your game's UPDATE files. There will be several <code>Bootup_[XXxx].pack</code> files here. Each one is for a different region and language. For example, USen is for the US version, English language, while EUes is for the European version, Spanish language. Find the pack for the region/language you want to edit, and copy it to your mod's <code>content\Pack</code> folder.
 
Next, you'll need to extract it, so open a Powershell window and run the command <code>sarc extract Bootup_[XXxx].pack</code>. Go inside the newly created <code>Bootup_[XXxx]/Message</code> folder to find a file called <code>Msg_[XXxx].product.ssarc</code>. Open another Powershell window and use the command <code>sarc extract Msg_[XXxx].product.ssarc</code> to extract it, as well, then go into the new <code>Msg_[XXxx].product\ActorType</code> folder.
 
There are many <code>msbt</code> files here, and all of them have text data for the game. Find the one that fits your item type, and open it in MSBT Editor or Kuriimu. These programs both act very similarly, and the directions here will work for either program.
 
Once you've opened the <code>msbt</code> file, click on the green plus to add a new piece of text to the list, (in MSBT Editor, you'll type the name in the bar next to the plus first, while in Kuriimu you'll click the plus first and type the name in second) and name it <code>[ActorName]_Name</code>. Do it again, and this time, call it <code>[ActorName]_Desc</code>. Name is going to be for the item's name as it is shown in menus, and Desc is going to be for the item's descriptions. If your item is something that would appear in the Shiekah Slate album, so that you could take pictures of it and track it on the map with the Sheikah Radar, also add an <code>[ActorName]_PictureBook</code> and copy the text you made for <code>[ActorName]_Desc</code> into it. When you're done, File -> Save.
 
You'll now need to pack all the files back up, so go back to the <code>content\Pack\Bootup_[XXxx]\Message</code> folder, open a Powershell window and run the command <code>sarc create Msg_[XXxx].product Msg_[XXxx].product.ssarc</code>. '''If you are modding for WiiU or Cemu, the command is, instead,<code>sarc create Msg_[XXxx].product Msg_[XXxx].product.ssarc -b</code>'''. Once it has finished packing up the file, delete the <code>Msg_[XXxx].product</code> folder.
 
Then, go back to <code>content\Pack</code>, open another Powershell window and run the command <code>sarc create Bootup_[XXxx] Bootup_[XXxx].pack</code>. '''If you are modding for WiiU or Cemu, the command is, instead,<code>sarc create Bootup_[XXxx] Bootup_[XXxx].pack -b</code>'''. Once it has finished, delete the <code>Bootup_[XXxx]</code> folder. And now you're done with the menu text portion of your item.
 
=== Creating the save game data flags ===
This section covers the save game flags, which the game uses to remember whether or not you've picked up an item before. If you are adding a common item, like a material or consumable, this will make it so that the little popup that happens the first time you pick up an item, doesn't happen every single time you pick your new item up.
 
Save flags are all stored in <code>Bootup.pack</code>, so you're going to copy that file from your UPDATE data's <code>content\Pack</code> to the same place in your mod files. You will then open a Powershell window in that folder, and use the command <code>sarc extract Bootup.pack</code> to extract it. This will extract all the data inside the file into folders. Navigate to the new <code>content\Pack\Bootup\GameData</code> and find <code>gamedata.ssarc</code>. Open a new Powershell window here and use the command <code>sarc extract gamedata.ssarc</code>. This will create a new folder named <code>gamedata</code>. Go inside that folder and find <code>bool_data_0.bgdata</code>. Open yet another Powershell window here and run the command <code>byml_to_yml bool_data_0.bgdata !!.yml</code> to convert it to text, and then open the new <code>bool_data_0.yml</code> in a text editor.
Inside that file, find the text <code>IsGet_[OldActorName]</code> and copy the entire section into the space right after it. Change <code>IsGet_[OldActorName]</code> to <code>IsGet_[NewActorName]</code>. Then, go to [https://crccalc.com/ this website] and paste <code>IsGet_[NewActorName]</code> into the field, and click Calc CRC-32. Copy the result in the Result column for the CRC-32 row.
[[File:Addingitems_crc32hashpython.png|thumb|After running the python command, copy the underlined result to use as your HashValue]]
Open a new Powershell window. Use the command <code>python</code> to enter a python command line. Run the command <code>import ctypes; ctypes.c_int32([CRC-32Result]).value</code> to obtain a positive or negative number. <code>[CRC-32Result]</code> should be replaced with what you copied from the Result column for the CRC-32 row.
[[File:Addingitems_booldata0.jpg|thumb|Once you've copied the boolean data section, change the DataName and HashValue to match your new item.]]
In your text editor, paste the result from your calculator into the <code>HashValue</code> after <code>IsGet_[NewActorName]</code>, and save the file.
 
Open a Powershell window in the folder with <code>bool_data_0.yml</code> and run the command <code>yml_to_byml bool_data_0.yml !!.bgdata</code> . '''If you are modding for WiiU or Cemu, the command is, instead,<code>yml_to_byml -b bool_data_0.yml !!.bgdata</code>'''. Once it's converted, delete <code>bool_data_0.yml</code>.
 
Go up one folder, to <code>content\Pack\Bootup\GameData</code> and open a new Powershell window. Run the command <code>sarc create gamedata gamedata.ssarc</code>. '''If you are modding for WiiU or Cemu, the command is, instead,<code>sarc create gamedata gamedata.ssarc -b</code>'''. Once it's converted, delete the gamedata folder.
 
Go up two folders, to <code>content\Pack</code>, and open a new Powershell window. Run the command <code>sarc create Bootup Bootup.pack</code>. '''If you are modding for WiiU or Cemu, the command is, instead,<code>sarc create Bootup Bootup.pack -b</code>'''. Once it's converted, delete the Bootup folder.
 
=== Finishing up and installing the mod ===
And now you are done! There is a file that remains to be edited, called the RSTB, but you should not manually edit that file anymore, as there are so many other mods that edit it, along with the ActorInfo.product file, the Bootup and Bootup_XXxx packs, that it is not going to be compatible with any other mod that also does so. Instead we use <code>bcml</code> to install mods, merge the changes made to those files, and edit the RSTB for us. Open <code>bcml</code> via Powershell (just run the command <code>bcml</code>) and select Install... Then select Add Folder, select the <code>BreathOfTheWild_[MyAwesomeModName]</code> folder, and click OK. Wait for it to install, and you're ready to play the game with your new item!
 
== Troubleshooting ==
{{Empty section}}
[[Category:Guides]]

Revision as of 08:32, 31 December 2019

Mods that deal with items will often edit items that already exist in the game. However, this can lead to conflicts between mods, so it is generally advised to make a new item, instead. This tutorial will cover all of the steps needed to add new items, as well as multiple methods for completing each step.

Required tools

Adding new items requires several tools, most of which are described and are available here.

Tutorial

Before we begin

Do not skip this section, it is very important.

This tutorial will use several terms that you may not be familiar with, or will have specific definitions you may not have used before:

  • File name (or FileName) - the name of a file. For example, for the file Armor_001.sbfres, the FileName is Armor_001
  • File extension (or FileExtension) - the type/extension of a file. For example, for the file Armor_001.sbfres, the FileExtension is sbfres
  • Actor name (or ActorName) - the code name of the item, and the FileName of the actor pack. For example, the Hylian Tunic is Armor_001_Upper.
  • bfres name (or BfresName) - the code name of the resource files containing the model and texture data for the actor, and the FileName of the bfres for an actor. For example, the Hylian Tunic is part of the Hylian Set and all Hylian Set resources are contained inside Armor_001. In general, an armor's BfresName is the first two parts of its ActorName (e.g. Armor_001 out of Armor_001_Upper). This tutorial uses sbfres and bfres mostly interchangeably, but you can think of an sbfres as a ZIP archive that contains a bfres.
  • Model name (or ModelName) - the code name of the model inside the resource files to be used. In almost all cases, this is the same as the ActorName. The only exceptions to this are for head armor models that have a mantle variant, like Armor_001. Their ActorName will end in _Head, and their ModelName will end in _Head_A.
  • Old - if something is referred to as "old," that means any files you are using as the base files for your new item. For example, if you are creating a new shield that performs similarly to Weapon_Shield_001 (is a shield, is wooden, etc.) and you were copying its files to your mod, then Weapon_Shield_001 would be the "old" actor name.
  • New - anything that refers to the new item you are making. If something is not referred to as "old" or "new," then it is new. For example, if you are making Armor_9001_Head then that will be referred to as either the NewActorName and the ActorName.

Vanilla weapons have the same name as their actor, model, and bfres names. For example, the actor Weapon_Sword_001 has the model name Weapon_Sword_001 and its resource files are in Weapon_Sword_001.sbfres.

Note that anytime brackets are used, this means that whatever is inside the brackets should be replaced with something else. For example, Bootup_[XXxx].pack could be replaced with Bootup_USen.pack or Bootup_EUen.pack or other names. Do NOT leave the brackets in there. Another example might be [FileName].[FileExtension] which could be replaced with just about anything, like Weapon_Sword_001.bxml or Link.Tex1.sbfres. (Note that, in this case, "Link.Tex1" is the file name and sbfres is the file extension)

If you are ever told to open a Powershell window and run a command, you can do that by holding shift, right-clicking somewhere inside the folder and clicking on "Open Powershell window here." Anytime you do this, it will be to run a Python script. All BotW modding Python scripts do not print anything to the Powershell window if they run successfully. If, at any time, one of the commands prints something to the Powershell window, stop right there and see if you can figure out what the problem is, or ask in the Discord. If you try to continue on, then 99% of the time you won't be able to, and the other 1% of the time, everything will have broken horribly. If worse comes to worst, you can also try one of the other methods. That's why this tutorial contains multiple, wherever possible.

Setting up your folder structure

The folder structure is important, as BotW will only load files if they're in a certain location. To begin with, you will want to create a folder structure that looks like this:

  • BreathOfTheWild_[MyAwesomeModName]
    • content
      • Actor
        • Pack
      • Model
      • Pack
      • UI
        • StockItem

Note that these names are case-sensitive.

Creating the actor

First, figure out what item (that already exists in game) behaves closest to your new item. Find the sbactorpack file for that item, and copy it to content\Actor\Pack. You will find the original file in your dumped UPDATE files (not the base game files), in the same location. (content\Actor\Pack) Make sure you copy it, and don't move the original.

Unpacking the actor pack

Not every file in the actor pack will need to be edited, and there are multiple ways to obtain the file from the actor pack. Any of the following three ways should work. You need only use one method. If one doesn't work for you, try another one. You will be editing any file that contains the actor name as its file name, or contains that actor name inside it. For most actors, that means the files with file extensions bxml, bmodellist, bgparamlist, and bphysics. If the item is craftable, you will also need to change the file with file extension brecipe. If the actor has physics, you will also need to change the files with file extensions bphyssb and hkcl. Other actor types may have additional files to change, so look thoroughly.

Using Switch Toolbox

Open Switch Toolbox, and then open the actor pack file in it. Expand the folders on the left side to find the files you need to edit, right click on them, and select Export Raw Data To File Location. You can then find the files in the same folder as the actor pack. Then, open a Powershell window in that folder, and use the command aamp [FileName].[FileExtension] [FileName].[FileExtension].yml for each file you extracted. Then open the files in the editor of your choice.

Using Wild Bits

Open Wild Bits, navigate to the SARC Tools tab, then open the actor pack file in it. You will see a hierarchy of the folders. Search for one of the files you need to modify, right-click on it, and open it in the AAMP editor. Wild Bits will automatically take you to the YAML Tools tab and open the file for editing.

Using sarc

Open Powershell window in the folder containing the actor pack. Use the command sarc extract [FileName].sbactorpack. This will create a new folder with all of the individual files. For each file you modify, you will need to open another Powershell window in that folder and use the command aamp [FileName].[FileExtension] !!.yml. Then open the files in the editor of your choice.

Editing the actor pack files

Once you've got the actor files opened in the editor you want, there will be certain parts of the files that you need to change. All instances of the old actor, model, and BFRES names will need to be changed to the new actor, model, and BFRES names. The following is a list of many of the changes that need to be made, but note that some of these may not apply to your item, and there are some changes that may not appear in this list. Be thorough when you look through the files for things that may need to be changed.

Actor pack file name changes
The underlined items need to be changed for this actor pack (in addition to the actor pack name and the contents of each file)
  • File/Folder names:
    • changing the name of the [ActorName].bmodellist file inside Actor/ModelList
    • changing the name of the [ModelName].bphysics file inside Actor/Physics
    • changing the name of the [ActorName].bxml file inside Actor/ActorLink
    • changing the name of the [ActorName].bgparamlist file inside Actor/GeneralParamList
    • changing the name of the [BfresName] folder inside Physics/SupportBone
    • changing the name of the [ModelName].bphyssb file inside Physics/SupportBone/[BfresName]
    • changing the name of the [BfresName] folder inside Physics/Cloth
    • changing the name of the [ModelName].hkcl file inside Physics/Cloth/[BfresName]
  • Inside bmodellist:
    • changing the line that says Folder: !str64 [BfresName] to the new bfres name
    • changing the line that says UnitName: !str64 [modelName] to the new model name
  • Inside bphysics:
    • changing the line that says support_bone_setup_file_path: !str256 [BfresName]/[ModelName].bphyssb to the new bfres and model names
    • changing the line that says cloth_setup_file_path: !str256 [BfresName]/[ModelName].hkcl to the new bfres and model names
    • Do not change anything with "Havok" in the name as those point to data inside the hkcl file which we cannot change. Physics should work fine without changing data inside the hkcl file, as long as you do change the name of the hkcl file.
  • Inside bxml:
    • changing the line that says ActorCaptureUser: !strRef [ActorName] to the new actor name
    • changing the line that says GParamUser: !strRef [ActorName] to the new actor name
    • changing the line that says ModelUser: !strRef [ActorName] to the new actor name
    • changing the line that says PhysicsUser: !StrRef [ModelName] to the new model name
      Example of two parameters commonly changed, inside the bgparamlist file.
  • Inside bgparamlist:
    • If your armor is upgradeable, changing the line that says NextRankName: [ActorName] to the actor name for the actor that this one upgrades into. (In game terms, "upgradeable" means via the Great Fairies)
    • The bgparamlist file also contains most of the information about the stats of items. For example, a weapon/shield's durability, a weapon's damage, a shield's block rate, an armor's defense, an armor's set (and therefore set bonus) are all stored here. You may want to change some of these things. A comprehensive list of the things inside the bgparamlist file is available here. Commonly changed parameters include: Life (the durability of the item, in the General category), Power (a weapons' damage, in the Attack category), DefenceAddLevel (an armor's defense rating, in the Armor category).

Once you've made your changes, make sure to save.

Packing the actor pack

Once all the edits have been made, you are ready to put everything back into the actor pack. As with unpacking it, each method has its own way of packing it again.

Using Switch Toolbox

First you will need to convert the text actor files back to their corresponding types. Open a Powershell window in the folder that contains the files you changed, and use the command aamp [FileName].[FileExtension].yml [FileName].[FileExtension] for each file you extracted.

Open the actor pack in Switch Toolbox again. Switch Toolbox is kind of wonky, and doesn't like replacing data for existing files, but it can import new data just fine. So, for every file you're going to add back into the actor pack, you will delete the original file, then right-click on the folder that contained it, and select to import the new file. Then click to save the file. Make sure you change the name of the file to the new actor name! You will be asked to Yaz0 compress the file. Click yes. And now you're done.

Using Wild Bits

When you've made your changes to the files in the YAML Tools tab and saved them, just click the button to save the actor pack, then change the name of the actor pack file to the new actor name. That's it, you're done.

Using sarc

First, convert the text actor files back to their corresponding types. Open a Powershell window in the folder that contains the files you changed, and use the command aamp [FileName].yml !!.[FileExtension] for each file you extracted. Once you have converted a yml file back to its original file type, make sure you delete the yml file. If you do not, it will be packed into the actor pack and that will cause errors and crashes.

Once you have converted all of the files back to their original types and deleted all the yml files, return to the content\Actor\Pack folder of your mod, and open another Powershell window, then pack everything back into the actor pack with the command sarc create [FolderName] [FileName].sbactorpack. If you are modding for WiiU or Cemu, the command is, instead, sarc create [FolderName] [FileName].sbactorpack -b. Once you have done so, make sure you change the name of the actor pack to the new actor name (you can also just use the new actor name as the FileName in the Powershell command). After that, make sure you delete the folder of un-sarc'ed actor files, and the old actor pack, if applicable. And you are now done.

Adding the actor info to the ActorInfo.product file

The previous step saw you creating the actual actor. This step is for creating the actor metadata that the game uses so that it knows your new actor exists. It also stores most data that appears in menus like the pause menu, crafting menu, or store menus. There are two main ways to do this, but first we need to copy the file so we can edit it. Find the original ActorInfo.product.sbyml file in your dumped UPDATE files (not the base game files), in content\Actor, and copy it to the same place in your mod's files. (content\Actor) Make sure you copy it, and don't move the original.

Then, open a Powershell window where your copied ActorInfo.product file is, and run the command actorinfo_tool ActorInfo.product.sbyml duplicate [OldActorName] [NewActorName] where the old actor name is the actor you copied during the Create the Actor step of this tutorial. If you are modding for WiiU or Cemu, the command is, instead, actorinfo_tool -b ActorInfo.product.sbyml duplicate [OldActorName] [NewActorName].

Using Wild Bits

Open Wild Bits, and go to the YAML Tools tab. Open your ActorInfo.product file. Find the entry you duplicated (it will have your new actor name on the line name: [NewActorName]). Change the following lines:

  • bfres: [BfresName] to your new bfres name
  • itemUseIconActorName: [ActorName] to your new actor name
  • mainModel: [ModelName] to your new model name
  • Any additional information you changed in the actor pack that might be shown in any menu. For example, armor value of armor, defensive value of shields, damage of weapons, buying/selling price of items from/to a shop, crafting ingredients if the item is craftable, etc.

Once all the info is changed, click save.

Using a text editor

Open a Powershell window where your copied ActorInfo.product is (you probably already have one open from when you ran the actorinfo_tool command) and run the command byml_to_yml ActorInfo.product.sbyml !!.yml. Open the new ActorInfo.product.yml file in your file editor of choice. Find the entry you duplicated (it will have your new actor name on the line name: [NewActorName]). Change the following lines:

  • bfres: [BfresName] to your new bfres name
  • itemUseIconActorName: [ActorName] to your new actor name
  • mainModel: [ModelName] to your new model name
  • Any additional information you changed in the actor pack that might be shown in any menu. For example, armor value of armor, defensive value of shields, damage of weapons, buying/selling price of items from/to a shop, crafting ingredients if the item is craftable, etc.

Once all the info is changed, click save. Open another Powershell window where ActorInfo.product.yml is (you might have left the previous one open, you can use that), and run the command yml_to_byml ActorInfo.product.yml !!.sbyml. If you are modding for WiiU or Cemu, the command is, instead,yml_to_byml -b ActorInfo.product.yml !!.sbyml. Delete ActorInfo.product.yml, because it has been converted back and is no longer needed.

Creating the resource files

This section will cover the files that actually tell the game what the 3D model of the item looks like, in game. You'll need to copy the resources for the original item that you're modifying to your mod's content\Model folder. You will find the original resource files in your dumped UPDATE files (not the base game files), in the same location. (content\Model) The files will be called [OldBfresName].sbfres and [OldBfresName].Tex.sbfres. If you are modding for WiiU or Cemu, there are actually three files you will need: [OldBfresName].sbfres, [OldBfresName].Tex1.sbfres, and [OldBfresName].Tex2.sbfres. If [OldBfresName].Tex1.sbfres is not present in your UPDATE files, you will need to find it in your BASE GAME dumped files. This is the case for most, if not all, vanilla (non-DLC) items.

Once you have copied the old files to the new location, you will rename them to your new bfres name. Note that this name needs to match the bfres name you used when editing the actor pack files.

The bulk of the model replacement and texture replacement is explained in other tutorials. Once you've used those tutorials to replace the bulk of the data, we can change the names that BotW uses to refer to that data. All the rest of this section assumes that you have both sbfres files for your actor open in Switch Toolbox. (If on WiiU, you don't need to open the Tex2 file. Switch Toolbox will read its data whenever you open the Tex1 file, as long as they are in the same folder.)

The first thing to change is the bfres name. This does not happen automatically when you change the sbfres name. You can do this by right-clicking on the orange file labeled "FRES" on the left side and selecting Rename.

Some important terms in modeling: A "model" is the 3D data for a whole actor. The models are everything that is inside the Models folder of the [BfresName].sbfres file. An "object" is the 3D data for a piece of an actor. The objects are everything that is inside the Models\[ModelName]\Objects folder. A single model will be made up of one or more objects. A "material" is the data the game uses to "paint" a model, so that it knows what color it is, how it reflects light, whether or not it's shiny or dull, etc. The materials are everything that is inside the Models\[ModelName]\Materials folder. A "texture" (or "map") is a single picture that contains color, light reflection, metallic, or other data for a material. Textures are contained separately, in the [BfresName].Tex.sbfres file. ([BfresName].Tex1.sbfres for WiiU/Cemu) A material will consist of one or more textures, plus shader data. (The author of this tutorial doesn't even really understand shaders. Sorry.) Each model will contain one or more materials. Each object will be assigned one material. A single material may be assigned to any number of objects.

The ModelName is important, as the game will not load the actor if the ModelName here does not match the ModelName used in the actor pack files and actor info file! Object names can be arbitrary, but they generally follow the rule: [ObjectName]__[MaterialName] where [ObjectName] is whatever you want, and [MaterialName] is the name of the material assigned to it. Adhering to this naming convention is encouraged, so that if anyone else ever tries to reuse your files, they can make sense of them. Click on the model name on the left side that you need to change. On the right side, near the top, the model name will be displayed. Click on that to edit it, and change it to your new mesh name that you used in the actor pack and actor info files. If successful, it will also change on the left side. You may also change the names of the objects and materials in the same way. When changing the names of the materials, on the right side, there will be a tab labeled Textures that will be selected by default. It will contain the names of all the textures being used by that material, and these will all be the names of the old textures. Switch over to the texture sbfres now, and change all the textures to names that fit your new actor. When you are done changing all the names of the textures, switch back to the model sbfres and look at the Textures section of the material. Click on one of the entries in the table (for example, [OldModelName]_Alb) and then click on Edit. A new window will pop up, with a list of all the textures contained in the texture sbfres. Choose the one that corresponds with the new texture (for example, [NewModelName]_Alb or [NewModelName]_Alb.0) and click save. Do this for all the entries in the Textures table for this material, and then repeat the process for every other material.

Bftxp file editing
Some of the parts of a bftxp file that need to be edited (underlined in red)

If you are editing an armor that is dyeable, you then need to expand the Animations folder on the left, then Texture Pattern Animations, then right-click the folder that corresponds to your item (Head for the head, Upper for the torso, Lower for the legs). Select Export, and save it somewhere. Open the new bftxp file that you just saved in a text editor. It will contain a lot of gibberish and empty space. Make sure you only edit data that is in plain English, editing anything else will break the file. You will need to edit all the texture and material names to the new ones. For example, changing [OldModelName]_Alb.0 to [NewModelName]_Alb.0 and [OldMaterialName] to [NewMaterialName] (e.g. Mt_Hood_001 to Mt_Hood_9001). Save it, then, back in Switch Toolbox, right-click on the folder inside Texture Pattern Animations that corresponds to your item, and select Replace. Select the bftxp you edited.

When you are done, select any file or folder from the model sbfres, in the list on the left, and save it. Switch Toolbox will ask if you want to Yaz0 compress the file, click Yes. Then click on any file or folder from the texture sbfres, in the list on the left, and save it. Switch Toolbox will again ask if you want to Yaz0 compress the file, click Yes. If you are editing a WiiU texture sbfres, it will then ask you to save the Tex2 sbfres, so save it and Yaz0 compress it, as well. And that's it, you are done with the files that tell the game what the new item looks like.

Creating an inventory icon

This section covers the inventory icons, the square images you see in the inventory grid in the pause menu. These files are kept in content\UI\StockItem for inventory items. Copy the old sbitemco file for the item you are using as your foundation, to the same location in your mod files (content\UI\StockItem). An sbitemco file is pretty much the same thing as an sbfres for textures, so you will edit it the same way, using Switch Toolbox. Make sure to change the name of the file to [NewActorName].sbitemco, the name of the file it contains in Toolbox to [NewActorName].bitemco, and the texture it contains to [NewActorName]

Creating an inventory name and description

There are many ways to add text to the game, some work better for single items, some work better for large-scale mods that edit lots of text. There are three main ways to edit the text files of the game: by converting them to text with msyt or msyt-tools, by editing them "directly" with Wild Bits, or by using a GUI like MSBT Editor or Kuriimu.

Using msyt or msyt-tools

Using Wild Bits

Using MSBT Editor or Kuriimu

First, you will need to copy the text archive to your files, so navigate to the content\Pack folder of the your game's UPDATE files. There will be several Bootup_[XXxx].pack files here. Each one is for a different region and language. For example, USen is for the US version, English language, while EUes is for the European version, Spanish language. Find the pack for the region/language you want to edit, and copy it to your mod's content\Pack folder.

Next, you'll need to extract it, so open a Powershell window and run the command sarc extract Bootup_[XXxx].pack. Go inside the newly created Bootup_[XXxx]/Message folder to find a file called Msg_[XXxx].product.ssarc. Open another Powershell window and use the command sarc extract Msg_[XXxx].product.ssarc to extract it, as well, then go into the new Msg_[XXxx].product\ActorType folder.

There are many msbt files here, and all of them have text data for the game. Find the one that fits your item type, and open it in MSBT Editor or Kuriimu. These programs both act very similarly, and the directions here will work for either program.

Once you've opened the msbt file, click on the green plus to add a new piece of text to the list, (in MSBT Editor, you'll type the name in the bar next to the plus first, while in Kuriimu you'll click the plus first and type the name in second) and name it [ActorName]_Name. Do it again, and this time, call it [ActorName]_Desc. Name is going to be for the item's name as it is shown in menus, and Desc is going to be for the item's descriptions. If your item is something that would appear in the Shiekah Slate album, so that you could take pictures of it and track it on the map with the Sheikah Radar, also add an [ActorName]_PictureBook and copy the text you made for [ActorName]_Desc into it. When you're done, File -> Save.

You'll now need to pack all the files back up, so go back to the content\Pack\Bootup_[XXxx]\Message folder, open a Powershell window and run the command sarc create Msg_[XXxx].product Msg_[XXxx].product.ssarc. If you are modding for WiiU or Cemu, the command is, instead,sarc create Msg_[XXxx].product Msg_[XXxx].product.ssarc -b. Once it has finished packing up the file, delete the Msg_[XXxx].product folder.

Then, go back to content\Pack, open another Powershell window and run the command sarc create Bootup_[XXxx] Bootup_[XXxx].pack. If you are modding for WiiU or Cemu, the command is, instead,sarc create Bootup_[XXxx] Bootup_[XXxx].pack -b. Once it has finished, delete the Bootup_[XXxx] folder. And now you're done with the menu text portion of your item.

Creating the save game data flags

This section covers the save game flags, which the game uses to remember whether or not you've picked up an item before. If you are adding a common item, like a material or consumable, this will make it so that the little popup that happens the first time you pick up an item, doesn't happen every single time you pick your new item up.

Save flags are all stored in Bootup.pack, so you're going to copy that file from your UPDATE data's content\Pack to the same place in your mod files. You will then open a Powershell window in that folder, and use the command sarc extract Bootup.pack to extract it. This will extract all the data inside the file into folders. Navigate to the new content\Pack\Bootup\GameData and find gamedata.ssarc. Open a new Powershell window here and use the command sarc extract gamedata.ssarc. This will create a new folder named gamedata. Go inside that folder and find bool_data_0.bgdata. Open yet another Powershell window here and run the command byml_to_yml bool_data_0.bgdata !!.yml to convert it to text, and then open the new bool_data_0.yml in a text editor. Inside that file, find the text IsGet_[OldActorName] and copy the entire section into the space right after it. Change IsGet_[OldActorName] to IsGet_[NewActorName]. Then, go to this website and paste IsGet_[NewActorName] into the field, and click Calc CRC-32. Copy the result in the Result column for the CRC-32 row.

After running the python command, copy the underlined result to use as your HashValue

Open a new Powershell window. Use the command python to enter a python command line. Run the command import ctypes; ctypes.c_int32([CRC-32Result]).value to obtain a positive or negative number. [CRC-32Result] should be replaced with what you copied from the Result column for the CRC-32 row.

Once you've copied the boolean data section, change the DataName and HashValue to match your new item.

In your text editor, paste the result from your calculator into the HashValue after IsGet_[NewActorName], and save the file.

Open a Powershell window in the folder with bool_data_0.yml and run the command yml_to_byml bool_data_0.yml !!.bgdata . If you are modding for WiiU or Cemu, the command is, instead,yml_to_byml -b bool_data_0.yml !!.bgdata. Once it's converted, delete bool_data_0.yml.

Go up one folder, to content\Pack\Bootup\GameData and open a new Powershell window. Run the command sarc create gamedata gamedata.ssarc. If you are modding for WiiU or Cemu, the command is, instead,sarc create gamedata gamedata.ssarc -b. Once it's converted, delete the gamedata folder.

Go up two folders, to content\Pack, and open a new Powershell window. Run the command sarc create Bootup Bootup.pack. If you are modding for WiiU or Cemu, the command is, instead,sarc create Bootup Bootup.pack -b. Once it's converted, delete the Bootup folder.

Finishing up and installing the mod

And now you are done! There is a file that remains to be edited, called the RSTB, but you should not manually edit that file anymore, as there are so many other mods that edit it, along with the ActorInfo.product file, the Bootup and Bootup_XXxx packs, that it is not going to be compatible with any other mod that also does so. Instead we use bcml to install mods, merge the changes made to those files, and edit the RSTB for us. Open bcml via Powershell (just run the command bcml) and select Install... Then select Add Folder, select the BreathOfTheWild_[MyAwesomeModName] folder, and click OK. Wait for it to install, and you're ready to play the game with your new item!

Troubleshooting