Skip to content

sdk.creatures ​

Creature classify + packet cache (skull, party, type, summoner, icons, outfit). Kind matches Game Engine/CreatureCatalog.cpp ClassifyKind, then the live TCreature.kind byte when applyCreatureData has remapped protobuf 0/1/2/5/7 onto compact 0..4 (player/monster/npc/summon-own/summon-other).

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

Constants ​

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

NameValueSummary
KIND_PLAYER0—
KIND_MONSTER1—
KIND_NPC2—
KIND_SUMMON_OWN3—
KIND_SUMMON_OTHER4—
SKULL_NONE0—
SKULL_YELLOW1—
SKULL_GREEN2—
SKULL_WHITE3—
SKULL_RED4—
SKULL_BLACK5—
PARTY_NONE0Raw TCreature.party / CreatureData.party byte. Official client writes it without a fromInt remap (unlike skull 0..5).
PARTY_INVITED1—
PARTY_INVITE_OTHER2—
PARTY_MEMBER3—
PARTY_LEADER4—
PARTY_MEMBER_SHARED5—
PARTY_LEADER_SHARED6—
PARTY_MEMBER_NO_SHARED_BLINK7—
PARTY_LEADER_NO_SHARED_BLINK8—
PARTY_MEMBER_NO_SHARED9—
PARTY_LEADER_NO_SHARED10—
PARTY_GRAY11—
ICON_TYPE_QUEST0applyCreatureData packs QUEST as 0 (id) and MODIFIER as 1 (value).
ICON_TYPE_MODIFIER1—
ICON_TYPE_MARK_BORDER2CreatureMarks oneof case: 2 = CreatureMarkBorder, 3 = CreatureMarkIsAttacked.
ICON_TYPE_MARK_ATTACKED3—
PLAYER_BAND0x40000000—

compact_kind ​

function · compact_kind(proto)

Map proto kind 0/1/2/5/7 (or already-compact 0..4) to KIND_*.

classify ​

function · classify(id, name, local_id, live_kind)

self / npc / monster / player. Catalog NPC names beat a live kind of 1 (Guide Luke). Player-band ids are not "kind 0 = player" — that byte is often unset.

kind_of ​

function · kind_of(creature, local_id)

Player object or raw {id,name,kind,local_id}. Same labels as classify.

note ​

function · note(ev)

Merge one inbound creature event into the packet cache (skull, party, kind, outfit).

get ​

function · get(id)

Cached packet fields for id, or nil if never noted.

forget ​

function · forget(id)

Drop the cache row; does not mark the creature gone.

mark_gone ​

function · mark_gone(id)

DeleteOnMap: remember the id so stale TCreatureStore rows are not fought.

mark_present ​

function · mark_present(id)

Clear the gone bit when MoveCreature / health proves the id is still on the map.

is_gone ​

function · is_gone(id)

True after DeleteOnMap until mark_present or reset.

reset ​

function · reset()

Drop cache and gone set (login / session end).

enrich ​

function · enrich(data)

Fill missing skull/party/kind/… on a live creature row from the packet cache.

Arcane SDK catalog generated from scripts/sdk