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. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    No no haha I mean tile based as yours is currently...only I want items larger than one square/slot/tile like Resident Evil 4 or System Shock 2. Or for further example:


    or

    or


    ...and for further inspiration:

    http://www.neogaf.com/forum/showthread.php?t=478135

    :D

    Thanks Sander!

    -Steven
     
    Been_Maya and Exeneva like this.
  2. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @OneShotGG

    The ability to increase inventory slots (or increase weight) with an equipped item would be cool. (like h1z1)

    Actually it is possible. I will create for this a tutorial video aswell. Already did it once with the system.

    So what you want is more than one backpacks. This is not possible at the moment but is something which I wanna implement. Sorting a inventory will be in the next update aswell but it is not what you want. You want to have a inventory which is only for one itemtype right?
     
  3. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225
    I don't need more than one backpack, just adding slots by equipping an item would work (like adding them to the bottom).


    What do you think about allowing weapons (or any object other than the player) to have their own character panel?

    Cars in H1Z1 are a good example of what I am talking about. I would use it for gun attachments (like pressing "y" opens up your currently equipped weapons "character panel" and allows you to drag attachment items from the main inventory into them just like you do for the main character panel).

    This would also lead into having multiple party members in an RPG with their own character panels like Dragon Age Inquisition.
     
  4. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    ^This has all my agreements, yes. :D

    This Asset could be on its way to a fully realized inventory system that the dozen or so on the Asset Store simply have not achieved...very excited.
     
  5. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @SteveB @OneShotGG

    Here is my promised video about creating this backpack system which you were asking for ;). This code will also be in the next update 4.6.4. If you need further help you also can write me an email. Here is the video - I hope you like it:

     
  6. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225

    Awesome, thank you so much!
     
  7. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @OneShotGG
    Next video will be about a working station, maybe it is interesting for you.
     
  8. goldencruz

    goldencruz

    Joined:
    Oct 2, 2013
    Posts:
    94
    a shop system would be nice also
     
  9. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225
    Oh yes, of much interest. Your videos are helping me learn the unity gui system too!

    If you succeed in incorporating ufps I imagine your sales will go up a lot. Ufps people are starving for an inventory system for their survival games...lol.
     
  10. Siduron

    Siduron

    Joined:
    Dec 13, 2014
    Posts:
    6
    The new item manager is great, but i've mostly worked on a new healthbar after seeing your video about it.
    My old one was painstackingly created with the old GUI system before Unity 4.6 :).

    Just one thing I wondered about. Is it possible (or will it be) to add items to the equipment screen the way you can with an inventory?
     
  11. paulus51

    paulus51

    Joined:
    Dec 5, 2012
    Posts:
    33
    wow real nice asset/ plugin great job Sander1991 , i am following your tutorials with alot of fun,
    and try it out by my self to make it and learn from it ,
    but i am lost in where did you make the menu scripts and editor scripts , cant find that tutorial ;-(
     
  12. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    There is no tutorial about the editor scripting. This is only for the asset itself - sorry.
     
  13. paulus51

    paulus51

    Joined:
    Dec 5, 2012
    Posts:
    33
    hi sander, huh ? how am i gonn go further then ? wy not making this toturial finnisched ? i mean with all those aspects ?
    its a great asset for sure , tutorials also but wen you left out important things thats sad.......

    now i am crying .........
     
  14. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    I guess you mean something different than me. Do you mean the tutorials for the asset itself? I will create more for the asset yes. Maybe I wrote something totally wrong

    @Siduron
    Is it possible (or will it be) to add items to the equipment screen the way you can with an inventory?
    At the moment it is not possible. For what do you need something like that?
     
  15. paulus51

    paulus51

    Joined:
    Dec 5, 2012
    Posts:
    33
    well let me explane : i am following yout tutorial with alot fun, and i am learning alot , by doing things self and so on,

    i did payd attention to your screens and saw that u have a menu master system and subs for creating those assets,
    in your folder inventory master you have a sub folder editor, whit some scripts apperently pointing out to the menu for creating stuff like databases hotbar and so on

    i missing that part of the tutorials, : making the editor files i mean thats a part of the inventory system right ?

    il hope you get me now :) grusse aus holland ;-)
     
  16. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    I am also working at an ability system. I hope I can finish the big update with the ability system and UFPS integration next month. It also could be that I firstly publish the UFPS integration and than the ability system. Otherwise it could take to much time to the next update.

    I have to learn for the university the next 2 weeks. Anyways will publish some videos about the updates, so that you can see the progress and maybe you can give me some tipps/advices which I should implement.
     
    Last edited: Jan 25, 2015
  17. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    365
    Hello Sander1991,

    I've just purchased your asset and look forward to using it, I bought it because you've done lots of tutorial videos and hopefully its going to save me a lot of time and I will learn something.

    I think there is a trend away from the traditional grid of squares inventory towards "lists" like the H1Z1 inventory / crafting system, and it would make sense when you do Shop vendor inventory which might contain a lot of items.

    Also I've noticed a trend towards a single inventory that has the character, inventory, stats, and crafting in one window (like H1Z1) Which I like btw.
    perhaps they're separate windows joined together?

    This is an example screenshot of H1Z1 Campfire crafting widow


    Also The Long Dark uses a similar system
    This is the main inventory window (more like a menu actually)
    *Note I really like how they use arrows to show which way the stats are moving.


    This is what you see when you click equipment (a list)


    It is always a compromise between realistic and gameplay

    Personally I would stick with square icons and lists of items,
    keep it simple
    Watch out for scope creep http://en.wikipedia.org/wiki/Scope_creep

    The Asset you have now seems to be great I would consolidate what you have done before adding new features imho.

    Shop vendor would be nice with currency though.

    I hope your asset grows to be the most popular inventory system on the store.
     
  18. Siduron

    Siduron

    Joined:
    Dec 13, 2014
    Posts:
    6
    With that you could give the player some starting equipment. Another 'nice to have' I thought about is the ability to give each slot its' own background.

    That way you get a hint as to what kind of item goes in that slot.
     
  19. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @nomax5
    Thank you for purchasing the asset ;). I would be happy about a review when you have tested the asset. I gonna go through your points one by one.

    I think there is a trend away from the traditional grid of squares inventory towards "lists" like the H1Z1 inventory / crafting system, and it would make sense when you do Shop vendor inventory which might contain a lot of items.
    Yes, there is definitly a trend with this list and how I allready said I like this list inventory more anyways. So this is something which I wanna implement 100%.

    Also I've noticed a trend towards a single inventory that has the character, inventory, stats, and crafting in one window (like H1Z1) Which I like btw.
    perhaps they're separate windows joined together?

    Actually this is possible aswell. I gonna create a video about it aswell ;). So I gonna show you how it will work, but I cannot promise you that it will look nice because of the design :D. Not the best designer.

    Scope creep
    Yeah, I have so much on the ToDo-List and many people are asking for new stuff. I have to categorize which is important for the most of the people and which is not important and this is how I add new features.
    Just a small list which is in my important list:
    • UFPS integration
    • List inventory
    • weight system
    • shop system
    • fixing some code
     
  20. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @Siduron
    With that you could give the player some starting equipment.
    Gonna add this in next update. Is just a small thing ;).

    Another 'nice to have' I thought about is the ability to give each slot its' own background
    Gonna look into it. But you could also change the background one by one. I could show you this in a video aswell if you want to know how this could work.
     
  21. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    i think the most urgent thing on todo list is save method:rolleyes:
     
  22. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Would love to see this with full mobile support.
     
  23. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @RandAlThor
    Is planned. But I do not know when it will be released.
     
  24. PvTGreg

    PvTGreg

    Joined:
    Jan 29, 2014
    Posts:
    365
    Hi i was thinking of picking this up but i have some questions
    can you save the inventory?
    can you pick items on the floor?
    how long do you think before ufps support?
    for the attributes how does it work can i just put in my own hunger/thrist script and chnage those variables?
     
    Last edited: Jan 31, 2015
  25. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162

    @PvTGreg
    can you save the inventory?
    At the moment not possible. You have to create your own playerprefs at the moment. Is something which I wanna implement aswell.

    can you pick items on the floor?
    Yes you can just check the demo. You can drop the item and pick them up again.

    how long do you think before ufps support?
    I hope I can finish it in febuary. I have to learn the next 2 weeks for my exams in the university.

    for the attributes how does it work can i just put in my own hunger/thrist script and chnage those variables?
    Just check this video. There am I using the attributes:
     
  26. PvTGreg

    PvTGreg

    Joined:
    Jan 29, 2014
    Posts:
    365
    ok ill wait until saveing is implemented
     
  27. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    I will submit a new version today with some bug fixes. There will be no new content included only bug fixes.
     
  28. PvTGreg

    PvTGreg

    Joined:
    Jan 29, 2014
    Posts:
    365
    sander when do you think you will implement a saving system? so it dosent reset on restart
     
  29. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @PvTGreg
    Hard to say. I have no time in the next 10 days, have to learn for my exams. So after this I will work all day on it.
     
  30. PvTGreg

    PvTGreg

    Joined:
    Jan 29, 2014
    Posts:
    365
    ok sounds good
     
  31. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Okay I'll be that guy. How does one go about saving inventory data then in the meantime?

    Will it be a mess of variables to hunt down and playerprefs them?

    Since it may be a bit until implementation, I'm inferring that it's a non-trivial task, yes? :D

    Thanks Sanders!

    -Steven
     
  32. PvTGreg

    PvTGreg

    Joined:
    Jan 29, 2014
    Posts:
    365
  33. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @SteveB

    Will it be a mess of variables to hunt down and playerprefs them?

    Yes it definitly will be a mess to hunt every variable down. This is just let me test it firstly with one variable and take more and more from time to time :D.

    Since it may be a bit until implementation, I'm inferring that it's a non-trivial task, yes?
    Actually it is trivial so far what I have seen. It could take some time, thats the only problem.

    @PvTGreg

    Yeah, thanks allready saw this with the arrayprefs2. Have to figure out which the best for the system will be.
     
  34. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    For online games it's not too difficult to implement a web based saving system using BasicHTTP, or unity's www class. Ideally you wouldn't want to store a multiplayer inventory on the players machine without securing the playerprefs, or at least have some validation to make sure items are not just injected into the inventory system. You could use the API after bringing back the items from a web server (php or other)/mysql database.
     
  35. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @julianr
    Yeah I am considering to use SQLlite. It is way much better. The playerprefs are getting saved in a registry file. Maybe not the best way. So I am thinking about SQLlite.
     
    Last edited: Feb 5, 2015
    julianr likes this.
  36. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    @Sander1991 - ok for single player games on the player prefs, or you might be better off creating an encrypted data file for single player games - if the player cheats then thats down to them, but its not going to get them anywhere other than missing out on achievements. Cheating with online inventory systems is what kills a game. However if they are going to find a weak point to cheat they will, so a validation system would be good to check what items the player has picked up or bought in the game.
     
    Last edited: Feb 5, 2015
  37. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    @Sander1991 - I already have developed a UFPS inventory system created using NGUI, it uses a bridge between a web server, and the UFPS internal inventory system. It works quite well, but I like your system, as its more complete. Looking forward to the UFPS update, as this is what made me buy yours, and shelve mine.
     
    Last edited: Feb 5, 2015
  38. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    just do it simple, save as a serialized string, then we can reload that string, from where we want ( playerpref, server..) if you want security you just encrypt that string
     
  39. PvTGreg

    PvTGreg

    Joined:
    Jan 29, 2014
    Posts:
    365
    Hi sorry to hijack the thread but im curious, i plan on making my game have a single player, coop and online multiplayer the player will be saved through out these modes like in terraria what do you sugest me doing to prevent cheating as much as possible
     
  40. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    all the logic should be done server side ( authoritative control)
     
  41. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @PvTGreg

    Just get in touch with authorative servers. This is very important for multiplayer games otherwise it is way to easy to cheat. Someone who wants to cheat allways will find a way to cheat but do not give them the easiest ways ;).
     
  42. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    365
    My view on cheating for what it is worth.

    For Single player games:
    I wouldn't bother about cheating at all, it is like buying a movie on DVD they can skip to the end and spoil it for themselves if they want.

    Multiplayer games:
    If it is like a local server where the player can create a server and invite their friends to join then its the same as a single player game.

    But if unknown public players can join, they will cheat, and they will spoil it and try to ruin it for everyone. Sad as it sounds this is just how people are these days.

    Roy
     
  43. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    I just tested it with unity 5. It is working with it!

    By the way I am getting emails from some people who are missing some tags. I do not know. Unity seems to not get them into the projects. Here is a list with the tags which you need:
     
    julianr likes this.
  44. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    So I want to do a small announcement. Thanks for everyone who already bought the asset! I am very happy that so many people like my asset and made it to the best rated inventory system so far. I get a massive response every day and this is the point where I have to say that it is on some days way to much. That means that I will raise the price of the system after the next big update(UFPS integration).

    I want to deliver a perfect support to everyone and I cannot handle it when I got to many customers. I hope you understand my decision.

    Regards,
    Sander Buchheim
     
  45. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    Ok guys I passed my examen as long as I know. Going to work on the UFPS integration now!
     
  46. schipman

    schipman

    Joined:
    Jan 22, 2010
    Posts:
    45
    Hey Sander,
    I've got some NPCs in my game that can add stuff to storage inventories. Basically I have a list on them of the items they are carrying:


    //Add items to my inventory
    npcItems.Add (itemDatabase.getItemByName("Stone"));


    When they get to the storage inventory they deposit them:

    foreach (Item itm in npcItems)
    {
    inv.addItemToInventory(itm.itemID);
    }
    Problem is the items don't stack for some reason. I can stack them by dragging them manually, but they don't stack by default when the npc puts them in. Is there a command I need to run on the inventory for it to restack items?

    Thanks in advance!
     
  47. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @schipman

    I will look into it today and will answer you with the solution ;).
     
    Last edited: Feb 17, 2015
  48. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    @schipman

    Ok so actually there is a function called bool checkIfItemAllreadyExist(int id, int value). So if there is an item which you can stack on it and will return true, false when it couldn't add the item to a stack.

    So the only thing which you have to do is this:

    Code (CSharp):
    1. foreach (Item itm in npcItems)
    2. {
    3. bool check = inv.checkIfItemAllreadyExist(itm.itemID, itm.itemValue);
    4. if(!check)
    5. inv.addItemToInventory(itm.itemID);
    6. }
     
    Last edited: Feb 17, 2015
  49. schipman

    schipman

    Joined:
    Jan 22, 2010
    Posts:
    45
    That worked perfectly- thanks Sander!
     
  50. schipman

    schipman

    Joined:
    Jan 22, 2010
    Posts:
    45
    Actually with further investigation most of the time it will stack them but not always.. so I'm not sure whats causing the failure. I'm digging into it further.
    Just wanted to suggest that you may want to consider rewriting some of the stack code and utilize the C# Stack collection for something cleaner and less error prone: https://msdn.microsoft.com/en-us/library/3278tedw(v=vs.110).aspx