Questions tagged [inventory]
The inventory tag has no usage guidance.
52
questions
0
votes
1
answer
82
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 ...
0
votes
2
answers
140
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 ...
0
votes
1
answer
42
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 ...
3
votes
2
answers
176
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 ...
1
vote
1
answer
297
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 ...
1
vote
1
answer
64
views
How to assign a specific Item index to my inventory when picking up items?
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 ...
0
votes
1
answer
81
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 ...
0
votes
1
answer
89
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 ...
0
votes
1
answer
91
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 ...
0
votes
1
answer
116
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 ...
0
votes
1
answer
69
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 ...
13
votes
4
answers
6k
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 ...
0
votes
1
answer
65
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 ...
1
vote
1
answer
105
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:
...
0
votes
1
answer
539
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 ...
1
vote
2
answers
191
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 ...
0
votes
1
answer
81
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.`
...
0
votes
1
answer
665
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?
0
votes
2
answers
184
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
...
0
votes
1
answer
105
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 ...
0
votes
1
answer
616
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 ...
-1
votes
1
answer
151
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 ...
1
vote
2
answers
195
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 ...
0
votes
1
answer
575
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'...
1
vote
1
answer
76
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 ...
1
vote
0
answers
75
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 ...
4
votes
2
answers
3k
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 ...
3
votes
2
answers
656
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 ...
1
vote
2
answers
197
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 ...
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 ...
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 ...
1
vote
0
answers
102
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 ...
1
vote
1
answer
394
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 ...
-1
votes
4
answers
678
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.
...
1
vote
3
answers
654
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 ...
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 ...
1
vote
1
answer
788
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 ...
1
vote
2
answers
125
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 ...
0
votes
2
answers
130
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 ...
1
vote
2
answers
911
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 ...
4
votes
2
answers
3k
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 ...
4
votes
1
answer
1k
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 ...
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 ...
6
votes
2
answers
3k
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 ...
3
votes
0
answers
514
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 ...
7
votes
2
answers
990
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, ...
1
vote
1
answer
279
views
Stacking items, c# XNA: When item reaches maximum stack, new items added are also maximum stack
haven't used this site before so I'm sorry if I format my post badly.
I am trying to build a stackable inventory for my game in c# XNA and the problem I've encountered is when an item in my inventory ...
2
votes
2
answers
674
views
Unlimited inventory system?
I am working on a small game, I need to add an unlimited inventory to the game but I am not sure how to do it.
I have an inventory system with a specific amount of slots, here it is:
...
3
votes
2
answers
9k
views
C# Item system design approach, should I use abstract classes, interfaces or virutals?
I'm working on a Resident Evil 1/2/3/0/Remake type of game. Currently I've done a big part of the inventory system (here's a link if you wanna see my inventory, pretty outdated, added a lot of ...
0
votes
1
answer
1k
views
2D sort for inventory items?
I asked this question some time ago. Now I ended up with just a sorter method that will sort the items based on their bulkiness/nSlotsRequired. Here's what I'm doing:
I store all the items I have in ...