·Phase 4.24·1 min read
Letting the world decide how much ore
Removing the last target-shaped knobs from worldgen. The world places as much ore and as many volcanic vents as its geology supports, up to a global ceiling; never more, sometimes less.
A theme of the geology work has been pulling target-shaped knobs out of the worldgen pipeline and replacing them with caps. This is the last of them.
Before this phase, the ore generator had a target total: a number of ore voxels it would try to produce, even if the underlying precipitation-score field did not really want to support that many. A largest-remainder split divided the target across ore definitions, and the pipeline did its best to hit it. If a world was poor in the conditions that suggested copper, copper got placed anyway, in slightly worse spots than the generator would have chosen if it had been allowed to say no.
Volcanic vents had a version of the same problem. A fixed count of vents was selected from melt-flux local maxima, and worlds with weaker melt flux got vents in places that did not really deserve them.
The fix is small and clean. The total ore count is now a global maximum rather than a target. Each ore definition converts its integrated precipitation-score mass into a desired voxel count, applies an optional per-ore cap, and places only what the geology supports, up to the global cap. Vents pick every qualifying melt-flux local maximum until their cap is hit, and worlds with fewer qualifying outlets simply get fewer vents.
The genesis blob got fractionally smaller as a side effect:
variable-length sections now record actual ore and vent counts in
the header rather than padding to fixed widths. The fixed u32
crust layout and the bootstrap schema stay compatible.
The result is unflashy and correct. The world places what the world says it should place. Some seeds will be rich in iron, others poor in silver. Some will have a dozen volcanic vents, others two. The generator no longer lies about why.