Change oregen to a non-uniform distribution.
authorNovatux <nathanael.courant@laposte.net>
Sun, 17 Aug 2014 15:08:11 +0000 (17:08 +0200)
committerNovatux <nathanael.courant@laposte.net>
Sun, 17 Aug 2014 15:08:11 +0000 (17:08 +0200)
technic_worldgen/oregen.lua

index c48e35837d6a57783464809368c40c88f02afca4..ec9386d6614d8c5feebe2c998e3479beb1fd76aa 100644 (file)
@@ -1,34 +1,77 @@
+local uranium_params = {offset = 0, scale = 1, spread = {x = 100, y = 100, z = 100}, seed = 420, octaves = 3, persist = 0.7}
+local uranium_threshhold = 0.55
+
+local chromium_params = {offset = 0, scale = 1, spread = {x = 100, y = 100, z = 100}, seed = 421, octaves = 3, persist = 0.7}
+local chromium_threshhold = 0.55
+
+local zinc_params = {offset = 0, scale = 1, spread = {x = 100, y = 100, z = 100}, seed = 422, octaves = 3, persist = 0.7}
+local zinc_threshhold = 0.5
+
 minetest.register_ore({
-       ore_type       = "scatter",
-       ore            = "technic:mineral_uranium",
-       wherein        = "default:stone",
-       clust_scarcity = 10*10*10,
-       clust_num_ores = 4,
-       clust_size     = 3,
-       height_min     = -300,
-       height_max     = -80,
+       ore_type         = "scatter",
+       ore              = "technic:mineral_uranium",
+       wherein          = "default:stone",
+       clust_scarcity   = 8*8*8,
+       clust_num_ores   = 4,
+       clust_size       = 3,
+       height_min       = -300,
+       height_max       = -80,
+       noise_params     = uranium_params,
+       noise_threshhold = uranium_threshhold,
 })
 
 minetest.register_ore({
-       ore_type       = "scatter",
-       ore            = "technic:mineral_chromium",
-       wherein        = "default:stone",
-       clust_scarcity = 10*10*10,
-       clust_num_ores = 2,
-       clust_size     = 3,
-       height_min     = -31000,
-       height_max     = -100,
+       ore_type         = "scatter",
+       ore              = "technic:mineral_chromium",
+       wherein          = "default:stone",
+       clust_scarcity   = 8*8*8,
+       clust_num_ores   = 2,
+       clust_size       = 3,
+       height_min       = -200,
+       height_max       = -100,
+       noise_params     = chromium_params,
+       noise_threshhold = chromium_threshhold,
 })
 
 minetest.register_ore({
-       ore_type       = "scatter",
-       ore            = "technic:mineral_zinc",
-       wherein        = "default:stone",
-       clust_scarcity = 9*9*9,
-       clust_num_ores = 4,
-       clust_size     = 3,
-       height_min     = -31000,
-       height_max     = 2,
+       ore_type         = "scatter",
+       ore              = "technic:mineral_chromium",
+       wherein          = "default:stone",
+       clust_scarcity   = 6*6*6,
+       clust_num_ores   = 2,
+       clust_size       = 3,
+       height_min       = -31000,
+       height_max       = -200,
+       flags            = "absheight",
+       noise_params     = chromium_params,
+       noise_threshhold = chromium_threshhold,
+})
+
+minetest.register_ore({
+       ore_type         = "scatter",
+       ore              = "technic:mineral_zinc",
+       wherein          = "default:stone",
+       clust_scarcity   = 8*8*8,
+       clust_num_ores   = 4,
+       clust_size       = 3,
+       height_min       = -32,
+       height_max       = 2,
+       noise_params     = zinc_params,
+       noise_threshhold = zinc_threshhold,
+})
+
+minetest.register_ore({
+       ore_type         = "scatter",
+       ore              = "technic:mineral_zinc",
+       wherein          = "default:stone",
+       clust_scarcity   = 6*6*6,
+       clust_num_ores   = 4,
+       clust_size       = 3,
+       height_min       = -31000,
+       height_max       = -32,
+       flags            = "absheight",
+       noise_params     = zinc_params,
+       noise_threshhold = zinc_threshhold,
 })
 
 if technic.config:get_bool("enable_marble_generation") then