Log inGet started
World

Beechwood Brook: A Temperate Forest to Walk, with Trees, Undergrowth and a Forest Builder

README.md

Rules

How a forest fills in. Rules.place(site, forestType, opts) scatters a ForestTypes recipe across a Ground site in layers (canopy, understory, deadwood, rocks, stream stones, stepping stones at every path/water crossing, shrubs, ferns, grass, floor flowers under trees, at clearing edges and in the open, moss and fungi), keeping big trees off the stream and the path, respecting hand-placed keepClear circles, and (with innerSize) growing only canopy and understory outside the walkable square. Two calls with the same site, forestType and density place the same forest (same count, same first and last instance, see tests/forestKit.testSuite).

local Rules = require("~.Rules")
local instances = Rules.place(site, Types.get("oakWoodland"), { density = 1, seed = 42 })

Each returned instance carries kind, age, variant, x, y, z, yaw, scale, layer, radius. Rules.TRUNK gives the collider radius per tree age, read by ForestBuilder when it builds trunk colliders. Called by ForestBuilder.build, not normally used on its own.