Wiki

effect · create_operative_leader

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

create operative for country
create_operative_leader = {
	bypass_recruitment = no # whether the operative is directly added to the list of available operatives 
	available_to_spy_master = yes # whether the operative can be recruited by the spy master. Only makes sense if bypass_recruitment is 'no'.
	portrait_tag_override = TAG # when selectiong the portrait for the operative, consider that tag instead of the country the operative will operate for gfx = GFX_portrait_alexander_rado # specify the GFX entry that the portrait will be based on, otherwise a random one will be generated.
	# Additionally supports the common token to other create_x_leader effects
 gender = male # or female. If not defined in script a random gender will be applied.}

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_operative_leader is commonly used in scenario events and focus tree completions to generate exclusive operatives for the player's nation—for example, creating preset operatives based on historical figures for specific countries, or using bypass_recruitment to skip the recruitment queue and deploy them directly. In espionage system mods, it's also frequently used to dynamically generate covert personnel with specific portraits and genders, integrating with intelligence agency growth narratives.

# Generate a historically-based operative for the Soviet Union upon focus completion
focus = {
    id = SOV_famous_spy
    ...
    completion_reward = {
        create_operative_leader = {
            bypass_recruitment = no
            available_to_spy_master = yes
            portrait_tag_override = SOV
            gfx = GFX_portrait_alexander_rado
            gender = male
            traits = { operative_infiltrator }
            name = "Alexander Rado"
        }
    }
}

Synergy

  • [create_intelligence_agency](/wiki/effect/create_intelligence_agency): Operatives depend on the existence of an intelligence agency; typically establish the agency before generating operatives, otherwise the operative will have no organizational home.
  • [has_completed_focus](/wiki/trigger/has_completed_focus): Used as a trigger condition to ensure historical operatives are only created after specific focus tree completion, maintaining narrative consistency.
  • [add_ideas](/wiki/effect/add_ideas): Often used together in the same event option, granting the nation relevant espionage idea bonuses when generating operatives, strengthening coherence in espionage-focused mods.
  • [any_operative_leader](/wiki/trigger/any_operative_leader): Used to check if operatives of the same type already exist, preventing duplicate generation; combine with limit blocks for pre-filtering.

Common Pitfalls

  1. Overlooking the interaction between bypass_recruitment and available_to_spy_master: When bypass_recruitment = no, the operative enters the recruitment pool rather than becoming directly available. If available_to_spy_master is simultaneously set to no, the operative becomes permanently unusable—it cannot be recruited nor directly deployed, effectively vanishing. Ensure both fields work together according to your intended design.
  2. Calling this command without establishing an intelligence agency: If the target nation has not yet created an intelligence agency via create_intelligence_agency, directly generating operatives may cause script errors or orphaned operative data. It's recommended to verify agency existence beforehand using [has_done_agency_upgrade](/wiki/trigger/has_done_agency_upgrade) or related triggers.