Search Unity

Inventory Pro - uGUI - Performance - Mobile support & More

Discussion in 'Assets and Asset Store' started by jorisshh, Mar 8, 2015.

?

What should I build next?

  1. New currency system

    14.1%
  2. Improved serialization / saving for web

    10.8%
  3. Better properties for items (percentages, base values, etc)

    27.2%
  4. Controller support

    15.4%
  5. Unity 5.1 networking (multiplayer)

    36.9%
  6. More modular build to simplify extending

    25.1%
  7. UFPS Multiplayer (Asset integration)

    11.5%
  8. Core GameKit (Asset integration)

    4.1%
  9. Dialogue system (Asset integration)

    21.3%
  10. Wordpress integration (Asset integration)

    4.1%
Multiple votes are allowed.
  1. S_Knight

    S_Knight

    Joined:
    Jul 20, 2014
    Posts:
    1
    I am enjoying this asset so far, I especially appreciate the new documentation and streamlined interface. I have come across an issue I can not find a way around and would be grateful if someone can help.

    What I would like to do is disable picking up items with the mouse and instead use a raycast on a key press; the same as I do for attacks, harvesting, etc.

    I feel like I may be overlooking something, but I have been unable to make any progress on this.
     
  2. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Ah thanks for the helping hand twobob :), I'll write an update guide for following updates to avoid any more confusion in the future :)
     
  3. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    I've build this feature in v2.1.1 (currently in the asset store), check the demo scene (8.AllDone) for a quick demo.

    What it comes down to, is that you have to create an object (this can be on your player, camera, wherever you like) and attach the following components.

    The ShowObjectTriggerer handles all raycasting, clicking ,etc. As you can see it has a reference to uiElement, which referers to ObjectTriggererUI, which is the visual representation of the triggering.


    In the UFPS demo I've created a little hand icon, but you can of course use whatever you like.
     
  4. ivendar

    ivendar

    Joined:
    Feb 18, 2010
    Posts:
    242
    Nice work. Just bought it for later use. Noticed also a very small bug in Web Player. If you drag the item out from character equipment to inventory it won't change the stats but using right mousebutton works. ;)

    Some ideas I'd like to suggest
    - ability to make differently sized inventory items like 1x1, 1x2, 4x4 .... and if not in yet (can't see in webplayer) to be able to set how big a inventory bag or main inventory or a container inventory is.
    - item weights
    - size options for the minecraft styled crafting. sometimes 3x3 might not be enough, but I propably go for a different solution either, just think this might be a good addition. :)

    As said have just seen the webplayer yet so might be I missed if anything of that is in. ;)
     
  5. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    I'm thinking a lot of my inventory (not all of it) might be best visualized as single cell scrollable lists. I'm also thinking maybe there probably should be a variety of ways to sort the items.

    Is that sort of thing embraced by this system?
     
  6. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Thanks for the bug report, I've fixed it right away, so it will be available in the upcoming update :). (Haven't updated demo yet, got to wrap up some fancy stuff first.)

    Sized inventory items might be a tough one, because I just a flat data structure for item storage, also not sure if it would be a commonly requested feature.
    Item weights already exist, but collections aren't currently restricted by it, should be an easy one and a nice addition.
    (while typing this I though, what the hell let's give it a go so..
    , gotta love a solid system :D)
    Crafting grid size can be changed in the editor to any size you like :) (check image)
     
    twobob likes this.
  7. ivendar

    ivendar

    Joined:
    Feb 18, 2010
    Posts:
    242
    Ah I see. Well as said I have not yet taken a closer look. Thanks for infos. :)
    Yeah sized inventory items is not easiest but a request not hurts as I personally would like to see such option and some popular games like Diablo series or Deus Ex use that behavior as well. Just see it as a +1 on such a request if not too problematic. ;-)

    There's for sure much interesting stuff that can be enhanced in such systems as well.

    Another request I'd like to ask for if not already possible. Is there a way or can you add one to open a container inside a inventory slot ? So lets say you don't just drag in a new bag, but have a inventory item with a small container space.
     
  8. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    I've added a small demo where all UI elements are shown in a list view. (Demo/Scenes/CustomUITest)
     
  9. Hans

    Hans

    Joined:
    Feb 20, 2007
    Posts:
    422
    Nice work on the docs :) keep it coming :)

    Can you add a Spell creator?


    Thanks
     
  10. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Of course it's possible, it isn't directly build into the system, but adding it is easy as pie.

    All items extend from the InventoryItemBase - quickly grabbed the example from the documentation.
    Code (CSharp):
    1.  
    2.     public class MyEpicBagInventoryItemType : InventoryItemBase
    3.     {
    4.         public float failFactor = 0.5f; // 0.0f is always success, 1.0f is always failure, 0.5f is 50% chance.
    5.  
    6.         // Called when an item is used.
    7.         public override int Use()
    8.         {
    9.             int used = base.Use(); // Do default stuff, handles cooldowns and events
    10.             if (used == -1)
    11.                 return -1;
    12.          
    13.             // Find window and open / toggle it, make sure the window is a collection, and that's about it really...
    14.             // All ItemCollectionBase classes can handle items and follow the given restrictions.
    15.             // You can also add and remove slots from the bag with AddSlots() and RemoveSlots()
    16.  
    17.             NotifyItemUsed(1);
    18.             return 1; // That's it
    19.         }
    20.  
    21.  
    22.         /// <summary>
    23.         /// Override the GetInfo() method. This method returns a list of info groups.
    24.         /// A InfoBox.Row is a group of text
    25.         /// Each InfoBox.Row is seperated using the seperator defined in the InfoBox UI element.
    26.         /// </summary>
    27.         /// <returns></returns>
    28.         public override LinkedList<InfoBox.Row[]> GetInfo()
    29.         {
    30.             var list = base.GetInfo();
    31.  
    32.             list.AddFirst(new InfoBox.Row[]{
    33.                     new InfoBox.Row("Epic bag size", myBagSize.ToString())
    34.                 });
    35.  
    36.             return list;
    37.         }
    38.     }
    39.  
     
  11. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    Is it possible on the hot bar to have what weapon I have in my hand? That way the user can scroll thought active items!
     
  12. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    When does the 40% off sale end? We must be getting close.
     
  13. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    I think a spell creator is a little out of scope to an Inventory system, however I could add a collection of which only references can be created (like a spell book), from there you could implement your own system. The InventoryItemBase (default item type) already has a cooldown system, so you could also use that as a basis.
     
  14. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Not right out of the box, the skillbar creates a sum of all items in the inventory bags, however if you want to show what item the character is wearing you'll need to write some custom code.

    All collections have events for this sort of thing, you can hook onto OnItemAdded and OnItemRemoved to hook your own code into it.

    Let me know if you need some help with this :)
     
  15. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Currently pending review in the asset store, haven't got much control over this. So somewhere between Monday and Friday, so the sale is over.. soon.. ish.. :(
     
  16. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    lol thanks, I am not the best of coders yet (still working on it) but thanks for the help
     
  17. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Updating the editors

    The creator plyGame was kind enough to send me a copy to build the integration. 1 Quick look at his UI and I got jealous :), so naturally I decided to cleanup my own, as it got a little messy over the course of development.

    A little sneak peak:


    Quite a bit cleaner wouldn't you say :D?
    More in a bit :)
     
    twobob, Luschie, John-G and 1 other person like this.
  18. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    Nice, and I hate to be nit picky but would it not be easier to have one window instead of like six.

    I mean I deal with allot of asset that have there own windows, just my input!
     
  19. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Hehe, way ahead of you, I've created 1 master window that contains all the editors, there wasn't really any reason for them to be separated anyway.
    Didn't show it yet, because it's work in progress, so it might change a little :) (settings & crafting will be added to this window as well)

    All windows are now searchable


    Rewrote the editor system internally, it is now much much easier to add editor windows, and keep them consistent with the rest, as well as allowing others to integrate with the Inventory system (just future proofing ^^)
     
    Luschie, John-G and Sphelps like this.
  20. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    Dude Nice
     
  21. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    225
    VERY slick! Hey, have you had a chance to check out MyBad Studios WordPress plugins (specifically the WUData ad don)? Obviously you've been pretty busy with new stuff, so probably not. ;) I may try to connect the two myself, but always cleaner and safer when there's an "official" support. Less chance of us breaking things. ;)
     
  22. ivendar

    ivendar

    Joined:
    Feb 18, 2010
    Posts:
    242
    Aye good to know. :) Thank you :)
     
  23. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Haven't had the chance yet, I like to work in 2 week "sprints" or whatever you call them. So at the beginning of a sprint I pick a couple of items I'll be building, and won't add any other features during those 2 weeks. Mostly to avoid feature creep and make sure I finish the documentation and come up with a polished end result :)

    So at the end of this cycle / sprint, I'll start looking into new features, including the wordpress plugins :)
     
    Last edited: Apr 12, 2015
    twobob likes this.
  24. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Last chance for those who still want to buy the InventorySystem with a discount, going back to the original price in the upcoming week!
     
    twobob likes this.
  25. Iron-Oxide

    Iron-Oxide

    Joined:
    Nov 20, 2013
    Posts:
    34
    Bought and hoping you will integrate it with he wordpress asset :)
     
  26. thedreamer

    thedreamer

    Joined:
    May 13, 2013
    Posts:
    226
    Now I've just bought a product.. skill bar is good idea .. I hope that the skill bar system has been added.
     
  27. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    There is already a skillbar system, that sums up all the items in the inventory bags (this was in the first release), however because of the base collection you can make any "collection" with references. Which is basically a skillbar :)
     
    twobob likes this.
  28. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    A small feature I think people will love :)

    No mouse required, use the keyboard up and down arrows to select the item you want while still maintaining focus on the search bar :). As you probably guessed you can also click the rarity button on the left to filter on that as well :)

    And hit enter to submit ^^
     
    twobob likes this.
  29. Hans

    Hans

    Joined:
    Feb 20, 2007
    Posts:
    422
    Hi Jorisshh

    Yes a collection (spell Book) would be great.
    Thanks alot for your great work

    Thanks
     
  30. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Got it, I'll try to work it into this release, but will likely become the next, plyGame & the dialogue system aren't small implementations :)
     
  31. Hans

    Hans

    Joined:
    Feb 20, 2007
    Posts:
    422
    all good, it can wait, those are more important :)
     
  32. Tirgon

    Tirgon

    Joined:
    Apr 13, 2015
    Posts:
    2
    How do I enable mouse look in UFPS after closing a craftingstation? I also have problems getting the chests to work using the Object Trigger script. It disables the the mouse the moment the mouse hovers over the chest. I want it to only disable the mouse if I press the Trigger Hover Key Code
     
  33. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    The mouse movement should only be stopped when a window is active, that blocks UFPS controls, for example

    The object triggerer manages the actual triggering, and showing / hiding of the window. And the treasure chest (in this example) is associated with the loot window.


    In the Loot window's UIWindow, you can define it's behavior and you'll see the BlockUFPSInput toggle button. When true UFPS controller movement will be blocked when the window is shown, and re-enabled when hidden. When false the window will be completely ignored, and won't affect the UFPS controller.
     
  34. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    How do the adding of times to character affect UFPS players? Are you saying that I can have a item of Health which boosts my health by 120% (so if health is 10, when I have the item of health it's 12)? Or item of Speed/jump/whatever that changes my default values to whatever I set for the item if it's equiped on the player?

    Also for consumables, does it auto-add health or do you have choices for what to increase/decrease (poison food) for UFPS?

    If this is true, I would definitely want to be able to use Anti-Cheat toolkit to prevent hacking this.
     
  35. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    I was just checking the store to see what was new for the day, and I saw a NPC party-building asset, and I thought, "Isn't this basically an inventory issue?" I don't know where the makers of that particular asset intend to go with it, but adding members to and subtracting members from the player's party seems to me like it could be done in inventory.
     
  36. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Where do i find the documentation on how to implement this asset into the other featured assets like UFPS for example?
    I looked at the doc zip file but do not find the right informations.
     
  37. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Weapons are placed inside the user's inventory whenever picked up, picking up can either be triggered by clicking the item, hovering and pressing a key (First person style), or by touching the object, like traditional FPS games.

    Currently things like health, are triggered directly by UFPS, but a item type is easily made to allow it to be stored in the inventory, and then triggered when used.
     
  38. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Not entirely sure what there is to implement on this, the InventorySystem primarily focuses on the usual RPG, FPS, Survival games, and I've build the current feature set around it. A party system might be a bit out of scope considering it's an inventory system, or am I missing something :)?
     
  39. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    Maybe I'm missing something. It wouldn't be the first time. :)

    I'm just thinking that having an inventory of pets / NPCs or even live teammates isn't that different from keeping an inventory of other objects. You just add/subtract them, save them (if applicable), and display some sort of icon.

    I'm not sure you need to do anything new on your part to facilitate this. Probably all that's needed is already there. A player could through dialogue or as a quest reward collect a NPC into their party inventory. It's up to the game dev to figure out what this means ... whether the NPC is present and begins following the player till it dies or is removed by a later quest, or whether it acts as a consumable item (like "conjure genie" lamp with 3 uses), or if it is like a re-usable spell where upon casting the player gets a helpful creature added to his party inventory every time they cast the spell.

    Keeping an inventory of live teammates might be more difficult, as the server would have to tell the client to add or subtract any player from inventory, but on the other hand, in any authoritative setup, adding / subtracting items to/from inventory is going to be handled by network command anyway.
     
    jorisshh likes this.
  40. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Sounds like an interesting concept, and with a few small modifications not all that hard to achieve. I could make the ItemCollectionBase (core of inventory, character, etc) and the UIItemWrapper generic to create more flexibility and use the collections for something like character slots as well.

    No promises, but I'll look more into this once I wrap up this development cycle :).
     
    hopeful likes this.
  41. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    All UFPS integration can be found in the InventorySystem/Scripts/Integration/UFPS folder. What kind of integration are you missing, might I ask?
     
  42. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Cool, I'm going to have to look through this. I want to see what all you've set up with UFPS as I am very familiar with the system.
    Chris "Redhawk"
    www.youtube.com/c/RedHawkStudios
    www.twitter.com/hawk_73
     
  43. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    For your UFPS demo, it's not possible to drop a weapon and the screen does not freeze when the window is open. Basically, if I have a mace or pistol (as you have in the demo) and I want to drop it from my player's inventory on the ground, I can't seem to do that. It's possible to drop stuff in the other demos but not in the UFPS one. How do we enable this? Limiting players by capacity or weapon types is important. So if I want to limit to only be able to carry a specific capacity, I need to be able to drop via the inventory. Also, the screen should not move all around when the inventory is open. Basically, the game should pause.
     
  44. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    "Basically, the game should pause. " Is very game specific.

    you could do a
    Time.timeScale = 0.001f;
    or a bullet time thing, that would be cool...

    Hook it into the windows' open and close events.

    But not everyone would want that.

    So maybe on a dropdown at the very least ;)

    Pause
    Time.timeScale = 0.0001f;

    Bullet
    Time.timeScale = 0.03f;

    Realtime
    Time.timeScale = 1.f;

    hehehe
     
  45. MIK3K

    MIK3K

    Joined:
    Sep 10, 2014
    Posts:
    144
    Whenever I see a cool new asset there is twobob helping out :)

    Hope this is on sale still Friday (payday). Keep doing your twobob thing. You are like a living, breathing asset for Unity.
     
  46. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    I've just tested the item drop, which seems to work fine for me? Make sure the "can drop item from collection" is checked on your inventory window. Optionally you might want to take a look at the settings, perhaps the playerObject is not set, or the drop options got mixed up (layers when dropping for example)?

    Pausing the game when a window opens is rather specific, but quite easy to implement, as twobob said, you can hook onto the UIWindows events (OnShow and OnHide), let me know if you need some help with this :).

    In the upcoming update I've added collection weight restrictions, in other words you can limit a inventory, bank, etc, by the weight of items, and you won't be able to loot items once you've reached the max weight.

     
  47. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    hopeful, twobob and RandAlThor like this.
  48. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Network will be also a super plus for this :)
     
  49. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    Networking is supposed to be with Unity 5.1, right?

    Finally we'll start to see more asset store devs take seriously the idea of making their wares compatible with authoritative, multiplayer environments.
     
  50. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Not only that, some of the asset creators have started to make their assets work good with other assets in general like jorisshh, TonyLy, ChrisIceBox, opsive and some others wich is great for non coding minds like mine ;)