Wiki

trigger · is_special_project_completed

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Checks if the country in scope has completed the special project in input.
ex:
SOV = {
	is_special_project_completed = sp:my_project
	is_special_project_completed = var:my_project_var
	is_special_project_completed = PREV # accepts variables and keywords
}

实战 · 配合 · 坑

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

实战用法

常用于科技或决策的解锁条件判断,例如在核武器或特殊项目研究体系 mod 中,检查某国是否已完成特定特殊项目,从而开放后续决策、国策或事件分支。典型场景是在 availabletrigger 块里把它作为前置门槛,确保玩家按顺序推进研究进度。

available = {
    is_special_project_completed = sp:manhattan_project_sp
}

配合关系

  • [has_completed_focus](/wiki/trigger/has_completed_focus) — 常与国策完成判断并列,共同构成"完成某国策 完成某特殊项目"的复合解锁条件。
  • [complete_special_project](/wiki/effect/complete_special_project) — 在 effect 块中强制完成特殊项目后,后续逻辑往往需要用本 trigger 来校验状态是否真正写入,避免重复触发。
  • [has_country_flag](/wiki/trigger/has_country_flag) — 配合国家标记一起使用,用于区分"已触发过后续奖励"与"项目刚完成"两种状态,防止重复授予效果。
  • [any_owned_state](/wiki/trigger/any_owned_state) — 在需要检查某省份建筑或驻军条件时,与本 trigger 组合确保特殊项目已完成才进一步遍历州。

常见坑

  1. sp: 前缀不可省略:直接写项目名(如 is_special_project_completed = my_project)而非 sp:my_project 会导致游戏无法识别目标,条件永远为假且不报错,极难排查。
  2. scope 必须是 COUNTRY:将此 trigger 写在 STATE 或 CHARACTER scope 内(例如放在 any_owned_state 的子块里)会导致判断失效,需要先用 OWNERcapital_scope 等方式切回国家 scope 再调用。

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

Commonly used to check unlock conditions for technologies or decisions, such as in mods featuring nuclear weapons or special project research systems. Typical use cases include verifying whether a country has completed a specific special project to unlock subsequent decisions, national focuses, or event branches. It is typically used as a prerequisite gate within available or trigger blocks to ensure players progress through the research sequence in order.

available = {
    is_special_project_completed = sp:manhattan_project_sp
}

Synergy

  • [has_completed_focus](/wiki/trigger/has_completed_focus) — Often paired with national focus completion checks to form composite unlock conditions like "completed national focus and completed special project."
  • [complete_special_project](/wiki/effect/complete_special_project) — After forcibly completing a special project in an effect block, subsequent logic typically uses this trigger to verify that the state change has actually been persisted, preventing duplicate triggering.
  • [has_country_flag](/wiki/trigger/has_country_flag) — Used alongside country flags to distinguish between "reward already triggered" and "project just completed" states, preventing duplicate reward grants.
  • [any_owned_state](/wiki/trigger/any_owned_state) — When checking state buildings or garrison conditions in combination with this trigger, it ensures the special project is completed before further iterating through states.

Common Pitfalls

  1. The sp: prefix is mandatory — Writing just the project name directly (e.g., is_special_project_completed = my_project) instead of sp:my_project causes the game to fail to recognize the target, making the condition always evaluate to false without error reporting, making it extremely difficult to debug.
  2. Scope must be COUNTRY — Using this trigger within STATE or CHARACTER scope (for example, placing it inside an any_owned_state sub-block) causes the check to fail. You must first switch back to country scope using methods like OWNER or capital_scope before calling this trigger.