Wiki

trigger · is_in_home_area

Definition

  • Supported scope:STATE
  • Supported target:any

Description

Checks if the first province in the state is connected to the capital of its owner

实战 · 配合 · 坑

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

实战用法

is_in_home_area 常用于判断某个州是否处于其所有者的"核心补给范围"内,适合在补给惩罚类 mod、占领政策 mod 或动态修正系统中筛选"本土连接"与"海外孤立"两种状态。例如,可以在决策的 available 块里限制只有与首都连通的州才能推进某项建设:

available = {
    is_in_home_area = yes
    is_owned_by = ROOT
    has_state_category = rural
}

配合关系

  • [is_owned_by](/wiki/trigger/is_owned_by) — 通常先确认州的归属国再判断连通性,避免对敌占州触发逻辑。
  • [is_controlled_by](/wiki/trigger/is_controlled_by) — 补充检查实际控制权,因为 is_in_home_area 只看所有者的首都连通,不考虑控制方。
  • [add_state_modifier](/wiki/effect/add_state_modifier) — 当确认州处于(或不处于)本土区域后,为其添加对应的动态惩罚/奖励修正。
  • [has_state_category](/wiki/trigger/has_state_category) — 联合过滤州的规模类型,精细化控制哪类州受本土连通条件影响。

常见坑

  1. 误以为判断的是控制方首都:该 trigger 检查的是州所有者首都的连通性,若该州被敌方控制但所有权未变,结果仍依据原所有者计算,容易导致占领场景下出现不符合预期的判断。
  2. 在 COUNTRY scope 下使用is_in_home_area 只在 STATE scope 下有效,若不小心写在国家事件的顶层条件块(而非 any_owned_state 等迭代块内),脚本会静默报错或始终返回假。

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_home_area is commonly used to determine whether a state is within its owner's "core supply range," making it ideal for supply penalty mods, occupation policy mods, or dynamic modifier systems to filter between "domestic connection" and "overseas isolated" states. For example, you can restrict a decision's available block so that only states connected to the capital can proceed with certain constructions:

available = {
    is_in_home_area = yes
    is_owned_by = ROOT
    has_state_category = rural
}

Synergy

  • [is_owned_by](/wiki/trigger/is_owned_by) — Usually confirm state ownership first before checking connectivity to avoid triggering logic on enemy-occupied states.
  • [is_controlled_by](/wiki/trigger/is_controlled_by) — Supplement by checking actual control, since is_in_home_area only checks the owner's capital connectivity and does not account for the controlling faction.
  • [add_state_modifier](/wiki/effect/add_state_modifier) — After confirming a state is (or is not) in the home region, apply corresponding dynamic penalties/bonuses to it.
  • [has_state_category](/wiki/trigger/has_state_category) — Filter states by size category in combination to fine-tune which state types are affected by home connectivity conditions.

Common Pitfalls

  1. Mistaking it as checking the controlling faction's capital: This trigger checks connectivity to the owner's capital, not the controller's. If a state is controlled by an enemy but ownership hasn't changed, the result is still calculated based on the original owner, easily causing unexpected judgments in occupation scenarios.
  2. Using it under COUNTRY scope: is_in_home_area is only valid in STATE scope. If accidentally placed in the top-level condition block of a country event (rather than inside iteration blocks like any_owned_state), the script will silently error or always return false.