Action RPG/ Diablo Style Inventory

I have been working on a NGUI based action RPG styled inventory.

The system is fully object-based, works on mobile and desktop, and can use existing game objects as items.
Some scripting experience will be required to adapt it to your own game.

Videos and purchase link here

I should also stress that there is little documentation within the initial release.

Looks good man!

Two things that struck me right away that I really like, and that I haven’t noticed in other inventory systems:

  • Inventory items that have non-square sizes (your sword vs. shield in the video)
  • You can drag from the inventory window into the world and it spawns the appropriate item and drops it

So that said, what are the limitations to item sizes? Can you have a single cell item (potion), or on the opposite end something extremely large (large screen tv)? I’m going to assume the size of the icon is dictated by separate X and Y values?

In the video your items have a seemingly large number of stats…are you required to use all of them or can you use as many or as few as you like? Not everyone will be making a Diablo/Torchlight, so how flexible is it to customize?

Is there a way to see this demo online (webplayer)?

Lastly do you have a time frame for asset store availability? I personally don’t have a problem with PayPal but others may want to see it on Unity’s own storefront.

Thank you!

-Steve

Inventories can be attached to any item in the world and items can freely transferred between the player and the object.

The items can scale in any size.
That said, it is best to know an item’s size before making it (the sprite). The item sprites can be re sized, but if you design an item like a sword to take up 1x3 slots, and the image is stretched to 1x5, it looks pixelated.

The stats are mostly for show and are not calculated, but can be set per item. I am working to get this on the Unity Asset Store, but I literally had to submit my last one 10 times before it was accepted. This took about a month last time.

Your own stats can be used, but you will have to modify the strings that are sent to the info window. Additionally, you can design your own custom info window.

There are some things that still need to be done (i.e)stackable items.

How long do you think it would take to have a basic document, say a ‘Quick Start Guide’ so arguably anyone could get your kit up and running? I’ve had assets that were light on the docs and I had a hard time integrating them, and not due to my lack of coding knowledge (I’m pretty competent), but rather how an asset was expected to be set up wasn’t necessarily logical, for lack of a better word.

Also, are you considering adding a ‘paper-doll’ to the system so items of course can be equipped? Overall what features do you see coming up (including the stackables which is great)?

I’m liking what I’m seeing. I’m going to go through the videos tomorrow.

Cheers Spryx

I think I will do a youttube tutorial to start out, and add the doc to go along with it. If I gave a whole evening to it, I could probably get it done

A basic paperdoll sys is in the works, I am trying to find a way to make it flexible. My current idea is to have the paperdoll slots be of a fixed size. (i.e: can handle items of slot size up to x*y) while also adding constraints (can equip one handed, of type shield for example) to each paperdoll ‘section’. In that way, the paperdoll could be customizable according to the needs of the user. One problem is equipping items for custom characters While it is easy enough to make an item “equipped” to the inventory, the problem is attaching the item to the player model. My initial solution would be to have attach points for either the item or the model itself. Of course, you can always see what is equipped and simply show another type of model if you desire.

Currency needs to be handled in a meaningful way. I think I will have it take zero slots and be a ghost item, but still belong to the inventory.

A consume method needs to be created that destroys normal items and simply subtracts a stacked item.

I also wanted flags for items (i.e. cannot drop), for things like ‘cursed’ items, etc.

These are a few ideas so far.

If I may offer a broad concept, I think you could go a long way to differentiate your inventory kit from the others.

Developers are creating games with inventory systems for their games, but not necessarily just like ‘Diablo’ or WoW, or even remotely in that category of game.

So to start:

  • Don’t Specialize - Offer a modular inventory kit that deals in the language of inventory but is general enough and flexible enough to work in any game.

The keyword above is ‘modular’; think of an inventory system in its discrete parts and the bare necessities. Lego, or even more appropriate, Playmaker comes to mind when thinking of creating a flexible system that allows users to just create an ‘inventory system’ for their game, custom designed and arranged however they need it. Good thing though that most tile-based inventory systems share a lot of the same qualities, so we’re already ahead of the game!

