Status: done (2026-10-30)
Priority: 2
Size: M
Design ref: Settlements and look (Village; Generated villages: grown, not stamped; irregular cluster villages, klungbyar). Kim, 30 Oct 2026 (QUESTION_ARCHIVE.md, “Paths, fords and village layout”): houses cluster around the green and may touch; each farm’s fields form one connected block 2 to 4 steps from its house and never next to any house, so a ring of yards separates houses from fields; neighbouring blocks may adjoin into one fenced infield.
Goal: buildVillage keeps houses at least 2 steps apart and puts fields right next to them, so a generated village is a scatter of farms each ringed by its own fields: it does not look like a village that has grown. Real cluster villages kept their houses together on the village site (tomt) with the infield around them.
Acceptance criteria:
placeFields (VB-109) never takes a tile next to any house or next to the green; it takes them within 4 steps of the house, so fields lie 2 to 4 steps out.chooseTile) and plots (findSite in src/sim/expansion.js) keep the rule: no field next to a house; a plot’s house may touch other houses.buildVillage in two passes: houses first (score 0.5 per touching house or green up to 3, less 0.5 per walking step from the green, less 1.5 × stones / 255, less 2 on marsh and 0.5 on hills, plus up to 1.6 at random), then fields per house in the order the houses were built; a house whose fields find no room is left out. The settlement generator keeps the yards and the fields of all villages so far, so a later village or lone farm keeps the rules too.enclose (layout) gives the fence its land: the village’s tiles plus every tile within their reach from the green that open land cannot reach without crossing them, plus tiles with four or more of six neighbours inside.findSite in src/sim/expansion.js): the house may not touch a field, scores 0.3 per touching house or green (up to 3), and its field is 2 to 4 steps from it, next to no house or green.tests/layout.js), and every village’s houses hang together with its green through houses and yards.founders and heirs entry.