Wiki

effect · add_to_tech_sharing_group

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Adds country to technology sharing group of specified name.
Example: add_to_tech_sharing_group = commonwealth_research

实战 · 配合 · 坑

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

实战用法

add_to_tech_sharing_group 常用于 mod 中构建自定义科技共享联盟,例如让玩家在完成某个国策后加入一个区域研究圈,或在建立阵营时自动共享科技。典型场景包括大英国协各成员国共享科研、轴心国特定国家加入专属研究组等。

# 国策完成后,将本国加入"pacific_co_prosperity"科技共享组
focus = {
    id = JOIN_COPROSPERITY_RESEARCH
    ...
    completion_reward = {
        add_to_tech_sharing_group = pacific_co_prosperity
        add_research_slot = 1
    }
}

配合关系

  • [add_to_faction](/wiki/effect/add_to_faction) — 通常与加入阵营同步触发,让新成员既加入军事同盟又进入科技共享圈,逻辑上保持一致。
  • [add_research_slot](/wiki/effect/add_research_slot) — 加入科技共享组后往往附带研究槽奖励,强化"加入联盟有科研收益"的设计感。
  • [add_ideas](/wiki/effect/add_ideas) — 可配合添加一个代表"共同研究协定"的国策理念,让玩家在 UI 上看到加入共享组的持续效果提示。
  • [has_completed_focus](/wiki/trigger/has_completed_focus) — 作为前置条件判断,确保只有完成特定国策的国家才能触发此效果,避免过早加入。

常见坑

  1. 组名不一致导致共享失效add_to_tech_sharing_group 填写的字符串必须与其他国家使用的组名完全一致(大小写敏感),哪怕一个下划线或字母不同,两国就会处于不同的组,共享完全无效且不报错,极难排查。
  2. 误以为可以移除:该 effect 只有添加操作,没有对应的 remove_from_tech_sharing_group;若需要实现"退出共享组"的逻辑,必须通过其他机制(如移除触发共享的 idea)绕行,直接尝试反向操作会无效。

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

add_to_tech_sharing_group is commonly used in mods to establish custom tech-sharing alliances—for example, allowing players to join a regional research circle upon completing a focus, or automatically sharing tech when forming a faction. Typical scenarios include Commonwealth members sharing research, or Axis-aligned nations joining exclusive research groups.

# Upon focus completion, add this nation to the "pacific_co_prosperity" tech sharing group
focus = {
    id = JOIN_COPROSPERITY_RESEARCH
    ...
    completion_reward = {
        add_to_tech_sharing_group = pacific_co_prosperity
        add_research_slot = 1
    }
}

Synergy

  • [add_to_faction](/wiki/effect/add_to_faction) — Typically triggered simultaneously with faction membership, allowing new members to both join the military alliance and enter the tech-sharing circle in a logically consistent manner.
  • [add_research_slot](/wiki/effect/add_research_slot) — Joining a tech-sharing group often comes with research slot bonuses, reinforcing the design intention that "alliance membership yields research benefits."
  • [add_ideas](/wiki/effect/add_ideas) — Can be paired with adding a national spirit representing a "joint research agreement," so players see persistent effect notifications in the UI when joining the sharing group.
  • [has_completed_focus](/wiki/trigger/has_completed_focus) — Serves as a prerequisite condition to ensure only nations that have completed a specific focus trigger this effect, preventing premature entry.

Common Pitfalls

  1. Group name mismatch breaks sharing: The string passed to add_to_tech_sharing_group must match exactly (case-sensitive) with the group name used by other nations. A single underscore or letter difference will place two nations in separate groups, rendering sharing completely ineffective with no error message—making it extremely difficult to debug.
  2. Mistaking it for a reversible operation: This effect only adds nations to groups; there is no corresponding remove_from_tech_sharing_group command. If you need to implement "leaving a sharing group" logic, you must work around it through other mechanisms (such as removing the idea that triggers the sharing). Attempting a direct reverse operation will have no effect.