How do I modify the stats of a vanilla item?

Scironex

The Destroyer
Specifically, I'm trying to change the damage that the Handgun and Phoenix Blaster do. I'm guessing that I'll have to create a .cs file that edits it on startup? Problem is, I don't know what to call when I do so. If someone could give me an example snippet of code for me to dissect, that would be very helpful.

Resolved!

Solution: (Thanks @bluemagic123 !)

Code:
ItemDef.byType[itemID].damage = whatever;
Replace itemID with the item ID, and whatever with the desired damage.
 
Last edited:
Specifically, I'm trying to change the damage that the Handgun and Phoenix Blaster do. I'm guessing that I'll have to create a .cs file that edits it on startup? Problem is, I don't know what to call when I do so. If someone could give me an example snippet of code for me to dissect, that would be very helpful.

Try asking @Yoraiz0r or @berberborscing. Or @Pumpking or @bluemagic123 or another coding expert such as @DivermanSam or maybe even @Grox The Great. I mean, in doubt, we must all ask @Sin Costan. Don't forget to blame @Omnir for this tragedy. Well... (Coder Tagging Spree)
 
Excuse you. You forgot W1K. Nah, but I'm probably going to ask one of them, then post the response here.

Right, right... Thanks! And... your welcome? I don't know :p I hope you get the answer you wanted (totally not because I need that answer too)
 
Hm. Try doing something like
Code:
ItemDef.byType[itemID].damage = whatever;
Of course, replace itemID and whatever with the appropriate things. You'll have to put this line of code in your ModBase's OnLoad method. Let me know how it goes; I'm just guessing right now :p
 
Of course, replace itemID and whatever with the appropriate things. You'll have to put this line of code in your ModBase's OnLoad method. Let me know how it goes; I'm just guessing right now :p
This works! I'll edit the OP with the solution.
 
Back
Top Bottom