trigger · is_neighbor_of
Definition
- Supported scope:
COUNTRY - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
check if neighbor ( controlled territory ) with specified country
is_neighbor_ofCOUNTRYTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALcheck if neighbor ( controlled territory ) with specified country
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.
is_neighbor_of is commonly used to check whether a country shares a border with a target country (based on actually controlled territory), making it ideal for diplomatic events, decision availability conditions, or war goal scripts to restrict trigger scope. For example, when you want a decision to apply only to adjacent enemy nations, you can write it like this:
available = {
is_neighbor_of = GER
has_defensive_war = yes
}
[any_neighbor_country](/wiki/trigger/any_neighbor_country): When you need to perform batch condition checks on "any neighboring country," use it together with is_neighbor_of—the former iterates through all neighbors while the latter pinpoints a specific nation.[has_defensive_war_with](/wiki/trigger/has_defensive_war_with): Checks whether you are in a defensive war with a specific neighbor. Combined with is_neighbor_of, you can restrict the trigger condition to "currently at war with that neighbor."[can_declare_war_on](/wiki/trigger/can_declare_war_on): In the available block of a war declaration decision, first use is_neighbor_of to confirm territorial adjacency, then check if war can be declared—this creates more rigorous logic.[create_wargoal](/wiki/effect/create_wargoal): After meeting the neighbor adjacency condition, generate a war goal. This is commonly seen in expansionist decision chains.is_neighbor_of can only be used under COUNTRY scope. Beginners sometimes place this trigger directly in the limit block of STATE scope, causing script errors or silent failures. Always ensure the outer scope is a country, not a state.