Wiki

effect · add_faction_goal

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Adds a goal to the current's country faction.

### Examples

TAG = { add_faction_goal = faction_goal_id }

Hands-On Notes

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.

Hands-On Usage

add_faction_goal is commonly used in faction mechanics mods. When a player or AI completes a specific focus or event, it dynamically adds new objectives to their faction (such as territorial expansion, overthrowing a regime, etc.), thereby advancing the faction's overall strategic progress. For example, after a country completes a certain focus, a war goal is automatically added to the faction:

focus_complete_effect = {
    add_faction_goal = faction_goal_expand_east
}

Synergy

  • [has_completed_faction_goal](/wiki/trigger/has_completed_faction_goal): Used to check whether a faction goal has been completed. It is commonly paired with add_faction_goal to form a complete workflow of "add goal → check completion → trigger reward".
  • [create_faction](/wiki/effect/create_faction): Immediately after creating a new faction, use add_faction_goal to set initial objectives for it, ensuring the faction has a clear direction from its inception.
  • [add_faction_goal_slot](/wiki/effect/add_faction_goal_slot): When faction goal slots are insufficient, expand the slots first with add_faction_goal_slot before calling add_faction_goal to add goals. The order of these two operations is critical.
  • [faction_goal_fulfillment](/wiki/trigger/faction_goal_fulfillment): Checks the goal completion rate and can be used to decide whether to continue adding the next phase of faction goals, forming a phased progression logic together with add_faction_goal.

Common Pitfalls

  1. Forgetting to check slot limits: Faction goal slots have a quantity limit. If you directly add goals without first expanding slots using add_faction_goal_slot, the new goal will fail silently without an error message, causing the intended logic to not execute properly.
  2. Calling under a non-faction member country scope: This effect requires the executing country to already belong to a faction. If called under the scope of an independent country (one not in any faction), the effect will not take place. Beginners often overlook the need to check whether a country is in a faction beforehand.