Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Ultimate Inventory System C#

Discussion in 'Works In Progress - Archive' started by JohnParask, Jul 7, 2014.

?

Would you buy it for $10 ?

Poll closed Feb 23, 2015.
  1. Yes

    45 vote(s)
    38.5%
  2. Maybe

    27 vote(s)
    23.1%
  3. No

    45 vote(s)
    38.5%
  1. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    Awesome, sorry for not fixing this :(
    I will add your solution on the next update :D
     
  2. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    Will that be on the 30th too and i like the way its coming out one question though will you be adding the ability to stack items and inventory on corpses cans boxes etc for looting.
     
    JohnParask likes this.
  3. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    It can't be on the 30th because it's already submitted, if i submit again it would reset the waiting time :)
    Yes, i'm planing on making stacking.
     
  4. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    No worry's temporary fix is fine for now cant wait for crafting.:D
     
    JohnParask likes this.
  5. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    I'm really glad to here that warm feedback :D
     
  6. GregMeach

    GregMeach

    Joined:
    Dec 5, 2012
    Posts:
    249
    For non-windows users (aka Mac OS X)
    From the Unity docs; either use a single "/" or (imho the better) System.IO.Path.DirectorySeparatorChar command. This will allow your script to write out the "testFile1.txt" to my Desktop folder instead of creating an oddly named file ("Desktop\testFile1.txt") in my home folder.

    So line 72 could be:
    Code (CSharp):
    1. System.IO.File.WriteAllText(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop) + System.IO.Path.DirectorySeparatorChar + "testFile1.txt", saveFile);
    2.  
    ;)
     
    JohnParask likes this.
  7. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    That code is not needed, it was for testing proposes and i'm really sorry for forgetting to remove it.
     
  8. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    I really like how this is coming along. I've spent the last few days adjusting it to my needs and this has speed up the production of my project, thanks! One final request I have is something Intel said, looting. I assume it wouldn't be too hard for us to do, but for future people buying, it would be nice for it to be already implemented :). I've tried it myself a few times and the only real problem I have is the transfer from the corpse/container UI into the actual inventory.

    Anyways, good work so far, I like it :).
     
    JohnParask likes this.
  9. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    Can you explain a bit more what is the new feature you want ? [I'm not native English speaker so :( ]
     
  10. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    Well to get around this you can instantiate the item prefab when an enemy animal etc dies but it wouldn't work great for containers I'll see if I can code a container script when I get haven't really messed with that yet just bringing out items when item is active.
     
    JohnParask likes this.
  11. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    He wants a looting script to take items from other gameobjects.
     
    JohnParask likes this.
  12. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    Nice, thanks for the explanation, yes i can add it easily.
     
  13. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    I can imagine....thousands upon thousands of prefabs that never get picked up. Clog up the whole project eh?
     
    JohnParask likes this.
  14. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    I will add the requested feature very soon :) .
     
    TheGnawers likes this.
  15. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    Thats awesome more coding time saved.:D
    Well not really unless your killing alot of enemies but you can make the items dissapear after some time or turn off the item when a player is to far away and turn it back when he is near.
     
    TheGnawers and JohnParask like this.
  16. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    The version 2 is supposed to be online within 18:00 - 24:00 UTC + 0

    Then i will need some days to make your request feature :)
     
    TheGnawers likes this.
  17. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    EST?
     
  18. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    I can have it ready before tomorrow, but asset store needs 3days + :)
     
  19. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    No I mean what time is it going to arrive today in eastern standard time? (Version 2)
     
    JohnParask likes this.
  20. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    I don't know your time zone, i'm on GMT +3 and is is estimated before 1am.
     
  21. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    Okay? I'm not sure what you don't understand about EST. Whatever, I guess I'll keep checking the store :).
     
    JohnParask likes this.
  22. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    Sorry i just understood estimated :eek:

    EST : estimated at 6:00 p.m
     
  23. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    Yes, i just count the previous times and it was about 3 days and 12+ hours after submiting
     
  24. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Oops hit delete instead of edit, silly phone layout. But post above in quote.
     
    JohnParask likes this.
  25. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    I'm planing of adding player equipment with slots for head,body,arms,legs etc, is this sounds cool ? do you actually find it useful ?
     
    John-G likes this.
  26. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Yes that would be most useful, would it be possible to use it for example military webbing system so an ammo belt for multiple ammo clips, pockets on camo pants, Alice rucksack etc.
    Can each inventory have a set amount of slots that can only be used for specific items eg the ammo belt can only use X type ammo clips?
     
    JohnParask likes this.
  27. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    Yeap, a bunch of new ideas which i will try to implement here ;) Right now i'm working on the looting system.
     
  28. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    This will be the best inventory system in unity like the player equipment idea
     
  29. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    Just don't make it like every other RPG Inventory makes it. The old, "Ring, Armor, Necklace" gets very old, and not everyone wants to make a WoW RPG. Take a look at Rusts' system. It's just head, legs, chest and feet. Works very well.
     
  30. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    Thanks ;)
    Yes, that's how i want to be, head, legs chect feet :D
     
  31. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    DayZ Standalone has a very nice inventory system:

     
  32. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    Yes, please! This is what inventory systems should be.

    rustinv.jpg
    P.S: This is what I want my inv. to look like, you think that it is possible? Excluding the very right window.
     
  33. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    That is not very hard , but i don't know how to model that stuff :)


    That is what i will develop for the next update :)


    Ultimate Inventory & Crafting has been released!

    The estimated time was correct since here is 12:52 am (and i said 1:00 am)

    Make sure to grab it guys

    https://www.assetstore.unity3d.com/en/#!/content/19900
     
  34. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    HAHAH Finally
     
    JohnParask likes this.
  35. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    Pause game behind inventory added?
     
  36. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    Dont know if its just me but the drag and drop system is bugged the items get duplicated so you can get one drop them in every single slot.
     
    JohnParask likes this.
  37. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    I'm not sure, haven't tested it yet. I've been messing with the crafting. I'll try it out in a bit.
     
    JohnParask likes this.
  38. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    Drag & Drop it is working properly, just make sure to follow the documentation.


    I Will be home and available to help in 2 hours.​
     
  39. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    I added the feature to hide/lock and show/unlock the cursor when toggling the inventor.
    I will add the pause feature right now.

    HOT FIX ! PLEASE FOLLOW

    First open 'UInventory.cs' and press Ctrl+F, then search for " Input.GetKeyDown(KeyCode.S) ",
    you will see the following :


    remove the code inside the red
    rectangular.

    Then if you want to add the pause feature before the new update follow this :

    Open 'UInventory.cs', press Ctrl+F and search for " Screen.showCursor = true; ", then you will see this :



    On the red arrow type :

    Time.timeScale = 0f;

    On the light blue arrow type :


    Time.timeScale = 1f;


    then save the document.
     
    TheGnawers and John-G like this.
  40. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    BUG FIX :
    Items get duplicated when drag&drop (when using WeightMode).

    It is a really fast fix just open "UInventory.cs" , press CTRL+F and search for " // hasSelected = false; "

    then remove the comment characters (" // ") on each found item.​
     
  41. ShadoX

    ShadoX

    Joined:
    Aug 25, 2010
    Posts:
    260
    Wouldn't buy it as I don't have problems making my own , but if I did, I'd probably buy it. Seems to have everything you could want from a inventory system. :)
     
    JohnParask likes this.
  42. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    I'm glad that you still like it ;)

    Looting system is now implemented, some bug fixes and now i'm working on Player Equipment system
     
    MrIntel likes this.
  43. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    Woo thats great any eta when it will be available.
     
    JohnParask likes this.
  44. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    Since i'm also on holidays i will need approximately 4 days to finish it.
     
  45. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    Item's script has now inspector in order to set up your items quickly.

     
    TheGnawers and John-G like this.
  46. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    Looks nice. I would love to see integration with Realistic FPS Prefab next. Maybe UFPS too?
     
    RealSoftGames and JohnParask like this.
  47. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    I don't think i will do it since i'm planning on developing a KIT (First Person Physics Survival Kit).​
     
    Jaqal likes this.
  48. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    That sounds interesting!
     
    JohnParask likes this.
  49. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    That sounds really cool keep up the great work.:D
     
    JohnParask likes this.
  50. JohnParask

    JohnParask

    Joined:
    Jul 7, 2014
    Posts:
    323
    Thank you guys for the support :)





    Still needs a lot of work :)
     
    Last edited: Aug 3, 2014
    Jaqal likes this.