Skip to content

API

52 modules from 2026.08.27-r2.

ModuleRequireSummary
sdk.action_brokersdk.action_broker@type library Global action broker for coordinating independent scripts. Actions reserve one or more channels atomically, then keep those channels until their acknowledgement arrives (or the action fails/cancels). Network callbacks only enqueue copied evidence; pump() is the sole callback execution point.
sdk.alert_servicesdk.alert_serviceTyped-event/live-snapshot alert service. Native notification is optional; history and callbacks work identically in tests and headless environments.
sdk.cave_action_graphsdk.cave_action_graphDeterministic checkpoint action graph. Documents contain data only: custom behavior is resolved by registered callback name, never by executing strings.
sdk.combat_rotationsdk.combat_rotation@type library Ordered spell/rune combat rotation. Rule selection is deterministic; all execution is deferred through the global action broker and revalidated at send time against live creatures, inventory, tiles, cooldowns and safety.
sdk.combat_safetysdk.combat_safetyFail-closed combat/PvP/AoE safety for shipped high-level bots. Low-level Packet/LocalPlayer methods intentionally remain primitives.
sdk.combat_shapessdk.combat_shapesExact affected-tile resolution for player spells, runes and direct attacks.
sdk.container_servicesdk.container_serviceEvent-driven open-container lifecycle, indexing, roles, and bounded traversal. Physical identities are stable for one session generation; runtime container ids may be reused by the client and are therefore never exposed as identity.
sdk.creaturessdk.creaturesCreature 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).
sdk.datasdk.dataCatalogs. 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
sdk.destinationssdk.destinations@type library Semantic destination and multi-hop NPC travel resolver. It converts the generated town/NPC/travel catalog into a small graph; local walking remains the responsibility of sdk.path / sdk.navigator.
sdk.enginesdk.engineHigh-level reads: local player, creatures, viewport, typed inbound events. GetLocalPlayer / GetCreatures take native game.get_local_player / game.get_creatures when those C++ exports return a snapshot, then overlay TPlayerData (capacity, xp, ...) from the session walk. The walks below are also the fallback when native returns nil. GetPlayers / GetMonsters / GetNpcs use ClassifyKind.
sdk.equipment_rulessdk.equipment_rulesOrdered conditional loadout selector. This module only calls loadouts.apply; all actual mutations remain in the brokered equipment-loadout module.
sdk.farm_plannersdk.farm_planner@type library Versioned farming-plan runtime. The browser/backend owns immutable plan documents; this module validates and maps the latest downloaded document onto the proven farming modules, derives the active hierarchical task, enforces hunt polygons, applies stop conditions, and publishes compact status.
sdk.healing_servicesdk.healing_service@type library Self-only healing/support policy service. Rules decide what should happen; the global action broker decides when it may happen alongside other scripts.
sdk.hunt_analyticssdk.hunt_analytics@type library Authoritative hunt/session analytics. The service consumes typed protocol events and (optionally) terminal action-broker snapshots. It never parses chat text and never sends telemetry over the network.
sdk.intent_arbitersdk.intent_arbiter@type library Deterministic action-channel arbiter used by the farming planner. Intents are plain tables and may reserve one or more channels. The arbiter adds bounded urgency/risk/waiting bonuses to the base priority so low-priority work eventually runs without allowing it to overtake emergencies.
sdk.inventorysdk.inventoryLive backpack / equipped / depot / stash stacks from TContainerStorage. Gold sums gold coin (3031), platinum (3035), crystal (3043). Depot and stash return "not open" when those windows are closed.
sdk.kitesdk.kiteMaximin pack goal + Path.to. Does not walk or attack. Ranger: pick a reachable tile that maximizes min Chebyshev to the pack while staying in [min_range, attack_range] when possible. Spec: docs/superpowers/specs/2026-08-21-sdk-kite-design.md
sdk.localplayersdk.localplayerLocal character: Player reads plus talk / walk / use / attack. Actions return ok, err.
sdk.mathsdk.mathTile-grid position helpers. Chebyshev is the default distance (Tibia walk/attack range). Direction numbers match Canary/TFS: N=0 E=1 S=2 W=3 SW=4 SE=5 NW=6 NE=7 None=8. Spec: docs/superpowers/specs/2026-08-21-sdk-position-design.md
sdk.memsdk.memLow-level conversion, layout, session, queue, string, RTTI, and hex helpers. For SDK internals and typed-event fallbacks. Application scripts start at sdk.engine.
sdk.monster_telemetrysdk.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.
sdk.movementsdk.movementThin wrappers around native game.walk / game.move_to. Combat remains acknowledgement-driven one-tile walking; bounded town recovery segments use moveTo so the official client can keep its normal pre-walk cadence.
sdk.navigatorsdk.navigatorStateful one-tile movement controller. Prevents walk queue flooding, remembers temporarily blocked tiles, and suppresses immediate direction reversals that cause left/right oscillation.
sdk.npcsdk.npcNPC greet / say / trade / buy / sell. nearest() walks TCreatureStore and accepts only positively typed or catalog-confirmed NPCs. bank / travel pick a clerk or boat/carpet by catalog, then greet + NPC talk (mode 12). Server-side range, open trade window, and capacity still apply.
sdk.packetsdk.packetCatalog lookup + enqueue for uncovered protocol ops. Resolve by name (TalkMessage / GameclientMessageTalk), never by RVA. Nested objects (ObjectPosition, ObjectIdentifier) are not packets; write their live vtable the same way. Do not hard-code catalog counts: the IDA-generated inbound table is refreshed whenever the client protocol moves.
sdk.party_assistsdk.party_assist@type library Party following and optional friend healing without using client follow. Movement and healing use disjoint broker channels so target combat continues.
sdk.pathsdk.pathA* on Data.map.walkable / game.map.find_path. Cross-floor uses stairs and teleports from world.bin. Does not walk or attack. 8-way; diagonal is illegal if either adjacent cardinal is blocked. Live creatures do not block. Default Chebyshev cap is 128. Spec: docs/superpowers/specs/2026-08-21-sdk-path-design.md
sdk.playersdk.playerSnapshot wrapper for any creature (player, NPC, monster). Reads only; actions live on LocalPlayer. Kind is ClassifyKind (id band + npc/monster catalogs) plus the live TCreature.kind byte.
sdk.profilesdk.profilePer-character key/value store on game.storage, plus alarm predicates. Alarms log/callback as before and use the optional native alert sink.
sdk.rule_enginesdk.rule_engine@type library Generic deterministic rule selection with explicit cooldown ownership. Rules are ordered by descending priority, ascending explicit order, and then insertion order. Selection never marks a cooldown; callers retain control of side effects by calling mark() only after the chosen action was accepted.
sdk.schedulesdk.scheduleTimers on game.on("tick"). after / every are non-blocking. wait(ms) yields only when the caller is a coroutine.
sdk.sessionsdk.sessionCredential-free session recovery. The native layer invokes Tibia's official retained-credential reconnect slot. This module adds an opt-in retry policy; it never accepts account, password, authenticator, session-key, character, or packet parameters.
sdk.skillssdk.skillsLive skill levels from TPlayerSkillStats. use() speaks the words through Packet.talk (mode 1).
sdk.statussdk.statusLive self-status cache: conditions, server target, tactics, last vitals. Filled from inbound PlayerState (162), UpdateTarget (163), SetTactics (167), PlayerDataCurrent (160). Official protobuf assign: PlayerState has_bits bit0=state u64@24, bit1=icons u32@32.
sdk.tilesdk.tileUnified static/live tile view. Reads only; actions belong to tools/path APIs.
sdk.tilessdk.tilesLive items on a tile. A full snapshot is read from Tibia's RTTI-identified TWorldMapStorage; CreateOnMap / ChangeOnMap / DeleteOnMap keep it current. game.map is static terrain. This module is the live ordered object stack.
sdk.toolssdk.toolsRope, shovel, machete, door. UseTwoObjects / UseObject from the catalog. Item ids are Canary / sdk.data names, not opcodes.
sdk.transitionssdk.transitionsAutomatic entrances for pathing. Interactive blockers are discovered from Tibia's live map stack and approached by the caller; request() performs one brokered use and verifies the resulting teleport/open state.
sdk.world_navigationsdk.world_navigationAsynchronous multi-floor route planner. Heavy WorldGrid A* runs on the MapService worker; the game thread executes only a small semantic action graph made of bounded walking legs and verified transition actions.
sdk.world_objectssdk.world_objectsSemantic fixed/dynamic map objects from the live TWorldMapStorage stack. Classification prefers official client lens-help flags, then generated Canary interaction metadata, then conservative exact-name fallbacks.
sdk.zoomsdk.zoomOfficial world-map camera scaling for the current client. IDA confirms that TGameSessionBase owns shared_ptr<TWorldMapCamera> at session+0xC8 and that the official float setter rebuilds both QMatrix4x4 instances and emits the viewport-change signal. The server viewport remains the constructor-default 18x14 rectangle (15x11 playable plus margins).
gameNative global installed by the script host. on returns 0 when called outside an active file script; keep every positive id and release it in stop() with off for deterministic reloads.
game.dbgResearch/fallback kernel. Prefer sdk.packet and named catalog rows. Do not paste RVAs or live addresses into shared scripts.
game.overlay
game.log
game.mapNative map reads return nil plus an error while loading/off-thread. A false walkability value is authoritative only after ready() succeeds.
game.httpHTTP is asynchronous. poll(id) returns nil with no error while pending, nil, error for an unknown id, or one terminal response and then removes it.
game.alert
game.storagePer-script storage. Names are 1..80 ASCII letters/digits/_/-/. and must not be . or ... Payloads are limited to 2 MiB.
game.sessionLow-level native session facade. reconnect accepts no arguments and reuses only state retained inside the official client. true, status means queued locally; confirm completion through WorldEntered or state().in_world.
game.planner

Arcane SDK catalog generated from scripts/sdk