Hands-On Usage
activate_targeted_decision is commonly used in mods to forcibly enable a decision or mission for the player or AI after certain conditions are met through events or national focuses, bypassing the need to satisfy the decision's prerequisite triggers. Typical scenarios include advancing narrative chains (such as unlocking secret missions after completing diplomatic actions) or immediately activating occupation/management decisions for specific states. Note that this command bypasses the decision's visible/available conditions and cooldowns, but cannot activate decisions that are already in an active state in the UI.
# After completing a national focus, forcibly activate a special management decision for target states
complete_national_focus = my_secret_project_focus
hidden_effect = {
every_controlled_state = {
limit = { is_core_of = ROOT }
activate_targeted_decision = {
target = ROOT
decision = decision_establish_secret_facility
}
}
}
Synergy
[remove_targeted_decision](/wiki/effect/remove_targeted_decision): The counterpart to activate_targeted_decision, used to manually remove activated decisions after completion or when conditions change, together forming a complete lifecycle management system for decisions.
[has_active_mission](/wiki/trigger/has_active_mission): Check whether a similar mission is already active before activating a decision/mission to avoid duplicate activation causing logical conflicts.
[activate_mission_tooltip](/wiki/effect/activate_mission_tooltip): Provides UI-level feedback to the player that a mission has been activated; combined with activate_targeted_decision, it enhances player awareness of narrative progression.
[add_days_mission_timeout](/wiki/effect/add_days_mission_timeout): Immediately set a countdown timer for an activated mission, suitable for narrative decisions with time constraints.
Common Pitfalls
- Calling the command when the decision is already visible in the UI is ineffective: If the target decision is currently visible to the player and in an active state (i.e.,
has_active_mission is true), this command will silently fail without errors or state reset. Beginners often mistakenly assume the scope is written incorrectly and debug repeatedly.
- Confusion between scope and target: The
target field in this command specifies the execution subject of the decision (TAG or STATE), while the scope in which the command resides determines "who triggers the activation". When these are inconsistent, the decision may be attached to the wrong object. This is especially common in state-level decisions where COUNTRY scope and STATE scope are easily reversed.