Wiki

effect · steal_random_tech_bonus

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

adds a random limited use tech bonus from country of categories that is it ahead in compared to you.
it must have atleast one category or folder. But it can contain any number of them in any combination
Note: if a country does not have a tech to be stolen a random tech bonus will be applied based on base_bonus 
Example: steal_random_tech_bonus = {
	category = air_equipment
	folder = naval_folder
	ahead_reduction = ???
	bonus = ???
	base_bonus = 0.05
	instant = yes # instant unlock instead of bonus
	dynamic = yes # swaps bonus types from instant to category dependig on type as well as uses weights on tech progress
	name = ???
	target = ???
	uses = 1
}

实战 · 配合 · 坑

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

实战用法

steal_random_tech_bonus 常用于谍报、间谍行动或特殊国策场景,模拟从技术领先国家"窃取"科研成果的玩法。例如在一个情报组织升级事件中,让玩家对选定目标国触发科技窃取效果,并限制使用次数以防止滥用。

# 间谍行动成功事件 option 中
country_event = {
    id = spy_operation.5
    option = {
        name = spy_operation.5.a
        steal_random_tech_bonus = {
            category = armor
            category = infantry_weapons
            base_bonus = 0.10
            uses = 1
            dynamic = yes
            name = stolen_tech_bonus
            target = FROM
        }
    }
}

配合关系

  • [has_completed_focus](/wiki/trigger/has_completed_focus):常用于判断是否完成了"间谍网络"或"情报机构"相关国策,满足条件后才允许触发窃取效果,保持逻辑合理性。
  • [add_tech_bonus](/wiki/effect/add_tech_bonus):作为备用或补充手段,当目标国技术差距不足、steal_random_tech_bonus 无法产生理想效果时,可用固定加成兜底。
  • [compare_intel_with](/wiki/trigger/compare_intel_with):在触发窃取前判断己方对目标国的情报等级,情报足够才能成功执行窃取,增强真实感。
  • [add_opinion_modifier](/wiki/effect/add_opinion_modifier):窃取科技成功后同步对目标国施加关系惩罚,模拟外交摩擦后果。

常见坑

  1. 忘记提供至少一个 categoryfolder:该 effect 强制要求至少声明一个科技分类或文件夹,若两者都省略则脚本报错无法正常执行,新手容易在复制模板时漏掉这一必填项。
  2. 误以为 target 可以省略或填普通国家标签target 需指向一个合法的 scope 内国家引用(如 FROMROOT 等),直接填写国家标签字符串通常不会按预期工作,且若目标国在该分类下无领先技术,效果会自动回退到 base_bonus,务必设置合理的 base_bonus 防止效果完全落空。

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

steal_random_tech_bonus is commonly used in espionage, spy operations, or special focus scenarios to simulate the gameplay of "stealing" research achievements from technologically advanced nations. For example, in an intelligence organization upgrade event, you can trigger a technology theft effect on a selected target country and limit usage frequency to prevent abuse.

# Successful spy operation event option
country_event = {
    id = spy_operation.5
    option = {
        name = spy_operation.5.a
        steal_random_tech_bonus = {
            category = armor
            category = infantry_weapons
            base_bonus = 0.10
            uses = 1
            dynamic = yes
            name = stolen_tech_bonus
            target = FROM
        }
    }
}

Synergy

  • [has_completed_focus](/wiki/trigger/has_completed_focus): Commonly used to check whether a "spy network" or "intelligence agency" related focus has been completed; the theft effect is only allowed to trigger when the condition is satisfied, maintaining logical consistency.
  • [add_tech_bonus](/wiki/effect/add_tech_bonus): Serves as a backup or supplementary measure; when the target country's technology gap is insufficient and steal_random_tech_bonus cannot produce the desired effect, a fixed bonus can be used as a fallback.
  • [compare_intel_with](/wiki/trigger/compare_intel_with): Before triggering the theft, assess your intelligence level on the target country; successful theft can only be executed with sufficient intelligence, enhancing realism.
  • [add_opinion_modifier](/wiki/effect/add_opinion_modifier): After successful technology theft, simultaneously apply diplomatic penalties to the target country to simulate the consequences of diplomatic friction.

Common Pitfalls

  1. Forgetting to provide at least one category or folder: This effect mandates declaring at least one technology category or folder; omitting both will cause a script error and prevent normal execution. Newcomers often overlook this required field when copying templates.
  2. Mistakenly believing target can be omitted or filled with a regular country tag: target must point to a valid country reference within scope (such as FROM, ROOT, etc.); directly entering a country tag string usually won't work as expected. Moreover, if the target country has no leading technology in that category, the effect automatically falls back to base_bonus. Be sure to set a reasonable base_bonus to prevent the effect from being completely wasted.