> For the complete documentation index, see [llms.txt](https://pororoca-works.gitbook.io/s.b.i-simple-basic-interaction-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pororoca-works.gitbook.io/s.b.i-simple-basic-interaction-documentation/basic-inventory.md).

# Basic Inventory

### Basic Inventory System

**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.

***

#### 🧍 Player Inventory

The player’s inventory is stored as a **Map** inside the `AC_PlayerInteractions` component:

<figure><img src="https://2763894655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrKEdL4IPuDIPLmnegKb%2Fuploads%2FqeZloYLYhqHQgdUyUtpA%2Fimage.png?alt=media&amp;token=ad9717ad-17af-41ae-899c-c233d13fbfae" alt=""><figcaption></figcaption></figure>

Each entry tracks the quantity of a specific item the player is carrying.

***

#### 🗄️ Container Inventory

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:

| Variable      | Type                    | Description                                                                                                                                                                                          |
| ------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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.

<figure><img src="https://2763894655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrKEdL4IPuDIPLmnegKb%2Fuploads%2FLYrkgKjC5uemABxGrVT7%2Fimage.png?alt=media&amp;token=5c55c15d-988e-4667-a675-da4bef1afc6e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2763894655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrKEdL4IPuDIPLmnegKb%2Fuploads%2FGf8JVn1xmKtMgSiafCcI%2Fimage.png?alt=media&amp;token=150c2a27-0ad2-44dc-b5e5-ffa7af0837ed" alt=""><figcaption></figcaption></figure>

***

#### 🧱 Creating New Items

To define new items:

1. Add a new entry to the `EN_Item` enum.
2. Add a corresponding row to the `DT_ItemList` data table.

By default, each item includes:

* `Name` (display name)
* `Weight` (used for inventory weight checks)

<figure><img src="https://2763894655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrKEdL4IPuDIPLmnegKb%2Fuploads%2FQKuDLrdmopw4ktSTYxRy%2Fimage.png?alt=media&amp;token=51366ef9-419e-4bad-a324-d5b2046d57f5" alt=""><figcaption></figcaption></figure>

You can expand the system by adding more columns or attributes as needed.

***

#### ➕ Item Pickup

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.

<figure><img src="https://2763894655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrKEdL4IPuDIPLmnegKb%2Fuploads%2F5wrnFBFKIzoF1eq2ZlFx%2Fimage.png?alt=media&amp;token=166a3b3f-ca26-4dab-8507-baa2a6575ee1" alt=""><figcaption></figcaption></figure>

***

#### 🔁 Item Transfer & Weight Handling

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.

<figure><img src="https://2763894655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrKEdL4IPuDIPLmnegKb%2Fuploads%2FBzrjjzJQhByp4f3lJM5S%2Fimage.png?alt=media&amp;token=20eee168-be0d-484c-a076-a79dd11f6edd" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2763894655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrKEdL4IPuDIPLmnegKb%2Fuploads%2FacoPrHWjgfnpWUKMoZWt%2Fimage.png?alt=media&amp;token=c1d5f473-072d-489f-89fc-6859bc1c79b5" alt=""><figcaption></figcaption></figure>

***

#### 🧩 Integration with Other Inventory Systems

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.
