Help:Adding items: Difference between revisions
Jump to navigation
Jump to search
Rewrite for using hyrule_builder for all conversions
imported>Leoetlino (remove {{in creation}}) |
imported>Ginger (Rewrite for using hyrule_builder for all conversions) |
||
Line 9: | Line 9: | ||
*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] | ||
* | *Hyrule Builder {{Install py package help|package=hyrule_builder}} | ||
==Tutorial== | ==Tutorial== | ||
Line 50: | Line 49: | ||
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. | ||
Next, copy <code>ActorInfo.product.sbyml</code> to <code>content\Actor</code> in your mod files. You can find it in your dumped UPDATE files (not the base game files), in the same location. Make sure you copy it, and don't move the original. | |||
Then, copy both <code>Bootup.pack</code> and <code>Bootup_[XXxx].pack</code> to <code>content\Pack</code> in your mod files. You can find them in your dumped UPDATE files (not the base game files), in the same location. There will be several <code>Bootup_[XXxx].pack</code> files. 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. Copy only the one(s) you will be making edits for, as any languages that you don't edit will have entries automatically copied into them by one of the later steps in the tutorial. For example, if you edit USen and EUes, EUen will receive your custom entries from USen, and USes will receive your custom entries from EUes. | |||
Lastly, copy your resource files to <code>content\Model</code> (models and textures) and <code>content\UI\StockItem</code> (icons). These files aren't handled by the converter, they're explained more in depth in their own section of the tutorial. | |||
Once you have your mod files assembled navigate to the folder that contains your BreathOfTheWild_[MyAwesomeModName] folder, open a Powershell window, and run the command <code>hyrule_builder unbuild BreathOfTheWild_[MyAwesomeModName]</code>. It will take a bit of time to convert the files, and then create a new folder called BreathOfTheWild_[MyAwesomeModName]_unbuilt, which contains the files you will be editing. | |||
===Editing the actor pack files=== | |||
The actor pack files will be located in the various folders inside <code>content\Actor</code>. 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 | **changing the name of the <code>[ActorName].bmodellist</code> file inside <code>content\Actor\ModelList</code> | ||
**changing the name of the <code>[ModelName].bphysics</code> file inside <code>Actor | **changing the name of the <code>[ModelName].bphysics</code> file inside <code>content\Actor\Physics</code> | ||
**changing the name of the <code>[ActorName].bxml</code> file inside <code>Actor | **changing the name of the <code>[ActorName].bxml</code> file inside <code>content\Actor\ActorLink</code> | ||
**changing the name of the <code>[ActorName].bgparamlist</code> file inside <code>Actor | **changing the name of the <code>[ActorName].bgparamlist</code> file inside <code>content\Actor\GeneralParamList</code> | ||
**changing the name of the <code>[BfresName]</code> folder inside <code>Physics | **changing the name of the <code>[BfresName]</code> folder inside <code>content\Physics\SupportBone</code> | ||
**changing the name of the <code>[ModelName].bphyssb</code> file inside <code>Physics | **changing the name of the <code>[ModelName].bphyssb</code> file inside <code>content\Physics\SupportBone\[BfresName]</code> | ||
**changing the name of the <code>[BfresName]</code> folder inside <code>Physics | **changing the name of the <code>[BfresName]</code> folder inside <code>content\Physics\Cloth</code> | ||
**changing the name of the <code>[ModelName].hkcl</code> file inside <code>Physics | **changing the name of the <code>[ModelName].hkcl</code> file inside <code>content\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 | ||
Line 93: | Line 88: | ||
Once you've made your changes, '''make sure to save'''. | Once you've made your changes, '''make sure to save'''. | ||
=== | ===Adding the actor info=== | ||
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. | |||
Inside <code>content\Actor\ActorInfo</code>, you will find a file for each actor in the game. Find the one for the old actor that you are using as your base, and copy it, changing the name of the new file to <code>[NewActorName].info.yml</code>, then open the file in a text editor. 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 | ||
Line 122: | Line 98: | ||
*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, | Once all the info is changed, '''make sure to save'''. | ||
===Creating the resource files=== | ===Creating the resource files=== | ||
Line 166: | Line 132: | ||
===Creating an inventory name and description=== | ===Creating an inventory name and description=== | ||
For the in-game text concerning your item, you will need to navigate to <code>content\Pack\Bootup_[XXxx].pack\Message\Msg_[XXxx].product.ssarc</code>. There are many <code>msbt</code> files here, and all of them have text data for the game. For your actor, you'll look in the <code>ActorType</code> folder. Find the file that fits your item type, and open it in your text editor of choice. | |||
Find the name and description entries for the item you used as your base, and copy them to the bottom of the file. An entry in this file starts on the line that says <code>[ActorName]_Name</code> or <code>[ActorName]_Desc</code> and ends one line before the next time that appears. 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>. | |||
Change the <code>- text:</code> line of the name to be your new name, and the <code>- text:</code> line of the description to be your description. If your name or description uses apostrophes, be sure to surround it in quotes. e.g. <code>Zora Mask</code> is fine, but <code>"Zora's Mask"</code> needs the quotes because it contains an apostrophe. If you have a picture book entry as well, copy the text you made for <code>[ActorName]_Desc</code> into it. | |||
When you're done, '''make sure to save'''. | |||
===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. | ||
Navigate to <code>content\Pack\Bootup.pack\GameData\gamedata.ssarc</code> and find the flag for your base game item. It might be contained in any of the <code>bool_data_#.bgdata.yml</code> files. The name you are looking for is <code>IsGet_[OldActorName]</code>. | |||
[[File:Addingitems_crc32hashpython.png|thumb|After running the python command, copy the underlined result to use as your HashValue]] | [[File:Addingitems_crc32hashpython.png|thumb|After running the python command, copy the underlined result to use as your HashValue]] | ||
Copy the entire section for the flag into the space right after that flag. Change <code>IsGet_[OldActorName]</code> to <code>IsGet_[NewActorName]</code>. Then, open a new Powershell window anywhere. Use the command <code>python</code> to enter a python command line. Run the command <code>import ctypes; import binascii; ctypes.c_int32(binascii.crc32('''IsGet_[NewActorName]''')).value</code> to obtain a positive or negative number. (Bolding has been added to distinguish the name of the flag. You need to use the actual name of the flag you're adding.) | |||
[[File:Addingitems_booldata0.jpg|thumb|Once you've copied the boolean data section, change the DataName and HashValue to match your new item.]] | [[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. | In your text editor, paste the result from your calculator into the <code>HashValue</code> after <code>IsGet_[NewActorName]</code>, and save the file. | ||
===Finishing up and installing the mod=== | |||
Now that all the files have been edited, you will need to pack them all back up. Go back to the folder that contains BreathOfTheWild_[MyAwesomeModName]_unbuilt, open a Powershell window, and run the command <code>hyrule_builder build [--be] BreathOfTheWild_[MyAwesomeModName]_unbuilt</code>. '''If you are modding for WiiU or Cemu, and don't add the --be, the error you get will seem very confusing. This is because it's looking for the Switch paths and not finding them.''' After a little bit of conversion, a new folder will be created, called BreathOfTheWild_[MyAwesomeModName]_unbuilt_build. That folder contains your completed mod. Delete the old BreathOfTheWild_[MyAwesomeModName] and rename the completed mod folder to BreathOfTheWild_[MyAwesomeModName]. | |||
And now you are done! To use the mod, 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! | |||
==Troubleshooting== | ==Troubleshooting== | ||
{{Empty section}} | {{Empty section}} | ||
[[Category:Guides]] | [[Category:Guides]] |