In my game I want to have several different inventories on a player. Something like Small pockets and Big slots(like backpack). And while small Items, like documents or money can fit in both small and big slots, big items, like axe, need only big slot and can't be carried even if you have 4 small pockets empty. I looked around ORK and Inventory containers sounds like something I have in mind, but I did not understand that feature fully. So, can I achieve something like that or that not yet possible?
Also I would like certain equipment to add inventory slot(for example jacket adds two small pockets and backpack add four big slots). I imagine that should be available through abilities, that adds a variable? But again, that only works with one inventory.
  • Yeah, sounds like something inventory containers can do. There's no tutorial for them yet, but it's not that complicated.

    Generally, you can set up different inventory containers, e.g. one for your small pockets, one for your bagpack with the big slots.

    Each inventory container defines the number of slots it has, and you can also use e.g. a formula for that. So, you can use a formula that adds additional slots based on whatever you want, e.g. checking if equipment A is equipped (or item typ B is equipped) and add additional slots based on that. You can also make that status value based, e.g. have status values for the different types of slots and use them directly as the slot number of the container (without a formula). Equipment, etc. can give bonus slots just like any other status bonus.
    Going with status values for the slots is probably the best solution and makes the setup and tweaking easier with new equipment being added, as you'd otherwise have to adjust a formula for each equipment.

    Also, each inventory container can define what kind of conent can be stored in it, e.g. items or equipment. And you can further filter this by limiting which item types can be put there.
    So, for your small pockets you can only allow items, currency and other small stuff - for your big slots you can allow everything, including equipment. Or however you want it :)

    For displaying inventory containers, there's the Inventory Container (Slots) menu part, works similar to the regular Inventory part.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • @gamingislove , I got stuck with displaying inventory slots :/ When I open my inventory in game I only see main inventory box displayed, but no small boxes for individual items(I was trying to display it as a grid). I think my prefabs are wrong? Maybe you could explain what prefabs should be(which components are required) for Inventory box and Item box to be displayed as grid ? Something like this example: orkframework.com/guide/documentation/inventory/inventory-system-overview/#24-toc-title

    Or maybe there will be Inventory UI tutorial in the future?
  • So I managed to make some progress - at least now inventory is displayed properly(my mistake was I tried to use UI Box prefab which does not work with inventory). But it I can only control inventory with keyboard buttons, mouse does not do anything in it - where are the control settings for menu? And another thing - is it possible to display all Inventory containers at the same time? For example if I have 4 small pockets and 2 big slots I want my inventory to display all six slots when I open it. Is it possible? Because I only managed to make my inventory that when I press Inventory button it opens Inventory container selection and when I select one container it displays Items and empty slots in it.
    And I still not quite understand that example that I linked in my previous post - does inventory setup like that use HUD shortcuts? Or how it is done?
  • There'll be a tutorial for inventory containers/slots available in the future (getting Covid somewhat pushed everything back a bit :D).

    Drag and drop controls are set up in your menu screen parts, e.g. the Inventory Container part. There are also settings for allowing split/merge drops.

    If you want to display multiple containers at the same time, you need to add multiple Inventory Container menu parts to your menu screen, each set up for one of your containers.

    The example you linked indeed uses HUD shortcuts, i.e. like in the shortcut HUD tutorial you set up Shortcut UI prefabs. Your Inventory Container part can add using shortcut UIs via it's Content Layout settings, adding the Shortcut UI HUD type.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • @gamingislove Hope to be the first to update this tutorial, this tutorial is badly needed! Thanks
  • edited May 26
    Already know how to set it up
    Post edited by churan on
  • Any update on a tutorial for Inventory Container's @gamingislove?

    I've wasted three days trying to figure out how to get it to work and I'm starting to pull my hair out.
    Currently making: Real-Time Diablo-like ARPG
  • It's next on the list.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • The inventory containers tutorial is finally here - and it's long and detailed :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • @gamingislove , yes, thank you very much for it. I followed it and got pretty much everything working. But one thing I can't figure out - in my inventory everything works only with keyboard buttons. If I try to do anything with a mouse that doesn't do anything. I searched everywhere, tried every setting that mentions anything about mouse, but couldn't get it working. Mouse simply doesn't do anything in inventory(no item selection, I can't change inventory conteiners with a mouse and so on).
    Could you advice where are those settings?
  • Most of those settings can be found in UI > UI Boxes > General Settings, where you can enable/disable if mouse clicks are used, etc. - there are also options for auto selecting what's below the cursor.

    The UI box prefab should also have a UI Receive Cursor Events component attached, but that's added automatically if you create the UI box via the context menu (as you should :D).

    Otherwise, check if something on a higher UI layer is blocking the cursor.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited July 26
    @gamingislove , I was on holiday, so just now was able to try it and yeah, it was a Background layers which blocked mouse input. Now everything works, just one thing - when I try dragging an empty inventory slot or dragging any slot when a context menu is open, whole grid drags like that:
    image
    When I release mouse button everything returns into their original positions.
    Edit: Oh, I see pictures from imgur does not show there :/ https://imgur.com/ItsWxpE
    Post edited by Aratron on
  • Well, this is the regular click-dragging of the scroll rect, since an empty button doesn't have anything going on (i.e. doesn't has anything to drag from it).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • @gamingislove I have one more problem with Inventory containers - I want to use different shortcuts for different containers(small slots for small items and bigger shortcut slots for bigger items). To achieve that I need to use different shortcut keys. Problem is, if I use different containers in same "Inventory Container (Slots)" part, then it use only one Shortcut Key. If I add several "Inventory Container (Slots)" parts, I can set up it to display one conteiner and use specific shortcut key. But then it does not display properly in Tabs field(in default settings all tabs are displayed over another in the first spot). I can somehow workaround that, by setting up different box for every tab, but it's a lot of hassle to manualy put every box in correct spot and if I go fullscreen it changes positions, plus it only works with mouse - Tab change button does not change into different "Inventory Container (Slots)" part.
    So I want to ask, what would be the best way to achieve what I want - be able to use different slots with different UI keys for different containers and to have those containers changeable(and be able to cycle them) by keyboard keys and displayed normally without putting every Tab manually bi pixel?
  • Hm, probably using different shortcut UI with those sizes and have the buttons adjust to the content they display. Additionally, probably the layout where they're added to (e.g. grid layout) also needs to not have fixed columns.

    Each item/equip/etc. can override the default shortcut UI prefab (defined in UI > Shortcut Settings in their own UI settings. Or, even easier, item types can also override the shortcut UI for all of their items.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.