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.

Help Changing 1 Weapon In a Mod To A Different One

Postby StraightWhiteMan » Fri Feb 19, 2021 9:44 pm

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.
User avatar
StraightWhiteMan
 
Joined: 02 Jul 2020
Graphics Processor: nVidia (Modern GZDoom)

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

Postby Jarewill » Sat Feb 20, 2021 11:02 am

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.
Jarewill
 
 
 
Joined: 21 Jul 2019


Return to Scripting

Who is online

Users browsing this forum: salahmander2 and 3 guests