trigger · surrender_progress
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
check if a country is close to surrendering
surrender_progressCOUNTRYnonecheck if a country is close to surrendering
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.
surrender_progress is commonly used to determine whether a country is on the brink of capitulation, enabling the triggering of special diplomatic events or decisions—for example, allowing the player to issue ultimatums as the target nation nears collapse, negotiate armistices, or enabling AI logic for allies to evaluate whether continued reinforcement is worthwhile. Typical scenarios include trigger conditions for war-ending mod events and threshold detection in peace negotiation systems.
# Trigger an armistice proposal event when the target country's surrender progress reaches a certain threshold
country_event = {
id = my_mod.100
trigger = {
any_enemy_country = {
surrender_progress > 0.5
}
}
}
[has_capitulated](/wiki/trigger/has_capitulated): surrender_progress detects the "trend," while has_capitulated detects the "outcome." Together they construct a complete state chain from "on the verge of surrender" to "already capitulated."[any_enemy_country](/wiki/trigger/any_enemy_country): Typically requires switching scope to enemy countries, then invoking surrender_progress within that scope. These two are nearly inseparable partners.[alliance_strength_ratio](/wiki/trigger/alliance_strength_ratio): Simultaneously checking enemy surrender progress and both sides' military strength ratio allows more precise assessment of war trajectory, avoiding misjudgment from relying on a single metric.[create_wargoal](/wiki/effect/create_wargoal): After confirming the enemy is in a high surrender progress state, timely creation of new war goals expands victory and forms a complete logical loop of "condition check → pressure action."surrender_progress only returns meaningful values when the country is at war with actual military pressure; using it on uninvolved nations typically returns 0, causing conditions to never trigger and logic to silently fail undetected.surrender_progress < 0.5 intending to filter "about to surrender" nations, but in fact higher values indicate closer proximity to capitulation. Use > 0.5 instead to correctly capture states approaching collapse.