Decorate Inventory sorting functions

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Decorate Inventory sorting functions

Post by wildweasel »

I would like to see a feature that allows one to specify in which order ZDoom will display inventory items on the bar when given to the player. Currently, it seems that they are sorted in the order which the player obtains them, but I would like to know if it's possible to make them sort in a predetermined order, similar to Weapon.SelectionOrder and associated properties.
User avatar
Enjay
 
 
Posts: 26535
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Decorate Inventory sorting functions

Post by Enjay »

Yes, that would be nice. I'd use it to specify special items (like puzzle items and so on that are single use and in one location only) to be at one end of the inventory and useful, frequent-use items to be at the other.
User avatar
Xtyfe
Posts: 1480
Joined: Fri Dec 14, 2007 6:29 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support

Re: Decorate Inventory sorting functions

Post by Xtyfe »

Not sure how this relates to what you are asking, but from my own findings in making an inventory system for doom items. it seems that if I use give all and then receive these inventory items in the new system. They will appear in the order of how they were defined in decorate :shock:
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Decorate Inventory sorting functions

Post by Gez »

When you use the give all cheat, the engine just goes through the entire list of actor and goes "is this an inventory item y/n if yes add it". That master list of actors is filled in the order the actors are defined, so there's nothing mindboggling to the fact that items are added in the order they are defined. And they're sorted by the order in which they are added, so, again, what happens is a logical extension of how things work.

But you're not really supposed to use give all when playing.
User avatar
jpalomo
Posts: 771
Joined: Mon May 17, 2010 9:45 am

Re: Decorate Inventory sorting functions

Post by jpalomo »

I can see this not only being useful on a modder's perspective, but for a player's as well. I have found times in Heretic and Strife when I want a certain item and have to scroll through a bunch of junk to get to it. Inventory.SelectionOrder seems like an appropriate name for the function. Lower numbers would place the item higher in the list. If 2 actors have the same number, the original behavior takes place.
User avatar
Slasher
Posts: 1160
Joined: Sun Mar 16, 2008 11:17 pm
Location: California

Re: Decorate Inventory sorting functions

Post by Slasher »

wildweasel wrote:I would like to see a feature...
Oh God he's channeling SamuraiClinton! :lol:
Post Reply

Return to “Feature Suggestions [GZDoom]”