1. Home
  2. Docs
  3. Inventory System
  4. Starter Guides
  5. Character Setup

Character Setup

Step 1 - Add inventory component

Add a inventory component to the character.
Initilize the component on BeginPlay. You can use “Init Component” and check “create default slots” to create a empty inventory or use “SERVER // Init Component and load inventory” to load a existing inventory.
If you dont want that a client can load its own inventory, change the function to not replicated and load it only on the server.

Step 2 - Player controller

Make sure you use BP_InventoryController (or a subclass of it) in your game mode.
The Controller handles the inputs from the UI like move or split item.

Step 3 - User Interface

Create a UI on the client and add it to the viewport. Initilize the widgets and send the UI Reference to the player controller via the “Inventory Interaction Controller” Interface. (see BP_Character_InventoryExample -> BeginPlay)

The inventory manager need this to open close widgets.

Step 4 - Copy Example Functions

There is only one important function you should copy, its for the interaction with world objects like loot or chests. You can find it in the BP_Character_InventoryExample.

Step 5 - Use inventory to update character

You can use the dispatcher “OnInventoryChange” to update character meshes (weapons, armor, etc.) when a equipment slot changes.

How can we help?