-
Notifications
You must be signed in to change notification settings - Fork 0
modifiers Requirement Types
Requirements are conditions that control when modifiers activate. This document lists available requirement types.
Requirements are combined into RequirementSets:
-
REQUIREMENTSET_TEST_ALL- All requirements must pass -
REQUIREMENTSET_TEST_ANY- Any requirement can pass
Requirements can be inverted with Inverse="true".
Checks if city has a specific building.
| Argument | Type | Description |
|---|---|---|
BuildingType |
TEXT | Building to check for |
<Requirement type="REQUIREMENT_CITY_HAS_BUILDING">
<Argument name="BuildingType">BUILDING_GRANARY</Argument>
</Requirement>Checks if city has a build queue (is a full city, not a town).
<Requirement type="REQUIREMENT_CITY_HAS_BUILD_QUEUE"/>Use Inverse="true" to check for towns:
<Requirement type="REQUIREMENT_CITY_HAS_BUILD_QUEUE" Inverse="true"/>Checks if settlement is a city (not town).
Checks biome tiles at city founding.
| Argument | Type | Description |
|---|---|---|
BiomeType |
TEXT | Biome type |
Amount |
INTEGER | Minimum tiles |
Checks plot biome.
| Argument | Type | Description |
|---|---|---|
BiomeType |
TEXT |
BIOME_DESERT, BIOME_TUNDRA, etc. |
Checks terrain type.
| Argument | Type | Description |
|---|---|---|
TerrainType |
TEXT | Terrain type |
Checks district class on the plot.
| Argument | Type | Description |
|---|---|---|
DistrictClass |
TEXT |
CITYCENTER, URBAN, RURAL, WONDER
|
Can check multiple:
<Requirement type="REQUIREMENT_PLOT_DISTRICT_CLASS">
<Argument name="DistrictClass">RURAL, URBAN, CITYCENTER</Argument>
</Requirement>Checks if plot is on a river.
| Argument | Type | Description |
|---|---|---|
Navigable |
BOOLEAN | Require navigable river |
Checks if plot is a lake.
Checks if plot is adjacent to coast.
Checks if plot is adjacent to a lake.
Checks if plot is adjacent to a river.
Checks if plot has a visible resource.
Checks if plot is in player's homelands (near capital hemisphere).
Checks if plot is adjacent to owner's territory.
Checks if unit has a specific tag.
| Argument | Type | Description |
|---|---|---|
Tag |
TEXT | Unit class tag |
<Requirement type="REQUIREMENT_UNIT_TAG_MATCHES">
<Argument name="Tag">UNIT_CLASS_INFANTRY</Argument>
</Requirement>Checks unit domain.
| Argument | Type | Description |
|---|---|---|
UnitDomain |
TEXT |
DOMAIN_LAND, DOMAIN_SEA, DOMAIN_AIR
|
Checks unit class.
| Argument | Type | Description |
|---|---|---|
UnitClass |
TEXT | Unit class |
Checks if player is human (not AI).
Use Inverse="true" to check for AI:
<Requirement type="REQUIREMENT_PLAYER_IS_HUMAN" Inverse="true"/>Checks if player is the attacker in combat.
Checks if player is a major civilization.
Checks if player is a minor civilization (city-state).
Checks if player has researched a tech/civic.
| Argument | Type | Description |
|---|---|---|
ProgressionTreeNodeType |
TEXT | Tech/civic node |
MinDepth |
INTEGER | Required completion depth |
<Requirement type="REQUIREMENT_PLAYER_HAS_COMPLETED_PROGRESSION_TREE_NODE">
<Argument name="ProgressionTreeNodeType">NODE_TECH_AQ_MASONRY</Argument>
<Argument name="MinDepth">1</Argument>
</Requirement>Checks if another requirement set is met.
| Argument | Type | Description |
|---|---|---|
RequirementSetId |
TEXT | Requirement set to check |
<Requirement type="REQUIREMENT_REQUIREMENTSET_IS_MET">
<Argument name="RequirementSetId">REQSET_UNIT_CLASS_INFANTRY</Argument>
</Requirement>In traditional database format:
<Requirements>
<Row RequirementId="REQ_MY_CHECK" RequirementType="REQUIREMENT_CITY_HAS_BUILDING"/>
</Requirements>
<RequirementArguments>
<Row RequirementId="REQ_MY_CHECK" Name="BuildingType" Value="BUILDING_GRANARY"/>
</RequirementArguments>
<RequirementSetRequirements>
<Row RequirementSetId="MY_REQUIREMENTS" RequirementId="REQ_MY_CHECK"/>
</RequirementSetRequirements>In GameEffects format:
<Modifier id="MY_MODIFIER" collection="COLLECTION_PLAYER_CITIES" effect="EFFECT_CITY_ADJUST_YIELD">
<SubjectRequirements type="REQUIREMENTSET_TEST_ALL">
<Requirement type="REQUIREMENT_CITY_HAS_BUILDING">
<Argument name="BuildingType">BUILDING_GRANARY</Argument>
</Requirement>
</SubjectRequirements>
<Argument name="YieldType">YIELD_FOOD</Argument>
<Argument name="Amount">2</Argument>
</Modifier>| RequirementSetId | Description |
|---|---|
REQSET_URBAN_PLOTS |
Urban or city center plots |
REQSET_RURAL_PLOTS |
Rural plots |
REQSET_ONLY_CITIES |
Full cities only |
REQSET_ONLY_TOWNS |
Towns only |
REQSET_BIOME_TUNDRA |
Tundra biome |
REQSET_UNIT_CLASS_INFANTRY |
Infantry units |
REQSET_UNIT_CLASS_MOUNTED |
Mounted units |
REQSET_UNIT_CLASS_NAVAL |
Naval units |
REQSET_PLAYER_IS_AI |
AI players |
REQSET_PLAYER_IS_MAJOR |
Major civilizations |