Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [inventory]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
58 views

To fix an item duplication glitch, I created an item deletion glitch

The item type is based on button.icon.texture The item quantity is based on button.quantity If item quantity reaches 0, the <...
Xenophile's user avatar
0 votes
1 answer
172 views

Stackable items: what's the point of an item not stacking to infinity?

Pretty much every inventory system that doesn't care about realism and still let's you carry thousands of useless items in your pocket will anyway decide to give items a maximum stack size. Which is ...
Atsinganoi Dragon's user avatar
0 votes
0 answers
47 views

GameObject optimization in backpack behavior

I am trying to design the item part of my game. My original design was just to treat them as a gameobject and to give every item an item (or some derived) component,...
YX L's user avatar
  • 1
0 votes
1 answer
80 views

Using Game Engine (or parts of it) In Commercial Application?

This is a difficult question, as it is not related to game development directly: we are currently evaluating, if an existing game implementation (game engine or part of it) may fulfill the needs for a ...
Nicolas's user avatar
  • 103
0 votes
1 answer
149 views

How to interact with inventory only and not the game

I have created an inventory in which you can select some objects that you can spawn. This is a button in a table in a inventory class. Spawning is done via left mouse button (just click on some ...
mirzak's user avatar
  • 101
0 votes
2 answers
972 views

Designing database schema for multiplayer game inventory

I want to create an inventory system for an online multiplayer game, so I was thinking about database. My research led me to this form: id (user, bigint, unsigned + index, foreign key for user's id ...
Gamer's user avatar
  • 1
0 votes
1 answer
120 views

Timing User Inputs for Inventory on 60UPS game loop

I'm making an inventory system for my pure Java game right now. Currently, the game runs at a 60UPS, and inputs are checked each update. I have inputs set up using arrays of the current update and ...
ElliottV4's user avatar
3 votes
2 answers
266 views

Why do RPGs require you to "use" items instead of unlocking them on drop?

Many RPGs have you collecting items (like books, or cosmetics) as inventory items, which you then have to "use" to actually unlock their benefits (say a higher knowledge stat, or being able ...
uliwitness's user avatar
  • 1,217
1 vote
1 answer
1k views

Method subscribed to an event is called twice for every time the event is raised [closed]

I am trying to make an inventory system in Unity with ScriptableObjects and a text driver that displays the contents of an inventory. So far the code looks like this: -An InventoryObject is defined as ...
IDieForShrek's user avatar
1 vote
1 answer
127 views

How to assign a specific Item index to my inventory when picking up items? [closed]

I want to make an inventory system for my game, and I found some issues when collecting an item. What I want is to match the index in the Inventory_UI system ...
YouCanCallMe Syarif's user avatar
0 votes
1 answer
292 views

Inserting into the first available inventory slot

Hello my inventory system picks up one item but does not pickup any more to fill the other two slots. It is saying the whole inventory is full when it should be one slot is full. Here is my code for ...
user avatar
0 votes
1 answer
114 views

Help with inventory!

Ok so i made this inventory script but the items are not picking up and not appearing in the inventory. Im new to c# so that is why im asking this question also ive never done an inventory before. I ...
user avatar
0 votes
1 answer
209 views

Trouble with Inventory System and Item References

I'm currently trying to get a simple inventory system to work but I'm having a lot of trouble. This isn't the exact code I have, but it's a shorter version that I'm pretty sure would function the ...
Genzou's user avatar
  • 23
0 votes
1 answer
235 views

How do I make an actor move to the foreground temporarily in LibGDX scene2d?

I have an inventory UI which is a table in scene2d. Then the table had a bunch of Containers which are basically inventory slots. They have a transparant grey background color. Then in each container ...
TJRC's user avatar
  • 131
0 votes
1 answer
109 views

How to communicate to an inventory item which character it's being used on?

Currently, I have an Inventory that is a ScriptableObject, which means it's not tied to any specific game object or player ...
Printer's user avatar
  • 317
13 votes
4 answers
8k views

How can I implement an inventory that stores different types of items?

Let’s assume I want to create an RPG with collectible items my character can pick up and store in his inventory. One item could be a sword, with an attack, defense, and level attributes. Another ...
Alex Donnelly's user avatar
0 votes
1 answer
107 views

Rest API as Remote Data Storage

I'm currently working on a minor multiplayer project which is made like a hacking simulator where your character can login to a "console"-like interface to permanently manipulate the system with ...
Poul A. M. Poulsen's user avatar
1 vote
1 answer
222 views

Will using one class per inventory item create issue on the long term?

I finally managed to plug my menu to my inventory system, display current items, use them etc. But the way I did it... makes me feel dirty. To cut short, my items are described this way: ...
Cristol.GdM's user avatar
0 votes
1 answer
668 views

Modifying Brackeys Unity Inventory Tutorial for Stackable Items?

I followed this tutorial: https://www.youtube.com/watch?v=w6_fetj9PIw and the one after it, and it works fine, but now I'm in a situation where I want to be able to stack my items up. I saw there was ...
palinalif's user avatar
1 vote
2 answers
275 views

Do inventory items have to live in the game world?

I'm trying to create an inventory system. There's a few parts to it: Item (scriptable Object just the data like name etc of the item) ItemDatabase which takes array of Item (scriptable object) and ...
Kimbur's user avatar
  • 49
0 votes
1 answer
141 views

checking if an array rank is not equal to an int C#

I'm creating an inventory system for a dungeon crawler, I've got world gen, and player controls down, and this is the only snag.` ...
Indiepixel's user avatar
0 votes
1 answer
852 views

How can I make an inventory system in Unity?

I am trying to make an inventory system for the game I'm working on with Unity and I want it to expand and compress whenever objects are added or removed. Is there any go-to way to do this?
Miya's user avatar
  • 3
0 votes
2 answers
218 views

NullReferenceException in my inventory system [duplicate]

I'm making a simplified inventory system for a 3d game. When I try to pick up an object, I get the following error: NullReferenceException: Object reference not set to an instance of an object ...
Indiepixel's user avatar
0 votes
1 answer
130 views

Item functionality with database

So the game i'm making will have items with different functionality such as ammo boxes, med-packs, guns, food, water ect. My problem is i don't know where to put the code for the specific ...
ThePumkinMelon's user avatar
0 votes
1 answer
755 views

Adding hotbar to inventory?

I have a inventory and I need to add a hotbar to access certain items. What this hotbar needs to do is when in the inventory "Menu" you add items to it and when you close the menu the hotbar moves to ...
ThePumkinMelon's user avatar
-1 votes
1 answer
158 views

What is "storage" in MMOs with vehicles good for, where all equipped items get removed?

Many games, for example Star Trek Online (Dry Dock) and Battletech (Storage) have a concept of placing a vehicle in storage. It is not ready for use, you're not destroying unused vehicles, but rather ...
uliwitness's user avatar
  • 1,217
1 vote
2 answers
281 views

How can I handle sharing storage units in multiplayer?

I have recently come across a certain problem in programming my MMORPG: the synchronization of shared storage units. With shared storage unit I intend something like a "chest" that can be accessed ...
Alakanu's user avatar
  • 705
0 votes
1 answer
626 views

Upgrade items on shop menu

I made a game and I made a Magnet upgrade and I have 8 game objects to set active 1 by 1 every time when I upgrade the magnet and I have (int upgrade = 0;). But when I upgrade these game objects it'...
Toni's user avatar
  • 1
1 vote
1 answer
85 views

Good item distribution for 2d scroller game

I have made a scroller game where player moves to the right of the screen. I add a new uniform ground block about every 5 seconds. I was wondering how often should I put bonus items. Currently I put ...
morevitamins's user avatar
1 vote
0 answers
82 views

Designing Game Items in Mystery Game

I am currently working on a Mystery Game, where the player has to evolve in a small hamlet and find clues to solve a mystery. The game is a first person view and the feel is going to be somewhere ...
Sorade's user avatar
  • 283
4 votes
2 answers
5k views

How do Inventories work?

I am trying to create a inventory screen / system for my game. And I don't know how it will work. I'm creating it in unity. I was thinking of making a database of all items and a database of items in ...
Treeschapter's user avatar
3 votes
2 answers
1k views

Ideas/suggestions to implement an item combination system

I'm designing a game where there is a relatively small set of items. A single player holds an inventory of item slots. Each item slot contains a single item. The inventory allows you to use the item ...
mrkotfw's user avatar
  • 99
1 vote
2 answers
272 views

Different methods of item implementation - what are the differences?

More often that not, when I see how item systems have been implemented in games, the items are retrieved using either a string or ID. Eg, GetItem("Sword") or GetItem(ID.Sword). Is there some advantage ...
Infergnome's user avatar
0 votes
2 answers
1k views

LibGDX: Problems with Button Listener in a Dialog

I'm developing a game where the player has an inventory, and you can find chests in the map with items which you can collect, so I created a class that extends from ...
Alex Pi's user avatar
  • 93
1 vote
1 answer
2k views

C# How to add inventory to player, NPCs, and in-game objects?

I'm a beginner in C# and trying to implement a player, an item interface, and some kind of storage system (for player inventory, NPC inventory/drop list, and storage like chests), and having some ...
F8bit's user avatar
  • 33
1 vote
0 answers
115 views

General pointers and advice in creating inventory structure?

I am working on text-based Diablo-like RPG, where each weapon and armor has unique stats and names and there is a lot of overlap. Ie I can generate Silver Sword with 40 damage, but I can also generate ...
The Law's user avatar
  • 111
1 vote
1 answer
425 views

Java LWJGL inventory using ArrayList

I'm making a game in Java with LWJGL 2.9.3 and Slick2D, and I'm working on creating an inventory. I managed to set it up almost completely, but I ran into a problem. When I'm rendering the slots, only ...
Ivan Jerza's user avatar
-1 votes
4 answers
733 views

How do I implement an item that can hold other items?

I'm attempting to implement a "storage item" into my game. But I'm having trouble planning out how it would work. I already have an inventory system made, but this storage item is giving me trouble. ...
Kadenaa's user avatar
1 vote
3 answers
955 views

How can I store a large amount of items in a space-efficient manner?

How can I store a large amount of items inside my game? Are each of the items default data be loaded from a file into an item class and then stored in a giant array/list/dictionary? For a point of ...
Robert Stivanson's user avatar
2 votes
1 answer
2k views

Bukkit "Could not pass Event" error

I'm trying to make a bukkit plugin, which implements backpacks in the game if the player has the correct item (Enchanted Normal book with Efficiency 10 and Unbreaking 10, to be uncraftable). I want ...
Bálint's user avatar
  • 14.9k
1 vote
1 answer
848 views

Handling an item database with procedurally generated items?

Let's say you have an item database which has every item in your game. This works fine for regular items like a Health Potion, a normal Iron Sword etc, because these items have ItemID's so we can get ...
Mathias Siig Nørregaard's user avatar
1 vote
2 answers
135 views

What factors affect the size of ammo limits?

In virtually all shooting games that use ammo, there is also a maximum ammo limit, which often varies between different ammo types. One obvious advantage of using ammo limits is to control the ...
congusbongus's user avatar
  • 14.8k
0 votes
2 answers
172 views

How do I attach UI data to logic data?

I'm attempting to write an inventory system(C++, doesn't need to be huge), that later on should be able to be drawn in a GUI. In the file structure, I think it would be best to put both information ...
therufuser's user avatar
1 vote
2 answers
927 views

Handling differing inventory items on use interactions

Hey there my fellow programmers. Looking for a little input into a potentially smelly code problem (I was about to post this on the Code Review SE, let me know if that's the more proper place). After ...
steve's user avatar
  • 220
4 votes
2 answers
4k views

How to design a drag and drop inventory system with transition from icons to game objects?

I’m trying to write a simple 2D game in Unity with an inventory where the user can drag and drop different objects on the screen. I need the inventory to contain icons which on drag will become ...
moria am's user avatar
5 votes
1 answer
2k views

How are game menus logically structured?

I've been struggling with making a game menu system in Unity for some time now. I spent time developing a way to help myself understand how game menus are connected together. Right now, I'm calling it ...
Rxanadu's user avatar
  • 93
2 votes
1 answer
1k views

How should I store grid-based character inventories in the database?

I used to encode the whole inventory data into binary but I'm thinking of doing something different now. The inventory has a 64 slots in an 8×8 grid. Large items like weapons fill up 6 to 8 ...
majidarif's user avatar
  • 241
6 votes
2 answers
4k views

How to manage grid-based inventory with items larger than 1x1 cell?

Me and my team have been trying to implement some sort of inventory system. We've set our eyes on an inventory system where some items may take up more than one box on the grid system, sort of like ...
Geoffroi's user avatar
  • 485
3 votes
0 answers
529 views

How do you deal with loot in an RPG where all mosters drop their full inventory? [closed]

I currently have a system where both players and monsters in an RPG use equipment. This means that when an enemy is killed, I can technically drop everything they have. These are armor and weapons ...
Alex Stone's user avatar
7 votes
2 answers
1k views

How to implement special weapon and armor effects (ex: vampiric, holy, damage shield, thorns)?

I'm working on the inventory system for my game, and am interested in how do I implement additional weapon and armor properties that are not just damage or armor? If all I have is damage and armor, ...
Alex Stone's user avatar