Currently it is possible to define how often a cluser of ore can spawn. Internally, mapchunk volume is divided by this number to determine how many attempts to spawn ore should be performed in the currently generated chunk. But what if you specify higher scarcity and the number of ores in a chunk approaches zero? Currently it is rounded down to 0 (or 1 idk). Instead a random number r € R u (-1;+1) should be added to the result of the division and then rounded to nearest integer. This would enable extremly rare ore deposits. The pseudocode is for illustration and assumes / is operator for real division.
Code: Select all
NumberOfClusters := Round( (ChunkVolume/ClustScarcity) + (Random(-100,100)/100) );
Edit: typo.