Hands-On Usage
days_since_capitulated is commonly used in mods to determine recovery time windows after a nation's defeat, such as making puppet regimes, aid events, or diplomatic options only valid or invalid for a certain period after capitulation. It can also be used to design "post-war reconstruction" mechanics, allowing specific decisions or focuses to trigger only after a nation has been capitulated for a certain number of days.
# Post-war reconstruction decision: aid event can trigger for France after capitulation exceeds 30 days
available = {
FRA = {
has_capitulated = yes
days_since_capitulated > 30
}
}
Synergy
[has_capitulated](/wiki/trigger/has_capitulated): The most critical companion trigger, used to distinguish between "has capitulated in the past" and "currently still in capitulated state", avoiding misidentification of already-restored nations.
[has_defensive_war](/wiki/trigger/has_defensive_war): When combined, can determine whether an enemy nation is still in defensive war after capitulation, suitable for complex warfare logic.
[exists](/wiki/trigger/exists): A capitulated nation may have been annexed, pairing with exists = yes prevents errors when evaluating conditions for non-existent nations.
[any_allied_country](/wiki/trigger/any_allied_country): Can batch-check within allied country scope whether faction members have recently capitulated, useful for triggering alliance protection or aid logic.
Common Pitfalls
- Forgetting to pair with
has_capitulated = yes: If a nation has already been restored but historically capitulated, days_since_capitulated will still return a valid small value rather than an extremely large one. Direct use will cause the condition to trigger unexpectedly. Always first constrain with has_capitulated = yes to ensure the nation is currently in capitulated state.
- Calling within scope of a non-existent nation: If the target nation has been annexed (
exists = no), entering its scope itself may cause script errors. Always guard with exists = yes first, then check capitulation days.