Wiki

effect · white_peace

Definition

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

Description

Makes a white peace between the two countries if at war. ROOT is considered the winner while the target tag is considered the loser (which affects things like name of the PC as well as PC related on-actions).
Example:
SOV = {
  white_peace = {
    tag = FIN
    message = FIN_agree_peace
  }
}

实战 · 配合 · 坑

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

实战用法

white_peace 常用于事件驱动的和平谈判场景,例如当玩家接受某一外交选项时自动结束与特定国家的战争,或在焦点树中触发历史性停战协议。需要注意 ROOT 被视为胜利方,这会影响和平条约名称及相关 on-action 的触发逻辑,因此发起 scope 的选择至关重要。

# 芬兰接受停战协议事件
country_event = {
    id = winter_war.5
    option = {
        name = "接受和平条款"
        # 在 SOV scope 下调用,SOV 为胜利方,FIN 为失败方
        SOV = {
            white_peace = {
                tag = FIN
                message = FIN_agree_peace
            }
        }
    }
}

配合关系

  • [add_state_core](/wiki/effect/add_state_core) — 白和之后,胜利方往往需要为所获得或放弃的领土调整核心归属,两者常在同一 option 块中组合使用。
  • [add_named_threat](/wiki/effect/add_named_threat) — 强制停战可能引发国际紧张局势,白和后附加威胁值使世界局势反应更真实。
  • [add_opinion_modifier](/wiki/effect/add_opinion_modifier) — 白和协议后为双方添加外交关系修正,模拟战后短暂的和解或敌意残留。
  • [has_defensive_war_with](/wiki/trigger/has_defensive_war_with) — 在触发器中先检测双方是否正处于防御战状态,避免在无战争时意外调用 white_peace 导致脚本报错或无效执行。

常见坑

  1. scope 方向写反导致胜负颠倒white_peace 以 ROOT(即当前 scope 所在国家)为胜利方,新手常误将失败方设为外层 scope,结果和平条约名称、PC on-action 全部反向触发,应仔细确认 SOV = { white_peace = { tag = FIN } } 中 SOV 才是胜者。
  2. 未判断战争是否存在就直接调用:如果两国当前并不处于交战状态,white_peace 不会执行且可能产生静默错误,建议在外层配合 [has_defensive_war_with](/wiki/trigger/has_defensive_war_with) 或类似战争状态检测进行条件保护。

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

white_peace is commonly used in event-driven peace negotiation scenarios, such as automatically ending a war with a specific nation when the player accepts a diplomatic option, or triggering historical ceasefire agreements within focus trees. Note that ROOT is treated as the victorious party, which affects peace treaty naming and the trigger logic of related on-actions; therefore, choosing the initiating scope is critical.

# Finland accepts ceasefire agreement event
country_event = {
    id = winter_war.5
    option = {
        name = "Accept peace terms"
        # Called under SOV scope, SOV as victor, FIN as defeated
        SOV = {
            white_peace = {
                tag = FIN
                message = FIN_agree_peace
            }
        }
    }
}

Synergy

  • [add_state_core](/wiki/effect/add_state_core) — After white peace, the victor typically needs to adjust core ownership for territories gained or ceded; both are commonly combined in the same option block.
  • [add_named_threat](/wiki/effect/add_named_threat) — Forced cessation can trigger international tensions; adding threat values after white peace makes global conditions feel more realistic.
  • [add_opinion_modifier](/wiki/effect/add_opinion_modifier) — Add diplomatic relation modifiers to both sides following the peace agreement, simulating post-war brief reconciliation or lingering hostility.
  • [has_defensive_war_with](/wiki/trigger/has_defensive_war_with) — Check in triggers whether both sides are in active defensive war beforehand, preventing unexpected white_peace calls when no war exists, which can cause script errors or silent failures.

Common Pitfalls

  1. Reversed scope direction causes inverted victor/defeated status: white_peace treats ROOT (the nation in the current scope) as the victor; newcomers often mistakenly set the defeated party as the outer scope, resulting in peace treaty names and PC on-actions all triggering in reverse. Carefully confirm that SOV in SOV = { white_peace = { tag = FIN } } is the victor.
  2. Calling without checking if war exists: If the two nations are not currently at war, white_peace will not execute and may produce silent errors. It is recommended to use [has_defensive_war_with](/wiki/trigger/has_defensive_war_with) or similar war state checks as conditional guards in the outer layer.