Wiki

effect · set_demilitarized_zone

Definition

  • Supported scope:STATE
  • Supported target:none

Description

sets the demilitarized status for currently scoped state

Hands-On Notes

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.

Hands-On Usage

set_demilitarized_zone is commonly used in peace treaty mods, post-war settlement events, or conditionally triggered diplomatic systems to designate specific states as demilitarized zones, simulating real historical agreements (such as the Rhineland demilitarization). It can also be batch-processed within scripted_effect to handle multiple states, enabling "great power forced disarmament" gameplay mechanics.

# In a peace event option, set a state as a demilitarized zone
option = {
    name = peace_event.1.a
    # scope is already the target STATE
    set_demilitarized_zone = yes
    set_occupation_law = dmz_administration
}

Synergy

  • [is_demilitarized_zone](/wiki/trigger/is_demilitarized_zone) — Check whether the state is currently already a demilitarized zone before execution to avoid duplicate triggers or logical conflicts.
  • [remove_building](/wiki/effect/remove_building) / [damage_building](/wiki/effect/damage_building) — Demilitarized zones typically accompany the removal or destruction of military buildings; combining these effects can recreate historical disarmament clauses.
  • [add_state_modifier](/wiki/effect/add_state_modifier) — Stack a custom modifier simultaneously to add additional game mechanics penalties or bonuses to the demilitarized zone (such as reduced garrison costs).
  • [set_state_flag](/wiki/effect/set_state_flag) — Set a flag marker for subsequent events or decisions to detect via [has_state_flag](/wiki/trigger/has_state_flag) whether the state has been demilitarized, enabling multi-step story chains.

Common Pitfalls

  1. Incorrect scope: This effect must be called under STATE scope. If mistakenly written in COUNTRY scope (such as directly placed in a national event's immediate block without first switching scope), it will silently fail without necessarily producing log errors, making the effect non-functional and difficult to debug.
  2. Setting the flag but forgetting supporting logic: set_demilitarized_zone itself only changes the demilitarized zone flag; it does not automatically prevent construction or remove existing armies — players can still build and garrison troops in that state. This requires active restriction through decision/trigger logic; otherwise, the "demilitarized zone" becomes meaningless in gameplay.