Search Unity

New/Old Inventory System

Discussion in 'Works In Progress - Archive' started by Tiki, Jun 17, 2014.

  1. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    __________________________________________________________
    ________________________________________________________________
    ______________________________________________________________________

    Inventorium
    Tiki Hub Games

    Inventorium is a new asset coming to the Unity Asset Store which allows developers to quickly and easily create complex inventory systems without any coding knowledge needed. Modeled after old-school multi-slot item and container systems from games like Diablo and Path of Exile. Inventorium offers an inventory management system that will allow you to set the slots, images, sizes, models and style of your inventory system in moments.

    InventoriumPreview.png

    Using the 4.6 UI features and script-generated Prefabs, you can populate your world by script or by hand with prefabs controlled through a simple Editor Window interface. Save your changes, and all the prefabs instantiated are automatically updated.

    Check out the live WebPlayer, and keep checking back as the asset nears completion, we update with every step!

    http://tikihubgames.com/assets/Inventorium/Players.html

    Press E to pick up and put down objects physically. Click to move items through inventory management. R to rotate. I (i) for inventory list. Cylinders are three different items I set up, a sword, an axe, and an apple. The blocks are containers, there are two, the double up arrow is a large "backpack", the other is a small "satchel".
    __________________________________________________________
    ________________________________________________________________
    _______________________________________________________________________

    Original Post

    Under a request and I wanted to share it with more people to gather ideas. I don't expect finishing it for a release will take a month, but I do expect it will be updated long after. Please let me know if this thread does not meet forum requirements.

    The idea of Inventorium is originally to set up a system similar to the old fallout games, Day-Z, Stalker and many other RPGs. You have an inventory with slots, it can carry so much weight, each item takes up so many slots in such a pattern, and you can rotate everything as needed to fit it in the container.

    The idea behind this for me, would be to create an inventory system that allows you to set up any number of inventories with this behavior, each with their own sizes, attributes and uses. Personal storage, containers in the world, anything you'd like. This isn't that difficult a thing to achieve, but it doesn't seem to be done completely, or much at all in the asset store, and is something I think many people could make use of, including myself. I'm looking for and open to all suggestions and want to improve this asset to be something that is built on all our ideas, and accommodates as many uses as possible.

    Below is a screenshot of the current setup, which after some trouble with saving assets, is already set up and working properly.





    The next step is to code the inventory behavior with these variables and perhaps set up something a little prettier than just a grid to separate the slots. *I'd really like suggestions here, I'm not entirely sure how other people would like to approach this from a user-end. Personally I was thinking about letting you enter another image for a square "slot" texture to match the "background" which would tile together, instead of the grid. Which I suppose I can leave optional for those who might like it?
     

    Attached Files:

    Last edited: Jun 8, 2015
    Ghosthowl likes this.
  2. fredr92

    fredr92

    Joined:
    Jul 8, 2013
    Posts:
    292
    I like the idea off having a Inventory system similar from games like Dayz, depending on backpack size, With maybe a possibility too Craft in the Inventory too.

    I think most Inventory systems on the asset store is made for games similar to for example world of warcraft games.
    I will follow this tread and see where it goes :)
     
  3. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    228
    Interesting. Wish you would have done this months ago. I scoured the asset store for a good inventory system and they all fell very, very, VERY short of anything good. And a lot of them were abandoned. When I did find one I thought could work for me, there was always an issue, with either a missing feature or the price out weighing the amount of coding I would have to do to add said feature to something that was already lacking. One thing I might mention is you might want to hold off on doing this or at least concentrate your efforts in other places. The reason I mention this is that the new Unity GUI is coming forth and anything having to deal with an inventory system using the old GUI will be pretty much thrown away. I don't know how the new one will work or if it will be very similar the one that is in place now but I do know that the current Unity GUI just doesn't cut it when it comes to inventories. It is far to limited. I made my own inventory system only to realize after a few days of work there were huge limitations (such as having a draggable window that doesn't use buttons as slots, draw order issues when having multiple inventories on the screen, dealing with the cumbersome nature of the OnGUI method, etc).

    In the end I was able to build a very complex networked multiplayer inventory system off the basis of a professor I met's abandoned work that runs off of DF-GUI, which works beautifully and does exactly what yours will do. However, DF-GUI just announced that their new 2.0 version will be a complete re-write of the code and soon my inventory system will be outdated until I choose to rewrite it for the new DF-GUI 2.0 version or if Unity's new GUI is good switch over to that.

    Having a good editor window for each piece of the inventory will be crucial for the end user. As well as a good item database and perhaps equipment manager. I think your biggest selling point will be the Tetris like inventory feature. No one has done that yet and made it available. Two things I did with mine that saved tons of development time for my team was 1. added a system to parse through an item list xml file (which has a value to link to icon names that would be read from a folder they would give me) and 2. having the ability for persistence / serialization and saving (I did this with JSON, seems you are doing it with .asset files)

    Looking forward to this, you may save me a lot of work in the future.
     
  4. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    I am kind of curious, what do you think would be a fair price for it Ghosthowl? I anticipate this will have a bit more functionality than you need, rather than missing something.

    I don't mind having to re-write this when the GUI updates, I'm going to have to re-learn it anyway. So far this is becoming a tight piece of coding and I've been keeping meticulous notes on the step by step of how I go about programming it, shouldn't be hard to reiterate.

    Hi Fred,

    The width and height shown in the windows actually sets up the size of your item, and you can add whatever objects you'd like. So you can add a backpack, and make it anywhere from a 1x1 to a 10x10 grid. That can be expanded, but 10 seemed like a good limit to start.
     
  5. fredr92

    fredr92

    Joined:
    Jul 8, 2013
    Posts:
    292
    I have some suggestions that i think will be good

    - right click on a item in the Inventory , and can choose too drop item or equip.

    - 1 normal Inventory that is default when player is starting.

    - Different Objects you can pick up that increases the size off the Inventory, this can be small backpack or a big backpack.

    -Not sure if its possible but if it is, being able too drop a player model in a slot, and it will be shown in a window in the Inventory, and when a Object is equiped it will be activated on the player model in the window, and off course in the actually "Real game world" .
     
  6. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    It's actually set up so that you can make any number of inventory items. The final result will be some kind of output for each bag type (probably a gameobject) that you can generate from its instance. So you could choose one that is default, generate it, and attach it to the player by default, and they'll always start with that bag type. I will add a little option that allows you designate a "main" inventory piece for the player as many games use some similar structure. Each bag type should have its own model, image, size and other variables. So you could drop the small backpack you start with by default, and pick up a new backpack that's bigger, and switch that to main. It's a little more work on the user-end, but for a lot more freedom I think.

    We actually were discussing that in the request thread, the idea of having a player model to represent the items. Likely the initial version will do something like this, but I'd like to expand it to do something like take in a number of models, or even modify the model it's given, to make sure that it represents the player accurately, and more importantly - fits all items correctly.

    I like the idea of doing this kind of like Morrowind PC, where you drag it to the character and it automatically assigns it to the available slot, and removes whatever is in the way, rather than a specific slot for each item, thoughts? Maybe a little toggle for both ways at some point?

    I just spent a couple hours training someone else, I'm working on the runtime code right now.
     
  7. Hrothvitnir

    Hrothvitnir

    Joined:
    Apr 26, 2013
    Posts:
    109
    My design definitely need grid slots for equipment. Dragging and dropping onto a 3d model probably wouldn't work.

    I was wondering how you would do it, but this is almost exactly what I expected. Could equipment slots be generated in the same manner? Having them as objects I can drop a script on would be great (ie if player inputs F1, equip the weapon in this slot, etc).

    Good to hear, I'm definitely looking forward to the new gui.

    I'm willing to pay $150+ since I did start this as a request, but I'm not sure how much volume you'd get at that price. Most of the other inventory systems are $10-$30. Given that your system will have lots of functionality and extensibility the others lack, I definitely think you can ask much more ( Especially if you have demos, beta versions, tutorials etc. and compatibility/integration with other popular assets ).... but maybe $45-$75 would be a good compromise. I guess the real question is how much interest you can generate. Right now you've got only a few people commenting, logically if we're the only buyers a higher price would be more fair.
     
  8. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    Hi Hrothvitnir,

    I'll make sure to implement both approaches to assign items to the player. I was thinking today about how to approach that, but I'm still not completely sure, as I need to work out a bit more of the program yet. Right now I'm envisioning a tool that lets you set a position and rotation, then save that coordinate set to allow for setting up your own slot positions in the game world, then also the boolean switch between a morrowind style equipping method, or a stalker style equipping method. I'll be sure to post plenty of pictures and probably some video at that point to make sure we're getting everything you and others will need integrated.

    I did actually manage to implement the GameObject generation in completion today. Update on that incoming as well.

    I think $150 is a little out of sorts for an inventory system. I think UFE is $225 full price, and it's basically a whole game engine in one. Until things get further along and we can see the asset more clearly, I'm thinking around $70? I'd prefer it to be accessible, but at the same time, this is heavily going towards getting my own game company on its feet.
     
  9. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    So I added a couple of things. One would be the "Player Object Name:" field, which can be used to identify the player parent object automatically.

    The bigger part would be the generate button. You can insert a mesh and material to represent your bag type. When you begin creating items, it will create a gameobject called "Bag Types" which each bag type will latch a set of variables for rendering the interface and doing the math. Delete it, and it's the same as clicking Reset.

    upload_2014-6-17_23-12-21.png

    You can then add any number of GameObjects to the world, with as many repetitions as you'd like. 500 Chests, 15 backpacks of varying sizes, etc. Each entity generated has it's own set of variables, which can be changed independently once generated into the world. The window interface acts as a shortcut method to setting up these objects essentially. The script it attaches with these variables will then take care of colliding or being picked up by the player, and allowing the player inventory access. Deleting these GameObjects is not a problem, and will clean up automatically.

    upload_2014-6-17_23-11-55.png

    Let me know what you think or what I might have missed :)
     
  10. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    You'd have another sure customer here if you make your inventory mobile touch friendly. I don't think multi-touch would be needed for an inventory system where you are dragging things around, but maybe a press-and-hold to emulate a right click? Just throwing out ideas.

    Also, I just bought the BuildR Procedural Building Generator asset on sale today and am looking very closely at your Cityscaper asset... what are the chances of any integration between the two products? Thank you!
     
  11. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    CityScaper is designed to intake three sizes of models, 2x3, 3x3 and 6x3, they are scaled alongside the city with a slider afterwards. You can do anything you want within those sizes, and I see the BuildR Generator as being a perfect complement, as you can create your buildings within a specific size, or scale them down afterwards if needed. Any building model format accepted by Unity will work, as well as any materials, substances and there's an option for a single texture with no shaders if you're working on a very low-render mobile game. The only problem with CityScaper at this moment is it's high draw calls, which Unity batches about half of automatically, plus camera culling. You can integrate an atlas generator yourself if you know how, but I'm also working on integrating one (though I have several projects going, that could be some time). At this point in time, it's perfect if you want to render a city in the background. It can still be used for interactive cities, but it'll take more creative work than it should in the future.

    I'm pretty sure I could set up a touch-friendly version of the Inventory System when I'm done with it. Sounds like a good idea actually.

    On that note, I've just finished over the last few days a personal tool for what I call "Procedural Storytelling". I won't be releasing it on the asset store, as it's something I think is very new, and I'm working on a text-based game with, I'll put up more information on that when it gets closer. I'm hoping to crowdsource, using it as a free example. That should be very soon that I post a WIP thread on it and put up a website.

    As a result, I haven't done much on the inventory system since my last update. I finished working out any bugs I'd had in what's shown above, so the current content is perfectly stable and ready to go. I have two things left to do for that:
    1. One more tool which allows you to specifically save a position for your container to equip. So you can put that backpack on their back, and that trick sleeve on their wrist.
    2. The in-game interface for system and the controls with tool to set up controls in and out of game.

    I had recruited a new programmer some time ago, and have been waiting for him to finish up an intense summer class. He's been doing pretty well learning Unity, and we've talked about the possibility of him picking this up, so it could be going again soon.
     
  12. Hrothvitnir

    Hrothvitnir

    Joined:
    Apr 26, 2013
    Posts:
    109
    That kind of seems like something best left to the individual end user (designer), doesn't it? In my case I just need the inventory system(either a slot or an item placeholder) to pass an int to a script on the character via getcomponent, or call a function via sendmessage(function, int). I've already set up the scripts to take care of hiding/unhinding items being worn by a character, and putting them into the hands when in use (gameobject.setactive = true/false). Pretty simple stuff. In the case of the backpack or other container item, why not just have them be similar objects that the end user just attaches your inventory script to and then places as they see fit?

    I'd rather see a first version get finished up and on the store rather than add too many additional features. That can always come later if you want. I've seen too many projects fizzle as people run of time.
     
  13. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    That's probably a fair argument. I think it's a feature other people would be able to take advantage of, eliminating that last bit of scripting the end-user would have to do. You're right though, it's probably better I release it a little more bare to see what people require.

    I've finished my story tool, it has some kinks I'm trying to work out, kinks I anticipate in the inventory system as well, so when I figure out why my container classes are only storing into my scriptableobject .asset temporarily, I'll jump back on the inventory system and pump that out. It's so close without that other tool, I can release it in a week or so, I think.
     
  14. Hrothvitnir

    Hrothvitnir

    Joined:
    Apr 26, 2013
    Posts:
    109
    Good to hear. I'm actually, unexpectedly, at a point where integrating an inventory system would make a lot of sense, so if you do release it in a few weeks I should be able to give some immediate feed back. No rush though - I've got bugs of my own to chase down.

    Also, thanks for keeping us posted with updates.
     
  15. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    Well, it's been some time, and I apologize, but I've completed my story engine and have a few people working on some content for it, I have my plate clear once again. I will be on and off working on CityScaper as well, as I've got a new customer giving great feedback on it. I will also be working most of my time on this inventory system. It's already a good chunk through, and I've got a couple of weeks to pump it out with. I've learned quite a bit in developing my story engine, so this shouldn't take nearly that much time, and for the most part, all that's really left is to draw the GUI itself. I'll post as soon as that is done, and we'll talk about a clarified list of features that should be included.
     
    John-G likes this.
  16. Aidenjl

    Aidenjl

    Joined:
    Jan 5, 2014
    Posts:
    81
    Wow, this is just what I have been looking for! I will definately be buying this asset.
     
  17. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    228
    Sorry Tiki, I never was notified of this thread but I am willing to pay 100-150$ depending on features. If it does everything you say it will and you are adding on to it, it will easily dwarf other assets on the market that are more than half that. You might be interested in maybe selling it as a core then add ones to go with it. So core has like a price of 50 maybe? And addons are 10-25 a piece? Would be very interesting and accomodating to folks who don't need the whole shabang.

    I am actually in the process of switching our entire project off of DFGUI and to coherent. So I will be revisiting and re-doing the inventory system then. If this was available, I can hold off on doing that and keep the current system in place (which works and works well, just want to rid myself of other GUIs)

    I would recommend you write it to be as agnostic as possible for GUI. Have the core do all the heavily lifting of inventory management, items etc. But put in methods to do these things from code, so we can hook our own displaying of items, slots, etc ourselves. This would be ABSOLUTELY perfect for us.

    Also I would be willing to pay more for the more custom features and the like that not everyone needs :)
     
  18. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    So a small update, a little bit about it in the blog too: I've patched up some all of the holes I'd left when moving on to the story engine, and implemented player "pickup" functionality. In the end, you'll be able to choose between simply searching out the 'Player' "Tag" or entering the name of your Player GameObject's "Name". Any containers generated with this tool will be recognized and able to be picked up by that object's cursor and a button of your choice (E, Mouse1, F, Etc). Please excuse the crude stand-in models, but here's an example of how that works in the background in a visual explanation:
    invpickup.jpg
    There are two Containers generated from the tool shown here. One is selected. You'll see "Inventory CTR" on the top of the hierarchy. This "Container" script is attached on generation and holds a string path to an asset generated when you first create the bag type. The asset contains all the information necessary to draw a GUI when you open the inventory item up. The mesh and material are applied to a mesh filter, renderer and collider on the gameobject which the player can then pick up.

    invpickup2.jpg

    This shows one object picked up, and added to the player object. You can access the file at the type path to find any necessary information for your own coding, and the mesh and material are located on a top level as they're more likely to be used frequently from a developer standpoint (IE, position the backpack on the player, or recognize what it is quickly by the mesh). This will look significantly different once I implement begin item management, but work exactly the same.

    This will develop eventually to allow input of the player's "heads", "bodies, "legs", "arms", etc, count. So if your character has four arms and two legs, and you assign trick sleeve to work with arms and legs, then you can equip four on your arms, and two on your legs.

    Next is to begin developing the basic in-game UI (display only). I'll post some screens when that's done. When I feel like we have a decent style and there's no errors, all the rest of these steps will make the last step of writing up the UI slotting and rotation *logic* a piece of cake.
     
    John-G likes this.
  19. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    I have a question for the developer side of things. What is everyone's thoughts on controls for opening up the containers?

    As there are multiple containers possible, I can easily give you the option to open each one with a key you select with the tool, but that seems like overkill for the player. I could also set up a master list that pops up when you press something like "I" for inventory, which contains a selectable list of the containers on the player. Select one and it goes away, the container pops up. The idea I'm most fond of is an interface with a body diagram on one side, and the slots on the other, and you could select both the bags (which would change what's in the slots, etc.) on your character, and swap items out as well (sword, dagger, clothes, etc - this wouldn't count as being in a container). I'm not sure how intrusive that would be into the systems you'd like to implement yourself though. Finally I thought maybe you'd have ideas of your own on how you'd like to be able to control how the player opens up each inventory container.
     
  20. Hrothvitnir

    Hrothvitnir

    Joined:
    Apr 26, 2013
    Posts:
    109
    My intention was to have one 'inventory button,' probably "B" (for bags), that shows the contents of all bags at once, as well as the "new" or "trash" area. For me speed and ease of navigation is first priority.
     
  21. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    I like the idea of a character display showing the different inventorys placed on the character, make the character rotatable to see inventorys on back.
    Clicking an inventory on the character opens it in new window, maybe design it so up to 2 inventorys can be opened on screen together, this will allow organising items between inventorys.

    Also a nice option would be to include item stacking of same items to allow more item types in an inventory - this with a weight based system would restrict over stacking of items.

    One last susgestion would be combinations of items into one item, simple example drag a scope on to a rifle to combine them. Now scope no longer needs to take up slot space, and rifle weight is increased by scope weight.
    Opposite happens if scope is removed from rifle and placed back into inventory.
     
  22. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    So I'll write in both ideas then. Setting up an "all at once" version is simple, so I'll do that at the end. For now I'll tackle setting up the character display. I'll leave controls in first column of the tool for these kinds of global choices.

    I've got a couple basic images to give you, had some (honestly pretty silly) debugging errors yesterday. That's all straightened out. Here's my developer purpose master list, as well as the associated texture being pulled up. Next is to render slots over the image, then tidy up the visuals and make some real assets to example it with. Once this is all prettified, all that's really left is to do the slotting and rotation logic :).

    invdisplay.jpg invdisplay2.jpg I've also gone ahead and made the texture draggable now, seeing as the rest of the imagery will be based off of it's location, it should all drag together.
    invdisplay3.jpg
    That's it for now. Subtle but significant progress.. it's nearing completion now. Soon it will just be polish, then I'll release it and work on some worth updates as well as new asset expansions.
     
  23. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I just assigned a programmer to work on a system like this but would love to have the work done for us. :) I will be looking forward to the release! Thanks.
     
  24. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    I have one more question to ask before I feel I can complete it. How would you like to be able to integrate items as a developer? Do you want to have to set everything you can pick up with a tag like "Item"? I figure you need to be able to input the item's pattern as well, maybe another small tool is the best solution?
     
  25. Hrothvitnir

    Hrothvitnir

    Joined:
    Apr 26, 2013
    Posts:
    109
    If I'm understanding you right (very tired atm sorry)... what about an array of gameobjects we can drop prefabs into? Prefabs could have an item script with variables like width and height (grid units), weight (in game), and some booleans for what item slots it can be placed into (IE, can you fit this in your pocket, true or false?) .

    Item pickup action could then send an integer to your inventory manager corresponding to a prefab in the array.

    edit: also of course a material to be displayed in the grid.
     
    John-G likes this.
  26. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    Sounds like a better alternative to setting up a second tool. Much more intuitive. I'll attach a few sample prefabs to the project to show how the item script has to be set up (What variables are necessary and what they need to be named).
     
  27. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    It's been a busy week for me again, starting a new job and trying to coordinate one last meeting with my team (which I fear I failed at) before one of our members leaves the area for a new school (full sail, good for her!).

    I've actually finished a couple of things a few days ago, but was hoping to integrate some items before previewing those bits. However, I want to keep you updated, so rather than wait any longer, here's the slots at work:
    slotEditor.jpg

    slotUI.jpg

    The image is stretched to fill the size of the slots. Slot size will be adjustable, what's shown here is a 50x50 slot size. Slot Images will also be customizable per container. Displaying Null Slot images will be optional.

    After some time spent messing with prefabs, I'm going to work on a secondary tool that allows you to compile prefabs for your inventory items. There is quite a lot of room for input here still. What I currently expect the editor to allow you to input is :

    1. The input item (model, another prefab, asset?)

    2. The Minimum Container Size required for it to fit, regardless of slot set-up.

    3. Another Null Slot Editor which allows you to set it's pattern/shape.

    4. An option to choose which slot your mouse centers on when dragging it (defaulting approx. center)

    5. A set of inputs to determine it's visual (a model to use and an angle to see it from, or an image that represents your item).

    If you can think of things to add to this list, I'm very open. If you have suggestions on what you'd like to enter for #1, what would you prefer to input for your item in order to generate a prefab?
     
  28. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    As an added note, in order to implement the item functionality with prefabs, I've gone ahead and set up the containers to work the same way. Clicking Generate will now add a prefab to your resources instead of generating a gameobject into the scene at the origin. This allows you to drag and drop containers into the scene, instead of clumsily moving them from the origin and having to access the tool in order to create a new object even though you're satisfied with the settings.
     
  29. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    A little more progress. I got the Item Compiler tool finished, it takes in a gameobject and adds a container script, then outputs the result as a prefab without modifying the original object. You can choose between three different types of slots, empty, null, and center. Empty slots are simply slots to be filled, null slots are gaps which can allow you to set up shapes for items like hammers, and you can assign one center slot, marked by "O" right now. This slot is where your pointer centers when dragging the item image.

    itemtool.jpg

    You first enter a gameObject or prefab, it then switches the interface to allow you to set-up or make changes. I decided that since most developers will be organizing their items by their own means, this tool is only meant to plug in values and generate the prefab, it does not store a list of all your items. Perhaps future implementation or an extra download will allow that functionality, but I don't want the program to impose here by default.
     
    Last edited: Aug 11, 2014
    John-G likes this.
  30. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    I don't have any images today, but I have completed the pick up and drop system for items. When picking them up, they appear as a texture dragging with your mouse, when pressing the assigned button, they also drop at your mouse location, similar to the Morrowind functionality. Picking up an object freezes all other inventory functions until you've placed or dropped the item. I will make sure to set up a variable to decide on how far you can "reach". I'm going to do a little work on the rotation functionality next, since the placement should be based off the array I've built, which will be modified when rotating, it will be faster to debug this way. With luck, the program will be done tonight, and I'll just be polishing it over the weekend. If that happens, I might be able to submit it Sunday for review over the week.
     
    John-G likes this.
  31. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Nice, once polished can you make a video of it in action :)
     
  32. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    You'll probably get video before and after polish. I'm excited to see what you guys think once you see it being used :). I'll post some pics when I get it rotating, then video after I'm done with the fitting logic. That part will use a similar neighboring system as I built for CityScaper. The more I pan out the concept for this last bit, the easier it looks.
     
  33. Hrothvitnir

    Hrothvitnir

    Joined:
    Apr 26, 2013
    Posts:
    109
    Yeah, a video would definitely help me better understand where this is going.
    The only suggestion that comes to mind immediately, you said the "slot size" is "50x50" I assume you mean that's the pixel dimensions of each grid unit, right? Could we make that an exposed variable somehow (one global parameter for the whole system)? Some people might want 32x32, others 64x64 etc.
     
  34. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    Absolutely, the system is based off of that number and adjusts accordingly, as a result, I do caution to remember your dimension when creating the image, as the image will stretch to fit the slots. I am going to be restricting slots to squared dimensions, so you'll only be entering one number. I.E. 32 for 32x32.

    You'll also be able to change the slot image per container if you'd like (one of the final polishes), as well as globally.

    If there's anything else I've missed that you'd like access to, just let me know.

    I didn't get anything else done on the project yesterday, but I ended up with an unexpected day off today, so I'll be able to pump out another image set for rotation soon and I think even a video by the end of the night of the first unpolished version.
     
  35. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    newSlot = (curSlot - (width * curRow)) + ((height - 1) * (curSlot - (width * curRow))) - curRow

    This algorithm seems to work for shifting the indexes of the slot arr to represent a 90 degree clockwise rotation. Should make the rotation a breeze to implement from here, will get back with pictures soon :)

    Edit: - curRow, not +
     
    Last edited: Aug 13, 2014
    John-G likes this.
  36. Hrothvitnir

    Hrothvitnir

    Joined:
    Apr 26, 2013
    Posts:
    109
    Yeah that's pretty much what I assumed.

    I'm not sure what the use of slot images would be. I think from earlier images you posted, the container has a background image, right? I had imagined just putting a grid into that background image, and then item images would cover and hide the grid as things get put into the bag. I guess the tough part there would be getting the background image grid and the actual grid slots aligned, but even just trial and error tweaking in photoshop wouldn't take too long.
     
  37. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    This should just save you that extra step in Photoshop honestly Hroth, since it automatically aligns. It also will allow you to remove the slot images when you fill them with an item, which I think will make for a more interesting visual effect.

    The rotation appears to be working, with exception of widths or heights of 1. I'm working on a fix then I'll post that screen I keep promising.
     
  38. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    Well it took a bit longer to implement this than I expected, mostly because Unity doesn't offer direct approaches to rotating GUI Images and I had not been aware, a curious fact.

    Rotation is working however, and the last bit is the fitting logic. I've got more time tomorrow to finish that off, I'm confident I can polish this engine off by the time the weekend ends, so I can send it in for review over next week, assuming you're all happy with the videos I present in a day or two :)
    rotex.jpg

    It also centers the rotation and the mouse around the slot marked "o".

    Edit: A quick update without bumping - I've got a piece of code localized to recognize when the cursor is holding an item and in an empty slot. I've also written up four very simple algorithms for crawling the slot indexes. Between the two, all that's left is to set up a piece of code where I've localized the cursor that crawls the container slots based on the item slots and rotation to check for fails. Then make the center of your "centerslot" snap to the center of the slot your cursor is in.. Then of course save an inventory array that holds the items in the container parallel the slot it's center... centers on. :p Will get back to you soon with a post when it works, and then work on a video after that... so much to do, yet so close!

    Edit 2: I've got it looping through the item slots, and determining distance to the center slot. I still need to recognize the related slot in the container, but I've already determined the row/column, I just need to turn that into it's slot number, then the logic is done and it's all aesthetic stuff before I can send a video. I'm taking a break for an hour or two, but I'll definitely put up a video by midnight EST time.
     
    Last edited: Aug 14, 2014
  39. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    Well, I can guarantee a video by the end of tonight, but I can't guarantee it's quality, I haven't done much video editing since high school. On the bright side, the fitting logic is working and I set up the rotation to modify slots as it's rotated, so it's a rather efficient little beast. Can't wait to show you where it's at. I think I want to spend a week polishing it, and upload it for review next Sunday. There are a number of small features I want to add, and I anticipate some debugging yet, though everything is working flawlessly so far... Let me know if you want it earlier than that and I can put something up for review this week instead... but a little more raw.

    Next Post is Video! Hoorah!

    Edit/Update: Sitting down to make the video now.

    Update 2: Video compiling, will upload asap.
     
    Last edited: Aug 17, 2014
    John-G likes this.
  40. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    I have video! Hoorah! I avoided narrating it in favor of some basic text, my microphone has worse quality than the live video at the end.



    I'm working on the "storage" system right now, where it stores the items after you click, and not just snap to show you it fits, that's the last big piece realistically, but it's really just the first part of polishing it to me. The master list is temporary, it will be a two prong option, you will be able to bring up a little window to select from the containers on you, or pull them all up at once.
     
    Last edited: Aug 17, 2014
  41. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    Bump, looking for feedback now from more than the original group.
     
  42. Hrothvitnir

    Hrothvitnir

    Joined:
    Apr 26, 2013
    Posts:
    109
    Okay, the item compiler image was confusing me at first, but I think I get it now. I didn't think to have "item transparency" - ie, if there is a hammer, conserve the space around the handle vs the width of the head. For my project I may not be able to use that (depending on how you make equipment slots work; some slots would have to only allow one item for example, in addition to excluding based on grid size. For example if you put a hammer into a slot for current right hand weapon, the empty space could maybe fit a small knife, but that would cause problems and need to be rejected) but I can see advantages to it.

    Good work so far.

    One little unrelated nitpick on the videos, if you can, try and increase the resolution a little. Its pretty much impossible to read text/editor menu stuff. Not a big deal though.
     
  43. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    The system is designed to allow you to place the hammer into a container, and then a small knife next to it in the "indent". When an item is stored (that part is coming along now), it only takes up the spaces you mark solid.

    I would just limit equipping slots to a single item to avoid double equipping. I'd like to make a plugin for it that handles this process as well.

    I'm going to be meeting with my lead designer soon, I think he'll be able to improve our video quality.
     
  44. Hrothvitnir

    Hrothvitnir

    Joined:
    Apr 26, 2013
    Posts:
    109
    It's almost been a month, any news?
     
  45. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    Hi Hroth,

    Life caught up with me, and I've barely spent time programming. Between looking for a new job, transferring at my current one, looking for a new place, helping a friend through serious addiction problems and a couple scares in the family, I just haven't time to focus on it, even though I probably could have put a little in here and there. I want to apologize for not being in communication, and for the severe delay on this program.

    In good news - I did finish coding the storage system in the last couple of days, but it doesn't work completely until I set up the methods of container use... such as opening all the containers at once, or selecting from a list. The Master list is already built in, but it needs to be reconfigured a bit and made pretty in order to be released, and the all at once option you favor shouldn't take much time to code, but after it being so long, might take me some time to reacquaint myself with where to code it in.

    I'm also working on a game project that is a week or two away from a free release which we plan on following up with a crowdfunding. Now that I've finished the storage system, I am switching back to release this game. If things go as planned there, I can hire somebody more professional than either of us to finish it. I will keep a weekly update on here as things go by. I apologize if this doesn't meet the timeline you were hoping for, this month was a real wildball for me.

    Thank you everyone for the support you've shown for this program. I do hope to release it very soon, but I don't want to follow a bad habit of promising times I can't keep.
     
  46. Hrothvitnir

    Hrothvitnir

    Joined:
    Apr 26, 2013
    Posts:
    109
    No worries, I understand life getting in the way (this past month has been hell for me too). So long as you haven't given up on it (if you do need to in the future, no hard feelings, but please let me know).

    In fact if you need to take a break and wait for the 4.6 gui update that's fine too. It'd be nice to have a prototype to play with (I'll have to write some code to interact with it) but there are a bunch of other assets I'm also waiting on, to say nothing of unity 5 (for the physx update if nothing else).
     
  47. RoTru

    RoTru

    Joined:
    Jun 5, 2014
    Posts:
    37
    I'd seriously buy this in a heartbeat... The fact there's no drag and drop diablo style on the asset store already is beyond me... You'd make bank!
     
  48. Hrothvitnir

    Hrothvitnir

    Joined:
    Apr 26, 2013
    Posts:
    109
    4.6 is out...(bump)
     
  49. Jooooe

    Jooooe

    Joined:
    Feb 10, 2015
    Posts:
    1
    I'm super interested in buying this. Hopefully all is well and it's still in progress!
     
  50. Hrothvitnir

    Hrothvitnir

    Joined:
    Apr 26, 2013
    Posts:
    109
    N̶o̶ ̶n̶e̶w̶s̶ ̶s̶i̶n̶c̶e̶ ̶S̶e̶p̶t̶e̶m̶b̶e̶r̶.̶.̶.̶ ̶I̶'̶m̶ ̶s̶t̶i̶l̶l̶ ̶f̶o̶l̶l̶o̶w̶i̶n̶g̶ ̶t̶h̶e̶ ̶t̶h̶r̶e̶a̶d̶,̶ ̶b̶u̶t̶ ̶a̶t̶ ̶t̶h̶i̶s̶ ̶p̶o̶i̶n̶t̶ ̶i̶t̶ ̶c̶e̶r̶t̶a̶i̶n̶l̶y̶ ̶s̶e̶e̶m̶s̶ ̶d̶e̶a̶d̶.̶
     
    Last edited: Mar 12, 2015