Hands-On Usage
has_completed_goal is commonly used in mod scenarios involving faction goal systems — for example, checking whether a country previously participated in completing a specific faction goal (such as a joint conquest or resource-sharing objective) in order to unlock rewards or trigger story events. Unlike has_faction_goal, it continues to track historical records even after a faction has been dissolved, making it well-suited for long-running narrative mods.
# Check whether a country has ever completed a faction goal; if so, grant a reward
country_event = {
id = my_mod.5
trigger = {
has_completed_goal = faction_goal_joint_industry
has_war = no
}
option = {
name = my_mod.5.a
add_stability = 0.05
add_research_slot = 1
}
}
Synergy
- has_faction_goal: The two triggers are semantically complementary —
has_faction_goal checks the status of an ongoing faction goal, while has_completed_goal checks the historical completion record. They are frequently combined inside OR/AND blocks to cover the full lifecycle of a goal.
- is_in_faction: Used to first confirm that a country is currently still part of a faction before using
has_completed_goal to evaluate its historical contributions, preventing accidental triggers for countries that have left.
- add_faction_goal: The counterpart effect command for adding a new goal to a faction. Together with
has_completed_goal, it forms the complete workflow of "add goal → complete goal → check result."
- has_country_flag: After a faction goal is completed, flags are often used to record additional state. Pairing
has_country_flag with has_completed_goal allows for more granular condition checks.
Common Pitfalls
- Applying it to non-member countries: This trigger checks whether the country was a faction member at the time the goal was completed. If a country joined the faction only after the goal was already finished, the trigger will return
false even if that country is currently in the faction — a logic error that frequently trips up newer modders.
- Confusing it with
has_faction_goal: has_faction_goal checks whether a goal currently exists and has not yet been completed, whereas has_completed_goal checks the historical record of a completed goal. If a faction is dissolved and rebuilt, the former will no longer fire while the latter will still hold — make sure you know which behavior you actually need before using either.