Appearance
sdk.monster_telemetry
@type library Passive, bounded monster telemetry. This module never issues game actions. Creature snapshots provide movement/health observations; KillTracking is the authoritative kill source. Classification is descriptive and includes an explicit confidence instead of presenting learned behavior as fact.
lua
local M = require("sdk.monster_telemetry")Constants
Lua 5.4 has no enums — these are integer (or string) fields on the module.
| Name | Value | Summary |
|---|---|---|
Service | Service | Monster telemetry class. |
new
function · new(options)
Construct a telemetry service and optionally autostart it. Autostart failure returns nil, err so callers do not get a mute instance. Common: clamp every DEFAULTS override before setmetatable.
classify
function · classify()
Exported classify() for tests and UI without a service instance. Wraps the local helper so confidence math stays in one place. Common: module function, not a second implementation.
start
function · start(...) return singleton():start(...)
Start the shared monster telemetry singleton. Autostart already ran for default M.new(); this is for an explicit stop. Common: thin facade over Service:start.
stop
function · stop(...) return singleton():stop(...)
Stop the shared singleton and drop its hooks. Does not destroy the instance; start() can resume. Common: facade over Service:stop.
tick
function · tick(...) return singleton():tick(...)
Run one shared-singleton pump (queue + optional sample). Live clients already hook Engine tick; tests call this directly. Common: facade over Service:tick.
handle
function · handle(...) return singleton():handle(...)
Inject one event into the shared singleton immediately. Bypasses the pending queue used by the live Engine.on path. Common: facade over Service:handle.
get
function · get(...) return singleton():get(...)
Look up one active creature on the shared singleton. Same nil-if-unknown contract as Service:get. Common: facade over Service:get.
species
function · species(...) return singleton():species(...)
Look up one species aggregate on the shared singleton. Name is normalized the same way as Service:species. Common: facade over Service:species.
snapshot
function · snapshot(...) return singleton():snapshot(...)
Return the shared singleton telemetry dashboard. Includes completeness of the last creature snapshot source. Common: facade over Service:snapshot.
reset
function · reset(...) return singleton():reset(...)
Clear the shared singleton's samples without unsubscribing. WorldEntered also resets through the event path. Common: facade over Service:reset.