Hands-On Usage
has_mio_policy_active is commonly used to dynamically adjust MIO behavior or unlock specific traits based on the currently active policy, such as allowing a research bonus trait to complete only when a certain production policy is enabled. Typical scenarios include restricting a trait to be unlocked only after its corresponding policy is activated in the MIO's available condition block, or branching logic in events/decisions based on policy status.
# Example: A certain MIO trait is only available when the "mass production" policy is activated
mio:my_tank_mio = {
is_mio_trait_available = {
token = my_advanced_armor_trait
available = {
has_mio_policy_active = mass_production_policy
}
}
}
Synergy
[has_mio_trait](/wiki/trigger/has_mio_trait): Often used in conjunction with has_mio_policy_active to simultaneously check "already owns a trait" and "has activated a policy" in condition blocks, forming stricter unlock prerequisites.
[is_mio_trait_completed](/wiki/trigger/is_mio_trait_completed): Combined usage can distinguish between the two dimensions of "whether a trait is completed" and "whether a policy is activated", avoiding duplicate rewards or logic conflicts.
[complete_mio_trait](/wiki/effect/complete_mio_trait): On the effect side, when the has_mio_policy_active condition is met, trigger this effect to automatically complete a trait, enabling policy-driven automated trait unlocking.
[add_mio_research_bonus](/wiki/effect/add_mio_research_bonus): Grant differentiated research bonuses based on different activated policies; pairing with has_mio_policy_active enables policy-branching reward logic.
Common Pitfalls
- Writing the trigger under national scope instead of MIO scope:
has_mio_policy_active can only be used within INDUSTRIAL_ORG scope. If written directly in the top-level trigger block of a national event or decision without first entering MIO scope via mio:xxx = { }, the game will report a scope error and the condition will never take effect.
- Filling the token field with a policy name string instead of the token identifier: This trigger accepts the policy's token (the identifier declared in the policy definition), not the localized display name or filename. Incorrect entries will cause the condition to silently fail and always return false.