Wiki

effect · add_stability

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Adds the stability to the country in scope. Example: add_stability = 5

实战 · 配合 · 坑

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

实战用法

add_stability 最常用于国家焦点、事件选项或决议完成后奖励玩家的稳定度,也常用于惩罚场景(传入负值)来模拟政治危机或战败冲击。例如在某个"国家团结"事件选项中:

option = {
    name = unity_event.1.a
    add_stability = 0.05       # 提升 5% 稳定度
    add_political_power = 50
}

配合关系

  • [add_war_support](/wiki/effect/add_war_support) — 稳定度与战争支持度经常同步调整,用于模拟国内士气的整体变化。
  • [add_political_power](/wiki/effect/add_political_power) — 政治事件通常同时影响稳定度与政治力量,两者搭配还原政策决策的综合后果。
  • [add_ideas](/wiki/effect/add_ideas) — 某些国策 idea 自带稳定度加成,触发 idea 的同时用 add_stability 做即时补偿,避免数值跳变让玩家困惑。
  • [has_country_flag](/wiki/trigger/has_country_flag) — 用标志位判断是否已触发过同类事件,防止重复叠加稳定度奖励导致数值溢出。

常见坑

  1. 单位混淆add_stability 接受的是小数比例值(如 0.10 表示 +10%),而非百分比整数。新手写成 add_stability = 10 会直接将稳定度拉满至上限甚至溢出,行为与预期完全不同。
  2. Scope 错误:此命令只能在 COUNTRY scope 下执行。若在 every_owned_state 等 STATE scope 内部直接调用,脚本会静默报错或不生效,需先用 owner = { add_stability = ... } 切回国家 scope。

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

add_stability is most commonly used to reward the player with stability after national focuses, event options, or decision completions. It is also frequently used in penalty scenarios (by passing negative values) to simulate political crises or the impact of military defeat. For example, in a "national unity" event option:

option = {
    name = unity_event.1.a
    add_stability = 0.05       # Increases stability by 5%
    add_political_power = 50
}

Synergy

  • [add_war_support](/wiki/effect/add_war_support) — Stability and war support are often adjusted in tandem to simulate overall changes in domestic morale.
  • [add_political_power](/wiki/effect/add_political_power) — Political events typically affect both stability and political power simultaneously; combining these two reflects the comprehensive consequences of policy decisions.
  • [add_ideas](/wiki/effect/add_ideas) — Certain national spirits (ideas) come with built-in stability bonuses. When triggering an idea, use add_stability for immediate compensation to avoid value jumps that confuse the player.
  • [has_country_flag](/wiki/trigger/has_country_flag) — Use flags to check whether a similar event has already been triggered, preventing duplicate stacking of stability rewards that could cause value overflow.

Common Pitfalls

  1. Unit Confusion: add_stability accepts decimal fractional values (e.g., 0.10 represents +10%), not percentage integers. Novices who write add_stability = 10 will push stability directly to its cap or even overflow it, behaving completely differently from intended.
  2. Scope Errors: This command can only be executed within COUNTRY scope. If called directly inside STATE scope like every_owned_state, the script will silently error or have no effect. You must first switch back to country scope using owner = { add_stability = ... }.