After checking a while i think a best oregen is a vein one. Work is done. I decided to separate ores to rare and common.
Rare is mese, diamond, chromium, gold, silver, mithril and uranium. They will be generated below -300 as a single nodes forming a chain, but separated with 3-4 blocks of stone.
Common ores are coal, iron, copper, tin, zinc and lead. They will form a continuous line 2-5 nodes in diameter below +100. Vanilla scatter oregen is removed.
Related screenshot illustrated oregen (for research purprose i allow ore replace air with unlimited height):
- Screenshot from 2016-03-17 19-29-03.png (322.36 KiB) Viewed 3244 times
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.clear_registered_ores()
local noise_seed=484
local threshold_very_rare=0.995 -- 0.9 - very rich 0.99 - average thick vein 0.995 - rare separated nodes
local threshold_rare=0.99
local threshold_ambient=0.5
local ambient_ores = {
clay = {
ore = "default:clay",
wherein = {"default:sand"},
},
sand = {
ore = "default:sand",
wherein = {"default:stone", "default:sandstone", "default:desert_stone"},
},
dirt = {
ore = "default:dirt",
wherein = {"default:stone", "default:sandstone"}
},
gravel = {
ore = "default:gravel",
wherein = {"default:stone"},
},
}
local valuable_ores = {
coal = {
ore = "default:stone_with_coal",
wherein = "default:stone",
},
iron = {
ore = "default:stone_with_iron",
wherein = "default:stone",
},
copper = {
ore = "default:stone_with_copper",
wherein = "default:stone",
},
tin = {
ore = "moreores:mineral_tin",
wherein = "default:stone",
},
zinc = {
ore = "technic:mineral_zinc",
wherein = "default:stone",
},
lead = {
ore = "technic:mineral_lead",
wherein = "default:stone",
},
}
local rare_ores = {
mese = {
ore = "default:stone_with_mese",
wherein = "default:stone",
},
diamond = {
ore = "default:stone_with_diamond",
wherein = "default:stone",
},
gold = {
ore = "default:stone_with_gold",
wherein = "default:stone",
},
silver = {
ore = "moreores:mineral_silver",
wherein = "default:stone",
},
mithril = {
ore = "moreores:mineral_mithril",
wherein = "default:stone",
},
chromium = {
ore = "technic:mineral_chromium",
wherein = "default:stone",
},
uranium = {
ore = "technic:mineral_uranium",
wherein = "default:stone",
},
}
for name,ore in pairs(ambient_ores) do
noise_seed=noise_seed+1
minetest.register_ore({
ore_type = "sheet",
ore = ore.ore,
wherein = ore.wherein,
clust_scarcity = 12 * 12 * 12,
clust_num_ores = 5,
clust_size = 50,
column_height_max = 1,
y_min = -100,
y_max = 200,
noise_threshold = threshold_ambient, -- Affect chance 1 - default 1.5 - low
noise_params = {
offset = 0,
scale = 1, -- Affect chance
spread = {x = 100, y = 100, z = 100}, -- Affect clust size and amount of ore 20 - normal 25 - huge
seed = noise_seed,
octaves = 3,
persist = 0.7
},
})
end
for name,ore in pairs(valuable_ores) do
noise_seed=noise_seed+1
minetest.register_ore({
ore_type = "vein",
ore = ore.ore,
wherein = ore.wherein,
clust_scarcity = 12 * 12 * 12,
clust_num_ores = 5,
clust_size = 5,
column_height_max = 3,
y_min = -31000,
y_max = 300,
random_factor = 0,
noise_threshold = threshold_rare,
noise_params = {
offset = 0,
scale = 1,
spread = {x = 150, y = 150, z = 150},
seed = noise_seed,
octaves = 3,
persist = 0.3
},
})
end
for name,ore in pairs(rare_ores) do
noise_seed=noise_seed+1
minetest.register_ore({
ore_type = "vein",
ore = ore.ore,
wherein = ore.wherein,
clust_scarcity = 12 * 12 * 12,
clust_num_ores = 5,
clust_size = 5,
column_height_max = 3,
y_min = -31000,
y_max = -300,
random_factor = 0,
noise_threshold = threshold_very_rare,
noise_params = {
offset = 0,
scale = 1,
spread = {x = 50, y = 50, z = 50},
seed = noise_seed,
octaves = 3,
persist = 0.3
},
})
end
minetest.register_ore({
ore_type = "scatter",
ore = "default:mese",
wherein = "default:stone",
clust_scarcity = 36 * 36 * 36,
clust_num_ores = 3,
clust_size = 2,
column_height_max = 3,
y_min = -31000,
y_max = -1024,
})
EDIT:
Here is new version of oregen tune-up (with marble and granite):
And user world anchor: