Basic Inventory
Last updated
Last updated
S.B.I. includes a lightweight, map-based inventory system built for quick interaction setup and small-scale item logic. It’s simple enough for fast prototyping, but modular enough to be expanded.
The player’s inventory is stored as a Map inside the AC_PlayerInteractions
component:
Each entry tracks the quantity of a specific item the player is carrying.
Actors like drawers or crates use the AC_Stash
component to manage their contents.
Inside any BP_MasterTarget
actor, you’ll find the Stash category with these setup options:
HasStash
Boolean
If true, the actor will automatically create and attach an AC_Stash
component at runtime. If false, no component is added — keeping performance clean and avoiding unnecessary components.
Stash
Map<EN_Item, Integer>
Predefined contents of the container
WeightLimit
Float
Max capacity of the stash (in weight units)
On Begin Play
, the stash is initialized using these values.
This logic is handled through the StashCheck
function inside the blueprint.
To define new items:
Add a new entry to the EN_Item
enum.
Add a corresponding row to the DT_ItemList
data table.
By default, each item includes:
Name
(display name)
Weight
(used for inventory weight checks)
You can expand the system by adding more columns or attributes as needed.
Loose items (e.g. GasCan, Access Card, Small Battery) are BP_MasterTarget
actors that automatically trigger the Add Item
interface when interacted with. If successful, they’ll be added to the player’s inventory and removed from the world.
Inventory weight checks are handled globally using functions inside the BPL_InteractionLibrary
.
These are used when:
Picking up items from the world
Transferring items between player and containers
They ensure the receiving inventory has enough free capacity before completing the transfer.
The built-in system is meant to be a simple default — you’re free to replace or extend it to suit your needs.
To integrate with your own custom inventory system:
Modify the BP_MasterControl
or BP_MasterTarget
blueprints as needed
You can either bypass item requirements entirely or rewire the validation logic to call your own inventory queries
🛠️ This system is intentionally simple and flexible. It’s a great starting point for prototypes and modular expansion into more advanced inventory mechanics.