Wooden fences between houses and roads, placed automatically across the village
Built a generator that places SUNTAIL wooden fences along the yard edge between houses and roads by rule, and placed 96 sections. They break on their own at entrances and intersections and turn an L-shaped corner where a front path meets the road.
I wanted to put up a boundary, something like a wall, between the houses and the roads. I drew where the fences should go in yellow on three village screenshots (in front of the shop, in front of a house on the south side of the east main road, and the corner of the smithy yard), and in all three spots the line turned an L-shaped corner along the front path. Instead of placing a few by hand, I decided to place them across the whole village by rule.
What I built
I used the pack's four types of wooden fence at 0.8× scale, the same as the other fences in the village. One section is about 1.95 m long and about 0.93 m tall. The section type isn't random; it's set by position. The NPC in front of the shop still stands in the yard inside the fence.
The line the fences follow is 3.7 m from the center of the main roads (the edge of the stone paving), 2.0 m on alleys and front paths, and 1.1 m from the plaza edge. Fences only go up where there's a house (including annexes) within 10 m outside the line.
They break on their own at paved entrances and intersections, and along a front path they turn the corner only up to 2.4 m in (1 section). They avoid house walls within 0.9 m, the plaza, the waterfront, retaining walls, props, trees, street lamps, NPC bodies, and anything within 1.6 m of a door or arrival point. If an unbroken stretch is 1.6 m or longer, as many sections as fit are placed centered in it. Three houses whose walls are only 0.5–0.7 m from the paving edge, with no yard, get skipped.
Fences can't be walked through, and after placing them I rebaked the pathfinding data (NavMesh). Paths connect from the south entrance to all 7 doors and arrival points, and all 8 NPCs have a path to within 2 m (12–16 of 16 directions). Actually walking around and talking to them is for next time.
Things I thought about
- Pulled the line in to the edge of the paving. At first I set the line at 4.95 m with at least 2 sections per stretch, and got only 62 sections; they sat too far from the road and were broken up here and there. Pulling the line in to the 3.7 m paving edge and loosening the overlap check gave 83, and allowing corner turns and 1-section stretches brought it to 94.
- Only avoid NPC bodies (96 sections in the end). At first I left 1.6 m clear in front of each NPC, and the fence in front of the shop almost disappeared. Talking range is 2 m and clicking walks you to 1.7 m in front of them, so as long as an NPC stands within 1.5 m behind the fence, you can easily talk to them from the road.
- Wooden fences, not stone walls. The pack had no fitting module for a low stone wall (its stone walls are building-wall sized).
Next up
- In a few places a single fence section stands alone. If it bugs me, raise the minimum section count or remove them spot by spot
- Running the full generation again may shift the trees and grass behind the fences a little


