Hands-On Usage
This trigger is commonly used to dynamically fire events or unlock new content based on the traits completed by a Military Industrial Organization, for example allowing a decision to be executed or granting special rewards only after an MIO has accumulated a sufficient number of completed traits. It can also be used in the available block to restrict the availability conditions of a focus or decision, ensuring that the player's MIO has reached a certain level of maturity.
# Allow special research bonuses to be unlocked once the MIO has completed enough traits
some_mio_scope = {
limit = {
has_mio_number_of_completed_traits > 3
}
add_mio_research_bonus = {
# ... reward configuration
}
}
Synergy
[is_mio_trait_completed](/wiki/trigger/is_mio_trait_completed): Often paired with this trigger to simultaneously verify that the total count threshold is met while also checking whether a specific critical trait has been unlocked, enabling more precise conditional branching.
[has_mio_size](/wiki/trigger/has_mio_size): MIO size and trait count typically grow in tandem; using both together ensures the MIO reaches expected levels in both scale and research depth.
[complete_mio_trait](/wiki/effect/complete_mio_trait): Once the trait count threshold is satisfied, this effect can be used to automatically complete a specific trait, implementing a "cascading unlock triggered at N traits" design pattern.
[add_mio_research_bonus](/wiki/effect/add_mio_research_bonus): Commonly serves as a reward when this trigger evaluates to true, progressively boosting the MIO's research bonus based on the completion stage of finished traits.
Common Pitfalls
- Incorrect comparison operator syntax: This trigger uses
> / < rather than = for comparison; beginners often mistakenly write has_mio_number_of_completed_traits = 5, which is syntactically invalid and causes script errors or conditions to never evaluate correctly. Always use greater-than/less-than operators.
- Wrong scope: This trigger only functions within the
INDUSTRIAL_ORG scope; if written directly in a country or provincial scope without first switching to the specific MIO scope, the condition will fail to evaluate properly. Ensure correct MIO scope using constructs like var:my_mio_var = { ... }.