Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Definitions

Greg edited this page Mar 7, 2026 · 9 revisions

Definitions are collections of data stored in the game Cache, they often store data about a specific Entity, Interface or other game engine system.

Tip

You can find the full list of definitions in ./engine/data/definition/

Definitions can be accessed from anywhere using the format:

ItemDefinitions.get(itemId)

Or in functions using the old injection method:

val itemDefinitions: ItemDefinitions = get()

Definition Extras

Void goes beyond standard definitions and links TOML configuration files to each definition making it easy to define String Identifiers and additional data.

Anything added to an npc beyond the integer id is added to the respective definitions.extras map where they can later be accessed in a similar way to Variables.

[hans]
id = 0
wander_radius = 4
categories = ["human"]
examine = "Servant of the Duke of Lumbridge."
val race = npc.def["race", ""] // Get or default return empty string

val examine: String = npc.def["examine"] // Get unsafe with type

val radius: Int? = npc.def.getOrNull("wander_radius") // Get if exists else return null value

Note

This applies to all definitions, .objs.toml -> ObjectDefinition, .ifaces.toml -. InterfaceDefinition, fonts.toml -> FontDefinition, etc...

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.