命令百科

effect · launch_nuke

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

launch nuke at a state. usage : 
launch_nuke = { 
   provinve = 42 #will nuke this province if specified
   state = 42 #use either province or state. if state is used it will prefer enemies first while picking a province to nuke. otherwise it will pick one of the neutrals
   controller = GER #if state and controller is specified, the effect will pick a province that is controlled by this tag
   use_nuke = yes #will consume nuke if specified
   nuke_type = nuclear_bomb # type of nuke to use (e.g. nuclear_bomb, thermonuclear_bomb etc.)
}

实战 · 配合 · 坑

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

实战用法

launch_nuke 常用于剧情事件或决策中触发核打击,例如在玩家完成特定核武器项目后赋予一次"战略核打击"选项,或在 AI 脚本中模拟历史上的核武器使用。下面示例演示在一个国家事件中对指定州发动核打击并消耗核弹:

country_event = {
    id = my_mod.1
    option = {
        name = my_mod.1.a
        # 对目标州发动核打击,优先选择敌方省份,并消耗一枚核弹
        launch_nuke = {
            state = 42
            controller = GER
            use_nuke = yes
            nuke_type = nuclear_bomb
        }
    }
}

配合关系

  • [add_nuclear_bombs](/wiki/effect/add_nuclear_bombs):在核打击前先通过此命令确保库存中有足够核弹,再配合 use_nuke = yes 使用,逻辑上形成"生产→使用"闭环。
  • [has_breakthrough_points](/wiki/trigger/has_breakthrough_points):可在触发条件块中用来判断玩家是否完成了核技术突破,满足条件才允许执行核打击事件。
  • [add_named_threat](/wiki/effect/add_named_threat):核打击后往往需要同步提升全球紧张度,二者配合可模拟核使用对国际局势的政治后果。
  • [country_event](/wiki/effect/country_event):核打击后可向目标国或第三方国家触发外交抗议或战争宣言事件,丰富叙事链条。

常见坑

  1. provincestate 混用导致无效provincestate 只能二选一;若同时写入两个字段,脚本行为不可预期,应明确选择其中一种定位方式。controller 字段仅在使用 state 时生效,若配合 province 使用会被忽略。
  2. 忘记检查核弹库存就写 use_nuke = yes:若当前国家核弹数量为零却仍指定消耗核弹,效果可能静默失败或触发异常,务必在条件块(trigger)中先用 [has_army_manpower](/wiki/trigger/has_army_manpower) 类似的判断思路验证库存,或在调用前用 [add_nuclear_bombs](/wiki/effect/add_nuclear_bombs) 补充库存。