effect · create_import
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
Creates trade between two countries
create_importCOUNTRYnoneCreates trade between two countries
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.
create_import is commonly used in diplomatic mods or economic system mods to automatically establish trade relationships between two nations upon forming alliances, signing treaties, or completing specific focuses—simulating economic exchanges. For example, triggering a trade agreement after a nation completes a diplomacy-focused focus:
focus = {
id = establish_trade_agreement
...
completion_reward = {
create_import = {
resource = oil
amount = 10
exporter = GER
}
}
}
[give_market_access](/wiki/effect/give_market_access) — Before establishing a trade import, market access rights typically need to be granted first; otherwise, the trade lacks logical prerequisites.[add_opinion_modifier](/wiki/effect/add_opinion_modifier) — Creating trade relationships often accompanies changes in diplomatic favor, simulating cascading effects of improved bilateral relations.[has_country_flag](/wiki/trigger/has_country_flag) — Used to check whether a trade agreement has already been triggered, preventing duplicate create_import executions that cause numerical stacking anomalies.[add_resource](/wiki/effect/add_resource) — Adjust domestic resource reserves simultaneously with trade establishment; combined usage allows more granular simulation of economic input and output.create_import can only execute under COUNTRY scope. Beginners often place it within STATE scope (such as inside every_owned_state loops), causing script errors or silent effect failures. Always verify the outer scope is at the country level.exporter has an existence check (exists) that evaluates to false at the current game state, the trade will fail to create without obvious error messages. It is recommended to include an [exists](/wiki/trigger/exists) precondition check.