• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code [Tutorial] Modifying Existing Weapons

This tutorial it outdated. Please see the new version on the official wiki.

Benjamin, you could add this:
Code:
class'SinglePickup'.default.Weight = 1;
Adding "class'Single'.default.Weight = 1;" does indeed set the weight of 9mm to 1 and selecting it in your inventory at the trader shows "Weight: 1", but selecting it in the traders inventory still shows the default value.
So adding "class'SinglePickup'.default.Weight = 1;" shows the right value at the traders inventory. :)

Thanks, I've updated the new version with that information. :)
 
Upvote 0
Hey I got a question about this tutorial.

Currently I am trying to edit some damage values of weapons from the Steam Workshop. I've heard it's not good to go and decompile and recompile others' stuff but, in this case it is for a mod.

I'm just getting started into mod making for Killing Floor and I am trying to find a good way to edit the damage values without needing to decompile entire weapon scripts.

Is there any other way of doing this besides the aforementioned? It would save me a ton of time, but until then, I am stuck.

So, instead of decompiling a weapon and then recompiling it with the edited damage values, is there a way I can make a mutator instead to change the damage values and the cost at the trader? Thanks!
 
Upvote 0
Too many people recompile mods causing many many problems for servers, players and modders. This is a problem and we hate it so we advise people not to do it.

What we really want is for people to recompile into a NEW and unique file. This then makes it not cause any problems at all. You can do a mutator to change stats but it isn't fully worth the effort. The best option is to make another version of it with the tweaked stats. This makes it its own weapon and has no changes to current weapons.
 
Upvote 0
Ok so it is ok to use someone elses weapon model and skins but compiled using your own code? I was under the impression that it is the same thing as using someone elses code but with modified compile...

Either way, I would only be changing a couple of the values. But to give a rundown of my situation...

I add all the custom weapons from the workshop that I want per class in ScrN Balance and ServerPerks. I run the game, everything loads in fine, but weapons are priced all over the place. Weapons that have higher damages are priced lower than weapons with lower damages.

Essentially would I be able to only make a mutator so that people who have downloaded the workshop weapons do not have to redownload, or do I need to do a full recompile of each and every weapon? Thanks!
 
Upvote 0