Materials and ores

Every material the world can contain, what it costs to break, and where it is found. This is the table the generator writes and the tools read, so it is the one place where geology and gameplay are the same decision.

How to read the toughness column

Toughness is strikes to break, from full. One tool, one power level, no modifiers — a stone cell at toughness 8 takes eight swings, leaves take one. That is the whole damage model today.

It is deliberately the only input. Tool types with per-material modifiers and player attributes are both anticipated and both deferred, and the reason per-strike damage is kept as a single function rather than an inlined expression is so they land as a change to one function body rather than a hunt through the edit ops, the HUD and the highlight.

For terrain the number means something slightly more specific once the digging model lands: a strike removes (255 − 128) / toughness of the cell's density, so toughness is strikes from full density. Generated surface cells are already partially dense — a hillside's outer crust breaks faster than the rock behind it, and it should, because that crust is topsoil.

The table

Index is Voxel::colorIndex, which is what the generator writes and what the texture arrays are keyed by. The order is the table's own; nothing depends on it except that missing stays last.

#MaterialToughnessGroupWhere it occurs
0grass2SoilTopsoil — the surface-following cap, 1–3 voxels thick, sitting on top of whatever the ground does
1dirt3SoilSubsoil, directly under the topsoil
7clay3SoilIn the table, not yet placed by any generator
3sand2SoilIn the table, not yet placed
8gravel4Weathered rockThe band between soil and bedrock proper, still surface-following
10sandstone6SedimentaryA lens at a fixed height that thins and pinches out entirely across the map — present in roughly half of columns
11limestone7SedimentaryThe base rock: everything the named strata do not claim. Most of the world's rock by volume, and the band the caves and coal sit in
12shale6SedimentaryIn the table, not yet placed
13granite10IgneousA thick band below the sedimentary rock, undulating with the whole stack
14basalt11IgneousIn the table, not yet placed
15marble9MetamorphicThe deepest named band, above bedrock
16slate8MetamorphicIn the table, not yet placed
17coal_ore7OreSeams within limestone — so, shallow and common
18iron_ore9OreSeams within granite — deeper, and only in the igneous band
19copper_ore9OreSeams within marble — deepest of the three
9bedrockFloorThe bottom 2–4 voxels of the world, always present. Unbreakable
2stone8BuiltGeneric; what construction blocks are placed as. Not produced by the generator
5wood5BuiltPlaceable only
6leaves1BuiltPlaceable only
4water1ReservedHeld for liquids, which are deferred by decision. Deliberately not repurposed as a spare colour
20missingDiagnosticNever generated. Any material index with no entry resolves here and renders magenta, so a bug looks like a bug instead of borrowing a neighbour's texture

Bedrock's toughness is blank on purpose

It has an ordinary value in the table — 8, the same as stone — and it is irrelevant, because an explicit rule makes bedrock undamageable. The alternative, a toughness so large that the arithmetic rounds to zero density removed, produces the right behaviour for the wrong reason and reads as a bug to whoever meets it next.

Ore and host rock

Every seam occurs only within one host rock. That is the closest thing the world currently has to a prospecting loop: the rock you are standing in tells you what you can hope to find, and the rock bands sit at their own depths, so depth gates the ores without any rule that mentions depth.

OreHost rockShare of that rockWhat that means to a player
coal_orelimestone~5%Common and shallow — the limestone is most of the rock in the world and starts just under the weathered layer
iron_oregranite~8%Requires reaching the igneous band, but is dense once you are in it
copper_oremarble~6%Deepest, in the thinnest of the three bands, so the scarcest in practice

The shares are of the host rock, not of the world, and they are measured rather than declared — the generator's tests assert each seam stays inside a sane band so the world can be retuned without silently becoming a mine or a desert.

Seams are sheets rather than pockets, so a tunnel that cuts one shows a band running across its wall rather than isolated lumps. And because the seam pass runs after the caves, ore is never placed into a void that was already carved — you will not find a vein hanging in the air of a cavern.

The vertical order

Downward from the surface, as the generator currently builds it:

topsoil (grass)          surface-following, 1-3 voxels
subsoil (dirt)           surface-following
weathered rock (gravel)  surface-following

sandstone                a lens at fixed height; absent in about half of columns
limestone                the base rock, with coal seams and most of the caves
granite                  igneous band, with iron seams
marble                   metamorphic band, with copper seams
bedrock                  2-4 voxels, unbreakable

The first three follow the surface, so a hill's topsoil sits on top of the hill. The rock bands do not — they hold their own height and undulate as one deformed stack, which is what makes a dug wall read as geology rather than as paint. The mechanism is described in D10.

These depths are dev-scale. The world is currently 64 voxels tall so the whole sequence is compressed into about 30 voxels of rock. The design budgets roughly 190 voxels below the surface for it — soils in the first 30, the sedimentary band 80 to 100 voxels thick, igneous and metamorphic 60 to 80 below that. The bands and their order are the decision; the numbers move when the world does.

Worth holding against the geology: players mostly dig the top 30 to 60 voxels. Strata at 150 down are generation cost nobody sees, which argues for putting the variety within reach and using the deep range for rarity.

Open