So the discrete modules (scripts) would ideally be:

  • Container - This is straight forward. A no frills, no art, no genre container has a volume and cells ​(the frills, art and genre are added later by the developer). You seem to have this done nicely already. You can have non-uniform objects of any size up to the maximum size of the whole of the container. Expose the variables for container size and cell count (column/row) so the player can adjust them at run-time, such as if say the player gained greater strength, the container volume would increase allowing him to carry more things.
  • Items - Again you have this already started so now lets consider that not everyone will need or want every kind of stat (or ANY stats?) that might be available in some genres. You’ll obviously want core stats that relate to the container, such as the number of cells the item takes up in inventory and it’s icon, but beyond that, sometimes a sword is just a sword and has a sharper edge, and thats it! Allow for items to have as many or as few ‘designer’ attributes as the developer needs/wants. It may be no more complex than having ‘Elements’ as per Unity’s own language, where you can set as many or as few as you need (Size). This way if you want to not only keep track of the size of the item in inventory, but also it’s weight, throw in the weight element. Cursed? Add that and make it undroppable. If you do want to have a Sword that does +2 DMG against Robots, throw in the DMG modifier element and have a sub-category for vs. EnemyType. This is also an opportunity to assign what object will be attached to sockets on the character, such as our Sword prefab to the characters hand, when equipped (see below). Either way this should allow for a broad enough system to create any kind of item of any level of complexity and still work with the container.
  • Equiped Container - Now I did say ‘paperdoll’ in my post above, and I’m glad you caught on that that wouldn’t be flexible enough if you had a non-humanoid character. What if we remove the concept of ‘character’ completely, and simply had ‘Equiped Containers’ whose sole function is to hold a single, appropriate item and then execute or alter available effects and triggers. A container designated as ‘Hand’ would accept a weapon(sword?), and then because the sword Item(see above) has the attackType element, would change the players attack type to ‘melee’ so the developer would know to then play the appropriate animations. As a designer you could then just add and arrange as many or as few of these containers to your UI as you need for your character, be it a human with slots for every body part, to a robot with slots just for a couple of weapons or a blob with a single slot on top to wear hats. This way there is no need to have a one size fits all paperdoll and instead the developer can create his own ‘doll’.

Now with just these three concepts, a developer could create whatever UI art he chooses for his container, create however many items he likes with as many or as few attributes as is needed for his game and equip the items to a character of any size and shape or appendages. You already have all the fundamental dragging and dropping, and you’re adding stackables, so you have a pretty core system that will fit with any game type, be it an MMO, Diablo, SystemShock2, Stalker, Ultima or Fallout (the originals).

Now you mentioned attaching objects to the character when an Item is equipped. Either you could do the legwork yourself in this system (which would make this even more robust) or you could let the developer figure it out, by simply having him access the variable for the ‘Socket GameObject’ we assigned above to the ‘Item’ and then parent/translate/orient the GO as he sees fit. But…

…if you create this tool element yourself:

  • Socket - A fourth script dropped onto a GameObject that will then work in concert with the Equipped Container script. When creating the Item, you would have a specific variable to assign this GameObject to that would tell the item how to attach itself to it. The socket probably need not be any more complex than this, what with the item script holding all the important information. You would have a preview option so the developer could see how the item would sit in the socket and allow for adjustments to position/orientation and so on.

All this said, what I sincerely feel this accomplishes is allowing an inventory system to fit into any game type. From what I’ve seen of other inventory systems on the asset store, they try too hard to be a specific game, and seem difficult to cherry pick what you want and remove what you don’t; not everyone wants to make a jRPG.

The Lego/Playmaker paradigm affords the greatest flexibility for any game type. Later you can add modules that add say Shops, which are containers that have items that can’t be accessed (manipulated/moved/taken) without enough currency. After that maybe the Tabs module, that allow for containers to have multiple pages for larger inventories or maybe for simple sorting (i.e. All > Weapons > Armor > Consumables).

