-
Notifications
You must be signed in to change notification settings - Fork 0
database Buildings
ghost-ng edited this page Jan 28, 2026
·
1 revision
This document describes the database tables used to define buildings, improvements, and wonders in Civilization VII.
In Civ VII, buildings, improvements, and wonders are all "constructibles" sharing a common base structure with specialization tables.
Three main classes of constructibles:
| Class | Description |
|---|---|
BUILDING |
City buildings (Granary, Library, etc.) |
IMPROVEMENT |
Tile improvements (Farm, Mine, etc.) |
WONDER |
World wonders |
Register constructibles in the Types table:
<Types>
<Row Type="BUILDING_GRANARY" Kind="KIND_CONSTRUCTIBLE"/>
<Row Type="IMPROVEMENT_FARM" Kind="KIND_CONSTRUCTIBLE"/>
<Row Type="WONDER_PYRAMIDS" Kind="KIND_CONSTRUCTIBLE"/>
</Types>The main constructible definition table:
<Constructibles>
<Row
ConstructibleType="BUILDING_GRANARY"
Name="LOC_BUILDING_GRANARY_NAME"
Description="LOC_BUILDING_GRANARY_DESCRIPTION"
Cost="100"
Population="1"
ConstructibleClass="BUILDING"
/>
</Constructibles>| Column | Type | Description | Example |
|---|---|---|---|
ConstructibleType |
TEXT | Primary key | BUILDING_GRANARY |
Name |
TEXT | Localization key | LOC_BUILDING_GRANARY_NAME |
Description |
TEXT | Description key | LOC_BUILDING_GRANARY_DESCRIPTION |
Cost |
INTEGER | Production cost | 100 |
Population |
INTEGER | Population provided |
1, 0
|
ConstructibleClass |
TEXT | Class type |
BUILDING, IMPROVEMENT, WONDER
|
ImmuneDamage |
BOOLEAN | Cannot be damaged |
true (Palace) |
CanBeHidden |
BOOLEAN | Hidden on map |
true (Discoveries) |
Discovery |
BOOLEAN | Is a discovery site | true |
RequiresUnlock |
BOOLEAN | Needs explicit unlock | true |
Additional properties specific to buildings:
<Buildings>
<Row
ConstructibleType="BUILDING_PALACE"
Capital="true"
CityCenterPriority="100"
BuildQueue="true"
Movable="false"
Town="True"
/>
</Buildings>| Column | Type | Description |
|---|---|---|
ConstructibleType |
TEXT | Foreign key to Constructibles |
Capital |
BOOLEAN | Is capital building |
CityCenterPriority |
INTEGER | Placement priority |
BuildQueue |
BOOLEAN | Uses build queue |
Movable |
BOOLEAN | Can be relocated |
Town |
BOOLEAN | Can be built in towns |
Register constructibles as improvements:
<Improvements>
<Row ConstructibleType="IMPROVEMENT_FARM"/>
<Row ConstructibleType="IMPROVEMENT_MINE"/>
<Row ConstructibleType="IMPROVEMENT_FISHING_BOAT"/>
</Improvements>Classification tags for buildings:
<TypeTags>
<Row Type="BUILDING_GRANARY" Tag="FOOD"/>
<Row Type="BUILDING_LIBRARY" Tag="SCIENCE"/>
<Row Type="BUILDING_MARKET" Tag="GOLD"/>
<Row Type="BUILDING_PALACE" Tag="AGELESS"/>
<Row Type="BUILDING_PALACE" Tag="PERSISTENT"/>
</TypeTags>| Tag | Description |
|---|---|
FOOD |
Food-producing building |
PRODUCTION |
Production building |
GOLD |
Gold/economic building |
SCIENCE |
Science building |
CULTURE |
Culture building |
HAPPINESS |
Happiness building |
DIPLOMACY |
Diplomacy building |
MILITARY |
Military building |
RELIGIOUS |
Religious building |
TRADE |
Trade-related |
WAREHOUSE |
Storage building |
FORTIFICATION |
Defensive structure |
GREATWORK |
Can hold great works |
UNIQUE |
Unique to a civilization |
UNIQUE_IMPROVEMENT |
Unique improvement |
AGELESS |
Persists across ages |
PERSISTENT |
Not removed on transition |
Static yield bonuses from constructibles:
<Constructible_YieldChanges>
<Row ConstructibleType="BUILDING_GRANARY" YieldType="YIELD_FOOD" YieldChange="2"/>
<Row ConstructibleType="BUILDING_LIBRARY" YieldType="YIELD_SCIENCE" YieldChange="3"/>
</Constructible_YieldChanges>Adjacency bonuses:
<Constructible_Adjacencies>
<Row ConstructibleType="BUILDING_LIBRARY" YieldChangeId="LIBRARY_SCIENCE_ADJACENCY"/>
</Constructible_Adjacencies>Warehouse (storage) bonuses:
<Constructible_WarehouseYields>
<Row ConstructibleType="BUILDING_GRANARY" YieldType="YIELD_FOOD" Amount="10"/>
</Constructible_WarehouseYields>Discovery sites (goody huts) are special improvements:
<Constructibles>
<Row
ConstructibleType="IMPROVEMENT_CAMPFIRE"
Name="LOC_IMPROVEMENT_CAMPFIRE_NAME"
Description="LOC_IMPROVEMENT_CAMPFIRE_DESCRIPTION"
ConstructibleClass="IMPROVEMENT"
Cost="1"
Population="0"
CanBeHidden="true"
Discovery="true"
/>
</Constructibles>| Improvement | Description |
|---|---|
IMPROVEMENT_CAMPFIRE |
Basic discovery |
IMPROVEMENT_CAVE |
Cave exploration |
IMPROVEMENT_RUINS |
Ancient ruins |
IMPROVEMENT_SHIPWRECK |
Coastal discovery |
IMPROVEMENT_CAIRN |
Stone cairn |
Buildings can be removed during age transitions:
<Constructible_TransitionRemoves>
<Row ConstructibleType="BUILDING_PALACE"/>
<Row ConstructibleType="BUILDING_CITY_HALL"/>
</Constructible_TransitionRemoves>Use AGELESS and PERSISTENT tags to keep buildings across ages.
<?xml version="1.0" encoding="utf-8"?>
<Database>
<!-- Register the type -->
<Types>
<Row Type="BUILDING_MY_BUILDING" Kind="KIND_CONSTRUCTIBLE"/>
</Types>
<!-- Define the constructible -->
<Constructibles>
<Row
ConstructibleType="BUILDING_MY_BUILDING"
Name="LOC_BUILDING_MY_BUILDING_NAME"
Description="LOC_BUILDING_MY_BUILDING_DESCRIPTION"
Cost="150"
Population="1"
ConstructibleClass="BUILDING"
/>
</Constructibles>
<!-- Building-specific properties -->
<Buildings>
<Row ConstructibleType="BUILDING_MY_BUILDING"/>
</Buildings>
<!-- Classification -->
<TypeTags>
<Row Type="BUILDING_MY_BUILDING" Tag="CULTURE"/>
</TypeTags>
<!-- Yield bonuses -->
<Constructible_YieldChanges>
<Row ConstructibleType="BUILDING_MY_BUILDING" YieldType="YIELD_CULTURE" YieldChange="3"/>
</Constructible_YieldChanges>
</Database>-
Constructible_Prerequisites- Tech/civic requirements -
Constructible_ValidTerrains- Terrain restrictions -
Constructible_ValidBiomes- Biome restrictions -
Constructible_ValidFeatures- Feature requirements -
Constructible_ValidResources- Resource requirements