Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Ultimate Inventory System C#

Discussion in 'Works In Progress' started by GreekStudios0, 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. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    I want to announce to you that the drag & drop system has already been implemented (with similar way) as you said.
    But i won't update the asset store now because it would need more time for this version to be online.

    Yes i can upload a webplayer demo with the drag and drop too.
     
    John-G likes this.
  2. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    Excellent, will pick this up for sure.
    Feature request, would it be possible to implement different sized items eg a 2*1 sized slot that could represent longer items like weapons?
     
  3. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    I don't think i can do it since i will need to re-code the whole project since the inventory is not based on the item size but on slots or weight of an item, if you want realistic mode then use weight mode, so make your weapon to have a high weight and consumables to have low.
     
  4. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    Drag & Drop Preview
     
    TheGnawers likes this.
  5. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    Yes :D
     
    GreekStudios0 likes this.
  6. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    Guys, version 1.2 except from drag & drop feature it would also include drag & drop crafting system which will support unlimited crafting recipes and also a very easy to use custom editor to create recipes.
     
  7. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    This is a great tool buying it when it comes out would be even better if you added a crafting system in it but its really good.
     
  8. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    well then this is the best inventory system i have seen so far. :D
     
  9. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    hehe , i just said that it would have crafting and one sec later you post about crafting, what a coincidence :D .
    Yes for $10 you would have your ULTIMATE inventory & crafting system.
     
  10. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    Yea thats was funny this system will be great for my survival game great work.
     
    GreekStudios0 likes this.
  11. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323


    so with this you have to add two sticks one above the other on the middle and one metal blade on the right to make an axe (In game it would have image preview)

     
  12. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    Sounds great looking forward to it.
     
  13. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    Definitely worth more than 10$! So only a day or so before release?
     
  14. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    I too am working on a survival game! Have any concepts/ideas you want to share?
     
    GreekStudios0 likes this.
  15. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    Sure its basically a zombie survival open world game. I'm going to make a massive world with multiple cities farms flatland etc. Right now i'm working on the scripting mainly the ai for the zombies and trying to find some character models or try and model myself hast gone very well though :( but trying nonetheless. if you want to know more you can pm me or email me.:D
     
  16. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    Yep, it's not on my hand but on the asset store admins, (when i submit it the crafting wasn't exist so it would be available 3+ days after the release.

    Sounds very cool, when you are ready you can pm me a trailer or something ;) . I think this system will fit into your game and will save you from dozens of hours
     
  17. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    Release today? Im pretty sure.
     
  18. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
  19. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    :)
     
    GreekStudios0 likes this.
  20. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    How many days has it been since you submitted?
     
  21. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    4 + days

    Sorry for the delay i really can't do anything, but what i can do is to finish the awesome crafting system so after the main release i will post the update ;)
     
    Last edited: Jul 25, 2014
  22. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    Woo It just got released.:D
     
    John-G and GreekStudios0 like this.
  23. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    T
    Thank for supporting ;) Yeap it's available on the asset store. It's 2 am here so support tomorrow (for me) (10 hours + for you guys)
     
  24. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    ITS LIVE. BUYIN
     
  25. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    Just bought it and it works great! I read the documentation and I couldn't quite figure two things out:'

    - I want the player to NOT be able to look around and move when the main inventory is up. (When the player presses TAB he can't move or look around, but the cursor stays free so the player can do stuff in the inv.

    I couldn't figure out how to enable the hotbar/quick inventory. I copied everything I saw in the demo and it doesn't appear.

    I know you can do these because I've seen it in your demo video. I know for sure I can do the second one but not the first. Also, how can I incorporate this with UFPS? Best 10$ I've spent on an asset so far, everything works great but this. Nice work!
     
    RealSoftGames and GreekStudios0 like this.
  26. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    All you have to do is go to UInventory settings check mark the hot-key menu and add more than zero slots and if you want it to show all slots even empty ones make sure "don't show empty slots" is not on and to save you from errors make two empty game-objects make them a child of your player, one is for the UInventory and the other is dropos make sure they are tagged and the UInventory should have the custom activation script with it hope this helps.
     
    TheGnawers and GreekStudios0 like this.
  27. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    Great system love it all and see your making a 3D view system that's going to be really cool maybe even lead to the whole inventory being 3D keep doing what your doing.:D
     
    GreekStudios0 likes this.
  28. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    Thanks for buying,

    1.)You want to pause the game when you press tab ? and let the cursor unlocked right ? I will add it right now.

    2.) About the hotbar do exactly what MrIntel said, "don't show empty slots" if it's enabled then the slots will appear as soon as you pick up something.

    Thanks for buying, yeap 3D view system will be available soon, crafting system is going very well too.

    Please make sure to rate when buying :)
     
    TheGnawers likes this.
  29. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    Hey Greek, do you think you could update your building system that you posted on armedunity? I tried using it but I get a load of errors.
     
  30. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    Hey , ahh, that would be difficult, i've start a building system with many more features and much more easy to use and compatible with UInventory, it would take a while to get released since i keep working on this to finish some things.
     
  31. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    It's coming very soon ;)
     
  32. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    That Looks great will the crafting area have the ability to customize it to make it like 4*4 or 4*3 etc.
     
  33. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    The next version will be fixed at 3*3 but i will try to make it customizable.
     
  34. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    Great system messed with the customization code a bit and got so when i press one of the hotbar keys and if its a weapon it brings out now its still needs some tweaking but its coming out good thanks Greek for this awesome script.
     
    GreekStudios0 likes this.
  35. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    I'm glad to hear that you are happy with your choice. Drag and Drop and Crafting coming soon.
     
  36. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    _-Version 2.0-_

    Ultimate Inventory & Crafting System



    Version 2.0 of UInventory is coming and as you can see it's now called "Ultimate Inventory & Crafting" , and i imagine that you know why, don't you ?
    Yeap , a free build-in crafting system :)

    New Features :

    • Save & Load is now encrypted.
    • You can change the encryption password hash as well as the salt key.
    • Drag & Drop functionality.
    • Crafting system which supports drag & drop.
    • Unlimited crafting recipes.
    • Easy to use editor for making your recipes.
    • Fixed a compiling error on webplayer platform.
    • Crafting menu is customizable, you can move the crafting slots, the result slot, the background image and the description text area.
    • You can toggle crafting menu with or without the main inventory.

    It's coming very soon, stay tuned.
     
    TheGnawers and John-G like this.
  37. TheGnawers

    TheGnawers

    Joined:
    Jul 1, 2014
    Posts:
    35
    Post that code please?
     
    RealSoftGames likes this.
  38. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    I think the code varies between the actual logic that your weapon system is based.
     
  39. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    Not necessarily this code instantiates a prefab so it can be used with any weapon system.

    Code (CSharp):
    1.         string item = GameObject.FindGameObjectWithTag("UInventory").GetComponent<UInventory>().currentItems[itemIndex].GetComponent<UI_Item>().itemName;
    2.        
    3.         if (item == "Shotgun") {
    4.             holder.DetachChildren();
    5.             Destroy(GameObject.FindWithTag("Item"));
    6.             float time = Time.deltaTime;
    7.    
    8.             if(time >= 0f){
    9.                 time = 0f;
    10.                 shotgunclone = (GameObject)Instantiate (shotgun, holder.position, holder.rotation);
    11.                 shotgunclone.transform.parent = holder;
    12.             }
    13.         }
    You might need to do some tweaking for your scripts and how you want it to be but this is what i have so far add this to the CustomActivate void.
     
    GreekStudios0 likes this.
  40. MrIntel

    MrIntel

    Joined:
    Jul 4, 2014
    Posts:
    43
    Cant wait for the crafting system it is looking good and by building system do you mean building during runtime?

    PS. If anybody wants my updated script from above that allows certain items to be re-sized and to make it look like the player is holding an item when it is active ie. hotbar keys are pressed pm me.
     
    GreekStudios0 likes this.
  41. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    Yeap, i mean building on runtime. For example on a survival you can build your home/shelter traps etc
     
    Last edited: Jul 28, 2014
    RealSoftGames likes this.
  42. BioXide

    BioXide

    Joined:
    Jul 9, 2013
    Posts:
    21
    I bought your asset and it's easily the best inventory system I've seen so far, looking forward to that crafting/building update, by the way, how can I increase the margin on my buttons?, I did it before but my unity crashed and now I forgot how to do it, I increase the margin numbers on the GUIskin but it doesn't do anything, the other modifiers such as padding still work tho.
     
    GreekStudios0 likes this.
  43. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323

    Thanks for your feedback :)
    For now to increase the margin of the buttons just increase it through the button texture.

    P.S : Make sure to rate on the Asset Store, it helps a lot :)
     
    Last edited: Jul 28, 2014
  44. BioXide

    BioXide

    Joined:
    Jul 9, 2013
    Posts:
    21
    I rated 5 stars no worries, first thing I did, where do I find that? In the GUIskin of the inventory?
     
    GreekStudios0 likes this.
  45. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    Thanks :)

    Just open the image of the button slot on a image editing software (like paint.net,gimp,photoshop) then make the transparent box outside the slot bigger/smaller, then go to the GUI skin and apply the new image into the button texture.

    Before :

    Go to

    then change the size


    After :


    Follow the same steps on every image editing software :)


    Then apply it on the GUI SKin

     
  46. BioXide

    BioXide

    Joined:
    Jul 9, 2013
    Posts:
    21
    Perfect! Thanks a lot, looking forward to that crafting update, :p
     
    GreekStudios0 likes this.
  47. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    Always welcome to support :)

    It supposed to be online at 30 of this month.
     
  48. BioXide

    BioXide

    Joined:
    Jul 9, 2013
    Posts:
    21
    Hey, I'm having some problems with the pickup method, I've implemented a way to pick up items with a raycast instead of the player entering the trigger, it works perfectly but the only problem is that it picks all the items up, it's like displayMessage is activating on all items instead of the one I'm actually looking at, any pointers? Where can I find the actual pickup method?
     
    GreekStudios0 likes this.
  49. GreekStudios0

    GreekStudios0

    Joined:
    Jul 7, 2014
    Posts:
    323
    Yea, :( that's a known bug i will fix it on the next patch, what i will do is that i will make it pick up the object which is nearest from the player.
    You can try it out.
     
  50. BioXide

    BioXide

    Joined:
    Jul 9, 2013
    Posts:
    21
    Fixed it! That was quicker than expected, here's what I did:

    On the player script:

    if(hit.collider.gameObject.tag == "Usable") //IF I HIT THE ITEM WITH RAYCAST
    {

    itemOnSight = true; //THIS DOESNT DO ANYTHING ON THE PLAYER SCRIPT
    hit.collider.SendMessageUpwards("PickUp", SendMessageOptions.DontRequireReceiver); //ACTIVATES THE BOOL PICKUP IN UI_ITEM
    {


    Then I draw another raycast that detects when the player stops looking at the item:
    if (hit2.collider.gameObject.tag != "Usable")
    {
    itemOnSight = false;
    }


    then on the UI_ITEM script:

    bool PickUp() //ACTIVATED ON THE SENDMESSAGE
    {

    displayMessage = true;
    return false;
    }

    void PickUpTimer() //THEN I NEED A WAY TO MAKE DISPLAYMESSAGE FALSE WITHOUT OVERLAPPING
    PICKUP()

    {
    if (!player.itemOnSight) //SECOND RAYCAST ON PLAYER THAT DETECTS WHEN HE STOPS LOOKING AT ITEM
    {
    displayMessage = false;
    }
    }


    Something like that, but I managed to make it work :p, now I'm adding the item functionality to Custom Activation and we're set!

     
    GreekStudios0 likes this.