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
- 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.
- 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.