-
Notifications
You must be signed in to change notification settings - Fork 0
database Map Terrain
ghost-ng edited this page Jan 28, 2026
·
1 revision
This document covers the database tables related to maps, terrain, biomes, features, and plot-level data in Civilization VII.
Terrain defines the base elevation/type of a tile.
<Terrains>
<Row TerrainType="TERRAIN_MOUNTAIN" Name="LOC_TERRAIN_MOUNTAIN_NAME"
InfluenceCost="3" MovementCost="1" Appeal="1"
Impassable="true" SightThroughModifier="2"/>
<Row TerrainType="TERRAIN_HILL" Name="LOC_TERRAIN_HILL_NAME"
InfluenceCost="2" MovementCost="1" Hills="true"/>
<Row TerrainType="TERRAIN_FLAT" Name="LOC_TERRAIN_FLAT_NAME"
InfluenceCost="0" MovementCost="1"/>
<Row TerrainType="TERRAIN_COAST" Name="LOC_TERRAIN_COAST_NAME"
InfluenceCost="1" MovementCost="1" Appeal="1" Water="true"/>
<Row TerrainType="TERRAIN_OCEAN" Name="LOC_TERRAIN_OCEAN_NAME"
InfluenceCost="3" MovementCost="1" Water="true"/>
<Row TerrainType="TERRAIN_NAVIGABLE_RIVER" Name="LOC_TERRAIN_NAVIGABLE_RIVER_NAME"
InfluenceCost="0" MovementCost="1" Appeal="1"/>
</Terrains>| Column | Type | Description |
|---|---|---|
TerrainType |
Text | Unique identifier (PK) |
Name |
LocalizedText | Display name |
InfluenceCost |
Integer | Cost to acquire tile |
MovementCost |
Integer | Base movement cost |
Appeal |
Integer | Appeal bonus/penalty |
Impassable |
Boolean | Units cannot enter |
Hills |
Boolean | Is hill terrain |
Water |
Boolean | Is water terrain |
SightThroughModifier |
Integer | Visibility modifier |
| Type | Description |
|---|---|
TERRAIN_MOUNTAIN |
Impassable mountains |
TERRAIN_HILL |
Elevated land |
TERRAIN_FLAT |
Standard flat land |
TERRAIN_COAST |
Shallow water |
TERRAIN_OCEAN |
Deep water |
TERRAIN_NAVIGABLE_RIVER |
Major rivers |
Biomes define the climate/vegetation type of an area.
<Biomes>
<Row BiomeType="BIOME_TUNDRA" Name="LOC_BIOME_TUNDRA_NAME"/>
<Row BiomeType="BIOME_GRASSLAND" Name="LOC_BIOME_GRASSLAND_NAME" MaxLatitude="58"/>
<Row BiomeType="BIOME_PLAINS" Name="LOC_BIOME_PLAINS_NAME" MaxLatitude="33"/>
<Row BiomeType="BIOME_TROPICAL" Name="LOC_BIOME_TROPICAL_NAME" MaxLatitude="17"/>
<Row BiomeType="BIOME_DESERT" Name="LOC_BIOME_DESERT_NAME" MaxLatitude="44"/>
<Row BiomeType="BIOME_MARINE" Name="LOC_BIOME_MARINE_NAME"/>
</Biomes>| Column | Type | Description |
|---|---|---|
BiomeType |
Text | Unique identifier |
Name |
LocalizedText | Display name |
MaxLatitude |
Integer | Maximum latitude where biome appears |
Links biomes to terrain types they can appear on:
<Biome_ValidTerrains>
<Row BiomeType="BIOME_DESERT" TerrainType="TERRAIN_MOUNTAIN"/>
<Row BiomeType="BIOME_DESERT" TerrainType="TERRAIN_HILL"/>
<Row BiomeType="BIOME_DESERT" TerrainType="TERRAIN_FLAT"/>
<Row BiomeType="BIOME_MARINE" TerrainType="TERRAIN_COAST"/>
<Row BiomeType="BIOME_MARINE" TerrainType="TERRAIN_OCEAN"/>
</Biome_ValidTerrains>Features are overlays on terrain (forests, marshes, natural wonders, etc.).
<Features>
<Row FeatureType="FEATURE_FOREST" Name="LOC_FEATURE_FOREST_NAME"
FeatureClassType="FEATURE_CLASS_VEGETATED"
MovementChange="1" SightThroughModifier="-1"
Removable="true" Appeal="-1"/>
<Row FeatureType="FEATURE_MARSH" Name="LOC_FEATURE_MARSH_NAME"
FeatureClassType="FEATURE_CLASS_WET"
MovementChange="2" DefenseModifier="-10"
Removable="true" Appeal="-2"/>
</Features>| Column | Type | Description |
|---|---|---|
FeatureType |
Text | Unique identifier |
Name |
LocalizedText | Display name |
FeatureClassType |
Text | Feature class FK |
MovementChange |
Integer | Additional movement cost |
SightThroughModifier |
Integer | Vision modifier |
DefenseModifier |
Integer | Combat defense bonus |
Removable |
Boolean | Can be cleared |
Appeal |
Integer | Appeal modifier |
NaturalWonder |
Boolean | Is a natural wonder |
| Type | Description |
|---|---|
FEATURE_FOREST |
Standard forest |
FEATURE_RAINFOREST |
Tropical rainforest |
FEATURE_MARSH |
Wetland marsh |
FEATURE_OASIS |
Desert oasis |
FEATURE_REEF |
Ocean reef |
FEATURE_ICE |
Polar ice |
FEATURE_VOLCANO |
Active volcano |
<FeatureClasses>
<Row FeatureClassType="FEATURE_CLASS_AQUATIC"/>
<Row FeatureClassType="FEATURE_CLASS_FLOODPLAIN"/>
<Row FeatureClassType="FEATURE_CLASS_VEGETATED"/>
<Row FeatureClassType="FEATURE_CLASS_WET"/>
</FeatureClasses>Natural wonders are special features with unique bonuses.
<Feature_NaturalWonders>
<Row FeatureType="FEATURE_GRAND_CANYON" PlacementPercentage="100"
PlaceFirst="false" Size="4" Direction="0"/>
<Row FeatureType="FEATURE_KILIMANJARO" PlacementPercentage="100"
PlaceFirst="true" Size="1" Direction="0"/>
</Feature_NaturalWonders>| Column | Type | Description |
|---|---|---|
FeatureType |
Text | Feature type FK |
PlacementPercentage |
Integer | Chance to place (0-100) |
PlaceFirst |
Boolean | Priority placement |
Size |
Integer | Number of tiles |
Direction |
Integer | Orientation |
| Type | Description |
|---|---|
FEATURE_GRAND_CANYON |
Grand Canyon |
FEATURE_KILIMANJARO |
Mount Kilimanjaro |
FEATURE_BARRIER_REEF |
Great Barrier Reef |
FEATURE_ULURU |
Uluru |
FEATURE_IGUAZU_FALLS |
Iguazu Falls |
FEATURE_VALLEY_OF_FLOWERS |
Valley of Flowers |
FEATURE_TORRES_DEL_PAINE |
Torres del Paine |
FEATURE_REDWOOD_FOREST |
Redwood Forest |
FEATURE_GULLFOSS |
Gullfoss |
FEATURE_ZHANGJIAJIE |
Zhangjiajie |
Fertility defines tile food potential.
<Types>
<Row Type="FERTILITY_STANDARD" Kind="KIND_FERTILITY"/>
<Row Type="FERTILITY_DRY" Kind="KIND_FERTILITY"/>
<Row Type="FERTILITY_FERTILE" Kind="KIND_FERTILITY"/>
</Types>Tags define placement rules for features:
<Tags>
<Row Tag="ADJACENTTOLAND" Category="FEATURE_ATTRIBUTE"/>
<Row Tag="ADJACENTTOCOAST" Category="FEATURE_ATTRIBUTE"/>
<Row Tag="ADJACENTMOUNTAIN" Category="FEATURE_ATTRIBUTE"/>
<Row Tag="NEARCOAST" Category="FEATURE_ATTRIBUTE"/>
<Row Tag="NOTNEARCOAST" Category="FEATURE_ATTRIBUTE"/>
<Row Tag="VOLCANO" Category="FEATURE_ATTRIBUTE"/>
<Row Tag="WATERFALL" Category="FEATURE_ATTRIBUTE"/>
<Row Tag="LAKE" Category="FEATURE_ATTRIBUTE"/>
</Tags><TypeTags>
<Row Type="FEATURE_GRAND_CANYON" Tag="NOTNEARCOAST"/>
<Row Type="FEATURE_GRAND_CANYON" Tag="NOTADJACENTTORIVER"/>
<Row Type="FEATURE_KILIMANJARO" Tag="VOLCANO"/>
<Row Type="FEATURE_BARRIER_REEF" Tag="ADJACENTTOLAND"/>
<Row Type="FEATURE_BARRIER_REEF" Tag="SHALLOWWATER"/>
</TypeTags>Defines what terrain cities can expand into.
<CityExpansionTypes>
<Row CityExpansionType="CITY_EXPANSION_EXPAND" Name="LOC_CITY_EXPANSION_EXPAND_NAME"/>
<Row CityExpansionType="CITY_EXPANSION_DEVELOP" Name="LOC_CITY_EXPANSION_DEVELOP_NAME"/>
</CityExpansionTypes><CityExpansionValidTerrains>
<Row CityExpansionType="CITY_EXPANSION_EXPAND" TerrainType="TERRAIN_MOUNTAIN"/>
<Row CityExpansionType="CITY_EXPANSION_EXPAND" TerrainType="TERRAIN_HILL"/>
<Row CityExpansionType="CITY_EXPANSION_EXPAND" TerrainType="TERRAIN_FLAT"/>
<Row CityExpansionType="CITY_EXPANSION_EXPAND" TerrainType="TERRAIN_COAST"/>
<Row CityExpansionType="CITY_EXPANSION_EXPAND" TerrainType="TERRAIN_OCEAN"/>
<Row CityExpansionType="CITY_EXPANSION_DEVELOP" TerrainType="TERRAIN_HILL"/>
<Row CityExpansionType="CITY_EXPANSION_DEVELOP" TerrainType="TERRAIN_FLAT"/>
</CityExpansionValidTerrains>For runtime map access, use the GameplayMap global object:
// Map dimensions
const width = GameplayMap.getGridWidth();
const height = GameplayMap.getGridHeight();
// Tile queries
const terrain = GameplayMap.getTerrainType(x, y);
const resource = GameplayMap.getResourceType(x, y);
const elevation = GameplayMap.getElevation(x, y);
// Location helpers
const hemisphere = GameplayMap.getHemisphere(x);
const landmassId = GameplayMap.getLandmassRegionId(x, y);
// Index conversions
const index = GameplayMap.getIndexFromXY(x, y);
const location = GameplayMap.getLocationFromIndex(index);// Set features
const featureParam = {
Feature: featureHash,
Direction: 0,
Elevation: elevation
};
TerrainBuilder.canHaveFeatureParam(x, y, featureParam);
TerrainBuilder.setFeatureType(x, y, featureParam);
// Random numbers for map gen
const roll = TerrainBuilder.getRandomNumber(100, "description");
// Generate patterns
const poisson = TerrainBuilder.generatePoissonMap(seed, distance, smoothing);<Modifier id="MY_TERRAIN_BONUS" collection="COLLECTION_PLAYER_PLOT_YIELDS"
effect="EFFECT_ADJUST_PLOT_YIELD">
<SubjectRequirementSet>
<Requirement type="REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES">
<Argument name="TerrainType">TERRAIN_HILL</Argument>
</Requirement>
</SubjectRequirementSet>
<Argument name="YieldType">YIELD_PRODUCTION</Argument>
<Argument name="Amount">1</Argument>
</Modifier><Modifier id="MY_FOREST_BONUS" collection="COLLECTION_PLAYER_PLOT_YIELDS"
effect="EFFECT_ADJUST_PLOT_YIELD">
<SubjectRequirementSet>
<Requirement type="REQUIREMENT_PLOT_FEATURE_TYPE_MATCHES">
<Argument name="FeatureType">FEATURE_FOREST</Argument>
</Requirement>
</SubjectRequirementSet>
<Argument name="YieldType">YIELD_PRODUCTION</Argument>
<Argument name="Amount">1</Argument>
</Modifier>- JavaScript Overview - Map API details
- Types and Kinds - Type system
- Modifier System - Creating bonuses
- Resources - Resource placement