Wiki

effect · modify_tech_sharing_bonus

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Modify country bonus for specified technology sharing group.
Example: modify_tech_sharing_bonus  = { id = commonwealth_research bonus = 0.2 }

实战 · 配合 · 坑

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

实战用法

modify_tech_sharing_bonus 常用于 mod 中动态调整某个科技共享组的收益,例如当玩家完成某个国策或达成特定条件时,奖励其在英联邦研究组内获得更高的科技分享加成。它也常见于事件触发后临时提升或削减盟国之间的研究共享效率,以模拟合作关系的深化或破裂。

# 完成国策后提升英联邦科技共享加成
focus = {
    id = strengthen_commonwealth_research
    ...
    completion_reward = {
        modify_tech_sharing_bonus = {
            id = commonwealth_research
            bonus = 0.2
        }
    }
}

配合关系

  • [add_to_tech_sharing_group](/wiki/effect/add_to_tech_sharing_group):通常先将国家加入某个科技共享组,再用本命令调整该组的加成幅度,两者构成"入组 + 强化"的完整流程。
  • [add_tech_bonus](/wiki/effect/add_tech_bonus):当共享加成不足以覆盖某项关键科技时,可额外叠加一次性科研奖励,作为补充手段。
  • [has_completed_focus](/wiki/trigger/has_completed_focus):常作为事件或决策的触发条件,判断玩家是否完成了对应的合作国策,再决定是否执行本命令以给予加成。
  • [add_ideas](/wiki/effect/add_ideas):可同步添加一个带有科技共享相关修正的 idea,与本命令共同构成多层次的研究加成体系。

常见坑

  1. id 填错或不存在id 必须对应游戏或 mod 中已定义的科技共享组名称(在 technology_sharing_groups 里声明),若填写了不存在的组名,命令会静默失败且不报错,加成不会生效,非常难以排查。
  2. 重复叠加无上限意识:多次触发同一事件或国策时,本命令的 bonus 会累计叠加,新手容易忘记设置 has_country_flag 等保护条件,导致加成被反复追加到异常数值。

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

modify_tech_sharing_bonus is commonly used in mods to dynamically adjust the research sharing benefits of a specific technology sharing group. For example, when a player completes a national focus or meets certain conditions, it can reward them with higher technology sharing bonuses within the Commonwealth research group. It is also frequently seen in event triggers that temporarily increase or decrease research sharing efficiency among allies, simulating the deepening or breakdown of cooperative relationships.

# Increase Commonwealth tech sharing bonus after completing a focus
focus = {
    id = strengthen_commonwealth_research
    ...
    completion_reward = {
        modify_tech_sharing_bonus = {
            id = commonwealth_research
            bonus = 0.2
        }
    }
}

Synergy

  • [add_to_tech_sharing_group](/wiki/effect/add_to_tech_sharing_group): Usually first adds a country to a technology sharing group, then uses this command to adjust the group's bonus magnitude. Together they form a complete "join group + strengthen" workflow.
  • [add_tech_bonus](/wiki/effect/add_tech_bonus): When the shared bonus is insufficient to cover a critical technology, an additional one-time research award can be stacked as a supplementary measure.
  • [has_completed_focus](/wiki/trigger/has_completed_focus): Commonly serves as a trigger condition for events or decisions to determine whether the player has completed the corresponding cooperative national focus, then decides whether to execute this command to grant the bonus.
  • [add_ideas](/wiki/effect/add_ideas): Can simultaneously add an idea with technology sharing-related modifiers, working together with this command to form a multi-layered research bonus system.

Common Pitfalls

  1. Incorrect or non-existent id: The id must correspond to an already-defined technology sharing group name in the game or mod (declared in technology_sharing_groups). If a non-existent group name is entered, the command will silently fail without error reporting, and the bonus will not take effect—making it extremely difficult to debug.
  2. Accumulation without limit awareness: When the same event or focus is triggered multiple times, the bonus from this command will stack cumulatively. Beginners often forget to set protective conditions like has_country_flag, causing the bonus to be repeatedly added to abnormal values.