Skip to main content
Containers are special inventory items that, when used, open their own miniature inventory inside the right-hand panel. They are perfect for restricted-content carriers like food bags, weapon cases, and medical kits. The Awoken rework introduces a dedicated data/containers.lua file that registers both the item AND its container behaviour in a single entry - no duplication across data/items.lua and setup/ scripts.

How containers work

  • A container is an inventory item players can hold and stack.
  • Opening it (Use action) reveals a slot grid inside the right panel.
  • Each container has its own slot count and weight limit, independent of the player’s inventory.
  • Optional whitelist or blacklist controls which items can be placed inside.
  • Optional fixedWeight makes the container weigh the same no matter what’s inside.
  • Containers can carry a rarity and tags like any other item.

The data/containers.lua file

data/containers.lua

Fields

Item fields (same as data/items.lua)

Container behaviour fields

whitelist and blacklist are mutually exclusive. If both are set, the whitelist wins and the blacklist is ignored. Pick one or the other.
fixedWeight only changes what the carrier feels - the container’s weight in the player’s inventory stays constant whether it’s empty or full. The container’s internal maxWeight still limits how much can be stored inside, so a fixed-weight box can’t hold unlimited cargo.

Adding a new container

The whole process is three steps:
1

Add an entry to `data/containers.lua`

Use a unique lowercase key (underscores allowed, no spaces).
data/containers.lua
2

Add the image

Drop a PNG named after the entry key into web/images/. Example: web/images/duffel_bag.png. The UI auto-resolves this - no manifest edit required.
3

Restart the resource

ensure ox_inventory. The new container item is now spawnable and stashable.

Spawning a container in game

Use the standard admin command:
Where 1 is the target player’s server ID. Open it with the standard inventory Use action.

Worked example - restricted medical kit

A medical-only container, locked to the EMS group:
data/containers.lua
Combine this with a stash or job-check hook (see Hooks in the Exports page) to gate who can equip the kit.

Tips

  • Whitelist for themed bags (food-only, ammo-only, medical-only). Players instantly understand the bag’s purpose by what slides in.
  • Blacklist for “everything except” (paper bag refuses weapons, but anything else fits).
  • rarity doubles as visual cue - a legendary gold-bar case reads instantly on screen.
  • Use the storage tag so containers appear together when the player filters by Storage.
  • Container weight stacks by default - a Paper Bag (50g) holding 1kg of items weighs 1.05kg in the player’s inventory.
  • fixedWeight for rigid cases - the Gun Box uses it, so it always reads 800g whether empty or holding 20kg of weapons. Great for hard cases, briefcases, and lockboxes where carried weight shouldn’t betray the contents.