Help:Adding items: Difference between revisions

m
imported>Ginger
m (→‎Required tools: Removed dependency workaround)
imported>Ginger
m (→‎Creating the save game data flags: crc32 needs bytes-like)
Line 145: Line 145:
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>.
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.)
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(b''''IsGet_[NewActorName]'''<nowiki/>')).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===
===Finishing up and installing the mod===
Anonymous user