trigger · is_demilitarized_zone
Definition
- Supported scope:
STATE - Supported target:
any
Description
checks if a state is a demilitarized zone
is_demilitarized_zoneSTATEanychecks if a state is a demilitarized zone
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_demilitarized_zone is commonly used in occupation, diplomacy, or peace treaty mods to detect whether a state is demilitarized, allowing you to decide whether to permit garrison, military construction, or trigger specific events. For example, once a state is demilitarized, you can restrict certain player actions in that state or trigger corresponding AI logic.
# In the available block of a decision, restrict activation to demilitarized zones only
available = {
ROOT = {
is_demilitarized_zone = yes
}
}
[set_demilitarized_zone](/wiki/effect/set_demilitarized_zone): The most direct complementary effect, used to set or unset a state's demilitarized status, forming a "set-check" loop with this trigger.[has_state_flag](/wiki/trigger/has_state_flag): Demilitarization is often accompanied by custom flags marking special agreements or treaties; using both together enables more precise conditional logic.[is_controlled_by](/wiki/trigger/is_controlled_by): Demilitarized zones typically involve control issues; combined use distinguishes between "enemy-controlled demilitarized zone" and "normal demilitarized zone" scenarios.[building_count_trigger](/wiki/trigger/building_count_trigger): Can be used to verify whether demilitarization constraints are being respected—if military buildings still exist in the state, it triggers breach logic.any_state / capital_scope or similar.add_state_modifier will make this trigger return yes; in reality, only the built-in flag set through set_demilitarized_zone = yes is correctly recognized by this trigger.