Jump to content

looking for various code locations


GoodOldLeon

Recommended Posts

Hi! I'm working on a mod for my server. I have a few ideas that will require some coding (I'm also slowly learning how to do that) but I can't seem to find the files that govern the behaviors I'd like to mod.

One of the items I added is a swiss army knife that can act as blade, can opener, screwdriver and tweezers. I got all the basic stuff working (for now it's basically a knife that can also be used in all recipes that require a can opener or a screwdriver) but there are some functionalities that I couldn't figure out.

I'd like to know where can I find the code for: what items can add/remove weapon upgrades, what items are needed for dismantling, and what items can be used in first aid procedures. Also, I'd like to be able to spawn some items inside certain cars, but I didn't find anything in the distributions file.

If someone could point me in the right directions it would be much appreciated.

Link to comment
Share on other sites

4 hours ago, TheLeonBM said:

what items can add/remove weapon upgrades

client/ISUI/ISInventoryPaneContextMenu.lua, in the ISInventoryPaneContextMenu.createMenu. My advice is don't override this function. Its almost 700 lines long, and will break context menus across various PZ versions.

 

4 hours ago, TheLeonBM said:

what items can be used in first aid procedures

client/XpSystem/ISUI/ISHealthPanel.lua. Most of the functions in here responsible for building the context menus check values in the scripts .txt files, such as AlcoholPower, BandagePower, etc... so all that is required is giving the item these properties. Some other functions like checking for needles for stitches are hardcoded in the lua there.

 

4 hours ago, TheLeonBM said:

Also, I'd like to be able to spawn some items inside certain cars, but I didn't find anything in the distributions file.

server/Vehicles/VehicleDistributions.lua

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...