SlotNumber/Priority Meta Removal

Moderator: GZDoom Developers

User avatar
Major Cooke
Posts: 8196
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

SlotNumber/Priority Meta Removal

Post by Major Cooke »

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49182
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: SlotNumber/Priority Meta Removal

Post by Graf Zahl »

Please post a legitimate use case - this looks like a hack to serve some immediate goal.
User avatar
Major Cooke
Posts: 8196
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: SlotNumber/Priority Meta Removal

Post by Major Cooke »

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49182
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: SlotNumber/Priority Meta Removal

Post by Graf Zahl »

Major Cooke wrote:what I want, .
What is that use case? "I need it" doesn't cut it.
User avatar
Major Cooke
Posts: 8196
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: SlotNumber/Priority Meta Removal

Post by Major Cooke »

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
Posts: 8196
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: SlotNumber/Priority Meta Removal

Post by Major Cooke »

Meh, at the end of the day I've given up on this, I'll just stick with the inventory adding.

Return to “Closed Feature Suggestions [GZDoom]”