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
}
remove_power_balanceCOUNTRYnoneremoves 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) — 移除权力天平后触发后续事件,用于叙事衔接或通知玩家该机制已结束。id 填写错误:id 必须与在 power_balance 定义文件中声明的 id 完全一致(区分大小写),填写错误时游戏不会报显眼的错误,天平只是静默地无法被移除,导致机制残留在国家上。[has_any_power_balance](/wiki/trigger/has_any_power_balance) 或相应条件保护,否则对没有该天平的国家执行此 effect 可能产生非预期的日志警告甚至脚本异常。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.
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
}
}
}
[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.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.[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.