Wiki

trigger · has_decision

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

check if country has active selected decision

Hands-On Notes

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.

Hands-On Usage

has_decision is commonly used to check whether a specific decision is in an active state, thereby controlling the availability of subsequent decisions, focuses, or events and avoiding duplicate triggers or conflicting logic. For example, in a mod where a nation must first activate the "foreign_preparation_decision" decision to unlock the next phase of war options:

available = {
    has_decision = foreign_preparation_decision
}

Synergy

  • [has_active_mission](/wiki/trigger/has_active_mission): Decisions and missions are often used together. Combining both allows simultaneous checking of a nation's current "decision + mission" activation state, preventing logical gaps.
  • [activate_decision](/wiki/effect/activate_decision): Typically used in effect blocks to activate a decision, then verified in subsequent conditions with has_decision to confirm whether it has been activated, forming a closed loop of activation → verification.
  • [activate_targeted_decision](/wiki/effect/activate_targeted_decision): After activating a decision targeting a specific nation, use has_decision within the corresponding scope to confirm whether the decision takes effect. This is common in diplomatic mods.
  • [has_completed_focus](/wiki/trigger/has_completed_focus): A focus must be completed before allowing a decision to be activated. Then use has_decision to check whether that decision has been activated. Both together form a multi-stage unlock chain.

Common Pitfalls

  1. Misspelled decision token or case mismatch: The parameter for has_decision must exactly match the decision key defined in the decisions file (HOI4 scripts are case-sensitive). Misspelling the key will not produce an error but will always return false, causing the condition to never be met and making debugging difficult.
  2. Confusing with has_active_mission: Regular decisions and missions are two different types. has_decision cannot check mission-type decisions; you must use has_active_mission instead. Otherwise, the condition will never evaluate to true.