Wiki

effect · create_intelligence_agency

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

create an Intelligence Agency for the country, if it is not already done. Example: 
create_intelligence_agency = yes # creates with historical ones, if exists. 
create_intelligence_agency = { 
  name = "M.I.B." 
  icon = "GFX_intelligence_agency_logo_ita" 
}

实战 · 配合 · 坑

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

实战用法

create_intelligence_agency 常用于国家焦点树或决策中,为玩家或 AI 国家自动建立情报机构,尤其适合在剧本触发点(如战争爆发、特定年份)强制初始化特工体系。也可用于给自定义国家赋予带有独特名称和图标的情报机构,增强 mod 的沉浸感。

# 在某国家焦点完成时创建自定义情报机构
focus = {
    id = GER_create_abwehr
    ...
    completion_reward = {
        create_intelligence_agency = {
            name = "Abwehr"
            icon = "GFX_intelligence_agency_logo_ger"
        }
    }
}

配合关系

  • [has_done_agency_upgrade](/wiki/trigger/has_done_agency_upgrade) — 在创建情报机构后,用此触发器检测机构是否已完成特定升级,避免重复奖励或逻辑冲突。
  • [add_ideas](/wiki/effect/add_ideas) — 创建机构后立即附加相关国策思潮或顾问 idea,模拟情报体系建立带来的国家加成。
  • [activate_targeted_decision](/wiki/effect/activate_targeted_decision) — 机构创建完成后激活针对特定国家的情报决策,实现情报链式任务流。
  • [create_operative_leader](/wiki/effect/create_operative_leader) — 与建立情报机构同步创建初始特工人员,让情报机构一建立就有可用的间谍资产。

常见坑

  1. 重复调用不会报错但也无效:若目标国家已拥有情报机构,再次执行此 effect 不会覆盖或更新现有机构(包括名称和图标),新手容易误以为可以用它"重命名"机构,实际上必须在机构不存在时才会生效。
  2. 图标 GFX 必须事先在 .gfx 文件中定义:使用自定义 icon 字段时,若对应的 spriteType 未在图形接口文件中声明,游戏会静默回退或报错,导致图标显示异常,需确保 GFX_xxx 已正确注册。

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

create_intelligence_agency is commonly used in national focus trees or decisions to automatically establish an intelligence agency for player or AI nations, particularly suited for forcing initialization of the espionage system at scripted trigger points (such as war outbreak or specific years). It can also be used to equip custom nations with intelligence agencies bearing unique names and icons, enhancing immersion in mods.

# Create a custom intelligence agency upon completion of a national focus
focus = {
    id = GER_create_abwehr
    ...
    completion_reward = {
        create_intelligence_agency = {
            name = "Abwehr"
            icon = "GFX_intelligence_agency_logo_ger"
        }
    }
}

Synergy

  • [has_done_agency_upgrade](/wiki/trigger/has_done_agency_upgrade) — After creating an intelligence agency, use this trigger to detect whether the agency has completed specific upgrades, avoiding duplicate rewards or logic conflicts.
  • [add_ideas](/wiki/effect/add_ideas) — Immediately attach relevant national ideas or advisor ideas after agency creation, simulating national bonuses from establishing the intelligence system.
  • [activate_targeted_decision](/wiki/effect/activate_targeted_decision) — Activate intelligence decisions targeting specific nations upon agency creation completion, enabling chained intelligence mission flows.
  • [create_operative_leader](/wiki/effect/create_operative_leader) — Simultaneously create initial operative personnel when establishing the intelligence agency, ensuring the agency has available spy assets immediately upon creation.

Common Pitfalls

  1. Repeated calls won't error but have no effect: If the target nation already possesses an intelligence agency, executing this effect again will neither override nor update the existing agency (including name and icon). Newcomers often mistakenly believe it can be used to "rename" agencies, but in reality it only takes effect when the agency does not yet exist.
  2. Icon GFX must be predefined in .gfx files: When using a custom icon field, if the corresponding spriteType is not declared in the graphics interface file, the game will silently fall back or error out, resulting in incorrect icon display. Ensure that GFX_xxx is properly registered.