Skip to content
KCKingdoms Connected Scripting APIScripting guides and API
Data shapeServer APIGenerated

InventoryState

Defined in: server/api.d.ts:2243

One player’s or NPC’s inventory as the server holds it.

harvested: boolean | undefined

Defined in: server/api.d.ts:2262

NPC stock only: the carcass has already been harvested. Pass it to Inventory.set when restoring a corpse; absent preserves its existing state.


items: InventoryRow[]

Defined in: server/api.d.ts:2257

Every row.


quickslots: InventoryQuickslots | null

Defined in: server/api.d.ts:2267

The current native outfit’s quick-access assignments and selections, using row IDs. Null until reported or restored. Save with items and pass both to Inventory.set.


ready: boolean

Defined in: server/api.d.ts:2247

For a player, their game shows this revision. For an NPC, its initial stock has been established. Wait for playerInventoryReady or npcInventoryReady respectively.


revision: number

Defined in: server/api.d.ts:2252

Advances by one with every change. Pass it as a request’s revision to refuse the request if anything changed in between.