Skip to content

Cart routes

A cart route is a road the server drives its carts along by itself: a wagon’s two horses (or a two-wheeler’s one) at a canter, a wagoner on the bench, players riding along. The carts pull up at the route’s stops, wait there, and go on - round a loop, or there and back with a turn at each end. Players get on with the game’s own prompt by the wagon (“Get on”) and get off with the game’s dismount key wherever they like; a cart waits a few seconds while someone climbs in or out.

Next to the routes there are free carts, which stand where they were put until a player takes the reins and drives them

  • players’ own carts, a dealer’s, a cartwright’s: personal carts.

The routes are yours to lay out: an admin records one in the game by riding (or walking) the road, and the server keeps it in the routes file of that level ([carts] routes, data/carts/<level>.toml by default) and runs it from then on - after every restart too. The commands are admin-only unless [commands] public names them.

  1. Stand where the road begins and type /cartroute new Mill Road - the name is how you will refer to it (1-32 letters, digits, spaces and -_.').
  2. Ride the road. /cartroute auto 12 drops a point every 12 metres as you move - the easy way on a winding road; or type /cartroute point at each bend yourself. Keep to the road: the carts drive straight from point to point, the corners rounded over a few metres, and go through whatever lies between two points.
  3. Where the carts should wait, stop and type /cartroute stop 30 Mill - 30 seconds at the stop named “Mill”.
  4. At the end: /cartroute mode back if the carts should turn round there and come back the same way (a loop, the default, drives from the last point back to the first - so end a loop near its start). /cartroute carts 2 runs two carts on it, spread evenly; /cartroute speed 5 makes this route slower than [carts] speed; /cartroute kind cart runs two-wheelers instead of wagons (kind wagon back; either clears the parts chosen so far); /cartroute part body b_covered gives its carts a covered body (any part of a cart of the route’s kind: body, axle, wheels, load, horse1, horse2 on a wagon - /cart parts by a cart lists its kind’s).
  5. /cartroute save - the route runs at once and is written to the file.

/cartroute undo takes the last point back, /cartroute cancel drops the recording. /cartroute list shows every route of the level; /cartroute carts Mill Road 3 changes how many carts a saved route runs, /cartroute part Mill Road load hay_large what they look like (default gives a slot back), /cartroute remove Mill Road takes it away with its carts. Each is written to the file at once.

/cart puts a free cart in front of you (across your way, the bench at your right hand; /cart cart a two-wheeler); /cart remove takes away the free cart nearest you.

/cartroute save writes it; you can also edit it by hand, with the server stopped. One [[route]] table per route:

[[route]]
name = "Mill Road"
level = "klaster"
points = [[1284, 1080, 26.1], [1244, 1080, 26.1], [1244, 1106, 25.6], [1284, 1106, 25.5]]
speed = 7 # m/s; leave it out for [carts] speed
mode = "loop" # or "back"
carts = 1
kind = "wagon" # or "cart", the two-wheeler
driver = true # false = no wagoner on the bench
parts = { body = "c", load = "hay_medium" } # what the carts look like; a slot left out is the default
stops = [{point = 0, name = "Mill", wait = 30}]

The points are world metres (/pos prints yours); a height left out, or below 0, is the ground’s when the server has the terrain, else the players’ games put the wheels on the ground. A stop’s point counts from 0 in the file. A part the server does not know is left at the default, with a line in the server’s log.

The server’s own settings for carts are in [carts]: whether there are any, the file, the pace of the routes and the fastest a player may drive.

A mode builds its own on the same pieces: AddCartRoute makes a route (kept until the server stops, or written into the file with SaveCartRoutes) - its parts the look of its carts - OnPlayerEnterCart can ask a fare, keep a player out or seat them elsewhere, OnCartStop hears a cart arrive at a stop and HoldCart keeps it there; SetCartPart changes one cart’s look (a route’s carts go back to the route’s when it is replaced). A route cart’s seat 0 is its wagoner’s; its passengers get seats 1 to 5 on a wagon, 1 and 2 on a two-wheeler. The whole list is the Carts group of the server API.