Wiki

effect · give_market_access

Definition

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

Description

Gives market access to the specified country.
Example:
FRA =  {
  give_market_access = BRA  # France and Brazil will now have market access to each other
}

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

give_market_access 常用于外交事件或国策完成后,让两国建立贸易互通关系,例如在小国加入某经济同盟时自动赋予成员间的市场准入。也适合在殖民地/傀儡独立事件中,让宗主国与新生国家保持经济联系。

# 巴西与阿根廷签订贸易协议事件
country_event = {
    id = south_america.5
    ...
    option = {
        name = south_america.5.a
        ARG = {
            give_market_access = BRA
        }
        add_opinion_modifier = { target = BRA modifier = trade_partner }
    }
}

配合关系

  • [add_opinion_modifier](/wiki/effect/add_opinion_modifier):市场准入通常伴随外交关系改善,同时添加好感修正能让脚本逻辑更完整。
  • [create_import](/wiki/effect/create_import):开放市场后紧接着创建具体的资源进口协议,使贸易关系落到实处。
  • [diplomatic_relation](/wiki/effect/diplomatic_relation):用于同步建立大使关系或不侵犯协议,与市场准入共同构成完整的双边协议框架。
  • [has_country_flag](/wiki/trigger/has_country_flag):在给予市场准入前用标志位检查是否已执行过,避免重复触发。

常见坑

  1. 忘记双向性的误判:官方说明指出该效果会让双方互相获得市场准入,新手有时误以为需要在两个 scope 内分别各写一次,实际只需在其中一国 scope 内调用一次即可,重复调用不会报错但属于冗余。
  2. scope 写反导致无效:该 effect 必须在 COUNTRY scope 下执行,若误用在 STATE scope(如 every_owned_state 内部)中直接调用,脚本将无法正确解析目标,应先用 OWNER 或具体国家标签切换到国家 scope 再执行。

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

give_market_access is commonly used in diplomatic events or after national focus completion to establish trade relations between two countries. It is particularly useful when a minor nation joins an economic union and automatically grants market access between members, or in colonial/puppet independence events to maintain economic ties between the overlord and the newly independent nation.

# Brazil-Argentina trade agreement event
country_event = {
    id = south_america.5
    ...
    option = {
        name = south_america.5.a
        ARG = {
            give_market_access = BRA
        }
        add_opinion_modifier = { target = BRA modifier = trade_partner }
    }
}

Synergy

  • [add_opinion_modifier](/wiki/effect/add_opinion_modifier): Market access is typically accompanied by diplomatic relation improvements. Adding opinion modifiers simultaneously makes the script logic more complete.
  • [create_import](/wiki/effect/create_import): After opening the market, immediately create specific resource import agreements to materialize the trade relations.
  • [diplomatic_relation](/wiki/effect/diplomatic_relation): Used to simultaneously establish ambassador relations or non-aggression pacts, forming a complete bilateral agreement framework together with market access.
  • [has_country_flag](/wiki/trigger/has_country_flag): Use flags to check if market access has already been granted before executing, preventing duplicate triggers.

Common Pitfalls

  1. Misconception about bidirectionality: The official documentation states that this effect grants mutual market access to both parties. Beginners sometimes mistakenly believe they need to call it separately within both country scopes, when in fact you only need to call it once within one country's scope. Duplicate calls won't cause errors but are redundant.
  2. Reversed scope causing ineffectiveness: This effect must be executed within a COUNTRY scope. If mistakenly used directly within a STATE scope (such as inside every_owned_state), the script will fail to correctly resolve the target. You should first switch to country scope using OWNER or a specific country tag before executing the effect.