Hands-On Usage
any_country_with_core is commonly used to check whether a specific condition is met among all countries that have a core on a given state — for example, determining whether any claimant to a disputed territory is currently at war, or as a prerequisite check before releasing a puppet or transferring a state. Typical scenarios include: in events or decisions, triggering only when at least one of the core nations of a disputed state has researched a particular technology or possesses a specific idea.
# Under a STATE scope: check whether any country with a core on this state is at war
focus = {
id = example_focus
available = {
# Current scope is STATE (entered via every_owned_state or similar)
any_country_with_core = {
has_war = yes
}
}
}
# Or used inside a limit block, filtering for states where at least one core nation exists and is a major country
every_owned_state = {
limit = {
any_country_with_core = {
is_major = yes
}
}
add_resource = {
type = steel
amount = 2
}
}
Synergy
- any_owned_state — Iterate over your own held states with
any_owned_state first, then use any_country_with_core inside to inspect the claimants of each state. These two are frequently nested together.
- has_war — Paired with
any_country_with_core to check whether a claimant is at war; this is the most common combination for assessing the situation in a disputed region.
- is_major — Used to verify the weight of a core nation, helping decide whether it is worth triggering related diplomatic or war logic.
- transfer_state — After confirming that a core nation meets the required conditions,
transfer_state is used to hand over the state, forming a complete "condition check → execute transfer" logic chain.
Common Pitfalls
- Scope confusion:
any_country_with_core must be called within a STATE scope. Writing it directly inside a trigger block that is in a COUNTRY scope will cause an error or silent failure. Entering a STATE scope typically requires going through commands such as any_owned_state or every_owned_state first; beginners often forget to switch scope before using this trigger.
- Treating it as a COUNTRY-scope
any_country: This trigger only iterates over countries that have a core on the current state — not all countries. If you need to check all countries, a different iteration method should be used instead. Confusing the two will result in the condition covering a far smaller set of countries than intended.