Ore veins that grow with a chance per block: set the chance for the size you want
Letting a vein keep growing with some chance at each step gives natural sizes, but the chance you pick and the average size you get are not related the way people expect, especially once the vein must stop somewhere. This shows how to choose the chance from the size you want.
Why this works
Growth that continues by chance and stops at the first failure has a size you can calculate, but a ceiling cuts off the long end and pulls the average down. So you set the wanted average and search for the chance that really delivers it.
When not to use it
Skip it when veins need a particular shape, like a seam along a cliff or a ring around a crater. Size alone does not give shape, so draw the outline by hand and use chance only for the thickness.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 31 lines of example code with 5 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Ore veins that grow with a chance per block: set the chance for the size you want" (read_entry ore-vein-size-target-mean) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP