trigger · is_coastal
Definition
- Supported scope:
STATE - Supported target:
none
Description
check if state is coastal
is_coastalSTATEnonecheck if state is coastal
Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.
is_coastal is commonly used to determine whether a state has access to the coast, and thus whether to permit naval base construction, trigger specific coastal events, or restrict the availability of certain decisions. For example, in a "Coastal Industrial Development" decision, it can be used to ensure players can only activate the decision in coastal states:
available = {
is_coastal = yes
is_controlled_by = ROOT
free_building_slots > 1
}
[is_capital](/wiki/trigger/is_capital): Check simultaneously whether a state is a capital to filter for the special case of "coastal capitals," commonly used in port capital-related event logic.[has_state_category](/wiki/trigger/has_state_category): Coastal checks typically need to be combined with state category classification to ensure construction or rewards only execute in sufficiently large coastal states.[add_building_construction](/wiki/effect/add_building_construction): After confirming a state is coastal, immediately trigger naval base or shipyard construction—the most direct companion effect pairing.[any_neighbor_state](/wiki/trigger/any_neighbor_state): Used to check whether adjacent states are also coastal; combined with is_coastal, it builds region connectivity verification logic.is_coastal = yes directly in condition blocks under COUNTRY scope, which causes script errors or prevents the trigger from ever firing. You must first switch to STATE scope via any_owned_state, every_state, etc. before using it.is_coastal only checks the geographic coastline attribute and does not guarantee the state already has a port or can immediately deploy a navy. Do not conflate this with building existence checks or omit additional checks like building_count_trigger.