Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds minetest game mapgen configuration parameters #156

Merged
merged 19 commits into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,6 @@
[submodule "builder/mods_src/tools/hidroplane"]
path = builder/mods_src/tools/hidroplane
url = https://github.com/APercy/hidroplane.git
[submodule "builder/mods_src/mapgen/builder/mods_src/mapgen/minetest_mapgen_config"]
path = builder/mods_src/mapgen/minetest_mapgen_config
url = https://codeberg.org/Dacmot/minetest_mapgen_config.git
2 changes: 1 addition & 1 deletion builder/mods_src/flora_ores/yellow_crystal
Submodule yellow_crystal updated from ef9649 to 490642
1 change: 1 addition & 0 deletions builder/mods_src/mapgen/minetest_mapgen_config
Submodule minetest_mapgen_config added at c183a5
84 changes: 84 additions & 0 deletions minetest.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,87 @@ compost_extra_result_rarity = 3000

# Not really useable and created some overhead
trash_can_throw_in = false

##############################################################
# -----------------------
# Map Generation Settings
# -----------------------
##############################################################

# Ores
mapgen_conf.tin_ground_layer1_scarcity = 1000
mapgen_conf.tin_ground_layer1_ymax = -30
mapgen_conf.tin_ground_layer1_ymin = -150
mapgen_conf.tin_ground_layer2_scarcity = 2197
mapgen_conf.tin_ground_layer2_ymax = -151
mapgen_conf.tin_ground_layer2_ymin = -31000
mapgen_conf.copper_ground_layer1_scarcity = 729
mapgen_conf.copper_ground_layer1_ymax = -30
mapgen_conf.copper_ground_layer1_ymin = -150
mapgen_conf.copper_ground_layer2_scarcity = 1728
mapgen_conf.copper_ground_layer2_ymax = -151
mapgen_conf.copper_ground_layer2_ymin = -31000
mapgen_conf.iron_ground_layer1_scarcity = 1000
mapgen_conf.iron_ground_layer1_ymax = -200
mapgen_conf.iron_ground_layer1_ymin = -600
mapgen_conf.iron_ground_layer2_scarcity = 2744
mapgen_conf.iron_ground_layer2_ymax = -601
mapgen_conf.iron_ground_layer2_ymin = -31000
mapgen_conf.gold_ground_layer1_scarcity = 3375
mapgen_conf.gold_ground_layer1_ymax = -400
mapgen_conf.gold_ground_layer1_ymin = -700
mapgen_conf.gold_ground_layer2_scarcity = 2197
mapgen_conf.gold_ground_layer2_ymax = -701
mapgen_conf.gold_ground_layer2_ymin = -31000
mapgen_conf.mese_ground_layer1_scarcity = 4096
mapgen_conf.mese_ground_layer1_ymax = -600
mapgen_conf.mese_ground_layer1_ymin = -1200
mapgen_conf.mese_ground_layer2_scarcity = 2744
mapgen_conf.mese_ground_layer2_ymax = -1201
mapgen_conf.mese_ground_layer2_ymin = -31000
mapgen_conf.mese_block_ground_layer1_scarcity = 46656
mapgen_conf.mese_block_ground_layer1_ymax = -1000
mapgen_conf.mese_block_ground_layer1_ymin = -1200
mapgen_conf.mese_block_ground_layer2_scarcity = 46656
mapgen_conf.mese_block_ground_layer2_ymax = -1201
mapgen_conf.mese_block_ground_layer2_ymin = -31000
mapgen_conf.diamond_ground_layer1_scarcity = 4913
mapgen_conf.diamond_ground_layer1_ymax = -1000
mapgen_conf.diamond_ground_layer1_ymin = -2000
mapgen_conf.diamond_ground_layer2_scarcity = 3375
mapgen_conf.diamond_ground_layer2_ymax = -2001
mapgen_conf.diamond_ground_layer2_ymin = -31000

# Biomes
mapgen_conf.mountaintops_altitude = 80
mapgen_conf.hills_to_mountain_vertical_blend = 30
mapgen_conf.top_layer_thickness = 1
mapgen_conf.filler_layer_thickness = 20
mapgen_conf.ocean_floor_thickness = 5
mapgen_conf.riverbed_thickness = 5
mapgen_conf.lower_atmosphere_biome_ymax = 1000
mapgen_conf.floatlands_biomes_ymax = 31000
mapgen_conf.floatlands_biomes_exclusions = "tundra icesheet cold_desert grassland_dunes snowy_grassland"

# Cloudlands
cloudlands_use_lowland_biomes = false
cloudlands_altitude = 2000
cloudlands_altitude_amplitude = 100
cloudlands_generate_ores = true
cloudlands_vine_coverage = 30
cloudlands_giant_tree_rarety = 8
cloudlands_bioluminescence = true

# Yellow Crystals
yellow_crystals.ore1_scarcity = 5832
yellow_crystals.ore1_ymax = -350
yellow_crystals.ore1_ymin = -500
yellow_crystals.ore2_scarcity = 8000
yellow_crystals.ore2_ymax = -450
yellow_crystals.ore2_ymin = -31000
yellow_crystals.ore3_scarcity = 8000
yellow_crystals.ore3_ymax = -550
yellow_crystals.ore3_ymin = -31000
yellow_crystals.ore4_scarcity = 8000
yellow_crystals.ore4_ymax = -650
yellow_crystals.ore4_ymin = -31000
6 changes: 5 additions & 1 deletion mod_sources.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ origin https://github.com/minetest-mirrors/farming.git (fetch)
Mod: flora_ores/farming

