Wiki

effect · remove_power_balance

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

removes power balance from country

Example:
remove_power_balance = {
	id = power_balance_id
}

实战 · 配合 · 坑

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

实战用法

remove_power_balance 常用于 mod 中某条国策或事件结束了某个势力对比体系时的清理操作,例如当一场意识形态内战结束、派系斗争告一段落,需要彻底移除该国已有的权力天平机制。以下示例展示在事件选项中移除一个自定义权力天平:

country_event = {
    id = my_mod.10
    option = {
        name = my_mod.10.a
        # 内战结束,移除派系权力天平
        remove_power_balance = {
            id = my_faction_power_balance
        }
    }
}

配合关系

  • [has_any_power_balance](/wiki/trigger/has_any_power_balance) — 在执行移除前先用此触发器判断该国是否确实存在任何权力天平,避免对不存在的天平执行操作引发报错。
  • [add_dynamic_modifier](/wiki/effect/add_dynamic_modifier) — 权力天平往往与动态修正器联动,移除天平后通常需要同步清除或替换相关的动态修正器,保证数值状态的一致性。
  • [add_ideas](/wiki/effect/add_ideas) — 某些设计中权力天平的消长会给国家附加特定理念,移除天平时配合操作理念,确保国家状态彻底重置。
  • [country_event](/wiki/effect/country_event) — 移除权力天平后触发后续事件,用于叙事衔接或通知玩家该机制已结束。

常见坑

  1. id 填写错误id 必须与在 power_balance 定义文件中声明的 id 完全一致(区分大小写),填写错误时游戏不会报显眼的错误,天平只是静默地无法被移除,导致机制残留在国家上。
  2. 未判断天平是否存在就直接移除:在 scope 不一定有该天平的通用事件或效果块中,应先用 [has_any_power_balance](/wiki/trigger/has_any_power_balance) 或相应条件保护,否则对没有该天平的国家执行此 effect 可能产生非预期的日志警告甚至脚本异常。

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

remove_power_balance is commonly used in mods to clean up when a focus or event concludes a power balance system for a faction, such as when an ideological civil war ends or factional struggles reach a conclusion and the power balance mechanism needs to be completely removed from the country. The following example demonstrates removing a custom power balance in an event option:

country_event = {
    id = my_mod.10
    option = {
        name = my_mod.10.a
        # Civil war ends, remove faction power balance
        remove_power_balance = {
            id = my_faction_power_balance
        }
    }
}

Synergy

  • [has_any_power_balance](/wiki/trigger/has_any_power_balance) — Use this trigger before removal to check whether the country actually has any power balance, avoiding errors from attempting to remove non-existent balances.
  • [add_dynamic_modifier](/wiki/effect/add_dynamic_modifier) — Power balances often work in conjunction with dynamic modifiers. After removing a balance, you typically need to synchronously remove or replace related dynamic modifiers to maintain consistency in numerical state.
  • [add_ideas](/wiki/effect/add_ideas) — In some designs, fluctuations in power balance grant specific ideas to the country. When removing the balance, coordinate with idea management to ensure the country's state is fully reset.
  • [country_event](/wiki/effect/country_event) — Trigger subsequent events after removing the power balance for narrative continuity or to notify the player that the mechanism has ended.

Common Pitfalls

  1. Incorrect id specification: The id must exactly match (case-sensitive) the id declared in the power_balance definition file. When filled incorrectly, the game will not produce a conspicuous error—the balance simply fails to be removed silently, leaving the mechanism lingering on the country.
  2. Removing without checking if the balance exists: In generic events or effect blocks where a country may not necessarily have the balance, you should first protect with [has_any_power_balance](/wiki/trigger/has_any_power_balance) or appropriate conditions. Otherwise, executing this effect on a country without that balance may generate unexpected log warnings or even script errors.