Hands-On Usage
Used in events or decisions following peace conference settlement to detect whether a state has been stacked with a demilitarization penalty, triggering corresponding follow-up logic such as notifying the player, restricting construction, or adjusting resistance values. The typical scenario is within the trigger block of a peace conference result handling event, combined with FROM chains to precisely locate the target state.
# State event after peace conference, checking if the state has been imposed with demilitarization stack
state_event = {
id = my_mod.101
trigger = {
FROM.FROM.FROM = {
pc_does_state_stack_demilitarized = yes
}
}
option = {
name = my_mod.101.a
FROM.FROM.FROM = {
add_resistance = 10
}
}
}
Synergy
[is_demilitarized_zone](/wiki/trigger/is_demilitarized_zone): Checks whether a state currently exists as a demilitarized zone. Combined with this trigger, it allows distinguishing between "just ruled demilitarized" and "already a demilitarized zone" conditions, preventing duplicate processing.
[set_demilitarized_zone](/wiki/effect/set_demilitarized_zone): After confirming the stacked ruling, use this effect to actually execute or reset the demilitarized zone flag, synchronizing peace conference rulings with map state.
[has_state_flag](/wiki/trigger/has_state_flag) / [set_state_flag](/wiki/effect/set_state_flag): Use flags in conjunction to prevent event re-triggering, ensuring that demilitarization stacking on the same state is processed only once.
[add_resistance](/wiki/effect/add_resistance): States forced into demilitarization typically come with high resistance values. Upon detecting this condition as true, immediately add resistance to simulate the reaction of local populations.
Common Pitfalls
- Incorrect
FROM chain nesting: This trigger is typically used in peace conference-related events, and the correct scope path often requires FROM.FROM.FROM to point to the target state. Calling it directly at the top level or at an incorrect nesting level will result in the scope not being STATE, causing the trigger to silently fail without error reporting.
- Confusion with
is_demilitarized_zone: pc_does_state_stack_demilitarized only returns true during the peace conference ruling stack phase; after the conference ends, this condition no longer applies. If you need to check demilitarization status during normal gameplay flow, use [is_demilitarized_zone](/wiki/trigger/is_demilitarized_zone) instead, or the condition will always be false.