origin https://codeberg.org/Dacmot/YellowCrystals.git (fetch)
* ef964908ac72af0dfcadd2ca827697e8cecbf2c6 Adding configurable settings for depth and scarcity
* 49064255fddd1aaf61efcff2e32eed9319f04367 Adjusting crystal generation depth
Mod: flora_ores/yellow_crystal

origin https://github.com/h-v-smacker/canned_food (fetch)
Expand Down Expand Up @@ -171,6 +171,10 @@ origin https://github.com/minetest-mods/meseor (fetch)
* b0a99d3acb25007b840741db6216c00337eba247 Update
Mod: mapgen/meseor

origin https://codeberg.org/Dacmot/minetest_mapgen_config.git (fetch)
* c183a55212346ea9bab3ad3e00a0186a550211e1 Many corrections and adjustments of ore depth
Mod: mapgen/minetest_mapgen_config

origin https://github.com/minetest-mirrors/pbj_pup.git (fetch)
* 5a0d59e5a8c7c793dce046437c7527a98f31336d tweak code
Mod: mapgen/pbj_pup
Expand Down
10 changes: 5 additions & 5 deletions mods/flora_ores/yellow_crystal/minetest.conf
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
yellow_crystals.ore1_scarcity = 5832
yellow_crystals.ore1_ymax = -150
yellow_crystals.ore1_ymax = -350
yellow_crystals.ore1_ymin = -500
yellow_crystals.ore2_scarcity = 8000
yellow_crystals.ore2_ymax = -250
yellow_crystals.ore2_ymax = -450
yellow_crystals.ore2_ymin = -31000
yellow_crystals.ore3_scarcity = 8000
yellow_crystals.ore3_ymax = -350
yellow_crystals.ore3_ymax = -550
yellow_crystals.ore3_ymin = -31000
yellow_crystals.ore4_scarcity = 8000
yellow_crystals.ore4_ymax = -450
yellow_crystals.ore4_ymin = -31000
yellow_crystals.ore4_ymax = -650
yellow_crystals.ore4_ymin = -31000
10 changes: 5 additions & 5 deletions mods/flora_ores/yellow_crystal/settingtypes.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[Yellow Crystals]
yellow_crystals.ore1_scarcity (Mese crystals level 1, scarcity) int 5832 100 1000000
yellow_crystals.ore1_ymax (Mese crystals level 1, underground upper limit) int -150 -31000 31000
yellow_crystals.ore1_ymax (Mese crystals level 1, underground upper limit) int -350 -31000 31000
yellow_crystals.ore1_ymin (Mese crystals level 1, underground lower limit) int -500 -31000 31000
yellow_crystals.ore2_scarcity (Mese crystals level 2, scarcity) int 8000 100 1000000
yellow_crystals.ore2_ymax (Mese crystals level 2, underground upper limit) int -250 -31000 31000
yellow_crystals.ore2_ymax (Mese crystals level 2, underground upper limit) int -450 -31000 31000
yellow_crystals.ore2_ymin (Mese crystals level 2, underground lower limit) int -31000 -31000 31000
yellow_crystals.ore3_scarcity (Mese crystals level 3, scarcity) int 8000 100 1000000
yellow_crystals.ore3_ymax (Mese crystals level 3, underground upper limit) int -350 -31000 31000
yellow_crystals.ore3_ymax (Mese crystals level 3, underground upper limit) int -550 -31000 31000
yellow_crystals.ore3_ymin (Mese crystals level 3, underground lower limit) int -31000 -31000 31000
yellow_crystals.ore4_scarcity (Mese crystals level 4, scarcity) int 8000 100 1000000
yellow_crystals.ore4_ymax (Mese crystals level 4, underground upper limit) int -450 -31000 31000
yellow_crystals.ore4_ymin (Mese crystals level 4, underground lower limit) int -31000 -31000 31000
yellow_crystals.ore4_ymax (Mese crystals level 4, underground upper limit) int -650 -31000 31000
yellow_crystals.ore4_ymin (Mese crystals level 4, underground lower limit) int -31000 -31000 31000
52 changes: 52 additions & 0 deletions mods/mapgen/minetest_mapgen_config/.luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
unused_args = false
allow_defined_top = true

globals = {
"mapgen_conf",
}

read_globals = {
"DIR_DELIM", "INIT",

"minetest",

"Raycast",
"Settings",
"PseudoRandom",
"PerlinNoise",
"VoxelManip",
"SecureRandom",
"VoxelArea",
"PerlinNoiseMap",
"PcgRandom",
"ItemStack",
"AreaStore",

"vector",

table = {
fields = {
"copy",
"indexof",
"insert_all",
"key_value_swap",
"shuffle",
}
},

string = {
fields = {
"split",
"trim",
"find",
}
},

math = {
fields = {
"hypot",
"sign",
"factorial"
}
},
}
Loading