Wiki

trigger · has_completed_focus

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

has country completed focus

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_completed_focus is most commonly used to check prerequisites in focus tree chains—for instance, allowing a specific decision, war goal, or scripted event to trigger only after the player or AI has completed a particular focus. It can also be used within an available block to restrict decision eligibility, or in a trigger block to verify dialogue conditions.

# Only allow this decision if the nation has completed the "Industrial Plan" focus
decision_my_expansion = {
    available = {
        has_completed_focus = industrial_plan
    }
    # ...
}

# Check focus completion status in event trigger conditions
country_event = {
    trigger = {
        has_completed_focus = secret_rearmament
        NOT = { has_country_flag = rearm_event_fired }
    }
}

Synergy

  • [has_country_flag](/wiki/trigger/has_country_flag): Completing a focus typically sets a country flag; combining the two allows you to distinguish "focus completed but event fires only once" logic and avoid redundant checks.
  • [has_decision](/wiki/trigger/has_decision): Used together with has_completed_focus, you can construct composite prerequisites like "focus completed + decision available" to precisely control unlock chains.
  • [complete_national_focus](/wiki/effect/complete_national_focus): After forcibly completing a focus via effect, subsequent triggers often need has_completed_focus to verify state, forming a "write-read" pairing.
  • [focus_progress](/wiki/trigger/focus_progress): When you need to distinguish between "focus in progress" and "focus completed" states, combine it with has_completed_focus for finer-grained progress checks.

Common Pitfalls

  1. Typos in focus ID or scope errors: This trigger only works in COUNTRY scope; using it in STATE or CHARACTER scope will silently fail or throw an error. Additionally, the focus ID must exactly match the id field defined in the focus_tree file, including capitalization—a single letter difference will always return false.
  2. Mistakenly assuming you can check other nations' focuses: has_completed_focus checks the focus status of the current scope's nation by default. To check whether an ally or enemy has completed a focus, you must first switch scope using iterators like any_allied_country or any_neighbor_country. Beginners often miss this step, resulting in the check always evaluating against their own nation.