[minimod][v0.7.2] Gearbox - weapon/inventory handling

Projects that alter game functions but do not include new maps belong 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.
User avatar
Captain J
 
 
Posts: 16860
Joined: Tue Oct 02, 2012 2:20 am
Location: A Year old Pizza Box

Re: [minimod][v0.1] Gearbox - weapon selection mod

Post by Captain J »

It looks certainly advanced and efficient to use now. Thanks so much for creating this addon! Almost every mods works nicely with it except some mods with own custom weapon select screen like Lambda. But you're not supposed to be play like that, so... Good addon overall!
Spoiler: However, i have some feedback and suggestions to share
And that's about it. Very useful addon!!
User avatar
m8f
 
 
Posts: 1435
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: [minimod][v0.1] Gearbox - weapon selection mod

Post by m8f »

wildweasel wrote:This was running on a 1080p panel in borderless full screen mode, with the video Scale Factor reduced to 0.5. The Scale setting in the Gearbox options was at 1.
Welp, I need to fix the display with non-1 scale factors. Captain J's screenshots may show the related problem, the weapons don't fit into the wheel.
Captain J wrote:First of all, the scale meter seems does not affect the Wheel mode.
Intentional, I may need to make a note for that option. The wheel needs to keep this size.
Captain J wrote:Block mode is quite compact and tidy. But would've been nice if the ammo bars on each weapon were differently colored, or add another icon to indicate which ammo type they are.
I have to think about different colors for different ammo types. It may be difficult to make it readable on user-specified background color.
Captain J wrote:It's about wheel mode again. If you have too much weapons like on Russian Overkill and Netronian Chaos(not advertising btw), the entire wheel gets stuffed by them. Is there any way to shrink them all?
You won't believe it, but I'm already working on this issue. No, the weapons won't be shrunk down. There is a certain reason for the reserved space around the wheel, and why it's exactly the radius of the wheel. It's a secret for now, I'm still not sure if I can pull this off.
Captain J wrote:Plus, if the weapon doesn't have the pickup or icon sprite at all, the icon will be the first person sprite of it. Thanks to such behavior, it kinda clutters the wheel. Resizing option if the sprite size is big might be extra tidy!
There will be possibility for patches for certain mods that would add missing icons.
Captain J wrote:Py's weapon wheel displayed the name of the selected weapon. How about adding it to this addon as well?
Will do later.

Thank you for the feedback!
popguy12
Posts: 42
Joined: Fri Jan 19, 2018 1:44 pm
Location: Planet SOPHIA

Re: [minimod][v0.1] Gearbox - weapon selection mod

Post by popguy12 »

i tried testing this with Project Brutality to see if it would work well for people who want a weapon wheel for weapon selection, and i came across the missing sprite error that seems to have been brought up already, could you maybe point me to where the code for rendering/scaling the sprites or whatever is at? im interested in trying to pick it apart and see how it works to maybe get a patch going until you have your planned compatibility stuff in
User avatar
m8f
 
 
Posts: 1435
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: [minimod][v0.1] Gearbox - weapon selection mod

Post by m8f »

I suppose the easiest way to add icons for now is to add a replacement for the weapon and define Inventory.AltHUDIcon property there.

The code that gets the icon is here, but it just uses the existing function from GZDoom.
popguy12
Posts: 42
Joined: Fri Jan 19, 2018 1:44 pm
Location: Planet SOPHIA

Re: [minimod][v0.1] Gearbox - weapon selection mod

Post by popguy12 »

alright then, thank you, ill look into this
User avatar
mamaluigisbagel
Posts: 415
Joined: Wed Jul 09, 2014 7:25 pm
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: [minimod][v0.1] Gearbox - weapon selection mod

Post by mamaluigisbagel »

welp got another crash trying to select a weapon in QCDE. I was at least able to open the menu this time, but closing it by clicking caused this crash. This is with the dev build.
You do not have the required permissions to view the files attached to this post.
Voydtt
Posts: 4
Joined: Sat Jan 02, 2021 4:59 pm

Re: [minimod][v0.1] Gearbox - weapon selection mod

Post by Voydtt »

I'm really loving this. Only, I have a problem in that I really like both "representations", and don't want to have to choose between them :P

Would it be possible to have it so number keys bring down the weapon blocks, while still having the menu key bring up the weapon wheel? Could this be done with aliases?
User avatar
m8f
 
 
Posts: 1435
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: [minimod][v0.1] Gearbox - weapon selection mod

Post by m8f »

mamaluigisbagel wrote:welp got another crash trying to select a weapon in QCDE. I was at least able to open the menu this time, but closing it by clicking caused this crash. This is with the dev build.
I don't get this VM abort with the most recent devbuild. Either something was fixed along the way, or I don't meet the specific conditions. Can you please describe what did you do: what player class, what weapons did you have, how did you open the wheel, and what weapon did you select?

Also, that "Alias -gb_toggle_weapon_menu tried to recurse" message above the VM abort is very odd. It should not be happening. Does it happen often?
Voydtt wrote:Would it be possible to have it so number keys bring down the weapon blocks, while still having the menu key bring up the weapon wheel? Could this be done with aliases?
Yep, add these lines to the end of keyconf lump:

Code: Select all

