changed perlin settings for humidity layer to match deserts

Thanks to paramat for spotting this!
This commit is contained in:
Vanessa Ezekowitz 2013-02-03 03:01:44 -05:00
parent 1554d8fcf4
commit a86c52cfa8
2 changed files with 24 additions and 16 deletions

32
API.txt
View File

@ -534,21 +534,29 @@ Humidity Mapping
Last but not least is a moisture/humidity map. Like the temperature map
above, Perlin values can be tested to determine the approximate humidity of
the *air* in the area.
the *air* in the area. This humidity map is basically the perlin layer used
for deserts.
A value of -1 equates to 100% humidity (basically, it would be a thick fog
if it could be seen), a value of 0 is 50%, and a value of +1 is 0% (dry as a
bone).
A value of -1.0 is very moist (basically a thick fog, if it could be seen), a
value of +0.4 represents the edge of a desert as usually seen in the game, and
a value of +1.0 is as dry as a bone.
This does not check for nearby water or desert area, just general air
humidity, and that being the case, nearby ground does not affect the
reported humidity of a region (because this isn't yet possible to calculate
yet).
This does not check for nearby water, just general air humidity, and that
being the case, nearby ground does not affect the reported humidity of a
region (because this isn't yet possible to calculate yet). Use the near_nodes
and avoid_nodes parameters and their related options to check for water and
such.
The Perlin values use for this layer are:
humidity_seeddiff = 1234
humidity_octaves = 1
humidity_persistence = 0.5
humidity_scale = 150
humidity_seeddiff = 9130
humidity_octaves = 3
humidity_persistence = 0.5
humidity_scale = 250
And this particular one is mapped slightly differently from the others:
noise3 = perlin3:get2d({x=p_top.x+150, y=p_top.z+50})
(Note the +150 and +50 offsets)

View File

@ -24,10 +24,10 @@ local temperature_octaves = 3
local temperature_persistence = 0.5
local temperature_scale = 150
local humidity_seeddiff = 1234
local humidity_octaves = 1
local humidity_seeddiff = 9130
local humidity_octaves = 3
local humidity_persistence = 0.5
local humidity_scale = 150
local humidity_scale = 250
-- Local functions
@ -89,7 +89,7 @@ function plantslib:search_for_surfaces(minp, maxp, biomedef, node_or_function_or
local perlin3 = minetest.env:get_perlin(humidity_seeddiff, humidity_octaves, humidity_persistence, humidity_scale)
local noise1 = perlin1:get2d({x=p_top.x, y=p_top.z})
local noise2 = perlin2:get2d({x=p_top.x, y=p_top.z})
local noise3 = perlin3:get2d({x=p_top.x, y=p_top.z})
local noise3 = perlin3:get2d({x=p_top.x+150, y=p_top.z+50})
if (biome.depth == nil or minetest.env:get_node({ x = pos.x, y = pos.y-biome.depth-1, z = pos.z }).name ~= biome.surface)
and minetest.env:get_node(p_top).name == "air"
and pos.y >= biome.min_elevation