Hands-On Usage
is_mio_visible is used to dynamically detect whether the visible condition of a specific military industrial organization is currently satisfied in a mod. It is commonly used in scenarios where you need to decide whether to execute subsequent logic based on the MIO's visibility state, such as conditionally displaying trait unlock tooltips or restricting certain operations. A typical usage pattern is within the available block of an MIO's trait or strategy, where you first confirm that the organization is visible to the player before making further judgments.
# In the trigger block of an event or decision, check whether a specific MIO is visible
mio:my_custom_mio = {
is_mio_visible = yes
has_mio_size > 2
}
Synergy
[is_mio_available](/wiki/trigger/is_mio_available): Visibility (visible) and availability (available) are two independent dimensions that typically need to be checked simultaneously to ensure that the MIO is both displayed to the player and in an interactive state.
[has_mio_trait](/wiki/trigger/has_mio_trait): After confirming that the MIO is visible, further check whether a specific trait has been unlocked to build multi-layered conditional gating logic.
[has_mio_size](/wiki/trigger/has_mio_size): Visibility is often tied to organization scale; combining it with scale checks allows for more precise descriptions of the MIO's development stage.
[unlock_mio_trait_tooltip](/wiki/effect/unlock_mio_trait_tooltip): When is_mio_visible = yes is satisfied as a prerequisite condition, use this effect to display trait unlock tooltip information to the player, forming a complete flow of "first confirm visibility → then provide feedback".
Common Pitfalls
- Confusing scope syntax: Beginners often write
is_mio_visible = yes directly under a country scope, but this trigger must execute within an INDUSTRIAL_ORG scope. You need to switch to the corresponding MIO scope first via mio:TAG_mio_name = { ... } or similar constructs; otherwise the script will error or fail silently.
- Mistaking it for
is_mio_available: is_mio_visible only checks the visible condition block defined in the MIO and does not mean the organization can be assigned or used. If your intent is to determine whether the player can interact with the MIO, you should check both conditions together by combining it with [is_mio_available](/wiki/trigger/is_mio_available).