Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

InventoryManager 2.0

Discussion in 'Assets and Asset Store' started by Adam-Buckner, Apr 27, 2011.

  1. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670


    InventoryManager 2.0 is available on our eStore for the introductory price of $19.99.
    This system is available in both C# and UnityScript.js (JS) languages.
    The C# and UnityScript.js (JS) versions are separate purchases, so don't confuse them.


    http://theantranch.com/Store.html

    This is now available from the Unity Asset Store.
    https://www.assetstore.unity3d.com/#/content/1805

    InventoryManager is a core system for managing in-game items in Unity3D projects.

    A live trial is available at: http://theantranch.com/InventoryManager.html

    InventoryManager includes:
    • Unity-centric: No parsing files or required external databases
    • Easy edit-time creation of in-game items using the Inventory Item Editor
    • Inventory List is flat for ease of in-game iteration
    • Decentralized loot creation
    • Detailed loot tables
    • Easy loot table management, including editor script support for difficult operations
    • Lootable Objects and individual Lootable Items
    • Easy inventory management
    • Paper-doll with equipment slots equipped items
    • Multiple bags easy bag manipulation
    • Drag Drop item icons
    • Animation support for Lootable Objects
    • Fade and destruction support for Lootable Objects when empty

    This is a core system that is fully customizable by the developer.

    In addition to the code, included with the demo-project is a set of temp icons, a chest model with optional animated lid, a gold-pile, sprites, textures, a particle system and several other items as well. Everything you see in the live trial is included in the download.

    The Inventory Editor in action with example item characteristics:
     
    Last edited: May 7, 2011
  2. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,281
    Can not see the video because of content from SME that i can not see in my country.

    Does it have ios fuctionality?
     
  3. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    M_Stolly: You must be in Germany! I didn't realize that youTube would block that video... I'll get a new one up asap. The screenflow video picked up what I was playing on iTunes, and your country doesn't like it.

    To answer your question it does, in theory, have iOS functionality. However: It is built in Unity's OnGUI() and GUI.x which means the draw-call volume is very high. My basic tests show that it is surprisingly performant on the iOS, but it is still a heavy consumer of resources because of the draw calls.

    Do you have EZGui? (http://www.anbsoft.com/middleware/ezgui/) Internally I have a working version of this system in EZGui, and when the dust settles from this project (and perhaps after Ludumdare and the Royal Wedding), I'm going to start on an release version of InventoryManager for EZGui. This will be far more performant than OnGUI when targeting mobile devices.
     
  4. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,281
    Yes i am german and i also use EZgui.
    Hope to see the video soon.
     
  5. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    The video has been replaced. youTube is processing it and it will be available soon.

    Also:

    The video only shows the Inventory Item Editor during edit time creation of Inventory Items. If you want to see the Inventory System in action, there is a web-player on our site:

    A live trial is available at: http://theantranch.com/InventoryManager.html
     
    Last edited: Apr 27, 2011
  6. kheng

    kheng

    Joined:
    Oct 22, 2008
    Posts:
    126
    Cool let us know when it hits the asset store.
     
  7. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    Kheng: Will do. As soon as it passes muster in SanFrancisco, I'll put up a flag.

    If you want to purchase the C# version now, the C# version is available on our eStore:
    http://theantranch.com/Store.html

    As we speak, I'm chained to my desk polishing the JS version, so that should be on the eStore soon too.
     
  8. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    I have had some questions about HOW and WHERE the items are saved in InventoryManager.

    The paradigm I wanted for InventoryManager was a simple one that developers with little coding knowledge could understand and could be used without the need of any external tools or databases. (I do plan to support import/export in a future update, and I have an internal version that does support parsing delimited text files, but that is not part of this discussion.)

    In CODE, the InventoryItems are saved in an array called ItemList. This array can be found in the ItemList.cs script which should be attached to a GameObject in your game, preferably the InventoryManager GameObject that also maintains the InventoryManager.cs script. At runtime, this array is zipped up into a dictionary for increased performance during game play.

    This is the script:


    This is the script attached to a GameObject with some items created.


    If you wanted to you could edit this array directly, but this would be very annoying:


    So that's why I've included the Inventory Item Editor to do that for you. You can access the InventoryItem Editor from the menubar with Window/Inventory Item Editor or use <cmd><shift><e>:


    The Inventory Item Editor provides an interface to that array and allows easy access to the item including drag and drop images, enum popups and rational organization of elements.


    You can see it in action here:


    Now, if you need to MODIFY the Inventory Item to include different attributes and different statistics, then you need to edit the Inventory Item class. As I cannot predict the needs of every game, this must be modified by the developer. I intend to make this more classy than just opening up the guts in an IDE, but at this point, editing the InventoryItem class is what needs to be done.

    If you need to modify the inventory item class, let me know and I can walk you thru doing it and adjusting the Inventory Item Editor. The places that need editing are noted in the comments, but a guide from me could make things faster.
     
    Last edited: May 4, 2011
  9. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    5,653
    Will the EZGui version be a free update, or if we have EZGui, should we wait?
    Also - are items able to be stackable? If not, will this be added?
     
  10. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    Jaimi:

    At this point I plan on having InventoryManager for EZGui as a separate purchase. Unfortunately, like the apple store, the unity asset store doesn't support complex pricing (if you have this, get this other thing at half price) which is what I'd like to do with that... not do they support codes right now. EZGui and its systems are fundamentally different and it requires a ground up re-write.

    Currently, in this release version, items are not stackable, but there are hooks for it, and I plan to implement stacking along with vendors and some other new features.
     
  11. Afrokid001

    Afrokid001

    Joined:
    Jun 3, 2010
    Posts:
    89
    Hey, how far away is the Javascript version from being released?
     
  12. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    The translation is finished and undergoing testing.

    Unfortunately as JS doesn't easily support everything C# does, some of the choices I've made in making the C# version efficient don't translate very well to JS - like my decision to use Linq. The code is compiling now that I've worked around translating these tricky bits into JS (thanks to some help from the cheerful and happy people on IRC!), and when it passes testing, I'll get it up on the eStore.
     
  13. koen.pis

    koen.pis

    Joined:
    Mar 24, 2011
    Posts:
    66
    Good stuff, I would love to see your Ez Gui implementation do ;)
     
  14. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    I'm hoping the EZGi one will come together fast, as I already have a base implementation, and now Brady has built in drag and drop, which is what took the OnGUI one some long... getting D&D to work without too many hitches...
     
  15. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    5,653
    I just bought the other one on your store, thinking a "ground up rewrite" would take a while... Hope you have an upgrade version in your store available. :(
     
  16. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
  17. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    A quick note on editing Equipment Slots:

    Here's a quick overview on "How to create new equipped slots":


    What this shows is:

    Increase the "Equipment Slots" array.
    Update the details for each new slot.
    - Slot Name
    - Slot Type
    - Slot Icon
    - Slot Position (which I may refactor to slow anchor in a future release)


    If Slot Position is not updated, or is identical to another slot, only the last drawn slot will be visible, as it will be on top. Is may seem to be that new slots are not being created if the details are not updates, as all the new slots will draw one on top of the other, masking the other slots below. You can see this in the video when I update the new slot details but give the new slots the same new Slot Position.

    If you need to have new Slot Types, you will need to edit InventoryManager.cs in your IDE. At the top of this script you will find:
    Code (csharp):
    1. public enum SlotType {Head, Chest, Waist, Legs, Feet, Back, Neck, Hands, Ring, MainHand, OffHand, Bag, Empty}
    This line of code may be edited to be any slot type you choose. This should propagate thru to the Inventory Items and the Inventory Item Editor as well. Please NOTE: I would suggest that you keep "Empty" as one of the SlotTypes.

    Lastly, you will probably need to change the size of the "Character" window to accommodate an new icons. If the new icons are placed outside of the bounds of the "Character" window, they wont be visible.

     
  18. Afrokid001

    Afrokid001

    Joined:
    Jun 3, 2010
    Posts:
    89
    Very nice, couldnt find any errors, tried all i can think of :)
    Cant wait to get my hands on it.
     
  19. robattle

    robattle

    Joined:
    May 6, 2011
    Posts:
    22
    epic jaa, zat would be something i would buy
     
  20. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    In the current C# version that is on the store, I may have a block up stale code, reported by a user on my forum (http://theantranch.com/forum/viewtopic.php?f=25&t=1167)

    The uploaded package seems to have (starting at line 219 in Awake)
    Code (csharp):
    1. equipped = new List<InventoryItem>();
    2. for (int k = 0; k < 12; k++) {
    3.     equipped.Add(null);
    4. }
    This should be changed to:
    Code (csharp):
    1. equipped = new List<InventoryItem>();
    2. for (int i = 0; i < equipmentSlots.Length; i++) {
    3.    equipped.Add(null);
    4. }
    And I will get a point upgrade up on the eStore asap so everyone can have the proper code, and to prevent the chance there is other stale or obsolete code in the current package, since that block of code worries me. It shouldn't be in the release version.

    The JS version has been checked and it up to date and will be posted at the same time.
     
  21. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    The UnityScript (JS) version of InventoryManager 2.0 is now available on our eStore for the same introductory price of $19.99.

    I have also updated the C# version to remove any stale code that could have been included in the package for download. This new package should correct the issue mentioned above about having difficulty changing the number of equipped slots.

    This package should be available by "re-downloading" your initial package from the eStore according to the email you received when purchasing. If you run into trouble, please post on our forums: (http://theantranch.com/forum/viewforum.php?f=25)
     
    Last edited: May 7, 2011
  22. Afrokid001

    Afrokid001

    Joined:
    Jun 3, 2010
    Posts:
    89
    hey, i have a question regarding the loot generation,

    Will it be able to make say an "Epic" item that has like a 1/1000 chance to drop or does everything have the same chance?
     
  23. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    Afrokid:

    The simple answer is: YES

    The more complex answer is:

    Loot Tables

    This system supports two "Lootable Classes". Lootable Item and Lootable Object.

    Lootable Items are designed for looting or picking up single objects or looting containers with only one item in them. Imagine a single weapon like a shotgun, or a box of ammunition, or a sword. The Lootable Item is usually attached to the GameObject in the game world allowing the pickup or looting of this item only. In the demo, items discarded back into the game world use a Lootable Item component to allow re-looting. The Lootable Item could also be an object or container that returns one single item, say a quest item, like a statue where one can loot a gem from it's head, or picking a flower that returns the "picked flower". Lootable Items contain only one item and it's always dropped at 100%. Lootable Item is primarily a convenience class, as one could have a standard Lootable Object that only contained only one item, but setting the master and child loot tables for just one item is cumbersome, and there is no reason not to create a convenience class for single items.

    Lootable Objects are designed to be a typical object lootable by the player like a dead monster or chest that can contain any number of randomized items. Each Lootable Object contains a Master Loot Table which is an array/list of separate individual Loot Tables:

    This is done for ease of organization and or complete control over how loot spawns. As you can see in the two examples, you can organize these in any way you choose.

    Each individual Loot Table within the Master Loot Table can be set up to behave differently from one another. A standard Loot Table is setup to take an array/list of items and their individual chances to spawn. This way you simply use a "string" variable that matches the name of the item in the item list and the chance for it to spawn.


    Currently the spawn chance is set as a number from 1-100, but this number is a float, so you could set the chance to 0.1 to get 1:1000.

    To add control to Loot Generation, each individual Loot Table can be set to behave differently:


    Chance for List is an additional randomizer. This tests whether the list is used at all for loot generation. If Chance for List is set to true, you must also enter a List Chance. This is another random chance from 1-100. If you set Chance for List with a List Chance of 50, on average, only half of the objects with this loot table will spawn items from this list.

    Pick Items from List is a different form of randomizing items from a Loot Table. When Pick Items from List is set to true, the system does not iterate through all of the items and test it's spawn chance, but randomly picks a number of items at random from the list. When Pick Items from List is set to true, you must also enter Number of Items. This sets the number of items from the list to pick. If an item has a Chance value set, this number will be ignored. The Chance value may be left blank/null. Optionally you may set Pick No Duplicate Items. When Pick No Duplicate Items is set to true and Number of Items is greater than one, the system will make sure that the same item is not chosen twice when spawning loot. (See important notes below!)

    USING the complexity of the Loot Tables:
    At first blush, this may seem to be an overly complicated system, but upon closer inspection the developer will be able to see that this will enable not only an ease in play balancing by being able to see different loot types (like trash loot valuable loot) separated from each other with different loot tables, but the developer will also have control over situations where they need to deliver controlled amounts of loot using separate loot tables and pick from list.

    In a simple example one could have a trash loot table and a valuable loot table for organization, each with a series of items that have their own chance to spawn. Then, in addition, have a special loot table with a series of important items set to "pick from list" and the number to pick as "1". In this scenario, the developer will know that this loot combination will only return one piece of valuable loot from any given lootable object sharing that same loot table. To further control loot generation, that loot table could be set to "Chance For List" and the "List Chance" to 33.3, so the developer can know that a valuable item will be created on an average of one in 3 lootable objects sharing that same loot table.

    I am sure you can imagine even more complex situations, but with these simple tools, the developer should have accurate control over an item's loot generation.

    PLEASE NOTE: Using "Pick Items from List" and "Pick No Duplicate Items" can lead to complicated situations, especially when used with "Unique" Items. If any of the optional details are set, the lootable object should be thoroughly tested and the developer should watch for details or errors throw into the console, as some options can create situations that are either incompatible or impossible. As I said: Be particularly careful with "Pick Items from List" and either "Pick No Duplicates" or when using items marked as "Unique" as situations can be created where there are not enough items to pick to fulfill systemic requirements. These situations should all be trapped and will throw an error into the console, but this could stop the looting process, which is acceptable during testing and development but not game play.

    PLEASE NOTE: As "Lootable Items" are "pre-spawned" by the developer, and using a "Lootable Item" will bypass the unique item check. It is up to the developer to make sure that they only create and use one instance of any individual unique lootable item in the game world, and if a unique lootable item is placed in the game world that they do not add it to a loot table as well. This could create duplicate unique items.
     
    Last edited: May 7, 2011
  24. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    Fade Issues with Empty "Lootables"

    I have discovered two things:
    (http://theantranch.com/forum/viewtopic.php?f=25&t=1174)
    * A translation/code error in the fade method (This is in the UnityScript.js (JS) version only!)
    * An architectural problem with fading complex models (This is in both versions)

    See this thread for more information and a hot fix:
    http://theantranch.com/forum/viewtopic.php?f=25&t=1175

    HOT FIX is available on the eStore.
    Re-download your code according to the eStore receipt you received when purchasing. Let me know if there are any issues.
     
    Last edited: May 9, 2011
  25. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    There are updates to both the C# and the JS versions. The best thing to do would be to re-download the software using your original receipt and you'll get a new package. This should iron out any issues and may fix/optimize other bits and pieces. You don't need to import everything (the FULL package), but can reimport the scripts (the BASIC package). This will simply replace the scripts in the package with new ones.

    This is what they say:
    Check the file that eSellerate delivers to you. It should be: "InventoryManagerJS_2-0-1.zip" or "InventoryManagerCS_2-0-2.zip"

    If this doesn't work, or you can't do it, then PM me your name, address and activation code, and I'll send you the files directly.
     
  26. DecapitatedOrk

    DecapitatedOrk

    Joined:
    May 13, 2011
    Posts:
    16
    Does your system support a Diablo style grid?
     
  27. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    By "Diablo Style Grid", you mean where items have a 2D "area" and the player needs to fit items into the total grid area with no overlap? No. The system is much more item oriented where each item, regardless of importance or size, takes up one inventory slot and the number of slots is set by the size of the equipped containers.
     
  28. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    Purchasing eDS from eSellerate breaks updates (fixed)

    Purchasing eDS from eSellerate breaks downloading code updates from eSellerate.

    Providing the eDS service is a requirement and part of the terms and conditions of selling through eSellerate. It is, however, designed to work with executable applications that "check for updates" when launched, not code-only sales. Purchasing eDS saves a cache file of the original purchase. However, when selling code alone, the eDS service prevents easy downloading of new code packages and delivers the original cached file instead. I have arranged with eSellerate to stop offering eDS on all new purchases and to remove eDS from the accounts of anyone who has purchased eDS and to refund the cost of eDS to anyone who has purchased eDS. I have initiated a return process for all sales receipts that included eDS. There should be no required action on the part of someone who purchased eDS. If you have not purchased eDS, you can safely ignore this topic.

    If you believe you have purchased eDS from eSellerate, and have not seen a refund for this purchase, please contact me with the following information from your receipt: Name, Address, Activation Code and Order Number.

    From now on - for all customers - downloading code updates should be possible by following these instructions:

    "If you have previously purchased a license, you can download the very latest version via After-Purchase Services, at http://store.esellerate.net/support. Please log on using your e-mail address and your original order ID (found in your receipt and in your Order Confirmation e-mail message), and then click there here link in the Re-download section after logging on. This will display your original receipt, complete with a DOWNLOAD NOW button you can use to download the latest version of the product."

    Please follow this topic on The Ant Ranch forums for more information:
    http://theantranch.com/forum/viewtopic.php?f=25&t=1181
     
    Last edited: May 16, 2011
  29. Daniko

    Daniko

    Joined:
    Mar 24, 2011
    Posts:
    16
    Is there any ETA on the EZ-Gui version of this?
     
  30. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    Daniko: No ETA yet, but, I can say it's doubtful it will be less than 4-6 weeks. I'm currently clearing a contract job off my desk (that's this week gone) and then I have a few other things to clear before I get into the EZGui version. That being said, I have a working (but non-drag and drop) version for EZGui working already, so once I clear a bit of time to work on it, it should be a relatively efficient path to completion.
     
  31. Zastrow89

    Zastrow89

    Joined:
    May 1, 2010
    Posts:
    51
    a question, if let's say you equip Sword and want it to show up physically. you got that in the code already? like a script you can put on the object itself and then have it check to see if taht item is equipped, and if so, the nshow up physically on your character? i got no coding experience so i wouldn't know :/ thanks in advance! (if it is not already there then please add it!!! :D)
     
  32. AntonioT

    AntonioT

    Joined:
    Feb 3, 2010
    Posts:
    17
    I can highly recommend this extension. The readme allowed me to get the extension up and running with all but one simple hitch. Even though this was a simple oversight on my part to properly configure the settings, Adam was still able to give me same day assistance and the issue is resolved.

    The readme manual gets to the point quickly and while informative of all the functionality, it is not long winded at all.

    Nicely put together and documented.
     
  33. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,336
    Are those icons ripped from World of Warcraft? You probably shouldn't be reselling those.
     
  34. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    Makeshiftwings: Nope. They are not. I've painted them myself. They have been made in the style of several popular RPGs, as this seems to be - well - popular. There are only a handful of icons. Enough for testing and to get up and running, as I assumed that every developer would want their own look and feel - but as far as this package goes, there are no violations of copyright or intellectual property.
     
  35. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,336
    Some of the icons in the original post of the thread are exact duplicates of WoW icons, sometimes flipped on the horizontal axis:

    http://cn.wowarmory.com/item-info.xml?i=6124
    http://cn.wowarmory.com/item-info.xml?i=34189
    http://cn.wowarmory.com/item-info.xml?i=33498
    http://cn.wowarmory.com/item-info.xml?i=5742

    Even if you did paint them, they're still exact copies of their icons. I'm not a lawyer, but I'd be hesitant to buy something like this because of the possible copyright infringement. I'd suggest making icons up on your own or based on free art assets rather than Blizzard's; safer for you and safer for anyone who buys your plugin.
     
  36. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    Makeshift: You are correct, you are not a lawyer. This also means you fundamentally do not understand the issue. Please don't spam or troll this thread. If you have something constructive to say about this package, please do. If not, thank you for your cooperation.
     
  37. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    I've updated the forum on my site, including upgrading the bot filter as I overlooked a few posts from legitimate users in the sea of spam. Sorry!

    If you have not heard back from me, please send me a PM here, email to info at theantranch dot com, or post in the appropriate forum thread.
     
  38. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    I have submitted this to the Asset Store and it should be available there soon. Currently, the system is available on our eStore:
    http://theantranch.com/Store.html
     
  39. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    A very minor point upgrade had been distributed through both the eStore and the Asset Store, correcting a warning re: a depreciated editor method's overload due to the upgrade of Unity to 3.4.

    This is available now on the eStore and will be available on the Asset Store as soon as it is approved by UT.

    The error occurs in 3.4 (and later I presume, tho at time of posting there is nothing but 3.4) on lines 153 and 158 in InventoryItemEditor.cs found in the Editor directory.

    Fixing these warnings by hand my be easier than d/l'ing a new package.

    To fix these by hand, simply add "false" as a new last value to be passed when using an EditorGUILayout.ObjectField.

    Code (csharp):
    1. 152         itemList[viewIndex-1].itemIcon = EditorGUILayout.ObjectField ("Item Icon", itemList[viewIndex-1].itemIcon, typeof (Texture2D), false) as Texture2D;
    2. 158         itemList[viewIndex-1].itemObject = EditorGUILayout.ObjectField ("Item Object", itemList[viewIndex-1].itemObject, typeof (Rigidbody), false) as Rigidbody;
     
  40. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    A new user was trying to figure out why their initial or starting bag was not showing up. I believe this is the solution, in case anyone else has this problem:

    -

    I would imaging that you have not yet set up your ItemList yet, or at least an item called "orange bag" - which is what you are trying to use as seen in the demo project - but this can be any container item you choose. If you see the screen shot below from the demo project, you will see the orange bag as part of the item list and the view of the same item in the item editor:



    Now, I could be more clever about the starting bag. Currently it's doing a string look-up, like the loot tables and other methods use as private values to keep track of and pass items around. As I cannot predict what a developer would want to use for a carrying system, it's hard to have a single default bag that is the starting bag. I'm leaving it up to the developer, right now, to create an item in the item editor and save it to the item list and then link this item via its name as a string in the public variable "Starting Bag". It's actually public string startingBag in C# or in JS it's var startingBag : String and the relevant code for setting the bag is:

    Code (csharp):
    1. //C#
    2. InventoryItem startingBagItem = itemList.item[startingBag] as InventoryItem;
    3.  
    4. // JS:
    5. var startingBagItem : InventoryItem = itemList.item[startingBag] as InventoryItem;
    6.  
    If you look into InventoryManager.(cs/js) you will find this variable commented as:
    public var startingBag : String; // The starting bag - this is a string to contain a valid name of an it set in the items list

    (oh dear - TYPO)

    And SHOULD say:

    public var startingBag : String; // The starting bag - this is a string to contain a valid name of an item set in the items list
     
  41. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    Inventory Manager is now available on the Asset Store. At time of publishing, for some reason, only the JS version is up, but the C# version should process soon.
     
  42. runonthespot

    runonthespot

    Joined:
    Sep 29, 2010
    Posts:
    304
    +1 for the EZGui version (instabuy)
     
  43. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    Heh! Thanks for the vote of confidence! As soon as I get that update to MessageManager out to you!
     
  44. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    And the C# version is now available on the Asset Store!

    So both C# and JS are available on our eStore and the Asset Store.
    (Each language sold separately, so pick your language of choice!)
     
  45. grfxman

    grfxman

    Joined:
    May 28, 2009
    Posts:
    309
    I just found this and I was wondering if it has the tools for stackable items. including splitting and combining stacks?
     
  46. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    grfxman: No, not at this time, but I have IM due for an upgrade soon. This was originally written as a core system based on my free one (http://forum.unity3d.com/threads/49202) that would include all of the very basic functionality and hooks for the developer to customize details. It's based on the Inventory and Quest system I have for one of my games. I intend to add stacking, vendors and other bits and pieces soon. I just need to carve them out of my working game and package them up in an easy to use way. I'm hammering out some updates to MessageManager right now, and the InventoryManager is next.
     
  47. grfxman

    grfxman

    Joined:
    May 28, 2009
    Posts:
    309
    I bought the JS version. :) I'll buy all the others (including EZGUI) when you have the stackables. And thanks for the NFO.
     
  48. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,670
    I'm going to be getting InventoryManager up on the rack for an update. Some of the items in my plans are:
    - improved drag drop code (under the hood optimization)
    - vendors
    - stacking splitting
    - better hooks for equipping item geometry on a character model

    Please let me know if there are any other specific improvements you'd like to see.
     
  49. grfxman

    grfxman

    Joined:
    May 28, 2009
    Posts:
    309
    Well Beyond the Stackable goods, Mostly I have been looking for some tutorials on efficiently using a system like this with MySQL. Especially when it comes to dropping items that others could pick up, where basically owners of the item change. And trading from an inventory. It's not really a feature other then there probably good methods and poor methods to do this.
     
  50. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    5,653
    I'd like to see a better way to get updates. Last time I went to the esellerate site to get an update you mentioned, it refused to let me get the update even though it showed I had ordered.
     
unityunity