Project Sylvanas docs axiombot.net Discord

Getting started

Before you start

  • Players install AXIOM NAV like any other plugin (marketplace page). As a library, it is pulled in by itself for any plugin that depends on it. Your plugin talks to it in game through one global table, _G.AXIOM_NAV. There is nothing to download, link or require.
  • The route finding happens on the AXIOM NAV server. The plugin reaches it by itself.
  • You need the Project Sylvanas plugin basics (header.lua, main.lua, callbacks): PS developer docs.

Load after it

AXIOM NAV loads at init_priority = 2. Give your plugin 3 or higher in its header.lua:

local plugin = {}
plugin["name"] = "My Plugin"
plugin["version"] = "1.0"
plugin["author"] = "You"
plugin["init_priority"] = 3   -- after AXIOM_NAV (2)
plugin["load"] = true
return plugin

Or look the global up when you first need it. Never read it once when your file loads.

Find the client

-- nil when AXIOM_NAV is not installed or not loaded yet
local function nav()
    local api = _G.AXIOM_NAV
    return api and api.client
end

_G.AXIOM_NAV.client is the one shared client. AXIOM and every other plugin use the same one, so a new walk command from anyone replaces the walk under way.

FieldWhat it is
_G.AXIOM_NAV.clientThe shared client, nil until AXIOM_NAV has loaded
_G.AXIOM_NAV.VERSIONThe plugin's version, e.g. "1.27". Check it if you rely on a newer command
_G.AXIOM_NAV.report_logs(opts)For bug reports, see Bug reports
_G.AXIOM_NAV.report_state()For bug reports
_G.AXIOM_NAV.perf_state()For a profiler

Coordinates

Places are the game's world coordinates in yards: a table { x = ..., y = ..., z = ... } or a vec3. A unit's own get_position() answer works as it is.

Your first walk

local client = nav()
if not client then
    core.log_warning("AXIOM_NAV is not loaded")
    return
end

client:move_to({ x = -8900, y = 560, z = 94 }, function(ok, reason, detail)
    if ok then
        core.log("arrived")
    else
        core.log_warning("could not get there: " .. tostring(reason))
    end
end)

That is all a walk takes. AXIOM NAV asks for a route, turns the character, walks it, gets itself unstuck, asks again if the character is pushed off the way, and calls your function once at the end.

House rules

RuleWhy
One driver. While AXIOM NAV walks, do not press the movement keys yourself. Call client:stop() first.Two drivers fight over the character.
AXIOM NAV never interacts. It never opens doors, pulls levers, mounts or dismounts.Those stay with your plugin. It tells you when (events mount_here, dismount_needed).
Do not change the player's settings.They belong to the AXIOM_NAV menu. Use walk options for what your plugin needs.
Do not call client:update().AXIOM NAV runs itself every frame.
Casting pauses a walk.A move_to during a cast waits for the cast to end, then goes.
Use the names in these docs.Older names (get_full_state, get_event_bus, events starting nav.) still work for now, but they will go. See Reference.

Next