Hands-On Usage
has_faction_research_unlocked is commonly used in mods that implement faction-wide technology sharing systems. It checks whether a country has unlocked a specific research permission through its faction, and is typically used to control whether a decision should be visible or whether a particular event should fire. For example, in a custom faction tech tree mod, bonuses or rewards for member nations are only made available once a specific faction research has been unlocked.
# Inside a decision's available block: only allow activation if faction research is unlocked
GER = {
available = {
is_in_faction = yes
has_faction_research_unlocked = yes
has_tech_bonus = {
uses = 1
bonus = 0.5
category = land_doctrine
}
}
}
Synergy
- is_in_faction: Typically used before this trigger to confirm the country is actually in a faction, preventing logic errors from firing on countries with no faction membership.
- is_faction_leader: Combined with faction leader checks in designs where member nations only benefit after the faction leader has unlocked a given research.
- has_tech_bonus: Used alongside tech bonus conditions to verify whether the current research state and existing bonuses meet a required threshold.
- add_tech_bonus: When the faction research unlock condition is satisfied, this effect is used to grant specific technology research bonuses to member nations.
Common Pitfalls
- Using it directly on a country with no faction: If the target country does not currently belong to any faction,
has_faction_research_unlocked may behave unexpectedly (typically returning false). Always guard against this by checking is_in_faction = yes as a prerequisite condition.
- Confusing it with
is_faction_leader: This trigger checks the research unlock state at the faction level, not the tech state of any individual country. Beginners often assume it only needs to be called from the faction leader's scope, but it can actually be called from any faction member's scope — the result reflects the entire faction's unlock status, not that of a single nation.