Wiki

trigger · has_facility_specialization

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Checks if the country in scope has a facility with specialization.
ex:
SOV = {
	has_facility_specialization = specialization_nuclear
}

实战 · 配合 · 坑

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

实战用法

has_facility_specialization 常用于核武器或特殊科研 mod 中,判断某国是否已建立特定专业化设施(如核研究设施),从而解锁后续决议或国策。例如在一个核扩散 mod 里,可以用它作为决议的 available 条件,确保只有具备核专业化设施的国家才能触发相关事件:

available = {
    has_facility_specialization = specialization_nuclear
}

配合关系

  • [has_breakthrough_points](/wiki/trigger/has_breakthrough_points):核设施专业化往往与突破点机制并行,常一起检查国家是否同时满足设施与研究进度两个条件。
  • [has_completed_focus](/wiki/trigger/has_completed_focus):通常先完成特定国策才会解锁专业化设施,两者配合可构建更严格的前置条件链。
  • [add_breakthrough_points](/wiki/effect/add_breakthrough_points):在确认国家拥有该专业化设施后,作为奖励效果给予突破点,逻辑上形成"有设施 → 获得研究加速"的完整闭环。
  • [any_owned_state](/wiki/trigger/any_owned_state):若需进一步确认设施所在州省的具体情况,可嵌套州级触发器做更细粒度的判断。

常见坑

  1. Scope 错误:此 trigger 只能在 COUNTRY scope 下使用,新手容易误将其放在 STATE scope 的 limit 块中,导致脚本报错或条件永远不满足。
  2. 专业化名称拼写specialization_nuclear 等值必须与游戏内部定义完全一致,自行猜测或拼写错误时游戏不会报错但条件会始终返回假,排查困难。

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

has_facility_specialization is commonly used in nuclear weapons or specialized research mods to determine whether a nation has established a specific facility specialization (such as nuclear research facilities), thereby unlocking subsequent decisions or focuses. For example, in a nuclear proliferation mod, you can use it as an available condition for a decision to ensure only nations with nuclear facility specialization can trigger related events:

available = {
    has_facility_specialization = specialization_nuclear
}

Synergy

  • [has_breakthrough_points](/wiki/trigger/has_breakthrough_points): Nuclear facility specialization often operates in parallel with the breakthrough points mechanism, commonly checked together to verify a nation meets both facility and research progress conditions.
  • [has_completed_focus](/wiki/trigger/has_completed_focus): Typically a specific focus must be completed before unlocking facility specialization; combining the two constructs stricter prerequisite chains.
  • [add_breakthrough_points](/wiki/effect/add_breakthrough_points): After confirming a nation possesses this facility specialization, grant breakthrough points as a reward effect, logically forming a complete loop of "has facility → gains research acceleration".
  • [any_owned_state](/wiki/trigger/any_owned_state): If you need to further verify specific state conditions where the facility is located, nest state-level triggers for finer-grained evaluation.

Common Pitfalls

  1. Scope Error: This trigger can only be used under COUNTRY scope. Beginners often mistakenly place it in a limit block under STATE scope, causing script errors or conditions that never evaluate to true.
  2. Specialization Name Spelling: Values like specialization_nuclear must match the in-game definition exactly. Guessing or misspelling won't produce an error message, but the condition will always return false, making it difficult to debug.