Preserve the upper limit used in mgvalleys.
# Defines full size of caverns, smaller values create larger caverns.
mgv5_cavern_threshold (Cavern threshold) float 0.7
+# Lower Y limit of dungeons.
+mgv5_dungeon_ymin (Dungeon minimum Y) int -31000
+
+# Upper Y limit of dungeons.
+mgv5_dungeon_ymax (Dungeon maximum Y) int 31000
+
[**Noises]
# Variation of biome filler depth.
# Sandy beaches occur when np_beach exceeds this value.
mgv6_freq_beach (Beach noise threshold) float 0.15
+# Lower Y limit of dungeons.
+mgv6_dungeon_ymin (Dungeon minimum Y) int -31000
+
+# Upper Y limit of dungeons.
+mgv6_dungeon_ymax (Dungeon maximum Y) int 31000
+
[**Noises]
# Y-level of lower terrain and lakebeds.
# Defines full size of caverns, smaller values create larger caverns.
mgv7_cavern_threshold (Cavern threshold) float 0.7
+# Lower Y limit of dungeons.
+mgv7_dungeon_ymin (Dungeon minimum Y) int -31000
+
+# Upper Y limit of dungeons.
+mgv7_dungeon_ymax (Dungeon maximum Y) int 31000
+
[**Noises]
# Y-level of higher (cliff-top) terrain.
# Defines full size of caverns, smaller values create larger caverns.
mgcarpathian_cavern_threshold (Cavern threshold) float 0.7
+# Lower Y limit of dungeons.
+mgcarpathian_dungeon_ymin (Dungeon minimum Y) int -31000
+
+# Upper Y limit of dungeons.
+mgcarpathian_dungeon_ymax (Dungeon maximum Y) int 31000
+
[**Noises]
# 2D noise that defines the base ground level.
# Controls steepness/height of hills.
mgflat_hill_steepness (Hill steepness) float 64.0
+# Lower Y limit of dungeons.
+mgflat_dungeon_ymin (Dungeon minimum Y) int -31000
+
+# Upper Y limit of dungeons.
+mgflat_dungeon_ymax (Dungeon maximum Y) int 31000
+
[**Noises]
# Defines location and terrain of optional hills and lakes.
# Y of upper limit of lava in large caves.
mgfractal_lava_depth (Lava depth) int -256
+# Lower Y limit of dungeons.
+mgfractal_dungeon_ymin (Dungeon minimum Y) int -31000
+
+# Upper Y limit of dungeons.
+mgfractal_dungeon_ymax (Dungeon maximum Y) int 31000
+
# Choice of 18 fractals from 9 formulas.
# 1 = 4D "Roundy" mandelbrot set.
# 2 = 4D "Roundy" julia set.
# Controls width of tunnels, a smaller value creates wider tunnels.
mgvalleys_cave_width (Cave width) float 0.09
+# Lower Y limit of dungeons.
+mgvalleys_dungeon_ymin (Dungeon minimum Y) int -31000
+
+# Upper Y limit of dungeons.
+mgvalleys_dungeon_ymax (Dungeon maximum Y) int 31000
+
[**Noises]
# Caves and tunnels form at the intersection of the two noises
cavern_limit = params->cavern_limit;
cavern_taper = params->cavern_taper;
cavern_threshold = params->cavern_threshold;
- grad_wl = 1 - water_level;
+ dungeon_ymin = params->dungeon_ymin;
+ dungeon_ymax = params->dungeon_ymax;
+
+ grad_wl = 1 - water_level;
//// 2D Terrain noise
noise_base = new Noise(¶ms->np_base, seed, csize.X, csize.Z);
settings->getS16NoEx("mgcarpathian_cavern_limit", cavern_limit);
settings->getS16NoEx("mgcarpathian_cavern_taper", cavern_taper);
settings->getFloatNoEx("mgcarpathian_cavern_threshold", cavern_threshold);
+ settings->getS16NoEx("mgcarpathian_dungeon_ymin", dungeon_ymin);
+ settings->getS16NoEx("mgcarpathian_dungeon_ymax", dungeon_ymax);
settings->getNoiseParams("mgcarpathian_np_base", np_base);
settings->getNoiseParams("mgcarpathian_np_filler_depth", np_filler_depth);
settings->setS16("mgcarpathian_cavern_limit", cavern_limit);
settings->setS16("mgcarpathian_cavern_taper", cavern_taper);
settings->setFloat("mgcarpathian_cavern_threshold", cavern_threshold);
+ settings->setS16("mgcarpathian_dungeon_ymin", dungeon_ymin);
+ settings->setS16("mgcarpathian_dungeon_ymax", dungeon_ymax);
settings->setNoiseParams("mgcarpathian_np_base", np_base);
settings->setNoiseParams("mgcarpathian_np_filler_depth", np_filler_depth);
}
// Generate dungeons
- if (flags & MG_DUNGEONS)
+ if ((flags & MG_DUNGEONS) && full_node_min.Y >= dungeon_ymin &&
+ full_node_max.Y <= dungeon_ymax)
generateDungeons(stone_surface_max_y, mgstone_type, biome_stone);
// Generate the registered decorations
s16 cavern_limit = -256;
s16 cavern_taper = 256;
float cavern_threshold = 0.7f;
+ s16 dungeon_ymin = -31000;
+ s16 dungeon_ymax = 31000;
NoiseParams np_base;
NoiseParams np_filler_depth;
private:
s16 large_cave_depth;
s32 grad_wl;
+ s16 dungeon_ymin;
+ s16 dungeon_ymax;
Noise *noise_base;
Noise *noise_height1;
lake_steepness = params->lake_steepness;
hill_threshold = params->hill_threshold;
hill_steepness = params->hill_steepness;
+ dungeon_ymin = params->dungeon_ymin;
+ dungeon_ymax = params->dungeon_ymax;
// 2D noise
noise_filler_depth = new Noise(¶ms->np_filler_depth, seed, csize.X, csize.Z);
settings->getFloatNoEx("mgflat_lake_steepness", lake_steepness);
settings->getFloatNoEx("mgflat_hill_threshold", hill_threshold);
settings->getFloatNoEx("mgflat_hill_steepness", hill_steepness);
+ settings->getS16NoEx("mgflat_dungeon_ymin", dungeon_ymin);
+ settings->getS16NoEx("mgflat_dungeon_ymax", dungeon_ymax);
settings->getNoiseParams("mgflat_np_terrain", np_terrain);
settings->getNoiseParams("mgflat_np_filler_depth", np_filler_depth);
settings->setFloat("mgflat_lake_steepness", lake_steepness);
settings->setFloat("mgflat_hill_threshold", hill_threshold);
settings->setFloat("mgflat_hill_steepness", hill_steepness);
+ settings->setS16("mgflat_dungeon_ymin", dungeon_ymin);
+ settings->setS16("mgflat_dungeon_ymax", dungeon_ymax);
settings->setNoiseParams("mgflat_np_terrain", np_terrain);
settings->setNoiseParams("mgflat_np_filler_depth", np_filler_depth);
if (flags & MG_CAVES)
generateCaves(stone_surface_max_y, large_cave_depth);
- if (flags & MG_DUNGEONS)
+ if ((flags & MG_DUNGEONS) && full_node_min.Y >= dungeon_ymin &&
+ full_node_max.Y <= dungeon_ymax)
generateDungeons(stone_surface_max_y, mgstone_type, biome_stone);
// Generate the registered decorations
float lake_steepness = 48.0f;
float hill_threshold = 0.45f;
float hill_steepness = 64.0f;
+ s16 dungeon_ymin = -31000;
+ s16 dungeon_ymax = 31000;
+
NoiseParams np_terrain;
NoiseParams np_filler_depth;
NoiseParams np_cave1;
float lake_steepness;
float hill_threshold;
float hill_steepness;
+ s16 dungeon_ymin;
+ s16 dungeon_ymax;
+
Noise *noise_terrain;
};
cave_width = params->cave_width;
large_cave_depth = params->large_cave_depth;
lava_depth = params->lava_depth;
+ dungeon_ymin = params->dungeon_ymin;
+ dungeon_ymax = params->dungeon_ymax;
fractal = params->fractal;
iterations = params->iterations;
scale = params->scale;
settings->getFloatNoEx("mgfractal_cave_width", cave_width);
settings->getS16NoEx("mgfractal_large_cave_depth", large_cave_depth);
settings->getS16NoEx("mgfractal_lava_depth", lava_depth);
+ settings->getS16NoEx("mgfractal_dungeon_ymin", dungeon_ymin);
+ settings->getS16NoEx("mgfractal_dungeon_ymax", dungeon_ymax);
settings->getU16NoEx("mgfractal_fractal", fractal);
settings->getU16NoEx("mgfractal_iterations", iterations);
settings->getV3FNoEx("mgfractal_scale", scale);
settings->setFloat("mgfractal_cave_width", cave_width);
settings->setS16("mgfractal_large_cave_depth", large_cave_depth);
settings->setS16("mgfractal_lava_depth", lava_depth);
+ settings->setS16("mgfractal_dungeon_ymin", dungeon_ymin);
+ settings->setS16("mgfractal_dungeon_ymax", dungeon_ymax);
settings->setU16("mgfractal_fractal", fractal);
settings->setU16("mgfractal_iterations", iterations);
settings->setV3F("mgfractal_scale", scale);
if (flags & MG_CAVES)
generateCaves(stone_surface_max_y, large_cave_depth);
- if (flags & MG_DUNGEONS)
+ if ((flags & MG_DUNGEONS) && full_node_min.Y >= dungeon_ymin &&
+ full_node_max.Y <= dungeon_ymax)
generateDungeons(stone_surface_max_y, mgstone_type, biome_stone);
// Generate the registered decorations
float cave_width = 0.09f;
s16 large_cave_depth = -33;
s16 lava_depth = -256;
+ s16 dungeon_ymin = -31000;
+ s16 dungeon_ymax = 31000;
u16 fractal = 1;
u16 iterations = 11;
v3f scale = v3f(4096.0, 1024.0, 4096.0);
float julia_y = 0.2f;
float julia_z = 0.133f;
float julia_w = 0.067f;
+
NoiseParams np_seabed;
NoiseParams np_filler_depth;
NoiseParams np_cave1;
bool julia;
s16 large_cave_depth;
+ s16 dungeon_ymin;
+ s16 dungeon_ymax;
u16 fractal;
u16 iterations;
v3f scale;
cavern_limit = params->cavern_limit;
cavern_taper = params->cavern_taper;
cavern_threshold = params->cavern_threshold;
+ dungeon_ymin = params->dungeon_ymin;
+ dungeon_ymax = params->dungeon_ymax;
// Terrain noise
noise_filler_depth = new Noise(¶ms->np_filler_depth, seed, csize.X, csize.Z);
settings->getS16NoEx("mgv5_cavern_limit", cavern_limit);
settings->getS16NoEx("mgv5_cavern_taper", cavern_taper);
settings->getFloatNoEx("mgv5_cavern_threshold", cavern_threshold);
+ settings->getS16NoEx("mgv5_dungeon_ymin", dungeon_ymin);
+ settings->getS16NoEx("mgv5_dungeon_ymax", dungeon_ymax);
settings->getNoiseParams("mgv5_np_filler_depth", np_filler_depth);
settings->getNoiseParams("mgv5_np_factor", np_factor);
settings->setS16("mgv5_cavern_limit", cavern_limit);
settings->setS16("mgv5_cavern_taper", cavern_taper);
settings->setFloat("mgv5_cavern_threshold", cavern_threshold);
+ settings->setS16("mgv5_dungeon_ymin", dungeon_ymin);
+ settings->setS16("mgv5_dungeon_ymax", dungeon_ymax);
settings->setNoiseParams("mgv5_np_filler_depth", np_filler_depth);
settings->setNoiseParams("mgv5_np_factor", np_factor);
}
// Generate dungeons and desert temples
- if (flags & MG_DUNGEONS)
+ if ((flags & MG_DUNGEONS) && full_node_min.Y >= dungeon_ymin &&
+ full_node_max.Y <= dungeon_ymax)
generateDungeons(stone_surface_max_y, mgstone_type, biome_stone);
// Generate the registered decorations
s16 cavern_limit = -256;
s16 cavern_taper = 256;
float cavern_threshold = 0.7f;
+ s16 dungeon_ymin = -31000;
+ s16 dungeon_ymax = 31000;
NoiseParams np_filler_depth;
NoiseParams np_factor;
private:
s16 large_cave_depth;
+ s16 dungeon_ymin;
+ s16 dungeon_ymax;
+
Noise *noise_factor;
Noise *noise_height;
Noise *noise_ground;
heightmap = new s16[csize.X * csize.Z];
- spflags = params->spflags;
- freq_desert = params->freq_desert;
- freq_beach = params->freq_beach;
+ spflags = params->spflags;
+ freq_desert = params->freq_desert;
+ freq_beach = params->freq_beach;
+ dungeon_ymin = params->dungeon_ymin;
+ dungeon_ymax = params->dungeon_ymax;
np_cave = ¶ms->np_cave;
np_humidity = ¶ms->np_humidity;
settings->getFlagStrNoEx("mgv6_spflags", spflags, flagdesc_mapgen_v6);
settings->getFloatNoEx("mgv6_freq_desert", freq_desert);
settings->getFloatNoEx("mgv6_freq_beach", freq_beach);
+ settings->getS16NoEx("mgv6_dungeon_ymin", dungeon_ymin);
+ settings->getS16NoEx("mgv6_dungeon_ymax", dungeon_ymax);
settings->getNoiseParams("mgv6_np_terrain_base", np_terrain_base);
settings->getNoiseParams("mgv6_np_terrain_higher", np_terrain_higher);
settings->setFlagStr("mgv6_spflags", spflags, flagdesc_mapgen_v6, U32_MAX);
settings->setFloat("mgv6_freq_desert", freq_desert);
settings->setFloat("mgv6_freq_beach", freq_beach);
+ settings->setS16("mgv6_dungeon_ymin", dungeon_ymin);
+ settings->setS16("mgv6_dungeon_ymax", dungeon_ymax);
settings->setNoiseParams("mgv6_np_terrain_base", np_terrain_base);
settings->setNoiseParams("mgv6_np_terrain_higher", np_terrain_higher);
updateHeightmap(node_min, node_max);
// Add dungeons
- if ((flags & MG_DUNGEONS) && (stone_surface_max_y >= node_min.Y)) {
+ if ((flags & MG_DUNGEONS) && stone_surface_max_y >= node_min.Y &&
+ full_node_min.Y >= dungeon_ymin && full_node_max.Y <= dungeon_ymax) {
DungeonParams dp;
dp.seed = seed;
MGV6_BIOMEBLEND | MGV6_MUDFLOW;
float freq_desert = 0.45f;
float freq_beach = 0.15f;
+ s16 dungeon_ymin = -31000;
+ s16 dungeon_ymax = 31000;
+
NoiseParams np_terrain_base;
NoiseParams np_terrain_higher;
NoiseParams np_steepness;
NoiseParams *np_humidity;
NoiseParams *np_trees;
NoiseParams *np_apple_trees;
+
float freq_desert;
float freq_beach;
+ s16 dungeon_ymin;
+ s16 dungeon_ymax;
content_t c_stone;
content_t c_dirt;
cavern_limit = params->cavern_limit;
cavern_taper = params->cavern_taper;
cavern_threshold = params->cavern_threshold;
+ dungeon_ymin = params->dungeon_ymin;
+ dungeon_ymax = params->dungeon_ymax;
// This is to avoid a divide-by-zero.
// Parameter will be saved to map_meta.txt in limited form.
settings->getS16NoEx("mgv7_cavern_limit", cavern_limit);
settings->getS16NoEx("mgv7_cavern_taper", cavern_taper);
settings->getFloatNoEx("mgv7_cavern_threshold", cavern_threshold);
+ settings->getS16NoEx("mgv7_dungeon_ymin", dungeon_ymin);
+ settings->getS16NoEx("mgv7_dungeon_ymax", dungeon_ymax);
settings->getNoiseParams("mgv7_np_terrain_base", np_terrain_base);
settings->getNoiseParams("mgv7_np_terrain_alt", np_terrain_alt);
settings->setS16("mgv7_cavern_limit", cavern_limit);
settings->setS16("mgv7_cavern_taper", cavern_taper);
settings->setFloat("mgv7_cavern_threshold", cavern_threshold);
+ settings->setS16("mgv7_dungeon_ymin", dungeon_ymin);
+ settings->setS16("mgv7_dungeon_ymax", dungeon_ymax);
settings->setNoiseParams("mgv7_np_terrain_base", np_terrain_base);
settings->setNoiseParams("mgv7_np_terrain_alt", np_terrain_alt);
}
// Generate dungeons
- if (flags & MG_DUNGEONS)
+ if ((flags & MG_DUNGEONS) && full_node_min.Y >= dungeon_ymin &&
+ full_node_max.Y <= dungeon_ymax)
generateDungeons(stone_surface_max_y, mgstone_type, biome_stone);
// Generate the registered decorations
s16 cavern_limit = -256;
s16 cavern_taper = 256;
float cavern_threshold = 0.7f;
+ s16 dungeon_ymin = -31000;
+ s16 dungeon_ymax = 31000;
NoiseParams np_terrain_base;
NoiseParams np_terrain_alt;
float float_mount_exponent;
s16 floatland_level;
s16 shadow_limit;
+ s16 dungeon_ymin;
+ s16 dungeon_ymax;
Noise *noise_terrain_base;
Noise *noise_terrain_alt;
river_size_factor = params->river_size / 100.f;
water_features_lim = rangelim(params->water_features, 0, 10);
cave_width = params->cave_width;
+ dungeon_ymin = params->dungeon_ymin;
+ dungeon_ymax = params->dungeon_ymax;
//// 2D Terrain noise
noise_filler_depth = new Noise(¶ms->np_filler_depth, seed, csize.X, csize.Z);
settings->getU16NoEx("mgvalleys_river_size", river_size);
settings->getU16NoEx("mgvalleys_water_features", water_features);
settings->getFloatNoEx("mgvalleys_cave_width", cave_width);
+ settings->getS16NoEx("mgvalleys_dungeon_ymin", dungeon_ymin);
+ settings->getS16NoEx("mgvalleys_dungeon_ymax", dungeon_ymax);
settings->getNoiseParams("mgvalleys_np_cave1", np_cave1);
settings->getNoiseParams("mgvalleys_np_cave2", np_cave2);
settings->setU16("mgvalleys_river_size", river_size);
settings->setU16("mgvalleys_water_features", water_features);
settings->setFloat("mgvalleys_cave_width", cave_width);
+ settings->setS16("mgvalleys_dungeon_ymin", dungeon_ymin);
+ settings->setS16("mgvalleys_dungeon_ymax", dungeon_ymax);
settings->setNoiseParams("mgvalleys_np_cave1", np_cave1);
settings->setNoiseParams("mgvalleys_np_cave2", np_cave2);
generateCaves(stone_surface_max_y, large_cave_depth);
// Dungeon creation
- if ((flags & MG_DUNGEONS) && node_max.Y < 50)
+ if ((flags & MG_DUNGEONS) && full_node_min.Y >= dungeon_ymin &&
+ full_node_max.Y <= dungeon_ymax)
generateDungeons(stone_surface_max_y, mgstone_type, biome_stone);
// Generate the registered decorations
u16 river_size = 5; // How wide to make rivers.
u16 water_features = 0; // How often water will occur in caves.
float cave_width = 0.09f;
+ s16 dungeon_ymin = -31000;
+ s16 dungeon_ymax = 63; // No higher than surface mapchunks
+
NoiseParams np_cave1;
NoiseParams np_cave2;
NoiseParams np_filler_depth;
private:
BiomeGenOriginal *m_bgen;
+ float altitude_chill;
+ s16 massive_cave_depth;
+ s16 dungeon_ymin;
+ s16 dungeon_ymax;
+
bool humid_rivers;
bool use_altitude_chill;
float humidity_adjust;
s16 cave_water_max_height;
s16 lava_max_height;
-
- float altitude_chill;
s16 lava_features_lim;
- s16 massive_cave_depth;
float river_depth_bed;
float river_size_factor;
float *tcave_cache;
s16 water_features_lim;
+
Noise *noise_inter_valley_fill;
Noise *noise_inter_valley_slope;
Noise *noise_rivers;