If you’ve read this far thank you, haha. I know it was a bit much, and more than I expected to type but I became heavily motivated as I’ve always yearned for a drag and drop system like this. :smile:

Cheers Spyrx

-Steve

I just wanted to throw a bit more encouragement your way…

…I did a once over again of the available systems on the AssetStore:

While a few looked nice, most had poor presentations, demos that were outdated or didn’t work. You’re not selling art of course but when it’s wrapped in a nice package its more enticing, simple fact of marketing. I think your video 7 shows you’ve added some polish again even though that is not the intent of the system…

Many lacked any means to contact the developer and/or lacked any forum presence either separately or here on the Unity site. I’m only guessing here but the fact that you started a thread is a good sign…

None of them had varied item sizes, let alone non-uniform sizing; your system is the only one and you know how ‘yay’ I am about that! :smile:

I think only one had drag-to-world to drop items like yours does…

To be fair the other systems spent a lot of time adding features, but I can’t speak to how flexible they are, especially the all too important item creation. I don’t want to be left with only the attributes the developer felt was necessary and want to be able to create my own custom item attributes.

Well keep on rocking man

-Steve

Hey, thanks for the words of encouragement.

I agree completely on the art thing, I actually did not want to release the system as is, but wanted to make the inventories look better. I have been working on this since July, so at some point I decided to get it out the door. Engineering school takes up a lot of time, so I have had to work on bits at a time. I also forgot to mention that sockets are on the list to add. I regret that I have not had the chance to try playmaker, I kind of steered myself away from it to force myself to learn the language. I am somewhat new to C# and Unity (started in July)…my background is in C++. You are actually the first person in the Unity community to offer helpful advice, I have not had a good experience with the forums otherwise. It seems there are quite a few people around here with a god complex.

I will try to get a copy of the webplayer demo to you. Check your PM.

You’re welcome, and you know don’t sweat the people that can sour an experience. Don’t react to the negativity, smile and do what you enjoy. That will draw more quality people than spending energy arguing with the few rotten apples.

That said, after playing with the demo several things stood out:

  • I really like that as you drag the item in inventory you have not only icon for the item, but the ‘drop shadow’ for it’s position on the grid. Details +1…
  • …speaking of adding the little things that really showcase attention to detail, I would like to see the item drop from the position of the cursor rather than directly in front and below the camera. Psychologically the expectation is that you’re ‘holding’ the item, so letting the item go from say a position to the right of the inventory window, or even all the way on the right side of the screen, one would imagine the object would appear and fall there. It feels discordant when you drag to a spot on the screen and the item only appears in front of you.
  • If you want to be truly clever, you could have the item be it’s 2D icon only when over the container window, but then become the 3D version of the object when over the ‘game world’, truly reinforcing you’re holding a physical object. Then when you let go , it falls right from where you were holding it. Take this EVEN further (and this really isn’t necessary at all but sounds fun), you could add a tiny bit of inertia so if the user drags the mouse and simultaneously lets go of the right button, add a bit of force to the object like it was being tossed (subtract last screen pos from current screen pos).
  • Love the that the sound effects are unique to each object category (e.g. wooden ‘clunk’ when dropping the wooden shield) Details +2…
  • The tiny bits of narrative are a great touch. This has nothing to do with your system really but I like the creativity for what will amount to being a demo for your asset. Again like I said in my last post, these are the things that make your asset more attractive.

I wanted to be clearer about how I’d regard the Item module that I outlined above. I made it sound like the the inventory “item” was a disparate component from the physical object or prefab in the game world. Fact is (and I suspect this is how you already created it) but I imagined you would have your sword prefab lets say, and then you’d assign the Item script to it and voila, it would be a legal inventory item. Therein you would assign its stats and its 2D representation in the container, and of course when you drag it from the container into the game world, it would revert back to it’s 3D prefab self. If you already know all this then just ignore it, otherwise I wanted to correct my stream of consciousness I had going on up above, hehe. :smile:

Thanks for letting me get my hands on the actual demo man. Looking forward to seeing this developed out!

Cheers

-Steve