#For the past couple of days I’ve been working on the new Inventory System for Tower Unite.
####The inventory system consists of a data backend that can be saved / loaded / and networked to clients and a UMG frontend that dynamically populates a grid with Inventory Slot UI Elements.
####The backend is divided up into 3 basic components:
- Inventory Items
- Inventory Slots
- Inventory Containers
Inventory Items are Unreal Actors that can be placed in the world, and can also be stored internally as UObjects for the purposes of serialization and data storage.
They are also Blueprintable, allowing designers / modders to create their own items for the game.
Items are loaded at runtime using the AssetManager so they can be added without needing to recompile the game.
Inventory Slots can each contain a specified class of Inventory Item.
The items in this new system stack based on type.
So if you have 4 trampolines you only need a single slot to store them in.
Inventory Containers can be anything that contains items, like a backpack, or a vault.
An inventory container basically has a list of Inventory Slots and manages the overall networking / synchronization of the player’s inventory.
There is also a set of utility functions to control how items get distributed among individual slots.
###Now that I’ve bored you to death with technical details, here’s an early screenshot of the UMG frontend working in-game.
very early prototype
####I’ll keep you all posted as I work on this core component of the game.