Skip to main content
GameDev.net gamedev.net
🔒 Locked

Inventory System Design

Started by 00Kevin Aug 20, 2012 at 8:40 PM 15 replies 12k views
Original Post
00Kevin
00Kevin
Over the last week I managed to put together an fairly realistic rpg inventory class.

I'm mulling over a few concepts and I'd like to know what some of the more experienced game designers here think.

Realism vs Inventory Tetris

At this point, my inventory component supports nested container objects (much like a tree), in fact any item can be a container. My thought was that inventory could be presented in a tree view, but after reviewing the inventory system of several games like fallout, skyrim, diablo, nwn, and even some anime like rpgs, I've been debating if gamers would really appreciate a nested tree concept.

Personally, I'd really like the idea of being able to place a bunch of items in a sack and trade the sack to another party member. Of course, my system would allow you to place several small sacks full of gear into a large sack and then place the large sack inside your backpack. The system also has container size restrictions, which prevent you from placing a suit of armor inside a small pouch.

Coinage
One other concept I'm debating right now is how to best represent gold. I recall playing Ultima Underworld in which gold was an actual (gold pile) item in your inventory. Actually, that game is one of the only games I can find with a realistic inventory system.

Stackable Items
Stackable items is another concept I noticed in many of the games with inventory Tetris layouts. 24 Arrows per slot, 10 throwing daggers, 20 potions of healing, etc. Why not simply allow an endless number of similar items to be stacked together?


IMO, provided the presentation layer doesn't cause any frustration, I appreciate realism in my games.

Thanks.
MatthewMorigeau
MatthewMorigeau
I like the custom access of nested sack idea, you could actually combine that with a Tetris storage system by having the backpack limited to hold only certain amount of bags of items (of different shapes to represent the items in it) inside it. A fun meta game could be "bag squishing" to shape a bag of items to fit in your backpack with the risk of tearing the bag.

"This damn quiver and potions won't fit next to my sack of scrolls, if only I had a tomb!"
- Mage of the age

This could also make thievery interesting since the player could think they are stealing a bag of gold and it turns out to be a bag of severed thumbs.
Ravyne
Ravyne

A fun meta game could be "bag squishing" to shape a bag of items to fit in your backpack with the risk of tearing the bag.


I think you misspelled "tedious" smile.png

Honestly, I believe the one true guiding principle in game development should be "If it's not fun, its not part of the game."

I'm all for having items that can contain other items because it makes for natural relationships -- for example, a quiver holds 20 arrows, or a flashlight contains 4 D-cell batteries -- but I don't really see arbitrary sacks, for the sake of having them, be of much value in and of themselves, except for the anal-retentive gamer. It might be nice to get a sack of items as loot to add a bit of mystery, and in particular if there's a mechanic of players competing to grab/divide the loot, but I'm generally of the mind that the sack, as an item should either just disappear once the contents have been emptied, or at least not play an integral role in inventory management.

I most-especially dislike systems that make me manage two constraints on what I carry -- commonly shape (item-tetris) and weight (encumberence).
throw table_exception("(? ???)? ? ???");
Kaze
Kaze
I like complicated inventory management if I only have to carry items I need but if I have to haul truckloads of junk back to the item shop just to break even I want the inventory as simple as possible.
cronocr
cronocr
I think it would be interesting to create a system that allows you to carry as much as you want, but the weight gradually slows down your character. The main inventory will contain what the character is able to attach to his body, but he could also haul/roll a large sack with all the extra inventory. If he enters a fight the sack will be released, and will be affected by physics, i.e. will roll down the hill. Well it's mostly a dung beetle inventory system biggrin.png
   
MatthewMorigeau
MatthewMorigeau
I think you misspelled "tedious"[/quote]

Tedious gameplay only happens when the player is forced to play that part of the game, a metagame is a side game that doesn't need to be played and seems disconnected from the main variables that lead the player to the objective. At first it might seem like a pointless aspect of the game, but clearly every RPG player has had the moment of having to make a choice on inventory items. This could enable players a unique challenge where usually they have no choice but to ditch an item.


