effect · unlock_decision_category_tooltip
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
localizes name of category and displays tooltip that shows it will be unlocked
unlock_decision_category_tooltipCOUNTRYnonelocalizes name of category and displays tooltip that shows it will be unlocked
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
unlock_decision_category_tooltip 主要用在国策或决策的 complete_effect / option 块中,当你想在执行逻辑的同时向玩家显示即将解锁某个决策类别的提示文本,而不是静默地解锁。例如在某科技树国策完成后,向玩家明确展示"某外交行动类别将被解锁"的本地化名称与说明:
complete_effect = {
# 实际解锁逻辑由其他 effect 完成
# 此处仅显示解锁提示 tooltip
unlock_decision_category_tooltip = {
decision_category = my_mod_diplomacy_category
}
add_political_power = 50
}
[has_decision](/wiki/trigger/has_decision):常用于 available 或 visible 条件检查,确认当前某决策状态后再触发 tooltip 展示,避免在不合适的时机显示提示。[activate_decision](/wiki/effect/activate_decision):与 tooltip 效果互补——activate_decision 负责真正激活决策,而 unlock_decision_category_tooltip 仅提供玩家可见的 UI 反馈,两者配合实现"展示 + 执行"的完整流程。[activate_mission_tooltip](/wiki/effect/activate_mission_tooltip):同为纯 tooltip 类效果,常在同一 option 块中并列使用,统一向玩家展示多个即将发生的变化,保持 UI 提示风格一致。[add_political_power](/wiki/effect/add_political_power):典型的"实质性效果 + tooltip 提示"组合,在给予实际奖励的同时用 tooltip 向玩家说明后续决策类别的解锁情况。visible/available 块中的 flag 或 trigger)才能完成真正的"解锁",单独使用不会有任何功能性效果。decision_category 键:如果填写的决策类别 ID 在 common/decision_categories/ 中未定义,游戏不会报错崩溃,但 tooltip 会显示为空字符串或本地化缺失的 key,导致玩家看到乱码提示,需确保 category ID 与文件定义完全一致。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.
unlock_decision_category_tooltip is primarily used within the complete_effect or option blocks of focuses or decisions. Use it when you want to execute logic while displaying a tooltip to the player indicating that a decision category will be unlocked, rather than silently performing the unlock. For example, after completing a technology tree focus, you can explicitly show the player the localized name and description of "a diplomatic action category will be unlocked":
complete_effect = {
# Actual unlock logic is handled by other effects
# This only displays the unlock tooltip
unlock_decision_category_tooltip = {
decision_category = my_mod_diplomacy_category
}
add_political_power = 50
}
[has_decision](/wiki/trigger/has_decision): Commonly used in available or visible condition checks to verify the current state of a decision before triggering tooltip display, preventing tooltips from appearing at inappropriate times.[activate_decision](/wiki/effect/activate_decision): Complements the tooltip effect—activate_decision handles actually activating a decision, while unlock_decision_category_tooltip provides only the player-visible UI feedback. Together they implement the complete "display + execute" workflow.[activate_mission_tooltip](/wiki/effect/activate_mission_tooltip): Another pure tooltip effect, often used alongside other effects in the same option block to collectively display multiple impending changes to the player, maintaining consistent UI tooltip styling.[add_political_power](/wiki/effect/add_political_power): A typical combination of "substantive effect + tooltip feedback", simultaneously granting actual rewards while using tooltips to inform the player about subsequent decision category unlocks.visible/available blocks) to complete the true "unlock". Using it alone produces no functional effect.decision_category key: If the decision category ID you specify is not defined in common/decision_categories/, the game will not error or crash, but the tooltip will display as an empty string or a missing localization key, resulting in garbled text for the player. Ensure the category ID matches the file definition exactly.