Help:Adding items: Difference between revisions

m
→‎Creating the resource files: changed method for renaming bfres
imported>Ginger
m (Normalizing header names)
imported>Ginger
m (→‎Creating the resource files: changed method for renaming bfres)
Line 2: Line 2:
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.
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 ==
==Required tools==
Adding new items requires several tools, most of which are described and are available [[Help:Setting up tools|here]].
Adding new items requires several tools, most of which are described and are available [[Help:Setting up tools|here]].


* [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]])
*[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++]
*A text editor like [https://notepad-plus-plus.org/downloads/ Notepad++]
* Wild Bits {{Install py package help|package=wildbits}}
*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}}
*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]
*[https://github.com/KillzXGaming/Switch-Toolbox/releases Switch Toolbox]
* BotW Duplicator Tools {{Install py package help|package=botw-duplicator-tools}}
*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]
*[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]


== Tutorial ==
==Tutorial==


=== Before we begin ===
===Before we begin===
'''Do not skip this section, it is very important.'''
'''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:
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 <code>Armor_001.sbfres</code>, the FileName is <code>Armor_001</code>
*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>
* 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>
*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>
* 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>.
*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>.
* <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>.
*<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>.
* 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>.
*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.
*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.
* 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.
*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.


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>.
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>.
Line 34: Line 34:
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.
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 ===
===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:
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]
*BreathOfTheWild_[MyAwesomeModName]
** content
**content
*** Actor
***Actor
**** Pack
****Pack
*** Model
***Model
*** Pack
***Pack
*** UI
***UI
**** StockItem
****StockItem


Note that these names are case-sensitive.
Note that these names are case-sensitive.


=== Creating the actor ===
===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.
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 ====
====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.
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 =====
=====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.
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 =====
=====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.
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> =====
=====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.
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 ====
====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.
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: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:
*File/Folder names:
** changing the name of the <code>[ActorName].bmodellist</code> file inside <code>Actor/ModelList</code>
**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>[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].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>[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>[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>[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>[BfresName]</code> folder inside <code>Physics/Cloth</code>
** changing the name of the <code>[ModelName].hkcl</code> file inside <code>Physics/Cloth/[BfresName]</code>
**changing the name of the <code>[ModelName].hkcl</code> file inside <code>Physics/Cloth/[BfresName]</code>
* Inside <code>bmodellist</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>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
**changing the line that says <code>UnitName: !str64 [modelName]</code> to the new model name
* Inside <code>bphysics</code>:
*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>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
**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.
**'''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>:
*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>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>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>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.]]
**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>:
*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)
**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).
**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'''.
Once you've made your changes, '''make sure to save'''.


==== Packing the actor pack ====
====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.
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 =====
=====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.
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.
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 =====
=====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.
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> =====
=====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.
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.
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 ===
===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.
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>'''.
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 ====
====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:
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>bfres: [BfresName]</code> to your new <code>bfres</code> name
* <code>itemUseIconActorName: [ActorName]</code> to your new actor name
*<code>itemUseIconActorName: [ActorName]</code> to your new actor name
* <code>mainModel: [ModelName]</code> to your new model 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.
*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.
Once all the info is changed, click save.


==== Using a text editor ====
====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:
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>bfres: [BfresName]</code> to your new <code>bfres</code> name
* <code>itemUseIconActorName: [ActorName]</code> to your new actor name
*<code>itemUseIconActorName: [ActorName]</code> to your new actor name
* <code>mainModel: [ModelName]</code> to your new model 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.
*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.
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 ===
===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.'''
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.'''


Line 142: Line 142:
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 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.
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 clicking on the orange file labeled "FRES" on the left side, clicking on the name on the right side, and changing it.


Some important terms in modeling:
Some important terms in modeling:
Line 163: Line 163:
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.
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 ===
===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>
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 ===
===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.
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> ====
====Using <code>msyt</code> or <code>msyt-tools</code>====
{{Empty section}}
{{Empty section}}


==== Using Wild Bits ====
====Using Wild Bits====
{{Empty section}}
{{Empty section}}


==== Using MSBT Editor or Kuriimu ====
====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.
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.


Line 188: Line 188:
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.
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 ===
===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.
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.


Line 204: Line 204:
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.
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 ===
===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!
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 ==
==Troubleshooting==
{{Empty section}}
{{Empty section}}
[[Category:Guides]]
[[Category:Guides]]
Anonymous user