Locations

Reference modules

Locations

Locations are records, maps are layers: parentage, 3D terrain and forest, flat base maps and strokes, unplaced locations, and reference protection.

What a location holds, what a map holds

These are two things, deliberately split. A location is a record: Wei, Shu, Chengdu—each can be a card holding a name, environment description, aliases / former names, per-chapter changes, and the script references pointing at it. A map is an interactive layer: which grid or polygon a location occupies on which map, and what terrain sits under it.

So a location may never appear on any map and still be fully valid; deleting a map range never deletes the card. Drafting needs the record layer; the map is there so you can see space.

Where you open it: canvas left, two panels right

Open Locations in the left navigation. It is a map workbench:

  • Canvas: the map fills the inner frame the moment you open it—no extra border, no page scroll. Dragging and zooming move the map, never the toolbar.
  • Bottom-right island: current map name and placement count, the 3D / flat switch, plus project Undo, Redo, fit view and settings.
  • Top tools: 3D carries Browse, Sculpt, Terrain, Forest and Crop; flat always keeps Browse, Brush, Eraser, three stroke widths, colour, Draw region and region visibility in one single-row capsule.
  • Right sidebar, upper half “Maps”: the world map and every detail map—create a sub-map, rename, delete. Lower half “Location library”: the records, with a filter for unplaced ones.

Double-click a map row to enter it; double-click a location row to edit its record. Creating a detail map or placing a location starts only from the right-click menu, and rows drag by the handle at the end of the line so the right-click stays usable.

One source for the hierarchy

Parentage is stored once, on the place itself; the list of children is computed on the spot, never mirrored. So there is nothing to fall out of sync: the inspector, the agent, the graph and the map all read the same relation.

  • The right-click menu on a place row spells everything out—edit the record, create a detail map, move to top level, place on the current map.
  • Drag a second-level row to the “top level” drop zone at the head of the list to promote it; drag it onto another place to become that place’s child.
  • Edit Location holds Location Name, Environment Description, Aliases / Former Names, location colour, Sub-location Preview, Current State Representation and Script Scenes.
  • Deletion asks you to confirm. While a place or its subtree is still referenced by the script it cannot be deleted, and its parent cannot be changed either—the Script Scenes block lists every reference (“Scene N · title”, scene setting ones marked as a scene setting switch) and jumps into the draft so you can unbind first.

3D: paint a range, sculpt terrain, lay forest

3D positions cells on a grid, but nothing looks like a spreadsheet: no A/B/C or 1/2/3 headers, and every cell renders as a terrain tile so the blank canvas reads as a map first.

  1. Browse
    The default. Drag to pan, scroll to zoom, hold Space to move; double-click a range—into the detail map if one exists, otherwise into that place’s record.
  2. Draw a range
    Switch to range mode, drag across cells, and a naming box floats over the centre of the range (it never pushes the canvas or toolbar). Hold Option to subtract cells from the selection.
  3. Terrain and forest
    The terrain brush changes the surface; the forest brush only adds or removes forest extent—trees, rocks and grass are derived from that extent and the ground under them. Brushes come in 1×1 / 3×3 / 5×5, snapping to the centre cell, and the preview always matches what will change.
Forest only takes on grass, mountain, swamp and snow, each with its own mix: grass gets many trees and little rock, mountain more rock and less grass, snow only snow trees. Cells on unsupported ground are skipped rather than voiding the whole stroke, and switching the surface back does not restore the forest—you paint it again.

The hide brush removes a cell from this map (cutting its forest too); if a placement lived there, only this map’s rendering goes — the record stays.

Flat view: base map, strokes, regions in three layers

Each map has one flat base image. Upload a local PNG or JPEG (source file up to 30 MB; oversized images shrink to 8192 px on the longest edge and tell you so), or, when there is no base yet, open the blank board and draw the first one. After that, brush and eraser keep working on the same image: strokes live in their own layer at relative coordinates, the original file is never edited, and the eraser only touches the stroke layer.

  • One press-to-release counts as one stroke: it saves when you lift and costs exactly one project undo step; Cmd / Ctrl + Z rewinds whole strokes.
  • Regions are drawn point by point on the base image, closed by clicking the first point or double-clicking, then must be bound to a place—an existing one or a new one; cancelling the bind saves nothing. Polygons cannot self-intersect and cannot have holes.
  • While drawing you can zoom with the wheel and pan with Space; Esc cancels. If vertices already exist, switching view, map or mode asks whether to discard them.
  • Select a region and its actions—edit boundary, open place, change place, delete—appear appended to the same capsule. Drag vertices, click an edge to add one, delete one (three points minimum), drag the interior to move the whole region.
  • Regions and strokes are stored relative to the image, so replacing the base image keeps them. Replacing or deleting a base asks once, about “flat annotations”: keep them or clear regions and strokes together.

One place may own several disjoint regions, and regions of different places may overlap or nest; smaller regions sit above larger ones and labels land inside automatically. There is no manual layer order and no manual label position, and 3D geometry never converts into polygons—each view keeps its own.

Getting unplaced locations onto a map

A location name committed from the script becomes a real card immediately, but it is not on any map. The location library aggregates every card, and the unplaced filter shows the ones missing from the current view.

  1. In 3D: place it
    Drag the row onto a cell, or use the right-click menu to place it on the current map, then paint the range.
  2. In flat: draw first, bind second
    Draw the polygon on the base image, then choose a location in the binding panel or create one there.
  3. Deleting a placement is cheap
    It only returns the location to unplaced. It does not delete the record, the other view’s geometry, or sub-maps.

How it meets the script

Scene and scene setting locations reference the place identity, not a string. With the scene’s main location set to “Shu”, typing “rear hall of the yamen” into a scene setting reuses the unique match inside that subtree; a name that is not there creates a direct child of Shu. Filling only a time is legitimate too: an empty scene setting field means “inherit the scene”, and is never back-filled into the record.

Children project back into the parent’s range (Chengdu shows inside Shu on the world layer) and the projection can be corrected by hand afterwards. Every place can go one level deeper; there is no separate rule for “range” versus “pin”.

Limits and troubleshooting

  • Region visibility affects this canvas only: turning it off hides fills, borders, names and click targets together; starting a new region or locating one from the sidebar brings them back, and the switch never writes to the project.
  • The split screen adapts to the window, so the right rail keeps room for its buttons and menus. Panning stops at the outermost visible cell, so no expanse of blank makes the map look lost.
  • Old projects upgrade themselves: places that used to carry map data get a default world map with placements rebuilt as faithfully as possible; maps without flat fields open in 3D.

What this version does not do: no AI-generated base image, no multiple base layers, no crop / rotate / stretch or opacity slider, no pins and route lines, no cross-session stroke history or single-stroke selection, and no hex grid. See Cross-module links and Entity mentions and @.