Wiki

trigger · pc_does_state_stack_demilitarized

Definition

  • Supported scope:STATE
  • Supported target:none

Description

Checks if state got demilitarized stacked on it in the peace conference.
Example:
FROM.FROM.FROM = { pc_does_state_stack_demilitarized = yes }

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

在和平会议结算后的事件或决策中,用于检测某个州是否被叠加了非军事区惩罚,从而触发相应的后续逻辑,例如通知玩家、限制建造或调整抵抗值。典型场景是在和平会议结果处理事件的 trigger 块中,结合 FROM 链精确定位目标州。

# 和平会议后的州事件,检查该州是否被施加了非军事化叠加
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
        }
    }
}

配合关系

  • [is_demilitarized_zone](/wiki/trigger/is_demilitarized_zone):检查州当前是否已经处于非军事区状态,与本 trigger 结合可以区分"刚被裁决非军事化"和"早已是非军事区"两种情形,避免重复处理。
  • [set_demilitarized_zone](/wiki/effect/set_demilitarized_zone):在确认叠加裁决后,用此 effect 实际执行或重置非军事区标记,实现和平会议裁决与地图状态同步。
  • [has_state_flag](/wiki/trigger/has_state_flag) / [set_state_flag](/wiki/effect/set_state_flag):配合标记位防止事件重复触发,确保同一州的非军事化叠加只被处理一次。
  • [add_resistance](/wiki/effect/add_resistance):被强制非军事化的州往往伴随高抵抗值,检测到本条件为真后立即叠加抵抗,模拟当地民众的反应。

常见坑

  1. FROM 链层级写错:本 trigger 通常在和平会议相关事件中使用,正确的 scope 路径往往需要 FROM.FROM.FROM 才能指向目标州,直接在顶层或错误层级调用会导致 scope 不是 STATE,触发器静默失败且不报错。
  2. is_demilitarized_zone 混淆pc_does_state_stack_demilitarized 仅在和平会议裁决叠加阶段为真,会议结束后该条件不再成立;若需要在常规游戏流程中判断非军事区状态,应改用 [is_demilitarized_zone](/wiki/trigger/is_demilitarized_zone),否则条件永远为假。

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

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

  1. 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.
  2. 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.