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
- 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.
- 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.