Wiki

trigger · is_staging_coup

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

is_staging_coup = yes - Returns true if current country is staging a coup in another any country.

实战 · 配合 · 坑

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

实战用法

is_staging_coup 常用于防止在己方国家已经正在发动政变期间触发某些外交或情报类决策,避免逻辑冲突。例如在自定义情报 mod 中,可以用它锁住"发动另一场政变"的决策,确保同一时间只能针对一个目标运作。

# 某情报决策的 available 块 —— 禁止在己方已策划政变时再次触发
available = {
    NOT = { is_staging_coup = yes }
    has_country_flag = intelligence_network_ready
}

配合关系

  • [has_civil_war](/wiki/trigger/has_civil_war):政变成功后往往引发内战,二者常在同一 trigger 块中组合,用于判断当前局势是否已经"进入热战阶段",从而屏蔽重复操作。
  • [civilwar_target](/wiki/trigger/civilwar_target):用于进一步确认当前国家的政变目标是哪个国家,与 is_staging_coup 一起使用可构成"正在对 X 国发动政变"的精确判断。
  • [has_country_flag](/wiki/trigger/has_country_flag):常配合自定义 flag 一起使用,在政变流程的各阶段设置/检查标记,is_staging_coup 则作为双重保险确认游戏原生状态。
  • [any_operative_leader](/wiki/trigger/any_operative_leader):政变行动依赖特工,常与此 trigger 联用,确保在尝试政变前国家拥有可用的特工资源。

常见坑

  1. 误以为支持 target 指向:该 trigger 不接受任何目标参数(target 为 none),只能写 is_staging_coup = yes,不能写成 is_staging_coup = GER 之类的形式,否则会解析报错或静默失效。
  2. Scope 混用:此 trigger 只能在 COUNTRY scope 下使用,若写在 STATE 或 CHARACTER scope(如某些特工事件的 unit_leader scope 块)中,条件会静默返回 false,导致逻辑永远不满足,排查时容易被忽视。

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

is_staging_coup is commonly used to prevent certain diplomatic or intelligence decisions from triggering while your country is already staging a coup, avoiding logical conflicts. For example, in custom intelligence mods, you can use it to lock the "stage another coup" decision, ensuring only one target can be acted upon at a time.

# available block of a certain intelligence decision — prevent triggering another coup while one is already planned for this country
available = {
    NOT = { is_staging_coup = yes }
    has_country_flag = intelligence_network_ready
}

Synergy

  • [has_civil_war](/wiki/trigger/has_civil_war): A successful coup often triggers civil war; the two are frequently combined in the same trigger block to determine whether the situation has already "entered hot conflict phase," thus preventing duplicate operations.
  • [civilwar_target](/wiki/trigger/civilwar_target): Used to further confirm which country is the target of the current country's coup; used together with is_staging_coup, it can form the precise judgment of "staging a coup against country X."
  • [has_country_flag](/wiki/trigger/has_country_flag): Commonly used alongside custom flags, setting/checking markers at various stages of the coup process; is_staging_coup serves as a double-check confirmation of the game's native state.
  • [any_operative_leader](/wiki/trigger/any_operative_leader): Coup operations rely on operatives; frequently combined with this trigger to ensure the country has available operative resources before attempting a coup.

Common Pitfalls

  1. Mistakenly assuming target parameter support: This trigger does not accept any target parameters (target is none); you can only write is_staging_coup = yes, not forms like is_staging_coup = GER, otherwise it will cause parsing errors or silent failures.
  2. Scope confusion: This trigger can only be used within COUNTRY scope; if written in STATE or CHARACTER scope (such as operand scope blocks in certain operative events), the condition will silently return false, causing the logic to never be satisfied and making it easy to overlook during debugging.