Wiki

effect · damage_building

Definition

  • Supported scope:STATE, COUNTRY
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

Damages a building in a targeted state or province.
Example:
damage_building = {
	type = industrial_complex
	damage = 2.4
	repair_speed_modifier = -0.5 # repair will be 50% slower until building is fully repaired
}

The building can also be specified through tags.
Example: damage_building = {
	tags = facility # can be a single tag or a { }-wrapped list of tags
	damage = 2.4
	repair_speed_modifier = -0.5 # repair will be 50% slower until building is fully repaired
}

The above examples will only work in state scope where buildings can be found through the scope state,
and province buildings are recursively found from that state.

You can also manually specify either a state or province:

damage_building = {
	type = industrial_complex
	province = 500 # or a variable like var:target_province
	damage = 2.4
}

damage_building = {
	type = industrial_complex
	state = 35 # or a variable like var:target_state
	damage = 2.4
}

If the building is a province building but only a state has been specicied, all provinces in that state will be
searched to find the first matching province building.

实战 · 配合 · 坑

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

实战用法

damage_building 常用于事件或决策中模拟战争破坏、轰炸后果或破坏行动的剧情效果,例如在间谍行动事件中破坏敌方工业设施。在省级/州级事件触发时,可精确指定目标省份或州,避免影响到整个区域的所有同类建筑。

# 在一个 STATE scope 的事件中,对指定省份的基础设施造成破坏
immediate = {
    damage_building = {
        type = infrastructure
        province = var:sabotage_target_province
        damage = 1.5
        repair_speed_modifier = -0.3
    }
}

配合关系

  • [remove_building](/wiki/effect/remove_building):当建筑损毁程度需要彻底摧毁而非只是降低耐久时,可在 damage_building 之后接着使用,形成"先破坏、再拆除"的完整流程。
  • [add_province_modifier](/wiki/effect/add_province_modifier):对建筑造成破坏后,同步给该省份添加修复惩罚或生产减益 modifier,强化事件的连锁负面效果。
  • [any_province_building_level](/wiki/trigger/any_province_building_level):在执行破坏前先用此 trigger 检查目标建筑是否存在及等级是否满足条件,防止对空目标执行指令导致无效触发。
  • [state_event](/wiki/effect/state_event):破坏完成后触发一个后续事件,通知相关国家或推进剧情分支,形成完整的事件链。

常见坑

  1. 在 COUNTRY scope 下忘记指定 stateprovince:当 scope 是国家而非州时,必须手动提供 state = ...province = ... 字段,否则游戏找不到目标建筑,指令会静默失效,新手往往误以为 COUNTRY scope 会自动搜索首都或全境。
  2. 对省级建筑只写 state 却期望精准命中单个省份:官方说明指出,省级建筑在只给定 state 时会递归搜索该州所有省份并命中第一个匹配项,若想精确控制必须直接给出 province,否则可能误伤非目标省份的同类建筑。

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

damage_building is commonly used in events or decisions to simulate the narrative effects of war damage, bombing consequences, or sabotage operations—for example, destroying an enemy's industrial facilities during a spy action event. When triggered at the province or state level, you can precisely specify the target province or state, avoiding unintended damage to all similar buildings across an entire region.

# In an event scoped to a STATE, damage infrastructure in a specified province
immediate = {
    damage_building = {
        type = infrastructure
        province = var:sabotage_target_province
        damage = 1.5
        repair_speed_modifier = -0.3
    }
}

Synergy

  • [remove_building](/wiki/effect/remove_building): When a building needs to be completely destroyed rather than merely damaged, chain this after damage_building to create a complete "damage then demolish" workflow.
  • [add_province_modifier](/wiki/effect/add_province_modifier): After damaging a building, simultaneously apply a repair penalty or production malus modifier to the province, amplifying the cascading negative effects of the event.
  • [any_province_building_level](/wiki/trigger/any_province_building_level): Before executing damage, use this trigger to verify that the target building exists and meets the required level conditions, preventing wasted commands on nonexistent targets.
  • [state_event](/wiki/effect/state_event): After damage is complete, fire a follow-up event to notify relevant nations or advance story branches, creating a cohesive event chain.

Common Pitfalls

  1. Forgetting to specify state or province under COUNTRY scope: When the scope is a country rather than a state, you must manually provide either state = ... or province = ... fields. Otherwise, the game cannot locate the target building and the command silently fails. Newcomers often mistakenly assume COUNTRY scope automatically searches the capital or entire nation.
  2. Specifying only state for province-level buildings while expecting precise targeting: According to official documentation, province-level buildings with only a state specified will recursively search all provinces in that state and hit the first match. To maintain precise control, you must explicitly provide province; otherwise you risk damaging unintended buildings in other provinces of the same type.