VCNLib/test_layer.lua
qwertymine3 d3859c48f0 Noise maps are now made at mapgen init
This doesn't affext the ability to use given maps though
2015-09-02 19:26:59 +01:00

99 lines
1.8 KiB
Lua

local heatmap = {
flags = nil,
lacunarity = 2,
octaves = 3,
--average temp
offset = 50,
persistence = 0.5,
--plus or mius value
scale = 10,
seeddiff = 5349,
spread = {x=10,y=10,z=10},
}
local wetmap = {
flags = nil,
lacunarity = 2,
octaves = 3,
offset = 50,
persistence = 0.5,
scale = 10,
seeddiff = 842,
spread = {x=10,y=10,z=10},
}
vcnlib.new_layer{
--name of the layer, used to get a copy of it later
name = "test",
--a number added to the world seed to amke different noises
seed_offset = 5,
--number of dimensions the noise changes over
dimensions = 3,
--scale to multiply the noise by(for performace)
--if not a factor of 80, there may be some artifacting at the edge
--of voxel manip blocks
scale = 5,
--side lengths for sectors (approx size for one biome)
sector_lengths = {
x=5,y=5,z=5,},
--how biomes are chosen
biome_types = "random",
--biome distribution options (if any)
random = nil,
--perlin parameters for the heatmap and humidity map
biome_maps = {
dimensions = 2,
heat = heatmap,
humidity = wetmap,
--multimap maps
heatmap,
wetmap,
},
--tollerance levels for each biome map within which biomes are
--chosen at random
tollerance = {
heat = 10,
humidity = 10,
--multimap tollerances
10,10,
},
--how distance from the centre of a biome is judged
--changes he shape of generated biomes
geometry = "manhattan",
}
local test = vcnlib.get_layer("test")
test:add_biome{
--name of biome
name = "bland",
--heat it is found at
heat = 40,
--humidity level it is found at
humidity = 40,
--any other noisemaps used in the layer
--heat for multi
40,
--humidity for multi
40,
}
test:add_biome{
name = "boring",
heat = 50,
humidity = 40,
50,40,
}
test:add_biome{
name = "drab",
heat = 50,
humidity = 40,
50,40,
}
test:add_biome{
name = "dull",
heat = 60,
humidity = 60,
60,60,
}