Wiki

effect · release_captured_generals_from

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Makes the scoped country release all captured generals from the specified country kept in the specified province.
If no province is specified, all generals are released.

### Example

release_captured_generals_from = { target = GER province = <province> (optional) }

release_captured_generals_from = FROM

实战 · 配合 · 坑

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

实战用法

在战争结束事件或和平谈判逻辑中,当一方与某国停战或白和平后,常常需要释放对方被俘的将领,以体现外交礼节或满足和平条款。此外,在玩家扮演轴心国或盟军时,mod 可以用此效果触发"遣返战俘"的剧情事件,增强历史沉浸感。

# 德国与苏联签订白和平后,释放苏联被俘将领
country_event = {
    id = peace_deal.1
    # ...
    option = {
        name = peace_deal.1.a
        white_peace = SOV
        # 作为和平条款的一部分,释放所有苏联被俘将领
        release_captured_generals_from = {
            target = SOV
        }
    }
}

若只释放关押在特定省份的将领,可加 province 字段指定战俘营所在省份:

release_captured_generals_from = {
    target = SOV
    province = 219
}

配合关系

  • white_peace:停战/白和平时往往同步释放被俘将领,二者天然配套使用。
  • country_event:通过触发外交事件为释放战俘提供叙事包装,避免无事件地突兀执行。
  • has_war_with:在条件判断中确认当前是否仍与目标国交战,决定是否该触发释放逻辑,避免和平状态下重复触发。
  • set_country_flag:释放后设置标记,防止同一战争中重复触发释放事件。

常见坑

  1. scope 写错方向:此 effect 必须在持有战俘的国家 scope 下执行(即"关押方"),而不是被俘将领所属国的 scope。如果在 FROM 指向的国家 scope 内调用,需确认 FROM 确实是关押国,否则什么也不会发生,且不会报错,容易难以排查。
  2. 省份 ID 非必填但易误用:省份参数是可选的,若只希望释放来自某国的全部被俘将领,直接省略 province 字段即可;若错误地填写了一个该国实际上并未关押战俘的省份 ID,同样不会报错,但将领不会被释放,造成效果静默失效。

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

In end-of-war events or peace negotiation logic, it is common to release an enemy's captured generals after a ceasefire or white peace, reflecting diplomatic courtesy or fulfilling peace terms. Additionally, when the player is running an Axis or Allied campaign, a mod can use this effect to trigger a "repatriation of POWs" narrative event, deepening historical immersion.

# After Germany and the Soviet Union sign a white peace, release all captured Soviet generals
country_event = {
    id = peace_deal.1
    # ...
    option = {
        name = peace_deal.1.a
        white_peace = SOV
        # As part of the peace terms, release all captured Soviet generals
        release_captured_generals_from = {
            target = SOV
        }
    }
}

To release only generals held in a specific province, add the province field to designate the POW camp's location:

release_captured_generals_from = {
    target = SOV
    province = 219
}

Synergy

  • white_peace: A ceasefire or white peace naturally pairs with releasing captured generals — the two are designed to be used together.
  • country_event: Wrapping the release in a diplomatic event provides narrative context and avoids an abrupt, eventless execution.
  • has_war_with: Use this in condition checks to confirm whether you are still at war with the target country before triggering the release logic, preventing it from firing again during peacetime.
  • set_country_flag: Set a flag after the release to prevent the release event from triggering more than once within the same war.

Common Pitfalls

  1. Wrong scope direction: This effect must be executed within the scope of the country holding the prisoners (i.e., the detaining party), not the scope of the country whose generals were captured. If you are calling it inside a FROM scope, make sure FROM is actually the detaining country — if it isn't, nothing will happen and no error will be logged, making the bug very difficult to track down.
  2. The province field is optional but easy to misuse: The province parameter is optional. If you want to release all captured generals belonging to a given country, simply omit the province field. If you mistakenly supply a province ID where that country has no generals held captive, no error will be thrown either, but the generals will not be released — a silent failure that can be hard to notice.