Wiki

effect · set_collaboration

Definition

  • Supported scope:COUNTRY
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

Sets the collaboration in a target country with our currently scoped country
GER = {
  set_collaboration = {
    target = POL
    value = 0.3
  }
}

实战 · 配合 · 坑

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

实战用法

set_collaboration 常用于谍报/渗透类 mod 场景,例如在某国完成特定国策或决议后,直接将目标国的合作度固定到某个数值,而非依赖自然增长。与 add_collaboration 不同,它是直接赋值而非累加,适合用于初始化合作度或在剧本事件中强制重置到特定阶段。

# 德国完成"渗透波兰"国策后,强制将对波兰的合作度设为 30%
focus = {
    id = GER_infiltrate_POL
    # ...
    completion_reward = {
        GER = {
            set_collaboration = {
                target = POL
                value = 0.3
            }
        }
    }
}

配合关系

  • [has_collaboration](/wiki/trigger/has_collaboration):在 set 之前或之后用来检查合作度是否已达阈值,决定是否触发后续选项或事件。
  • [add_collaboration](/wiki/effect/add_collaboration):两者结合可实现"先重置到基准值,再按需叠加"的精确控制逻辑。
  • [activate_targeted_decision](/wiki/effect/activate_targeted_decision):合作度到达特定值后解锁针对目标国的专属决议,形成完整的渗透推进链。
  • [add_opinion_modifier](/wiki/effect/add_opinion_modifier):合作度重置往往伴随外交关系的同步调整,两者配合保持叙事一致性。

常见坑

  1. scope 填错对象:效果由"当前 scope 国家"对"target 国家"设定合作度,scope 必须是施动方(如 GER),target 才是被渗透方(如 POL)。新手常把两者写反,导致合作度挂在错误方向上,游戏内完全不生效或影响错误的双边关系。
  2. add_collaboration 混用逻辑混乱set_collaboration 是赋值覆盖,若在同一执行块中先 set 再 add,最终值是 set 的基础加上 add 的增量,而非两次独立操作的叠加;理清执行顺序才能得到预期数值。

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

set_collaboration is commonly used in espionage/infiltration-themed mod scenarios, such as directly setting a target nation's collaboration to a specific value after the player completes a particular national focus or decision, rather than relying on organic growth. Unlike add_collaboration, it performs a direct assignment rather than addition, making it ideal for initializing collaboration values or force-resetting to a specific stage in scripted events.

# After Germany completes the "Infiltrate Poland" focus, forcibly set collaboration with Poland to 30%
focus = {
    id = GER_infiltrate_POL
    # ...
    completion_reward = {
        GER = {
            set_collaboration = {
                target = POL
                value = 0.3
            }
        }
    }
}

Synergy

  • [has_collaboration](/wiki/trigger/has_collaboration): Use before or after set to check whether collaboration has reached a threshold, determining whether to trigger subsequent options or events.
  • [add_collaboration](/wiki/effect/add_collaboration): Combining both enables "reset to baseline, then stack additively as needed" precision control logic.
  • [activate_targeted_decision](/wiki/effect/activate_targeted_decision): When collaboration reaches a specific value, unlock exclusive decisions targeting that nation, forming a complete infiltration progression chain.
  • [add_opinion_modifier](/wiki/effect/add_opinion_modifier): Resetting collaboration often accompanies synchronized adjustments to diplomatic relations; pairing both maintains narrative consistency.

Common Pitfalls

  1. Incorrect scope assignment: The effect sets collaboration from the "current scope nation" toward the "target nation", so the scope must be the actor (e.g., GER), and target must be the infiltrated nation (e.g., POL). Beginners often reverse the two, causing collaboration to apply in the wrong direction, resulting in complete ineffectiveness or impact on the wrong bilateral relationship in-game.
  2. Logic confusion when mixing with add_collaboration: set_collaboration is an assignment override; if you set then add within the same execution block, the final value is the set baseline plus the add increment, not two independent operations stacking separately. Clarify execution order to achieve the intended value.