# Survival Grid Inventory

> The Survival Grid inventory style: a small case where each item takes room by its size and can lie turned to fit, key items in their own list, a hip pouch and a stash.

Markdown version of https://rigbak.com/docs/universal-player-combat/inventory-survival-grid, a page of the Universal Player Combat documentation. Link that page when citing it.

## Set it up (5 minutes)

1. **Set the config**

   Set your character's **InventoryComponent** **Config** to `Demo/Items/Inventory/InventoryConfig_UPC_SurvivalGrid`.
2. **Fill the case**

   On `BP_UPC_PlayerController`'s **QuickBarComponent** (the belt), untick **Auto Populate from Inventory** so weapons land in the case, not on the belt. Press Play in `LVL_UPC_Demo` and take the swords and shield off the weapon rack.
3. **Open it and turn a sword**

   Press **I** (or tap View). In the six by four case a sword covers three cells and the shield four. Pick a sword up and press **R** (gamepad Y) to lay it across a row.
4. **Copy it**

   Duplicate the config and its three containers, `Container_UPC_Case`, `Container_UPC_KeyItems` and `Container_UPC_Stash`, into your own folder, where a plugin update leaves them alone. In the config copy, set each **Containers** row's **Definition** to your container copy, then set the config copy as **Config**. On the player controller's **InventoryScreens** component, add your config to **Inventory Screen Classes** with `WBP_UPC_InventoryScreen_SurvivalGrid`; without a row it opens the open world list.

   For a hip pouch of your own, duplicate `Item_UPC_HipPouch` and `Container_UPC_HipPouch`, point the item copy's **Container** fragment **Definition** at the container copy and add the item copy to **Starting Items**: it lands in Key Items and opens its cells under the case.

---

## What it holds

| Row or setting | Does |
| --- | --- |
| **Case** | Six by four grid; an item covers its **Grid Footprint** cells and can lie turned. First in line, so pickups fill it first; its **Item Filter** keeps keys and pouches out. |
| **Key Items** | List for keys and pouches, which take no case room. One of each key item. A pouch opens here. |
| **Hip Pouch** | A bag: in Key Items it opens a row of six cells under the case, framed in the theme's **Extra Cells** look. Items there belong to the pouch, so they drop, enter a chest and return with it. |
| **Stash** | Thirty slots off the character holding the player's items, reached only at a stash box. |
| **Belt Space**, **Equipped Space** | **Frees Its Place**: an item on the belt or in hand leaves its cells and shows on the belt or the Hands doll. Dragging a sword off the belt lands it where you drop it; putting it away needs a free place, and is refused while the case is full. |
| **Combine Sets** | `CombineSet_UPC_Demo`: herb onto herb mixes, rounds onto a magazine load. |
| **Put Away At Once** | On: an item leaves the hand instantly. **Equip At Once** is off, so Equip plays the draw animation. |

---

## Change it

