effect · set_faction_spymaster
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
set current country as spy master of its faction
set_faction_spymasterCOUNTRYnoneset current country as spy master of its faction
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.
set_faction_spymaster is typically used in faction politics mods. It is triggered when a nation advances to become the faction's intelligence leader through focuses, events, or decisions. For example, in "Great Power Rivalry" style mods, when the player's nation becomes the intelligence hegemon of an alliance through a specific focus, you can use this command to designate it as the faction's spymaster, thereby gaining corresponding intelligence advantages or narrative significance.
# After focus completion, set this nation as the spymaster of its faction
focus = {
id = become_faction_spymaster
...
completion_reward = {
set_faction_spymaster = yes
}
}
[create_intelligence_agency](/wiki/effect/create_intelligence_agency): Before becoming the faction spymaster, it is typically necessary to ensure your nation has established an intelligence agency. Using both commands in sequence creates more complete logic.[has_country_flag](/wiki/trigger/has_country_flag): Used in event or decision trigger conditions to check whether your nation has already served as spymaster, preventing duplicate execution.[add_intel](/wiki/effect/add_intel): After becoming spymaster, pair this command with adding intelligence to specific nations, reinforcing the tangible benefits of holding this role.[add_ideas](/wiki/effect/add_ideas): By adding specific national ideas or spirits, you can annotate the "intelligence hegemon" status both narratively and mechanically, creating visual and functional unity with set_faction_spymaster.set_faction_spymaster requires the executing nation to already be a member of some faction. If called before joining a faction, the command silently fails without error, leading newcomers to mistakenly think the script worked. It is recommended to use [has_country_flag](/wiki/trigger/has_country_flag) or other faction existence conditions as prerequisites.COUNTRY. If written inside an execution block scoped to every_owned_state or similar state scopes, the game will not error but the command will not execute at all. Always verify that the execution block's scope level is nation-level rather than state or province level.