trigger · is_tutorial
Definition
- Supported scope:
any - Supported target:
none
Description
check if the tutorial is active
is_tutorialanynonecheck if the tutorial is active
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_tutorial 常用于 mod 中需要屏蔽或简化某些复杂机制的场景——例如在新手教程激活时跳过特定事件选项、禁用某些 focus 分支或隐藏高级 UI 提示,避免干扰官方教程流程。由于它作用于 any scope,可以直接嵌入几乎任何条件块中使用。
# 在 focus 的 available 块中,教程模式下禁用某个高难度 focus
available = {
NOT = { is_tutorial = yes }
}
# 在事件选项中,教程激活时显示简化提示
option = {
name = my_event.option_a
trigger = {
NOT = { is_tutorial = yes }
}
# ... 复杂效果
}
[is_ironman](/wiki/trigger/is_ironman):两者常一起出现在"特殊模式检测"逻辑中,用于同时排除成就模式与教程模式下的特定内容。[is_historical_focus_on](/wiki/trigger/is_historical_focus_on):教程通常强制使用历史焦点,联合使用可精确识别"标准教程环境"以做出差异化处理。[has_global_flag](/wiki/trigger/has_global_flag):教程阶段可能设置特定全局标记,与 is_tutorial 配合做双重保险判断,防止逻辑误触发。[custom_trigger_tooltip](/wiki/trigger/custom_trigger_tooltip):包裹 is_tutorial 可为玩家在 UI 中显示人类可读的提示文本,说明为何某选项在教程中不可用。is_tutorial 是纯条件判断,不能直接写在 effect 块里,必须放在 trigger、limit、available、allowed 等条件块内,否则解析器会报错或静默忽略。is_tutorial = no 通过了,也不代表其他条件在教程中一定正常生效,建议在测试 mod 时主动用教程存档验证一次。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.
is_tutorial is commonly used in mods to gate or simplify complex mechanics during tutorial scenarios—for example, skipping specific event options when the tutorial is active, disabling certain focus branches, or hiding advanced UI tooltips to avoid interfering with the official tutorial flow. Since it operates on any scope, it can be embedded directly into almost any conditional block.
# In a focus's available block, disable a challenging focus during tutorial mode
available = {
NOT = { is_tutorial = yes }
}
# In an event option, show a simplified tooltip when tutorial is active
option = {
name = my_event.option_a
trigger = {
NOT = { is_tutorial = yes }
}
# ... complex effects
}
[is_ironman](/wiki/trigger/is_ironman): These two often appear together in "special mode detection" logic to simultaneously exclude content from both ironman and tutorial modes.[is_historical_focus_on](/wiki/trigger/is_historical_focus_on): Tutorials typically enforce historical focuses; combining them allows precise identification of a "standard tutorial environment" for differential handling.[has_global_flag](/wiki/trigger/has_global_flag): The tutorial phase may set specific global flags; pairing with is_tutorial provides double-redundancy checks to prevent unintended logic triggers.[custom_trigger_tooltip](/wiki/trigger/custom_trigger_tooltip): Wrapping is_tutorial in this allows you to display human-readable tooltip text to players explaining why an option is unavailable during the tutorial.is_tutorial is a pure condition check and cannot be placed directly in effect blocks. It must go inside conditional blocks like trigger, limit, available, or allowed, otherwise the parser will error or silently ignore it.is_tutorial = no passes, other conditions may not behave normally in the tutorial. It is recommended to verify your mod at least once using a tutorial save file during testing.