Go to the first, previous, next, last section, table of contents.

## Terrain Types

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 Subtypes
- Terrain Compatibility
- Other Terrain Properties

### Terrain Subtypes

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.

GlobalConstant: `connection`

This constant indicates that the terrain can be a connection.

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`.

GlobalConstant: `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 Compatibility

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.

If t1 is a border type adjacent to a cell of type t2, and if t3 is `non-terrain`, nothing will happen. Otherwise, the border of type t1 will be removed, and if t3 is a border type, a border of that type will be added. The effect on connection types is analogous.

Defaults to `non-terrain`.

### Other Terrain Properties

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`.

Go to the first, previous, next, last section, table of contents.