Maps and travel
MechaSquid's map is a schematic, like a tube map or a Roman road map: places, the ways between them, and the regions they lie in. It is the wiki with travel added. Places are pages, a way between two of them is a tie of kind route (a "leg"), and the map page only says where things are drawn.
Two rules keep it honest.
- Distance and time come from the legs, never from the drawing. "Ten days on foot" is a fact the author gave. How long the line looks is not.
- Direction comes from the drawing, never from the legs. Wickers is south of Jiggerby because it is drawn below it. Moving a place on the map changes no fact.
Store what the author said
A leg holds the author's own statement: a time by some means ("ten days on foot") or a distance ("300 km"). MechaSquid works out the rest. From "ten days on foot on a track" it knows roughly how far that is, and so how long a rider or a cart needs. When the author later changes how fast a horse is, no leg is rewritten.
Never invent a distance or a time the author did not give. Ask, or leave the leg out. A map with a gap is honest; a map with a guess looks exactly like a fact.
connect_places records one leg. Both pages must exist first (create_node, type place).
daysandmode: "ten days", "foot". A mode the world lists (seelist_travel_modes) lets every other means use the leg too. Days need a mode, or a distance beside them: a time by no means of travel cannot be part of any route, so the tool refuses it. If the author did not say how, ask.distance: in the world's unit, when the author gave one instead.terrain: road, track, open, forest, hills, mountains, marsh, desert, river, sea, air. It changes speed and who can pass: no ship takes a mountain track.road: the page of the named road, river or sea lane this leg is part of, when it has one.note: anything else worth knowing, in the author's words. "Through the swamp, no real road." "Bandits." It comes back with every route that uses the leg.one_way: downriver only, a one-way portal.direction: wheretolies fromfrom. It is used once, to drawtoon the map when it is not there yet. It is not stored on the leg.
Several ways between two places are normal. The short dangerous pass and the long safe road are two legs between the same pages, each with its note.
Special means of travel are just a leg with its own mode. Two towns far apart, "a day on dragonback": connect_places with days: 1, mode: "dragon", terrain: "air". Only the dragon can take that leg, and nobody walks it. Make the dragon a real mode with set_travel_mode only when the author says how fast it flies, so it can take other legs too. set_travel_mode also changes the speeds and the world's unit label (numbers are not converted), and only when the author asks. A mode that legs still name cannot be removed: change those legs first.
Things change. A leg can hold from one story moment to another: update_edge with valid_to when the bridge falls. update_edge also corrects a leg's route fields and its note. delete_edge removes a leg that was a mistake.
Regions
A region is a place that other places are located_in, to any depth: Jiggerby in the Dark Mountains in the Principality. There is nothing else to set. Tie them with create_edge kind located_in and the map draws the region around its members.
Several maps
A map is a page of type map. The first one is made when it is first needed, called "Map of" and the world's name. A world can have more: the whole world, and a separate castle map. Make another with create_node type map, and pass map to the tools. Legs belong to the world, not to a map: a map shows a leg when both its ends are on it.
get_map returns a map as data: places with positions and regions, legs with labels, the rough scale, and the list of maps. A leg marked stretched is drawn much longer or shorter than it is. That is a note for the author, not an error. place_on_map puts a page on a map, moves it (by x, y, or from another place in a direction), or takes it off; the page and its legs stay.
Ask before you write a journey
Before writing or checking how long a journey takes, call get_route. Without mode it gives the quickest way by every means that can make the journey. With mode it gives the quickest way and up to two others. as_of (a story order number from get_timeline) leaves out legs that do not hold at that moment. Each route has a time, a distance when every leg has one, directions in words, and the steps with their notes.
When there is no way, it says which place has no legs. Tell the author and ask. Do not fill the gap.
Worked example
The author says: "The hero leaves Jiggerby, in the Dark Mountains, and walks ten days south to Wickers. From there it is two days west on horseback along the Fancy Road, through the Dark Forest, to the Holy City. All of it is in the Principality of Shetnia."
searchfor each name;create_nodetypeplacefor the ones missing: Jiggerby, Dark Mountains, Wickers, Dark Forest, Holy City, Fancy Road, Principality of Shetnia.connect_placesfromjiggerbytowickers:days: 10, mode: "foot", direction: "south". If the author said it is a mountain track,terrain: "track".- The road passes through the forest, so it is two legs. The author gave two days for both; ask how they split, or whether the forest is about half way. Then
connect_placesfromwickerstodark-forest(days: 1, mode: "horse", road: "fancy-road", direction: "west") and fromdark-foresttoholy-citythe same way. - Regions:
create_edgekindlocated_infromjiggerbytodark-mountains, fromdark-mountainstoprincipality-of-shetnia, and fromwickers,dark-forestandholy-citytoprincipality-of-shetnia. get_routefromjiggerbytoholy-citynow answers: on horseback, south to Wickers, then west on the Fancy Road to the Dark Forest, then west to the Holy City, with the time for each means of travel. The hero's own journey, ten days on foot and two in the saddle, is the two statements the author gave.
Later the author adds "there is a smugglers' path from Wickers straight to the Holy City, a day and a half on foot, but it crosses the marsh". That is one more connect_places between the same two pages, with terrain: "marsh" and the note. get_route then offers both ways.
How a place looks. update_node with core.marker sets the mark (dot, ring, capital, square, diamond, triangle, star, castle, city, anchor, mountain and more) and a colour by name (moss-2, clay-1; eight hues, tones 1 to 3). core.importance is the size: 3 for a capital or anything the story turns on, 1 for a hamlet. Large places keep their names when the author zooms far out, so set it with care and only from what the author says matters.
Kilometres or miles. The world has one unit, shown by list_travel_modes and get_map; give every distance in it. When the author wants another ("miles, please"), set_travel_mode with unit: "mi" (or "km", "league") converts every distance and every mode's day of travel; legs given as a time stay as they are. Any other word, such as an invented unit, is only a name and changes no number. Only when the author asks.