Alias +gb_Voydtt "gb_view_type 1; event gb_toggle_weapon_menu"
Alias -gb_Voydtt "event gb_toggle_weapon_menu_up; wait 5; gb_view_type 0"
AddMenuKey "Open Wheel for Voydtt" +gb_Voydtt
Then set Gearbox to Blocks view and assign the new key in Customize Controls.

Edit: almost forgot to add that this thing dropped in devbuilds:
Spoiler:
User avatar
mamaluigisbagel
Posts: 415
Joined: Wed Jul 09, 2014 7:25 pm
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: [minimod][v0.1] Gearbox - weapon selection mod

Post by mamaluigisbagel »

that's the first and only time I've had the "Alias -gb_toggle_weapon_menu tried to recurse" message appear.

I chose random, which gave me Serious Sam, meaning I had the Gauntlet, Starter Machinegun, Starter Shotgun, and Starter Nailgun. I opened the menu using the keybind, and I selected the Gauntlet, though it might do this for anything. If it helps, I was using the blocks layout.

EDIT: From further testing, this does not happen with the weapon wheel, and will not crash with blocks IF you select a weapon without the menu first. (in QCDE, at least for me, you start with nothing until you select the gauntlet or your starter weapon. That moment you have nothing and select a weapon is when it crashes. After you have your weapon out, it works fine.)
Voydtt
Posts: 4
Joined: Sat Jan 02, 2021 4:59 pm

Re: [minimod][v0.1] Gearbox - weapon selection mod

Post by Voydtt »

m8f wrote: Yep, add these lines to the end of keyconf lump:

Code: Select all

SELECT ALL
Alias +gb_Voydtt "gb_view_type 1; event gb_toggle_weapon_menu"
Alias -gb_Voydtt "event gb_toggle_weapon_menu_up; wait 5; gb_view_type 0"
AddMenuKey "Open Wheel for Voydtt" +gb_Voydtt
Then set Gearbox to Blocks view and assign the new key in Customize Controls.
Awesome! Thanks!
User avatar
m8f
 
 
Posts: 1435
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: [minimod][v0.1] Gearbox - weapon selection mod

Post by m8f »

mamaluigisbagel wrote:in QCDE, at least for me, you start with nothing until you select the gauntlet or your starter weapon.
Aha! Found and fixed (in devbuild). There is an option in GZDoom, "Switch on pickup". You had it off, I had it on. In QCDE, the player starts with no weapon selected, indeed, but if this option is on, the player immediately switches to some weapon. Gearbox didn't expect that no weapon is selected, and misbehaved.

Gearbox will still misbehave if there is no weapons at all. We'll see if such a situation happens in reality.
User avatar
mamaluigisbagel
Posts: 415
Joined: Wed Jul 09, 2014 7:25 pm
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: [minimod][v0.1] Gearbox - weapon selection mod

Post by mamaluigisbagel »

ah ok, I did in fact have it off. (I'm afraid I'll be in a close-quarter fight, accidentally pick up an explosive weapon, and kill myself with it :P ) I'll keep reporting what I can. Like I said, I loved Weapon Menu so I want to help try to improve this one! :)
User avatar
Cutmanmike
Posts: 11286
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Re: [minimod][v0.1] Gearbox - weapon selection mod

Post by Cutmanmike »

Fantastic, I was hoping something like this would appear :) What are the chances of getting a version of this for INVBAR inventory items? We've been using that horrible Heretic scrolling inventory for far too long!
User avatar
m8f
 
 
Posts: 1435
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: [minimod][v0.2] Gearbox - weapon selection mod

Post by m8f »

Cutmanmike wrote:What are the chances of getting a version of this for INVBAR inventory items? We've been using that horrible Heretic scrolling inventory for far too long!
Planned, will do at some point.

v0.2 is here! Download

New:
  • Wheel: multiwheel - allows handling large arsenals with style
  • Wheel: option to disable mouse input
  • Wheel: mouse sensitivity sliders
  • Wheel: position slider
  • General: moved dimming out of Wheel and make it optional
  • General: reaction to number keys
  • General: option to select the weapon when the Toggle Menu key is released
Fixes:
  • Wheel: fixed VM abort with closing the wheel twice
  • Wheel: don't reset when pressing unrelated keys (allows moving while wheel is open)
  • Wheel: don't let the pointer leave screen bounds
  • Blocks: don't show second ammo type if it's the same as the first ammo type
  • Blocks: fixed VM abort when there is only one weapon
  • General: fixed VM aborts with QCDE
  • General: fixed scaling issues
  • General: fixed preventing cheat code input in some circumstances
User avatar
Dark-Assassin
Posts: 735
Joined: Thu Mar 19, 2009 3:40 am
Location: South Australia

Re: [minimod][v0.2] Gearbox - weapon selection mod

Post by Dark-Assassin »

With the wheel menu enabled, just regular scrolling through also wants to use the mouse for input which is extremely uncomfortable. IMO mouse input should only be used when opening the menu via bind rather than weapon selection override.

Also, a VM abort happens when you try to active the menu with no weapons.

Code: Select all

VM execution aborted: array access out of bounds. Size = 0, current index = 0

Called from gb_BlockyView.display at gearbox-v0.2.pk3:zscript/blocky_view.zs, line 60
Called from gb_EventHandler.RenderOverlay at gearbox-v0.2.pk3:zscript/event_handler.zs, line 184

Return to “Gameplay Mods”