Survival Grid Inventory

Documentation Unreal Engine Player Combat 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.


Set it up

5 minutes
  1. 1

    Set the config

    Set your character's InventoryComponent Config to Demo/Items/Inventory/InventoryConfig_UPC_SurvivalGrid.
  2. 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. 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. 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 settingDoes
CaseSix 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 ItemsList for keys and pouches, which take no case room. One of each key item. A pouch opens here.
Hip PouchA 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.
StashThirty slots off the character holding the player's items, reached only at a stash box.
Belt Space, Equipped SpaceFrees 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 SetsCombineSet_UPC_Demo: herb onto herb mixes, rounds onto a magazine load.
Put Away At OnceOn: an item leaves the hand instantly. Equip At Once is off, so Equip plays the draw animation.

Change it

ToChange
Make the case biggerGrid Size on the case.
Keep every item uprightUntick Allow Rotation on the case.
Let a pouch add moreGrid Size on Container_UPC_HipPouch.
Grow the case with an item the player keepsGive 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 keyRemove the Unique Key Items rule from Carry Rules.
Keep an item's cells while belted or in handBelt Space and Equipped Space to Keeps Its Place.
Show only the belt's items on the bodyUntick 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 waitTick Equip At Once and Combine At Once (Containers and Rules).
Share one stash across charactersMake the box a loot chest and leave the Stash row out.
AdvancedThe case and key items
Details
Container_UPC_Case
Display
Display Name
Case
Icon
None
Layout
Layout
Grid
Grid Size
6.0
4.0
Allow Rotation
Capacity Tag
UPC.Inventory.Capacity.CaseRows
Rules
Rules
1 Array element
Index [ 0 ]
Item Filter
Allowed Tags
0 Gameplay Tags
Blocked Tags
2 Gameplay Tags
UPC.Slot.KeyItem
UPC.Slot.Upgrade
Access
Carried
Takes New Items
Access Tag
None
Bags
Opens Bags
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 itemFootprint
Sword1 by 3
Two-handed baton1 by 4
Shield, helmet, shoulder cape2 by 2
Magazine1 by 2
Everything else1 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).
  • 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).
AdvancedThe stash
Details
Container_UPC_Stash
Display
Display Name
Stash
Icon
None
Layout
Layout
Slots
Slot Count
30
Rules
Rules
0 Array elements
Access
Carried
Takes New Items
Access Tag
UPC.State.AtStash
Bags
Opens Bags
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). 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.
The demo
Details
InventoryConfig_UPC_SurvivalGrid
Containers
Containers
3 Array elements
Index [ 0 ]
Container
UPC.Inventory.Container.Case
Definition
Container_UPC_Case
Index [ 1 ]
Container
UPC.Inventory.Container.KeyItems
Definition
Container_UPC_KeyItems
Index [ 2 ]
Container
UPC.Inventory.Container.Stash
Definition
Container_UPC_Stash
Rules
Carry Rules
1 Array element
Index [ 0 ]
BP_UPC_InventoryRule_UniqueKeyItems
Key Item Tag
UPC.Slot.KeyItem
Combines
Combine Sets
1 Array element
Index [ 0 ]
CombineSet_UPC_Demo
Held Items
Belt Space
Frees Its Place
Equipped Space
Frees Its Place
Has Belt
Belt Slots
0 Array elements
Swap When Full
Body
Show Carried Items On Body
Sorting
Sort Order
0 Array elements
Timing
Equip At Once
Draw Timing
Seconds
0.2
Start Sound
None
Commit Sound
None
Cancel on Move
Put Away At Once
Stow Timing
Seconds
0.2
Start Sound
None
Commit Sound
None
Cancel on Move
Combine At Once
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 shows how Load Holder and Unique Key Items are built.
MultiplayerWhat runs where
  • 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.