trigger · has_equipment
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
checks for amount of equipment stored
has_equipmentCOUNTRYnonechecks for amount of equipment stored
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.
has_equipment is commonly used to check whether a country's equipment stockpile reaches a threshold, thereby determining whether a decision is available, a focus is unlocked, or an AI strategy is triggered. For example, in resource-consuming decisions, you can place it in the available block to ensure the player has sufficient rifles or tanks before executing the decision:
available = {
has_equipment = {
infantry_equipment > 500
}
}
[add_equipment_to_stockpile](/wiki/effect/add_equipment_to_stockpile): First use has_equipment to check whether stockpile is sufficient, then use this effect to replenish or transfer equipment, forming a "check → execute" loop.[add_equipment_production](/wiki/effect/add_equipment_production): When has_equipment determines stockpile is insufficient, trigger additional production lines; commonly seen in AI supply logic.[has_army_size](/wiki/trigger/has_army_size): Used together with has_equipment to simultaneously confirm both army size and equipment stockpile meet conditions, preventing situations where you have troops but no equipment or vice versa.[any_owned_state](/wiki/trigger/any_owned_state): In scope nesting, first narrow down to a specific state to check factory capacity, then return to COUNTRY scope and use has_equipment to confirm stockpile, forming a more granular chain of trigger conditions.has_equipment must exactly match the equipment archetype names defined in the game (such as infantry_equipment, artillery_equipment). Any mistakes in capitalization or underscores will cause the condition to always evaluate as false, and no error message will be displayed, making it extremely difficult to debug.limit is nested within every_owned_state), the condition will fail to evaluate correctly. You must use PREV/ROOT to switch back to country scope before invoking it.