Skip to content

/nav

Syntax

/nav route|mark|list|clear|go|loop|save|load|moveto|follow|followclose|flank|fwd|turn|beacon|tune|stop|status

Description

Record, save, and walk waypoint routes; follow a spawn; hold a flanking position. Provided by the bundled nav script — run /lua run nav first.

Provided by a script

/nav exists only while the nav script is running.

/lua run nav

go, loop, and moveto are driven by the C++ pulse and keep working without the script, but follow, flank, fwd, and turn need its loop. Running nav is the intended entry point for the whole command set.

Routes

  • route <name> — Select or create the working route. With no argument, prints the current one.
  • mark [label] — Append your current position to the working route. Labels default to p1, p2, …
  • list [route] — Print every point in a route.
  • clear [route] — Empty a route.
  • go [route] [reverse] — Walk the route once. Add reverse to walk its points last-to-first instead of first-to-last.
  • loop [route] [reverse] — Walk the route repeatedly, same reverse option.
  • save <route> — Write config/routes/<route>.lua. The file is plain, hand-editable Lua.
  • load <route> — Load that file back so /nav go can run it.
  • stop — Stop whatever movement is active and release the movement keys.
  • status — Print the navigator's current state.

reverse never touches the stored points — it's read fresh off the named route and copied into a scratch route each time, so go X reverse and go X keep meaning last-to-first and first-to-last no matter which one ran last, and save/list on X always show the original order.

Movement

  • moveto <x> <y> <z> — Walk to a world coordinate.
  • follow <name> [dist] — Trail a spawn, holding at dist (default 3, floored just outside the navigator's arrival radius). /nav follow off to stop.
  • followclose <name> [dist] — The same trailing behaviour with a different position source. See below.
  • flank <front|behind|left|right|<degrees>> [dist] [name] — Hold a point at that angle off the target's (or [name]'s) facing, dist out (default 3), orbiting as the mob turns and moves. /nav flank stop releases.

Close follow

/nav follow watches the leader through your client's copy of their character. That copy is relayed by the server and smoothed, and the follow only resumes once the distance has drifted past its resume band — so a box notices late and then sprints to catch up.

/nav followclose steers at the leader's own client's position instead, published over the peer mesh, and starts the moment that report says they started. Same hold distance, same everything else.

/nav followclose Tankname 3

The leader has to be broadcasting

Any client running nav or gyonin broadcasts its position automatically — nothing to turn on. The leader is usually the character you drive, though, and that one often runs no script at all. For it:

/lua run navbeacon

Without that, /nav followclose still works — it just falls back to the ordinary follow and says so.

  • beacon — Print whether this client is broadcasting, whether it's listening, and every character it can currently hear with the age of their last report. This is the thing to run when a followclose says it never heard a beacon.
  • beacon on|off — Turn this client's own broadcast off or back on.

/nav status shows a close follow as close(peer) when it is really using the beacon and close(actor) when it has fallen back, and the follow announces either transition in chat as it happens.

Following in flight

/nav followclose follows a leader through the air, not just along the ground. When the leader is flying and you are on a flying mount, the box takes off on its own (holding the up key lifts you off — no jump), matches the leader's altitude while both of you fly, and — when the leader lands — moves over them and descends onto them. If it can't fly (on foot, on a ground mount, or in a no-fly zone) it says so once and trails on the ground as usual.

You have to be able to fly

Take-off only happens from a mount. On a ground mount the box tries briefly, then gives up with "couldn't take off … not a flying mount / no-fly zone?" and follows on the ground. There is no non-mount flight handling yet.

Following underwater

/nav followclose also follows a leader up and down in water. Once the follower is swimming, it dives or rises to match the leader's depth (using the same up/down keys as flight), while the normal follow steers it horizontally. The leader does not have to be in the water: if they're standing on a dock or the shore, the follower swims up to the surface and walks out after them rather than holding the up key. Getting into the water is just the normal follow walking in. Jump echo is off while either of you is swimming, so a leader bobbing at the surface doesn't make followers on the shore hop.

Zone instances

Nothing available to a script distinguishes two instances of the same zone — only the zone's name. Two guards stand in for that: a beacon that disagrees with the leader's visible character by more than closeDiverge metres is ignored, and one further away than closeRange is refused outright (the follower holds and says so rather than running 200 metres to a coordinate that means something else in your instance). Both are /nav tune keys.

Tuning and raw drives

  • tune — Print every tuning value: the Lua-side hold distances and the navigator's own steering values (arrival radius, vertical tolerance, turn gain, deadband, stall timeout, …), plus the close-follow keys closeTtl, closeBand, closeRange and closeDiverge, and the flight-follow keys flyEcho, flyYDeadband, flyTakeoff, flyTakeoffTimeout, flyTakeoffCooldown, flyLandXz and flyLandTimeout, and the swim-follow keys swimEcho, swimYDeadband (depth error tolerated before diving/rising, default 1.0) and swimSurfaceHold (how far under the surface counts as "at the surface", default 0.8).
  • tune <key> <value> — Set one of them.
  • fwd [ms] — Raw forward drive for ms, then auto-release. A smoke test.
  • turn <delta> [ms] — Raw turn drive. A smoke test.

Examples

/lua run nav

/nav route townrun
/nav mark bank
/nav mark broker
/nav save townrun
/nav loop townrun

/nav go townrun reverse
/nav loop townrun reverse

/nav follow Tankname 4
/nav followclose Tankname 3
/nav beacon
/nav flank behind 3
/nav moveto 512.4 -21.0 -388.9
/nav stop

Safety gates

/nav go, /nav loop, and /nav moveto refuse to start while you are dead, or while movement is held (paused), and say so rather than silently doing nothing.

left/right chirality

/nav flank left and /nav flank right may be mirrored — that hasn't been confirmed against a live client. front and behind are correct.

See also