Terrain types are associated with the cells, borders, connections, and coatings in a world.
Form: terrain-type
name properties...
This form defines a new type of terrain, named by name. Details are similar to those for unit types.
GlobalVariable: t*
This variable evaluates to a list of all terrain types, listed in the order that they were defined.
GlobalVariable: non-terrain
This variable has a value that is guaranteed not to be a terrain type.
Terrain can appear in four different roles: as the interior of a cell, as a border between cells, as a connection between cells, or as a coating overlaying the normal terrain. The terrain subtype says which role a type can play.
TerrainTypeProperty: subtype
subtype
This property is the role that the terrain type can appear in. Defaults
to cell
.
GlobalConstant: cell
This constant indicates that terrain can fill a cell. All units in the open and with an altitude of 0 are assumed to be surrounded by the cell terrain.
GlobalConstant: border
This constant indicates that the terrain can be a border between two cells.
GlobalConstant: connection
This constant indicates that the terrain can be a connection between two cells.
GlobalConstant: coating
This constant indicates that the terrain can be a coating. A coating is a temporary terrain modification. The classic example is snow, which effectively changes some kinds of terrain, but not completely and usually not permanently. Cells can have varying heaviness of each type of coating.
TableTT: coating-depth-min
t1 t2 -> n
In order for a coating t1 to "stick", this table says much must be added all at once to terrain t2. A coating depth that drops below this will disappear immediately.
TableTT: coating-depth-max
t1 t2 -> n
This table is the upper limit on coating depth.
Terrain types may have additional subtype attributes that are used only during synthesis, to select appropriate subtypes for special purposes.
TerrainTypeProperty: subtype-x
n
This property is extra subtype information, used in synthesis. Defaults
to no-x
.
Symbol: no-x
GlobalConstant: river-x
This constant indicates that synthesis methods should treat this type as a river. The terrain type may be either a border or a connection.
GlobalConstant: valley-x
This constant indicates that synthesis methods should treat this type as a valley.
GlobalConstant: road-x
This constant indicates that synthesis methods should treat this type as a road.
TerrainTypeProperty: liquid
t/f
This property is true if the terrain type represents a liquid, which
means that adjacent cells of liquid must have the same elevation.
Defaults to false
.
Terrain types are not always mutually compatible. Incompatible types may not be juxtaposed, either at game setup time or by unit action during a game.
TableTT: adjacent-terrain-effect
t1 t2 -> t3
This table specifies what will happen to a cell of type t1
adjacent to a cell of type t2. If t3 is non-terrain
,
nothing will happen, otherwise it will become a cell of type t3.
Defaults to non-terrain
.
TableTT: adjacent-terrain-effect-chance
t1 t2 -> n%
If a terrain change is specified in the adjacent-terrain-effect
table, then the corresponding entry in this table determines the
probability n of the terrain change effect succeeding. Defaults to
100%
.
TableTT: adjacent-terrain-effect-passes
t1 t2 -> n
If a terrain change is specified in the adjacent-terrain-effect
table, then the corresponding entry in this table determines how many
times this effect will be iterated by the terrain change code. Defaults
to -1
, which means that iterations will continue until no more
changes occur or until the number of iterations is equal to the height of
the map.
TableTT: adjacent-terrain-border
t1 t2 -> t3
If a cell terrain of type t1 is adjacent to a cell terrain of type
t2, then place a border of type t3 between the cells.
Defaults to non-terrain
, which means that no border will be placed.
NOTE: Existing borders are deleted before the new border is placed.
TableTT: adjacent-terrain-border-chance
t1 t2 -> n%
If a border between t1 and t2 is specified in the
adjacent-terrain-border
table, then the corresponding entry in
this table determines the probability of the new border actually being
placed. Defaults to 100%
.
TableTT: adjacent-terrain-connection
t1 t2 -> t3
Similar to adjacent-terrain-border
, but applied to connection
terrain. Defaults to non-terrain
(no connection will be placed), and
if a connection is placed, any existing connections will be removed.
TableTT: adjacent-terrain-connection-chance
t1 t2 -> n%
Similar to adjacent-terrain-border-chance
, this specifies the chance
of a connection specified by adjacent-terrain-connection
actually
being placed. Defaults to 100%
.
Note that there is not a passes-limiting table for setting border terrain. This is because the border terrain algorithm executes in one pass, since border types are not dependent on neighboring border types. Similarly, there is no passes-limiting table for connection terrain.
TerrainTypeProperty: elevation-min
elev
TerrainTypeProperty: elevation-max
elev
These properties define the minimum and maximum possible values for the
elevation in a cell of given terrain type. Both default to 0
.
TerrainTypeProperty: temperature-min
n
TerrainTypeProperty: temperature-max
n
These properties define the minimum and maximum possible values for the
temperature in a cell of given terrain type. Both default to 0
.
TerrainTypeProperty: wind-force-min
n
TerrainTypeProperty: wind-force-max
n
These properties define limits on wind force. Both default to 0
.
TerrainTypeProperty: clouds-min
n
TerrainTypeProperty: clouds-max
n
These properties define limits on cloud density. Both default to
0
.