UE5 Inventory and Item System
This page is part of the documentaiton for my UE5 Inventory and Item System

Setup Guide

UE5 Inventory and Item System Version: 3.0
    UE5 Inventory and Item System

    Core System Setup (Start Here)

    To get the base system setup all you need to do is open your Player Controller and attach the AC_InventoryItemSystem Inventory Item System (Player Controller) component.

    Now press play and you should see the hotbar, and if you press I it should show the inventory.

    If you made it this far you have setup the core system, you can begin adding items to your world as well as all the interactables. When you are ready to move on I recommend setting up your pawn for use with the equipment system.

    Dyno! It doesn’t work!

    The most common reasons it will not work at this point are:

    • You may have attached the component to the player character and not the player controller. If you do not have a player controller you will need to make one first.
    • You may have attached the wrong component to the player controller. There are several components with the keyword “inventory” in the name. Make sure you add the one with the label Inventory Item System (Player Controller). If you did add one of the others make sure to remove it.
    • The player controller you added it to might not be the one being used by the Game Mode for the Level you are playing.
      Show me how to find it Dyno!
    • The hotbar shows but when you press the i key the Inventory doesn’t show. This is most likely because you are consuming the i input somewhere else in your project. View the chapter on Input & Key Bindings to see how it is handled in this system and how you can change the key bindings.

    What's left to setup?

    Additional steps are required to set up your Character Pawns for use with the equipment system and if you would like to use the included crafting system you need to add the AC_Crafting Crafting & Recipe System component to your player controller.

    All other included subsystems are set up automatically for you based on your configuration of the variables found on the AC_InventoryItemSystem component you added to your Player Controller.

    How do I always show the mouse cursor?

    By default the system will control showing the mouse when UIs for it are shown and hidden. It will also control changing the input mode. You can adjust and disable this behavior by changing the values of the CanControlMouse?, onShowUISetInput and onHideUISetInput variables on the AC_InventoryItemSystem component you added to your player controller (browse the details panel to the UI section).

    Lyra Support

    While I did successfully integrate the core system into Lyra it did require additional steps to create the player controller (like we had to do in Version 2) as well as integrate the enhanced input mappings into Lyra’s unique input system handler/controller.

    My current experience with Lyra is pretty limited and I am not sure if my method is the best way to handle it so for now I am not providing a setup guide for Lyra for this version of my asset. When time permits I will spend some more time familiarizing myself with Lyra and then improve on this section of the guide.

    If you are a Lyra expert and have a solid understanding of Lyra’s input system you should have no problem getting my system setup and integrated. Make sure to see the chapter on Input & Key Bindings to see how they are handled in this system, this will make moving everything into Lyra’s input system easier on you.

    I did resolve the visibility issue from Version 2 with Lyra where you would not be able to use the menus, but you will still need to manage the mouse cursor if the inventory is toggled while a menu is open. I recommend either adjusting the getWindowsUsingMouse function inside the UI_ItemSystem to account for the Lyra menus and windows when the mouse needs to be still available (after the inventory is closed), or edit the Lyra widgets to disable and enable the inventory to prevent it from controlling the mouse when the Lyra widget is open, then just force the cursor to show again on open.

    To make this enabling and disabling of my system easier on you I provided a few functions in the global blueprint function library for enabling, disabling, hiding and showing the inventory and the hotbar. To use, just call the disablers (disableInventory / disableHotbar) when the window is open, and call the enablers (enableInventory / enableHotbar) when the window is closed.

    Subsystem Removal

    If for whatever reason you do not want to use the equipment system, or the currency system you can disable each right from the details panel of the AC_InventoryItemSystem component you attached to your player controller.

    This documentation and asset version are new. If you encounter any bugs or if anything doesn't make sense, please let me know.