Help:Adding items: Difference between revisions

m
Fixed image formatting for mobile
imported>Ginger
(→‎Creating the save game data flags: Fixed typo in conversion command)
imported>Ginger
m (Fixed image formatting for mobile)
Line 65: Line 65:
==== 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>
Line 86: Line 87:
** 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
** 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.]]
* [[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).
Line 173: Line 174:
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.
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.
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]]
[[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.
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.]]
[[File:Addingitems_booldata0.jpg|thumb|Once you've copied the boolean data section, change the DataName and HashValue to match your new item.]]
Anonymous user