Hands-On Usage
launch_nuke is commonly used in scripted events or decisions to trigger nuclear strikes, such as granting players a "strategic nuclear strike" option after completing a specific nuclear weapons project, or simulating historical nuclear weapon usage in AI scripts. The example below demonstrates launching a nuclear strike against a specified state in a country event and consuming a nuclear warhead:
country_event = {
id = my_mod.1
option = {
name = my_mod.1.a
# Launch nuclear strike against target state, prioritizing enemy provinces, and consume one nuclear warhead
launch_nuke = {
state = 42
controller = GER
use_nuke = yes
nuke_type = nuclear_bomb
}
}
}
Synergy
[add_nuclear_bombs](/wiki/effect/add_nuclear_bombs): Before executing a nuclear strike, use this command to ensure sufficient nuclear warheads in inventory, then combine with use_nuke = yes. This creates a logical "production → deployment" loop.
[has_breakthrough_points](/wiki/trigger/has_breakthrough_points): Can be used in trigger blocks to check whether the player has completed nuclear technology breakthroughs, allowing the nuclear strike event to execute only when conditions are met.
[add_named_threat](/wiki/effect/add_named_threat): After a nuclear strike, it is often necessary to simultaneously increase global tension. Using both commands together simulates the political consequences of nuclear weapon use on the international situation.
[country_event](/wiki/effect/country_event): After a nuclear strike, you can trigger diplomatic protest or war declaration events to the target nation or third parties, enriching the narrative chain.
Common Pitfalls
- Mixing
province and state causes invalid targeting: Only one of province or state can be used; writing both fields simultaneously results in unpredictable script behavior. Always explicitly choose one targeting method. The controller field only takes effect when using state; if combined with province it will be ignored.
- Forgetting to verify nuclear warhead inventory before setting
use_nuke = yes: If the current nation has zero nuclear warheads yet you still specify consuming warheads, the effect may silently fail or trigger exceptions. Always validate inventory using trigger conditions (trigger) with logic similar to [has_army_manpower](/wiki/trigger/has_army_manpower), or replenish inventory with [add_nuclear_bombs](/wiki/effect/add_nuclear_bombs) before execution.