Wiki

effect · unlock_decision_tooltip

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

show what decision does
Example: unlock_decision_tooltip = some_decision_here
Example:
unlock_decision_tooltip = {
    decision = <some_decision>
    show_effect_tooltip = yes # default is no
    show_modifiers = yes # default is no
}

实战 · 配合 · 坑

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

实战用法

unlock_decision_tooltip 常用于国策完成或事件选项中,以 tooltip 形式预告某个决策将会解锁,让玩家在做选择前就能看清该决策的效果与加成,而不真正执行解锁。例如在一个国策的 completion_reward 中展示即将开放的军事决策内容:

completion_reward = {
    unlock_decision_tooltip = {
        decision = my_mod_military_buildup_decision
        show_effect_tooltip = yes
        show_modifiers = yes
    }
}

配合关系

  • [activate_decision](/wiki/effect/activate_decision)unlock_decision_tooltip 负责提前在 tooltip 中展示决策效果,而 activate_decision 才是真正激活并执行该决策,二者常配合使用形成"预览→执行"流程。
  • [activate_targeted_decision](/wiki/effect/activate_targeted_decision):当决策是针对目标国家的定向决策时,可用此命令配套激活,而 tooltip 效果预览则由 unlock_decision_tooltip 承担。
  • [has_decision](/wiki/trigger/has_decision):在触发条件中检查玩家是否已持有某决策,配合 tooltip 展示逻辑,可避免重复向玩家显示已激活的决策预告。

常见坑

  1. 误以为它会真正解锁决策unlock_decision_tooltip 仅是 UI 展示层的 tooltip 预览,不会实际将决策添加到决策面板,新手常把它与 activate_decision 混淆,写完后发现决策根本没有出现在游戏界面中。
  2. 忘记设置 show_effect_tooltip 导致 tooltip 内容为空:使用简写形式(直接赋值决策名)时,默认不显示效果说明与修正值,若想让玩家看到完整的收益描述,必须使用块语法并显式开启 show_effect_tooltip = yes

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_decision_tooltip is commonly used in focus tree completions or event choices to preview a decision's unlock via tooltip, allowing players to see the decision's effects and bonuses before making their choice without actually executing the unlock. For example, displaying upcoming military decision content in a focus's completion_reward:

completion_reward = {
    unlock_decision_tooltip = {
        decision = my_mod_military_buildup_decision
        show_effect_tooltip = yes
        show_modifiers = yes
    }
}

Synergy

  • [activate_decision](/wiki/effect/activate_decision): unlock_decision_tooltip is responsible for previewing the decision effect in tooltip form, while activate_decision actually activates and executes the decision. These two are commonly paired together to create a "preview→execute" workflow.
  • [activate_targeted_decision](/wiki/effect/activate_targeted_decision): When a decision targets a specific country, this command can be used to activate it alongside the tooltip preview functionality provided by unlock_decision_tooltip.
  • [has_decision](/wiki/trigger/has_decision): Check in trigger conditions whether the player already possesses a certain decision. Combined with tooltip display logic, this prevents repeatedly showing previews for already-activated decisions.

Common Pitfalls

  1. Mistaking it for actually unlocking the decision: unlock_decision_tooltip is merely a UI-layer tooltip preview and does not actually add the decision to the decision panel. Newcomers often confuse it with activate_decision, only to discover after implementation that the decision never appears in the game interface.
  2. Forgetting to set show_effect_tooltip resulting in empty tooltip content: When using the shorthand form (directly assigning the decision name), effects and modifiers are not shown by default. To display complete benefit descriptions to players, you must use block syntax and explicitly enable show_effect_tooltip = yes.