Hands-On Usage
all_core_state is commonly used to check whether a country has fully reclaimed all of its core territories — for example, inside the available or trigger block of a national focus or decision to verify that a "unification" objective has been completed. It can also be used in achievement-type events to confirm that the player owns and controls every core state before granting a reward.
# Focus availability condition: all core states must be owned and controlled by this country
focus = {
id = reclaim_all_cores
available = {
all_core_state = {
is_owned_and_controlled_by = ROOT
}
}
}
Synergy
- any_country_with_core — Use this trigger first to locate countries that have cores, then pair it with
all_core_state to confirm whether that country has full control over every one of its core states, forming a two-layer core-validation logic.
- is_owned_by — Used inside the child scope (STATE) of
all_core_state to check whether each core state belongs to a specific country; this is the most typical inner condition.
- is_controlled_by — Paired with
is_owned_by to simultaneously verify both ownership and control, preventing a situation where a core state is owned by the country but occupied by enemy forces from being incorrectly evaluated as satisfying the condition.
- all_neighbor_state — Often used alongside
all_core_state to simultaneously validate the status of both core states and neighboring states, building a stricter check for territorial integrity.
Common Pitfalls
- Confusing scope levels:
all_core_state switches the scope to STATE, so all inner conditions must use triggers that are valid in STATE scope (such as is_owned_by and is_controlled_by). Writing a COUNTRY-scope trigger inside it by mistake (e.g., has_war = yes directly) will cause a script error or silent failure.
- Overlooking the return value when no core states exist: If a country currently has no core states at all,
all_core_state returns true (a universal quantifier over an empty set is vacuously true). If the intended logic is "at least one core state exists and all of them satisfy the condition," you need to separately confirm the existence of core states first, using any_country_with_core or another appropriate check.