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
- 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.
- 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.