Wiki

trigger · is_in_tech_sharing_group

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Checks if country is member specified technology sharing group.
Example: is_in_technology_sharing_group = commonwealth_research

实战 · 配合 · 坑

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

实战用法

常见于科技共享联盟的条件门控场景,例如判断某国是否加入了玩家自定义的研究共享组,从而解锁专属决策、国策或顾问。典型用法是在 availabletrigger 块中限制某项收益只对组内成员生效。

# 示例:某决策仅对科技共享组成员开放
some_decision = {
    available = {
        is_in_tech_sharing_group = commonwealth_research
    }
    cost = 50
    ...
}

配合关系

  • [add_to_tech_sharing_group](/wiki/effect/add_to_tech_sharing_group):将国家加入指定共享组,与本 trigger 配合形成"加入组→验证成员资格"的完整逻辑闭环。
  • [has_completed_focus](/wiki/trigger/has_completed_focus):常在国策完成后才允许加入科技组,两者组合可以双重限制某项奖励的触发条件。
  • [add_tech_bonus](/wiki/effect/add_tech_bonus):确认成员资格后给予科研加成,是共享组成员专属奖励的常见发放手段。
  • [any_allied_country](/wiki/trigger/any_allied_country):遍历盟友时配合本 trigger,可以统计或筛选盟友中有多少国家属于同一共享组。

常见坑

  1. 组名大小写与定义必须完全一致is_in_tech_sharing_group 的值是字符串 key,需与 technology_sharing_group 定义文件中的组名完全匹配,哪怕一个字符不同也会静默失败(返回 false),且游戏不会报错提示。
  2. 误用在非 COUNTRY scope 下:该 trigger 只支持 COUNTRY scope,若写在 STATE 或 CHARACTER 的条件块内会导致逻辑不生效,调试时需确认当前 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 seen in technology sharing alliance scenarios, such as checking whether a country has joined a player-defined research sharing group to unlock exclusive decisions, national focuses, or advisors. Typical usage involves restricting certain benefits to group members only within available or trigger blocks.

# Example: A decision available only to tech sharing group members
some_decision = {
    available = {
        is_in_tech_sharing_group = commonwealth_research
    }
    cost = 50
    ...
}

Synergy

  • [add_to_tech_sharing_group](/wiki/effect/add_to_tech_sharing_group): Adds a country to a specified sharing group; paired with this trigger, it forms a complete logic loop of "join group → verify membership".
  • [has_completed_focus](/wiki/trigger/has_completed_focus): Often used to allow joining a tech group only after completing a focus; combining the two creates dual-layer restrictions on reward triggers.
  • [add_tech_bonus](/wiki/effect/add_tech_bonus): Awards research bonuses after confirming membership; a common method for distributing exclusive rewards to sharing group members.
  • [any_allied_country](/wiki/trigger/any_allied_country): When iterating through allies with this trigger, you can count or filter how many allied countries belong to the same sharing group.

Common Pitfalls

  1. Group name casing and definition must match exactly: The value of is_in_tech_sharing_group is a string key that must match the group name in the technology_sharing_group definition file precisely. Even a single character difference will cause a silent failure (returns false) with no error message from the game.
  2. Mistaken use outside COUNTRY scope: This trigger only supports COUNTRY scope; placing it in STATE or CHARACTER condition blocks will result in non-functional logic. During debugging, ensure the current scope has been switched to the target country.