Jump to content

How do I edit the weapons stats and building recipes?


Absle

Recommended Posts

I was thinking about editing the weight on the guns to make them slightly more bearable (literally) in light of their late nerfing. My primary goal is to make the sawn off much lighter (thinking about 1.5), but nerf it even more by reducing its clip size to two. Basically making it a double barrel that I sawed to almost pistol length. The shotgun is viable as a weapon, but too heavy to carry around all the time, and who ever PLANS on needing a shotgun before they head out? And the sawn off is worse in every way as it is, so what's the point?

 

The recipe I want to change may be a bit more complicated. I want to change the recipes for the rain collector barrels to require only 2 garbage bags instead of 4. This is just a personal preference, may not be balanced.

 

My question is, where do I find these in the files? How do I change them? Can I safely change them for my current saves? Thanks in advance!

Link to comment
Share on other sites

I was thinking about editing the weight on the guns to make them slightly more bearable (literally) in light of their late nerfing. My primary goal is to make the sawn off much lighter (thinking about 1.5), but nerf it even more by reducing its clip size to two. Basically making it a double barrel that I sawed to almost pistol length. The shotgun is viable as a weapon, but too heavy to carry around all the time, and who ever PLANS on needing a shotgun before they head out? And the sawn off is worse in every way as it is, so what's the point?

 

The recipe I want to change may be a bit more complicated. I want to change the recipes for the rain collector barrels to require only 2 garbage bags instead of 4. This is just a personal preference, may not be balanced.

 

My question is, where do I find these in the files? How do I change them? Can I safely change them for my current saves? Thanks in advance!

Files in C:\Steam\steamapps\common\ProjectZomboid\media\scripts\ called items.txt or newitems.txt Contain item code that controls item weight, you'll just need to find the item you want to alter and lower the Weight value.

For clip size you can edit ClipSize value in the same file.

Lastly, to change the "recipe" for buildable things you need to edit this file C:\Steam\steamapps\common\ProjectZomboid\media\lua\client\BuildingObjects\ISUI\ISBuildMenu.lua

 

In it find this line

 

if ISBuildMenu.countMaterial(player, "Base.Garbagebag") < 4

 

Change it to

 

if ISBuildMenu.countMaterial(player, "Base.Garbagebag") < 2

 

I recommend using Notepad ++ for editing those files. Also, of course, I can't really recommend altering the game files, make a mod instead, otherwise every single update will restore the files to defaults.

Changing that stuff shouldn't have a bad effect on your saves.

If you need help making a mod let me know.

Link to comment
Share on other sites

  • 3 months later...

About the Clips, I need a little help with a gun i was trying to made. These are the data for the clip issue:

 

WhateverGun

{ ... lot of stuff

AmmoType = BerettaClip,
ClipSize = 15,
...lot of stuff }
 
And this is what is in the LUA file name ModReload

 

local WhateverGun = { type = "WhateverGun", 

moduleName = 'MyMod'
reloadClass = 'ISSemiAutoWeapon',
ammoType = '9mm Magazine',
clipName = 'BerettaClip',
clipIcon = 'BerettaClip',
clickSound = 'stormy9mmClick',
ejectSound = 'stormy9mmClipEject',
insertSound = 'stormy9mmClipLoad',
rackSound = 'stormy9mmRack',
containsClip = 1,
rackTime = 10,
clipData = pistolClip };
 
ReloadUtil:addWeaponType(WhateverGun)
 

 

For easing things I am trying to do it with the same clip as the default pistol. But it has infinite ammo and does not run the reloading util. I was wondering if the problem could be in the bold letters parameter. I would thank a lot a little help. 

 

Can I use the default clip for a weapon and what do I have to do to get it work properly?

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...