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

    Carmexx

    Joined:
    Jul 29, 2014
    Posts:
    63
    Whats the difference in a consumable, item property, Add / Restore, they both increase the stat by the specified amount?. Also the stat stays increased by that amount, until a game exit, then returns to base value. Can I request another option: a temporary Add stat, ie for crit pot, to increase crit by x and maybe a timer it lasts before returning to base value ?

    I suspect i'm supposed to use an external script here to control this stuff.
     
  2. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    I've been thinking about doing another asset for 'affectors'. Where you could set up triggers and use items to create an effect on a character. For example, when you walk into water, you get a wetness 'affector' and when you move to a fire it removes that wetness effect. This of course all combined with timers, stacking of effect, and all that good stuff. Which would of course be able to do this as well. - It's on my potential todo list, no real choice made on whether I want to build it or not just yet.

    With a custom script you could already do something like this. Create a new script for example, MyAffectorSystem and create a (static) method which you can use to add a stat to your character. Create a coroutine (or something in that general direction) to set a timer and remove the effect once the timer is done.
     
    hopeful likes this.
  3. Theekshana-A

    Theekshana-A

    Joined:
    Sep 27, 2014
    Posts:
    81
    Hello, I am back from a break and I am going to get back into game making. I still haven't got my fps controller to stop moving the mouse while in inventory. Please help... Thanks!
     
  4. Carmexx

    Carmexx

    Joined:
    Jul 29, 2014
    Posts:
    63
    Hi, I do not stop mouse movement but I do stop the character from moving when an inventory is open, maybe will help you figure it out, essentially i just watch for the container to be opened and then disable stuff.. This runs on my character..

    (or under the ui window interactive area, under actions do something, but I found it painful to use a script from there as this canvas isn't attached to the character and it became a pain to connect to the right character etc etc probably doable but I couldn't get it working for multiple characters at this level, hence the script ran from my own character..)

    private GameObject ContainerInv;
    private GameObject ContainerChar;
    private RPGCamera RPGCameraScript;


    // Use this for initialization
    void Start () {

    if (photonView.isMine) {
    RPGCameraScript = GetComponent<RPGCamera> ();

    }

    }

    // Update is called once per frame
    void Update () {

    if (photonView.isMine) {
    ContainerInv = GameObject.Find ("ContainerInv");
    ContainerChar = GameObject.Find ("ContainerChar");


    if (ContainerInv != null || ContainerChar != null) {
    //Debug.Log (ContainerInv + " " + ContainerChar);
    RPGCameraScript.LockMouseX = true;
    RPGCameraScript.LockMouseY = true;
    ((MonoBehaviour)this.gameObject.GetComponent ("RPGController")).enabled = false;
    } else {
    RPGCameraScript.LockMouseX = false;
    RPGCameraScript.LockMouseY = false;
    ((MonoBehaviour)this.gameObject.GetComponent ("RPGController")).enabled = true;
    }

    }
    }
    }
     
    Last edited: Feb 24, 2016
    jorisshh likes this.
  5. Carmexx

    Carmexx

    Joined:
    Jul 29, 2014
    Posts:
    63

    Thanks, ooh another asset, that sounds interesting :)
     
  6. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Hehe, well I pushed Los Pro (yesterday) ( http://devdog.nl/product/los-pro/ ) to the asset store.

    I think I'll start looking into multiplayer for Inventory Pro next, that would be a really nice addition I think :) (fully authoritative master server of course)
     
    Teila likes this.
  7. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Does it not already work with multiplayer? I assumed it did. lol
     
  8. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    question about Los Pro how do you deal with performance ? do you cache targets in range? any road map on this asset? look pretty interesting as im working on AI right now, this would save me tons of time and if its good as your inventory system, i will jump on it
     
  9. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Well, you could easily set up a multiplayer game and instantiate the character, that will all work; But the actions are not authoritative, meaning that using a vendor isn't check through the server, so people could cheat; Also dropping and item pickups aren't shared at the moemnt.
     
  10. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Yep, targets are cached; There's vertex cache when using automatic indexing. This will grab some vertices at random and index them to avoid the GC from kicking in, and keeps access times fast due to data locality.

    Also, the sample count is optimized and has early bailing (also named early return). When enough samples are taken to determine the object visible the rest won't be needed and therefore not raycasted.

    You can see this quite well in this video (2:36):


    I'd suggest taking a quick peek at the video tutorials, they show you how easy it is to set them up, as well as a programming tutorial showing you how to implement your own callbacks / targets. Or how to use playmaker, if you prefer that :) - I've spent a lot of time on the cleanness of the API, so I think you'll like it :D

    Issue tracker / future feature list
    Los Pro forum thread
     
    Last edited: Feb 24, 2016
    Tinjaw and Teila like this.
  11. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Yeah! Good point. So..hurry up and build the multiplayer version! lol
     
    jorisshh likes this.
  12. Carmexx

    Carmexx

    Joined:
    Jul 29, 2014
    Posts:
    63
    Hi, Joris couple of questions.

    1) I have only 1 item, but when I sell to a vendor it lets me click 2 and sells as if I had 2, I have only 1 of the item though. if I had 2 items, it woould let me click to 4, so it seems to double.

    2) What script controls the dropping of loot to the floor, I need to modify that instantiate for multiple players. I've set it up to drop loot but its not seen by other players

    Regards


    Carme
     
  13. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Looking forward to affectors, BTW. ;)
     
  14. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Hm.. can't seem to reproduce that one. What version of Unity & Inventory Pro are you using?

    This is in the InventoryItemBase.Drop - Which is marked virtual, so you can override it and add your own dropping behavior.
     
  15. Theekshana-A

    Theekshana-A

    Joined:
    Sep 27, 2014
    Posts:
    81
    Ok Thanks will try now.
     
  16. Carmexx

    Carmexx

    Joined:
    Jul 29, 2014
    Posts:
    63
    -Unity was 5.1.2f1, just upgraded to the latest which is 5.3.3f1 (issue still occurs).
    -Inv pro was 2.2.1 and the issue did not occur (just reloaded a backup to check, thats fine), I upgraded it to 2.4 and the issue now occurs.
    I have zero issues in the scene when I open the main editor. I get no errors in console, i do get a single warning about" Player instantiation :: Collection with name (Skillbar) not found!" - but directly after that I get 3 information messages:
    Loaded collection SkillBar
    Loaded collection Character
    Loaded collection Inventory

    I replaced from your demo 8 scene to my scene the vendorwindow/vendor itself/the confirmationdialbox/itemvaldiaolg/intvaldialog & itembuyselldialog. Didnt fix the issue.

    When I upgraded I followed your upgrade guide, i.e. delete the folder, and copy the new 2.4 in.
    -just fixed the warning, I had skillBar, but the refrence was skillbar, no errors/warnings now.
     
    Last edited: Feb 25, 2016
  17. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    I'm not able to reproduce the issue; Does it also happen in the 8.AllDone demo scene? If so, could you record a short video, maybe I'm missing something.
     
  18. Carmexx

    Carmexx

    Joined:
    Jul 29, 2014
    Posts:
    63
    Well, after much playing I noticed when picking up a single item, I saw two icons float down into the inventory bag, when only one was picked up, got me thinking that something was loading twice. I went back over this forums thread, last bunch of pages; and saw some comments about "When the player is dynamically instantiated the “Is player dynamically instantiated” has to be enabled on the InventoryPlayer component".

    So I started to play with this option, and hey presto, fixed it. I have a question about assigning the inventorycollections though, I cannot seem to do it, albeit it, everything looks like it works fine. I get three information messages about SkillBar/Character and Inventory loaded..as per screenshot though below, ingame, no Inventory is shown? is that a problem, here is a screenshot and the code I use:

    upload_2016-2-26_9-52-13.png

    public InventoryUI[] InvUI = null;

    //InventoryUI Invui = GameObject.Find("Canvas").transform.Find("InventoryWindow").GetComponent<InventoryUI>();

    invPlayer.characterCollection = GameObject.Find("Canvas").transform.Find("CharacterWindow").GetComponent<CharacterUI>();
    invPlayer.inventoryCollections = InvUI;
    invPlayer.skillbarCollection = GameObject.Find("Canvas").transform.Find("SkillBar").GetComponent<SkillbarUI>();

    invPlayer.Init();

    If I comment out (invPlayer.inventoryCollections = InvUI;), which is null, I get errors. I tried the commented out line from another thread, but it does not work, will not compile..http://forum.unity3d.com/threads/in...bile-support-more.308505/page-34#post-2437987
    the GetComponent<InventoryPlayer>().inventoryCollections.SetValue(invui, 0);

    So is it a problem that in the screenshot, the 'InventoryCollections' is blank ?

    Thanks

    Carme


    For anyone else: if you pick up a single item, and you see two icons float into your bag AND when you go to sell an item whereby you only have one of that item, but you can actually sell two, and I guess if your instantiating your character then you need as joris has posted several times, to tick “Is player dynamically instantiated” and map your inventory in code, just after you instantiate your character. (My problem here Joris is that I didn't tick that option, but I received no errors!, everything look fine and dandy, just a weird selling twice error appeared..)
     
    Last edited: Feb 26, 2016
  19. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Where is the "public InventoryUI[] InvUI = null;" set to null? Arrays should never be initialized to null, just a length of 0. When it's a length of zero you can safely iterate over it without problems.

    Also, when you hadn't had "Is dynamically instantiated" checked, didn't you get an error / warning in the console? If the player is more than once initialized it throws an error that it was previously initialized. Or at least should.
     
  20. Theekshana-A

    Theekshana-A

    Joined:
    Sep 27, 2014
    Posts:
    81
    Hello there again, I can't seem to be able to get my items to move out of my inventory. It won't move. I have a feeling I have done something wrong. What could be causing this?
     
  21. Carmexx

    Carmexx

    Joined:
    Jul 29, 2014
    Posts:
    63
    No errors/warnings in console, clean.

    ok, so i think I've got it working. No errors, everything looks good.

    upload_2016-2-27_0-44-57.png

    Code (CSharp):
    1. InventoryPlayer invPlayer = mCrusader1.GetComponent<InventoryPlayer>();
    2.  
    3. InventoryUI Invui = GameObject.Find("Canvas").transform.Find("InventoryWindow").GetComponent<InventoryUI>();
    4. mCrusader1.GetComponent<InventoryPlayer>().inventoryCollections.SetValue(Invui, 0);
    5. invPlayer.characterCollection = GameObject.Find("Canvas").transform.Find("CharacterWindow").GetComponent<CharacterUI>();
    6. invPlayer.skillbarCollection = GameObject.Find("Canvas").transform.Find("SkillBar").GetComponent<SkillbarUI>();
    7. invPlayer.Init();
    8.  
    9. InventoryPlayerManager.instance.currentPlayer = invPlayer;
    I removed the entire line public InventoryUI[] InvUI = null;, didn't need it.

    So mCrusader1 is my instantiated chararacter, the rest is easy to follow.

    Thanks for your help, might be basic stuff to you, but for us mere mortals, its hell :)
     
    Last edited: Feb 27, 2016
  22. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I just imported the latest version into a project. How do I set up the Input for game controller support? Do I have to define the inputs myself or is there a way to import the input definitions? Also, I've opened a few of the demos and all of them so far have had issues with missing prefabs.
     
  23. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Did you check "Can drop from collection" on the collection you're trying to drop from? Also, did you add the InventoryPlayer component to your character? And finally, in the drop settings (Tools > Inventory Pro > Settings > Dropping) what settings did you use?
     
  24. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Prefab connections certainly shouldn't be broken. Did you use the import 'tutorial'? (deleting the old folder and doing a clean import of the InventorySystem folder?). Also, yes the input values have to be manually entered, you can set which axis to use in the InputManager which is on the _Managers object.
     
  25. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    It was a fresh install into a project that never had Inventory pro before. I did tell it not to install standard assets, but I already have standard assets so that shouldn't have mattered. No, I didn't see any import tutorial. I just imported the package as any other package.

    Thanks for the tip on input.
     
  26. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Here is a screenshot of the 8.AllDone demo scene showing the Missing Preab. From the hierarchy can you tell what's missing?

     
  27. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    The image isn't showing up.
     
  28. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I know. Trying to fix it, but not working. here is the link instead:

    http://imgur.com/ulUJiJx
     
    hopeful likes this.
  29. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    I just installed Inventory System to test your situation above. I'm using the latest version (2.4) in version 5.3.1f1 of Unity. Running the 8.AllDone scene.

    I don't see this missing prefab problem. I suspect it has to do with how you handled the standard assets.

    Where you have the custom monsters, missing prefab, then trap, then sphere, I have the custom monsters, trap, third person controller, and sphere.
     
    jorisshh likes this.
  30. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I must have removed third person controller or not imported it because I use TPC from Opsive. Re-importing that fixed it. Thanks.
     
    jorisshh and hopeful like this.
  31. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I'm confused. I thought the WorldUI sample was one where the UI was positioned in world space like the following image:



    But the sample in the package is just an ordinary flat 2D UI. Which demo is supposed to show how to do it like in the image above?
     
  32. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    This is actually camera space - You can enable this in the 8.AllDone demo scene (or any other scene that is in camera space) by adding the UIWindowAngleChanger component to the window. This will set the rotation when the window is dragged. You might want to tweak the angle effect amount, to much can be rather annoying :)

     
  33. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Click on a crafting station to see examples of the world UI in the WorldUI demo.

    In the 8.AllDone scene, you can see the effect on the Consumable Only window and the log window, though it helps to be in full screen mode.
     
  34. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Thanks. That worked great.
     
  35. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Is there a tutorial explaining what input names to add and where all the changes need to be made. As I look at the Inventory Input Manager on _Managers, I see DPadVertical and DPadHorizontal. So, that's easy enough. I add those inputs and assign them to the appropriate Wii U dpad buttons. However, in the controller example, when I press Escape, I get the inventory selection bar. Where is the escape key set up so I can change that to a Wii U gamepad button instead? Also, in the controller demo, there are places where it has an "A" icon. I assume this is for the A button, but I also don't see where I'm supposed to assign what button is being used here or what it should be called. And finally, there are a few other places in Inventory Settings Manager that seem to be key assignments, but very cryptic what I should be setting these to. For example, there is Unstack Keys and it's set to Event Type = On Pointer Up and Button = Right and Key Code = Left Shift. What are those for? How do these map to controller input?
     
  36. Theekshana-A

    Theekshana-A

    Joined:
    Sep 27, 2014
    Posts:
    81
    I have asked many times for this but I have never got a official response directly from you on how to do this. The way I have been trying to test the clicking on the inventory windows is my disabling the fps controller script so I can disable fps mouse. I am wondering, how I can do this a simple way. I hardly know C#. Please help. Thanks for taking your time
     
  37. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Theekshana-A and jorisshh like this.
  38. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    All inputs for windows are on the window components themselves (inside the canvas), same goes for the buttons. All input for the controller buttons are mapped on that object (also in the canvas).

    The input in the settings is for broader usage, such as item pickup, which applies to all items in the world, or all wrappers (the inventory slots).

    There is some documentation at: http://devdog.nl/documentation/controller-support/
     
  39. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    You could use window events ( http://devdog.nl/documentation/windows-pages/ - UIWindow actions all the way at the bottom ). Simply create a new action, and disable the FPS controller when the window is shown, and hide it when hidden.
     
  40. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Thanks. I've gotten a little ways with this. I changed the button to pop up the menu to a Wii U Gamepad button and while the button does respond, the menu doesn't pop up correctly on the Wii U. It's very odd. I see the semi-transparent background pop up, but no selection menu. I even changed the Canvas Reference Resolution to match the game at 720p, but it didn't work. I'm a bit stumped at the moment why the menu won't show.
     
  41. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Hm.. not sure, I don't have a Wii so that makes it a little hard to test. Maybe it's because of the animations? I noticed these sometimes don't finish completely due to low framerates.
     
  42. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Thanks for the tip. When I get a chance I'll look into that area.
     
  43. Theekshana-A

    Theekshana-A

    Joined:
    Sep 27, 2014
    Posts:
    81
    I can't seem to get this to work. Now I got my fpscontroller to disable while in inventory so got that working. Thanks for that. but I don't seem to be able to move items or interact with them at all in the inventory.
    I am getting this error but I am not sure what it is meant to mean.


     
  44. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    In order for the layout collection to be displayed properly you need to have the appropriate DynamicLayoutGroup component on your container. Which you currently don't have.
    You can either check the box "Ignore layout items", which will force them to a single slot, or add the DynamicLayoutGroup on your container (check the setup wizard for an automated fix).
     
  45. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    hopeful likes this.
  46. Theekshana-A

    Theekshana-A

    Joined:
    Sep 27, 2014
    Posts:
    81
    I did this and it breaks by layout and it messes up how the item squares in the inventory looks. Does this effect interaction with the actual items at all?
     
  47. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Did you set up the rows and columns count on the component? Also, what version of Unity are you using?
     
  48. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    I'm thinking about writing a quest system. And was wondering who'd be interested in such a thing, and what features they'd be looking for.

    So far I've got:

    Quest types:
    • Kill quests
    • Gather quests
    • Transport quests (delivery quest)
    • Protection / guide quest (protect an NPC and guide them to a location)
    • Quests with sub-tasks (for example, collect some items, deliver them to someone, talk to NPC).
    • Quests with time limits (survive for N seconds)
    • Crafting quests (Combined with Inventory Pro crafting)
    • User input quests (Enter cypher combination, enter password, etc)
    Features:
    • Extensible of course
    • Performance
    • Custom quest support
    • Repeatable quests / Static quests
    • Quest unlocking at levels / custom conditions
    • Dialog editor for conversations (maybe? < Might be to broad)
    • Easy editors for setting up quests + rewards + required items, etc
    • Inventory Pro integration
    • uGUI (Unity UI) + Integration with sci-fi UI.
    • Saving and loading all all quests and achievements

    Thinking about adding a Achievements system in as well (could even be connected with something like Google Play for android to sync up user's achievements), as it's very similar and requires the same information as quests.
    For example, do 20 quests and get some reward. Kill 100 enemies, some reward.

    Edit:
    Consider an implementation with: https://www.assetstore.unity3d.com/en/#!/content/33063 < For example, a good relation with an NPC gives you 10% more experience, currency or reward items. A bad relation might avoid you from taking a quest, and so on.

    What features would you like to see?
     
    Last edited: Mar 4, 2016
  49. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Nice Idea jorisshh!
    I think it should also be important to decide what quest system you use if you use Dialog System for Unity because it does also come with a Quest System I think. Or perhaps you also can read out informations of Quests done with the Dialog System and convert / add them to your system if wanted. But I think that is a lot of work...

    As for quest I would take a look to "The Secret World" is has a lot of non typical "standard quests".
    What comes to my mind and I did not see in your list would be:
    - Find location XY. This is more a explore quest without giving hints on a Mini Map.
    - Escort Quests. But I think you thought of this type by saying "Protection / guide quest (protect an NPC and guide them to a location)"
    - Counting down time Quests. Like survive or do something XX minutes. Quest is completed when XX Minutes reach 0 after counting down and you still live or you did something.
    - Crafting Quest with your Craft System
    - Fill out quests. Like reading a letter a word or number is missing and you need to type this number or word. Like in adventure detective game.

    Well I just can recommend TSW for lot of nice quests.

    Cheers
    Ronny
     
    jorisshh likes this.
  50. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Oh I like those :D, hadn't thought of crafting quests, those will make a nice addition (updated list on previous post :))