trigger · skill
Definition
- Supported scope:
CHARACTER,COMBATANT - Supported target:
none
Description
compare leader skill levels
skillCHARACTER, COMBATANTnonecompare leader skill levels
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
skill 常用于根据指挥官综合等级来动态限制或触发特定事件,例如只允许高等级将领解锁某个特殊决议、或在事件中判断角色是否足够"资深"来担任某职务。它覆盖 CHARACTER 和 COMBATANT 两个 scope,因此既可以在人物聚焦事件里使用,也可以在战斗相关的 limit 块中直接判断。
# 仅当指挥官技能等级 >= 4 时,允许触发精英将领专属事件
character_event = {
id = my_mod.101
trigger = {
is_army_leader = yes
skill >= 4
}
...
}
[attack_skill_level](/wiki/trigger/attack_skill_level) / [defense_skill_level](/wiki/trigger/defense_skill_level) — 当需要区分"综合技能"与"某项专项技能"时组合使用,可实现更精细的将领能力筛选。[has_trait](/wiki/trigger/has_trait) — 常与 skill 联用,同时检查技能等级与特质,避免仅凭数字就触发剧情而忽略角色特性。[add_skill_level](/wiki/effect/add_skill_level) — 作为奖励效果配套使用:先用 skill 判断当前等级上限,再决定是否给予额外等级,防止超出设计上限。[skill_advantage](/wiki/trigger/skill_advantage) — 在战斗 scope 中,skill 检查绝对值,skill_advantage 检查相对优势,两者搭配可写出"强者遇弱者才触发"的条件。skill 比较的是角色的综合技能等级,而不是进攻、防御、后勤等分项;新手常误以为它等价于某一具体属性,导致筛选条件与预期不符,应在需要单项筛选时改用 attack_skill_level、logistics_skill_level 等专项 trigger。skill 仅在 CHARACTER 或 COMBATANT scope 下有效,若在国家 scope(TAG scope)内直接写 skill >= 3 会静默失败或报错,需先通过 any_character、any_army_leader 等迭代进入正确 scope 后再使用。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 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
}
...
}
[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."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.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.