Components

This page outlines the main system components and handlers found in this asset as well as links to their relevant documentation pages.

Main Actor Components

AC_InventorySystem - Found in the Blueprints/Components/ folder is the main system component, responsible for initializing the enabled systems. This component should be added and configured on the player controller.

AC_Inventory_Storage - Found in the Blueprints/Components/Systems/ folder is what we use instances of when we want to store and manage items. In previous versions of this asset we referred to this component as just AC_Inventory. For the player related storages (inventory, hotbar, equipment and bank) these are added to the player controller by our inventory system component. For everything else these should be added right to the actor. You can learn more about items in the Items chapter, and check out the Working in Blueprint chapter for examples of working with it to add, remove and manage items and item data.

AC_Inventory_Crafting - Found in the Blueprints/Components/Systems/ folder is responsible for everything related to the recipe crafting system. For the player this component can be found on the player controller and is added through the AC_InventorySystem component. For workstations it is found on the actor. View the Crafting chapter to learn more about this component.

AC_Inventory_Currency - Found in the Blueprints/Components/Systems/ folder tracks the currencies owned by the player and shows the amounts through the currency window. View the Currency chapter to learn more about this component. This is only used by the player and can be found on the player controller and is added through the AC_InventorySystem component.

AC_Inventory_Equipment - Found in the Blueprints/Components/Systems/ folder is used to show items on our pawn that are saved in our equipment storage component. This component is added to pawns. For the player this is added on start, and on possession of a pawn through our AC_InventorySystem component. For equipping NPCs there is a helper component you should use instead of manually adding this. You can learn all about this component and everything else equipment related in the Equipment chapter.

AC_Inventory_Interaction - Found in the Blueprints/Components/Systems/ folder allows the player to interact with interactables and pick up items. This is added to the player controller through our AC_InventorySystem component.

AC_Inventory_Loot - Found in the Blueprints/Components/Systems/ folder handles defining and spawning loot for us when we call the spawnLoot function. For player loot this is added and configured through the AC_InventorySystem component. For everything else this can be added right on the actor. See the Loot chapter to learn more about this system.

AC_Inventory_Vendor - Found in the Blueprints/Components/Systems/ folder manages the stock of buyable items on a vendor and lets players sell items from their inventory. The Vendor chapter will go over how this all works.

AC_Inventory_Workstation - Found in the Blueprints/Components/Systems/ folder lets us craft recipes from a specific actor. It is responsible for managing the state of the workstation, fuel and tools. While it does not know anything about the crafting component, and vice versa, the two can communicate with each other using blueprint interfaces on the shared actor. For example the crafting system has a way to require tools for recipes, it uses this blueprint interface to ask the actor if has the tools. The actor uses this interfaced function to check the workstation and respond with the result. Learn more about crafting system and workstations in those chapters.

Base Handlers

AC_EquipmentHandler - Found in the Blueprints/EquipmentHandlers/ folder is our base equipment handler, responsible for showing and providing functionality to equipment equipped through the equipment system. Instances of these components are attached to our pawn through the equipment system. View the equipment chapter to learn more about equipment handlers.

AC_UsableItemHandler - Found in the Blueprints/UsableItems/ folder is our base usable item class. When we want to provide a special purpose to an item like how a healing potion gives health to the player, we do so using these handlers. We define what happens when we use an item in the DT_Items data table. You can learn more about this handler in the Usable Items chapter.