Wiki

trigger · is_in_peace_conference

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Checks if the country is currently in a peaceconference

实战 · 配合 · 坑

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

实战用法

is_in_peace_conference 常用于和平会议期间限制或解锁某些决策/事件,例如防止玩家在谈判桌上同时触发外交类决策导致逻辑冲突,或用于在和平会议进行中专门弹出一个提示事件。典型场景是将其放入 available 块,确保某个决策只能在和平会议状态下使用。

# 某外交决策:和平会议期间不可用
decision_my_diplomacy = {
    available = {
        NOT = { is_in_peace_conference = yes }
        has_political_power > 50
    }
    ...
}

# 或用于事件触发条件,仅在和平会议期间触发
country_event = {
    trigger = {
        is_in_peace_conference = yes
        has_country_flag = my_special_war_flag
    }
    ...
}

配合关系

  • [has_capitulated](/wiki/trigger/has_capitulated):投降通常是进入和平会议的前提,两者结合可精准判断"已投降且仍在和平谈判中"的特殊窗口期。
  • [has_defensive_war](/wiki/trigger/has_defensive_war):与防御战状态联合判断,可区分"被动挨打已进入和会"与"主动发起战争"两种截然不同的外交处境。
  • [any_enemy_country](/wiki/trigger/any_enemy_country):和平会议期间往往需要遍历当前敌国来决定如何分配战果,此 trigger 可作为外层守门条件,避免在非和会期间误触发相关逻辑。
  • [country_event](/wiki/effect/country_event):在和平会议开始/结束的边界时刻触发专属事件,配合 is_in_peace_conference 做条件卫兵,保证事件只在正确的游戏阶段弹出。

常见坑

  1. yes 写成具体数值或省略:该 trigger 只接受 is_in_peace_conference = yes / = no 两种写法,不接受任何数字或留空,否则脚本解析会静默失败,条件永远不成立。
  2. 误以为 scope 可以是州或角色:此 trigger 仅在 COUNTRY scope 下有效,若写在 limit 内但外层 scope 已切换到 STATE 或 CHARACTER(例如在 every_owned_state 内部),需先用 owner = { is_in_peace_conference = yes } 跳回国家 scope,否则游戏会报 scope 错误或直接返回 false。

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

is_in_peace_conference is commonly used to restrict or unlock certain decisions/events during peace conferences, such as preventing players from triggering diplomatic decisions simultaneously at the negotiation table to avoid logical conflicts, or to display a dedicated notification event while the peace conference is ongoing. A typical scenario is placing it in the available block to ensure a decision can only be used when not in a peace conference state.

# A diplomatic decision that cannot be used during peace conferences
decision_my_diplomacy = {
    available = {
        NOT = { is_in_peace_conference = yes }
        has_political_power > 50
    }
    ...
}

# Or used in event trigger conditions, only fires during peace conferences
country_event = {
    trigger = {
        is_in_peace_conference = yes
        has_country_flag = my_special_war_flag
    }
    ...
}

Synergy

  • [has_capitulated](/wiki/trigger/has_capitulated): Capitulation is typically the prerequisite for entering a peace conference. Combined with this trigger, you can precisely identify the special window period of "has capitulated and is still in peace negotiations."
  • [has_defensive_war](/wiki/trigger/has_defensive_war): When used together with the defensive war state, you can distinguish between "passively taking damage and entering a peace conference" and "actively initiating warfare"—two completely different diplomatic situations.
  • [any_enemy_country](/wiki/trigger/any_enemy_country): During peace conferences, you often need to iterate through current enemy countries to decide how to distribute war spoils. This trigger serves as an outer guard condition, preventing related logic from being accidentally triggered outside of peace conferences.
  • [country_event](/wiki/effect/country_event): Trigger dedicated events at the boundary moments of peace conference start/end, using is_in_peace_conference as a conditional guard to ensure events only fire at the correct game phase.

Common Pitfalls

  1. Writing yes as a specific number or omitting it: This trigger only accepts is_in_peace_conference = yes / = no syntax. It does not accept any numeric values or empty statements. Otherwise, script parsing will silently fail and the condition will never evaluate to true.
  2. Mistakenly assuming scope can be a state or character: This trigger only works in COUNTRY scope. If written inside a limit but the outer scope has already switched to STATE or CHARACTER (for example, inside every_owned_state), you must first use owner = { is_in_peace_conference = yes } to jump back to country scope. Otherwise, the game will report a scope error or simply return false.