Wiki

effect · transfer_state

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

set owner and controller for state

实战 · 配合 · 坑

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

实战用法

transfer_state 最常用于和平谈判、事件触发领土变更、以及焦点树中的领土奖励场景——例如在一个国家完成某个国策后将特定州份转交给盟友或自身。值得注意的是,该 effect 会同时更新 owner 和 controller,无需额外手动设置控制权。

# 在焦点树完成后,将 STATE_42 转交给当前作用域国家
focus = {
    id = claim_rhineland
    ...
    completion_reward = {
        42 = { transfer_state = ROOT }
    }
}

配合关系

  • [add_state_core](/wiki/effect/add_state_core):转移州份后通常需要为接收国添加核心,避免出现高惩罚的占领状态,两者常成对出现。
  • [add_state_claim](/wiki/effect/add_state_claim):在转移前先给目标国添加宣称,使领土变更在叙事上更合理,也可满足某些触发条件。
  • [controls_state](/wiki/trigger/controls_state):转移前用于检测当前是否实际控制该州,防止将自己并未控制的州意外转交。
  • [create_wargoal](/wiki/effect/create_wargoal):在剧本设计中,常先通过战争目标达成条件,再用 transfer_state 落实战后领土结果。

常见坑

  1. Scope 用反transfer_state 的 scope 是接收国(COUNTRY),而不是州本身——初学者容易误以为应该写在州 scope 下,实际正确写法是 <state_id> = { transfer_state = RECEIVER_TAG } 或在接收国 scope 下写 transfer_state = <state_id>,搞混方向会导致脚本静默失效或转交给错误国家。
  2. 忽略核心与合规度:转移州份后原主国的核心不会自动移除,接收国也不会自动获得核心,若不配合 add_state_core / 移除旧核心等操作,游戏内会出现占领惩罚或 AI 立即反目的非预期行为。

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

transfer_state is most commonly used in peace negotiations, event-triggered territorial changes, and focus tree territory reward scenarios—for example, transferring a specific state to an ally or to oneself after a nation completes a certain national focus. It's worth noting that this effect simultaneously updates both owner and controller without requiring additional manual control adjustments.

# After focus completion, transfer STATE_42 to the current scope nation
focus = {
    id = claim_rhineland
    ...
    completion_reward = {
        42 = { transfer_state = ROOT }
    }
}

Synergy

  • [add_state_core](/wiki/effect/add_state_core): After transferring a state, it's typically necessary to add a core for the receiving nation to avoid the high penalty of occupation status; these two are often used in tandem.
  • [add_state_claim](/wiki/effect/add_state_claim): Add claims to the target nation before transfer to make territorial changes more narratively coherent and satisfy certain trigger conditions.
  • [controls_state](/wiki/trigger/controls_state): Use before transfer to verify whether you actually control the state, preventing accidental transfer of states you don't control.
  • [create_wargoal](/wiki/effect/create_wargoal): In scenario design, it's common to first satisfy conditions through war goals, then implement post-war territorial results with transfer_state.

Common Pitfalls

  1. Reversed Scope: The scope of transfer_state is the receiving nation (COUNTRY), not the state itself—beginners often mistakenly assume it should be written under a state scope. The correct syntax is either <state_id> = { transfer_state = RECEIVER_TAG } or transfer_state = <state_id> under the receiving nation's scope. Confusing the direction causes scripts to silently fail or transfer to the wrong nation.
  2. Neglecting Cores and Compliance: After transferring a state, the original owner's cores won't automatically be removed, and the receiving nation won't automatically gain cores. Without pairing this with add_state_core or removing old cores, the game will exhibit unexpected behaviors like occupation penalties or immediate AI defection.