Appearance
sdk.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.
lua
local M = require("sdk.destinations")area
function · area(q)
Resolve the exact official Cyclopedia area selected by the planner. Area IDs are JSON numbers but plans intentionally store them as strings.
area_position
function · area_position(q)
A representative walk tile for a named area.
nearest_town
function · nearest_town(where)
Nearest known town to a position.
graph
function · graph(npc_rules)
Travel graph implied by NPC travel rules.
travel_route
function · travel_route(from, destination, npc_rules)
NPC hops from here to a named destination.
npc_for_action
function · npc_for_action(npc_rules, action, from)
Per-NPC planner actions can nominate a concrete depot/service waypoint. Returning a catalog position makes the rule operational even when the NPC is not currently in the creature list.
resolve
function · resolve(destination, from)
Resolve a destination name or area to a position.