From 3691cadcd514582147dbc87c526ea03e7a0903de Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sun, 26 Mar 2017 19:45:02 -0600 Subject: [PATCH] updated settings, cavern scale can be changed now. --- biomes.lua | 19 +++++++++++++++++++ config.lua | 21 ++++++++++----------- settingtypes.txt | 37 ++++++++++++++++++++----------------- 3 files changed, 49 insertions(+), 28 deletions(-) diff --git a/biomes.lua b/biomes.lua index b3c7e94..8222bbb 100644 --- a/biomes.lua +++ b/biomes.lua @@ -45,6 +45,25 @@ local shallow_cave_ceiling = function(area, data, ai, vi, bi, param2_data) end end + +local perlin_cave = { + offset = 0, + scale = 1, + spread = {x=dfcaverns.config.horizontal_cavern_scale, y=dfcaverns.config.vertical_cavern_scale, z=dfcaverns.config.horizontal_cavern_scale}, + seed = -400000000089, + octaves = 3, + persist = 0.67 +} + +local perlin_wave = { + offset = 0, + scale = 1, + spread = {x=dfcaverns.config.horizontal_cavern_scale * 2, y=dfcaverns.config.vertical_cavern_scale, z=dfcaverns.config.horizontal_cavern_scale * 2}, -- squashed 2:1 + seed = 59033, + octaves = 6, + persist = 0.63 +} + -- default mapgen registers an "underground" biome that gets in the way of everything. subterrane:override_biome({ name = "underground", diff --git a/config.lua b/config.lua index 5ed3459..9e9af43 100644 --- a/config.lua +++ b/config.lua @@ -24,13 +24,13 @@ local function setting(stype, name, default, description) end local trees = { - {name="fungiwood", min_depth=-100, max_depth=-31000, delay_multiplier = 1}, - {name="tunnel_tube", min_depth=-100, max_depth=-31000, delay_multiplier = 1}, - {name="spore_tree", min_depth=-100, max_depth=-31000, delay_multiplier = 1}, - {name="black_cap", min_depth=-100, max_depth=-31000, delay_multiplier = 1}, - {name="nether_cap", min_depth=-100, max_depth=-31000, delay_multiplier = 1}, - {name="goblin_cap", min_depth=-100, max_depth=-31000, delay_multiplier = 1}, - {name="tower_cap", min_depth=-100, max_depth=-31000, delay_multiplier = 1}, + {name="fungiwood", delay_multiplier = 1}, + {name="tunnel_tube", delay_multiplier = 1}, + {name="spore_tree", delay_multiplier = 1}, + {name="black_cap", delay_multiplier = 1}, + {name="nether_cap", delay_multiplier = 1}, + {name="goblin_cap", delay_multiplier = 1}, + {name="tower_cap", delay_multiplier = 1}, } local plants = { @@ -47,14 +47,10 @@ setting("int", "tree_max_growth_delay", 4800, "Maximum sapling growth delay") for _, tree in pairs(trees) do setting("float", tree.name.."_delay_multiplier", tree.delay_multiplier, tree.name.." growth delay multiplier") - setting("int", tree.name.."_min_depth", tree.min_depth, tree.name.." minimum sapling growth depth") - setting("int", tree.name.."_max_depth", tree.max_depth, tree.name.." maximum sapling growth depth") end setting("int", "blood_thorn_growth_interval", 12, "blood_thorn growth ABM interval") setting("int", "blood_thorn_growth_chance", 83, "blood_thorn growth ABM chance") -setting("int", "blood_thorn_min_depth", -100, "blood_thorn minimum sapling growth depth") -setting("int", "blood_thorn_max_depth", -31000, "blood_thorn maximum sapling growth depth") setting("int", "plant_growth_timer", 100, "Base plant growth timer interval") setting("int", "plant_growth_chance", 4, "Base plant growth chance") @@ -65,6 +61,9 @@ end setting("bool", "light_kills_fungus", true, "Light kills fungus") +setting("float", "vertical_cavern_scale", 256, "Vertical cavern dimension scale") +setting("float", "horizontal_cavern_scale", 256, "Horizontal cavern dimension scale") + setting("int", "ymax", -300, "Upper limit of level 1") setting("int", "level1_min", -900, "Upper limit of level 2") setting("int", "level2_min", -1500, "Upper limit of level 3") diff --git a/settingtypes.txt b/settingtypes.txt index 2f0a88b..98521f9 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -1,30 +1,17 @@ +[Tree growth] dfcaverns_tree_min_growth_delay (Minimum sapling growth delay) int 2400 dfcaverns_tree_max_growth_delay (Maximum sapling growth delay) int 4800 dfcaverns_fungiwood_delay_multiplier (fungiwood growth delay multiplier) float 1 -dfcaverns_fungiwood_min_depth (fungiwood minimum sapling growth depth) int -100 -dfcaverns_fungiwood_max_depth (fungiwood maximum sapling growth depth) int -31000 dfcaverns_tunnel_tube_delay_multiplier (tunnel_tube growth delay multiplier) float 1 -dfcaverns_tunnel_tube_min_depth (tunnel_tube minimum sapling growth depth) int -100 -dfcaverns_tunnel_tube_max_depth (tunnel_tube maximum sapling growth depth) int -31000 dfcaverns_spore_tree_delay_multiplier (spore_tree growth delay multiplier) float 1 -dfcaverns_spore_tree_min_depth (spore_tree minimum sapling growth depth) int -100 -dfcaverns_spore_tree_max_depth (spore_tree maximum sapling growth depth) int -31000 dfcaverns_black_cap_delay_multiplier (black_cap growth delay multiplier) float 1 -dfcaverns_black_cap_min_depth (black_cap minimum sapling growth depth) int -100 -dfcaverns_black_cap_max_depth (black_cap maximum sapling growth depth) int -31000 dfcaverns_nether_cap_delay_multiplier (nether_cap growth delay multiplier) float 1 -dfcaverns_nether_cap_min_depth (nether_cap minimum sapling growth depth) int -100 -dfcaverns_nether_cap_max_depth (nether_cap maximum sapling growth depth) int -31000 dfcaverns_goblin_cap_delay_multiplier (goblin_cap growth delay multiplier) float 1 -dfcaverns_goblin_cap_min_depth (goblin_cap minimum sapling growth depth) int -100 -dfcaverns_goblin_cap_max_depth (goblin_cap maximum sapling growth depth) int -31000 dfcaverns_tower_cap_delay_multiplier (tower_cap growth delay multiplier) float 1 -dfcaverns_tower_cap_min_depth (tower_cap minimum sapling growth depth) int -100 -dfcaverns_tower_cap_max_depth (tower_cap maximum sapling growth depth) int -31000 dfcaverns_blood_thorn_growth_interval (blood_thorn growth ABM interval) int 12 dfcaverns_blood_thorn_growth_chance (blood_thorn growth ABM chance) int 83 -dfcaverns_blood_thorn_min_depth (blood_thorn minimum sapling growth depth) int -100 -dfcaverns_blood_thorn_max_depth (blood_thorn maximum sapling growth depth) int -31000 + +[Plant growth] dfcaverns_plant_growth_timer (Base plant growth timer interval) int 100 dfcaverns_plant_growth_chance (Base plant growth chance) int 4 dfcaverns_cave_wheat_timer_multiplier (cave_wheat growth delay multiplier) float 1 @@ -33,4 +20,20 @@ dfcaverns_pig_tail_timer_multiplier (pig_tail growth delay multiplier) float 1 dfcaverns_plump_helmet_timer_multiplier (plump_helmet growth delay multiplier) float 3 dfcaverns_quarry_bush_timer_multiplier (quarry_bush growth delay multiplier) float 2 dfcaverns_sweet_pod_timer_multiplier (sweet_pod growth delay multiplier) float 2 -dfcaverns_light_kills_fungus (Light kills fungus) bool true \ No newline at end of file +dfcaverns_light_kills_fungus (Light kills fungus) bool true + +[Cavern dimensions] +#Note that this doesn't guarantee caverns of this setting's size. This setting +#affects the scale of features in the perlin noise that is used to build caverns. +#Most caverns will be smaller than this (and a few might be larger) +dfcaverns_vertical_cavern_scale (Vertical cavern dimension scale) float 256 +#Note that this doesn't guarantee caverns of this setting's size. This setting +#affects the scale of features in the perlin noise that is used to build caverns. +#Most caverns will be smaller than this (and a few might be larger) +dfcaverns_horizontal_cavern_scale (Horizontal cavern dimension scale) float 256 +dfcaverns_ymax (Upper limit of level 1) int -300 +dfcaverns_level1_min (Upper limit of level 2) int -900 +dfcaverns_level2_min (Upper limit of level 3) int -1500 +dfcaverns_level3_min (Upper limit of lava sea) int -2100 +dfcaverns_lava_sea_min (Upper limit of underworld) int -2700 +dfcaverns_ymin (Lower limit of underworld) int -3500