Move sound templates to hades_sounds mod
[minetest_hades/hades_revisited.git] / mods / default / mapgen.lua
blob3fe3d6ce2c56449e9694bbb9cae3d7f7aae5aa35
1 -- mods/default/mapgen.lua
3 --
4 -- Aliases for map generator outputs
5 --
6 minetest.register_alias("mapgen_air", "air")
7 minetest.register_alias("mapgen_stone", "default:stone")
8 minetest.register_alias("mapgen_dirt", "default:ash")
9 minetest.register_alias("mapgen_dirt_with_grass", "default:ash")
10 minetest.register_alias("mapgen_sand", "default:ash")
11 minetest.register_alias("mapgen_water_source", "default:lava_source")
12 minetest.register_alias("mapgen_river_water_source", "default:lava_source")
13 minetest.register_alias("mapgen_lava_source", "default:lava_source")
14 minetest.register_alias("mapgen_gravel", "default:lava_source")
15 minetest.register_alias("mapgen_desert_stone", "default:stone")
16 minetest.register_alias("mapgen_desert_sand", "default:ash")
17 minetest.register_alias("mapgen_dirt_with_snow", "default:ash")
18 minetest.register_alias("mapgen_snowblock", "default:ash")
19 minetest.register_alias("mapgen_snow", "default:ash")
20 minetest.register_alias("mapgen_ice", "default:stone")
21 minetest.register_alias("mapgen_sandstone", "default:tuff")
23 -- Flora
25 minetest.register_alias("mapgen_tree", "air")
26 minetest.register_alias("mapgen_leaves", "air")
27 minetest.register_alias("mapgen_apple", "air")
28 minetest.register_alias("mapgen_jungletree", "air")
29 minetest.register_alias("mapgen_jungleleaves", "air")
30 minetest.register_alias("mapgen_junglegrass", "air")
31 minetest.register_alias("mapgen_pine_tree", "air")
32 minetest.register_alias("mapgen_pine_needles", "air")
34 -- Dungeons
36 minetest.register_alias("mapgen_cobble", "default:cobble")
37 minetest.register_alias("mapgen_stair_cobble", "stairs:stair_cobble")
38 minetest.register_alias("mapgen_mossycobble", "default:stone")
39 minetest.register_alias("mapgen_sandstonebrick", "default:stone")
40 minetest.register_alias("mapgen_stair_sandstonebrick", "stairs:stair_stone")
41 minetest.register_alias("mapgen_stair_sandstone_block", "stairs:stair_stone")
42 minetest.register_alias("mapgen_stair_desert_stone", "stairs:stair_stone")
44 if minetest.get_mapgen_setting("mg_name") ~= "singlenode" then
45 minetest.set_mapgen_setting("mg_name", "v6")
46 minetest.set_mapgen_setting("mg_flags", "nodungeons, notrees, caves, nodecorations, nobiomes")
47 minetest.set_mapgen_setting("mgv6_spflags", "nomudflow, nosnowbiomes, notrees, nojungles")
48 minetest.set_mapgen_setting("water_level", "-5")
49 end
52 -- Ore generation
55 minetest.register_ore({
56 ore_type = "scatter",
57 ore = "default:stone_with_emerald",
58 wherein = "default:stone",
59 clust_scarcity = 24*24*24,
60 clust_num_ores = 1,
61 clust_size = 2,
62 y_min = -31000,
63 y_max = 20,
66 minetest.register_ore({
67 ore_type = "scatter",
68 ore = "default:stone_with_emerald",
69 wherein = "default:stone",
70 clust_scarcity =16*16*16,
71 clust_num_ores = 2,
72 clust_size = 3,
73 y_min = -31000,
74 y_max = -50,
75 flags = "absheight",
78 minetest.register_ore({
79 ore_type = "scatter",
80 ore = "default:stone_with_sapphire",
81 wherein = "default:stone",
82 clust_scarcity = 24*24*24,
83 clust_num_ores = 1,
84 clust_size = 2,
85 y_min = -31000,
86 y_max = -300,
89 minetest.register_ore({
90 ore_type = "scatter",
91 ore = "default:stone_with_sapphire",
92 wherein = "default:stone",
93 clust_scarcity =16*16*16,
94 clust_num_ores = 2,
95 clust_size = 3,
96 y_min = -31000,
97 y_max = -550,
98 flags = "absheight",
101 minetest.register_ore({
102 ore_type = "scatter",
103 ore = "default:stone_with_diamond",
104 wherein = "default:stone",
105 clust_scarcity = 24*24*24,
106 clust_num_ores = 1,
107 clust_size = 2,
108 y_min = -31000,
109 y_max = -1200,
112 minetest.register_ore({
113 ore_type = "scatter",
114 ore = "default:stone_with_diamond",
115 wherein = "default:stone",
116 clust_scarcity =16*16*16,
117 clust_num_ores = 2,
118 clust_size = 3,
119 y_min = -31000,
120 y_max = -5000,
121 flags = "absheight",
124 minetest.register_ore({
125 ore_type = "scatter",
126 ore = "default:stone_with_ruby",
127 wherein = "default:stone",
128 clust_scarcity = 24*24*24,
129 clust_num_ores = 1,
130 clust_size = 2,
131 y_min = -31000,
132 y_max = -900,
135 minetest.register_ore({
136 ore_type = "scatter",
137 ore = "default:stone_with_ruby",
138 wherein = "default:stone",
139 clust_scarcity =16*16*16,
140 clust_num_ores = 2,
141 clust_size = 3,
142 y_min = -31000,
143 y_max = -3000,
144 flags = "absheight",
147 minetest.register_ore({
148 ore_type = "scatter",
149 ore = "default:stone_with_coal",
150 wherein = "default:stone",
151 clust_scarcity = 8*8*8,
152 clust_num_ores = 8,
153 clust_size = 3,
154 y_min = -31000,
155 y_max = 64,
156 flags = "absheight",
160 minetest.register_ore({
161 ore_type = "scatter",
162 ore = "default:stone_with_coal",
163 wherein = "default:stone",
164 clust_scarcity = 12*12*12,
165 clust_num_ores = 16,
166 clust_size = 6,
167 y_min = -31000,
168 y_max = 0,
169 flags = "absheight",
172 minetest.register_ore({
173 ore_type = "scatter",
174 ore = "default:stone_with_coal",
175 wherein = "default:stone",
176 clust_scarcity = 24*24*24,
177 clust_num_ores = 27,
178 clust_size = 6,
179 y_min = -31000,
180 y_max = -3000,
181 flags = "absheight",
185 minetest.register_ore({
186 ore_type = "scatter",
187 ore = "default:stone_with_iron",
188 wherein = "default:stone",
189 clust_scarcity = 12*12*12,
190 clust_num_ores = 3,
191 clust_size = 2,
192 y_min = -25,
193 y_max = -2,
197 minetest.register_ore({
198 ore_type = "scatter",
199 ore = "default:stone_with_iron",
200 wherein = "default:stone",
201 clust_scarcity = 9*9*9,
202 clust_num_ores = 3,
203 clust_size = 3,
204 y_min = -63,
205 y_max = -26,
209 minetest.register_ore({
210 ore_type = "scatter",
211 ore = "default:stone_with_iron",
212 wherein = "default:stone",
213 clust_scarcity = 7*7*7,
214 clust_num_ores = 5,
215 clust_size = 3,
216 y_min = -31000,
217 y_max = -64,
218 flags = "absheight",
222 minetest.register_ore({
223 ore_type = "scatter",
224 ore = "default:stone_with_iron",
225 wherein = "default:stone",
226 clust_scarcity = 24*24*24,
227 clust_num_ores = 27,
228 clust_size = 6,
229 y_min = -31000,
230 y_max = -800,
231 flags = "absheight",
235 minetest.register_ore({
236 ore_type = "scatter",
237 ore = "default:stone_with_mese",
238 wherein = "default:stone",
239 clust_scarcity = 18*18*18,
240 clust_num_ores = 2,
241 clust_size = 2,
242 y_min = -355,
243 y_max = -204,
244 flags = "absheight",
248 minetest.register_ore({
249 ore_type = "scatter",
250 ore = "default:stone_with_mese",
251 wherein = "default:stone",
252 clust_scarcity = 14*14*14,
253 clust_num_ores = 3,
254 clust_size = 2,
255 y_min = -31000,
256 y_max = -356,
257 flags = "absheight",
261 minetest.register_ore({
262 ore_type = "scatter",
263 ore = "default:mese",
264 wherein = "default:stone",
265 clust_scarcity = 36*36*36,
266 clust_num_ores = 5,
267 clust_size = 2,
268 y_min = -31000,
269 y_max = -5000,
270 flags = "absheight",
274 minetest.register_ore({
275 ore_type = "scatter",
276 ore = "default:stone_with_gold",
277 wherein = "default:stone",
278 clust_scarcity = 15*15*15,
279 clust_num_ores = 1,
280 clust_size = 2,
281 y_min = -666,
282 y_max = -333,
286 minetest.register_ore({
287 ore_type = "scatter",
288 ore = "default:stone_with_gold",
289 wherein = "default:stone",
290 clust_scarcity = 13*13*13,
291 clust_num_ores = 5,
292 clust_size = 3,
293 y_min = -31000,
294 y_max = -666,
295 flags = "absheight",
298 minetest.register_ore({
299 ore_type = "scatter",
300 ore = "default:stone_with_diamond",
301 wherein = "default:stone",
302 clust_scarcity = 15*15*15,
303 clust_num_ores = 4,
304 clust_size = 3,
305 y_min = -31000,
306 y_max = -10000,
307 flags = "absheight",
310 minetest.register_ore({
311 ore_type = "scatter",
312 ore = "default:stone_with_emerald",
313 wherein = "default:stone",
314 clust_scarcity = 15*15*15,
315 clust_num_ores = 4,
316 clust_size = 3,
317 y_min = -31000,
318 y_max = -10000,
319 flags = "absheight",
322 minetest.register_ore({
323 ore_type = "scatter",
324 ore = "default:stone_with_sapphire",
325 wherein = "default:stone",
326 clust_scarcity = 15*15*15,
327 clust_num_ores = 4,
328 clust_size = 3,
329 y_min = -31000,
330 y_max = -10000,
331 flags = "absheight",
334 minetest.register_ore({
335 ore_type = "scatter",
336 ore = "default:stone_with_ruby",
337 wherein = "default:stone",
338 clust_scarcity = 15*15*15,
339 clust_num_ores = 4,
340 clust_size = 3,
341 y_min = -31000,
342 y_max = -10000,
343 flags = "absheight",
346 minetest.register_ore({
347 ore_type = "scatter",
348 ore = "default:stone_with_copper",
349 wherein = "default:stone",
350 clust_scarcity = 12*12*12,
351 clust_num_ores = 4,
352 clust_size = 3,
353 y_min = -163,
354 y_max = -116,
358 minetest.register_ore({
359 ore_type = "scatter",
360 ore = "default:stone_with_copper",
361 wherein = "default:stone",
362 clust_scarcity = 9*9*9,
363 clust_num_ores = 5,
364 clust_size = 3,
365 y_min = -31000,
366 y_max = -164,
367 flags = "absheight",
370 minetest.register_ore({
371 ore_type = "scatter",
372 ore = "default:stone_with_copper",
373 wherein = "default:stone",
374 clust_scarcity = 9*9*9,
375 clust_num_ores = 5,
376 clust_size = 3,
377 y_min = -31000,
378 y_max = -1900,
379 flags = "absheight",
382 minetest.register_ore({
383 ore_type = "scatter",
384 ore = "default:stone_with_tin",
385 wherein = "default:stone",
386 clust_scarcity = 12*12*12,
387 clust_num_ores = 4,
388 clust_size = 3,
389 y_min = -163,
390 y_max = -116,
394 minetest.register_ore({
395 ore_type = "scatter",
396 ore = "default:stone_with_tin",
397 wherein = "default:stone",
398 clust_scarcity = 9*9*9,
399 clust_num_ores = 5,
400 clust_size = 3,
401 y_min = -31000,
402 y_max = -164,
403 flags = "absheight",
406 minetest.register_ore({
407 ore_type = "scatter",
408 ore = "default:stone_with_tin",
409 wherein = "default:stone",
410 clust_scarcity = 9*9*9,
411 clust_num_ores = 5,
412 clust_size = 3,
413 y_min = -31000,
414 y_max = -1900,
415 flags = "absheight",
418 -- if minetest.settings:get("mg_name") == "indev" then
419 -- Floatlands and high mountains springs
421 minetest.register_ore({
422 ore_type = "blob",
423 ore = "default:lava_source",
424 wherein = {"default:stone"},
425 clust_scarcity = 25* 25 * 25,
426 clust_size = 5,
427 y_min = -10,
428 y_max = 31000,
429 noise_threshold = 0.0,
430 noise_params = {
431 offset = 0.5,
432 scale = 0.2,
433 spread = {x = 5, y = 5, z = 5},
434 seed = 666,
435 octaves = 1,
436 persist = 0.0
441 minetest.register_ore({
442 ore_type = "scatter",
443 ore = "default:ash",
444 wherein = "default:stone",
445 clust_scarcity = 20*20*20,
446 clust_num_ores = 5*5*3,
447 clust_size = 5,
448 y_min = -120,
449 y_max = 31000,
453 minetest.register_ore({
454 ore_type = "scatter",
455 ore = "default:tuff",
456 ore_param2 = 128,
457 wherein = "default:stone",
458 clust_scarcity = 25*25*25,
459 clust_num_ores = 10000,
460 clust_size = 12,
461 y_min = -100,
462 y_max = 31000,
465 minetest.register_ore({
466 ore_type = "scatter",
467 ore = "default:chondrite",
468 ore_param2 = 128,
469 wherein = "default:stone",
470 clust_scarcity = 10*10*10,
471 clust_num_ores = 50,
472 clust_size = 10,
473 y_min = -149,
474 y_max = 10,
475 flags = "absheight",
478 minetest.register_ore({
479 ore_type = "scatter",
480 ore = "default:chondrite",
481 ore_param2 = 128,
482 wherein = "default:stone",
483 clust_scarcity = 20*20*20,
484 clust_num_ores = 550,
485 clust_size = 10,
486 y_min = -31000,
487 y_max = -150,
488 flags = "absheight",
491 minetest.register_ore({
492 ore_type = "scatter",
493 ore = "default:chondrite",
494 ore_param2 = 128,
495 wherein = "default:stone",
496 clust_scarcity = 20*20*20,
497 clust_num_ores = 650,
498 clust_size = 10,
499 y_min = -31000,
500 y_max = -10000,
501 flags = "absheight",
504 minetest.register_ore({
505 ore_type = "scatter",
506 ore = "default:essexite",
507 ore_param2 = 128,
508 wherein = "default:stone",
509 clust_scarcity = 10*10*10,
510 clust_num_ores = 50,
511 clust_size = 5,
512 y_min = -350,
513 y_max = -300,
516 minetest.register_ore({
517 ore_type = "scatter",
518 ore = "default:essexite",
519 ore_param2 = 128,
520 wherein = "default:stone",
521 clust_scarcity = 10*10*10,
522 clust_num_ores = 500,
523 clust_size = 10,
524 y_min = -31000,
525 y_max = -600,
526 flags = "absheight",
529 minetest.register_ore({
530 ore_type = "scatter",
531 ore = "default:essexite",
532 ore_param2 = 128,
533 wherein = "default:stone",
534 clust_scarcity = 20*10*20,
535 clust_num_ores = 950,
536 clust_size = 10,
537 y_min = -31000,
538 y_max = -10000,
539 flags = "absheight",
542 minetest.register_ore({
543 ore_type = "scatter",
544 ore = "default:gravel",
545 ore_param2 = 128,
546 wherein = "default:stone",
547 clust_scarcity = 20*5*20,
548 clust_num_ores = 150,
549 clust_size = 10,
550 y_min = -10,
551 y_max = 0,
554 minetest.register_ore({
555 ore_type = "scatter",
556 ore = "default:gravel",
557 ore_param2 = 128,
558 wherein = "default:stone",
559 clust_scarcity = 20*5*20,
560 clust_num_ores = 350,
561 clust_size = 10,
562 y_min = -70,
563 y_max = -50,
566 minetest.register_ore({
567 ore_type = "scatter",
568 ore = "default:gravel",
569 ore_param2 = 128,
570 wherein = "default:stone",
571 clust_scarcity = 20*10*20,
572 clust_num_ores = 500,
573 clust_size = 10,
574 y_min = -140,
575 y_max = -120,
578 -- Underground springs
579 minetest.register_ore({
580 ore_type = "scatter",
581 ore = "default:water_source",
582 ore_param2 = 128,
583 wherein = "default:stone",
584 clust_scarcity = 25*25*25,
585 clust_num_ores = 8,
586 clust_size = 3,
587 y_min = -10000,
588 y_max = -10,
591 minetest.register_ore({
592 ore_type = "blob",
593 ore = "default:lava_source",
594 wherein = {"default:stone"},
595 clust_scarcity = 25* 25 * 25,
596 clust_size = 10,
597 y_min = -30000,
598 y_max = -10,
599 noise_threshold = 0.2,
600 noise_params = {
601 offset = 0.5,
602 scale = 0.2,
603 spread = {x = 500, y = 500, z = 500},
604 seed = 666,
605 octaves = 1,
606 persist = 0.0
610 --DECO
612 minetest.register_decoration({
613 deco_type = "simple",
614 place_on = {"default:stone"},
615 sidelen = 16,
616 noise_params = {
617 offset = 0.5,
618 scale = 0.2,
619 spread = {x = 5, y = 5, z = 5},
620 seed = 333,
621 octaves = 1,
622 persist = 0.0
624 y_min = 1,
625 y_max = 100,
626 decoration = "default:stone",
627 height = 3,
628 height_max = 4,
631 minetest.register_decoration({
632 deco_type = "simple",
633 place_on = {"default:stone"},
634 sidelen = 16,
635 noise_params = {
636 offset = 0.5,
637 scale = 0.2,
638 spread = {x = 5, y = 5, z = 5},
639 seed = 555,
640 octaves = 1,
641 persist = 0.0
643 y_min = 1,
644 y_max = 100,
645 decoration = "default:ash",