Wiki

effect · unlock_mio_trait_tooltip

Definition

  • Supported scope:INDUSTRIAL_ORG
  • Supported target:none

Description

Display a tooltip saying the trait is made available (aka unlocked).
ex:
mio:my_mio = {
  unlock_mio_trait_tooltip = trait
  unlock_mio_trait_tooltip = {
	trait = my_trait_token
	show_modifiers = no # Optional, default = yes
  }
}

实战 · 配合 · 坑

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

实战用法

unlock_mio_trait_tooltip 常用于 MIO(军事工业组织)的 trait 解锁逻辑中,当你希望在某个 effect 块里仅展示提示信息而不真正执行解锁时使用,典型场景是在 custom_effect_tooltip 替代方案或 focus/decision 的预览阶段让玩家看到"此特性将被解锁"的提示。例如在国策完成时,搭配实际执行命令一起写:

# 在 focus complete_effect 中
mio:my_country_mio = {
    unlock_mio_trait_tooltip = {
        trait = advanced_assembly_line
        show_modifiers = no
    }
    complete_mio_trait = advanced_assembly_line
}

配合关系

  • [complete_mio_trait](/wiki/effect/complete_mio_trait):最直接的搭档——tooltip 负责向玩家展示"即将解锁"的说明,complete_mio_trait 负责真正执行解锁,两者通常成对出现。
  • [is_mio_trait_available](/wiki/trigger/is_mio_trait_available):在执行前用该 trigger 判断特性是否已处于可用状态,避免重复触发或逻辑冲突,tooltip 的显示也更准确。
  • [is_mio_trait_completed](/wiki/trigger/is_mio_trait_completed):用于条件门控,确保 tooltip 只在特性尚未完成时显示,防止向玩家展示已解锁特性的冗余提示。
  • [add_mio_research_bonus](/wiki/effect/add_mio_research_bonus):常见组合场景是同一个 focus 或 decision 既解锁特性又给予研究加成,tooltip 与此命令并列出现以完整呈现该决策的所有收益。

常见坑

  1. 误以为该命令会真正解锁特性unlock_mio_trait_tooltip 仅生成 UI 提示,不改变任何游戏状态。新手常忘记同时写 complete_mio_trait,结果国策完成后玩家界面显示特性已解锁,实际 MIO 面板中却没有任何变化。
  2. 在非 INDUSTRIAL_ORG scope 下调用:该命令必须在 mio:xxx = { } 块内使用,若直接写在国家 scope 的 effect 块中会导致脚本报错或静默失效,需确保已通过 mio: 前缀正确切换到目标 MIO 的 scope。

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

unlock_mio_trait_tooltip is commonly used in MIO (Military Industrial Organization) trait unlock logic when you want to display tooltip information only within an effect block without actually executing the unlock. Typical scenarios include preview stages in custom_effect_tooltip alternatives or focus/decision windows where you want players to see the "this trait will be unlocked" notification. For example, when completing a focus, write it together with the actual execution command:

# In focus complete_effect
mio:my_country_mio = {
    unlock_mio_trait_tooltip = {
        trait = advanced_assembly_line
        show_modifiers = no
    }
    complete_mio_trait = advanced_assembly_line
}

Synergy

  • [complete_mio_trait](/wiki/effect/complete_mio_trait): The most direct partner—tooltip handles displaying "about to unlock" descriptions to the player, while complete_mio_trait handles the actual unlock execution. These two typically appear as a pair.
  • [is_mio_trait_available](/wiki/trigger/is_mio_trait_available): Use this trigger before execution to check whether the trait is already in an available state, preventing duplicate triggers or logical conflicts. The tooltip display will also be more accurate.
  • [is_mio_trait_completed](/wiki/trigger/is_mio_trait_completed): Used for conditional gating to ensure the tooltip only displays when the trait hasn't been completed yet, preventing redundant notifications about already-unlocked traits.
  • [add_mio_research_bonus](/wiki/effect/add_mio_research_bonus): A common combination scenario where the same focus or decision both unlocks a trait and grants research bonuses. The tooltip and this command appear side by side to fully present all benefits of that decision.

Common Pitfalls

  1. Mistaking this command for actually unlocking the trait: unlock_mio_trait_tooltip only generates UI tooltips and doesn't change any game state. Beginners often forget to also write complete_mio_trait, resulting in the trait appearing as unlocked in the player's interface after focus completion, but with no actual changes in the MIO panel.
  2. Calling it outside an INDUSTRIAL_ORG scope: This command must be used within an mio:xxx = { } block. Writing it directly in a nation scope's effect block will cause script errors or silent failures. Ensure you've correctly switched to the target MIO's scope using the mio: prefix.