Wiki

trigger · skill

Definition

  • Supported scope:CHARACTER, COMBATANT
  • Supported target:none

Description

compare leader skill levels

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

skill is commonly used to dynamically restrict or trigger specific events based on a commander's overall proficiency level. For example, you can allow only high-ranking officers to unlock certain special decisions, or determine in events whether a character is experienced enough for a particular role. It covers both CHARACTER and COMBATANT scopes, making it usable in character-focused events as well as directly in combat-related limit blocks.

# Trigger elite commander exclusive event only when skill level >= 4
character_event = {
    id = my_mod.101
    trigger = {
        is_army_leader = yes
        skill >= 4
    }
    ...
}

Synergy

  • [attack_skill_level](/wiki/trigger/attack_skill_level) / [defense_skill_level](/wiki/trigger/defense_skill_level) — Combine these when you need to distinguish between "overall skill" and "specialized skill categories," enabling more granular commander filtering.
  • [has_trait](/wiki/trigger/has_trait) — Frequently paired with skill to check both skill level and traits simultaneously, preventing events from triggering based purely on numbers while overlooking character traits.
  • [add_skill_level](/wiki/effect/add_skill_level) — Used as a companion reward effect: first use skill to verify the current level ceiling, then decide whether to grant additional levels, preventing design overflow.
  • [skill_advantage](/wiki/trigger/skill_advantage) — In combat scope, skill checks absolute value while skill_advantage checks relative advantage; combining both allows you to write conditions like "triggered only when the strong encounter the weak."

Common Pitfalls

  1. Confusing overall skill with specialized skills: skill compares the character's overall proficiency level, not attack, defense, logistics, and other sub-categories. Beginners often mistake it for a specific attribute, resulting in selection criteria that don't match expectations. Use attack_skill_level, logistics_skill_level, and similar specialized triggers when filtering by individual skills is needed.
  2. Calling in the wrong scope: skill only works within CHARACTER or COMBATANT scope. Writing skill >= 3 directly inside a country scope (TAG scope) will silently fail or cause errors. You must first iterate into the correct scope via any_character, any_army_leader, and similar commands before using it.