Wiki

effect · unlock_mio_policy_tooltip

Definition

  • Supported scope:any
  • Supported target:none

Description

Display a tooltip saying the MIO policy is made available (aka unlocked).
ex:
unlock_mio_policy_tooltip = my_policy_token
unlock_mio_policy_tooltip = {
	policy = my_policy_token
	show_modifiers = no # show bonuses in tooltip - optional, default = yes
}

实战 · 配合 · 坑

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

实战用法

unlock_mio_policy_tooltip 主要用于在 focus、decision 或 event 的 option 中展示"某项 MIO 政策即将解锁"的提示文本,让玩家在点击前就能清楚了解即将发生的变化。当与实际解锁效果分离(例如真正的解锁写在 hidden_effect 内)时,该命令可单独负责 UI 反馈层,保持视觉提示与逻辑执行解耦。

option = {
    name = my_event.option.a
    # 仅显示 tooltip,不执行实际解锁
    unlock_mio_policy_tooltip = {
        policy = mio_policy_advanced_production
        show_modifiers = yes
    }
    # 实际解锁逻辑写在别处或由 hidden_effect 触发
    hidden_effect = {
        # 真正的解锁 effect
    }
}

配合关系

  • [custom_effect_tooltip](/wiki/effect/custom_effect_tooltip):当需要在同一块 UI 中追加自定义说明文字时,与本命令并列使用,可形成完整的"政策解锁 + 额外说明"组合提示。
  • [hidden_effect](/wiki/effect/hidden_effect):将真实的游戏状态改动(如实际调用解锁函数)藏入 hidden_effect,而用本命令单独控制玩家可见的 tooltip,实现提示与执行分离。
  • [effect_tooltip](/wiki/effect/effect_tooltip):若同一 option 内还有其他需要提前预告的效果,effect_tooltip 可与本命令配合,共同构建完整的"预告性 tooltip"层。

常见坑

  1. 误以为该命令会真正解锁政策unlock_mio_policy_tooltip 仅负责显示提示文本,不会对游戏状态产生任何实际影响;忘记在逻辑块中调用真正的解锁 effect,会导致界面显示"已解锁"但实际政策不可用的矛盾现象。
  2. show_modifiers 字段缺失时的误解:该字段默认为 yes,若政策的加成尚未填写完整或数值仍在调试中,tooltip 会直接把空白或错误的修正值暴露给玩家,应在调试阶段临时设为 show_modifiers = no 以避免误导。

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_policy_tooltip is primarily used within focus, decision, or event option blocks to display a tooltip indicating "a certain MIO policy is about to be unlocked," allowing players to understand the forthcoming changes before clicking. When separated from the actual unlock effect (for example, when the real unlock is written inside hidden_effect), this command can handle the UI feedback layer independently, maintaining a decoupled design between visual hints and logical execution.

option = {
    name = my_event.option.a
    # Display tooltip only, does not execute actual unlock
    unlock_mio_policy_tooltip = {
        policy = mio_policy_advanced_production
        show_modifiers = yes
    }
    # Actual unlock logic is placed elsewhere or triggered by hidden_effect
    hidden_effect = {
        # True unlock effect
    }
}

Synergy

  • [custom_effect_tooltip](/wiki/effect/custom_effect_tooltip): When additional custom explanatory text needs to be appended within the same UI block, use this command alongside the policy tooltip to form a complete "policy unlock + additional explanation" composite tooltip.
  • [hidden_effect](/wiki/effect/hidden_effect): Conceal actual gameplay state changes (such as calling the real unlock function) within hidden_effect, while using this command alone to control the player-visible tooltip, achieving a separation between hint and execution.
  • [effect_tooltip](/wiki/effect/effect_tooltip): If other effects requiring advance notice exist within the same option block, effect_tooltip can work in tandem with this command to construct a complete "advance notice tooltip" layer.

Common Pitfalls

  1. Mistaking this command for actually unlocking the policy: unlock_mio_policy_tooltip only handles displaying the hint text and produces no actual impact on game state; forgetting to call the true unlock effect in the logic block will result in the contradictory phenomenon where the interface shows "unlocked" but the policy is actually unavailable.
  2. Misunderstanding when the show_modifiers field is absent: This field defaults to yes; if the policy's modifiers are not yet fully populated or values are still under testing, the tooltip will directly expose blank or incorrect modifier values to the player. You should temporarily set show_modifiers = no during the debugging phase to avoid misleading players.