Wiki

effect · event_option_tooltip

Definition

  • Supported scope:any
  • Supported target:none

Description

Shows the tooltip text of an event option in other tooltips(root and from scopes are swapped).
Example:
event_option_tooltip = mtg_usa_civil_war_fascists.1.a

实战 · 配合 · 坑

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

实战用法

event_option_tooltip 常用于自定义国策、决策或事件的 custom_effect_tooltip 场景中,当你希望在某个触发器或效果说明里直接复用已有事件选项的描述文本,而无需重复撰写本地化字符串。例如在一个国策完成效果里,向玩家预告后续事件将出现的某个选项内容:

focus = {
    id = my_focus
    ...
    completion_reward = {
        custom_effect_tooltip = my_tooltip_key
        event_option_tooltip = my_mod_event.5.a
    }
}

这样玩家在悬停国策时可直接看到 my_mod_event.5.a 选项的描述,了解即将发生什么。

配合关系

  • [custom_effect_tooltip](/wiki/effect/custom_effect_tooltip):通常在同一个 tooltip 展示块里先用自定义文本概括情景,再紧跟 event_option_tooltip 展示具体选项细节,层次更清晰。
  • [effect_tooltip](/wiki/effect/effect_tooltip):当需要同时预览某段效果块的结果与某个事件选项文本时,两者并列使用,让玩家一次性获得完整信息。
  • [hidden_effect](/wiki/effect/hidden_effect):实际触发事件的逻辑往往包裹在 hidden_effect 内,而 event_option_tooltip 则放在外部负责可见提示,形成"隐藏执行 + 显式告知"的标准模式。

常见坑

  1. 选项路径写错大小写或拼写:事件选项 ID(如 my_mod_event.5.a)必须与事件文件中 id 字段完全一致,任何拼写偏差都会导致 tooltip 静默失败,既不报错也不显示文本,极难排查。
  2. 误以为它会真正触发事件或选项效果event_option_tooltip 仅用于显示该选项的 tooltip 文本,不会执行选项内的任何 effect,新手常将其与实际触发事件的指令混淆,导致逻辑缺失。

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

event_option_tooltip is commonly used in custom focus trees, decisions, or events within a custom_effect_tooltip context. It allows you to directly reuse the description text of an existing event option without duplicating localization strings. For example, in a focus completion reward, you can preview an event option that will appear to the player in subsequent events:

focus = {
    id = my_focus
    ...
    completion_reward = {
        custom_effect_tooltip = my_tooltip_key
        event_option_tooltip = my_mod_event.5.a
    }
}

This way, when players hover over the focus, they can directly see the description of the my_mod_event.5.a option and understand what will happen next.

Synergy

  • [custom_effect_tooltip](/wiki/effect/custom_effect_tooltip): Typically used together in the same tooltip block—first use custom text to summarize the scenario, then follow with event_option_tooltip to show specific option details for clearer hierarchy.
  • [effect_tooltip](/wiki/effect/effect_tooltip): When you need to preview both the results of an effect block and an event option's text simultaneously, use both side by side to give players complete information at once.
  • [hidden_effect](/wiki/effect/hidden_effect): The logic that actually triggers an event is often wrapped in hidden_effect, while event_option_tooltip sits outside to provide visible hints, forming the standard "hidden execution + explicit notification" pattern.

Common Pitfalls

  1. Incorrect capitalization or spelling in the option path: The event option ID (such as my_mod_event.5.a) must match the id field in the event file exactly. Any spelling deviation will cause the tooltip to silently fail—no error message and no text displayed—making it extremely difficult to debug.
  2. Mistakenly thinking it will actually trigger the event or execute option effects: event_option_tooltip is used only to display that option's tooltip text; it does not execute any effects contained within the option. Beginners often confuse it with commands that actually trigger events, resulting in missing logic.