RRWM reloading system [1.5.0] [ZS/DEC/SBARINFO]

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
yum13241
Posts: 872
Joined: Mon May 10, 2021 8:08 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): EndeavorOS (basically Arch)
Graphics Processor: Intel with Vulkan/Metal Support
Contact:

Re: RRWM reloading system [1.3.0.1] [ZS/DEC/SBARINFO]

Post by yum13241 »

Player701 wrote: Agreed. :P
Your pfp and that face do not match :P
User avatar
Player701
 
 
Posts: 1709
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Contact:

Re: RRWM reloading system [1.5.0] [ZS/DEC/SBARINFO]

Post by Player701 »

RRWM reloading system has been updated to version 1.5.0. Download the new release HERE. The link in the first post has been updated too.

This version backports a fix from RRWM 1.5.0 to rectify a minor issue related to alternate fire. Previously, if a weapon supported alternate fire that did not use ammo, it would get deselected if primary fire was attempted without any ammo. This is no longer the case.

Additionally, a PreReload virtual method has been added to ReloadableWeapon (works similarly to PreRaise and PreLower, for full description please refer to the "Additional virtual methods" section of the manual).
PlayerT
Posts: 2
Joined: Wed Dec 11, 2024 1:08 pm

Re: RRWM reloading system [1.5.0] [ZS/DEC/SBARINFO]

Post by PlayerT »

Hello! So apparently this doesn't work in Ultimate Doom Builder, I get this error

ZSCRIPT error in "rrwm_reloading_system.pk3\classes\core\ReloadableWeapon.zs", line 376. Cannot have virtual, override and final on the same method.
User avatar
Player701
 
 
Posts: 1709
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Contact:

Re: RRWM reloading system [1.5.0] [ZS/DEC/SBARINFO]

Post by Player701 »

PlayerT wrote: Wed Dec 11, 2024 1:11 pm Hello! So apparently this doesn't work in Ultimate Doom Builder, I get this error

ZSCRIPT error in "rrwm_reloading_system.pk3\classes\core\ReloadableWeapon.zs", line 376. Cannot have virtual, override and final on the same method.
Combining final and override is valid ZScript, so the issue here is with UDB. The final keyword serves as a hint for fellow coders that the respective methods should not be overridden further. (Although the actual mechanism to prevent that from happening seems to not be implemented yet, same as with const functions).
PlayerT
Posts: 2
Joined: Wed Dec 11, 2024 1:08 pm

Re: RRWM reloading system [1.5.0] [ZS/DEC/SBARINFO]

Post by PlayerT »

Thank you for the reply! I'm glad to know it's just an issue with UDB.
User avatar
SamuraiChristo
Posts: 3
Joined: Fri Jun 27, 2025 2:09 pm

Re: RRWM reloading system [1.5.0] [ZS/DEC/SBARINFO]

Post by SamuraiChristo »

I'm terribly new to coding, working on a mod with lots of new artwork and it's mostly coded with Decorate (all built off the back of a weapon wad from Realm667). Thus far I've been using Wild Weasel's reload code but found it's preventing me from using alternate fire modes using a weapon's primary ammo. I'm trying to use the RRWM reloading system but not sure where the code itself is? I can follow the Decorate instructions alright, but as far as including the SbarInfo Support files in my .wad, when I import them, they replace my Decorate code? Also, is this Sbar Info Support stuff the reload code itself? Sorry, like I said I'm really clueless about coding, i feel like there is something painfully simple that I am not understanding. I'm using SLADE to edit with btw.
User avatar
Player701
 
 
Posts: 1709
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Contact:

Re: RRWM reloading system [1.5.0] [ZS/DEC/SBARINFO]

Post by Player701 »

Terribly sorry, but I'm currently on vacation and may not be able to respond quickly enough; please bear with me.
SamuraiChristo wrote: Fri Jun 27, 2025 9:29 pmI can follow the Decorate instructions alright, but as far as including the SbarInfo Support files in my .wad, when I import them, they replace my Decorate code?
What exactly is it in "your" DECORATE code that is being replaced? Unless your project has class names that conflict with those provided by this package (the engine should warn you about that, BTW), there are unlikely to be any issues.
Also, is this Sbar Info Support stuff the reload code itself?
No, it's just some extra stuff that makes it possible for the magazine counter value to be reflected in an SBARINFO-based HUD. It is not needed for anything except the UI.
User avatar
SamuraiChristo
Posts: 3
Joined: Fri Jun 27, 2025 2:09 pm

Re: RRWM reloading system [1.5.0] [ZS/DEC/SBARINFO]

Post by SamuraiChristo »

Thank you for the reply! I hope you're enjoying your vacation. I don't know how I managed to replace my Decorate code w/ our sbar files now (I tried to recreate that), instead I just copied and pasted them into my .wad along w/ your reloading system pk3 file (That shows up as a folder w/ a Z on it called RELOADER). After reading through some forums, I think my actual problem may be that i'm using a .wad file instead of a pk3. I'll check back after I convert my mod into a pk3, sorry if i've wasted your time but I do appreciate it :)
User avatar
Player701
 
 
Posts: 1709
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Contact:

Re: RRWM reloading system [1.5.0] [ZS/DEC/SBARINFO]

Post by Player701 »

SamuraiChristo wrote: Sat Jul 05, 2025 8:44 pm I think my actual problem may be that i'm using a .wad file instead of a pk3.
Now that you mention it, this is most certainly the root cause of your issues. The WAD structure is much simpler than that of a PK3, and something likely broke when you started copy-pasting the code. I think it should be a general recommendation to not use WADs for complex projects targeting GZDoom. Using a PK3 also makes it easier for the developer (i.e. you) to structure your code and other resources. The only thing WADs are good for are actual levels - you usually place those in the maps subfolder within your PK3 file.
User avatar
SamuraiChristo
Posts: 3
Joined: Fri Jun 27, 2025 2:09 pm

Re: RRWM reloading system [1.5.0] [ZS/DEC/SBARINFO]

Post by SamuraiChristo »

So i made a working pk3 version of my mod and now i'm again trying to include rrwm reloading system. I created a classes / core directory and added the files from rrwm reloading system into it, like ReloadableWeapon.zs, ReloadableAmmo, etc. as well as the Sbarinfo_support directory and files and the ExampleHUD.zs. I also modified my decorate.txt and zscript.zs to include the files upon loading. Now when I attempt to start the mod, it gives me this error message :

Execution could not continue.
Script error, "AAAKurrentTESTERi.pk3:classes/core/reloadableweapon.zs" line 8:
Expected '{', got 'ReloadableWeapon'.

I think there must be a big misunderstanding due to my lack of coding abilities. Do I need to edit these files further than just copying / pasting them into my pk3? I noticed the example Zengun.dec contains a different format from my decorate weapon files, maybe I need to edit my weapon decorate code? Thanks again for your time, if I'm too much of a lost cause to help, I understand :mrgreen:
Post Reply

Return to “Script Library”