Terrain

**Terrain** is the area underlying each "Tile" in the game. It affects a variety of game mechanics.

## Types and Element Composition

Different terrain types have different elemental compositions, but just like Flooring, terrain is Range 1. The elemental effects of Terrain, Flooring, and Objects all stack additively with each other. Different types of soil also have different Base Fertility. Fertility can be increased by up to 0.5 points if the Base Fertility is greater than zero, by letting corpses or feces decay on the tile . Fertility and element composition can also be affected by Weather.

### Terrain Types

Many actions can only be carried out on specific types of Terrain. There are three types of Terrain:

* Ground: The most common terrain type. Required for most Buildings and Plants.
* Shallow Water: Required for certain aquatic Buildings and Plants, such as Aqua Spirit Tree or Lotus. If Flooring is built, regular Ground Buildings (but not Plants) can also be built on the Flooring.
* Deep Water: Cannot be built or walked on in any way.

## Incompatible Terrain types

Certain types of Terrain tiles require that they are bordered by other types of tiles. Whenever a tile is changed, any nearby tiles within a specific square range of 2 (5x5 square) that are of different compatibility types will be turned into Terrain of a specific type according to their Terrain definition. For example:

* Fertile Soil (compat 1) is created over Rocky Terrain (compat 1). No additional tiles are changed.
* Fertile Soil (compat 1) is created over Shallow Water (compat 2). Nearby tiles are changed into Wet Earth.
* Spirit Soil (compat 2) is created over Rocky Terrain (compat 1). Nearby tiles are changed into Wet Earth.
* Spirit Soil (compat 2) is created over Shallow Water (compat 2). No additional tiles are changed.
* Shallow Water (compat 2) is created over Rocky Terrain (compat 1). Nearby tiles are changed into Mud.
* Shallow Water (compat 2) is created over Spirit Soil (compat 2). No additional tiles are changed.

## Changing Terrain

You can change the type of Terrain on a tile in one of several ways.

It is possible to change Terrain type to: Soil, Shallow Water, Fertile Soil, Spirit Soil, Mud.

It is not possible to change Terrain type to: Rocky Terrain or Deep Water, unless they already exist.

### Building from the Area menu

#### Soil

"Reconstruct an area in to soil. This work will take a long time".

Can be built on other Terrain types, apart from Deep Water.

Cost: nothing (apart from time)

Effect: Tile gets turned into Soil. Any Water (shallow or deep) 2 tiles away horizontally, or diagonally (5x5 square) gets turned into Wet Earth.

#### Shallow Water

"Reconstruct a ground area in to shallow water. This work will take a long time".

Can be built on other Terrain types, apart from Deep Water.

Effect: Tile gets turned into Shallow Water. Any Soil 2 tiles away horizontally, or diagonally (5x5 square) gets turned into mud.

Cost: 100 Water (Ingredient)

#### Fertile Soil

"Reconstruct a ground area in to fertile soil. This work will take a long time".

Can be built on other Terrain types, apart from Shallow or Deep Water. Any Water (shallow or deep) 2 tiles away horizontally, or diagonally (5x5 square) gets turned into Wet Earth.

Cost: 10 Feces

#### Land Shaping / Lake Shaping

Cost: 30,000 Qi

Area: Converts an oval within the bounds of a rectangle (maximum of 100 tiles) into Soil or Shallow Water

#### Mountain Shaping

Cost: 100,000 Qi

Mountain Shaping lets you summon more rock and ore nodes. Unfortunately, it does not change the Terrain type to Rocky Terrain.

#### Fertile Soil

Cost: 100,000 Qi

Area: Converts an oval within the bounds of a rectangle (maximum of 64 tiles) into Fertile Soil

#### Spiritual Soil of Creator

Cost: 200,000 Qi

Area: Converts an oval within the bounds of a rectangle (maximum of 64 tiles) into Spirit Soil

#### Destiny Pool

Cost: 200,000 Qi

Area: Converts an oval within the bounds of a rectangle (maximum of 64 tiles) into Spirit Water

### Items

#### Spirit Seed

A buried Spirit Seed will slowly turn the 19x19 square area surrounding it into Spirit Soil or Spirit Water over about 3 years.

### Pets

#### Dog

Huajuan (Dog pet) can use 20 Growth, 100 Nutrition of every stat, and 15 of every stat to produce Fertile Soil.

#### Fox/Turtle

Qin Muxue (Fox pet) and MiaoDLC (Turtle pet) can use 20 Growth, 100 Nutrition of every stat, and 15 of every stat to turn tiles into Spirit Soil.

### Buildings

A Destiny Pool can turn an area around itself into Spirit Soil.

## Bugs

### Adding own tile Element value repeatedly

If you add flooring, then remove it, the tile's base value is added to the tile.

ie: doing it once on soil, would result in 2 earth, 0.5 wood, 0.5 water; doing it twice on soil, would result in 3 earth, 0.75 wood, 0.75 water. This can be fixed by reloading the game.

## References

1. ↑ Settings\TerrainDef\Terrain\_Base.xml
2. ↑ `XiaWorld.Map.AddFertilityAddtion`<nowiki>
3. ↑ `XiaWorld.Npc.CorpseStep`
4. ↑ `XiaWorld.JobBuryHim._OnToilDo`
5. ↑ 5.0 5.1 The compatibility class is calculated by taking the `RenderLayer` property of each type of Terrain, dividing by 10, and rounding them down to the nearest whole number. See `XiaWorld.TerrainDef.GetLayer`
6. ↑ `XiaWorld.TerrainData.FullTerrain`