I'm all for having items that can contain other items because it makes for natural relationships -- for example, a quiver holds 20 arrows...but I don't really see arbitrary sacks, for the sake of having them, be of much value in and of themselves, except for the anal-retentive gamer...but I'm generally of the mind that the sack, as an item should either just disappear once the contents have been emptied, or at least not play an integral role in inventory management.
[/quote]

The arbitrary sack isn't really all that arbitrary for the gamer that has a use for it like the aforementioned small items that would naturally be "stacked" or sacked together. As games get these huge varieties of harvest items from the map, small sacks like this could be handy to fill and hide, use as bait for monsters, combine elements to make magic powders, more realistically pay for items or at least fill with gold to use as an offhand weapon to hit a rich noble with, draw a face on it and put over a guards head while he's sleeping then wake him up, keep your severed body parts in so you can go to a necromancer to have it re-attached, fill with air and dive deeper under water, fill with water and drop on the kings head, see how many times you can nest until the first bag is full, put a live crab in it and leave it under the grand master's pillow, catch live bunnies and leave them in bags everywhere, fill with black market character enhancing pharmaceuticals and sell, etc. An arbitrary item is only useless if the game's designer makes it useless, otherwise it can become one of the most creative additions to a game.

Honestly, I believe the one true guiding principle in game development should be "If it's not fun, its not part of the game."[/quote]

Speaking of arbitrarywink.png . Fun is a pretty subjective. For example being "sexy", there are historically recorded esthetically pleasing aspects that carry on today being considered sexy that a person can aim for, in the attempt to be "sexy" like being naked. But HIMYM E9 S4 or 73rd overall, clearly recognizes that the naked man only works 2 out of 3 times. Therefore its safe to say that even using historically recognized aspects of what we know to be "fun" are only going to work on a % of the population a % of the time.

And doesn't it sound fun to put bunnies in sacks!?
Iron Chef Carnage
Iron Chef Carnage

I like complicated inventory management if I only have to carry items I need but if I have to haul truckloads of junk back to the item shop just to break even I want the inventory as simple as possible.
This is the key distinction. If my equipment is stored on my person in an awesome way, then my inventory is more like a loadout, so it feels like customizing my mech in Armored Core, and I'll learn all kinds of neat mechanics and rules if it helps me get synergy between my railgun and my exhaust port or whatever. I'll sacrifice a coin pouch for a knife sheath, or I'll take off my helmet in favor of night vision goggles, or whatever I have to do to make my guy as awesome and sexy as I can.

But if I'm in the mining business, hauling gold ore out of the cavern in the form of imp testicles and rusted broadswords, then I need a minecart for an inventory, just a big truck I can dump things in.


Of course, combining the two might be a good idea. I like the idea of different types of bags or equipable holders, so you have a scabbard for your sword, a sling for your rifle, a quiver for your arrows and a billfold for your cash and credit cards. Pockets and bags can hold a set volume and/or weight of random stuff, with associated penalties for access time. If I want to reload my handgun and the only other magazine I have for it is at the bottom of my backpack, its' going to take more than a quick animation to get me back in the fight. I'd be running around shoulder-deep in the pack, swearing and scuttling from cover to cover with my empty pistol clamped under my armpit. That's good gameplay.
Ravyne
Ravyne
If a sack has gameplay value, then fine. But OP only talked about using it as a mechanism for storage and trade. My contention is that as a mechanism for trade, there are better systems, and as a mechanism for storage it sounds pretty boring.

Having to make tradeoffs about what you can and can't carry is a worthwhile game mechanic, but it would be silly to say that you can't carry certain 'loose' items in you big sack, simply because you lack a small sack to place them in. That's just complication for the sake of complication. The only type of character I can see benefitting from arbitrary sacks would be some kind of merchant/trader, but even then the sack itself, as an item, isn't terribly valuable. Just give the ability to create sacks to the classes or designations that need it.
throw table_exception("(? ???)? ? ???");
Orymus3
Orymus3

"If it's not fun, its not part of the game."


