Grid Inventory

Requests go in THIS forum!

Grid Inventory

Postby Drake Raider » Mon Dec 13, 2021 10:41 pm

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?
User avatar
Drake Raider
I seem to keep alot of my work to myself....
 
Joined: 18 Jul 2008
Location: Plane of thought.

Re: Grid Inventory

Postby XLightningStormL » Tue Dec 14, 2021 3:18 am

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.
XLightningStormL
Former DUSK Wiki Master
 
Joined: 09 May 2016
Twitch ID: XLightmingStormL

Re: Grid Inventory

Postby ramon.dexter » Tue Dec 14, 2021 9:19 am

Yes, I'm also looking for a grid based inventory.
User avatar
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Grid Inventory

Postby Jarewill » Tue Dec 14, 2021 3:47 pm

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.
Jarewill
 
 
 
Joined: 21 Jul 2019

Re: Grid Inventory

Postby neoworm » Tue Dec 14, 2021 4:18 pm

Total chaos has puzzle inventory.
Also I kinda want a grid inventory too, already made some mockups.
You do not have the required permissions to view the files attached to this post.
User avatar
neoworm
 
Joined: 23 Sep 2005
Location: Czech Republic

Re: Grid Inventory

Postby Drake Raider » Wed Dec 15, 2021 11:43 am

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
Drake Raider
I seem to keep alot of my work to myself....
 
Joined: 18 Jul 2008
Location: Plane of thought.

Re: Grid Inventory

Postby ramon.dexter » Thu Dec 16, 2021 3:49 am

jarewill: The minecraft styled inventory looks better to me.
User avatar
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Grid Inventory

Postby XLightningStormL » Mon Dec 20, 2021 2:29 am

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.
XLightningStormL
Former DUSK Wiki Master
 
Joined: 09 May 2016
Twitch ID: XLightmingStormL


Return to Requests

Who is online

Users browsing this forum: No registered users and 1 guest