Bin no_trees_on_this_level, use exp. decay away from snow line.

Probability of placing an arctic tree is now an exponential decay
function of height distance from the snow line, instead of the previous
50% blocks.
This results in a more gradual thinning out of arctic trees in
each direction.
The algorithm is: p = exp(-3 * distance / range_setting),
using a rather crude approximation of the exponential function.

The no_trees_on_this_level setting is not really useful, and its
dual behaviour to disallow discrete height levels and turn on the
snow line behaviour is unintuitive.
Replace it with a simple on/off setting.
This commit is contained in:
Jonathan G Rennison
2015-08-21 21:11:43 +01:00
parent 3b120c6cbd
commit 381d11096f
3 changed files with 76 additions and 33 deletions

View File

@@ -2310,23 +2310,22 @@ strhelp = STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_HELPTEXT
strval = STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_NONE
cat = SC_BASIC
[SDT_BOOL]
base = GameSettings
var = construction.trees_around_snow_line_enabled
def = true
cat = SC_BASIC
patxname = ""everest_treeline.construction.trees_around_snow_line_enabled""
[SDT_VAR]
base = GameSettings
var = construction.trees_around_snow_line_range
type = SLE_UINT8
def = 0
min = 0
max = 15
cat = SC_BASIC
[SDT_VAR]
base = GameSettings
var = construction.no_trees_on_this_level
type = SLE_UINT32
def = 0
min = 0
max = UINT32_MAX
def = 8
min = 1
max = 20
cat = SC_BASIC
patxname = ""everest_treeline.construction.trees_around_snow_line_range""
[SDT_VAR]
base = GameSettings