Wiki

trigger · pc_is_on_same_side_as

Definition

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

Description

Checks if country is on same side (winning or losing side) as another country in the peace conference.
Example:
POL = { pc_is_on_same_side_as = ENG }

实战 · 配合 · 坑

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

实战用法

pc_is_on_same_side_as 主要用于和平会议相关的决议或事件中,判断两个国家在同一场和会里是否站在同一阵营(同为胜方或同为败方),常见于多国联合战争后的利益分配、特殊外交选项解锁或 AI 策略调整。例如,可以限定某个决定只有在与盟友同为胜方时才能触发:

# 仅当波兰与英国在同一和平会议阵营时,允许某项决定
available = {
    pc_is_on_same_side_as = ENG
}

配合关系

  • [has_defensive_war](/wiki/trigger/has_defensive_war):通常先确认己方正处于防御战,再用本 trigger 验证盟友是否共同出现在和平会议的同侧,二者组合可精确筛选"防御战胜利后的联合分配"场景。
  • [any_allied_country](/wiki/trigger/any_allied_country):在 any_allied_country 循环内嵌套本 trigger,可批量检查所有盟友里是否至少一个与己方同侧,避免对每个盟友逐一硬编码 tag。
  • [has_annex_war_goal](/wiki/trigger/has_annex_war_goal):在和会 trigger 组合中,常与本 trigger 同时出现,用于判断胜方中某国是否持有吞并战争目标,从而决定特殊剧本事件是否触发。
  • [exists](/wiki/trigger/exists):和会期间国家可能已被消灭,先用 exists 确认目标国仍存在,再调用本 trigger,可防止脚本报错或产生非预期结果。

常见坑

  1. 不在和平会议 scope 内使用时静默失败:本 trigger 只在和平会议进行期间有意义,若在普通国家事件或焦点条件中调用,游戏不会报错但条件会始终返回假,导致逻辑看似正常却永远不触发,调试时务必确认当前是否真的处于和会流程。
  2. 目标写成变量或动态 tag 却不加引号:新手常把目标国 tag 误写为小写或者套入变量语法(如 = var:target_country),但本 trigger 的 target 仅支持固定 tag 或内置 scope 关键字(THIS/ROOT 等),使用不支持的动态引用会导致解析失败或行为异常。

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

pc_is_on_same_side_as is primarily used in peace conference-related decisions or events to determine whether two nations stand on the same side within a single peace conference (both as victors or both as defeated), commonly appearing in scenarios involving interest distribution after multi-nation wars, unlocking special diplomatic options, or adjusting AI strategies. For example, you can restrict a certain decision to trigger only when Poland and England are on the same side of the peace conference:

# Only allow this decision when Poland and England are on the same peace conference side
available = {
    pc_is_on_same_side_as = ENG
}

Synergy

  • [has_defensive_war](/wiki/trigger/has_defensive_war): First confirm that your nation is engaged in a defensive war, then use this trigger to verify whether allies appear on the same side at the peace conference. Combined together, these two precisely filter the "post-defensive war victory joint distribution" scenario.
  • [any_allied_country](/wiki/trigger/any_allied_country): Nest this trigger inside an any_allied_country loop to batch-check whether at least one of all allies stands on your side, avoiding hard-coding individual ally tags one by one.
  • [has_annex_war_goal](/wiki/trigger/has_annex_war_goal): In peace conference trigger combinations, this often appears alongside the present trigger to determine whether a victorious nation holds an annexation war goal, thus deciding whether special narrative events should fire.
  • [exists](/wiki/trigger/exists): Nations may be eliminated during peace conferences; use exists first to confirm the target nation still exists before calling this trigger, preventing script errors or unintended consequences.

Common Pitfalls

  1. Silent failure when used outside peace conference scope: This trigger only has meaning during an active peace conference. If called in regular country events or focus conditions, the game will not error but the condition will always return false, causing logic to appear normal but never trigger. When debugging, always confirm you are actually within a peace conference flow.
  2. Writing the target as a variable or dynamic tag without quotes: Beginners often mistakenly write the target nation tag in lowercase or wrap it in variable syntax (such as = var:target_country), but this trigger's target only accepts fixed tags or built-in scope keywords (THIS/ROOT etc.). Using unsupported dynamic references causes parsing failures or unexpected behavior.