This should work, tell me if you encounter any problems!
Step one: Loading item
Fist thing you need to do is to make sure that this weapon loads so that you dont break anything. To do this you can use a function called "forceRequiredAddon".
Open up server.cs inside gamemode_CityRPG.zip
Scroll down to the end of the file
Add this line
forceRequiredAddon("Your_ItemName");Make sure to replace Your_ItemName with the name of the item you are loading. It should be in the format of "Weapon_WeaponName". If you are unsure what you should put here, put the name of the add-ons .zip file.
Step two: Getting the items datablock
Open up the zip file for the weapon you are adding. Look in each of the files for this line
datablock ItemData(somethingData)
Highlight somethingData and copy it, you will need it in the next step.
Step Three: adding the preferences
In the gamemode_CityRPG zip folder open up prefs.cs
Press Ctrl+F and search for
Weapon Prices
.
You will need to edit a few values. First is
$CityRPG::ItemCount = someNumber
. Take the number that is after the equals sign and set it to one plus whatever it is. For example if it is 6, set it to 7. Easy enough?
$CityRPG::prices::weapon::name[7] = "Paste What We Copied in step 2 here, leave the quotes!";
$CityRPG::prices::weapon::price[7] = 500; // Set this to what the price should be for it
$CityRPG::prices::weapon::mineral[7] = 250; // set this to how many minerals it should cost
Make sure that you set 7 to whatever number you just set $CityRPG::ItemCount to.
That should be all!
Cheers!