Hands-On Usage
add_timed_idea is commonly used to grant countries temporary buffs or debuffs with expiration dates, such as post-war reconstruction penalties, temporary bonuses from special events, or short-term effects from diplomatic agreements. The idea is automatically removed upon expiration without requiring additional script maintenance. The example below simulates a diplomatic crisis that grants a nation six months of war preparation bonus:
country_event = {
id = my_mod.5
option = {
name = my_mod.5.a
# Crisis resolved, grant temporary war mobilization bonus
add_timed_idea = {
idea = war_preparation_bonus
months = 6
}
}
}
Synergy
[has_dynamic_modifier](/wiki/trigger/has_dynamic_modifier) / [add_dynamic_modifier](/wiki/effect/add_dynamic_modifier): Use together when you need to apply both variable-value modifiers and fixed ideas simultaneously. Both work in concert to create a complete temporary stacking solution.
[add_ideas](/wiki/effect/add_ideas): For comparison—if the idea should have permanent effect, use add_ideas instead. Combining add_timed_idea with add_ideas allows you to grant both permanent and temporary ideas at once.
[add_days_remove](/wiki/effect/add_days_remove): After adding a standard idea via add_ideas, you can use add_days_remove to append a countdown timer. This combination achieves similar but more flexible results compared to add_timed_idea.
[has_country_flag](/wiki/trigger/has_country_flag): Often paired with country flags—set a flag first to record that a "temporary idea is active," then check the flag in other triggers to avoid adding the same idea multiple times.
Common Pitfalls
- Forgetting to specify at least one time field: One of
years, months, or days must be provided. If all are omitted, the game will not display an error, but the idea may persist indefinitely or disappear immediately—behavior becomes unpredictable.
- Writing decimal numbers instead of integers for time fields: Time fields accept only positive integers or predefined variables. Using decimals (e.g.,
days = 1.5) causes parsing errors. If using variables, ensure the variable is assigned and holds a positive integer value at execution time.