Wiki

effect · add_nuclear_bombs

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

add nukes to country

实战 · 配合 · 坑

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

实战用法

add_nuclear_bombs 常用于核武研发事件链、成就奖励或特殊国策完成后给予玩家/AI国家核弹储备,也可用于反事实 mod 中模拟"核武扩散"场景,让特定国家提前获得核弹。脚本示例如下:

# 国策完成后为本国添加核弹
complete_national_focus = {
    ...
    completion_reward = {
        add_nuclear_bombs = 3
    }
}

# 事件中给某个国家增加核弹
country_event = {
    ...
    option = {
        name = my_event.opt_a
        add_nuclear_bombs = 1
    }
}

配合关系

  • [has_completed_focus](/wiki/trigger/has_completed_focus):判断国家是否已完成核武相关国策,再决定是否触发添加核弹的事件,逻辑严谨不易滥给。
  • [add_stability](/wiki/effect/add_stability):核武获得通常伴随国内士气或稳定度变化,两者同时使用可丰富事件叙事层次。
  • [add_named_threat](/wiki/effect/add_named_threat):核武扩散会引发国际紧张,配合增加世界威胁值可强化地缘政治后果的真实感。
  • [add_war_support](/wiki/effect/add_war_support):模拟本国获得核威慑后民众战争意志的提升,与核弹获取事件搭配使用效果自然。

常见坑

  1. 填写负值期望扣除核弹:部分新手误以为传入负数可以减少核弹数量,但该 effect 不保证负值行为符合预期,扣减核弹应通过其他逻辑(如 set 类命令或变量)处理,直接填负数可能导致脚本异常或无效。
  2. 在非 COUNTRY scope 下调用:该 effect 仅对国家 scope 生效,若误写在 state scope(如 every_owned_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

add_nuclear_bombs is commonly used to award nuclear warhead stockpiles to the player or AI nations upon completion of nuclear research event chains, achievement rewards, or special national focuses. It can also be utilized in alternate history mods to simulate "nuclear proliferation" scenarios, allowing specific nations to acquire nuclear weapons ahead of schedule. Example scripts are provided below:

# Add nuclear bombs to the nation upon focus completion
complete_national_focus = {
    ...
    completion_reward = {
        add_nuclear_bombs = 3
    }
}

# Grant a specific nation nuclear bombs via event
country_event = {
    ...
    option = {
        name = my_event.opt_a
        add_nuclear_bombs = 1
    }
}

Synergy

  • [has_completed_focus](/wiki/trigger/has_completed_focus): Check whether a nation has completed nuclear-related national focuses before deciding whether to trigger the nuclear bomb addition event, ensuring logical rigor and preventing unwarranted grants.
  • [add_stability](/wiki/effect/add_stability): Nuclear acquisition is typically accompanied by changes in domestic morale or stability; using both effects together enriches the narrative depth of events.
  • [add_named_threat](/wiki/effect/add_named_threat): Nuclear proliferation triggers international tension; pairing this with increased world tension amplifies the realism of geopolitical consequences.
  • [add_war_support](/wiki/effect/add_war_support): Simulates the increase in public war enthusiasm following the nation's acquisition of nuclear deterrence; combining this with nuclear bomb acquisition events produces natural narrative flow.

Common Pitfalls

  1. Attempting to deduct nuclear bombs with negative values: Some newcomers mistakenly believe that passing negative numbers can reduce nuclear warhead quantities, but this effect does not guarantee that negative value behavior functions as expected. Reducing nuclear bombs should be handled through alternative logic (such as set commands or variables); directly entering negative values may cause script errors or produce no effect.
  2. Invoking outside of COUNTRY scope: This effect only functions within nation scope. If mistakenly written within state scope (such as inside every_owned_state) or character scope, the game will not display a conspicuous error, but nuclear bombs will not be added. During debugging, this oversight is easily missed.