[Closed] SlotNumber/Priority Meta Removal

Moderator: GZDoom Developers

SlotNumber/Priority Meta Removal

Postby Major Cooke » Sun Apr 26, 2020 10:50 am

Pull Request

Since we have the Default available to us, and there just so happens to be the handy CheckAddToSlots virtual at our disposal, it's the perfect opportunity to allow for some more creative weapon selecting organization for modders all around.

This change ensures that, while SlotNumber and SlotPriority can be changed, the main weapon selecting used by the engine itself does not. Thus, modders can create their own selection algorithms without fear of breaking the engine's.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: SlotNumber/Priority Meta Removal

Postby Graf Zahl » Sun Apr 26, 2020 1:31 pm

Please post a legitimate use case - this looks like a hack to serve some immediate goal.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: SlotNumber/Priority Meta Removal

Postby Major Cooke » Sun Apr 26, 2020 1:53 pm

Currently I have to give weapons an inventory item that acts as a slot number and priority in order to perform what I want, but this can be problematic at times and, in and of itself, is a massive hack. Furthermore, searching for inventory within an inventory actor certainly doesn't strike me as sane either.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: SlotNumber/Priority Meta Removal

Postby Graf Zahl » Sun Apr 26, 2020 2:40 pm

Major Cooke wrote:what I want, .


What is that use case? "I need it" doesn't cut it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: SlotNumber/Priority Meta Removal

Postby Major Cooke » Sun Apr 26, 2020 5:44 pm

Two use cases I have:

1. Enables me the ability to disable certain weapons from being selectable when possessing a stronger variant. In this case, I'm using a global system to manually search through weapons because the system was developed to encapsulate all player actors without needing to implement anything on the player side.

2. This allows me to group weapons in subsets. In one mod I have a bunch of specific weapons in one slot:
  • Rail Rifle
  • Ballista Rifle
  • Demon Tech Plasmatic Rifle
  • Legendary Plasmatic Rifle
  • Enraged Legendary Plasmatic Rifle
  • Nemesis Plasmatic Rifle

That list is sorted weakest first, strongest last. Cycling through to select the Ballista Rifle would require going through four others first. Subsets would allow the player to simply alter through more quickly by disabling the slot numbers on the individual weapons and instead select the last selected. But the option to use subsets is toggleable because while many would like that, some players have expressed they would prefer to keep using the regular system.

With it enabled, that shortens the list to:

  • Rail Rifle
  • Ballista Rifle
    ----- USER3/4 cycles through the following.
  • Demon Tech Plasmatic Rifle
  • Legendary Plasmatic Rifle
  • Enraged Legendary Plasmatic Rifle
  • Nemesis Plasmatic Rifle

It sets all but the last selected Plasmatic Rifle's slotnumbers to -1. The keybinds (USER3 goes forward, USER4 goes backward in this case) cycles through that group of Plasmatic rifles.

This cannot be implemented on separate players since the system is in a library package that reads keybinds for "slot <x>", "weapnext" and "weapprev" and overrides them, since otherwise keyconf blocks their use. Since it was designed to allow mods to run together, it had to be done this way. This prevents other mods needing to modify their player actors to be compatible.

As such, having the ability to set the specific numbers would make this a lot more possible without the use of hacks.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: SlotNumber/Priority Meta Removal

Postby Major Cooke » Thu Aug 27, 2020 10:59 am

Meh, at the end of the day I've given up on this, I'll just stick with the inventory adding.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests