Hands-On Usage
any_home_area_neighbor_country is commonly used to check whether any country neighboring a nation's home area meets specific conditions. It is well-suited for available / trigger blocks in diplomatic events, focus trees, or decisions to evaluate the "regional situation around the home territory" — for example, checking whether any neighboring country is a major power or is currently at war.
# Focus available example: the focus can only be selected if at least one home area neighbor is at war
focus = {
id = prepare_for_regional_war
...
available = {
any_home_area_neighbor_country = {
has_war = yes
}
}
}
# Decision trigger example: unlocks only if a communist government exists among home area neighbors
available = {
any_home_area_neighbor_country = {
has_government = communism
}
}
Synergy
- has_war — The most common pairing; checks whether any home area neighbor has entered a war, useful for assessing regional security conditions.
- has_government — Checks the ruling ideology of home area neighbors; suitable as an unlock condition for ideology-expansion or ideological-rivalry focuses.
- is_in_faction — Checks whether any home area neighbor has joined a faction, useful for evaluating nearby military alliance pressure.
- is_major — Checks whether any home area neighbor is a major power; commonly used in scripting logic for small-nation diplomatic pressure or alliance motivation.
Common Pitfalls
- Confusion with
is_neighbor_of: The "neighbors" evaluated by any_home_area_neighbor_country are limited to countries bordering the home area specifically, not all territories currently under the country's control. If the nation's home territory has been fully occupied or transferred, this trigger may return unexpected results — always pay close attention to the actual geographic scope of the home area when designing your script.
- Forgetting to include a sub-condition inside the braces: This trigger requires at least one valid sub-trigger inside its curly braces to describe what condition any neighbor must satisfy. Writing
any_home_area_neighbor_country = yes on its own is invalid and will cause a script error or always evaluate to false.