Generates the world in square tiles that can be streamed in any order. Give it a latitude and longitude and it builds the tile containing that point. Settlements (villages, towns, cities up to 4000 houses) are placed from the map and can span several tiles. Main roads run town to town and lanes cross the country between them, and a dense railway network joins the settlements. The rest is mostly farmland with hedgerow fields, farms, copses and orchards, broken by tracts of woodland and rough, unused land. A settlement has a centre with a high street, a church and (for towns and cities) a market square on the main road, then a Victorian terrace core, a garden-suburb ring and ribbon semis along the radials, a station it grew round, and its industry: a gasworks in every town, mills and works in the industrial towns, works and trading estates on the outskirts. Out in the country, away from the houses, are collieries, quarries, brickworks, gravel pits, sawmills and each town's sewage works. Output is a PNG plan in aerial-photo colours and a JSON layout per tile, meant for Unreal (PCG / Blueprint) or Blender.
No roundabouts anywhere, and culs-de-sac just end: both are post-1930 things.
uv run towngen.py --grid 20 --detail 3That is the standard example: the 20 × 20 tiles (39.6 km square) round the default location, stitched into one overview, plus a readable 3 × 3 detail (5.94 km) round the centre tile. The default location (52.1169, −1.3393) is tile (5, 6). With world seed 1 it holds the core of a city of about 2,100 houses, built tighter than most (density 1.53, see Settlements), that spreads across the corner of four tiles.
uv run towngen.py --lat 52.117 --lon -1.3685One tile: its JSON and a PNG.
| flag | meaning |
|---|---|
--lat, --lon |
a point in the tile to generate |
--grid N |
generate the N × N tiles round it in parallel, stitch their images into one PNG, check every shared edge, that every building, gate, stile, station and works landed on exactly one tile, that every works is reached by road, and report the tightest railway curve |
--detail M |
also draw the M × M tiles round the centre (odd M) at --detail-ppm (default 1.2 px/m) |
--json |
grid runs: also write every tile's JSON, into out/b<build>/ (a single tile always writes its JSON) |
--workers N |
processes for a grid run (default: CPUs − 2, at most 12) |
--tile-size M |
tile edge in metres (default 1980: 66 heightmap samples of 30 m); part of the world definition, so keep it fixed |
--seed N, --seeds N N ... |
world seed(s) |
--density D |
1 = as designed; 1.5 packs lots, closes and streets tighter; 0.7 looser (times each settlement's own) |
--style S |
force one district style everywhere (victorian, garden_suburb, ribbon) |
--ppm P |
pixels per metre (default up to 4, less for big areas so a grid image is about 10,000 px wide: 0.25 px/m for 20 × 20) |
--no-fit |
skip the re-fit to the map's house count |
--out DIR, --dpi N, --no-plot |
output control |
Every run takes the next build number from out/build.txt and puts it in every file name,
so runs never overwrite each other and can be compared side by side:
out/grid_<i>_<j>_<N>x<N>_s<seed>_b0001.png, out/detail_<i>_<j>_<M>x<M>_s<seed>_b0001.png,
out/tile_<i>_<j>_s<seed>_b0001.json (and .png) for one tile. The run prints every file
with its full path.
A grid run hands the tiles to worker processes in 2 × 2 blocks (neighbours share a worker's
cache of settlements). Each worker generates a tile, draws it at the overview scale and
sends back the picture, what crosses each of its four edges (edge_signature) and what it
placed (tile_report); the main process stitches the pictures and does the checks from
those, so no worker needs another's tiles. It prints the cities and towns inside the grid,
how many of the buildings, gates, stiles and stations that belong wholly inside it were
placed (each exactly once), the railway length, and the seam check, e.g.
seams: {"edges": 760, "road_crossings": ..., "mismatches": []}.
Farmland tiles take under a second. A tile that touches a settlement also generates the
whole settlement once (cached for its neighbours in the same worker): a few seconds for a
town, more for a city, because the fit may generate up to four times. No system Python is
needed: uv manages the interpreter and the dependencies (numpy, shapely, matplotlib)
from pyproject.toml.
Generation has three levels. Each one is a pure function of the world seed and the map, so any tile can be built on its own, in any order, and still match its neighbours.
latlon_to_world projects lat/lon to metres east/north of WORLD_ORIGIN (equirectangular
for now; swap in the map's own projection, e.g. British National Grid, as long as the game
uses the same one). The World class works things out on demand around whatever a tile
asks for, and caches them, since neighbouring tiles ask for the same things.
| layer | how |
|---|---|
| settlements | one candidate per REGION_CELL (3 km), at a hashed spot in the cell. region_info says how many houses and how densely built: currently a hashed stand-in (45 % villages, 12 % towns, 3 % cities up to MAX_HOUSES; a third of towns and cities dense), and this is where population / land-use map lookups go. Each settlement gets a square box sized for its largest re-fit plus a rural margin. A bigger settlement suppresses any smaller one whose box would come within SETTLEMENT_GAP of its own |
| main roads | between settlements that are relative neighbours (no third settlement closer to both), up to MAIN_ROAD_MAX (9 km) apart |
| lanes | lane junctions, one per LANE_CELL (1.4 km) with 65 % odds, dropped inside settlement boxes or within LANE_CLEAR_MAIN of a main road. Lanes are the same neighbour graph on junctions + settlements, up to LANE_MAX (3 km), leaving out settlement pairs (main roads join those) and lanes that would leave a settlement within 25° of one of its main roads |
| road lines | each road is built in a canonical direction from its own hash seed, so every tile gets the same line. It leaves a settlement's box dead straight for PORT_LEAD past the edge, then wanders as a cubic with smooth sideways noise, never bending tighter than ROAD_MIN_RADIUS (300 m main roads, 120 m lanes). A road that would cut through another settlement's box is calmed down, or dropped |
| landscape | World.land gives every point how wooded and how rough the country is: two octaves of smooth value noise (LAND_CELL, 1.7 km), a stand-in for a land-use map. cover makes a whole holding woodland where the wood noise is over WOOD_T (about 8 % of holdings) or rough, unused land over ROUGH_T (about 7 %), so both come in tracts of a few holdings with ragged edges. They thin out towards the settlements (the land round a town is farmed): within 900 m of a town's box and 400 m of a village's the thresholds rise, by up to 0.22 at the box edge |
| farmland | holdings: the Voronoi cells of one jittered seed per HOLDING_CELL (500 m, so about 25 ha each), each built from the same 5 × 5 seeds whoever asks. A holding loses the strips of the world roads crossing it, then the rest is cut into roughly rectangular 1–4 ha fields (recursively across the long axis of each piece), so each holding has its own lie and fields line up with the roads. Hedgerows run on the cuts and on the boundaries between holdings (each boundary drawn once), and along both sides of the world roads, HEDGE_SET (0.75 m) into the field from the verge, turning the corners at junctions; field hedges stop on them. Every field gets a gate (GATE_WIDTH 3.6 m): in the roadside hedge where the field fronts a road, else in a hedge it shares with another field. Each field gets a crop tint; near a settlement, the odd small field is an orchard or a large one a recreation ground. A holding usually has a farmstead (yard, farmhouse, barns) at least 60 m inside it and 45 m off the roads, with a track to the nearest world road; most tracks (TRACK_HEDGE_P, 80 %) run between hedges from the yard to the roadside hedge. About one copse per 20 ha. A woodland holding is one wood: no fields, no hedges inside, none along its roads (the trees come up to them) and none with a wooded neighbour, which it runs on into; it keeps 2.5 m off the hedges it shares with farmland. A rough holding keeps its old field pattern but about half its hedges are gone, it has no farm and no gates, and each field is rough grass, scrubby rough or heath, with clumps of scrub and thorn trees. Among the farms, now and then a field has gone to wood or rough grazing, more often where the country round is wooded or rough. None of it looks at a tile |
| rural works | one candidate per INDUSTRY_CELL (2 km) with odds INDUSTRY_P (20 %, 50 % on the coalfield, a broad patch of noise over COAL_T). Its kind comes from the land: collieries on the coalfield, quarries in rough country, brickworks on the clay (more noise), gravel workings anywhere, sawmills by the woods. With odds BY_RAIL_P (every colliery, 50–60 % of quarries, brickworks and gravel pits, 30 % of sawmills) it is first tried alongside a railway line, its loading side to the line; otherwise, or failing that, at one of six hashed spots in the cell. Either way it keeps to the middle of its cell, at least WORKS_CLEAR (300 m) off every settlement's box and clear of roads and railways, and only where a road can be had to the nearest world road without crossing a railway; a colliery takes the first spot its siding can reach. Every works has a metalled road from the gate in its front fence to a world road. Within SIDING_MAX (2.5 km, a mineral branch) of a main line it gets a siding: it leaves the line straight on from a junction behind the works (kept on the line even where a short line between near neighbours ends sooner) and comes in along the loading tracks, crossing the works only at the back (level crossings over lanes, under main roads by bridge); a siding that would curve tighter than RAIL_MIN_RADIUS is not built, and the works makes do with its road. Its other loading tracks branch off the first on reverse curves. Each town has a sewage works just beyond its box. The works are laid out from works_plan (below); their land comes out of the holdings' fields behind a fence, and footpaths and farms keep off them |
| footpaths | from each farmstead, with odds FOOTPATH_P (30 %) per forward neighbouring holding (larger key, so each pair is decided once), to that holding's farmstead, 250–1100 m away: a straight line with a gentle wander, yard to yard. A path that would cross a settlement or another farmyard is dropped. A stile wherever it crosses a hedge (field, roadside or track), unless it passes through a gate there. About 1 km of path per km² |
| railways | a dense 1930s network (about 0.2 km of route per km²; England had about 0.17 then, Great Britain 0.14), laid out as a civil engineer would, so trains run on through stations and never have to turn round. Which places: lines are built only to places with at least STATION_MIN_HA (19 ha) of built-up area, the size of Manningtree, England's smallest town with its own station (about 120 houses at village density); a smaller village gets a halt only where a line between two such places passes over it anyway, and the line then runs straight through it. Which lines: between neighbours among those places (relative neighbourhood graph, up to RAIL_MAX 12 km, never over another such place). At each place the two most nearly opposite lines, at least RAIL_PAIR_MIN (100°) apart, run straight through it, and these are always built, so lines carry on in chains; a town or city without such a pair also gets a line to the nearest place roughly opposite one of its lines. Other lines are kept with odds RAIL_KEEP (town to town always) and come in as branches: they join the through line out in the country at a junction facing the station, RAIL_RUNOUT (500 m) out, where the through line runs straight on before it curves, so a branch train runs into the station along it. A line that would have to come in at a terminus's buffers isn't built. Shape: through each station a straight run (its chord) beside the centre, about half its radius off, along the through lines; between stations the usual smooth cubic, or longer or shorter reaches, or arc–straight–arc (Dubins) paths, the gentlest that keeps out of every town and village, is at most RAIL_DETOUR_MAX (1.5×) the way straight there and never turns round more than RAIL_TURN_MAX (140°) one way, so there are no hooks. A line is only built if it can curve no tighter than RAIL_LINE_MIN (160 m, 8 chains, a light railway's limit); it aims for RAIL_LINE_RADIUS (300 m). No track anywhere curves tighter than RAIL_MIN_RADIUS (61 m, the London Underground Central line's tightest), measured over 10 m, about a carriage's bogie spacing. A town or city left with no line keeps its gentlest. Double track between towns (or to a city), single on village lines. Holdings take the railway land (RAIL_CORRIDOR, fence to fence) out of the fields and hedge its fences; farms keep 60 m off, copses 15 m, and no farm track crosses the line. Where a line crosses a world road: a bridge for a main road, a level crossing for a lane |
| village paths | for each settlement, up to 2 (village) or 3 (town, city) paths from the nearest farmsteads 60–900 m outside its box, in directions at least 70° apart and at least 20° off any road coming in. The world part runs from the farmyard to the box edge, heading for the centre; it needs nothing from the settlement, so a tile near a town can draw it without generating the town. The settlement takes it on from there (see Settlements). Stiles as for any footpath |
The graph rules are local: whether two nodes are joined depends only on nodes within the road's length of them. That bounds what a tile has to look at. The hash is plain splitmix64 on uint64, so the engine can reproduce the world bit-for-bit.
A settlement is generated once, in its own box, by World.town. The world roads ending
there arrive as ports where they cross the box edge. Inside, the main road runs through
the centre between the two most nearly opposite ports (main roads before lanes), and the
other ports join it as radials. A lane into a town is built up like a main road. Each
road runs straight for PORT_LEAD in from the box edge, along the same line as the world
road outside, so the two meet exactly. Then come the districts, high street and so on
below. Land between the houses that is big enough to farm (or touches the box edge) is
handed back to the tiles; the rest (lots, roads, greens, parks, allotments, churchyard) is
the settlement's footprint. Where its roads run through the land handed back, the
settlement draws roadside hedges the same way the holdings do, so a hedged main road stays
hedged up to the first houses.
The railway's chord through the box is a fixed corridor. Right after the main roads, the
settlement puts its station on the chord, sliding it along from the point nearest the
centre until it is clear of them (STATION_LAYOUTS):
| settlement | single track | double track |
|---|---|---|
| village, town under 1000 houses | 1 platform | 2 platforms, one each side |
| large town (1000–1499) | passing loop, 2 platforms | 2 platforms + a bay (3 faces) |
| city | loop + bay (3 faces) | loops each side, 2 island platforms (4 faces) |
Platforms are 80 m (village) to 230 m (city) long. Loops and bays leave the running line on
leads: reverse curves of two RAIL_LEAD_RADIUS (100 m) arcs, so a terminus's run goes on 100 m
past its platforms to make room for them. The station building with its canopy
stands on the town side with a forecourt and an approach road. There's a signal box, and a
footbridge when there are platforms on both sides. No goods yard: goods sidings will come
with industry. Main roads may bridge the tracks past the platform ends; only if no spot
along the chord fits is the layout made smaller. After that, every other street keeps
clear of the railway and station, and lots stay off them. Main roads cross the chord on a
bridge; lanes and streets cross at level crossings.
The towns were there before the railway, and grew round their stations: the station
quarter (STATION_QUARTER, 150 m round a village station to 380 m in a city) is built up
like a town centre. Station Road runs along the line on the town side past the forecourt,
out to the main roads either way, and a second street runs along the far side
off a main road that bridges the line, so both sides are built up. Along the main roads
and these streets near the station the frontage is the station mix (STATION_MIX): shops,
pubs, a hotel, warehouses and terraces; side streets grow off them as in the core.
A settlement's industry comes from the world (World.town_works, a stand-in for map
data) and is placed right after the station, before the other streets, which keep off it:
| where | what |
|---|---|
| every town | a gasworks on the edge of town: gasholders, retort house and chimney, coal store, alongside the railway with sidings off the running line |
| industrial town (density 1.5 and over) | the works it grew round, near the centre: a hosiery or spinning mill, a boot and shoe factory, an engineering works, a foundry or a brewery (two in a city). Round it a works quarter (WORKS_QUARTER) built up like the core, terraces with workshops, corner shops and pubs (WORKS_MIX) |
| outskirts | one or two works in a town (engineering works, timber yard, creamery, maltings, brewery), in a larger town often a 1930s trading estate: a road in off a main road with factory units either side, cream offices in front of sawtooth sheds |
| villages | now and then a timber yard, creamery or maltings |
| streets | workshops among the station quarter's shops and in the works quarter; now and then a motor garage with its forecourt on a main road out |
Every works is reached by road. One that wants a siding goes alongside the railway, with
a lead off the running line on a reverse curve onto its loading tracks (the others branch off
the first the same way), at the first spot where a street can be brought round to its
front (or in at an end) without crossing the line; otherwise it fronts a main road, with a
drive in through a gap between its buildings (or up to the gate in its fence), and, if it
wants rail and the line is within 300 m over open ground, a siding from the line in along its
back. Each kind has its own plan (works_plan), in
its own frame with the loading tracks along the back: buildings with their heights and roof
form (pitched, sawtooth north lights, flat, round for gasholders and filter beds), and areas
for yards, pits stepping down in benches, clay pits, flooded workings, spoil tips and
sludge beds.
Settlements differ in how tightly they are built: the map gives each its own density
(region_info): about a third of the towns and cities are dense (1.5–1.9, smaller and
packed tighter for the same houses), the rest 0.85–1.2. --density multiplies it.
Footpaths reach the settlement at its box edge like roads do, and it takes each one on to the church (to the high street if it has none), ending at the church wall. Before any lots are placed, the path gets a 3 m corridor through the built-up area that lots are cut back from, so it passes between the houses (a ginnel) rather than through their gardens. Where the corridor turns out to border only farmland, it goes back to the fields, and the path crosses them with stiles like any other. The world adds the stiles for the settlement's part from its path, the field hedges in its box and its roadside hedges, skipping anything in the town itself.
From the house count the generator picks a kind and splits the houses between districts
(village: no core; town: 30 % core; city: 45 % core), turns each share into an area with a
measured gross density, and gets the district radii. The district boundary is perturbed by
angle so it is not a circle. After generating, the dwellings are counted and the radii
re-fitted (secant on log count vs log radius, best of up to four runs, at most RS_MAX) to
land within about 10 % of the target.
| district | style | what is there |
|---|---|---|
| core | victorian |
bye-law grid: straight streets at right angles off the radials and off link roads between neighbouring radials, cross streets at the block ends, continuous terraces of 8–22 with rear outriggers in pairs, back alleys, slate roofs |
| suburb | garden_suburb |
crescents (shallow loops with smooth sideways noise), short bent closes, village greens beside junctions, 4 m verges with street trees, cottages in pairs and rows of 3–4 |
| ribbon | ribbon |
bay-fronted semis lining the radials with 40–55 m gardens, a few side lanes, nothing behind |
| rural | — | no houses: handed back to the tiles |
Tile (i, j) covers [i·S, (i+1)·S) × [j·S, (j+1)·S). World.tile gathers the world roads
crossing it and cuts them out of the boxes of the settlements they end at (the settlement
routes them there). It takes the slices of the settlements whose boxes overlap it: lots,
greens, roads and road polygons are clipped to the tile. Buildings, garages, sheds, cars,
trees and the church go to the tile that holds their centre, so each exists exactly once
even when it straddles a seam. The land left over (the tile less road polygons and
settlement footprints) gets the world's field pattern: every field, hedgerow, copse,
orchard, farm track and footpath reaching the tile is clipped to that land (so footpaths
break at the roads they cross). Hedges get a gap of GATE_GAP either side of each gate,
STILE_GAP either side of each stile and TRACK_GAP either side of each farm track, cut
from world positions so a gap spanning a seam is the same on both sides. A track through a
copse cuts a ride through it, and hedges stop at the wood's edge. Farmsteads, gates, stiles
and pitches go to the tile holding their centre. The tile scatters its own trees over its
own land (in fields, in copses, along hedges but clear of gates and stiles and with no more
than a fringe of crown over a road or track), so they need no coordination.
Everything that crosses a seam matches: roads, pavements, lots, fields (by id), hedgerows, woods, farm tracks, footpaths, railway land and track. Railway lines are drawn whole on every tile they cross, towns included (towns are built round them). Stations, station buildings and rail crossings go to the tile holding them.
The high street is the stretch of main road within R_hs of the centre: continuous shop
frontages right on the pavement with deep plans and yards behind, a pub or two and civic
buildings, mixed with cottages in a village. A church with a tower sits in a churchyard
beside the main road; towns and cities also get a market square, a paved rectangle off the
main road that the frontage walker wraps shops around.
| road | how |
|---|---|
| main road | between the two most nearly opposite ports of the settlement's box, through the centre: two cubic curves meeting there square-on, with smooth sideways wander that fades out at the ends. With one port or none it ends in the fields instead |
| radials | the other ports, each a curve off the main road near the centre, kept ≥ 75 m from other roads, relaxed until it fits because a port has to be joined. A settlement with fewer arms than it wants gets radials that end in the fields |
| link roads | core only: curved connections between neighbouring radials at ~0.6 and ~1.0 of the core radius, so the grid has more to hang off |
| loops | leave a radial at one junction station, bulge out to one side, rejoin at the next; sideways noise so they wind |
| closes | spurs with an overall bend plus a C or S wiggle (curvature limited to a 22 m radius); flat-ended, or rarely (garden suburb) ending at an oval green with the lane around it |
| streets | core: straight, 60–74 m apart, 140–300 m long, joined by cross streets |
Every candidate road keeps a minimum clearance from existing roads outside a disk around its junctions, which spaces parallel roads about two garden depths apart.
The kerb outline (carriageway + pavement, unioned) is walked as rings with the land on the
right. Lots are chopped off in runs whose typology comes from the district style of that
spot, or from the high-street mix near the centre. Each lot is the strip between the kerb
and an offset curve depth metres out, clipped against roads and earlier lots; corners
where the kerb turns sharply right (junction inner corners) are skipped. A building
footprint is fitted inside each lot; lots where none fits are dropped. Then driveways,
garages, sheds, outriggers and garden trees per style.
Small leftovers inside the town are green (dense trees, so back-to-back garden gaps become
tree corridors), alley (Victorian back lanes), village_green, churchyard, and for
larger enclosed pieces park (perimeter trees, a pitch if it fits) or allotments (strips
of plots with tiny sheds). Everything else is handed back to the tiles, which lay the
world's farmland over it (see World and Tiles above).
All tunables are in Params (per style, overridden in STYLES) and the constants at the
top of towngen.py; the town plan numbers are in Town.plan_layout.
One file per tile. Units: metres, tile-local (origin at the tile's SW corner), +y north
(plan view); the tile sits at meta.tile.world_offset_m. Angles in degrees, CCW from +x.
For Unreal: cm = m * 100, UE.X = x, UE.Y = -y, yaw = -rot_deg.
| key | contents |
|---|---|
meta |
tile seed, size, unit notes, summary counts |
meta.tile |
index [i, j], size_m, world_seed, world_offset_m, latlon_sw / latlon_ne, projection, settlements[] overlapping the tile (id, kind, target_houses, dwellings in the whole settlement, centre_world_m, box_world_m), world_roads[] crossing it (id, class, width_m, pavement_m) |
roads[] |
one entry per piece of road on this tile. id is global: M:<a>-<b> / L:<a>-<b> for world roads (main road / lane between settlement or lane-junction ids), <settlement>.r<n> for a settlement's roads, so pieces of one road on several tiles share it. class (distributor/lane/loop/close/street), level, parent, width_m, pavement_m, continues (the world roads a settlement road carries on from its box edge), points (centreline, clipped to the tile), end_green polygon for green closes, junctions (arc-length positions of attached roads; only on roads wholly inside the tile) |
carriageway, pavement_outline |
unioned road polygons (exterior + holes), for painting roads into the landscape |
squares[] |
market square rectangles |
landmarks[] |
type (church), pos, rot_deg, footprints (nave, tower) |
lots[] |
id, type, run, polygon (clipped to the tile: a lot across a seam is in both files under one id) |
houses[] |
id, settlement, lot, type (terrace/semi/detached/shop/pub/civic), run, style, pos, rot_deg (along-road axis), facing_deg (toward the road), size [w, d], setback, roof (palette index) or roof_rgb, mirror (second half of a semi pair), footprint (whole, even if it pokes over the tile edge), optional wing |
driveways[], garages[], sheds[] |
polygons / pos+rot+size (allotment sheds have lot: null) |
cars[] |
pos, rot_deg, size |
trees[] |
pos, radius (garden, green, verge, hedgerow, wood, orchard and farm trees alike) |
greens[] |
kind (green/village_green/churchyard/alley/park/allotments/field/rough/wood), id (fields, rough and wood: F<i>_<j>.<n>, holding and field, the same on every tile a field reaches), tint (field crop index; for rough: rough grass / scrubby / heath), polygon |
scrub[] |
pos, radius: bushes on rough land |
industry[] |
id (W<i>_<j> rural, SW:<settlement> sewage works, <settlement>.w<n> in a town), kind, pos, rot_deg, settlement, access (the road in: a town street id like S3_4.r57, or the works road <id>.road), gate (where it meets the works), rail (has a siding); only on the tile holding its centre |
industry_areas[] |
site, kind (ground / rough_ground / yard / verge / pit / pit1 / pit2 / clay_pit / water / sand / spoil / sludge / sewage_ground), polygon, clipped to the tile |
industry_buildings[] |
site, type (retort_house, gasholder, mill, chimney, shed, headframe, kiln, filter_bed, unit_office, ...), pos, rot_deg, height_m, roof (pitched / sawtooth / flat / round / pyramid / none), footprint; each on the tile holding its centre |
works_roads[] |
id (<works>.road), points, clipped: the rural works' roads |
fences[] |
lines, clipped: the boundary of every works |
hedgerows[], tracks[], allotment_strips[] |
polylines (hedgerows include the roadside and track ones, already gapped at gates, stiles and tracks) |
railways[] |
pieces of track on this tile: id (R:<a>-<b> a line between settlements, R:<settlement> the chord through one, R:W<i>_<j> a siding out to a rural works, <settlement>.loop<n> / .bay<n> station tracks, <works>.s<n> / .t<n> works sidings and loading tracks), kind (line / chord / siding / loop / bay), tracks (1 or 2; a double line's points are its centreline, tracks 3.4 m apart), points |
railway_land |
the railway land, fence to fence (exterior + holes), for painting the ground |
platforms[], rail_yards[] |
polygons (clipped to the tile): platforms; station forecourts |
stations[] |
id, settlement, pos (station building), rot_deg (along the line), platforms, platform_faces, tracks, size, platform_length_m; only on the tile holding the building |
rail_buildings[] |
type (station / canopy / signal_box / footbridge), pos, rot_deg, footprint; each on the tile holding its centre |
rail_crossings[] |
id, kind (bridge: road over rail / level), pos, rot_deg (along the line), road_rot_deg, road_width, tracks; on the tile holding it |
footpaths[] |
id (P<i>_<j>.<n> farm to farm, V<settlement>.<n> farm to box edge, V<settlement>.<n>.in box edge to church), points (the piece on this tile, broken where it crosses a road) |
gates[] |
id (<field id>.gate), kind (road / field), pos, rot_deg (along the hedge), width_m; only on the tile holding the gate |
stiles[] |
id (<footpath id>.s<n>), pos, rot_deg (along the hedge); only on the tile holding the stile |
pitches[] |
football pitch rectangles |
farms[] |
id, pos, rot_deg, yard, buildings (farmhouse / barn footprints); only on the tile holding the farm's centre |
woods[], orchards[] |
polygons |
Houses in the same run share a type and roof colour; a terrace or shop run is one
contiguous block, a semi run a mirrored pair sharing the party wall. Ids of settlement
content (S3_4.h120, S3_4.l88, ...) are global, so the same object can be recognised
from any tile.
- Rivers and canals, and the mills, wharves and gravel workings that go with them.
- Pit villages by the collieries; wagons in the sidings.
- Railways shaped by terrain (embankments, cuttings, viaducts), once heights are in.
- Ribbon service roads, a village pond, a school on the recreation ground.
- Unreal import: spawn roads as splines, buildings and trees as HISM instances from the JSON (PCG or a Blueprint/C++ importer).
- Real map data in
region_info(population, land use) instead of the hashed stand-in. - Footpaths between neighbouring villages, and a lych gate where a path enters the churchyard.