Page 1 of 1

Help Changing 1 Weapon In a Mod To A Different One

Posted: Fri Feb 19, 2021 9:44 pm
by StraightWhiteMan
I apologize in advance if this is a dumb question or frowned upon, and again if this isn't the correct place to ask. I have a certain mod that was updated to dang near perfection about a year ago, but I really prefer the pistol from the previous version of the mod which I still have.
I was curious if someone could please teach me how to take the pistol from the previous version of the mod and overwrite the newer version? Just the pistol and nothing else. I know how to open a .pk3 and view all the files, I'm just sure what to do from there. I mentioned it a few times over a year to the author of the mod, but instead of continuing to pester them, I'd like to just do it myself if possible and stop being annoying. Any help would be greatly appreciated.

Re: Help Changing 1 Weapon In a Mod To A Different One

Posted: Sat Feb 20, 2021 11:02 am
by Jarewill
Matters on how the mod is done.
First you'd need to find the pistol code. It matters how the mod is organised: It can either be in it's own file, in the shared weapon file, in the DECORATE file, or somewhere else entirely.
Then it should work by just copying the old pistol code and overriding the new one, but sometimes a few other things have to be done.
If the old pistol is named differently than the new one, you will also have to edit the player class to start with the old pistol, or edit other files that also reference the new pistol.
The old pistol might also use other classes that no longer exist in the new version, like inventory tokens or custom ammo classes and so on, so you will have to copy them too.

If there is a problem with doing that, it might help to tell what mod is that and I could look into it.