Skip to content

sdk.data

Catalogs. Official client map.dat / staticdata.dat win over Canary. NPCs and towns come from sdk/data/_client_npcs.lua (JSON decode of client/npcs.json). Canary _*.lua is the fallback when the client extract is missing. Spec: docs/superpowers/specs/2026-08-21-sharptibia-data-design.md

lua
local M = require("sdk.data")

Constants

Lua 5.4 has no enums — these are integer (or string) fields on the module.

NameValueSummary
map{}Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

item

function · item(q)

Returns table|nil: row

Parameters

NameTypeSummary
qnumber|stringid or name

Returns

TypeSummary
table|nilrow
string|nilerr one of: data miss, unknown

items

function · items(name: string): ItemCatalogRow[]?, ErrorMessage?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Parameters

NameTypeSummary
namestring

Returns

TypeSummary
ItemCatalogRow[]?, ErrorMessage?

interaction

function · interaction(query: ItemId|string): table?, ErrorMessage?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Parameters

NameTypeSummary
queryItemId|string

Returns

TypeSummary
table?, ErrorMessage?

spell

function · spell(query: integer|string): SpellCatalogRow?, ErrorMessage?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Parameters

NameTypeSummary
queryinteger|string

Returns

TypeSummary
SpellCatalogRow?, ErrorMessage?

spells_by_id

function · spells_by_id(id)

Return every spell associated with a server spell id. Use exact words/name for action selection; numeric delay ids can be ambiguous.

Parameters

NameTypeSummary
idnumber|string

Returns

TypeSummary
table[]|nilspells
string|nilerr

spellsById

alias · spellsById = spells_by_id

Same as spells_by_id.

Alias

Same as spells_by_id.

quest

function · quest(query: integer|string): CatalogRow?, ErrorMessage?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Parameters

NameTypeSummary
queryinteger|string

Returns

TypeSummary
CatalogRow?, ErrorMessage?

town

function · town(query: integer|string): CatalogRow?, ErrorMessage?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Parameters

NameTypeSummary
queryinteger|string

Returns

TypeSummary
CatalogRow?, ErrorMessage?

house

function · house(query: integer|string): CatalogRow?, ErrorMessage?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Parameters

NameTypeSummary
queryinteger|string

Returns

TypeSummary
CatalogRow?, ErrorMessage?

monster

function · monster(query: integer|string): CatalogRow?, ErrorMessage?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Parameters

NameTypeSummary
queryinteger|string

Returns

TypeSummary
CatalogRow?, ErrorMessage?

monster_spawns

function · monster_spawns(query: integer|string): Position[]?, ErrorMessage?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Parameters

NameTypeSummary
queryinteger|string

Returns

TypeSummary
Position[]?, ErrorMessage?

npc

function · npc(query: integer|string): CatalogRow?, ErrorMessage?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Parameters

NameTypeSummary
queryinteger|string

Returns

TypeSummary
CatalogRow?, ErrorMessage?

npcs_by_role

function · npcs_by_role(role: string): CatalogRow[]

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Parameters

NameTypeSummary
rolestring

Returns

TypeSummary
CatalogRow[]

vocation

function · vocation(query: integer|string): CatalogRow?, ErrorMessage?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Parameters

NameTypeSummary
queryinteger|string

Returns

TypeSummary
CatalogRow?, ErrorMessage?

classes

function · classes(): CatalogRow[]

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Returns

TypeSummary
CatalogRow[]

class_spells

function · class_spells(query: integer|string): SpellCatalogRow[]?, ErrorMessage?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Parameters

NameTypeSummary
queryinteger|string

Returns

TypeSummary
SpellCatalogRow[]?, ErrorMessage?

combat_skills

function · combat_skills(): table?, ErrorMessage?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Returns

TypeSummary
table?, ErrorMessage?

outfit

function · outfit(query: integer|string): CatalogRow?, ErrorMessage?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Parameters

NameTypeSummary
queryinteger|string

Returns

TypeSummary
CatalogRow?, ErrorMessage?

mount

function · mount(query: integer|string): CatalogRow?, ErrorMessage?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Parameters

NameTypeSummary
queryinteger|string

Returns

TypeSummary
CatalogRow?, ErrorMessage?

find

function · find(query: integer|string): DataFindResult?, ErrorMessage?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Parameters

NameTypeSummary
queryinteger|string

Returns

TypeSummary
DataFindResult?, ErrorMessage?

bankers

function · bankers(): string[]

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Returns

TypeSummary
string[]

travel

function · travel(): table[]

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Returns

TypeSummary
table[]

manifest

function · manifest(): table?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Returns

TypeSummary
table?

catalog

function · catalog(): table?, ErrorMessage?

Static catalog lookups return nil, "unknown" when loaded but unmatched, and nil, "data miss" when the backing catalog is unavailable. Returned rows are shared read-only catalog objects; callers should not mutate them.

Returns

TypeSummary
table?, ErrorMessage?

Arcane SDK catalog generated from scripts/sdk