Hands-On Usage
custom_trigger_tooltip is a backward-compatible alias for custom_override_tooltip, commonly found in legacy mods to replace the tooltip text displayed to players within condition blocks, presenting complex logical checks as more user-friendly localized strings. For example, hiding internal variable checks within a focus's available block and showing only player-readable condition descriptions:
available = {
custom_trigger_tooltip = {
tooltip = my_focus_requirement_tt
check_variable = { var = my_mod_progress value = 5 compare = greater_than }
}
}
Synergy
[custom_override_tooltip](/wiki/trigger/custom_override_tooltip): This is its modern equivalent command. New mods are recommended to migrate uniformly to this command; both can be mixed within the same condition block to differentiate legacy and new logic.
[check_variable](/wiki/trigger/check_variable): Most commonly used as the inner check wrapped by custom_trigger_tooltip, concealing variable value comparisons behind custom tooltip text.
[if](/wiki/trigger/if): Using in combination enables "display custom tooltip only under specific conditions," making UI feedback more conditional.
[custom_effect_tooltip](/wiki/effect/custom_effect_tooltip): The corresponding tooltip override mechanism on the effect side. Custom tooltips for triggers and effects typically appear in pairs to maintain consistent UI styling.
Common Pitfalls
- Should not be prioritized in new mods: Many developers copy this command from legacy tutorials without noticing that the official recommendation has shifted to
custom_override_tooltip, resulting in inconsistent code style and questionable future compatibility.
- Tooltip key not localized: If the localization string corresponding to
tooltip = my_key is not defined in the .yml file, the game will display the raw key string instead of the tooltip text. This error often goes unnoticed in error.log without obvious warnings, making it easy to overlook.