trigger · skill_advantage
Definition
- Supported scope:
COMBATANT - Supported target:
none
Description
compare leader skill levels
skill_advantageCOMBATANTnonecompare leader skill levels
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.
skill_advantage is commonly used in AI or event scripts to trigger special combat events or adjust tactical decisions based on the skill gap between opposing commanders. For example, in "famous general system" style mods, it can trigger morale bonus events for the side with superior skills. It can also be used in combat-related limit blocks to permit certain tactical maneuver options only when your commander's combined skill exceeds the opponent's.
# Trigger special combat event when your commander has skill advantage
combat_event = {
id = my_mod.101
trigger = {
is_attacker = yes
skill_advantage > 2
is_winning = no # Has skill advantage but temporarily behind, more dramatic tension
}
...
}
[skill](/wiki/trigger/skill) —— skill checks the commander's absolute skill value, forming a complement to skill_advantage's relative difference comparison. Both conditions can be used together to enforce "your skill is high enough AND relatively superior."[is_attacker](/wiki/trigger/is_attacker) / [is_defender](/wiki/trigger/is_defender) —— The significance of skill advantage differs between attacker and defender in combat. Usually you need to distinguish faction roles first before evaluating skill gaps.[is_winning](/wiki/trigger/is_winning) —— When combined with victory/defeat status, it helps identify anomalous situations like "skill advantage yet still losing," useful for triggering comeback events.[has_trait](/wiki/trigger/has_trait) —— High-tier tactical rewards activate only when the commander has skill advantage AND simultaneously possesses specific traits, allowing the skill system and trait system to synergize.skill_advantage to judge whether a commander's "absolute skill is high enough," but this trigger compares the difference between both sides' skills. If both commanders have high skills but differ little, the result may be negative or near zero—in such cases, use [skill](/wiki/trigger/skill) for absolute value checks instead.skill_advantage only works in COMBATANT scope (i.e., belligerents in active combat). If placed in condition blocks under normal country scope or character scope, the script will silently fail or error. Always ensure the trigger environment is in an active combat context.