Hands-On Usage
This trigger is commonly found in mods that implement custom faction join logic, used to restrict a country from joining a specific faction unless its ruling party ideology support is sufficiently high, thereby making faction expansion more historically consistent. For example, in a multi-ideology competition mod, you can require that a country's ruling party ideology support rate must exceed the faction leader's ideology threshold before allowing diplomatic faction membership:
join_faction_trigger = {
compare_ideology_with_faction = {
value > 0.4
leader = FROM
}
}
Synergy
[has_country_leader_ideology](/wiki/trigger/has_country_leader_ideology): While compare_ideology_with_faction checks support levels, use this trigger to further confirm the current ruling party ideology type, preventing countries with similar ideologies but different types from incorrectly passing the check.
[faction_influence_ratio](/wiki/trigger/faction_influence_ratio): Combine with support rate comparison to evaluate the influence ratio of various factions within the current faction while allowing membership, preventing faction ideology from being diluted.
[any_allied_country](/wiki/trigger/any_allied_country): Commonly used in the outer layer to enumerate potential faction members, then use compare_ideology_with_faction in the inner layer to individually verify each candidate country.
[add_to_faction](/wiki/effect/add_to_faction): Once the compare_ideology_with_faction condition is satisfied, call this command in the corresponding effect block to formally add the country to the faction, forming a complete flow of "condition check → execution of join".
Common Pitfalls
- Writing the
leader field as a target country tag instead of a scope reference: leader should point to the country scope holding the faction (such as FROM, ROOT, or a specific scope variable). Directly hardcoding a country tag will cause the judgment object to be incorrect in non-fixed scenarios, especially when triggered by on_action where FROM/ROOT references often point opposite to expectations—always use log to confirm scope chains during testing.
- Misunderstanding
value as absolute population or military strength: This trigger compares ideology support rate (a decimal ratio from 0–1), not political power points or absolute numbers; beginners often mistakenly write value > 50 in percentage form, causing the condition to always be false.