| To | Change |
| --- | --- |
| Make the case bigger | **Grid Size** on the case. |
| Keep every item upright | Untick **Allow Rotation** on the case. |
| Let a pouch add more | **Grid Size** on `Container_UPC_HipPouch`. |
| Grow the case with an item the player keeps | Give an item a **Capacity Bonus** fragment with one **Bonuses** row: **Capacity Tag** `UPC.Inventory.Capacity.CaseRows`, **Amount** 1. While the character owns it, the case becomes six by five, and the player cannot drop it while that row holds something. |
| Carry several of a key | Remove the Unique Key Items rule from **Carry Rules**. |
| Keep an item's cells while belted or in hand | **Belt Space** and **Equipped Space** to **Keeps Its Place**. |
| Show only the belt's items on the body | Untick **Show Carried Items On Body** (ticked as shipped, it hangs the case's weapons on the character too). |
| Equip with no animation, and combine with no wait | Tick **Equip At Once** and **Combine At Once** ([Containers and Rules](https://rigbak.com/docs/universal-player-combat/inventory-containers#combine-sets-and-timing)). |
| Share one stash across characters | Make the box a [loot chest](https://rigbak.com/docs/universal-player-combat/loot-chests) and leave the Stash row out. |

<details>
<summary>The case and key items (Advanced)</summary>

**Details panel: Container_UPC_Case** (data asset, in Content Browser)

**Category: Display**

| Property | Value |
| --- | --- |
| Display Name | Case |
| Icon | None |

**Category: Layout**

| Property | Value |
| --- | --- |
| Layout | Grid |
| Grid Size | (6, 4) |
| Allow Rotation | true |
| Capacity Tag | UPC.Inventory.Capacity.CaseRows |

**Category: Rules**

| Property | Value |
| --- | --- |
| Rules | 1 Array element |
| Rules > Index [0] | Item Filter |
| Rules > Index [0] > Allowed Tags | no tags |
| Rules > Index [0] > Blocked Tags | UPC.Slot.KeyItem, UPC.Slot.Upgrade |

**Category: Access**

| Property | Value |
| --- | --- |
| Carried | true |
| Takes New Items | true |
| Access Tag | None |

**Category: Bags**

| Property | Value |
| --- | --- |
| Opens Bags | false |

*Six columns by four rows, where an item may lie turned. Keys and pouches stay out through its filter. Each point of UPC.Inventory.Capacity.CaseRows the character owns adds a row.*

| Demo item | Footprint |
| --- | --- |
| Sword | 1 by 3 |
| Two-handed baton | 1 by 4 |
| Shield, helmet, shoulder cape | 2 by 2 |
| Magazine | 1 by 2 |
| Everything else | 1 cell |

- An item with no Grid Footprint covers one cell. An add tries every place upright, then turned. A screen builds a destination with **Get Position of Cell** and the **Rotated** flag, asks **Can Place**, and sends **Request Move** ([Inventory Screens](https://rigbak.com/docs/universal-player-combat/inventory-screens)).
- The case's **Capacity Tag** is `UPC.Inventory.Capacity.CaseRows`; no demo item gives it.
- `Item_UPC_HipPouch` carries a **Container** fragment opening `Container_UPC_HipPouch`, a Grid six by one with the case's Item Filter. Key Items has **Opens Bags** ticked, so the pouch opens there; its cells come after Key Items in the order adds fill, which is why the case is listed first.
- The Key Items **Item Filter** takes Slot Tags `UPC.Slot.KeyItem` or `UPC.Slot.Upgrade` (the demo key `Item_UPC_Key`, the hip pouch); everything else falls through to the case.
- The Blueprint carry rule **Unique Key Items** allows one of each key item: a second key fits nowhere and stays on the ground with `UPC.Inventory.Refused.NotAdmitted` ([Inventory Rules and Combines in Blueprint](https://rigbak.com/docs/universal-player-combat/inventory-blueprint)).

</details>

<details>
<summary>The stash (Advanced)</summary>

**Details panel: Container_UPC_Stash** (data asset, in Content Browser)

**Category: Display**

| Property | Value |
| --- | --- |
| Display Name | Stash |
| Icon | None |

**Category: Layout**

| Property | Value |
| --- | --- |
| Layout | Slots |
| Slot Count | 30 |

**Category: Rules**

| Property | Value |
| --- | --- |
| Rules | 0 Array elements |

**Category: Access**

| Property | Value |
| --- | --- |
| Carried | false |
| Takes New Items | false |
| Access Tag | UPC.State.AtStash |

**Category: Bags**

| Property | Value |
| --- | --- |
| Opens Bags | false |

*The stash every demo style lists: thirty slots off the character that a player fills by moving items in, reached only while the character holds UPC.State.AtStash.*

- **Carried** is off, so **Get Item Count**, **Consume Item** and the belt skip its items; **Takes New Items** is off, so a pickup lands elsewhere.
- Moving items in and out needs its **Access Tag**, `UPC.State.AtStash`. The demo's `BP_UPC_StorageBox` (`Demo/Interactables/StorageBox`) gives a character that tag through an infinite Gameplay Effect, `GE_UPC_StorageAccess`, applied on the server as it walks into the box's zone and removed as it walks out ([Bags and Banks](https://rigbak.com/docs/universal-player-combat/inventory-bags#a-bank-or-a-stash)). Its **Open** option opens the screen with the stash beside the case, drawn as thirty slots like the loot chest.
- All three demo styles list the same stash, so its items stay when **Set Config** switches the style. Away from the box, **Is Container In Reach** answers false and the screen hides the panel.

</details>

<details>
<summary>The demo</summary>

**Details panel: InventoryConfig_UPC_SurvivalGrid** (data asset, in Content Browser)

**Category: Containers**

| Property | Value |
| --- | --- |
| Containers | 3 Array elements |
| Containers > Index [0] > Container | UPC.Inventory.Container.Case |
| Containers > Index [0] > Definition | Container_UPC_Case |
| Containers > Index [1] > Container | UPC.Inventory.Container.KeyItems |
| Containers > Index [1] > Definition | Container_UPC_KeyItems |
| Containers > Index [2] > Container | UPC.Inventory.Container.Stash |
| Containers > Index [2] > Definition | Container_UPC_Stash |

**Category: Rules**

| Property | Value |
| --- | --- |
| Carry Rules | 1 Array element |
| Carry Rules > Index [0] | BP_UPC_InventoryRule_UniqueKeyItems |
| Carry Rules > Index [0] > Key Item Tag | UPC.Slot.KeyItem |

**Category: Combines**

| Property | Value |
| --- | --- |
| Combine Sets | 1 Array element |
| Combine Sets > Index [0] | CombineSet_UPC_Demo |

**Category: Held Items**

| Property | Value |
| --- | --- |
| Belt Space | Frees Its Place |
| Equipped Space | Frees Its Place |
| Has Belt | true |
| Belt Slots | 0 Array elements |
| Swap When Full | false |

**Category: Body**

| Property | Value |
| --- | --- |
| Show Carried Items On Body | true |

**Category: Sorting**

| Property | Value |
| --- | --- |
| Sort Order | 0 Array elements |

**Category: Timing**

| Property | Value |
| --- | --- |
| Equip At Once | false |
| Draw Timing > Seconds | 0.2 (folded until clicked) |
| Draw Timing > Start Sound | None (folded until clicked) |
| Draw Timing > Commit Sound | None (folded until clicked) |
| Draw Timing > Cancel on Move | false (folded until clicked) |
| Put Away At Once | true |
| Stow Timing > Seconds | 0.2 (folded until clicked) |
| Stow Timing > Start Sound | None (folded until clicked) |
| Stow Timing > Commit Sound | None (folded until clicked) |
| Stow Timing > Cancel on Move | false (folded until clicked) |
| Combine At Once | false |

*Belt Slots is empty, so the player controller's own belt applies: the demo's diamond of four slots.*

`LVL_UPC_Wardrobe_Hall` places one stash box that serves every style, beside the style pads; the Grid Case pad switches the player to this style with a starter kit. [Inventory Rules and Combines in Blueprint](https://rigbak.com/docs/universal-player-combat/inventory-blueprint) shows how Load Holder and Unique Key Items are built.

</details>

<details>
<summary>What runs where (Multiplayer)</summary>

- The server places every item; the owning player's machine asks the same rules, so a screen's **Can Place** shows the server's answer before anything is sent. `UPC.State.AtStash` must reach that machine for its own check to say yes; a Gameplay Effect carries it there.

</details>

---

Previous page: [Use Only Part of the Inventory](https://rigbak.com/docs/universal-player-combat/inventory-pick-what-you-need). Next page: [Party RPG Inventory](https://rigbak.com/docs/universal-player-combat/inventory-party-rpg)
