Skip to content
Snippets Groups Projects
Commit 80c7612e authored by Duane Robertson's avatar Duane Robertson Committed by paramat
Browse files

Mgvalleys: use standard caves

Replace simple caves with V5 caves, adding unpredictable water and lava
settings and massive caves based on subterrain. Remove fast terrain mode
and accompanying settings. Remove superfluous temperature/humidity
settings. Remove lava/water height setting. Fix errors in humidity
handling and remove humidity_break_point setting. Move cave noises to
generateCaves. Fix minor formatting/naming issues and use
MYMAX/MYMIN/myround.
parent 83583aa2
No related branches found
No related tags found
No related merge requests found
......@@ -1043,25 +1043,21 @@ mgfractal_np_cave2 (Mapgen fractal cave2 noise parameters) noise_params 0, 12, (
# Flags that are not specified in the flag string are not modified from the default.
# Flags starting with "no" are used to explicitly disable them.
# "altitude_chill" makes higher elevations colder, which may cause biome issues.
# "fast" produces softer terrain, more quickly
# "humid_rivers" modifies the humidity around rivers and in areas where water would tend to pool. It may interfere with delicately adjusted biomes.
# "rugged" and "cliffs" do nothing unless "fast" is enabled
mg_valleys_spflags (Valleys C Flags) flags altitude_chill,cliffs,humid_rivers,nofast,rugged altitude_chill,noaltitude_chill,cliffs,nocliffs,fast,nofast,humid_rivers,nohumid_rivers,rugged,norugged
mg_valleys_spflags (Valleys C Flags) flags altitude_chill,humid_rivers altitude_chill,noaltitude_chill,humid_rivers,nohumid_rivers
# The altitude at which temperature drops by 20C
mg_valleys_altitude_chill (Altitude Chill) int 90
# Average humidity
mg_valleys_humidity (Humidity) int 50
# Depth below which you'll find large caves.
mg_valleys_large_cave_depth (Large cave depth) int -33
# The highest humidity around rivers in otherwise dry areas
mg_valleys_humidity_break_point (Humidity Break) int 65
# Creates unpredictable lava features in caves.
# These can make mining difficult. Zero disables them. (0-10)
mg_valleys_lava_features (Lava Features) int 0
# Maximum altitude where lava can emerge
mg_valleys_lava_max_height (Lava Height) int 0
# Maximum altitude where water occurs in caves (and tends to fall out)
mg_valleys_cave_water_max_height (Cave Water Height) int 31000
# Depth below which you'll find massive caves.
mg_valleys_massive_cave_depth (Massive cave depth) int -256
# How deep to make rivers
mg_valleys_river_depth (River Depth) int 4
......@@ -1069,33 +1065,28 @@ mg_valleys_river_depth (River Depth) int 4
# How wide to make rivers
mg_valleys_river_size (River Size) int 5
# Average temperature
mg_valleys_temperature (Temperature) int 50
# How often water occurs in caves (0-10)
mg_valleys_water_features (Water Features) int 3
# Creates unpredictable water features in caves.
# These can make mining difficult. Zero disables them. (0-10)
mg_valleys_water_features (Water Features) int 0
# Noise parameters
[****Noises]
# Cliff noise
mg_valleys_np_cliffs (Cliffs) noise_params 0, 1, (750, 750, 750), 8445, 5, 1.0, 2.0
# Caves and tunnels form at the intersection of the two noises
mg_valleys_np_cave1 (Cave noise #1) noise_params 0, 12, (100, 100, 100), 52534, 4, 0.5, 2.0
# Mountain corrugation
mg_valleys_np_corr (Corrugation) noise_params 0, 1, (40, 40, 40), -3536, 4, 1.0, 2.0
# Caves and tunnels form at the intersection of the two noises
mg_valleys_np_cave2 (Cave noise #2) noise_params 0, 12, (100, 100, 100), 10325, 4, 0.5, 2.0
# The depth of dirt or other filler
mg_valleys_np_filler_depth (Filler Depth) noise_params 0, 1.2, (256, 256, 256), 1605, 3, 0.5, 2.0
# Massive caves form here.
mg_valleys_np_massive_caves (Massive cave noise) noise_params 0, 1, (768, 256, 768), 59033, 6, 0.63, 2.0
# River noise -- rivers occur close to zero
mg_valleys_np_rivers (River Noise) noise_params 0, 1, (256, 256, 256), -6050, 5, 0.6, 2.0
# Caves and tunnels form at the intersection of the two noises
mg_valleys_np_simple_caves_1 (Simple Caves #1) noise_params 0, 1, v3f(64, 64, 64), -8402, 3, 0.5, 2.0
# Caves and tunnels form at the intersection of the two noises
mg_valleys_np_simple_caves_2 (Simple Caves #2) noise_params 0, 1, v3f(64, 64, 64), 3944, 3, 0.5, 2.0
# Base terrain height
mg_valleys_np_terrain_height (Terrain Height) noise_params -10, 50, (1024, 1024, 1024), 5202, 6, 0.4, 2.0
......
......@@ -1315,31 +1315,28 @@
#### Mapgen Valleys
#mg_valleys_spflags = altitude_chill,cliffs,humid_rivers,nofast,rugged
#mg_valleys_spflags = altitude_chill,humid_rivers
# "altitude_chill" makes higher elevations colder, which may cause biome issues.
# "fast" produces softer terrain, more quickly
# "humid_rivers" modifies the humidity around rivers and in areas where water would tend to pool. It may interfere with delicately adjusted biomes.
# "rugged" and "cliffs" do nothing unless "fast" is enabled
#
#mg_valleys_altitude_chill = 90 # the altitude at which temperature drops by 20C
#mg_valleys_cave_water_max_height = 31000 # max altitude of water in caves
#mg_valleys_humidity = 50 # the average humidity
#mg_valleys_humidity_break_point = 65 # The highest humidity around rivers in otherwise dry areas
#mg_valleys_lava_max_height = 0 # maximum altitude of lava
#mg_valleys_large_cave_depth = -33 # Depth below which you'll find large caves.
#mg_valleys_lava_features = 0 # Creates unpredictable lava features in caves. These can make mining difficult. Zero disables them. (0-10)
#mg_valleys_massive_cave_depth = -256 # Depth below which you'll find massive caves.
#mg_valleys_river_depth = 4 # how deep to make rivers
#mg_valleys_river_size = 5 # how wide to make rivers
#mg_valleys_temperature = 50 # the average temperature
#mg_valleys_water_features = 3 # how often water occurs in caves (0-10)
#mg_valleys_water_features = 0 # Creates unpredictable water features in caves. These can make mining difficult. Zero disables them. (0-10)
#
#mg_valleys_np_cliffs = 0, 1, (750, 750, 750), 8445, 5, 1.0, 2.0
#mg_valleys_np_corr = 0, 1, (40, 40, 40), -3536, 4, 1.0, 2.0
#mg_valleys_np_filler_depth = 0, 1.2, (256, 256, 256), 1605, 3, 0.5, 2.0
#
# River noise -- rivers occur close to zero
#mg_valleys_np_rivers = 0, 1, (256, 256, 256), -6050, 5, 0.6, 2.0
#
#mg_valleys_np_simple_caves_1 = 0, 1, v3f(64, 64, 64), -8402, 3, 0.5, 2.0
#mg_valleys_np_simple_caves_2 = 0, 1, v3f(64, 64, 64), 3944, 3, 0.5, 2.0
# Caves and tunnels form at the intersection of the two noises
#mg_valleys_np_cave1 = 0, 12, (100, 100, 100), 52534, 4, 0.5, 2.0
#mg_valleys_np_cave2 = 0, 12, (100, 100, 100), 10325, 4, 0.5, 2.0
#
#mg_valleys_np_massive_caves = 0, 1, (768, 256, 768), 59033, 6, 0.63, 2 # Massive caves form here.
#
# Base terrain height
#mg_valleys_np_terrain_height = -10, 50, (1024, 1024, 1024), 5202, 6, 0.4, 2.0
......
This diff is collapsed.
......@@ -31,11 +31,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "mapgen.h"
/////////////////// Mapgen Valleys flags
#define MG_VALLEYS_ALT_CHILL 0x01
#define MG_VALLEYS_CLIFFS 0x02
#define MG_VALLEYS_FAST 0x04
#define MG_VALLEYS_HUMID_RIVERS 0x08
#define MG_VALLEYS_RUGGED 0x10
#define MG_VALLEYS_ALT_CHILL 0x01
#define MG_VALLEYS_HUMID_RIVERS 0x02
// Feed only one variable into these.
#define MYSQUARE(x) (x) * (x)
#define MYCUBE(x) (x) * (x) * (x)
class BiomeManager;
......@@ -47,28 +48,25 @@ class BiomeManager;
struct MapgenValleysParams : public MapgenSpecificParams {
u32 spflags;
s16 large_cave_depth;
s16 massive_cave_depth;
u16 altitude_chill;
s16 cave_water_max_height;
s16 humidity;
s16 humidity_break_point;
s16 lava_max_height;
u16 lava_features;
u16 river_depth;
u16 river_size;
s16 temperature;
u16 water_features;
NoiseParams np_biome_heat;
NoiseParams np_biome_heat_blend;
NoiseParams np_biome_humidity;
NoiseParams np_biome_humidity_blend;
NoiseParams np_cliffs;
NoiseParams np_corr;
NoiseParams np_cave1;
NoiseParams np_cave2;
NoiseParams np_filler_depth;
NoiseParams np_inter_valley_fill;
NoiseParams np_inter_valley_slope;
NoiseParams np_rivers;
NoiseParams np_simple_caves_1;
NoiseParams np_simple_caves_2;
NoiseParams np_massive_caves;
NoiseParams np_terrain_height;
NoiseParams np_valley_depth;
NoiseParams np_valley_profile;
......@@ -89,8 +87,6 @@ struct TerrainNoise {
float valley_profile;
float *slope;
float inter_valley_fill;
float cliffs;
float corr;
};
class MapgenValleys : public Mapgen {
......@@ -102,6 +98,8 @@ class MapgenValleys : public Mapgen {
virtual void makeChunk(BlockMakeData *data);
int getGroundLevelAtPoint(v2s16 p);
s16 large_cave_depth;
private:
EmergeManager *m_emerge;
BiomeManager *bmgr;
......@@ -109,10 +107,9 @@ class MapgenValleys : public Mapgen {
int ystride;
int zstride;
float map_gen_limit;
u32 spflags;
bool cliff_terrain;
bool fast_terrain;
bool rugged_terrain;
bool humid_rivers;
bool use_altitude_chill;
......@@ -123,8 +120,8 @@ class MapgenValleys : public Mapgen {
Noise *noise_filler_depth;
Noise *noise_cliffs;
Noise *noise_corr;
Noise *noise_cave1;
Noise *noise_cave2;
Noise *noise_heat;
Noise *noise_heat_blend;
Noise *noise_humidity;
......@@ -132,21 +129,21 @@ class MapgenValleys : public Mapgen {
Noise *noise_inter_valley_fill;
Noise *noise_inter_valley_slope;
Noise *noise_rivers;
Noise *noise_simple_caves_1;
Noise *noise_simple_caves_2;
Noise *noise_massive_caves;
Noise *noise_terrain_height;
Noise *noise_valley_depth;
Noise *noise_valley_profile;
float altitude_chill;
float cave_water_max_height;
s16 cave_water_max_height;
float humidity_adjust;
float humidity_break_point;
float lava_max_height;
float river_depth;
float river_size;
float temperature_adjust;
s16 water_features;
s16 lava_features_lim;
s16 lava_max_height;
s16 massive_cave_depth;
float river_depth_bed;
float river_size_factor;
float *tcave_cache;
s16 water_features_lim;
content_t c_cobble;
content_t c_desert_stone;
......@@ -176,7 +173,7 @@ class MapgenValleys : public Mapgen {
MgStoneType generateBiomes(float *heat_map, float *humidity_map);
void dustTopNodes();
void generateSimpleCaves(s16 max_stone_y);
void generateCaves(s16 max_stone_y);
};
struct MapgenFactoryValleys : public MapgenFactory {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment