Wiki

trigger · has_government

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

does country government (ruling party) belong to ideology group

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_government is commonly used in political mods to unlock or restrict specific national focuses, decisions, and event options based on a country's current ruling ideology. For example, you can allow only fascist governments to trigger a coup event, or provide exclusive diplomatic bonus decisions for democratic nations.

# In a decision's available block, restrict execution to fascist governments only
decision_example = {
    available = {
        has_government = fascism
    }
    cost = political_power
    ...
}

Synergy

  • [has_country_leader_ideology](/wiki/trigger/has_country_leader_ideology): has_government checks the ruling party's ideology group, while has_country_leader_ideology checks the specific leader's ideology. Combining both allows for more granular filtering of political states.
  • [has_country_flag](/wiki/trigger/has_country_flag): Frequently used together in event trigger blocks. First use a flag to record whether an event has been triggered, then use has_government to confirm the current government still meets conditions, preventing duplicate triggers after regime changes.
  • [add_popularity](/wiki/effect/add_popularity): Use together in effect blocks to add support for the corresponding ideology when conditions are met, creating a logical loop of "current government → reinforces own popularity."
  • [any_neighbor_country](/wiki/trigger/any_neighbor_country): When iterating through neighboring countries in diplomatic AI or events, stack has_government filters to trigger alliance or intervention logic only for neighbors with matching ideologies.

Common Pitfalls

  1. Confusing ideology groups with specific ideologies: The value for has_government should be an ideology group (such as fascism, democratic, communism, neutrality), not a sub-ideology (such as nazism, stalinism). Using sub-ideologies won't cause an error but will always return false, making it extremely difficult to debug.
  2. Conditions become invalid after regime change: If you rely solely on has_government in a focus or mission's available block, and the player changes their government through civil war or coup mid-completion, the condition immediately fails causing the mission to abort or become uncompletable. It's recommended to pair this with [has_country_flag](/wiki/trigger/has_country_flag) to lock the state at trigger time.