Forum rules - please read before posting.

Multiple-slot occupying items

Greetings,

Is there any solution within AC inventory system to make some kind of items which could occupy multiple neighbouring slots within the grid-designed inventory? Like, for instance, a spear could occupy few vertical slots or battle axe could occupy 2x5 rectangular space in slots.

Comments

  • I'm afraid not - for this, you'd need to rely on a separate Inventory asset and use a custom script to link it with AC.

    Broadly speaking, you'd need both AC and the separate asset to have the same Items defined, and hook into AC's OnInventoryAdd/Remove custom events to similarly add/remove items from the other asset. Then, when an item from the other asset is selected, the AC equivalent would also become so.

  • Thank you, Chris!

    There are two additional questions please,

    In the distant future, would you consider extending AC's inventory functions in such a way?

    And regarding using another inventory system, your UCC v3 integration asset allows to sync items between AC and UCC. In this scenario, would UCC merged with their own UltimateInventory system still be synchronized with AC's inventory through your UCC v3 integration asset?

  • In the distant future, would you consider extending AC's inventory functions in such a way?

    It's something I will give thought to, yes. However, it is a complex feature, and not something I'd introduce unless it was stable/robust enough.

    Any details you can share about how you'd use such a feature would be welcome.

    In this scenario, would UCC merged with their own UltimateInventory system still be synchronized with AC's inventory through your UCC v3 integration asset?

    The UCC/AC inventory mixing is actually the other way around - with the picking up of UCC items causing their AC equivalents to be added as well. If UIS can automatically add an item when UCC picks one up, then you should be good.

    I'm not that familiar with UIS, but I'd expect you'd want something along these lines here as well - with UIS handling the display/management of items, and AC merely providing Hotspot interaction duties.

  • It's something I will give thought to, yes. However, it is a complex feature, and not something I'd introduce unless it was stable/robust enough

    Thank you very much! And of course, I do understand.

    Any details you can share about how you'd use such a feature would be welcome.

    I used the AC inventory a lot in my previous project (I was very happy with it), but for my current project I would decide to make something similar with inventory from Resident Evil 4:
    https://mega.nz/file/JSAXkDBL#KhOpk4wVi7f--mN0pt1jNlXn0ILfCe3o2wxa15OlFMg

    I checked UIS manual and their Item Shape Grid system:
    https://opsive.com/support/documentation/ultimate-inventory-system/ui/item-view-slots-container/item-shape-grid/
    So if Opsive's integration between UCC and UIS works like you wrote above, then AC's UCCv3 integration asset would be the solution for me. However, I would be happy to rely solely on AC's native inventory system once again, without such a complex scheme with Opsive assets, if it were possible, even if only in the distant future.

    I was also wondering if there is any way to make a workaround within AC, something like:
    1. In the Inventory manager extra interactions for Items: 'put in any slot' and 'take from any slot' to activate ActionLists during such events
    2. Extended Action 'Inventory: Add or remove', with the ability to add/remove/replace any item in any inventory slot (Linked Button (1,2,3...) )
    3. Extended Action 'Inventory: Check' with the ability to select any inventory slot (Linked Button) and check if it is occupied now.

    I thought that would be enough to implement a primitive multi-slot item grid system with ActionLists only - when we put the item into any slot, we instantly fill the neighbouring slots with fragments of the 'big item', and vice versa, taking any of those items, we clear all the fragments. However, this would work with tiny items only (which occupy only 2-3 slots), and even in this case the ActionList for each item would contain dozens of Actions, checking if each slot in the entire grid was occupied or not.

  • Custom Actions are possible - this tutorial covers the process.

    To override the Inventory menu's behaviour, set the InventoryBox element's Inventory box type property to Custom Script. This disables the default click behaviour, allowing it to be set by hooking into the OnMenuElementClick custom event.

  • Got it, I've seen how you called an ActionList through OnClick event in the shop system template.

    Thank you so much again!

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.