trigger · is_in_faction
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
check if member of any faction
is_in_factionCOUNTRYnonecheck if member of any faction
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.
is_in_faction is commonly used to determine whether a country has joined any faction, enabling decisions about whether to display or unlock specific decisions, focus tree branches, or diplomatic options. For example, in an "Independent Diplomacy" mod, you might require a country to remain outside all factions before triggering a neutrality path:
available = {
NOT = { is_in_faction = yes }
is_subject = no
}
[any_allied_country](/wiki/trigger/any_allied_country): After confirming the current country is in a faction, use this to further filter whether faction allies meet certain conditions. These two are often nested together.[create_faction](/wiki/effect/create_faction): In effect blocks, first use NOT = { is_in_faction = yes } as a limit to ensure you don't create duplicate factions before executing the creation, avoiding script errors.[add_to_faction](/wiki/effect/add_to_faction): Before inviting another country to join a faction, typically filter out targets already in other factions using is_in_faction = no. This pairing ensures logical safety.[dismantle_faction](/wiki/effect/dismantle_faction): Before dismantling a faction, first verify with is_in_faction = yes that the country is indeed a faction leader or member, preventing ineffective operations on countries outside any faction.is_in_faction = GER or omit the value entirely. In reality, this trigger only accepts yes or no as values and cannot determine which specific faction a country joined. To check membership in a particular faction, use is_in_faction_with instead, or perform indirect checks with any_allied_country.is_in_faction is a pure condition check and can only appear in condition blocks like trigger, limit, available, or allowed. Some beginners mistakenly place it outside the effect layer of an if statement or directly in the top-level effect block of an on_action, causing parsing errors or conditions to be silently ignored.