Appearance
sdk.creatures
Creature classify + packet cache (skull, party, type, summoner). Kind matches 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.
| Name | Value | Summary |
|---|---|---|
KIND_PLAYER | 0 | — |
KIND_MONSTER | 1 | — |
KIND_NPC | 2 | — |
KIND_SUMMON_OWN | 3 | — |
KIND_SUMMON_OTHER | 4 | — |
SKULL_NONE | 0 | — |
SKULL_YELLOW | 1 | — |
SKULL_GREEN | 2 | — |
SKULL_WHITE | 3 | — |
SKULL_RED | 4 | — |
SKULL_BLACK | 5 | — |
PARTY_NONE | 0 | Raw TCreature.party / CreatureData.party byte. Official client writes it without a fromInt remap (unlike skull 0..5). |
PARTY_INVITED | 1 | — |
PARTY_INVITE_OTHER | 2 | — |
PARTY_MEMBER | 3 | — |
PARTY_LEADER | 4 | — |
PARTY_MEMBER_SHARED | 5 | — |
PARTY_LEADER_SHARED | 6 | — |
PARTY_MEMBER_NO_SHARED_BLINK | 7 | — |
PARTY_LEADER_NO_SHARED_BLINK | 8 | — |
PARTY_MEMBER_NO_SHARED | 9 | — |
PARTY_LEADER_NO_SHARED | 10 | — |
PARTY_GRAY | 11 | — |
compact_kind
function · compact_kind(proto)
Map a protocol creature kind to the compact SDK kind.
classify
function · classify(id, name, local_id, live_kind)
Classify a creature id/name as player, monster, NPC, or summon.
note
function · note(ev)
Update the creature cache from a typed inbound event.
get
function · get(id)
Cached creature snapshot by id.
forget
function · forget(id)
Drop a creature id from the cache.
reset
function · reset()
Clear the creature cache.
enrich
function · enrich(data)
Fill kind/skull/party fields on a creature table.