Items
constItems:object
Defined in: server/api.d.ts:2491
Server-defined resource items, drawn with an existing game appearance or with their own model and icon. Register types before restoring their instances.
Type Declaration
Section titled “Type Declaration”register()
Section titled “register()”register(
id,definition):string
Registers an immutable miscellaneous type and returns its stable GUID. Identical repeats succeed; conflicts throw. Defaults: empty description, price 0, stackable true, usable false, useLabel Use. visual names a miscellaneous item, crafting material or document whose model, material and icon the type borrows; without it, model and icon are required. model is a path relative to Objects/, as the game’s item tables write it, which the game prefixes with Objects/ itself (a path starting with objects/ throws) and completes with .cgf when it has no extension: a model the resource streams as stream/objects/kcdc/
Parameters
Section titled “Parameters”string
definition
Section titled “definition”description?
Section titled “description?”string
string
material?
Section titled “material?”string
model?
Section titled “model?”string
string
price?
Section titled “price?”number
stackable?
Section titled “stackable?”boolean
usable?
Section titled “usable?”boolean
useLabel?
Section titled “useLabel?”string
visual?
Section titled “visual?”string
weight
Section titled “weight”number
Returns
Section titled “Returns”string