Hands-On Usage
This trigger is commonly used in mods related to intelligence agencies or advisor systems to determine whether the player has acquired enough advisors with specific traits, thereby unlocking certain national focus branches or decision options. For example, when a secret operation requires "at least 2 advisors with the intelligence chief trait" to be activated:
available = {
has_available_idea_with_traits = {
idea = head_of_intelligence
limit = 1
characters = yes
}
}
Synergy
[has_character](/wiki/trigger/has_character): First confirm that a specific character exists in the country, then use this trigger to check their trait count, avoiding logic errors caused by null references.
[amount_taken_ideas](/wiki/trigger/amount_taken_ideas): When used together with this trigger, you can simultaneously constrain total advisor slot occupancy and trait matching quantity, constructing more granular unlock conditions.
[activate_advisor](/wiki/effect/activate_advisor): After this trigger evaluates to true, use this effect to activate advisors that meet the criteria, forming a complete "check → execute" logic chain.
[add_ideas](/wiki/effect/add_ideas): After this trigger's condition is satisfied, add corresponding national focus ideologies or bonus ideas, implementing a design where meeting advisor trait thresholds triggers buffs.
Common Pitfalls
- The
limit parameter means "greater than that number," not "equal to": limit = 1 means you need more than 1 matching idea, i.e., at least 2 to return true. Beginners often mistakenly think it triggers with just 1.
- Forgetting to distinguish the
characters field: When left unfilled or set to no, it checks both regular ideas and character-type ideas. When you only want to evaluate character advisors, you must explicitly write characters = yes, otherwise you may inadvertently satisfy the condition with non-character ideas.