Wiki

trigger · is_embargoed_by

Definition

  • Supported scope:COUNTRY
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

check if embargoed by specified country

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

is_embargoed_by is commonly used in trade/diplomatic mods to trigger special events or unlock counter-sanctions decisions when a country is embargoed by a specific nation. For example, in a sanctions chain scenario, an embargoed country can only initiate a "break embargo" diplomatic action after meeting certain conditions.

# Example: When the player's country is embargoed by a major power, 
# counter-sanctions decisions become available
available = {
    is_embargoed_by = FROM
}

Synergy

  • [break_embargo](/wiki/effect/break_embargo): After detecting an embargo exists, use this effect to have the target nation actively lift the embargo, forming a complete "detect → act" loop.
  • [has_country_flag](/wiki/trigger/has_country_flag): Combined with country flags, track whether an embargo event has already been triggered, preventing duplicate responses to the same embargo state.
  • [any_allied_country](/wiki/trigger/any_allied_country): Iterate through allies to determine if any are embargoed by the same nation, useful for implementing "collective sanctions" response logic.
  • [has_active_rule](/wiki/trigger/has_active_rule): Used with trade rule conditions to ensure embargo detection only applies within specific economic rule frameworks, avoiding logical conflicts.

Common Pitfalls

  1. Target Confusion: The target in is_embargoed_by refers to the nation implementing the embargo, not the embargoed nation. Beginners often reverse the scope (embargoed country) and target (embargo-initiating country), causing the condition to never evaluate true.
  2. Scope Range Error: This trigger only works in COUNTRY scope. If mistakenly used within a state scope (such as inside any_owned_state), the script won't error but the logical subject changes unexpectedly, producing unintended behavior. Always complete the check before entering subscopes, or use ROOT/PREV to backtrack.