Forum rules - please read before posting.

Integration with Inventory Pro

Hello, are there any plans to integrate Inventory Pro with AC?
Having Dialog System and Inventory Pro with AC will make this a powerful tool

Comments

  • It's not immediately clear whether integration would be best coming from AC or IP - nor if it would be better to instead make it easier for a bridge script to link AC with any such inventory asset.

    Thank you for bringing it to my attention - I can't say for sure at this time, but I will certainly take a look.
  • I suppose it would require more people requesting this. I too think this will be great.
  • edited March 2016
    I have been looking into it, but I feel this is something that would be better off being done by a bridge script, rather than AC referencing anything in Inventory Pro directly - making it more open to other such assets, rather than limiting things to just one.

    AC's scripting guide should provide the functions needed.  The key one being AC.KickStarter.runtimeInventory, which provides functions to add, remove and select items by their ID number.  In order for inventory interactions to still work, any inventory items made in e.g. Inventory Pro would also need to be made in AC.  It would then be a case of creating a new custom Action that keeps AC's and Inventory Pro's inventory in sync, and calling it as appropriate.  Finally, you'd need to select AC's inventory items when clicking on Inventory Pro menus - again the RuntimeInventory script provides a Select function.

    More such functions can be added if appropriate and necessary, but - again - the intention is to allow AC to be bridged with any such asset, rather than only working with one.
  • Thanks for the elaborate expansion Chris.
  • Did anyone actually create the bridge script? Inventory Pro would be a phenomenal addition, specially for game hybrids. That would allow to easily have large quantities of items, coupled with the customizable screens and layering and organization and equipping, etc. I've been checking out adventure creator and I absolutely love it, its simple, yet powerful, great for games without a battle system, but my concern is that I want my game to have plenty of items (from cooking, crafting, tailoring), and have one or two stores, and seeing how regular adventure games rarely have you carry tons of stuff or sell anything, I was worrying managing the items and quantities may become rather confusing or inefficient, I was thinking of creating global variables to manage them but they might become too many and unwieldy?... unfortunately, I'm not a programmer... which is another reason I'm so interested in AC. Anyways, being able to use AC with a plugin like inventory pro would save me a lot of trouble and pain... so any advice would be greatly appreciated. thanks in advance.
  • I might take a stab at this actually but am by no means a very good coder. Agree that it would be a great combination!! Devdog has also released a Beta for a UI that incorporates a 3D model display, which I've been trying to adapt for a while, and that links directly with Inventory Pro. I have absolutely no idea if the whole thing could be bridged together with AC...and as they are nice to haves, AC is pretty necessary to my project. For now I'll just echo that it would be great if someone could share a bridge script, were they able to come up with one.

  • Any progress on this?  Thanks for any info or hints you can give.
  • I just purchased Inventory Pro. It has everything I want and I will be integrating it with AC. I will update everyone with my progress and share my results if I'm successful and the solution ends up not being too much of a kludge. If anyone else has any experience integrating InventoryPro with AC it would be greatly appreciated if you shared your experience.
  • Custom events might also be useful when doing so, which weren't available when I first posted here.
  • I have created a sandbox project that has AC and Invetory Pro in it. I can pop up an Inventory Pro window but the mouse and keyboard are still being handled in AC's event system. What is the best way to lock out AC to allow keyboard and mouse control by the Inventory Pro window?
  • Already answered my own question. I just have the AC inventory menu use the Unity UI in the scene as the source. The linked canvas is the canvas that contains the Inventory Pro window. Pausing the game in the AC inventory menu causes control to be in the hands of the inventory window until it is closed.

  • @spcmicro Can you please share the integration with Inventory PRO ?
    Thank you!
  • Hello, I was just wondering if any further progress was made by spcmicro to an integration solution for inventory pro? Or, if there are other inventory assets that are able to be integrated with AC? Thanks.

  • @tomtomterrific You can PM users from their profile page - that may be the best way to get in touch with spcmicro.

    For inventory pro, and other inventory assets, the principle is the same - rely on the provided Inventory events to sync up what the player is carrying in AC, and what they're carrying in the other system. See the Manual's "Inventory scripting" chapter in the Manual for a full run-down of all Inventory events.

  • Don't know if you guys know but last year inventory pro was open sourced: https://github.com/devdogio/Inventory-Pro

    I was wondering if the recent changes add or remove an extra layer of complexity from the previous integration attempts.

    Also I would like to add uma to my workflow but I'm at a loss to where to start. Any pointers would be apreciated.

  • edited December 2020

    Welcome to the community, @Panzer_Ravana.

    Certainly it being open-sourced makes it more widely-accessible, though (presumably) that's countered by a lack of official support.

    AC's custom inventory events are the way to go with any kind of inventory-related integration - see the Manual's "Inventory scripting" chapter.

    Which aspect(s) of Inventory Pro are you interested in over AC's own Inventory system? Exactly what form such an integration takes would depend on the requirements of the project.

    Working together with UMA should be fairly problem-free, however. So long as both UMA and AC reference the same Animator, they shouldn't get in each other's way. Starting with a base UMA character (i.e. a GameObject with the Dynamic Character Avatar), attach either AC's Player or NPC component as well as an Animator with your intended Animator Controller assigned. If you need more guidance with getting these two working together, share details in a new thread on Technical Q&A and I'll advise further.

  • edited December 2020

    Thanks @ChrisIceBox !

    Bear in mind that right now I'm just making a more simple adventure game to get used to the whole process. So I haven't ironed out all the details but on a future more fleshed out game:

    I would like a more rpg styled inventory, as opposed to AC's point and click one. And I also like the fact that you can use uma with inventory pro to switch clothes on the fly. As I was hoping to use AC for the "overworld" part of my game and integrate some grid based combat. And equipping gear is an integral part of rpg's.

    Also I was planning on using a more low poly/simplified character for general gameplay as to avoid clipping and whatnot. And a more detailed character for cutscenes. But It might be easier to just let the uma auto mesh hider deal with that.

    One thing that I plan on doing on my current project is: Having My character train in a gym and have a musculature blend shape adjusted to that level. I was planning to do this with just a global variable and have an action happen on each scene load for the shape.

    But if It's not complicated to integrate UMA It might just be easier to let uma handle it as opposed of having to put the same action on every scene.

  • edited December 2020

    I would like a more rpg styled inventory, as opposed to AC's point and click one. And I also like the fact that you can use uma with inventory pro to switch clothes on the fly. As I was hoping to use AC for the "overworld" part of my game and integrate some grid based combat. And equipping gear is an integral part of rpg's.

    It'd be possible to script a custom "equipping" system in AC alone by overriding the click behaviour of an AC inventory menu, but given that UMA connects with Inventory Pro, it does sound like that would be the more natural choice.

    Again though, how exactly you approach an integration like this can vary. You could, for example, create both AC and IP variants of each item, and use AC events to sync the two inventories. That way, when you collect an AC inventory item, it automatically adds the IP equivalent to the IP inventory. This kind of "dual inventory" approach approach if you wanted to run AC inventory interactions when e.g. using items on Hotspots.

    If that isn't necessary, however, you might be better off simply dealing with IP alone. Custom Actions could be used in place of AC's own Inventory items, so that you can add/remove IP inventory items directly in ActionLists. First learning how AC is "supposed" to be used (i.e. when used solely) is certainly a wise choice, though.

    One thing that I plan on doing on my current project is: Having My character train in a gym and have a musculature blend shape adjusted to that level. I was planning to do this with just a global variable and have an action happen on each scene load for the shape.

    If your Player character is spawned in automatically via the Settings Manager, they'll persist in the game as you switch scenes - so you shouldn't need to re-apply their Blendshape level each time you enter a scene, just when reloading a save-file - which is a simple case of hooking into the OnFinishLoading custom event:

    using AC;
    using UnityEngine;
    
    public class SetBuffnessOnLoad : MonoBehaviour
    {
    
        public int shapekey;
    
        void OnEnable () { EventManager.OnFinishLoading += OnFinishLoading; }
        void OnDisable () { EventManager.OnFinishLoading -= OnFinishLoading; }
    
        void OnFinishLoading ()
        {
            float buffness = GlobalVariables.GetVariable ("Buffness").FloatValue;
            GetComponent <SkinnedMeshRenderer>().SetBlendShapeWeight (shapekey, buffness);
        }
    
    }
    

    Though as you say: UMA should also be able to handle it.

  • Not gonna lie, I'm still very confused about all of this. Is there anywhere where I can read more on how to use uma with AC?

  • edited December 2020

    UMA should work with AC without any hassle. You can create an AC/UMA Player by following the 3D Character tutorial, only using a GameObject with a Dynamic Character Avatar component as a starting base.

    Essentially: add a Dynamic Character Avatar component to a new GameObject, attach an Animator component and assign an Animator Controller (to quickly test, use UMA's Locomotion asset). Then attach AC's Player component, set the Animation engine to Mecanim, and set up the Mecanim parameter fields (if using Locomotion for your Animator Controller, set the Move speed float to Speed, and empty the other text fields). Attach any other components (e.g. collider / Rigidbody etc) as required.

    That should then be your AC/UMA Player set up - which you can either leave in the scene, or convert into a prefab and assign in your Settings Manager's "Player prefab" field, to have him be spawned automatically.

    If you have trouble, please post a new thread with screens / details on what you've gotten so far.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.