RRWM reloading system [1.5.0] [ZS/DEC/SBARINFO]
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.
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.
-
-
- Posts: 1684
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: RRWM reloading system [1.3.0a] [ZS/DEC/SBARINFO]
You can put it anywhere you want, as long as it is #included into your ZScript lump.
-
- Posts: 225
- Joined: Fri Jan 30, 2015 10:32 pm
- Location: Pittman Center
Re: RRWM reloading system [1.3.0a] [ZS/DEC/SBARINFO]
So, can you meet me in PMs? I'm trying to add support for a secondary clip. & I have no idea what isn't working.
-
-
- Posts: 1684
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: RRWM reloading system [1.3.0a] [ZS/DEC/SBARINFO]
Regarding your PM and modding this library in general: I've already said in the first post that the latter might be a non-trivial task, especially if you want to go as far as adding a second reload. I will therefore reiterate that while you are free to edit the provided code in any way you wish (the only requirement being that you credit me as the original author), I cannot guarantee stable and/or correct behavior once sufficiently major changes have been introduced.
The system is guaranteed to work as designed - if you can prove otherwise, I will investigate and try to fix the issue. For modded versions, however, all bets are off because the code is huge, and a large number of changes is likely to have significant, often unexpected consequences. As such, I really wish I could help, but I simply don't have enough time for debugging, especially when I don't have a clear vision of how the altered code is supposed to work in the first place. Sorry about that.
The system is guaranteed to work as designed - if you can prove otherwise, I will investigate and try to fix the issue. For modded versions, however, all bets are off because the code is huge, and a large number of changes is likely to have significant, often unexpected consequences. As such, I really wish I could help, but I simply don't have enough time for debugging, especially when I don't have a clear vision of how the altered code is supposed to work in the first place. Sorry about that.
-
- Posts: 853
- 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
Re: RRWM reloading system [1.3.0a] [ZS/DEC/SBARINFO]
You could check to see if the player is pressing altfire, and if so, go to an offset Fire state or something.
-
-
- Posts: 1684
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: RRWM reloading system [1.3.0a] [ZS/DEC/SBARINFO]
It's not nearly that easy because there's a lot going on under the hood besides state selection.
-
- Posts: 225
- Joined: Fri Jan 30, 2015 10:32 pm
- Location: Pittman Center
Re: RRWM reloading system [1.3.0a] [ZS/DEC/SBARINFO]
The altered code would've basically made it so secondary fire would work like primary fire in regards to reloading. This would mostly be for things like dual-wield reloads or both fire modes using a clip.Player701 wrote: ↑Tue Jan 10, 2023 12:46 am Regarding your PM and modding this library in general: I've already said in the first post that the latter might be a non-trivial task, especially if you want to go as far as adding a second reload. I will therefore reiterate that while you are free to edit the provided code in any way you wish (the only requirement being that you credit me as the original author), I cannot guarantee stable and/or correct behavior once sufficiently major changes have been introduced.
The system is guaranteed to work as designed - if you can prove otherwise, I will investigate and try to fix the issue. For modded versions, however, all bets are off because the code is huge, and a large number of changes is likely to have significant, often unexpected consequences. As such, I really wish I could help, but I simply don't have enough time for debugging, especially when I don't have a clear vision of how the altered code is supposed to work in the first place. Sorry about that.
-
-
- Posts: 1684
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: RRWM reloading system [1.3.0a] [ZS/DEC/SBARINFO]
It's still not that simple as just duplicating some parts of the code. Here are some of the issues that come to mind:
- How would you handle the scenario when some weapons in your mod use a secondary clip for alt-fire and others don't?
- What happens if the weapon uses the same ammo type for primary and secondary fire? Will it always use different clips for both, or only when its ammo types are different? Can this behavior be customized?
- How is the reload button supposed to work for separate clips? Should there be a separate reload button for the secondary clip?
- How would you handle auto-reloading for the secondary clip?
-
- Posts: 225
- Joined: Fri Jan 30, 2015 10:32 pm
- Location: Pittman Center
Re: RRWM reloading system [1.3.0a] [ZS/DEC/SBARINFO]
To answer the questions:
- How does the system currently handle a weapon not using clips for primary fire in the event it still uses this setup?
- I'm hoping to make it so the secondary clip is just when it uses separate ammo types for both. I do hope to make the behavior customizable at some point, yes.
- The fire modes would only have separate reload states in the event they have separate reload animations (like an assault rifle & a grenade launcher). It'd jump to whichever is needed when the normal reload button is pressed (with order of state label activation being random if both are).
- I was trying to create separate reload action functions for the secondary clip, but now I realized it'd probably make more practical sense to just expand the existing reload action functions to account for both the primary & secondary clips.
-
-
- Posts: 1684
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: RRWM reloading system [1.3.0a] [ZS/DEC/SBARINFO]
This is not supported, primary fire always uses the clip. It just wouldn't make sense otherwise.Ultimate Freedoomer wrote: ↑Fri Jan 13, 2023 3:56 pmHow does the system currently handle a weapon not using clips for primary fire in the event it still uses this setup?
-
- Posts: 853
- 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
Re: RRWM reloading system [1.3.0a] [ZS/DEC/SBARINFO]
It's illogical. Otherwise why bother?
Here be dragons...
Here be dragons...
-
-
- Posts: 1684
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: RRWM reloading system [1.3.0a] [ZS/DEC/SBARINFO]
The current setup is as follows:
- Primary fire always uses the clip.
- Secondary fire (if present) uses the clip as long as the ammo type is the same as the one used for primary fire. Otherwise, it draws directly from the ammo pool.
-
- Posts: 853
- 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
Re: RRWM reloading system [1.3.0a] [ZS/DEC/SBARINFO]
The second sentence is what I called illogical if you tried.Personally, I don't see anything one might find illogical here. Making primary fire use the ammo pool directly wouldn't make sense because the weapon wouldn't be reloadable anymore.
There was a misunderstanding.
-
-
- Posts: 1684
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: RRWM reloading system [1.3.0a] [ZS/DEC/SBARINFO]
Yeah, right, sorry about that. It's been a very busy week for me...
-
- Posts: 853
- 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
Re: RRWM reloading system [1.3.0a] [ZS/DEC/SBARINFO]
No biggie.
I bet you have more important things to do right now.
I bet you have more important things to do right now.
-
- Posts: 225
- Joined: Fri Jan 30, 2015 10:32 pm
- Location: Pittman Center
Re: RRWM reloading system [1.3.0a] [ZS/DEC/SBARINFO]
But anyway, I was thinking that not setting the clip capacity at all (or setting it to 0 or -1) would make it not draw from a clip. If push comes to shove, I could even make it so the mode that uses a clip draws from the reloadable ammo entity while the mode that doesn’t just draws from an ammo type that inherits from the base ammo actor.
Last edited by Ultimate Freedoomer on Sat Jan 14, 2023 10:28 pm, edited 1 time in total.