Feature: auto-detect map height limit based on generated map

This opens up the true power of the TGP terrain generator, as it
is no longer constrainted by an arbitrary low map height limit,
especially for extreme terrain types.

In other words: on a 1kx1k map with "Alpinist" terrain type, the
map is now really hilly with default settings.

People can still manually limit the map height if they so wish,
and after the terrain generation the limit is stored in the
savegame as if the user set it.

Cheats still allow you to change this value.
This commit is contained in:
Patric Stout
2021-03-24 10:29:01 +01:00
committed by Patric Stout
parent 1a1049bc0d
commit 422e132845
8 changed files with 52 additions and 10 deletions

View File

@@ -394,16 +394,16 @@ base = GameSettings
var = construction.map_height_limit
type = SLE_UINT8
from = SLV_194
guiflags = SGF_NEWGAME_ONLY | SGF_SCENEDIT_TOO
def = DEF_MAP_HEIGHT_LIMIT
guiflags = SGF_NEWGAME_ONLY | SGF_SCENEDIT_TOO | SGF_0ISDISABLED
def = 0
min = MIN_MAP_HEIGHT_LIMIT
max = MAX_MAP_HEIGHT_LIMIT
interval = 1
str = STR_CONFIG_SETTING_MAP_HEIGHT_LIMIT
strhelp = STR_CONFIG_SETTING_MAP_HEIGHT_LIMIT_HELPTEXT
strval = STR_JUST_INT
strval = STR_CONFIG_SETTING_MAP_HEIGHT_LIMIT_VALUE
proc = ChangeMaxHeightLevel
cat = SC_BASIC
cat = SC_ADVANCED
[SDT_BOOL]
base = GameSettings