Wiki

trigger · is_tutorial

Definition

  • Supported scope:any
  • Supported target:none

Description

check if the tutorial is active

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

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
}

Synergy

  • [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.

Common Pitfalls

  1. Misusing it in effect blocks: 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.
  2. Overlooking special game states in tutorial mode: The tutorial mode has different game states (nations, resources, etc.) compared to normal playthroughs. Even if 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.