I think you're missing on an important point.
Game design is about lasting appeal to fun.
If you designed a fun inventory system that is fun to manipulate for a while, but becomes increasingly frustrating the more you get used to it (because you just want to use its functionality) then you have failed at making a good design even if it was originally fun.
00Kevin
00Kevin


Of course, combining the two might be a good idea. I like the idea of different types of bags or equipable holders, so you have a scabbard for your sword, a sling for your rifle, a quiver for your arrows and a billfold for your cash and credit cards. Pockets and bags can hold a set volume and/or weight of random stuff, with associated penalties for access time. If I want to reload my handgun and the only other magazine I have for it is at the bottom of my backpack, its' going to take more than a quick animation to get me back in the fight. I'd be running around shoulder-deep in the pack, swearing and scuttling from cover to cover with my empty pistol clamped under my armpit. That's good gameplay.


Actually, the inventory system I wrote does have item type and item ID container restrictions. I did plan on having scabbards and quivers.
00Kevin
00Kevin

If a sack has gameplay value, then fine. But OP only talked about using it as a mechanism for storage and trade. My contention is that as a mechanism for trade, there are better systems, and as a mechanism for storage it sounds pretty boring.

Having to make tradeoffs about what you can and can't carry is a worthwhile game mechanic, but it would be silly to say that you can't carry certain 'loose' items in you big sack, simply because you lack a small sack to place them in. That's just complication for the sake of complication. The only type of character I can see benefitting from arbitrary sacks would be some kind of merchant/trader, but even then the sack itself, as an item, isn't terribly valuable. Just give the ability to create sacks to the classes or designations that need it.



When I play Diablo3 I find myself grouping gems and other like items together. Perhaps that's just because I like to play around with my inventory.
Therefore, I think that an inventory system should support container items. I could for example have a large sack that contains a few potions, a book, and a small sack full of gold and gems. Having container objects would allow the player to store items at his character's home. The player wouldn't need to litter the floor with hundreds of items or use a barrel to dump all their potion ingredients in.

Personally, I like items in rpg games and I tend to hoard them. Even in my Skyrim game I have a house with one of each weapon and armor in it. One thing I wanted in Skyrim was a pack mule. If I had that, I would gladly spend the time emptying the dungeon of every trinket (including the dead bodies) I could find.

I really think that success or failure of such a system would largely depend on how much the game automates these tasks for you. If the game can automatically organize our inventory I don't think it would bother those casual gamers who hate inventory management. Perhaps automated inventory management system could be a game option.
00Kevin
00Kevin

And doesn't it sound fun to put bunnies in sacks!?


lol... Can I use this in my game? I think the demo will have a few sacks with bunnies in them. Perhaps it will be an ingredient for fresh rabbit stew.

hmm actually, I could add a decay factor to the items. Food could go bad and and live animals might die if you don't feed them.
MatthewMorigeau
MatthewMorigeau

lol... Can I use this in my game? I think the demo will have a few sacks with bunnies in them. smile.png Perhaps it will be an ingredient for fresh rabbit stew.

hmm actually, I could add a decay factor to the items. Food could go bad and and live animals might die if you don't feed them.[/quote]



you definitely should ;D
Ravyne
Ravyne

When I play Diablo3 I find myself grouping gems and other like items together. Perhaps that's just because I like to play around with my inventory.
Therefore, I think that an inventory system should support container items.


I can't for the life of me understand why anyone would actually enjoy manually organizing an inventory -- Sure, it makes sense to group items nearby, but I do it because it makes me able to use my inventory more effectively, not because it's fun.

If your system uses encomberence to limit what the player can carry, then *everything* should just stack, and item slots should be unlimited. If your system uses space as the limiting factor, then how does a sack help the player, and how do you deal with it in the UI (how much space does a sack consume, if items are in the sack, do you take away slots in the outer container/inventory and how.)

Your inventory *should* support containers, definitely. Its simply my contention that containers for a non-homogenous set of items don't make much sense as a benefit to gameplay. But do as you want, its your game and I hardly care to stop you. All I'm saying is that you're going to expend additional coding effort (sounds like the system is already done, but its going to make your inventory UI and trade system significantly more complex) for what amounts to a meta-game of busy-work that *most* people don't enjoy. I bet there are better things to spend your time on.


