Grid Inventory

Requests go in THIS forum!
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.
Post Reply
Drake Raider
Posts: 474
Joined: Fri Jul 18, 2008 12:27 pm

Grid Inventory

Post by Drake Raider »

More of a request to see whether it exists in working form, rather than for work to make one, but does anyone know if there's an existing script for a grid layout for the inventory?
XLightningStormL
Posts: 384
Joined: Mon May 09, 2016 1:38 am
Location: Anywhere but here
Contact:

Re: Grid Inventory

Post by XLightningStormL »

For a moment there I got hyped and someone actually made a resource for this then found out it was under Request...yeah thanks Projects page.

+1 I want a grid inventory too.
User avatar
ramon.dexter
Posts: 1529
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Grid Inventory

Post by ramon.dexter »

Yes, I'm also looking for a grid based inventory.
Jarewill
 
 
Posts: 1766
Joined: Sun Jul 21, 2019 8:54 am

Re: Grid Inventory

Post by Jarewill »

By grid inventory do you mean something like in Diablo? Aka tetris-block inventory?
Or just an inventory where every item takes up a single slot, kinda like in minecraft?

If it's the latter, I have something like that done, but it won't be as easy as copying the code and having it work.

If it's the former, that would be far more complicated.
I vaguely recall Nash working on an ACS script that had an inventory system like that, but I don't know if it was released.
If I have more time, I might just try my hand at it as well, seems like quite the challenge. No promises though.
User avatar
neoworm
Posts: 1743
Joined: Fri Sep 23, 2005 9:17 am
Location: Czech Republic

Re: Grid Inventory

Post by neoworm »

Total chaos has puzzle inventory.
Also I kinda want a grid inventory too, already made some mockups.
Attachments
pitches.png
Drake Raider
Posts: 474
Joined: Fri Jul 18, 2008 12:27 pm

Re: Grid Inventory

Post by Drake Raider »

That would be a really cool take on it, too, if possible. Honestly, I'd be satisfied to just allow regular weapon and artifact selection via a mouse-driven interface (of which I find Grids to be the most readable,) if all those other features existed that would just be a bonus.

EDIT: Jarewill, the single tile one would work just fine, most likely.
Last edited by Drake Raider on Thu Dec 16, 2021 8:44 am, edited 1 time in total.
User avatar
ramon.dexter
Posts: 1529
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Grid Inventory

Post by ramon.dexter »

jarewill: The minecraft styled inventory looks better to me.
XLightningStormL
Posts: 384
Joined: Mon May 09, 2016 1:38 am
Location: Anywhere but here
Contact:

Re: Grid Inventory

Post by XLightningStormL »

I'm going to make a particularly rough "basic" concept.

The "resource" layout should be a basic, perhaps simple black transparency. I may even suggest giving people outright an option (automatic or manual change) so the inventory can fit the artstyle of the game (may be out of scope, should be just a basic resource) the layout itself should be something a-la Minecraft and System Shock 2 (neoworm's concept is cool for example, but is overtly overdetailed, and even feels tedious to navigate, keep the mazes to maps)

The code should be clean, and well commented, that way people with a good enough clue can figure out what makes it click. General Rule for a code resource.

Instead of being a static menu with simple "preset" coded (and essentially invisible) inventory area, each slot should be a "dynamic filling system" where simply increasing or decreasing the inventory slot counts will increase the actual inventory (InventorySlotsCount), the "full size" of this inventory menu should also be settable easily for ease of use (say, start at InventoryMenuStartX, InventoryMenuStartY, with the full sizes being set with InventoryMenuX, InventoryMenuY) depending on the IMX and IMY values, the inventory slots will "flow over" into a new row within those screen space parameters

When the InventorySlotsCount reaches it's max and an item is picked up (without having a unfilled stack) it should refer the item to either it's pickup or a new failpickup state (which by default would redirect to spawn, doing nothing, though can be custom if the individual modder wishes)

All Items without a new DontShowOnInventory flag should be seen in the inventory, including Weapons, Ammo and Armour, and have a ItemStackMax property to dictate how much can be stacked per item (until the stack is filled, a new separate slot will not be filled) by default this should be 1. As well as including the ability to control the size of the item within the inventory with separate X and Y values (say blue armour is 4x4, Shotgun is 1x5, etc) by default this should be 1x1 and would be defined under the ItemSlotSizeX, ItemSlotSizeY actor properties.

Rather than making a new class for inventory items, it should be possible to "expand" the original definition and keeping it intact code wise, just with expanded functionality from the PK3/WAD/PK7. This should also include new flags (DontShowOnInventory, etc) and properties (ItemStackMax, ItemSlotSizeX, ItemSlotSizeY, etc)

To flex the strength of this inventory system, It should have an "expandable feature" through picking up hip-pouches, however backpacks can be used to increase ammo pools/stacks for ammunition. These items would both be useful to show the ability to increase item stacks (these would optimally be set within the item definition though the inventory master as well as the actual slots of the inventory (referring to InventorySlotsCount)

For Controls, it should be mapped by default to: "RMB" = Drop Item (this should refer to a new item state as well, so players are given the option to decide if a dummy item, or no item is dropped but removed.) and "LMB" = Use Item/Switch To Weapon (if held down it will activate a drag functionality, and function like a basic puzzle system where all items/stacks have to be dragged to empty slots in order to be moved, though such a system maybe too complicated for it's own good)

Sounds used for the inventory menu should be menu/inventory/whatever and refer to general menu sound aliases, allowing for cross-game support without requiring lots of pointless code and SNDINFO definitions, whilst also allowing modders to change the sound definitions to new, separate sounds if they please.

In regards to AmmoMaxCount and Backpack Amount, simply put it allows the item and the stack to it's specified amount (say Clip, 200 max, 50 units per stack, you will be unable to pickup more ammo, though this may be too complicated for whatever reason)

In regards to Weapons, perhaps it may be best to create a seperate system, if whomever chooses to, it may be a good idea for weapons to just fill "key number slots" if dragged into them (if not, the player will have to manually activate the item in order to use it)

In regards to armour...GZDoom's armour system isn't by any means simple or inventory safe (especially in regards to item permeance and being able to functionally drop a damaged armour, pick it back up, and still have the same Armor points) , and it maybe wise to just have a basic icon representing the armour over the head/chest/leg slots, and have the item be automatically placed on the slot and be unremovable if in that slot (until it's destroyed) Honestly too complicated and won't give it a further thought.
Post Reply

Return to “Requests”