travel

Moves a creature, or the party, opening doors on the way. Three kinds of trip:

  • Within the area: pass target (a creature or object id) or point. The creature walks there, opening up to maxDoors doors on the way. upTo limits the walk to that many meters and reports where it stopped (cutAt).
  • To another area: pass exit (an id from exits) or area (an area tag; the nearest exit that leads there is used). The creature you control walks to the exit and uses it. The call returns once the new area has loaded.
  • Across the world map: pass to, a map pin’s name, tag or index as worldmap lists them, either with the map open or together with the exit that opens it.

The answer says whether it arrived, the reason if not, the distance left, the doors it opened, and each step. Arrived means within within meters, or as close as anyone can stand to a large object such as a door or a chest; use the object from there.

It stops early and says why when a hostile is within fightNear meters, a conversation or cutscene starts, the game is paused, or the game shows a message box (answer it with press, then travel again). A random encounter on the world map is reported as encounter: deal with it, then travel again. The game may autosave on the way. To see what happened during the trip, such as a door that started a fight, call wait_for from the returned cursor.

A call may take up to budgetMs milliseconds, 60000 by default.

Arguments

Name Type Required What
id any   Who walks, by creature id. Default: the creature you control.
target any   The creature or object to walk to, by id.
point any   The point to walk to: {x, y, z} or [x, y, z].
exit string   The exit to use, by its id from exits.
area string   The area to go to, by its tag. The nearest exit that leads there is used.
to any   A world map pin to travel to: its name (any case), tag or index from worldmap.
within number   How close counts as arrived, in meters. Default 1.5.
upTo number   With target or point: walk at most this many meters along the path.
fightNear number   During combat, keep walking unless a hostile is within this many meters. Default 20; 0 stops for any fight.
maxDoors integer (≥ 0, ≤ 20)   The most doors to open on the way. Default 4.
budgetMs integer (≥ 1000, ≤ 600000)   The longest the call may take, in milliseconds. Default 60000. If it runs out on the way, note says so; call travel again to go on.

Call it as travel over MCP, or POST /api/tool/travel with the arguments as JSON.