I could for example have a large sack that contains a few potions, a book, and a small sack full of gold and gems.
[/quote]
But what good does grouping those arbitrary items do you? Now you have to recall in which sack you placed which book when you want to use it. "Oops, I really need that book I had, but last time I was home I accidentally left the wrong sack and now I'm screwed."

And since you bring up potions, crafting/brewing is probably better handled by a dedicated system that produces a new item, rather than by placing the right things into a sack or bottle, otherwise a player might accidentally craft something they didn't intend to, and it may not make logical sense for them to be able to undo it (for example, you can't reasonably say that the player can separate two liquids or powders.)


Having container objects would allow the player to store items at his character's home. The player wouldn't need to litter the floor with hundreds of items or use a barrel to dump all their potion ingredients in.
[/quote]
So would a treasure chest, or footlocker, or a bank while you're away from home. Again, good luck keeping what's in which sack straight -- do you really want to have to examine every sack to find what you're looking for?


As far as the code is concerned I see no reason for it to not support arbitrary containers, as far as the inventory management code itself there's little burden over supporting typed containers, but as far as gameplay and the code that supports that is concerned, there's a lot more burden, so just be sure the benefit to gameplay is worth its weight.
throw table_exception("(? ???)? ? ???");
MatthewMorigeau
MatthewMorigeau
...Again, good luck keeping what's in which sack straight -- do you really want to have to examine every sack to find what you're looking for?[/quote]

The "sack squishing" idea I mentioned could alleviate this slightly if the sack actually takes the shapes of the items in it. Or you could make use of the DukeNuke drawing on a white bored(not a typo) system actually be useful, by marking sacks with hand drawn symbols and inks to dye the bags colors!

"Look at this black sack with a white stencil of A BIRD ON IT? SO CUTE! and it goes perfect with these MaryJane's I looted off the drag queen earth-troll. SO much better then my drab old tan burlap sacks, I could never find a thing in those stupid bags!"
- Mage of the age
00Kevin
00Kevin
@Ravyne

I don't think it's a situation in which people enjoy micro managing their inventory, but many people do like a sense of realism. They don't like it because it's a pain in the ass to manage, but because the game reminds them of playing a Pen an Paper Rpg. Now in those games some gaming groups would typically demand that you maintained an accurate listing of your inventory and that you detailed exactly how it was stored. The reason was that situations in the game might occur in which the equipment might be come damaged, stolen, dropped, or even destroyed. For example, I recall playing in an RPG in which my character fell down a well. When he landed the potion of explosions in his backpack detonated and incinerated his dead corpse along with most of his equipment. Thankfully, I was smart enough to protect my spell book in a fire proof sack. Now I know that many modern gamers just wouldn't understand that way of playing, but we all had a good time with it.

With that said, I think there is a way to provide the best of both worlds. You can make an inventory system that automatically organizes everything and provides both a listed view (with filters and sorting) and a inventory slot system like diablo. In terms of code, it's simply two UI controls that accesses the same data structure.

I do think that those gamers who like action based games more than the hard core rpg elements need options that support their play style. I wouldn't want to force a particular play-style on anyone. I think that's all I'm trying to achieve. I think that in order for games to progress, especially rpg games, they have to be mindful of several different play-styles. Perhaps the way to make everyone happy is through in game options. I mean, we have options for inverting the Y axis, difficulty level, etc so why not options for inventory management in an rpg game?

My opinion is that RPG games have greatly suffered, not because rpg gamers don't care for rpg elements, but because the developers have no choice but to market their game to the casual action gamer.
Platinum314
Platinum314
A lot of older simulation and Roguelike RPGs supported containers. The system in Ultima Underworld was pretty similar to what you are proposing. I loved organizing my stuff (and then dropping it in my treasure room in the way I wanted).

It can however get tedious if put into the wrong game design though. As mentioned if you are going to be 'mining' tons of items you want it to take a little time as possible.
The sentence below is true.The sentence above is false.And by the way, this sentence only exists when you are reading it.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.