Help Changing 1 Weapon In a Mod To A Different One

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
StraightWhiteMan
Posts: 60
Joined: Thu Jul 02, 2020 8:07 pm
Graphics Processor: nVidia (Modern GZDoom)

Help Changing 1 Weapon In a Mod To A Different One

Post 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.
Jarewill
 
 
Posts: 1853
Joined: Sun Jul 21, 2019 8:54 am

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

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

Return to “Scripting”