Wiki

trigger · is_mio_visible

Definition

  • Supported scope:INDUSTRIAL_ORG
  • Supported target:none

Description

Checks if the visible trigger in the Military Industrial Organisation in scope returns true.
ex:
mio:my_mio = {
	is_mio_visible = yes
	is_mio_visible = no
}

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

is_mio_visible 用于在 mod 中动态检测某个军事工业组织的 visible 条件是否当前成立,常见于需要根据 MIO 可见状态来决定是否执行后续逻辑的场景,例如条件性地展示特质解锁提示或限制某些操作。典型用法是在 MIO 的特质或策略的 available 块中,先确认该组织对玩家可见再做进一步判断。

# 在某个事件或决议的 trigger 块中,检查特定 MIO 是否可见
mio:my_custom_mio = {
    is_mio_visible = yes
    has_mio_size > 2
}

配合关系

  • [is_mio_available](/wiki/trigger/is_mio_available):可见(visible)与可用(available)是两个独立维度,通常需要同时检查,确保 MIO 既对玩家显示又处于可交互状态。
  • [has_mio_trait](/wiki/trigger/has_mio_trait):在确认 MIO 可见后,进一步检查是否已解锁特定特质,用于构建多层条件门控逻辑。
  • [has_mio_size](/wiki/trigger/has_mio_size):可见性往往与组织规模挂钩,配合规模判断可以更精确地描述 MIO 所处的发展阶段。
  • [unlock_mio_trait_tooltip](/wiki/effect/unlock_mio_trait_tooltip):当 is_mio_visible = yes 作为前置条件满足后,通过该 effect 向玩家展示特质解锁的提示信息,形成"先确认可见 → 再给反馈"的完整流程。

常见坑

  1. 混淆 scope 写法:新手容易直接在国家 scope 下写 is_mio_visible = yes,但该 trigger 必须在 INDUSTRIAL_ORG scope 内执行,需通过 mio:TAG_mio_name = { ... } 或类似方式先切换到对应 MIO scope,否则脚本会报错或静默失败。
  2. 误以为等同于 is_mio_availableis_mio_visible 仅检查 MIO 定义中的 visible 条件块,不代表该组织可以被分配或使用;若目的是判断玩家能否操作该 MIO,应同时搭配 [is_mio_available](/wiki/trigger/is_mio_available) 一并检查。

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

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

  1. 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.
  2. 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).