Search Unity

*UPDATE* Inventory Master - Inventory System written with the new UI System 4.6 *UPDATE*

Discussion in 'Assets and Asset Store' started by Sander1991, Dec 12, 2014.

  1. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162




    BIG UPDATE
    The asset is getting a rework soon. I know I haven't answered the most of the email which I got and I also know that there are bunch of small bugs in the asset itselfs. I am really sorry for that, but I had a lot of stuff to do and this will be the past soon. I am actually recoding the complete project with way better structured code and better editor scripting parts for you as a customer. Here are some pictures, where you can see the first changes and new features which will come soon ;):




    More is coming soon! I hope you like the update so far!


    Current Features:
    • Creating a Player-, Storage-Inventory, Character System(Equipment System), Hotbar, Crafting System:
      • In realtime in the scene mode:
        • Adding Slots
        • Change size of Slots, Itemicon
        • Change padding between the Slots and left, bottom and right side of the inventory
        • Adding Items into the Inventory
        • Change position of the number for Stacking Items
        • Fully customizable design
    • Tooltip
    • Dragging Inventory
    • Dragging/Swapping Items
    • Off/On Stackable Items
    • Manage/Delete/Adding Items through a Itemdatabase
    • Manage/Delete/Adding Blueprints trough a Blueprintdatabase
    • Drop Items on the ground
    • Split Items
    I recommend you to watch the video or use the demo about the system:
    >>>DEMO<<<



    Asset cost 30$ on the AssetStore
    >>>Inventory Master on the Assetstore<<<

    If you got some questions just write them ;).
     
    Last edited: Apr 20, 2016
    John3D likes this.
  2. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Can this asset be used on mobile? Can the slot sizes be made bigger and the stacking functionality more mobile friendly? (everything is so small now)
     
  3. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    I did not test it with a mobile phone. But what I can say is that you can change the size of the slots. Is there a specific request of stacking functionality for mobile? I gonna check this soon if it is mobile friendly.
     
  4. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    It's just that the small numbers will be hard to see on mobile, and fingers are fatter than mouse pointers. I hope you can post some results of your mobile test soon. Thank you!
     
  5. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    I hope I can find a solution next week. Will write it than ;)
     
    eridani likes this.
  6. ivendar

    ivendar

    Joined:
    Feb 18, 2010
    Posts:
    242
    Any chance to get differently sized items possible like 1x1, 1x2, 2x2, 3x6 slots and such the like ? Would be great if that size could just be customizable as sometimes it doesn't make sense to have items be same size. Also for this it would make sense to be able to alter the mentionend slot size to be either bigger or smaller too. Just have it as customizable as possible while still being easy to use for non-programmers. ;)

    Also if they do how do the items save right now ? Playerprefs, xml, txt or something else or not right now ? If not any plans for it ? ;)

    Best Regards
     
  7. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Also a character paperdoll would be nice. So when you drag an item to a character equipment slot, the equipped item shows up on the paperdoll
     
  8. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    Actually it is not possible to change the size of each slot/item. This could be something for the future.
    Everything which I provide is for non programmers. If there are some special question you can ask me through email. I answer normally in max. 8 hours. Need some sleep aswell ;).

    Saving Items over different scenes is not implemented. It will - do not worry ;).
     
  9. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    This is something which I want to implement in the example1 scene for sure. It will come soon. At the moment I am recoding the DragItem class and after this the Craft System will be finished. Actually this also means a price raising.
     
    Last edited: Dec 15, 2014
    eridani likes this.
  10. ivendar

    ivendar

    Joined:
    Feb 18, 2010
    Posts:
    242
    Yeah no problem. Was just curious if this might be possible to get the size changes added as it's a feature I really need for a inventory. ;)
     
  11. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    Actually fixed some things in an upcoming version:

    Version 1.0.1:
    - recoded and documentated the DragItem Script
    - bug fixed where the number of a stack wasn't placed right
    - fixed a bug where the slotdesign did not taken from the new slot after you changed the design
     
    Last edited: Dec 15, 2014
  12. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    Here is a voucher code: ASV-L7JL-7JX7-MWVU-JQAJ-VY4F

    Some other will come.
     
  13. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Is the voucher for testing?
     
  14. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    It is the full asset for free ;). Actually if you got it, you were pretty lucky.
     
  15. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    Update with the craft system is waiting for review by the assetstore. You can buy the asset for 15$ until I get a answer from unity. Than it will cost 30$.
     
  16. Enoch

    Enoch

    Joined:
    Mar 19, 2013
    Posts:
    198
    First I love that this is fully built in 4.6 as it really shows the power of the new UI in terms of configurability. But I have some criticisms. I don't want to be overly critical, I bought the asset and while I love the configurability, I have some serious issues with the way you've done some things code wise. For example in ItemOnObject:
    Code (csharp):
    1.  
    2. void Update()                                          
    3.     {
    4.         text.text = ""+ item.itemValue;                     //sets the itemValue        
    5.     }
    6.  
    If Unity had a list of seven deadly code sins, this might be considered one of them. First your updating the text every frame when you should probably update it only when it itemValue changes. And further ""+item.itemValue generates a new string every frame (because strings are immutable) which means a tiny allocation every frame. And this is for every single item in an active inventory, or hotbar or equipment inventory. So if you have 100 items in your inventory you do this 100 time a frame. This quickly scales to unusable.

    Another example is in PickUpItem:
    Code (csharp):
    1.  
    2. void Update () {
    3.        
    4.         float distance = Vector3.Distance(this.gameObject.transform.position, GameObject.FindGameObjectWithTag("Player").transform.position);
    5.  
    6.         if (distance <= 3 && Input.GetKeyDown(KeyCode.E))
    7.         {
    8.             inv.addItemToInventory(item.itemID, item.itemValue);
    9.             Destroy(this.gameObject);
    10.         }
    11.    
    12.     }
    13.  
    This I assume is put on every item in the world that could be pickedup by the player. The first problem is you're doing a full distance check every frame for every item that is sitting in the world waiting to be picked up. Second you aren't caching the players game object when you do it so you are also doing a FindGameObjectWithTag to find the player every frame for every object sitting in the world waiting to be picked up. That function isn't free and its not something I would advise anyone doing every frame.

    I would advise re-factoring this completely and have a script on the player instead (maybe player inventory) that triggers only when Keycode.E is down and inside that condition do a search (if you must) for all items that have a particular tag and do a sqred distance check on those. That way the distance check is only done on the frame that a player actually hits the E key and not every frame.

    You also do something similar to this in Storage Inventory (ie for every storage inventory you check distance and search for a player tag every frame).

    There are other issues I found, but it mainly revolves around you doing things in update that you really shouldn't be doing. Get everything out of update that you possibly can. If you are doing a lookup on a gameobject do that in start() or awake() or when the some condition changes that would invalidate your local cache of the gameobject.

    I don't want this to sound like I am bashing you or your product, the intent here is really to help you get this to a point where it is useful to me ( and everyone else as well). I think you've put a lot of effort into this and I applaud that but it does have some issue that I hope you can find time to re-factor. Thanks for make this product.

    Enoch
     
  17. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    Thanks for your post. I really does not see this as a bashing ;). I will look into it and take all you points serious. This update about the fixes will come after the craft system, so this could take some time.
    Anyways thank you.
     
  18. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    @Enoch thanks for your extremely constructive and enlightening criticism, which I thought you offered with the utmost politeness. I learned something new just by reading your post. Not to hijack this thread, but I was wondering if you could very quickly point out where to read about Unity's other "deadly code sins"? I've already read many articles on Unity best practices but am always open for more learning/refreshing. Thanks!
     
  19. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,519
    Looks really nice! Have you thought about controller support? Or, generalizing the input names so we can interface with the system with our own inputs?
     
  20. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    Actually this is planned. I started with the Scripting API now.
     
    LaneFox likes this.
  21. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    So actually a small list which will come with the new update:
    • some small bug fixes
    • an eventsystem for consuming and equiping an item(will work with delegates)
    • an "X" on the top right side which you can position in the inspector aswell
    • Scripting API
    • Documentation
    • Video tutorials
    Possible further updates:
    • recoding of the item class
      • that means that you will able to add so much stats/attribute to an item how you like
    If you got some other important things in the asset, than let me know.
     
    Last edited: Jan 12, 2015
  22. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    Finally finished the version. Starting with the Script API now. If you are interested what I have done, here is a webversion:
    >>>HERE<<<
    This evening or next day I will also upload the first videos. Hope you like them ;).
     
  23. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    So some updates. I just created a complete new tutorial series(more videos about scripting will come this weekend). You can find it here:


    You can check a demo here: >>>DEMO<<<

    The last video is at the moment about the event system from my asset. In this video I create a HP and Mana bar with the new event system. Im also the new Item class in the scripting video.

    If you want to see the new written Item class go to the second video. I am showing the itemdatabase there and how it is working with the attributes.

    Here a small list which I have done so far:
    • FIX: Number of stacking item does not reset after changing inventory settings
    • FIX: items are getting updated now, after you changed them in the itemdatabase
    • FIX: Tooltip only get displayed when it should be displayed
    • FIX: Number of a stack should be placed right now, even if you are splitting the item
    • FIX: fixed a building bug
    • FIX: fixed where you could have picked up more items than you could
    • UPDATE: added a event system which provides consuming, equiping
    • UPDATE: added "X" for closing the inventory
    • UPDATE: change the general design for a better overview
    • UPDATE: changed the item class. Itemattributes are possible to add: Check these two videos for better explaination:
      • Itemdatabase:
      • Scripting with the new Item class:
    I will submit the update with the documentation and the script API this weekend so I hope it is up next week wednesday.
     
  24. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    Last edited: Jan 16, 2015
  25. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    I watched the video in the first post.

    I find the system really fits my needs, but I worry about mobile compatibility

    It would be better if you have a mobile demo, such as a demo.apk to download.

    I would be your instant buyer!

    Questions -

    If I were making an RPG with multiple party member, can this system work for the other members?

    I am thinking of a class specific equipments too, such as "This equipment is for Archers only.", or "This equipment is for Swordsman and Thief classes only".

    Can this system implement equipment restriction like those?
    What about level and gender restrictions?
     
    Last edited: Jan 16, 2015
  26. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @Gekigengar

    Hello,

    nice to hear that my system could fit into your needs. Let me go throught your questions.

    At the moment it does not have a full mobile compatibility. Consuming as a example is working with right click at the moment. It is on the ToDo-List.

    If I were making an RPG with multiple party member, can this system work for the other members?

    Do you mean that everyone has his own inventory? Yes, I know from some people that they have implemented into a multiplayer game and this works.

    I am thinking of a class specific equipments too, such as "This equipment is for Archers only.", or "This equipment is for Swordsman and Thief classes only".

    Nice idea. This is something which I totally forgot and nobody came with this idea before ;). At the moment it is not possible. It is only possible to gear items depending of the itemtype.
     
    Gekigengar likes this.
  27. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225
    Bought the asset and thank you so much for the randomization example videos!

    Is the attribute system not in the asset store version of Inventory Master? I can't seem to find it.

    Have you put any thought into external crafting screens (like the furnace/workbench in minecraft)? My game calls for a ammo crafting station and I would like it to only allow certain items to be placed in it and for ammo to only be craftable there.
     
  28. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    Is the attribute system not in the asset store version of Inventory Master? I can't seem to find it.
    I will submit this version this weekend. So it will be out next week hopefully.

    Have you put any thought into external crafting screens (like the furnace/workbench in minecraft)?

    This should be possible. Gonna create a video about this aswell ;).
     
  29. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    I mean, a single-player game, with multiple party members, like Final Fantasy.
    Each character has their own equipment tab-window.

    And yeah, don't forget about stats-specific restriction too! (Only equip-able when Level > 10) (Only equip-able when Strength > 55), etc.
     
  30. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @Gekigengar

    I never played Final Fantasy. I will look into it what you mean ;).
    I cannot promise you that I will implement something like stats-specific restriction. Actually I do not know how big this is. But I also will look into it and check if this is possible.
    Anyways thank you for your tipps and I will reply you when I get more informations
     
  31. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Well, forget the Final Fantasy example, imagine it like this.
    Player has their equipment slots,
    And player can have followers.
    And the followers has their own equipment slots too,
    separate from its master's equipment window.
    Follower's class differ from master usually.
    Example :
    Master - Archer Class (Can only equip bows)
    Follower 1 - Healer Class (Can equip books or wands)
    Follower 2 - Mage Class (Can only equip books)

    Hence can only equip their own class specific equipments,
    or equipments which are eligible for all class.

    Does this inventory system support multiple follower equipments like this?
     
  32. goldencruz

    goldencruz

    Joined:
    Oct 2, 2013
    Posts:
    94
    oh I know what about a shop system too buy and sell and quest too would be very help also not if anyone ask this before but a vid showing how to use with a character controller would also be very helpful
     
  33. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @Gekigengar
    At the moment not - sorry.

    @goldencruz
    So you want to have a person where you can buy items on? Is it right what you mean? The next video will be about a craft system on a specific GameObject like in minecraft. So that you only can craft items on a work station.
     
  34. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    Last edited: Jan 18, 2015
  35. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    Last edited: Jan 20, 2015
  36. Hans

    Hans

    Joined:
    Feb 20, 2007
    Posts:
    422
  37. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @Hans

    It is looking like Playmaker. Isn't it almost the same? Firstly I would like to implement it to playmaker than into something else. Playmaker is way much bigger. More customers ;), but I will look into it and will say you my decision about it.
     
  38. goldencruz

    goldencruz

    Joined:
    Oct 2, 2013
    Posts:
    94
    yes I love to see it for playmaker too. yes for the shop system with a person that you can go buy items or sell them. and a quest system would be nice but either of them would be great
     
  39. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    Firstly I will add the shop keeper to the update list ;). Next things will all go into the ToDo list.
     
  40. goldencruz

    goldencruz

    Joined:
    Oct 2, 2013
    Posts:
    94
    this sound great
     
  41. Siduron

    Siduron

    Joined:
    Dec 13, 2014
    Posts:
    6
    I came here to check on your progress and found out I have a lot of catching up to do!
    Any ETA on when the update will be on the asset store? My fingers are itching to work with the new item manager!
     
  42. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @Siduron
    Assetstore wrote me an email 15 minutes ago that it should be updated. But it could take 1-2 hours is written in the email. So go and test it ;). It will be version 4.6.3, if you are just pressing F5 and checking if it got updated ;).

    Edit: For me it is updated now.
     
    Last edited: Jan 20, 2015
  43. Siduron

    Siduron

    Joined:
    Dec 13, 2014
    Posts:
    6
    Talk about timing! I'm updating right now and will get some work done probably tomorrow :).
     
  44. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Curious, and I'm certain this has been asked but not certain it's been answered...

    ...do you have plans to do multi-tile inventory for oversized objects? (e.g. a dagger vs. a breastplate)

    ...if so any plans for non-square? (e.g. a 1x1 dagger vs. a 1x4 sword)

    Thanks Sander!

    -Steven
     
  45. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @SteveB

    ...do you have plans to do multi-tile inventory for oversized objects? (e.g. a dagger vs. a breastplate)
    Actually I do not know what you mean. Do you have an example?

    ...if so any plans for non-square? (e.g. a 1x1 dagger vs. a 1x4 sword)

    Do you mean something like in DayZ? Yes, but this means creating a complete other system. It will come onto my ToDo-list but won't be in the next update.
     
  46. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Well the example is the second question you answered! Large objects that take up more than one inventory square. :D

    Do you feel this really requires an entire rewrite of the system?

    Otherwise thank you for the quick reply Sander!!

    Cheers

    -Steven
     
  47. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @SteveB
    I have answered it already? Wow I forget things to fast - Im sorry :D.

    ...if so any plans for non-square? (e.g. a 1x1 dagger vs. a 1x4 sword)
    Actually this would be easy to implement for the next update but how could I display this nice? Actually it should look nice and I do not know how to let it look proper.

    Do you feel this really requires an entire rewrite of the system?
    No, it does not require a complete rewrite but I have to rethink the whole system behind it. It would be way much easier than the slot system itself ;). But how I said this is something which I will implement.
     
  48. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Haha well yea the by answering that you will have non-square objects that take up more than one square! You even repeated it again in your last response below!

    Thanks Sander!

    -Steven
     
  49. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @SteveB
    Wow I was just thinking about a complete other system :D. Now I know what you want to have. Just something like a list in H1Z1 where the inventory is limited with a weight or something like this. I was totally confused :D. But yes this is something which I wanna implement. To be honest I prefer an inventory like this more than a slot inventory, but anyway it will be implemented ;).
     
  50. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225
    The ability to increase inventory slots (or increase weight) with an equipped item would be cool. (like h1z1)

    What do you think would be the easiest way to implement a weapon attachment system with your asset?

    I don't really want to use crafting because it would multiply the number of items (and recipes) needed for my game exponentially.

    The easiest way, i can think of, is to add a character inventory (call it weapon inventory) for every weapon and only allow the player to open the currently active weapon's inventory.

    Any thoughts?