Wiki

trigger · has_collaboration

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

checks the collaboration in a target country with our currently scoped country. Example: 
has_collaboration = { 
 target = GER
 value > 0.5
} 
#or has_collaboration@GER as variable

实战 · 配合 · 坑

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

实战用法

has_collaboration 常见于间谍/情报 mod 中,用于检测某个国家对我方的合作度是否达到阈值,从而解锁特殊决策、外交选项或事件分支——例如当目标国对我方合作度超过某值时,才允许触发傀儡化或政权更迭的相关流程。

# 仅当法国对德国合作度超过 50% 时,允许该决策可用
available = {
    has_collaboration = {
        target = FRA
        value > 0.5
    }
}

配合关系

  • [has_country_flag](/wiki/trigger/has_country_flag):常用于搭配合作度检查,确保某段剧情或前置步骤已经完成,再叠加合作度门槛,避免玩家跳过剧情直接触发。
  • [add_collaboration](/wiki/effect/add_collaboration):合作度检查的天然搭配——用 trigger 检测是否达标,再用 effect 在事件或决策中进一步提升合作度,形成阶梯式推进逻辑。
  • [exists](/wiki/trigger/exists):在检测合作度之前先确认目标国家仍然存在于游戏中,防止目标已被吞并时脚本报错或产生非预期行为。
  • [has_completed_focus](/wiki/trigger/has_completed_focus):常与合作度检查并列,要求玩家同时完成特定国策才能解锁高合作度带来的奖励,增加博弈深度。

常见坑

  1. 漏写 target 字段has_collaboration 必须明确指定 target,若省略则脚本无法正确解析,容易被误当成语法错误忽略;@ 简写语法(has_collaboration@GER)只能在变量比较上下文中使用,不可随意混用于普通 trigger 块。
  2. Scope 方向搞反:该 trigger 检测的是「目标国对当前 scope 国的合作度」,而非反向。新手常将 scope 与 target 的主客关系写反,导致检测的合作度方向与预期相反,触发条件完全失效。

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_collaboration is commonly used in spy/intelligence mods to check whether a target country's collaboration level with you meets a threshold, thereby unlocking special decisions, diplomatic options, or event branches—for example, allowing puppet state or regime change processes to trigger only when the target nation's collaboration with you exceeds a certain value.

# Only enable this decision when France's collaboration with Germany exceeds 50%
available = {
    has_collaboration = {
        target = FRA
        value > 0.5
    }
}

Synergy

  • [has_country_flag](/wiki/trigger/has_country_flag): Commonly paired with collaboration checks to ensure a story segment or prerequisite step has been completed before stacking the collaboration threshold, preventing players from skipping narrative content to trigger effects directly.
  • [add_collaboration](/wiki/effect/add_collaboration): The natural pairing for collaboration checks—use triggers to verify the threshold is met, then use effects to further increase collaboration in events or decisions, creating a stepped progression logic.
  • [exists](/wiki/trigger/exists): Confirm the target nation still exists in the game before checking collaboration, preventing script errors or unexpected behavior when the target has already been annexed.
  • [has_completed_focus](/wiki/trigger/has_completed_focus): Often used alongside collaboration checks, requiring players to complete specific national focuses to unlock rewards from high collaboration, adding strategic depth.

Common Pitfalls

  1. Missing the target field: has_collaboration must explicitly specify target; omitting it causes the script to fail parsing and is easily mistaken for a syntax error. The @ shorthand syntax (has_collaboration@GER) can only be used in variable comparison contexts and should not be arbitrarily mixed with regular trigger blocks.
  2. Reversing the scope direction: This trigger checks "the target nation's collaboration with the current scope nation," not the reverse. Beginners often flip the agent-target relationship between scope and target, causing the collaboration direction checked to be opposite from expectations and breaking the trigger entirely.