Inventory
Overview
All Out provides a player inventory API that allows you to create items, give them to players, and for players to arrange, use, and drop items in your game.
There are three core concepts:
Item definitions (
Item_Definition): what an item is (name/icon/stacking + your own fields)Item instances (
Item_Instance): an actual stack in the world/in an inventoryInventories (
Inventory): a container of slots that holds item instances
Every player has a built-in inventory at player.default_inventory.
Persistence
If you'd like player inventories to be automatically saved across game sessions, enable the "Auto Save Player Inventory" box in the Edit -> Game Settings section of the editor

Inventory API reference
Quick start (register + give an item)
Register item definitions once in ao_before_scene_load, then create instances and move them into a player’s inventory.
Displaying the hotbar
To show the standard inventory hotbar UI on screen, call Items.draw_hotbar inside your Player's ao_late_update method. Without it, the inventory system works behind the scenes but the player won't see it!
Items.draw_hotbar handles the entire hotbar + bag toggle UI for you. It returns a Draw_Hotbar_Result with selected_item, selected_item_index, inventory_open, and dropped_item fields.
Checking if a player already has an item
A common pattern is to give an item only if the player doesn't already have one:
You can also check how much room is left for a specific item type before creating it:
Custom Inventories
You can create inventories that aren’t tied to a player, for things like:
Chests / storage containers
Fish/mob teams
To access items:
Dropped Items
If you want players to drop items into the world (and let other players pick them up), use the dropped items system:
Spawning a dropped item
Drop animation + snapping to navmesh
Handling drag-drop from the hotbar UI
If you use Items.draw_hotbar, players can drag an item out of the UI to drop it. Dropped_Item.handle_dropped_item removes it from the inventory and spawns a dropped item entity.
Dropped items automatically despawn over time (with a warning bar). Holding the interact button on an item resets its despawn timer.
You can make a dropped item exclusive (only visible/pickable by one player) using dropped->set_exclusive(player).
Last updated