trigger · num_tech_sharing_groups
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
checks how many groups a nation is a member of
num_tech_sharing_groupsCOUNTRYnonechecks how many groups a nation is a member of
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
num_tech_sharing_groups 常用于限制某些国策或决议的可用条件,例如"只有当国家尚未加入任何技术共享组时才能触发某外交事件",或"加入第二个共享组前必须满足特定门槛"。下面示例中,只有当该国所在共享组数量少于 1 时,才允许激活某决议:
available = {
num_tech_sharing_groups < 1
}
也可以反向判断,确认国家已身处至少一个共享组后才解锁相关科技加成决议:
trigger = {
num_tech_sharing_groups > 0
}
[add_to_tech_sharing_group](/wiki/effect/add_to_tech_sharing_group):最直接的搭档,先用 num_tech_sharing_groups 判断当前成员资格数量,再决定是否执行加入操作,避免重复加入同类组。[has_completed_focus](/wiki/trigger/has_completed_focus):常与之组合,要求国家完成特定国策且尚未饱和技术共享名额,才能解锁进阶外交路线。[any_allied_country](/wiki/trigger/any_allied_country):用于检查盟友中是否有人与自己同在某共享组,配合 num_tech_sharing_groups 可构建"共享组外交网络"相关的复合条件。[amount_research_slots](/wiki/trigger/amount_research_slots):技术共享通常与研究槽位一同评估,两者配合可设计"研究能力越强、共享组门槛越高"的平衡机制。num_tech_sharing_groups < 1 写成 num_tech_sharing_groups = 0——后者在部分版本或特定解析上可能不如前者稳健,建议统一使用数值比较运算符(<、>、>等)而非 = 来做数量判断,以避免边界行为不一致。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.
num_tech_sharing_groups is commonly used to restrict the availability conditions of certain focuses or decisions, such as "trigger a diplomatic event only if the country has not yet joined any tech sharing group" or "specific thresholds must be met before joining a second sharing group". In the example below, a decision is only allowed to activate when the country belongs to fewer than 1 sharing group:
available = {
num_tech_sharing_groups < 1
}
You can also use reverse logic to confirm that a country is already in at least one sharing group before unlocking related tech bonus decisions:
trigger = {
num_tech_sharing_groups > 0
}
[add_to_tech_sharing_group](/wiki/effect/add_to_tech_sharing_group): The most direct partner; first use num_tech_sharing_groups to check the current membership count, then decide whether to execute the join operation, avoiding duplicate entries into the same type of group.[has_completed_focus](/wiki/trigger/has_completed_focus): Commonly combined with this trigger, requiring a country to have completed a specific focus and not yet saturated its tech sharing slots before unlocking advanced diplomatic paths.[any_allied_country](/wiki/trigger/any_allied_country): Used to check if any ally is in the same sharing group, and combined with num_tech_sharing_groups can construct composite conditions related to "tech sharing diplomatic networks".[amount_research_slots](/wiki/trigger/amount_research_slots): Tech sharing is typically evaluated alongside research slots; the two together can design balancing mechanisms like "stronger research capacity, higher sharing group thresholds".num_tech_sharing_groups < 1 as num_tech_sharing_groups = 0—the latter may be less robust in certain game versions or specific parsing scenarios. It's recommended to consistently use numerical comparison operators (<, >, ≥, etc.) rather than = for quantity checks, to avoid inconsistent boundary behavior.