Wiki

trigger · pc_is_state_outside_influence_for_winner

Definition

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

Description

Check if state is outside valid influence range for winner TAG in the current peace conference
Example:
pc_is_state_outside_influence_for_winner = SOV/ROOT/ROOT.FROM

实战 · 配合 · 坑

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

实战用法

这个 trigger 常用于和平会议相关的 mod 中,当你想限制某些决策或事件只在"胜利者实际能够主张的势力范围内"的州上触发时使用。例如,在自定义和平会议逻辑中,可以用它过滤掉那些因距离或势力圈限制而无法被胜利者合法主张的州,避免产生无效的领土分配。

# 在和平会议相关事件的 trigger 块中,排除影响范围外的州
peace_conference_peace_options = {
    limit = {
        NOT = {
            pc_is_state_outside_influence_for_winner = ROOT
        }
        is_owned_by = FROM
    }
}

配合关系

  • [pc_is_state_claimed_by](/wiki/trigger/pc_is_state_claimed_by) — 通常与本 trigger 联用,先判断该州是否被某方主张,再用本 trigger 确认该主张是否在胜利者的有效影响范围内,双重过滤确保领土分配逻辑合法。
  • [pc_is_state_claimed](/wiki/trigger/pc_is_state_claimed) — 用于检查该州是否存在任何主张方,配合本 trigger 可以构造"有主张但在范围外则跳过"的逻辑分支。
  • [is_owned_by](/wiki/trigger/is_owned_by) — 配合使用以确认州的当前归属国,确保判断对象是交战方控制的土地,而非已属于胜利者的州。
  • [any_neighbor_state](/wiki/trigger/any_neighbor_state) — 可在相邻州遍历场景中嵌套本 trigger,批量检查周边州是否全部处于影响力范围之外,辅助构建连片领土判断。

常见坑

  1. Scope 用错:本 trigger 必须在 STATE scope 下调用,若写在国家 scope(如事件的 immediate 或 country 级别的 trigger 块)中会静默失败或报错,需要先用 any_state/every_state 等切换到州 scope 后再使用。
  2. 目标写法混淆:参数填写的是胜利者的 TAG 或合法 target(如 ROOTFROM),而非被检查的州本身——州是由当前 scope 隐式决定的,新手容易误将州的 TAG 或 OWNER 填入参数位置,导致逻辑判断完全错误。

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

This trigger is commonly used in mods related to peace conferences. Use it when you want to restrict certain decisions or events to fire only on states within the "sphere of influence that the victor can actually claim." For example, in custom peace conference logic, you can use it to filter out states that the victor cannot legitimately claim due to distance or sphere-of-influence restrictions, preventing invalid territorial distributions.

# In the trigger block of peace conference-related events, exclude states outside the sphere of influence
peace_conference_peace_options = {
    limit = {
        NOT = {
            pc_is_state_outside_influence_for_winner = ROOT
        }
        is_owned_by = FROM
    }
}

Synergy

  • [pc_is_state_claimed_by](/wiki/trigger/pc_is_state_claimed_by) — Typically used in conjunction with this trigger. First check whether the state is claimed by a faction, then use this trigger to confirm whether that claim falls within the victor's effective sphere of influence. This dual filtering ensures territorial distribution logic remains lawful.
  • [pc_is_state_claimed](/wiki/trigger/pc_is_state_claimed) — Used to check whether the state has any claimants. Combined with this trigger, you can construct logic branches like "has a claim but is outside the range, so skip."
  • [is_owned_by](/wiki/trigger/is_owned_by) — Use together to confirm the current ownership of the state, ensuring the judgment target is land controlled by a belligerent party, not already belonging to the victor.
  • [any_neighbor_state](/wiki/trigger/any_neighbor_state) — Can be nested within this trigger in adjacent state iteration scenarios to batch-check whether all surrounding states are completely outside the sphere of influence, assisting in constructing contiguous territory judgments.

Common Pitfalls

  1. Wrong scope usage: This trigger must be called under STATE scope. If written in a country scope (such as in an event's immediate block or a country-level trigger block), it will silently fail or throw an error. You must first switch to state scope using any_state/every_state or similar, then use this trigger.
  2. Target syntax confusion: The parameter receives the victor's TAG or a valid target (such as ROOT, FROM), not the state being checked itself — the state is implicitly determined by the current scope. Beginners often mistakenly fill in the state's TAG or OWNER in the parameter position, resulting in completely incorrect logic judgment.