Wiki

trigger · game_rules_allow_achievements

Definition

  • Supported scope:any
  • Supported target:none

Description

Returns true if all of the active game rule options allow achievements.

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

game_rules_allow_achievements is commonly used in custom achievement systems or Career Profile-related mods to verify that the current game rules configuration will not block achievement unlock before granting achievements. For example, when a focus is completed, check this condition first before triggering reward logic, avoiding false positives in non-ironman playthroughs:

focus = {
    id = my_focus_achievement_check
    available = {
        game_rules_allow_achievements = yes
    }
    completion_reward = {
        # Rewards that only make sense under game rules that allow achievements
    }
}

Synergy

  • [is_ironman](/wiki/trigger/is_ironman): Ironman mode is a prerequisite for unlocking achievements; both typically appear together in and blocks to jointly ensure the achievement environment is fully compliant.
  • [has_game_rule](/wiki/trigger/has_game_rule): When fine-grained checking of a specific game rule option is needed, it can be paired with game_rules_allow_achievements—first perform a blanket environment check, then branch on specific rule conditions.
  • [has_completed_custom_achievement](/wiki/trigger/has_completed_custom_achievement): In custom achievement systems, use game_rules_allow_achievements first to confirm the environment permits achievements, then use this trigger to check whether the player has already completed a given achievement, forming a complete achievement validation pipeline.
  • [custom_trigger_tooltip](/wiki/trigger/custom_trigger_tooltip): Wrapping this trigger within this command allows presenting a more player-friendly "game rules allow achievements" tooltip in the UI rather than exposing the raw condition name.

Common Pitfalls

  1. Mistaking it for an effect that "enables achievements": This command is purely a conditional trigger and can only appear in condition blocks; it cannot actively enable or disable achievement eligibility. Influencing game rule state requires relying on the game's built-in settings—the scripting layer cannot bypass this.
  2. Overlooking game rule stacking logic: This trigger checks whether all currently active game rule options collectively allow achievements. If any single rule prohibits achievements, the result is false. Beginners often assume that as long as the main rule allows it, that is sufficient, overlooking that other custom rule options equally affect the return value.