One Studios
Guides

Containers

Storage items (bags, cases) that hold other items, with per-container restrictions and default contents.

A container is an item that holds other items inside it: a backpack, a duffel bag, a weapon case, and so on.

Containers are defined in the admin panel and open from inside an inventory like any other secondary. Read one programmatically with the server export GetContainerFromSlot.

Item restrictions

Each container can restrict which items may be placed inside it. The two modes are mutually exclusive:

  • Allowlist - only the listed items may go in. Everything else is rejected.
  • Blacklist - everything may go in except the listed items.
A blacklist entry always wins. When an allowlist is enabled, only allowlisted items pass; with no restrictions set, any item is accepted.
Containers can never be nested. A container item can never be placed inside another container, regardless of allowlist or blacklist configuration. This is always enforced.

Default items

A container can seed a default item set the first time it is created: a list of { item, count, metadata } entries that spawn inside the fresh container. This is handy for kits (a first-aid bag that always starts with bandages, say). Default items are only seeded into a brand-new container, never re-added to one that already exists, and any entry that is itself a container is skipped (no nesting).

Admin panel

The Containers panel manages container definitions. The create / edit modal is split into three tabs:

  • Basic Info - name, label, weight, slot count, max weight, image, rarity.
  • Restrictions - the restriction mode (None / Allowlist / Blacklist) and the item list it applies to.
  • Default Items - the item + count + metadata set spawned on creation.

Config

Two shared config keys tune container behaviour:

containerSize
string
Default on-screen size of the container modal.
containerModalMode
boolean
When true, opening a container spawns a floating modal; when false, it replaces the secondary panel.