Wiki

effect · teleport_railway_guns_to_deploy_province

Definition

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

Description

Teleport the target country's railway guns to the province to which railway guns are deployed.

实战 · 配合 · 坑

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

实战用法

当玩家通过决议或焦点将铁道炮的部署省份重新设定后,可用此 effect 立即将该国所有铁道炮传送至新的部署省份,避免长途行军耗时。典型场景包括:战线紧急加强、前线快速部署铁道炮支援,或 mod 中设计"紧急调兵"类决议。

# 某国触发决议后,立即将铁道炮传送至部署省份
country_event = {
    id = my_mod.1
    hidden = yes
    immediate = {
        teleport_railway_guns_to_deploy_province = ROOT
    }
}

配合关系

  • [activate_targeted_decision](/wiki/effect/activate_targeted_decision):先通过决议触发铁道炮部署位置的变更,再调用本 effect 执行传送,形成完整的"重新部署"流程。
  • [controls_province](/wiki/trigger/controls_province):在传送前检查目标省份是否在己方控制下,防止铁道炮被传送到敌占区造成损失。
  • [has_country_flag](/wiki/trigger/has_country_flag):结合国家标志判断是否已经发出过传送指令,避免同一事件链中重复触发传送。

常见坑

  1. 忘记目标 scope 必须是 COUNTRY:本 effect 只能在国家 scope 下执行,若在 STATE 或 CHARACTER 等 scope 中调用会报错或静默失效,需确保执行块的上下文 scope 正确,或使用 ROOT/OWNER 等 target 将 scope 切换至国家。
  2. 铁道炮未设置部署省份时行为未定义:若目标国家尚未为铁道炮指派任何部署省份,传送结果可能不符合预期,建议在触发 effect 之前通过游戏内逻辑或事件确保部署省份已被明确设定。

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

When a player resets the deployment province for railway guns via a decision or focus, this effect can be used to instantly teleport all railway guns of that country to the new deployment province, avoiding the time cost of long-distance marching. Typical scenarios include: emergency frontline reinforcement, rapid railway gun deployment to support active fronts, or designing "emergency troop mobilization" decisions in mods.

# After a country triggers a decision, immediately teleport railway guns to the deployment province
country_event = {
    id = my_mod.1
    hidden = yes
    immediate = {
        teleport_railway_guns_to_deploy_province = ROOT
    }
}

Synergy

  • [activate_targeted_decision](/wiki/effect/activate_targeted_decision): First trigger changes to the railway gun deployment location via decision, then call this effect to execute the teleport, forming a complete "redeploy" workflow.
  • [controls_province](/wiki/trigger/controls_province): Check whether the target province is under your control before teleporting to prevent railway guns from being sent to enemy-occupied territory and suffering losses.
  • [has_country_flag](/wiki/trigger/has_country_flag): Combine with country flags to determine whether a teleport order has already been issued, preventing duplicate teleport triggers within the same event chain.

Common Pitfalls

  1. Forgetting that the target scope must be COUNTRY: This effect can only be executed within a country scope. Calling it in STATE or CHARACTER scopes will cause errors or silent failures. Ensure the execution context scope is correct, or use targets like ROOT/OWNER to switch the scope to country.
  2. Undefined behavior when railway guns have no deployment province set: If the target country has not yet assigned any deployment province for railway guns, the teleport result may not match expectations. It is recommended to ensure the deployment province is explicitly set through in-game logic or events before triggering this effect.