StellarisDB

Stellaris script effects

Stellaris has 1,074 script effects: the commands events, decisions and mods run, such as add_modifier, add_deposit or set_planet_flag. Each one below has the game's own description and usage, the scopes it works in, and how the game itself uses it (792 of them are used in its own scripts). In the console, type effect before one.

Script flow

  • abort_situationany scope

    Destroys a situation in right hand side event target, firing on_abort (use to cancel and fire that effect)

    abort_situation = <event target>

    The game's own scripts use it 17 times.

    As the game uses it
    abort_situation = this
  • activate_gatewayany scope

    Activates the gateway associated with a megastructure.

    activate_gateway = <target>

    The game's own scripts use it 12 times.

    As the game uses it
    activate_gateway = this
  • add_anomalyany scope

    Adds a specific anomaly category to the scoped planet

    add_anomaly = {
    	category = <key>
    	target = target:country
    }

    The game's own scripts use it 54 times.

    As the game uses it
    add_anomaly = {
    	category = DISTAR_RAT_CAT
    	target = root.owner
    }
  • add_custodian_term_daysany scope

    Increase the current Custodian term time

    add_custodian_term_days = <days>

    The game's own scripts use it once.

    As the game uses it
    add_custodian_term_days = 10800
  • add_global_ship_designany scope

    Adds a specific global design to the game

    add_global_ship_design = <target>

    The game's own scripts use it 71 times.

    As the game uses it
    add_global_ship_design = NAME_Tau
  • add_hyperlaneany scope

    Adds a hyperlane between two systems

    add_hyperlane = { from = <system> to = <system> }

    The game's own scripts use it 55 times.

    As the game uses it
    add_hyperlane = {
    	from = this
    	to = prev
    }
  • add_imperial_authorityany scope

    Add imperial_authority

    add_imperial_authority = <value>

    The game's own scripts use it 9 times.

    As the game uses it
    add_imperial_authority = 20
  • begin_event_chainany scope

    Starts a situation log event chain for target country

    begin_event_chain = { event_chain = <key> target = <target> }

    The game's own scripts use it 262 times.

    As the game uses it
    begin_event_chain = {
    	event_chain = l_cluster_chain
    	target = this
    }
  • breakany scope

    Prevents execution of subsequent effects in the same effect block, used with if-statements

    break = yes

    The game's own scripts use it 176 times.

    As the game uses it
    break = yes
  • change_background_jobany scope

    Changes the background job of a leader

    change_background_job = <key>

    The game's own scripts use it 26 times.

    As the game uses it
    change_background_job = clerk
  • clear_global_event_targetany scope

    Deletes the specified saved global target reference

    clear_global_event_target = <string>/<string@scope>

    The game's own scripts use it 123 times.

    As the game uses it
    clear_global_event_target = gal_emperor
  • clear_global_event_targetsany scope

    Deletes all saved global target references

    clear_global_event_targets = yes
  • closest_systemany scope

    Executes enclosed effects on a system -within a specific number of jumps span- that meets the limit criteria. This completely ignores bypasses (wormholes and gateways)

    closest_system = {
    	min_steps = <int, minimum # of systems 'away'>
    	max_steps = <int, maximum # of systems 'away'>
    	use_bypasses = yes/no (default: no)
    	limit = { <triggers> }
    	<effects>
    }

    The game's own scripts use it 153 times.

    As the game uses it
    closest_system = {
    	limit = {
    		baol_colony_3_fallback_trigger = yes
    	}
    	setup_baol_colony_3_fallback = yes
    }
  • complete_tutorial_stepany scope

    Create and sends an telemetry event keeping track of the tutorial steps for the current game

    The game's own scripts use it 31 times.

    As the game uses it
    complete_tutorial_step = 180_designed_ship
  • copy_flags_and_variables_fromany scope

    Copies all script flags and variables from the specified scope to the current one.

    copy_flags_and_variables_from = event_target:them
  • country_list_tooltipany scope

    Prints a list of the countries that match the limit triggers in a tooltip, each separated by a line break.

    country_list_tooltip = { limit = { <triggers> } }

    The game's own scripts use it 12 times.

    As the game uses it
    country_list_tooltip = {
    	limit = {
    		is_in_federation_with = root
    		has_country_flag = hegemony_challenge_failed
    	}
    }
  • create_ambient_objectany scope

    Creates a new ambient object

    create_ambient_object = { type = <key> location = <target> }
    For VFX use:
    create_ambient_object = {
    	type = <key>
    	scale = <float>
    	location = <target>
    	use_3d_location = <bool, use 3D entity or 2D coordinate of the location entity as base>
    	entity_offset = {
    		min = <int>
    		max = <int>
    	}
    	entity_offset_angle = {
    		min = <int>
    		max = <int>
    	}
    	entity_offset_height = {
    		min = <int>
    		max = <int>
    	}
    	entity_face_object = star/FROM/etc
    	entity_scale_to_size = yes/no
    	play_animation_once = yes/no
    	target = <target>
    	duration = <int, days>
    	is_wreck = yes/no
    }

    The game's own scripts use it 726 times.

    As the game uses it
    create_ambient_object = {
    	type = shroud_rift_object
    	scale = 0.2
    	entity_offset_height = -17
    	location = this
    }
  • create_clusterany scope

    Creates a cluster centered around the specified spatial object

    create_cluster = {
    	id = <some_id>
    	center = <system, spatial object>
    	radius = 30
    }

    The game's own scripts use it 11 times.

    As the game uses it
    create_cluster = {
    	id = fe1_cluster
    	radius = 120
    	center = this.solar_system
    }
  • create_cosmic_stormany scope

    Creates a cosmic storm

    storm_start_position = <target>
    storm_end_position = <target>
    storm_min_radius = <value>
    storm_max_radius = <value>
    storm_max_range = <value>
    type = <string>

    The game's own scripts use it once.

    As the game uses it
    create_cosmic_storm = {
    	type = celestial_storm
    	immediate = yes
    	cosmic_storm_start_position = this
    }
  • create_countryany scope

    Creates a new country

    create_country = {
    	name = <string / random / <target>>
    	adjective = <string / <target>>
    	ruler = <string / random>
    	contact_rule = <always / never / on_action_only / does_first_contact_sites / auto>
    	day_zero_contact = yes/no
    	exclude_day_zero_contact = <target>
    	type = <key>
    	auto_delete = yes/no
    	name_list = <key / <target>>
    	ship_prefix = <string>
    	default_ships = yes/no
    	authority = <key / <target>>
    	civics = random / <target> / { civic = <key> civic = random }
    	randomize_ethos = yes/no
    	ethos = random / <target> / { ethic = <key> }
    	species = last_created / random / <string> / <target>
    	set_capital_from_species = yes/no
    	ignore_initial_colony_error = yes/no
    	flag = random / none / <target> / {
    		icon = { category = <key> file = <filename.dds> }
    		background = { category = <key> file = <filename.dds> }
    		# Four color swatches (keys from flags/colors.txt). Slots: 0=primary (red), 1=secondary (green), 2=tertiary (blue), 3=ship color (alpha, shader-inert). Use null for unused slots.
    		colors = { <key> <key> <key> <key> }
    		use_ship_color = yes/no # default no
    		# When yes, slot 3 swatch ship= value is used for ships Slot 3 must be a real swatch.	}
    	origin = <target>
    	graphical_culture = <key>
    	city_graphical_culture = <key>
    	ship_kinds = { <ship_category_keys> }
    	room = <key>
    	nomadic = yes/no/<target> # default: no
    	released_by_country = <target> # grants communications from this country and its contacts
    	released_from_country = <target> # copies techs, designs, traditions, survey data; creates truce
    	use_hostilities_from = <target>
    	government_restrictions = { <see common/governments/readme_requirements.txt> }
    	remove_invalid_civics = yes/no # default: no
    	effect = { <effects executed on country scope> }
    }

    The game's own scripts use it 328 times.

  • create_fleetany scope

    Creates a new fleet

    create_fleet = { name = <string> effect = { <create_ship, set_owner, set_location etc effects go here> } }

    The game's own scripts use it 785 times.

  • create_messageany scope

    Creates a message, can take multiple variables

    create_message = {
      type = BYPASS_EXPLORED
      localization = BYPASS_EXPLORED_MESSAGE
      days = 30 (-1 is infinite)
      target = root
      variable = { type = name localization = SYSTEM1 scope = from }
      variable = { type = name localization = SYSTEM2 scope = fromfrom }
    }

    The game's own scripts use it 236 times.

    As the game uses it
    create_message = {
    	type = MESSAGE_NANOTECH_BOON
    	localization = MESSAGE_NANOTECH_BOON_DESC
    	days = 30
    	target = prev
    }
  • create_military_fleetany scope

    Creates a military fleet with the designs of a specified country.

    create_military_fleet = { owner = <target> scaled_size = 1.0 effect = { } }
  • create_ship_designany scope

    Creates a new ship design for use with last_created_design target

    create_ship_design = { design = <key> ftl = <target, optional, sets FTL drive to target country's> }

    The game's own scripts use it 100 times.

    As the game uses it
    create_ship_design = {
    	design = NAME_Skull
    }
  • create_speciesany scope

    Creates a new species. The habitability trait is determined by homeworld, traits = random, traits = { ideal_planet_class = <pc_XYZ> }, traits = <trait_pc_XYZ_preference>, or else is assigned randomly.

    create_species = {
    	name = <string>/random/scope
    	plural = <string>/this
    	class = <species class key>/random/random_non_machine/random_pre_ftl/scope
    	portrait = <random/portrait id>/this
    	homeworld = <target>
    	traits = { <traits> }/random/this
    	sapient = yes/no, determines if species is sapient (default: yes)
    	is_mod = yes/no, determines if species is a modification of another (default: no)
    	immortal = yes/no, determines if species leaders are immortal (default: no)
    	can_be_modified = yes/no/this (default: yes)
    	gender = <species/leader>/male/female/indeterminate/not_set
    	clear_parent_species_link = yes/no (default: no)
    	extra_trait_points = <int>
    	allow_negative_traits = yes/no (default: yes)
    	namelist = random/random_class/scope
    	effect = {}
    }

    The game's own scripts use it 226 times.

  • custom_tooltipany scope

    Displays a specific localization string in tooltip

    custom_tooltip = <string>

    The game's own scripts use it 4,934 times.

    As the game uses it
    custom_tooltip = allow_gaia
  • custom_tooltip_with_paramsany scope

    Displays a specific localization string with parameters in tooltip

    custom_tooltip_with_params = {
    	description = <loc key>
    	description_parameters = {
    		<value key> = <string/int/num/bool>
    	}
    }

    The game's own scripts use it 14 times.

    As the game uses it
    custom_tooltip_with_params = {
    	description = FIRST_CONTACT_ADD_INTEL
    	description_parameters = {
    		INTEL = 20
    	}
    }
  • date_distortionany scope

    Enables or disables the date distortion effect

    date_distortion = yes

    The game's own scripts use it 2 times.

    As the game uses it
    date_distortion = no
  • debug_breakany scope

    Trigger an assertion to stop the debugger when encountering this effect; argument is ignored

    debug_break = yes
  • decrease_council_sizeany scope

    Decreases the number of seats on the Galactic Council by 1

    decrease_council_size = yes/no
  • delete_dimensional_fleetany scope

    Deletes the target dimensional fleet

    delete_dimensional_fleet = <target>
    delete_dimensional_fleet = {
    	target=<target>
    }

    The game's own scripts use it 2 times.

    As the game uses it
    delete_dimensional_fleet = this
  • delete_fleetany scope

    Deletes the target fleet (no death graphics)

    delete_fleet = <target>
    delete_fleet = {
    	target=<target>
    	kill_leader=<yes/no> #default yes
    	destroy_template=<yes/no> #default no
    }

    The game's own scripts use it 118 times.

    As the game uses it
    delete_fleet = {
    	target = this
    	kill_leader = no
    }
  • delete_fleet_naval_capany scope

    Deletes up to naval_cap worth of ships in the target fleet (no death graphics)

    delete_ship_naval_cap = {
    	target=<target>
    	naval_cap=<max naval cap> #default 1
    	kill_leader=<yes/no> #default yes
    }
  • delete_megastructureany scope

    Deletes the target mega structure (no death graphics)

    delete_megastructure = <target>

    The game's own scripts use it 2 times.

    As the game uses it
    delete_megastructure = this
  • delete_shipany scope

    Deletes the target ship (no death graphics)

    delete_ship = <target>

    The game's own scripts use it 21 times.

    As the game uses it
    delete_ship = this
  • destroy_ambient_objectany scope

    Destroys target ambient object

    destroy_ambient_object = <target>

    The game's own scripts use it 170 times.

    As the game uses it
    destroy_ambient_object = from
  • destroy_archaeological_siteany scope

    Destroys a archaeological site in right hand site event target

    destroy_archaeological_site = <event target>

    The game's own scripts use it once.

    As the game uses it
    destroy_archaeological_site = this
  • destroy_astral_riftany scope

    Destroys target Astral Rift

    destroy_astral_rift = <target>

    The game's own scripts use it once.

    As the game uses it
    destroy_astral_rift = from
  • destroy_espionage_operationany scope

    Destroys a espionage operation site in right hand site event target

    destroy_espionage_operation = <event target>

    The game's own scripts use it 58 times.

    As the game uses it
    destroy_espionage_operation = from
  • destroy_fleetany scope

    Destroys the target fleet (with death graphics)

    destroy_fleet = <target>
    destroy_fleet = {
    	target=<target>
    	kill_leader=<yes/no> #default yes
    	destroy_template=<yes/no> #default no
    }

    The game's own scripts use it 101 times.

    As the game uses it
    destroy_fleet = {
    	target = this
    	kill_leader = no
    }
  • destroy_fleet_naval_capany scope

    Destroys up to navel_cap worth of ships in the target fleet (with death graphics)

    destroy_fleet_naval_cap = {
    	target=<target>
    	naval_cap=<max naval cap> #default 1
    	kill_leader=<yes/no> #default yes
    }

    The game's own scripts use it once.

    As the game uses it
    destroy_fleet_naval_cap = {
    	naval_cap = 12
    	kill_leader = no
    }
  • destroy_shipany scope

    Destroys the target ship (with death graphics)

    destroy_ship = <target>

    The game's own scripts use it 25 times.

    As the game uses it
    destroy_ship = this
  • destroy_situationany scope

    Destroys a situation in right hand side event target, use once situation is complete (on_fail/on_complete/on_abort is not called)

    destroy_situation = <event target>

    The game's own scripts use it 181 times.

    As the game uses it
    destroy_situation = this
  • elseany scope

    Executes enclosed effects if limit criteria of preceding 'if' or 'else_if' is not met

    if = { limit = { <triggers> } <effects> }
    else = { <effects> }

    The game's own scripts use it 2,101 times.

    As the game uses it
    else = {
    	change_variable = {
    		which = artist_monument_erected
    		value = 1
    	}
    }
  • else_ifany scope

    Executes enclosed effects if limit criteria of preceding 'if' or 'else_if' is not met, and its own limit is met

    if = { limit = { <triggers> } <effects> }
    else_if = { limit = { <triggers> } <effects> }

    The game's own scripts use it 1,793 times.

  • enable_missionany scope

    Enables a mission for target country

    enable_mission = { name = <mission key> }

    The game's own scripts use it 25 times.

    As the game uses it
    enable_mission = {
    	name = NOMAD_CHECKLIST_DECIPHER_SIGNAL
    	location = event_target:comms_signal_system@root
    }
  • enable_on_marketany scope

    Enables a resource on the Galactic Market

    enable_on_market = <resource_key>

    The game's own scripts use it 17 times.

    As the game uses it
    enable_on_market = food
  • enable_special_projectany scope

    Enables a specific special research project for target country at a specific location (should be same as the current scope where possible)

    enable_special_project = { name = <project key> owner = <target, default = root> location = <target, ideally THIS (that is default)> }

    The game's own scripts use it 717 times.

    As the game uses it
    enable_special_project = {
    	name = BAOL_SECRETS
    	location = capital_scope
    	owner = ROOT
    }
  • endgame_telemetryany scope

    Send endgame telemetry event

    endgame_telemetry = ai_revolt

    The game's own scripts use it 4 times.

    As the game uses it
    endgame_telemetry = ai_revolt
  • every_galaxy_speciesany scope

    Check if any species in the galaxy meet the specified criteria - executes the enclosed effects on all of them for which the limit triggers return true

    every_galaxy_species = { limit = { <triggers> } <effects> }

    The game's own scripts use it once.

  • every_system_in_clusterany scope

    Executes enclosed effects on every system in the cluster that meet the limit criteria

    every_system_in_cluster = { limit = { <triggers> } <effects> }
  • fire_on_actionany scope

    Fires a made-up on_action.

    fire_on_action = { on_action = <string> scopes = { from = X fromfrom = Y } }

    The game's own scripts use it 77 times.

    As the game uses it
    fire_on_action = {
    	on_action = on_arkship_reprocess_asteroid
    	scopes = {
    		from = from
    	}
    }
  • get_galaxy_setup_valueany scope

    Copies a value from the galaxy setup into a variable, optionally scaling it by an int value

    get_galaxy_setup_value = { which = <string> setting = <string> [ scale_by = <float> ] }
    possible values: num_empires, num_advanced_empires, num_fallen_empires, num_marauder_empires, mid_game_year, end_game_year, victory_year, num_guaranteed_colonies, num_gateways, num_wormhole_pairs, num_hyperlanes, habitable_worlds_scale, primitive_worlds_scale, crisis_strength_scale, tech_costs_scale, fallen_empire_strength_scale

    The game's own scripts use it 4 times.

    As the game uses it
    get_galaxy_setup_value = {
    	setting = num_stars
    	which = local_astral_rifts_num
    	scale_by = 0.1
    }
  • hidden_effectany scope

    Prevents enclosed effects from being displayed in tooltip

    hidden_effect = { <effects> }

    The game's own scripts use it 6,972 times.

    As the game uses it
    hidden_effect = {
    	change_variable = {
    		which = num_rifts_splitted
    		value = 1
    	}
    }
  • ifany scope

    Executes enclosed effects if limit criteria are met

    if = { limit = { <triggers> } <effects> }

    The game's own scripts use it 8,450 times.

    As the game uses it
    if = {
    	limit = {
    		is_nomadic = no
    	}
    	astral_splitting = yes
    }
  • increase_council_sizeany scope

    Increases the number of seats on the Galactic Council by 1

    increase_council_size = yes/no
  • inverted_switchany scope

    Executes the first appropriate effect set for a specific trigger treated as NOT.

    inverted_switch = {
    	trigger = <trigger>
    	<corresponding key/bool/int> = { <effect> }
    	<corresponding key/bool/int> > (less/greater than appear 'reversed') { <effect> }
    	default = { <effect> }
    }

    The game's own scripts use it 45 times.

  • kill_pop_groupany scope

    Instantly destroys part of a pop group

    kill_pop_group = {
    	pop_group = <target pop group>
    	amount = <amount killed> OR percentage = <percentage killed>
    	random = <number> (optional) If set, the amount will be randomized in [max(0, size - random), size + random].
    	growth_category = <key> (optional, default: 'GROWTH_CAT_OTHER')
    }

    The game's own scripts use it 76 times.

    As the game uses it
    kill_pop_group = {
    	pop_group = this
    	amount = local_spent_biomass
    }
  • locked_random_listany scope

    Picks one random set of effects from a list, influenced by relative weight once per event scope

    locked_random_list = { 50 = { <effects> } 20 = { <effects> } 30 = { <effects> } 999 = { <effects> } }

    The game's own scripts use it 100 times.

  • logany scope

    Prints a message to game.log for debugging purposes.

    The game's own scripts use it 94 times.

    As the game uses it
    log = "MSI CREATED"
  • log_errorany scope

    Prints a message to error.log for debugging purposes.

    The game's own scripts use it 7 times.

    As the game uses it
    log_error = "mercenary_dividends situation failed, this is not meant to happen"
  • multiply_crisis_strengthany scope

    Multiplies crisis strength by this factor.

    multiply_crisis_strength = 1.5

    The game's own scripts use it 11 times.

    As the game uses it
    multiply_crisis_strength = 2
  • observer_eventany scope

    Fires an observer event for all observers.

    The game's own scripts use it 100 times.

    As the game uses it
    observer_event = {
    	id = observer.5
    }
  • ordered_galaxy_speciesany scope

    Check if any species in the galaxy meet the specified criteria - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_galaxy_species = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • play_soundany scope

    Play the defined sound effect

    play_sound = myfirstsoundeffect

    The game's own scripts use it 7 times.

    As the game uses it
    play_sound = {
    	sound = ga_weapon_fissile_cores
    	location = fromfrom
    }
  • randomany scope

    All enclosed effects may or may not be executed depending on set chance

    random = { chance = 50 <effects> }

    The game's own scripts use it 59 times.

    As the game uses it
    random = {
    	chance = 1
    	solar_system = {
    		shroud_creatures_system_spawn = yes
    	}
    }
  • random_galaxy_speciesany scope

    Check if any species in the galaxy meet the specified criteria - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_galaxy_species = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 19 times.

    As the game uses it
    random_galaxy_species = {
    	limit = {
    		has_species_flag = syncretic_species@root.owner
    	}
    	save_event_target_as = syncretic_species
    }
  • random_listany scope

    Picks one random set of effects from a list, influenced by relative weight

    random_list = { 50 = { <effects> } 20 = { <effects> } 30 = { <effects> } 999 = { <effects> } }

    The game's own scripts use it 1,280 times.

  • remove_ascension_perkany scope

    Remove the target ascension perk from the scoped Country.

    remove_ascension_perk = ascension_perk_key

    The game's own scripts use it 2 times.

    As the game uses it
    remove_ascension_perk = ap_eternal_vigilance
  • remove_global_flagany scope

    Removes a global flag

    remove_global_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 178 times.

    As the game uses it
    remove_global_flag = gdf_active
  • remove_global_ship_designany scope

    Removes a specific global design from the game

    remove_global_ship_design = <target>
  • remove_hyperlaneany scope

    Removes existing hyperlane between two systems

    remove_hyperlane = { from = <system> to = <system> }

    The game's own scripts use it 2 times.

    As the game uses it
    remove_hyperlane = {
    	from = this
    	to = prev
    }
  • remove_megastructureany scope

    Removes a mega structure.

    remove_megastructure = <target mega structure>

    The game's own scripts use it 52 times.

    As the game uses it
    remove_megastructure = this
  • remove_traditionany scope

    Remove the target tradition from the scoped Country.

    remove_tradition = tradition_key
  • remove_tradition_treeany scope

    Remove the target tradition tree from the scoped Country.

    remove_tradition_tree = tradition_category_key
  • reroll_randomany scope

    Rerolls the random seed. Use if you want to have a second random_list return a different result. Do not use in tooltips that show random results, because the tooltip will be wrong!

    reroll_random = yes

    The game's own scripts use it 23 times.

    As the game uses it
    reroll_random = yes
  • sacrifice_pop_groupany scope

    Instantly destroys part of a pop group (prefer to use instead of kill_pop_group when the country intentionally kills it)

    sacrifice_pop_group = { pop_group = <target pop group> amount = <amount killed> OR percentage = <percentage killed> }

    The game's own scripts use it once.

    As the game uses it
    sacrifice_pop_group = {
    	pop_group = this
    	amount = 100
    }
  • save_event_target_asany scope

    Saves the current scope as an arbitrarily-named target to be referenced later in the (unbroken) event chain

    save_event_target_as = <string>/<string@scope>

    The game's own scripts use it 3,748 times.

    As the game uses it
    save_event_target_as = planet
  • set_council_emergency_measuresany scope

    Sets whether council members can propose emergency measures or not

    set_council_emergency_measures = yes/no
  • set_council_sizeany scope

    Sets the number of seats on the Galactic Council

    set_council_size = <int>

    The game's own scripts use it 19 times.

    As the game uses it
    set_council_size = 0
  • set_council_vetoany scope

    Sets whether council members can veto resolutions or not

    set_council_veto = yes/no

    The game's own scripts use it 4 times.

    As the game uses it
    set_council_veto = no
  • set_crisis_soundany scope

    Sets the crisis ambient loop to the current effect

    set_crisis_sound = myfirstsoundeffect

    The game's own scripts use it 20 times.

    As the game uses it
    set_crisis_sound = ai_empire_ambient_stage_1
  • set_custodian_term_daysany scope

    Set the current Custodian term time. -1 will make the Custodianship permanent.

    set_custodian_term_days = <days>

    The game's own scripts use it once.

    As the game uses it
    set_custodian_term_days = -1
  • set_emergency_fund_activeany scope

    Sets whether the emergency fund should be active or not.

    The game's own scripts use it 2 times.

    As the game uses it
    set_emergency_fund_active = no
  • set_emergency_fund_contribution_rateany scope

    Sets rate for contributions to the emergency fund.

    The game's own scripts use it 5 times.

    As the game uses it
    set_emergency_fund_contribution_rate = 0.1
  • set_emperor_can_change_council_membersany scope

    Sets whether the Galactic Emperor can change Imperial Council members or not

    set_emperor_can_change_council_members = yes/no

    The game's own scripts use it once.

    As the game uses it
    set_emperor_can_change_council_members = yes
  • set_galactic_defense_forceany scope

    Sets whether the Galactic Defense force or Imperial Armada exists

    set_galactic_defense_force = yes/no

    The game's own scripts use it 4 times.

    As the game uses it
    set_galactic_defense_force = no
  • set_global_flagany scope

    Sets an arbitrarily-named global flag

    set_global_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 439 times.

    As the game uses it
    set_global_flag = hive_fe_spawned
  • set_spawn_system_batchany scope

    Optimizes the calls for spawn_system effect. Spawn system should be located in a block between Begin and End.

    Begin: set_spawn_system_batch = begin
    End: set_spawn_system_batch = end

    The game's own scripts use it 22 times.

    As the game uses it
    set_spawn_system_batch = end
  • set_timed_global_flagany scope

    Sets an arbitrarily-named global flag for a set duration

    set_timed_global_flag = {
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }

    The game's own scripts use it 46 times.

    As the game uses it
    set_timed_global_flag = {
    	flag = khan_no_die
    	days = 7200
    }
  • set_update_modifiers_batchany scope

    Disables modifier system to do full updates between Begin and End.

    On end it will trigger a full update of any dirty modifiers.
    Begin: set_update_modifiers_batch = begin
    End: set_update_modifiers_batch = end

    The game's own scripts use it 12 times.

    As the game uses it
    set_update_modifiers_batch = end
  • spawn_random_anomalyany scope

    Spawn a random anomaly on the scoped planet

    spawn_random_anomaly = {
    	target = root.owner
    	surveyor = event_target:arkship
    }

    The game's own scripts use it 2 times.

    As the game uses it
    spawn_random_anomaly = {
    	target = event_target:arkship.controller
    	surveyor = event_target:arkship
    }
  • spawn_random_stormany scope

    Spawn a random storm type with a random start and end position

    The game's own scripts use it 20 times.

    As the game uses it
    spawn_random_storm = {
    	type = gravity_storm
    	cosmic_storm_start_position = this
    	immediate = yes
    }
  • start_storm_area_placingany scope

    Starts the storm placing mode with radius

    radius = <float>

    The game's own scripts use it once.

  • stop_crisis_soundany scope

    Stops the crisis ambient loop

    stop_crisis_sound = yes

    The game's own scripts use it 18 times.

    As the game uses it
    stop_crisis_sound = yes
  • storm_apply_aftermath_modifierany scope

    Applies Cosmic Storm Aftermath Modifiers. You can specify up to a max of 10 Severities and each one will be chosen based on it's chance.

    storm_apply_aftermath_modifier = { severity = { modifier = <key>, days = <ModifierDuration> chance = <WeightedChance> effect  = <OnAppliedOptionalEffect> }}

    The game's own scripts use it 7 times.

  • switchany scope

    Executes the first appropriate effect set for a specific trigger

    switch = {
    	trigger = <trigger>
    	<corresponding key/bool/int> = { <effect> }
    	<corresponding key/bool/int> > (less/greater than appear 'reversed') { <effect> }
    	default = { <effect> }
    }

    The game's own scripts use it 320 times.

  • tooltipany scope

    Just a tooltip

    The game's own scripts use it 474 times.

    As the game uses it
    tooltip = {
    	add_modifier = {
    		modifier = enclave_modifier
    		days = -1
    	}
    }
  • transfer_carrierany scope

    Transfer the colony to another carrier

    transfer_carrier = {
    	source = <source colony/carrier>
    	target = <target carrier>
    	transfer_ownership = yes/no # default: no
    	transfer_controller = yes/no # default: no
    	merge_pops = yes/no # default: no
    	destroy_colony = yes/no # default: no
    }

    The game's own scripts use it 2 times.

  • transfer_pop_amountany scope

    Transfer the amount OR percentage of pops from the source pop group to the target pop group

    transfer_pop_amount = {
    	source = <source pop group>
    	target = <target pop group>
    	amount = <amount> OR percentage = <percentage>
    	random = <number> (optional) If set, the amount will be randomized in [max(0, size - random), size + random].
    	growth_category = <key> (optional, default: 'GROWTH_CAT_OTHER')
    }

    The game's own scripts use it 8 times.

    As the game uses it
    transfer_pop_amount = {
    	source = this
    	target = event_target:purge_pop_group
    	percentage = 1
    }
  • whileany scope

    Repeats enclosed effects while limit criteria are met or until set iteration count is reached

    while = { limit = { <triggers> } <effects> }
     while = { count = [3|Variable] <effects> }

    The game's own scripts use it 974 times.

    As the game uses it
    while = {
    	count = 2
    	add_blocker = {
    		type = d_aura_blocker
    	}
    }

Loops

  • every_active_first_contactcountry

    Iterate through each active (non-completed) first contact that this country is engaging in - executes the enclosed effects on all of them for which the limit triggers return true

    every_active_first_contact = { limit = { <triggers> } <effects> }

    The game's own scripts use it 2 times.

  • every_agreementcountry, no scope

    Iterate through each agreement - executes the enclosed effects on all of them for which the limit triggers return true

    every_agreement = { limit = { <triggers> } <effects> }

    The game's own scripts use it 10 times.

  • every_ambient_objectany scope

    Iterate through every ambient object in the game - executes the enclosed effects on all of them for which the limit triggers return true

    every_ambient_object = { limit = { <triggers> } <effects> }

    The game's own scripts use it 15 times.

    As the game uses it
    every_ambient_object = {
    	limit = {
    		has_ambient_object_flag = zroni_storm
    	}
    	destroy_ambient_object = this
    }
  • every_archaeological_siteany scope

    Iterate through every archaeological sites - executes the enclosed effects on all of them for which the limit triggers return true

    every_archaeological_site = { limit = { <triggers> } <effects> }

    The game's own scripts use it once.

    As the game uses it
    every_archaeological_site = {
    	limit = {
    		is_site_type = paragon_legendary_leader_homeworld
    	}
    	destroy_archaeological_site = this
    }
  • every_associatefederation

    Iterate through each associate member of the federation - executes the enclosed effects on all of them for which the limit triggers return true

    every_associate = { limit = { <triggers> } <effects> }
  • every_astral_riftany scope

    Iterate through every astral rift - executes the enclosed effects on all of them for which the limit triggers return true

    every_astral_rift = { limit = { <triggers> } <effects> }
  • every_attackerwar

    Iterate through all attackers in the current war - executes the enclosed effects on all of them for which the limit triggers return true

    every_attacker = { limit = { <triggers> } <effects> }

    The game's own scripts use it 5 times.

  • every_available_debriscountry

    Iterate through all debris belong to available special projects of the scoped country - executes the enclosed effects on all of them for which the limit triggers return true

    every_available_debris = { limit = { <triggers> } <effects> }
  • every_bypassany scope

    Iterate through every bypass - executes the enclosed effects on all of them for which the limit triggers return true

    every_bypass = { limit = { <triggers> } <effects> }

    The game's own scripts use it 2 times.

  • every_bypass_in_systemsystem

    Iterate through every bypass in the scoped galactic object. - executes the enclosed effects on all of them for which the limit triggers return true

    every_bypass_in_system = { limit = { <triggers> } <effects> }
  • every_combatant_fleetfleet

    Iterate through each fleet this fleet is in combat with - executes the enclosed effects on all of them for which the limit triggers return true

    every_combatant_fleet = { limit = { <triggers> } <effects> }
  • every_controlled_colonycountry

    Iterate through each colony controlled by the current empire - executes the enclosed effects on all of them for which the limit triggers return true

    every_controlled_colony = { limit = { <triggers> } <effects> }
  • every_controlled_fleetcountry

    Iterate through each fleet controlled by the country - executes the enclosed effects on all of them for which the limit triggers return true

    every_controlled_fleet = { limit = { <triggers> } <effects> }

    The game's own scripts use it 46 times.

    As the game uses it
    every_controlled_fleet = {
    	limit = {
    		exists = solar_system
    	}
    	update_fleet_space_storm_reduction_zroni_rift = yes
    }
  • every_controlled_planetcountry

    Iterate through each planet controlled by the current empire - executes the enclosed effects on all of them for which the limit triggers return true

    every_controlled_planet = { limit = { <triggers> } <effects> }

    The game's own scripts use it 4 times.

    As the game uses it
    every_controlled_planet = {
    	remove_all_buildings = yes
    }
  • every_controlled_shipcountry, fleet

    Iterate through each ship in the fleet or controlled by the country - executes the enclosed effects on all of them for which the limit triggers return true

    every_controlled_ship = { limit = { <triggers> } <effects> }

    The game's own scripts use it 38 times.

    As the game uses it
    every_controlled_ship = {
    	limit = {
    		is_ship_size = star_eater
    	}
    	delete_ship = this
    }
  • every_cosmic_stormany scope

    Iterate through all cosmic storms in the galaxy - executes the enclosed effects on all of them for which the limit triggers return true

    every_cosmic_storm = { limit = { <triggers> } <effects> }

    The game's own scripts use it 2 times.

    As the game uses it
    every_cosmic_storm = {
    	limit = {
    		has_storm_flag = storm_windswept_fates
    	}
    	destroy_cosmic_storm = yes
    }
  • every_cosmic_storm_end_positionany scope

    Iterate through all systems valid to be a storms end position - executes the enclosed effects on all of them for which the limit triggers return true

    every_cosmic_storm_end_position = { limit = { <triggers> } <effects> }
  • every_cosmic_storm_start_positionany scope

    Iterate through all systems valid to be a storms start position - executes the enclosed effects on all of them for which the limit triggers return true

    every_cosmic_storm_start_position = { limit = { <triggers> } <effects> }
  • every_council_memberany scope

    Iterate through each member of the galactic council - executes the enclosed effects on all of them for which the limit triggers return true

    every_council_member = { limit = { <triggers> } <effects> }
  • every_countryany scope

    Iterate through all countries - executes the enclosed effects on all of them for which the limit triggers return true

    every_country = { limit = { <triggers> } <effects> }

    The game's own scripts use it 449 times.

    As the game uses it
    every_country = {
    	limit = {
    		is_mercenary = yes
    	}
    	remove_modifier = resolution_defenseprivatization_condottieri_merc_naval_cap
    }
  • every_country_neighbor_to_systemsystem

    Iterate through all countries that own system 1 jump away from current system (bypasses included) - executes the enclosed effects on all of them for which the limit triggers return true

    every_country_neighbor_to_system = { limit = { <triggers> } <effects> }
  • every_defenderwar

    Iterate through all defenders in the current war - executes the enclosed effects on all of them for which the limit triggers return true

    every_defender = { limit = { <triggers> } <effects> }

    The game's own scripts use it 5 times.

    As the game uses it
    every_defender = {
    	limit = {
    		is_nomadic = yes
    	}
    	annihilate_captured_arks_effect = yes
    }
  • every_depositplanet, ship, colony

    Iterate through each deposit on the colony carrier - executes the enclosed effects on all of them for which the limit triggers return true

    every_deposit = { limit = { <triggers> } <effects> }

    The game's own scripts use it 43 times.

    As the game uses it
    every_deposit = {
    	limit = {
    		is_blocker = yes
    	}
    	clear_blocker = yes
    }
  • every_envoycountry

    Iterate through each envoy available to the country - executes the enclosed effects on all of them for which the limit triggers return true

    every_envoy = { limit = { <triggers> } <effects> }

    The game's own scripts use it 15 times.

    As the game uses it
    every_envoy = {
    	limit = {
    		is_exact_same_species = event_target:changing_species
    	}
    	change_species = last_created_species
    }
  • every_espionage_assetno scope, spy network, espionage operation

    Iterate through each espionage asset - executes the enclosed effects on all of them for which the limit triggers return true

    every_espionage_asset = { limit = { <triggers> } <effects> }
  • every_espionage_operationcountry, no scope, spy network

    Iterate through each espionage operation - executes the enclosed effects on all of them for which the limit triggers return true

    every_espionage_operation = { limit = { <triggers> } <effects> }
  • every_exhibitcountry

    Iterate through every exhibit - executes the enclosed effects on all of them for which the limit triggers return true

    every_exhibit = { limit = { <triggers> } <effects> }
  • every_existing_species_traitsno scope

    Iterate through all existing species traits in the game - executes the enclosed effects on all of them for which the limit triggers return true

    every_existing_species_traits = { limit = { <triggers> } <effects> }
  • every_federationany scope

    Iterate through each federation - executes the enclosed effects on all of them for which the limit triggers return true

    every_federation = { limit = { <triggers> } <effects> }
  • every_federation_allycountry

    Iterate through all countries in a federation with the scoped country - executes the enclosed effects on all of them for which the limit triggers return true

    every_federation_ally = { limit = { <triggers> } <effects> }

    The game's own scripts use it 11 times.

    As the game uses it
    every_federation_ally = {
    	country_event = {
    		id = federations2.101
    	}
    }
  • every_first_contactcountry

    Iterate through each first contact (both active and complete) that this country is engaging in - executes the enclosed effects on all of them for which the limit triggers return true

    every_first_contact = { limit = { <triggers> } <effects> }
  • every_fleet_in_orbitmegastructure, planet, ship, starbase

    Iterate through each fleet orbiting the current planet/starbase/megastructure - executes the enclosed effects on all of them for which the limit triggers return true

    every_fleet_in_orbit = { limit = { <triggers> } <effects> }

    The game's own scripts use it 7 times.

    As the game uses it
    every_fleet_in_orbit = {
    	owner = {
    		set_country_flag = does_not_compute
    	}
    }
  • every_fleet_in_systemsystem

    Iterate through each fleet in the current system - executes the enclosed effects on all of them for which the limit triggers return true

    every_fleet_in_system = { limit = { <triggers> } <effects> }

    The game's own scripts use it 70 times.

    As the game uses it
    every_fleet_in_system = {
    	limit = {
    		is_mobile = no
    	}
    	delete_fleet = this
    }
  • every_galaxy_fleetany scope

    Iterate through each fleet in the entire game - executes the enclosed effects on all of them for which the limit triggers return true

    every_galaxy_fleet = { limit = { <triggers> } <effects> }

    The game's own scripts use it once.

    As the game uses it
    every_galaxy_fleet = {
    	limit = {
    		has_fleet_flag = pest_contract_target@root
    	}
    	remove_fleet_flag = pest_contract_target@root
    }
  • every_galaxy_planetany scope

    Iterate through each planet ANYWHERE in the game; warning: resource intensive! - executes the enclosed effects on all of them for which the limit triggers return true

    every_galaxy_planet = { limit = { <triggers> } <effects> }

    The game's own scripts use it 20 times.

    As the game uses it
    every_galaxy_planet = {
    	limit = {
    		has_modifier = titanic_life
    	}
    	add_deposit = d_titanic_life_blocker
    }
  • every_galaxy_sectorany scope

    Iterate through all sectors in the game - executes the enclosed effects on all of them for which the limit triggers return true

    every_galaxy_sector = { limit = { <triggers> } <effects> }
  • every_galcom_memberany scope

    Iterate through each member of the galactic community - executes the enclosed effects on all of them for which the limit triggers return true

    every_galcom_member = { limit = { <triggers> } <effects> }

    The game's own scripts use it 22 times.

    As the game uses it
    every_galcom_member = {
    	limit = {
    		is_subject = yes
    	}
    	galcom_subject_ethic_modifier_effect = yes
    }
  • every_ground_combat_attackerplanet, ship, colony

    Iterate through each army currently attacking the colony in ground combat - executes the enclosed effects on all of them for which the limit triggers return true

    every_ground_combat_attacker = { limit = { <triggers> } <effects> }

    The game's own scripts use it 4 times.

  • every_ground_combat_defenderplanet, ship, colony

    Iterate through each army currently defending the colony in ground combat - executes the enclosed effects on all of them for which the limit triggers return true

    every_ground_combat_defender = { limit = { <triggers> } <effects> }
  • every_issued_missioncountry

    Iterate through each mission that the current country has issued - executes the enclosed effects on all of them for which the limit triggers return true

    every_issued_mission = { limit = { <triggers> } <effects> }

    The game's own scripts use it 5 times.

    As the game uses it
    every_issued_mission = {
    	cancel_contract = {
    		refund = no
    		show_message = no
    	}
    }
  • every_job_pop_grouppop, job

    Iterate through each pop group that contains this job - executes the enclosed effects on all of them for which the limit triggers return true

    every_job_pop_group = { limit = { <triggers> } <effects> }

    The game's own scripts use it once.

  • every_megastructureany scope

    Iterate through each megastructure - executes the enclosed effects on all of them for which the limit triggers return true

    every_megastructure = { limit = { <triggers> } <effects> }

    The game's own scripts use it 6 times.

  • every_memberfederation

    Iterate through each member of the federation - executes the enclosed effects on all of them for which the limit triggers return true

    every_member = { limit = { <triggers> } <effects> }

    The game's own scripts use it 67 times.

    As the game uses it
    every_member = {
    	country_event = {
    		id = fedev.630
    		days = 30
    	}
    }
  • every_moonplanet, ship, colony

    Iterate through each moon of the planet - executes the enclosed effects on all of them for which the limit triggers return true

    every_moon = { limit = { <triggers> } <effects> }

    The game's own scripts use it 4 times.

    As the game uses it
    every_moon = {
    	limit = {
    		colonizable_planet = no
    	}
    	remove_planet = yes
    }
  • every_neighbor_countrycountry

    Iterate through all neighbor countries - executes the enclosed effects on all of them for which the limit triggers return true

    every_neighbor_country = { limit = { <triggers> } <effects> }
  • every_neighbor_systemsystem

    Iterate through all a system's neighboring systems by hyperlane - executes the enclosed effects on all of them for which the limit triggers return true

    every_neighbor_system = { limit = { <triggers> } <effects> }

    The game's own scripts use it 131 times.

    As the game uses it
    every_neighbor_system = {
    	set_star_flag = empire_cluster
    }
  • every_neighbor_system_euclideansystem

    Iterate through all a system's neighboring systems (by closeness, not by hyperlanes) - executes the enclosed effects on all of them for which the limit triggers return true

    every_neighbor_system_euclidean = { limit = { <triggers> } <effects> }

    The game's own scripts use it 2 times.

  • every_observed_pre_ftl_within_bordercountry, sector

    Iterate through all pre-ftl countries with an observation post around their capital within the country's or sector's borders - executes the enclosed effects on all of them for which the limit triggers return true

    every_observed_pre_ftl_within_border = { limit = { <triggers> } <effects> }
  • every_orbital_stationcountry, system

    Iterate through each orbital station owned by the current country or in the current system - executes the enclosed effects on all of them for which the limit triggers return true

    every_orbital_station = { limit = { <triggers> } <effects> }
  • every_owned_armycountry

    Iterate through each army that is owned by the country - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_army = { limit = { <triggers> } <effects> }

    The game's own scripts use it 26 times.

    As the game uses it
    every_owned_army = {
    	limit = {
    		army_type = gray_army
    	}
    	remove_army = yes
    }
  • every_owned_colonycountry, sector

    Iterate through each colony owned by the current empire - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_colony = { limit = { <triggers> } <effects> }

    The game's own scripts use it 40 times.

    As the game uses it
    every_owned_colony = {
    	limit = {
    		has_modifier = celestial_tear_modifier
    	}
    	remove_modifier = celestial_tear_modifier
    }
  • every_owned_contractcountry

    Iterate through each contract a country has - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_contract = { limit = { <triggers> } <effects> }

    The game's own scripts use it 3 times.

    As the game uses it
    every_owned_contract = {
    	cancel_contract = {
    		refund = no
    	}
    }
  • every_owned_designcountry

    Iterate through all designs owned by the current country - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_design = { limit = { <triggers> } <effects> }

    The game's own scripts use it 2 times.

    As the game uses it
    every_owned_design = {
    	limit = {
    		has_design_flag = bulwark_battlewright
    	}
    	save_event_target_as = remove_this_design
    }
  • every_owned_fleetcountry

    Iterate through each fleet owned by the country - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_fleet = { limit = { <triggers> } <effects> }

    The game's own scripts use it 68 times.

    As the game uses it
    every_owned_fleet = {
    	limit = {
    		is_mobile = yes
    	}
    	set_owner = root
    }
  • every_owned_leadercountry

    Iterate through each leader that is owned by the country - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_leader = { limit = { <triggers> } <effects> }

    The game's own scripts use it 110 times.

    As the game uses it
    every_owned_leader = {
    	limit = {
    		has_leader_flag = skrand
    	}
    	add_experience = 800
    }
  • every_owned_megastructurecountry

    Iterate through each owned megastructure - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_megastructure = { limit = { <triggers> } <effects> }

    The game's own scripts use it 12 times.

    As the game uses it
    every_owned_megastructure = {
    	limit = {
    		is_megastructure_incompatible_with_nomads = yes
    	}
    	remove_megastructure = this
    }
  • every_owned_missioncountry

    Iterate through each mission a country has - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_mission = { limit = { <triggers> } <effects> }
  • every_owned_nonprimary_starbasecountry

    Iterate through every owned non-primary starbase (e.g. orbital rings, deep space citadels, or waystations). This does not return mobile starbases (e.g. juggernauts or arkships). - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_nonprimary_starbase = { limit = { <triggers> } <effects> }

    The game's own scripts use it 15 times.

  • every_owned_planetcountry, sector

    Iterate through each colony owned by the current empire (Deprecated; use owned_colony instead) - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_planet = { limit = { <triggers> } <effects> }

    The game's own scripts use it 130 times.

    As the game uses it
    every_owned_planet = {
    	limit = {
    		has_modifier = holy_planet
    	}
    	destroy_colony = yes
    }
  • every_owned_pop_groupplanet, country, ship, system, faction, sector, colony

    Iterate through all owned pop groups - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_pop_group = { limit = { <triggers> } <effects> }

    The game's own scripts use it 244 times.

    As the game uses it
    every_owned_pop_group = {
    	limit = {
    		is_sapient = no
    	}
    	add_psionic_trait = yes
    }
  • every_owned_pop_jobplanet, country, ship, system, sector, colony

    Iterate through all owned pop jobs - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_pop_job = { limit = { <triggers> } <effects> }

    The game's own scripts use it 8 times.

  • every_owned_pop_speciescountry

    Iterate through each species of a country's owned pops - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_pop_species = { limit = { <triggers> } <effects> }
  • every_owned_sectorcountry

    Iterate through every owned sector - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_sector = { limit = { <triggers> } <effects> }
  • every_owned_shipcountry, fleet

    Iterate through each ship in the fleet or controlled by the country - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_ship = { limit = { <triggers> } <effects> }

    The game's own scripts use it 58 times.

    As the game uses it
    every_owned_ship = {
    	repair_amount = 1000
    	set_disabled = no
    	set_disable_at_health = no
    }
  • every_owned_starbasecountry

    Iterate through every owned primary starbase (i.e. the starbase that claims ownership of a system). - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_starbase = { limit = { <triggers> } <effects> }

    The game's own scripts use it 20 times.

    As the game uses it
    every_owned_starbase = {
    	limit = {
    		is_normal_starbase = yes
    	}
    	add_bulwark_array = yes
    }
  • every_owned_storm_influence_fieldcountry

    Iterate through all influence fields owned by a country - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_storm_influence_field = { limit = { <triggers> } <effects> }
  • every_planet_armyplanet, ship, colony

    Iterate through each army on the colony (not in ground combat), regardless of owner. - executes the enclosed effects on all of them for which the limit triggers return true

    every_planet_army = { limit = { <triggers> } <effects> }

    The game's own scripts use it 3 times.

    As the game uses it
    every_planet_army = {
    	remove_army = yes
    }
  • every_planet_within_bordercountry

    Iterate through each planet within the current empire's borders - executes the enclosed effects on all of them for which the limit triggers return true

    every_planet_within_border = { limit = { <triggers> } <effects> }

    The game's own scripts use it 48 times.

    As the game uses it
    every_planet_within_border = {
    	set_surveyed = {
    		surveyed = yes
    		surveyor = event_target:new_khanate
    	}
    }
  • every_playable_countryany scope

    Iterate through all playable countries - executes the enclosed effects on all of them for which the limit triggers return true

    every_playable_country = { limit = { <triggers> } <effects> }

    The game's own scripts use it 408 times.

  • every_pool_leadercountry

    Iterate through each leader that is recruitable for the country - executes the enclosed effects on all of them for which the limit triggers return true

    every_pool_leader = { limit = { <triggers> } <effects> }

    The game's own scripts use it 39 times.

    As the game uses it
    every_pool_leader = {
    	add_trait = {
    		trait = random_common
    		show_message = no
    	}
    }
  • every_pop_factioncountry, pop, pop group

    Iterate through all the country/pop group/pop's pop factions - executes the enclosed effects on all of them for which the limit triggers return true

    every_pop_faction = { limit = { <triggers> } <effects> }

    The game's own scripts use it 28 times.

    As the game uses it
    every_pop_faction = {
    	limit = {
    		is_faction_extorted = yes
    	}
    	set_faction_extorted = no
    }
  • every_pre_ftl_within_bordercountry, sector

    Iterate through all pre-ftl countries within the country's or sector's borders - executes the enclosed effects on all of them for which the limit triggers return true

    every_pre_ftl_within_border = { limit = { <triggers> } <effects> }

    The game's own scripts use it 4 times.

  • every_relationcountry

    Iterate through all relations - executes the enclosed effects on all of them for which the limit triggers return true

    every_relation = { limit = { <triggers> } <effects> }

    The game's own scripts use it 40 times.

    As the game uses it
    every_relation = {
    	limit = {
    		has_any_habitability = yes
    	}
    	set_country_flag = valid_refugee_destination_for_@event_target:refugee_pop
    }
  • every_rim_systemany scope

    Iterate through all rim systems - executes the enclosed effects on all of them for which the limit triggers return true

    every_rim_system = { limit = { <triggers> } <effects> }
  • every_rival_countrycountry

    Iterate through all countries rivalled by the scoped country - executes the enclosed effects on all of them for which the limit triggers return true

    every_rival_country = { limit = { <triggers> } <effects> }

    The game's own scripts use it 2 times.

    As the game uses it
    every_rival_country = {
    	end_truce = root
    }
  • every_ship_in_systemsystem

    Iterate through each ship in the current system - executes the enclosed effects on all of them for which the limit triggers return true

    every_ship_in_system = { limit = { <triggers> } <effects> }

    The game's own scripts use it 14 times.

    As the game uses it
    every_ship_in_system = {
    	limit = {
    		sb_extreme_solar_flare_ship_trigger = yes
    	}
    	destroy_ship = this
    }
  • every_situationcountry

    Iterate through each situation a country is experiencing - executes the enclosed effects on all of them for which the limit triggers return true

    every_situation = { limit = { <triggers> } <effects> }

    The game's own scripts use it 32 times.

    As the game uses it
    every_situation = {
    	limit = {
    		is_situation_type = situation_kaleidoscope
    	}
    	destroy_situation = this
    }
  • every_species_pop_groupspecies

    Iterate through each pop group that belongs to this species; warning: resource-intensive! - executes the enclosed effects on all of them for which the limit triggers return true

    every_species_pop_group = { limit = { <triggers> } <effects> }
  • every_spynetworkcountry, no scope

    Iterate through each spynetwork - executes the enclosed effects on all of them for which the limit triggers return true

    every_spynetwork = { limit = { <triggers> } <effects> }

    The game's own scripts use it 6 times.

  • every_starbase_in_networkstarbase

    Iterate through every starbase in the same waystation network as the scoped starbase. - executes the enclosed effects on all of them for which the limit triggers return true

    every_starbase_in_network = { limit = { <triggers> } <effects> }
  • every_starbase_in_systemsystem

    Iterate through every starbase in the scoped galactic object. - executes the enclosed effects on all of them for which the limit triggers return true

    every_starbase_in_system = { limit = { <triggers> } <effects> }

    The game's own scripts use it once.

    As the game uses it
    every_starbase_in_system = {
    	ship = {
    		destroy_fleet = this
    	}
    }
  • every_subjectcountry

    Iterate through all subjects of the scoped country - executes the enclosed effects on all of them for which the limit triggers return true

    every_subject = { limit = { <triggers> } <effects> }

    The game's own scripts use it 61 times.

    As the game uses it
    every_subject = {
    	country_event = {
    		id = marauder.671
    		days = 10
    	}
    }
  • every_systemany scope

    Iterate through all systems - executes the enclosed effects on all of them for which the limit triggers return true

    every_system = { limit = { <triggers> } <effects> }

    The game's own scripts use it 61 times.

    As the game uses it
    every_system = {
    	limit = {
    		has_star_flag = enclave
    	}
    	remove_star_flag = visited_by_nomad@prev
    }
  • every_system_added_to_stormcosmic storm

    Iterate through all systems added to the storm - executes the enclosed effects on all of them for which the limit triggers return true

    every_system_added_to_storm = { limit = { <triggers> } <effects> }

    The game's own scripts use it 8 times.

    As the game uses it
    every_system_added_to_storm = {
    	added_to_storm_base_effect = yes
    	nexus_storm_add = yes
    }
  • every_system_ambient_objectsystem

    Iterate through every ambient object in the solar system - executes the enclosed effects on all of them for which the limit triggers return true

    every_system_ambient_object = { limit = { <triggers> } <effects> }

    The game's own scripts use it 40 times.

    As the game uses it
    every_system_ambient_object = {
    	limit = {
    		has_ambient_object_flag = dead_prethoryn
    	}
    	destroy_ambient_object = this
    }
  • every_system_in_cosmic_storm_influence_fieldstorm influence field

    Iterate through all influence fields owned by a country - executes the enclosed effects on all of them for which the limit triggers return true

    every_system_in_cosmic_storm_influence_field = { limit = { <triggers> } <effects> }
  • every_system_megastructureany scope

    Iterate through each megastructure in system - executes the enclosed effects on all of them for which the limit triggers return true

    every_system_megastructure = { limit = { <triggers> } <effects> }

    The game's own scripts use it 12 times.

    As the game uses it
    every_system_megastructure = {
    	set_ruined_megastructure = yes
    }
  • every_system_planetsystem

    Iterate through each planet (colony or not) in the current system - executes the enclosed effects on all of them for which the limit triggers return true

    every_system_planet = { limit = { <triggers> } <effects> }

    The game's own scripts use it 229 times.

    As the game uses it
    every_system_planet = {
    	limit = {
    		is_asteroid = yes
    	}
    	remove_planet = yes
    }
  • every_system_planet_colonysystem

    Iterate through each planet colony in the current system - executes the enclosed effects on all of them for which the limit triggers return true

    every_system_planet_colony = { limit = { <triggers> } <effects> }

    The game's own scripts use it 33 times.

    As the game uses it
    every_system_planet_colony = {
    	carrier_event = {
    		id = infernals.51
    		months = 3
    	}
    }
  • every_system_removed_from_stormcosmic storm

    Iterate through all systems removed from storm - executes the enclosed effects on all of them for which the limit triggers return true

    every_system_removed_from_storm = { limit = { <triggers> } <effects> }

    The game's own scripts use it 8 times.

    As the game uses it
    every_system_removed_from_storm = {
    	removed_from_storm_base_effect = yes
    	nexus_storm_remove = yes
    }
  • every_system_ship_colonysystem

    Iterate through each ship colony in the current system - executes the enclosed effects on all of them for which the limit triggers return true

    every_system_ship_colony = { limit = { <triggers> } <effects> }

    The game's own scripts use it 11 times.

    As the game uses it
    every_system_ship_colony = {
    	add_planet_devastation = 50
    }
  • every_system_with_auracountry

    Iterate through every system with an Aura - executes the enclosed effects on all of them for which the limit triggers return true

    every_system_with_aura = { limit = { <triggers> } <effects> }

    The game's own scripts use it 7 times.

    As the game uses it
    every_system_with_aura = {
    	add_aura_intensity = @accord_aura_intensity_loss
    }
  • every_system_within_bordercountry, sector

    Iterate through all systems within the country's or sector's borders - executes the enclosed effects on all of them for which the limit triggers return true

    every_system_within_border = { limit = { <triggers> } <effects> }

    The game's own scripts use it 56 times.

    As the game uses it
    every_system_within_border = {
    	add_modifier = {
    		modifier = queen_small_scorn_storm
    		days = -1
    	}
    }
  • every_system_within_stormcosmic storm

    Iterate through all systems within the storm - executes the enclosed effects on all of them for which the limit triggers return true

    every_system_within_storm = { limit = { <triggers> } <effects> }

    The game's own scripts use it 19 times.

    As the game uses it
    every_system_within_storm = {
    	added_to_storm_base_effect = yes
    	nexus_storm_add = yes
    }
  • every_targeting_situationplanet, ship, colony

    Iterate through each situation that is targeting the current colony carrier - executes the enclosed effects on all of them for which the limit triggers return true

    every_targeting_situation = { limit = { <triggers> } <effects> }
  • every_trait_available_for_speciespop, pop group, leader, species

    Iterate through all available species traits (minus DLC-locked) and check if scoped species doesn't have this trait

    trait_available_for_species = { trait_has_all_tags = { organic positive } } - executes the enclosed effects on all of them for which the limit triggers return true
    every_trait_available_for_species = { limit = { <triggers> } <effects> }
  • every_trait_of_speciespop, pop group, leader, species

    Iterate through each trait that the scoped species has

    trait_of_species = { trait_has_all_tags = { positive } } - executes the enclosed effects on all of them for which the limit triggers return true
    every_trait_of_species = { limit = { <triggers> } <effects> }
  • every_warcountry

    Iterate through all wars the country is engaged in - executes the enclosed effects on all of them for which the limit triggers return true

    every_war = { limit = { <triggers> } <effects> }

    The game's own scripts use it 21 times.

    As the game uses it
    every_war = {
    	remove_war_participant = prev
    }
  • every_war_participantwar

    Iterate through all war participants - executes the enclosed effects on all of them for which the limit triggers return true

    every_war_participant = { limit = { <triggers> } <effects> }

    The game's own scripts use it 26 times.

    As the game uses it
    every_war_participant = {
    	prev = {
    		remove_war_participant = prev
    	}
    }
  • ordered_active_first_contactcountry

    Iterate through each active (non-completed) first contact that this country is engaging in - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_active_first_contact = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_agreementcountry, no scope

    Iterate through each agreement - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_agreement = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_ambient_objectany scope

    Iterate through every ambient object in the game - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_ambient_object = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_archaeological_siteany scope

    Iterate through every archaeological sites - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_archaeological_site = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_associatefederation

    Iterate through each associate member of the federation - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_associate = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_astral_riftany scope

    Iterate through every astral rift - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_astral_rift = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_attackerwar

    Iterate through all attackers in the current war - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_attacker = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_available_debriscountry

    Iterate through all debris belong to available special projects of the scoped country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_available_debris = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_bypassany scope

    Iterate through every bypass - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_bypass = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_bypass_in_systemsystem

    Iterate through every bypass in the scoped galactic object. - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_bypass_in_system = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_combatant_fleetfleet

    Iterate through each fleet this fleet is in combat with - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_combatant_fleet = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_controlled_colonycountry

    Iterate through each colony controlled by the current empire - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_controlled_colony = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_controlled_fleetcountry

    Iterate through each fleet controlled by the country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_controlled_fleet = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it 7 times.

  • ordered_controlled_planetcountry

    Iterate through each planet controlled by the current empire - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_controlled_planet = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_controlled_shipcountry, fleet

    Iterate through each ship in the fleet or controlled by the country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_controlled_ship = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_cosmic_stormany scope

    Iterate through all cosmic storms in the galaxy - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_cosmic_storm = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_cosmic_storm_end_positionany scope

    Iterate through all systems valid to be a storms end position - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_cosmic_storm_end_position = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_cosmic_storm_start_positionany scope

    Iterate through all systems valid to be a storms start position - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_cosmic_storm_start_position = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_council_memberany scope

    Iterate through each member of the galactic council - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_council_member = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_countryany scope

    Iterate through all countries - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_country = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it 6 times.

  • ordered_country_neighbor_to_systemsystem

    Iterate through all countries that own system 1 jump away from current system (bypasses included) - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_country_neighbor_to_system = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_defenderwar

    Iterate through all defenders in the current war - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_defender = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_depositplanet, ship, colony

    Iterate through each deposit on the colony carrier - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_deposit = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_envoycountry

    Iterate through each envoy available to the country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_envoy = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_espionage_assetno scope, spy network, espionage operation

    Iterate through each espionage asset - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_espionage_asset = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_espionage_operationcountry, no scope, spy network

    Iterate through each espionage operation - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_espionage_operation = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_exhibitcountry

    Iterate through every exhibit - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_exhibit = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_existing_species_traitsno scope

    Iterate through all existing species traits in the game - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_existing_species_traits = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_federationany scope

    Iterate through each federation - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_federation = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_federation_allycountry

    Iterate through all countries in a federation with the scoped country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_federation_ally = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_first_contactcountry

    Iterate through each first contact (both active and complete) that this country is engaging in - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_first_contact = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_fleet_in_orbitmegastructure, planet, ship, starbase

    Iterate through each fleet orbiting the current planet/starbase/megastructure - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_fleet_in_orbit = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_fleet_in_systemsystem

    Iterate through each fleet in the current system - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_fleet_in_system = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it 4 times.

  • ordered_galaxy_fleetany scope

    Iterate through each fleet in the entire game - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_galaxy_fleet = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_galaxy_planetany scope

    Iterate through each planet ANYWHERE in the game; warning: resource intensive! - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_galaxy_planet = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_galaxy_sectorany scope

    Iterate through all sectors in the game - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_galaxy_sector = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_galcom_memberany scope

    Iterate through each member of the galactic community - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_galcom_member = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_ground_combat_attackerplanet, ship, colony

    Iterate through each army currently attacking the colony in ground combat - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_ground_combat_attacker = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_ground_combat_defenderplanet, ship, colony

    Iterate through each army currently defending the colony in ground combat - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_ground_combat_defender = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_issued_missioncountry

    Iterate through each mission that the current country has issued - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_issued_mission = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_job_pop_grouppop, job

    Iterate through each pop group that contains this job - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_job_pop_group = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_megastructureany scope

    Iterate through each megastructure - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_megastructure = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_memberfederation

    Iterate through each member of the federation - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_member = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it 2 times.

    As the game uses it
    ordered_member = {
    	position = 0
    	order_by = value:conclave_election_value
    	save_event_target_as = conclave_winner
    }
  • ordered_moonplanet, ship, colony

    Iterate through each moon of the planet - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_moon = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_neighbor_countrycountry

    Iterate through all neighbor countries - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_neighbor_country = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_neighbor_systemsystem

    Iterate through all a system's neighboring systems by hyperlane - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_neighbor_system = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_neighbor_system_euclideansystem

    Iterate through all a system's neighboring systems (by closeness, not by hyperlanes) - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_neighbor_system_euclidean = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_observed_pre_ftl_within_bordercountry, sector

    Iterate through all pre-ftl countries with an observation post around their capital within the country's or sector's borders - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_observed_pre_ftl_within_border = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_orbital_stationcountry, system

    Iterate through each orbital station owned by the current country or in the current system - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_orbital_station = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_owned_armycountry

    Iterate through each army that is owned by the country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_army = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_owned_colonycountry, sector

    Iterate through each colony owned by the current empire - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_colony = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it 3 times.

  • ordered_owned_contractcountry

    Iterate through each contract a country has - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_contract = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_owned_designcountry

    Iterate through all designs owned by the current country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_design = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_owned_fleetcountry

    Iterate through each fleet owned by the country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_fleet = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it once.

  • ordered_owned_leadercountry

    Iterate through each leader that is owned by the country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_leader = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it 2 times.

  • ordered_owned_megastructurecountry

    Iterate through each owned megastructure - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_megastructure = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_owned_missioncountry

    Iterate through each mission a country has - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_mission = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_owned_nonprimary_starbasecountry

    Iterate through every owned non-primary starbase (e.g. orbital rings, deep space citadels, or waystations). This does not return mobile starbases (e.g. juggernauts or arkships). - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_nonprimary_starbase = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_owned_planetcountry, sector

    Iterate through each colony owned by the current empire (Deprecated; use owned_colony instead) - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_planet = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it 18 times.

    As the game uses it
    ordered_owned_planet = {
    	order_by = trigger:pop_amount
    	position = 0
    	save_event_target_as = most_populous
    }
  • ordered_owned_pop_groupplanet, country, ship, system, faction, sector, colony

    Iterate through all owned pop groups - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_pop_group = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it once.

  • ordered_owned_pop_jobplanet, country, ship, system, sector, colony

    Iterate through all owned pop jobs - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_pop_job = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_owned_pop_speciescountry

    Iterate through each species of a country's owned pops - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_pop_species = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_owned_sectorcountry

    Iterate through every owned sector - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_sector = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_owned_shipcountry, fleet

    Iterate through each ship in the fleet or controlled by the country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_ship = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it once.

    As the game uses it
    ordered_owned_ship = {
    	save_event_target_as = convoy_ship
    }
  • ordered_owned_starbasecountry

    Iterate through every owned primary starbase (i.e. the starbase that claims ownership of a system). - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_starbase = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_owned_storm_influence_fieldcountry

    Iterate through all influence fields owned by a country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_storm_influence_field = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_planet_armyplanet, ship, colony

    Iterate through each army on the colony (not in ground combat), regardless of owner. - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_planet_army = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_planet_within_bordercountry

    Iterate through each planet within the current empire's borders - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_planet_within_border = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it 2 times.

  • ordered_playable_countryany scope

    Iterate through all playable countries - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_playable_country = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it 2 times.

    As the game uses it
    ordered_playable_country = {
    	order_by = trigger:fleet_power
    	position = 0
    	save_event_target_as = awakening_strongest_empire
    }
  • ordered_pool_leadercountry

    Iterate through each leader that is recruitable for the country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_pool_leader = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_pop_factioncountry, pop, pop group

    Iterate through all the country/pop group/pop's pop factions - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_pop_faction = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it 4 times.

  • ordered_pre_ftl_within_bordercountry, sector

    Iterate through all pre-ftl countries within the country's or sector's borders - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_pre_ftl_within_border = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_relationcountry

    Iterate through all relations - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_relation = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_rim_systemany scope

    Iterate through all rim systems - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_rim_system = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_rival_countrycountry

    Iterate through all countries rivalled by the scoped country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_rival_country = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_ship_in_systemsystem

    Iterate through each ship in the current system - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_ship_in_system = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it 2 times.

  • ordered_situationcountry

    Iterate through each situation a country is experiencing - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_situation = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_species_pop_groupspecies

    Iterate through each pop group that belongs to this species; warning: resource-intensive! - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_species_pop_group = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_spynetworkcountry, no scope

    Iterate through each spynetwork - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_spynetwork = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_starbase_in_networkstarbase

    Iterate through every starbase in the same waystation network as the scoped starbase. - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_starbase_in_network = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_starbase_in_systemsystem

    Iterate through every starbase in the scoped galactic object. - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_starbase_in_system = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_subjectcountry

    Iterate through all subjects of the scoped country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_subject = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_systemany scope

    Iterate through all systems - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_system = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_system_added_to_stormcosmic storm

    Iterate through all systems added to the storm - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_system_added_to_storm = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_system_ambient_objectsystem

    Iterate through every ambient object in the solar system - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_system_ambient_object = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_system_in_cosmic_storm_influence_fieldstorm influence field

    Iterate through all influence fields owned by a country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_system_in_cosmic_storm_influence_field = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_system_megastructureany scope

    Iterate through each megastructure in system - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_system_megastructure = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_system_planetsystem

    Iterate through each planet (colony or not) in the current system - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_system_planet = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it 4 times.

    As the game uses it
    ordered_system_planet = {
    	order_by = value:distance_to_system_star
    	save_event_target_as = furthest_planet_from_system_star
    }
  • ordered_system_planet_colonysystem

    Iterate through each planet colony in the current system - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_system_planet_colony = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it once.

  • ordered_system_removed_from_stormcosmic storm

    Iterate through all systems removed from storm - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_system_removed_from_storm = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_system_ship_colonysystem

    Iterate through each ship colony in the current system - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_system_ship_colony = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_system_with_auracountry

    Iterate through every system with an Aura - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_system_with_aura = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_system_within_bordercountry, sector

    Iterate through all systems within the country's or sector's borders - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_system_within_border = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it once.

  • ordered_system_within_stormcosmic storm

    Iterate through all systems within the storm - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_system_within_storm = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_targeting_situationplanet, ship, colony

    Iterate through each situation that is targeting the current colony carrier - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_targeting_situation = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_trait_available_for_speciespop, pop group, leader, species

    Iterate through all available species traits (minus DLC-locked) and check if scoped species doesn't have this trait

    trait_available_for_species = { trait_has_all_tags = { organic positive } } - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)
    ordered_trait_available_for_species = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_trait_of_speciespop, pop group, leader, species

    Iterate through each trait that the scoped species has

    trait_of_species = { trait_has_all_tags = { positive } } - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)
    ordered_trait_of_species = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_warcountry

    Iterate through all wars the country is engaged in - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_war = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_war_participantwar

    Iterate through all war participants - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_war_participant = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • random_active_first_contactcountry

    Iterate through each active (non-completed) first contact that this country is engaging in - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_active_first_contact = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 3 times.

  • random_agreementcountry, no scope

    Iterate through each agreement - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_agreement = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 28 times.

  • random_ambient_objectany scope

    Iterate through every ambient object in the game - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_ambient_object = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 6 times.

    As the game uses it
    random_ambient_object = {
    	limit = {
    		has_ambient_object_flag = horror_energy
    	}
    	destroy_ambient_object = this
    }
  • random_archaeological_siteany scope

    Iterate through every archaeological sites - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_archaeological_site = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_associatefederation

    Iterate through each associate member of the federation - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_associate = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_astral_riftany scope

    Iterate through every astral rift - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_astral_rift = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it once.

  • random_attackerwar

    Iterate through all attackers in the current war - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_attacker = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 2 times.

    As the game uses it
    random_attacker = {
    	limit = {
    		is_war_leader = yes
    	}
    	save_event_target_as = attacking_country
    }
  • random_available_debriscountry

    Iterate through all debris belong to available special projects of the scoped country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_available_debris = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 4 times.

    As the game uses it
    random_available_debris = {
    	solar_system = {
    		set_star_flag = debris_contract_system@root
    		save_event_target_as = debris_contract_system
    	}
    }
  • random_bypassany scope

    Iterate through every bypass - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_bypass = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_bypass_in_systemsystem

    Iterate through every bypass in the scoped galactic object. - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_bypass_in_system = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_combatant_fleetfleet

    Iterate through each fleet this fleet is in combat with - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_combatant_fleet = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 6 times.

  • random_controlled_colonycountry

    Iterate through each colony controlled by the current empire - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_controlled_colony = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_controlled_fleetcountry

    Iterate through each fleet controlled by the country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_controlled_fleet = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 38 times.

    As the game uses it
    random_controlled_fleet = {
    	limit = {
    		has_fleet_flag = raiding_fleet
    	}
    	delete_fleet = this
    }
  • random_controlled_planetcountry

    Iterate through each planet controlled by the current empire - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_controlled_planet = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_controlled_shipcountry, fleet

    Iterate through each ship in the fleet or controlled by the country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_controlled_ship = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 73 times.

    As the game uses it
    random_controlled_ship = {
    	limit = {
    		is_ship_size = cruiser
    	}
    	delete_ship = this
    }
  • random_cosmic_stormany scope

    Iterate through all cosmic storms in the galaxy - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_cosmic_storm = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_cosmic_storm_end_positionany scope

    Iterate through all systems valid to be a storms end position - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_cosmic_storm_end_position = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_cosmic_storm_start_positionany scope

    Iterate through all systems valid to be a storms start position - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_cosmic_storm_start_position = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_council_memberany scope

    Iterate through each member of the galactic council - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_council_member = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_countryany scope

    Iterate through all countries - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_country = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 340 times.

    As the game uses it
    random_country = {
    	limit = {
    		is_country_type = ai_empire
    	}
    	save_event_target_as = AI_crisis
    }
  • random_country_neighbor_to_systemsystem

    Iterate through all countries that own system 1 jump away from current system (bypasses included) - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_country_neighbor_to_system = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it once.

  • random_defenderwar

    Iterate through all defenders in the current war - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_defender = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 4 times.

    As the game uses it
    random_defender = {
    	limit = {
    		is_war_leader = yes
    	}
    	save_event_target_as = defending_country
    }
  • random_depositplanet, ship, colony

    Iterate through each deposit on the colony carrier - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_deposit = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 17 times.

    As the game uses it
    random_deposit = {
    	limit = {
    		is_deposit_type = d_segment_rubble_4
    	}
    	clear_blocker = yes
    }
  • random_envoycountry

    Iterate through each envoy available to the country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_envoy = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 9 times.

    As the game uses it
    random_envoy = {
    	limit = {
    		is_undermining_imperial_authority = yes
    	}
    	save_event_target_as = envoy_to_kill
    }
  • random_espionage_assetno scope, spy network, espionage operation

    Iterate through each espionage asset - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_espionage_asset = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_espionage_operationcountry, no scope, spy network

    Iterate through each espionage operation - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_espionage_operation = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it once.

  • random_exhibitcountry

    Iterate through every exhibit - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_exhibit = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it once.

  • random_existing_species_traitsno scope

    Iterate through all existing species traits in the game - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_existing_species_traits = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_federationany scope

    Iterate through each federation - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_federation = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 2 times.

  • random_federation_allycountry

    Iterate through all countries in a federation with the scoped country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_federation_ally = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 2 times.

  • random_first_contactcountry

    Iterate through each first contact (both active and complete) that this country is engaging in - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_first_contact = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_fleet_in_orbitmegastructure, planet, ship, starbase

    Iterate through each fleet orbiting the current planet/starbase/megastructure - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_fleet_in_orbit = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 6 times.

  • random_fleet_in_systemsystem

    Iterate through each fleet in the current system - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_fleet_in_system = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 51 times.

    As the game uses it
    random_fleet_in_system = {
    	LIMIT = {
    		has_fleet_flag = repaired_warform
    	}
    	destroy_fleet = this
    }
  • random_galaxy_fleetany scope

    Iterate through each fleet in the entire game - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_galaxy_fleet = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_galaxy_planetany scope

    Iterate through each planet ANYWHERE in the game; warning: resource intensive! - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_galaxy_planet = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 90 times.

    As the game uses it
    random_galaxy_planet = {
    	limit = {
    		has_planet_flag = baldarak
    	}
    	set_name = NAME_Baldarak
    }
  • random_galaxy_sectorany scope

    Iterate through all sectors in the game - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_galaxy_sector = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_galcom_memberany scope

    Iterate through each member of the galactic community - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_galcom_member = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 2 times.

  • random_ground_combat_attackerplanet, ship, colony

    Iterate through each army currently attacking the colony in ground combat - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_ground_combat_attacker = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 2 times.

    As the game uses it
    random_ground_combat_attacker = {
    	damage_army = 250
    }
  • random_ground_combat_defenderplanet, ship, colony

    Iterate through each army currently defending the colony in ground combat - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_ground_combat_defender = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it once.

    As the game uses it
    random_ground_combat_defender = {
    	damage_army = 250
    }
  • random_issued_missioncountry

    Iterate through each mission that the current country has issued - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_issued_mission = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_job_pop_grouppop, job

    Iterate through each pop group that contains this job - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_job_pop_group = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_megastructureany scope

    Iterate through each megastructure - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_megastructure = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 12 times.

    As the game uses it
    random_megastructure = {
    	limit = {
    		is_megastructure_type = shroud_seal
    	}
    	remove_megastructure = this
    }
  • random_memberfederation

    Iterate through each member of the federation - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_member = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 22 times.

    As the game uses it
    random_member = {
    	limit = {
    		is_federation_leader = yes
    	}
    	set_country_flag = last_best_hope
    }
  • random_moonplanet, ship, colony

    Iterate through each moon of the planet - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_moon = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 9 times.

    As the game uses it
    random_moon = {
    	limit = {
    		habitable_planet = no
    	}
    	save_event_target_as = roguemoon
    }
  • random_neighbor_countrycountry

    Iterate through all neighbor countries - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_neighbor_country = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 24 times.

  • random_neighbor_systemsystem

    Iterate through all a system's neighboring systems by hyperlane - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_neighbor_system = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 34 times.

    As the game uses it
    random_neighbor_system = {
    	limit = {
    		has_owner = no
    	}
    	save_event_target_as = expulsion_system
    }
  • random_neighbor_system_euclideansystem

    Iterate through all a system's neighboring systems (by closeness, not by hyperlanes) - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_neighbor_system_euclidean = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 2 times.

  • random_observed_pre_ftl_within_bordercountry, sector

    Iterate through all pre-ftl countries with an observation post around their capital within the country's or sector's borders - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_observed_pre_ftl_within_border = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 33 times.

  • random_orbital_stationcountry, system

    Iterate through each orbital station owned by the current country or in the current system - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_orbital_station = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_owned_armycountry

    Iterate through each army that is owned by the country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_army = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 4 times.

  • random_owned_colonycountry, sector

    Iterate through each colony owned by the current empire - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_colony = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 35 times.

    As the game uses it
    random_owned_colony = {
    	limit = {
    		is_capital = yes
    	}
    	add_deposit = d_trophy_hall
    }
  • random_owned_contractcountry

    Iterate through each contract a country has - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_contract = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 4 times.

  • random_owned_designcountry

    Iterate through all designs owned by the current country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_design = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 13 times.

    As the game uses it
    random_owned_design = {
    	limit = {
    		is_ship_size = mauler_stage_1
    	}
    	save_event_target_as = fast_egg_mauler
    }
  • random_owned_fleetcountry

    Iterate through each fleet owned by the country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_fleet = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 79 times.

    As the game uses it
    random_owned_fleet = {
    	limit = {
    		is_ship_size = behemoth_04
    	}
    	save_global_event_target_as = winning_behemoth
    }
  • random_owned_leadercountry

    Iterate through each leader that is owned by the country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_leader = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 230 times.

    As the game uses it
    random_owned_leader = {
    	limit = {
    		has_leader_flag = thesis_team
    	}
    	remove_leader_flag = thesis_team
    }
  • random_owned_megastructurecountry

    Iterate through each owned megastructure - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_megastructure = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 8 times.

    As the game uses it
    random_owned_megastructure = {
    	limit = {
    		is_megastructure_type = lgate_base
    	}
    	save_event_target_as = candidate_gateway
    }
  • random_owned_missioncountry

    Iterate through each mission a country has - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_mission = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it once.

  • random_owned_nonprimary_starbasecountry

    Iterate through every owned non-primary starbase (e.g. orbital rings, deep space citadels, or waystations). This does not return mobile starbases (e.g. juggernauts or arkships). - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_nonprimary_starbase = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 45 times.

    As the game uses it
    random_owned_nonprimary_starbase = {
    	limit = {
    		is_waystation_starbase = yes
    	}
    	save_event_target_as = nomad_outpost_placeholder
    }
  • random_owned_planetcountry, sector

    Iterate through each colony owned by the current empire (Deprecated; use owned_colony instead) - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_planet = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 242 times.

    As the game uses it
    random_owned_planet = {
    	limit = {
    		is_capital = yes
    	}
    	save_event_target_as = HomePlanet
    }
  • random_owned_pop_groupplanet, country, ship, system, faction, sector, colony

    Iterate through all owned pop groups - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_pop_group = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 294 times.

  • random_owned_pop_jobplanet, country, ship, system, sector, colony

    Iterate through all owned pop jobs - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_pop_job = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 10 times.

  • random_owned_pop_speciescountry

    Iterate through each species of a country's owned pops - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_pop_species = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_owned_sectorcountry

    Iterate through every owned sector - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_sector = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_owned_shipcountry, fleet

    Iterate through each ship in the fleet or controlled by the country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_ship = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 60 times.

    As the game uses it
    random_owned_ship = {
    	set_timed_ship_flag = {
    		flag = rage_checked
    		days = 540
    	}
    }
  • random_owned_starbasecountry

    Iterate through every owned primary starbase (i.e. the starbase that claims ownership of a system). - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_starbase = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 26 times.

    As the game uses it
    random_owned_starbase = {
    	set_starbase_building = {
    		slot = 1
    		building = feeder
    	}
    }
  • random_owned_storm_influence_fieldcountry

    Iterate through all influence fields owned by a country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_storm_influence_field = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_planet_armyplanet, ship, colony

    Iterate through each army on the colony (not in ground combat), regardless of owner. - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_planet_army = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it once.

    As the game uses it
    random_planet_army = {
    	limit = {
    		is_owned_by = planet.owner
    	}
    	remove_army = yes
    }
  • random_planet_within_bordercountry

    Iterate through each planet within the current empire's borders - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_planet_within_border = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 64 times.

    As the game uses it
    random_planet_within_border = {
    	limit = {
    		has_planet_flag = delete_me_planet
    	}
    	remove_planet = yes
    }
  • random_playable_countryany scope

    Iterate through all playable countries - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_playable_country = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 159 times.

    As the game uses it
    random_playable_country = {
    	limit = {
    		is_rival = root
    	}
    	save_event_target_as = targetrivalname
    }
  • random_pool_leadercountry

    Iterate through each leader that is recruitable for the country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_pool_leader = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it once.

  • random_pop_factioncountry, pop, pop group

    Iterate through all the country/pop group/pop's pop factions - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_pop_faction = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 2 times.

  • random_pre_ftl_within_bordercountry, sector

    Iterate through all pre-ftl countries within the country's or sector's borders - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_pre_ftl_within_border = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 4 times.

  • random_relationcountry

    Iterate through all relations - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_relation = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 32 times.

  • random_rim_systemany scope

    Iterate through all rim systems - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_rim_system = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 17 times.

    As the game uses it
    random_rim_system = {
    	limit = {
    		has_star_flag = swarm_invasion_target_1
    	}
    	save_event_target_as = prethoryn_invasion_system
    }
  • random_rival_countrycountry

    Iterate through all countries rivalled by the scoped country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_rival_country = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 6 times.

    As the game uses it
    random_rival_country = {
    	limit = {
    		is_nomadic = no
    	}
    	save_event_target_as = raid_target_1
    }
  • random_ship_in_systemsystem

    Iterate through each ship in the current system - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_ship_in_system = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 9 times.

    As the game uses it
    random_ship_in_system = {
    	limit = {
    		has_ship_flag = spy_support_target@root
    	}
    	remove_ship_flag = spy_support_target@root
    }
  • random_situationcountry

    Iterate through each situation a country is experiencing - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_situation = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 173 times.

    As the game uses it
    random_situation = {
    	limit = {
    		is_situation_type = situation_the_seal
    	}
    	abort_situation = this
    }
  • random_species_pop_groupspecies

    Iterate through each pop group that belongs to this species; warning: resource-intensive! - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_species_pop_group = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_spynetworkcountry, no scope

    Iterate through each spynetwork - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_spynetwork = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 46 times.

  • random_starbase_in_networkstarbase

    Iterate through every starbase in the same waystation network as the scoped starbase. - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_starbase_in_network = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_starbase_in_systemsystem

    Iterate through every starbase in the scoped galactic object. - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_starbase_in_system = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 9 times.

  • random_subjectcountry

    Iterate through all subjects of the scoped country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_subject = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 16 times.

  • random_systemany scope

    Iterate through all systems - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_system = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 299 times.

    As the game uses it
    random_system = {
    	limit = {
    		has_star_flag = eternal_chorus_system@ROOT
    	}
    	set_star_flag = eternal_chorus_origin@ROOT
    }
  • random_system_added_to_stormcosmic storm

    Iterate through all systems added to the storm - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_system_added_to_storm = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_system_ambient_objectsystem

    Iterate through every ambient object in the solar system - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_system_ambient_object = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 52 times.

    As the game uses it
    random_system_ambient_object = {
    	limit = {
    		has_ambient_object_flag = manufactory
    	}
    	destroy_ambient_object = this
    }
  • random_system_in_cosmic_storm_influence_fieldstorm influence field

    Iterate through all influence fields owned by a country - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_system_in_cosmic_storm_influence_field = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_system_megastructureany scope

    Iterate through each megastructure in system - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_system_megastructure = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 23 times.

    As the game uses it
    random_system_megastructure = {
    	limit = {
    		has_megastructure_flag = galactic_crucible
    	}
    	remove_megastructure = this
    }
  • random_system_planetsystem

    Iterate through each planet (colony or not) in the current system - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_system_planet = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 652 times.

    As the game uses it
    random_system_planet = {
    	limit = {
    		is_colony = yes
    	}
    	set_carrier_flag = spy_support_target@root
    }
  • random_system_planet_colonysystem

    Iterate through each planet colony in the current system - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_system_planet_colony = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it once.

    As the game uses it
    random_system_planet_colony = {
    	carrier_event = {
    		id = shroud.763
    	}
    }
  • random_system_removed_from_stormcosmic storm

    Iterate through all systems removed from storm - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_system_removed_from_storm = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_system_ship_colonysystem

    Iterate through each ship colony in the current system - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_system_ship_colony = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it once.

    As the game uses it
    random_system_ship_colony = {
    	carrier_event = {
    		id = shroud.763
    	}
    }
  • random_system_with_auracountry

    Iterate through every system with an Aura - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_system_with_aura = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_system_within_bordercountry, sector

    Iterate through all systems within the country's or sector's borders - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_system_within_border = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 142 times.

    As the game uses it
    random_system_within_border = {
    	limit = {
    		is_conduit_target = yes
    	}
    	save_event_target_as = friendly_target
    }
  • random_system_within_stormcosmic storm

    Iterate through all systems within the storm - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_system_within_storm = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_targeting_situationplanet, ship, colony

    Iterate through each situation that is targeting the current colony carrier - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_targeting_situation = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it once.

    As the game uses it
    random_targeting_situation = {
    	limit = {
    		is_situation_type = situation_planetary_revolt
    	}
    	add_situation_progress = 5
    }
  • random_trait_available_for_speciespop, pop group, leader, species

    Iterate through all available species traits (minus DLC-locked) and check if scoped species doesn't have this trait

    trait_available_for_species = { trait_has_all_tags = { organic positive } } - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.
    random_trait_available_for_species = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_trait_of_speciespop, pop group, leader, species

    Iterate through each trait that the scoped species has

    trait_of_species = { trait_has_all_tags = { positive } } - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.
    random_trait_of_species = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_warcountry

    Iterate through all wars the country is engaged in - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_war = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 7 times.

  • random_war_participantwar

    Iterate through all war participants - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_war_participant = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

Country

  • abort_special_projectcountry

    Aborts a specific special project for the country, removing it from the situation log

    abort_special_project = { type = <project key> location = <target> }

    The game's own scripts use it 106 times.

    As the game uses it
    abort_special_project = {
    	type = CONTRACT_MEGASTRUCTURE_SUPPORT_PROJECT
    	location = fromfrom
    }
  • accept_covenantcountry

    Accepts covenant proposition with Shroud Patron.

    accept_covenant = <patron_name>

    The game's own scripts use it 5 times.

    As the game uses it
    accept_covenant = end_of_the_cycle
  • activate_crisis_progressioncountry

    Activates crisis progression for the country

    activate_crisis_progression = <path_name>.

    The game's own scripts use it 5 times.

    As the game uses it
    activate_crisis_progression = nemesis_path
  • activate_fog_machinecountry

    Creates cloud effect at every star system controlled by the country

    activate_fog_machine = <cloud_type>

    The game's own scripts use it 6 times.

    As the game uses it
    activate_fog_machine = crisis_firestorm_L
  • activate_saved_leadercountry

    Moves a saved leader to the active for the scoped country with a lookup key

    activate_saved_leader = {
    	key = <string>
    	add_to_owned=<yes/no> #default yes
    	effect = {...}
    }

    The game's own scripts use it once.

    As the game uses it
    activate_saved_leader = {
    	add_to_owned = no
    	key = new_commander
    }
  • add_ascension_perkcountry

    Adds the specified ascension perk to the scoped country.

    add_ascension_perk = ascension_perk_key

    The game's own scripts use it 2 times. Ascension perk IDs →

    As the game uses it
    add_ascension_perk = ap_eternal_vigilance
  • add_attunementcountry

    Adds attunement towards specified patron(s).

    This effect can be displayed if necessary, but you'll need to place it at the end of all displayed effects.
    The displayed text will depend on the contactstate with the patron(s).
    add_attunement = {
    	<patron 1> = <value 1>
    	<patron 2> = <value 2>
    	<...>
    	}
    }

    The game's own scripts use it 125 times.

    As the game uses it
    add_attunement = {
    	the_cradle_of_souls = @ai_bonus_attunement
    }
  • add_awarenesscountry

    Adds awareness to the scoped (pre-FTL) country

    add_awareness = 12.3

    The game's own scripts use it 79 times.

    As the game uses it
    add_awareness = 5
  • add_casus_bellicountry

    Adds a Casus Belli to the scoped country against the target country.

    add_casus_belli = { type = cb_subjugation who = <country> days = 10/variable }

    The game's own scripts use it 2 times.

    As the game uses it
    add_casus_belli = {
    	type = cb_subjugation
    	who = prev
    	days = 10800
    }
  • add_council_agenda_progresscountry

    Instantly adds council agenda progress

    add_council_agenda_progress = 5

    The game's own scripts use it 6 times.

    As the game uses it
    add_council_agenda_progress = 3500
  • add_council_agenda_progress_percentcountry

    Gives percentage progress (-1.0-1.0) in the current agenda to the scoped country

    add_council_agenda_progress_percent = <float>/<variable>

    The game's own scripts use it 2 times.

    As the game uses it
    add_council_agenda_progress_percent = 0.5
  • add_edictcountry

    Adds given edict to scoped country's government

    add_edict = <key>

    The game's own scripts use it 2 times.

    As the game uses it
    add_edict = galactic_dowsing
  • add_event_chain_countercountry

    Increments (or decrements with negative values) an event chain counter for the scoped country by a specific amount

    add_event_chain_counter = { event_chain = <key> counter = <key> amount = <int>/<variable> }

    The game's own scripts use it 296 times.

    As the game uses it
    add_event_chain_counter = {
    	event_chain = l_cluster_chain
    	counter = clues
    	amount = 1
    }
  • add_favorscountry

    Add <value> favors for scoped country to use on target country.

    add_favors = {
    	target = <target>
    	value = 2/variable
    }

    The game's own scripts use it 22 times.

    As the game uses it
    add_favors = {
    	target = from
    	value = 2
    }
  • add_focus_progresscountry

    Adds the defined amount of focus progress in the defined focus category

    add_focus_progress = { category = <focus_category_key> amount = <float>/<variable> }

    The game's own scripts use it 47 times.

    As the game uses it
    add_focus_progress = {
    	category = conquest
    	amount = 10
    }
  • add_intelcountry

    Adds the defined amount of intel toward the target empire

    add_intel = { amount = <float>/<variable> who = <target> }

    The game's own scripts use it 74 times.

    As the game uses it
    add_intel = {
    	amount = 5
    	who = from
    }
  • add_intel_reportcountry

    Adds the intel level for the category selected. Default duration (0) is forever.

    add_intel_report = { category = <string> level = <int> days = <int> who = <target> }

    The game's own scripts use it 23 times.

    As the game uses it
    add_intel_report = {
    	category = economy
    	level = 1
    	days = 360
    	who = from
    }
  • add_mission_countercountry, mission

    Increments (or decrements with negative values) a mission counter for the scoped country or scoped mission by a specific amount

    add_mission_counter = {
    	mission = <key> # not needed if in a mission scope
    	counter = <key>
    	amount = <int>/<variable>
    }

    The game's own scripts use it 75 times.

    As the game uses it
    add_mission_counter = {
    	mission = MISSION_BE_CUSTODIAN
    	counter = BE_CUSTODIAN
    	amount = 1
    }
  • add_modifiermegastructure, planet, country, ship, pop, pop group, fleet, system, faction, federation, starbase, spy network, espionage operation, astral rift, storm influence field, colony

    Adds a specific modifier to the scoped object for a set duration

    add_modifier = {
    	modifier = <key>
    	days/months/years = <int, -1 (default) means it never expires>
    	multiplier = <float>/<variable> (optional)
    	time_multiplier = <variable> (optional: days/months/years value is multiplied by the value of this variable)
    	clear_on_owner_change = yes (optional: default no; clears modifier if planet/system/megastructure's owner changes)
    }

    The game's own scripts use it 3,582 times. Modifier IDs →

    As the game uses it
    add_modifier = {
    	modifier = exofungus
    	days = -1
    }
  • add_monthly_resource_multcountry

    Adds a lump sum of a resource to the scoped country, defined as a multiple of the country's monthly income of that resource (clamped to max and min allowed values)

    add_monthly_resource_mult = { resource = <key> value = <float> max = <max cap, int> min = <min cap, int> mult = <variable> }

    The game's own scripts use it 2,517 times.

    As the game uses it
    add_monthly_resource_mult = {
    	resource = unity
    	value = 1
    	min = 0.25
    	max = 5
    }
  • add_notification_modifiercountry

    Add a notification modifier to the country

    add_notification_modifier = <key>

    The game's own scripts use it 7 times.

    As the game uses it
    add_notification_modifier = ghost_signal_1
  • add_opinion_modifiercountry

    Adds a specific opinion modifier for the scoped country towards target country

    add_opinion_modifier = { modifier = <key> who = <target> }

    The game's own scripts use it 548 times.

    As the game uses it
    add_opinion_modifier = {
    	modifier = opinion_cut_our_forests
    	who = root.owner
    }
  • add_patron_objective_countercountry

    Increments (or decrements with negative values) a patron objective counter for the scoped country by a specific amount. Can multiply the attunement given by the patron objective (if it's a deed).

    add_patron_objective_counter = {
    	counter = <key>
    	amount = <int>/<variable>
    	multiplier = <float>/<variable> (optional) (cannot be negative)
    }

    The game's own scripts use it 91 times.

    As the game uses it
    add_patron_objective_counter = {
    	counter = po_build_army
    	amount = 1
    }
  • add_permanent_councillorcountry

    Gives provided country a permanent position on the Galactic Council

    add_permanent_councillor = yes/no

    The game's own scripts use it 7 times.

    As the game uses it
    add_permanent_councillor = yes
  • add_random_research_optioncountry

    Adds a random tech research option to the scoped country's tech view list, permanent until researched. if none applicable it runs fail_effects

    add_random_research_option = {
    	category = <string>
    	area = <key>
    	tier = <int>
    	add_progress = <num>/<variable>
    	ignore_prereqs = <yes/no> #default no
    	ignore_rare = <yes/no> #default yes
    	only_rare = <yes/no> #default no
    	ignore_insight = <yes/no> #default yesyes
    	fail_effects = {}
    }

    The game's own scripts use it 74 times.

    As the game uses it
    add_random_research_option = {
    	add_progress = 1
    	area = society
    }
  • add_reliccountry

    Adds the specified relic to the scoped country.

    add_relic = <relic_key>

    The game's own scripts use it 88 times. Relic IDs →

    As the game uses it
    add_relic = r_galaxy
  • add_research_optioncountry

    Adds a tech research option to the scoped country's tech view list, permanent until researched

    add_research_option = <key>

    The game's own scripts use it 474 times.

    As the game uses it
    add_research_option = tech_cruisers
  • add_resourcecountry

    Adds specific resource to the stockpile for the country scope:

    add_resource = {
    	<resource_name_1> = <value_1>
    	<resource_name_2> = <value_2>
    	...
    	mult = <variable> (optional: multiplies all gained resources by a variable)
    }

    The game's own scripts use it 1,716 times.

    As the game uses it
    add_resource = {
    	minerals = 200
    	alloys = 100
    }
  • add_resource_from_debriscountry

    Adds specific resource to the stockpile for the country scope and creates a debris notification:

    add_resource = {
    	<resource_name_1> = <value_1>
    	<resource_name_2> = <value_2>
    	...
    	system = <system>
    	mult = <variable> (optional: multiplies all gained resources by a variable)
    }

    The game's own scripts use it 5 times.

    As the game uses it
    add_resource_from_debris = {
    	alloys = 1000
    	system = fromfrom
    }
  • add_seen_bypasscountry

    Makes the scoped country remember that it has encountered the bypass

    add_seen_bypass = FROM
  • add_seen_bypass_typecountry

    Makes the scoped country remember that it has encountered the bypass type

    add_seen_bypass_type = bypass_type

    The game's own scripts use it 16 times.

    As the game uses it
    add_seen_bypass_type = gateway
  • add_ship_designcountry

    Adds a specific ship design to the scoped country

    add_ship_design = <target/last_created_design>

    The game's own scripts use it 29 times.

    As the game uses it
    add_ship_design = last_created_design
  • add_static_war_exhaustioncountry

    Adds static war exhaustion, scaled with value_for_planet_destruction, to owner of the battle location

    add_static_war_exhaustion = {
    	attacker = <country>
    	location = <carrier/colony> 
    	value_for_planet_destruction = <0.0-1.0>/<variable> #scales the amount of war exhaustion that is added
    }

    The game's own scripts use it 14 times.

    As the game uses it
    add_static_war_exhaustion = {
    	attacker = from
    	location = root
    	value_for_planet_destruction = 0.5
    }
  • add_tech_progresscountry

    Gives percentage progress (0.0-1.0) in a specific tech to the scoped country

    add_tech_progress = { tech = <key> progress = <float>/<variable> }

    The game's own scripts use it 401 times. Technology IDs →

    As the game uses it
    add_tech_progress = {
    	tech = tech_sapient_ai
    	progress = 0.25
    }
  • add_threatplanet, country, ship, system, colony

    Adds diplomatic threat from target country

    add_threat = { who = <country> amount = 4/variable }

    The game's own scripts use it 37 times.

    As the game uses it
    add_threat = {
    	who = from
    	amount = 2
    }
  • add_timeline_eventcountry

    Adds a new timeline event for the scope country.

    add_timeline_event = {
      type = timeline_event_planet
      date = 2300.1.1 (optional - if not present, current date is used)
      targets = { ... } (optional - array of event targets. This depends on localization and what event targets the type requires)
    
      (There is also overrides that can be used to override settings on the database entries. The Id is required, and the others are optional)
      override_id = my_defined_unique_id
      override_text = { "button:MY_OTHER_LOC_STRING" "button2:ANOTHER_LOC_OVERRIDE" }  override_texture = { "button:GFX_short_button button2:GFX_otherbutton" }  override_tooltip, "loc_tooltip"  override_tooltip_delayed, "loc_delayed_tooltip"}

    The game's own scripts use it 132 times.

    As the game uses it
    add_timeline_event = {
    	type = timeline_event_year
    }
  • add_to_galactic_communitycountry

    Tries to add the scoped country to the Galactic Community

    add_to_galactic_community = yes/no

    The game's own scripts use it 10 times.

    As the game uses it
    add_to_galactic_community = yes
  • add_to_galactic_community_no_messagecountry

    Tries to add the scoped country to the Galactic Community without producing member joining notifications.

    add_to_galactic_community_no_message = yes/no

    The game's own scripts use it 2 times.

    As the game uses it
    add_to_galactic_community_no_message = yes
  • add_to_galactic_councilcountry

    Tries to add the scoped country to the Galactic Council

    add_to_galactic_council = yes/no

    The game's own scripts use it 7 times.

    As the game uses it
    add_to_galactic_council = yes
  • add_to_vivariumcountry

    Gives Space Fauna in the Vivarium using given ship design with given rarity to the target country.

    add_to_vivarium = { design = <key> rarity = <key>/highest (optional) amount = <int> (optional) }

    The game's own scripts use it 12 times.

    As the game uses it
    add_to_vivarium = {
    	design = NAME_Cutholoids
    	rarity = exceptional
    	amount = 2
    }
  • add_traditioncountry

    Adds the specified tradition to the scoped country.

    add_tradition = <tradition_key>

    The game's own scripts use it 10 times. Tradition IDs →

    As the game uses it
    add_tradition = tr_purity_adopt
  • add_trustcountry

    Adds trust on scope country towards target country

    add_trust = { amount = <amount>/<variable> who = <target> }

    The game's own scripts use it 260 times.

    As the game uses it
    add_trust = {
    	amount = 5
    	who = prev
    }
  • add_variablemegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, ambient object, species, bypass, faction, war, federation, starbase, deposit, sector, dig site, first contact, spy network, espionage operation, espionage asset, agreement, situation, astral rift, ship growth stage, colony

    Increments a previously-set variable by a specific amount

    add_variable = { which = <string> value = <float>/<variable>/<scope.variable>/trigger:<trigger> }

    The game's own scripts use it 2 times.

    As the game uses it
    add_variable = {
    	which = num_dead_identities
    	value = value:num_synth_fert_upload_final
    }
  • add_victory_scorecountry

    Adds victory score to a country

    add_victory_score = { source=<loc_key> score=<value>/<variable> }

    The game's own scripts use it 5 times.

    As the game uses it
    add_victory_score = {
    	source = destroyed_stars_score
    	score = 10
    }
  • advanced_authority_refreshcountry

    Used after an advanced authority swap to make sure things are changed properly

    advanced_authority_refresh = yes

    The game's own scripts use it 37 times.

    As the game uses it
    advanced_authority_refresh = yes
  • assign_leaderplanet, country, ship, fleet, army, colony

    Assigns target leader to the scoped object

    assign_leader = <target>

    The game's own scripts use it 31 times.

    As the game uses it
    assign_leader = prev
  • calculate_modifierplanet, country

    Forces target planet or country to calculate its internal modifier

    calculate_modifier = yes
  • cancel_resolutioncountry

    Immediately cancels/removes the latest active/passed/proposed/voting for/failed resolution of this type

    cancel_resolution = <resolution type>

    The game's own scripts use it 125 times.

    As the game uses it
    cancel_resolution = resolution_divinity_right_to_work
  • ceiling_variablemegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, ambient object, species, bypass, faction, war, federation, starbase, deposit, sector, dig site, first contact, spy network, espionage operation, espionage asset, agreement, situation, astral rift, ship growth stage, colony

    Rounds a previously-set variable up to the next integer.

    ceiling_variable = <string>

    The game's own scripts use it 3 times.

    As the game uses it
    ceiling_variable = max_reformists_planets
  • change_country_flagcountry

    Changes the scoped country's flag

    change_country_flag = random
    change_country_flag = { icon = { category = <key> file = <filename> } background = { category = <key> file = <filename> } colors = { <key> <key> } }

    The game's own scripts use it 42 times.

    As the game uses it
    change_country_flag = random
  • change_dominant_speciescountry

    Changes the dominant species of the current Country, change_all also changes all usage of that species (Pops etc) in the empire

    change_dominant_species = { species = target change_all = yes }

    The game's own scripts use it 33 times.

    As the game uses it
    change_dominant_species = {
    	species = last_created_species
    	change_all = yes
    }
  • change_governmentcountry

    Change the scoped country's government authority and/or civics

    change_government = random
    or
    change_government = {
    	authority = random / <key>
    	civics = random / { civic = <key> civic = random }
    cooldown = no (default: yes)
    remove_invalid_civics = yes (default: no)
    }

    The game's own scripts use it 55 times.

    As the game uses it
    change_government = {
    	authority = auth_imperial
    	cooldown = no
    	remove_invalid_civics = yes
    }
  • change_speciescountry, ship, pop, pop group, leader, army

    Changes the species of the scoped object

    change_species = <target>

    The game's own scripts use it 68 times.

    As the game uses it
    change_species = prev.species
  • change_variablemegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, ambient object, species, bypass, faction, war, federation, starbase, deposit, sector, dig site, first contact, spy network, espionage operation, espionage asset, agreement, situation, astral rift, ship growth stage, colony

    Increments a previously-set variable by a specific amount

    change_variable = { which = <string> value = <float>/<variable>/<scope.variable>/trigger:<trigger> }

    The game's own scripts use it 855 times.

    As the game uses it
    change_variable = {
    	which = num_rifts_splitted
    	value = 1
    }
  • check_casus_belli_validcountry

    Re-evaluate the specified casus belli type with given target country

    check_casus_belli_valid = {
    	target = none/<optional country target>
    	type = <optional casus belli type>
    }

    The game's own scripts use it 4 times.

    As the game uses it
    check_casus_belli_valid = {
    	target = from
    	type = cb_humiliation
    }
  • clear_ai_armor_ratiocountry

    Clears the AI armor ratio override, reverting to personality.

    clear_ai_armor_ratio = yes

    The game's own scripts use it 4 times.

    As the game uses it
    clear_ai_armor_ratio = yes
  • clear_ai_shields_ratiocountry

    Clears the AI shields ratio override, reverting to personality.

    clear_ai_shields_ratio = yes

    The game's own scripts use it 4 times.

    As the game uses it
    clear_ai_shields_ratio = yes
  • clear_ai_ship_rolescountry

    Clears all AI ship role overrides for the scoped country, reverting to personality roles.

    clear_ai_ship_roles = yes

    The game's own scripts use it 6 times.

    As the game uses it
    clear_ai_ship_roles = yes
  • clear_ai_starbase_armor_ratiocountry

    Clears the AI starbase armor ratio override, reverting to the empire-wide ratio.

    clear_ai_starbase_armor_ratio = yes

    The game's own scripts use it 7 times.

    As the game uses it
    clear_ai_starbase_armor_ratio = yes
  • clear_ai_starbase_shields_ratiocountry

    Clears the AI starbase shields ratio override, reverting to the empire-wide ratio.

    clear_ai_starbase_shields_ratio = yes

    The game's own scripts use it 7 times.

    As the game uses it
    clear_ai_starbase_shields_ratio = yes
  • clear_ai_starbase_weapon_preferencecountry

    Clears the AI starbase weapon preference override, reverting to the empire-wide preference.

    clear_ai_starbase_weapon_preference = yes

    The game's own scripts use it 8 times.

    As the game uses it
    clear_ai_starbase_weapon_preference = yes
  • clear_ai_weapon_preferencecountry

    Clears the AI weapon preference override, reverting to personality.

    clear_ai_weapon_preference = yes

    The game's own scripts use it 5 times.

    As the game uses it
    clear_ai_weapon_preference = yes
  • clear_custom_ruler_and_heir_titlescountry

    Clears all custom ruler and heir titles from the country, resetting them to default values

    clear_custom_ruler_and_heir_titles = yes
  • clear_ethoscountry, pop, pop group

    Clears all ethics of specified pop group or country

    clear_ethos = yes

    The game's own scripts use it 5 times.

    As the game uses it
    clear_ethos = yes
  • clear_intel_reportcountry

    Removes all the intel reports related to the provided category.

    clear_intel_report = { category = <string> who = <target> }
  • clear_relationscountry

    Clears relations between scoped and target countries

    clear_relations = {
    	 target = <target country>
    	 relations = { <> }
     }

    The game's own scripts use it 6 times.

    As the game uses it
    clear_relations = {
    	target = root
    	relations = {
    		is_under_open_technological_enlightenment
    	}
    }
  • clear_resourcescountry

    Clears resources of a country

    clear_resources = yes

    The game's own scripts use it once.

    As the game uses it
    clear_resources = yes
  • clear_uncharted_spacecountry

    Clears uncharted space from the galaxy map for the scoped country, in a radius around target system

    clear_uncharted_space = <target>
  • clear_variablemegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, ambient object, species, bypass, faction, war, federation, starbase, deposit, sector, dig site, first contact, spy network, espionage operation, espionage asset, agreement, situation, astral rift, ship growth stage, colony

    Clears a previously-set variable from the game.

    clear_variable = <string>

    The game's own scripts use it 227 times.

    As the game uses it
    clear_variable = bomba
  • clone_leadercountry

    Clones the last created leader for the scoped country

    clone_leader = {
    	target = <event target>
    	#Properties to override, see create_leader
    	#traits is only overridden if the override is not empty
    	#randomize_traits is only used if traits is overridden
    	#If traits is not overridden, trait picks are also copied
    	effect = { ... }
    }

    The game's own scripts use it 34 times.

    As the game uses it
    clone_leader = {
    	target = fromfrom
    	effect = {
    		save_event_target_as = executed_commander_by@root
    	}
    }
  • complete_crisis_objectivecountry

    Gives the player the reward for the specified crisis objective, if the player's selected crisis path includes it. Gives nothing if the player's crisis path doesn't include it.

    complete_crisis_objective = <objective>

    The game's own scripts use it 94 times.

    As the game uses it
    complete_crisis_objective = crisobj_cap_fauna
  • complete_deedcountry

    Gives the player the reward for the specified deed, if the player has it in its patron deeds selection.

    complete_deed = <deed>
  • complete_special_projectcountry

    Completes a specific special project for the country, firing the on complete effects

    complete_special_project = { type = <project key> location = <target> }

    The game's own scripts use it 10 times.

    As the game uses it
    complete_special_project = {
    	type = ACTIVATE_GATEWAY_PROJECT
    	location = from
    }
  • copy_ascension_perks_fromcountry

    Copies the Ascension Perks of the target country into the scoped country. Perks are added to the existing perks, and the potential/possible triggers are respected.the perkss listed in the exceptions list are not copied.

    copy_ascension_perks_from = {
        target = FROM
        exceptions = { perk1 perk2 }
    }

    The game's own scripts use it once.

  • copy_ethos_and_authoritycountry

    Makes the scoped country copy the ethos and government authority of the target country.

    copy_ethos_and_authority = FROM

    The game's own scripts use it 3 times.

    As the game uses it
    copy_ethos_and_authority = from
  • copy_random_tech_fromcountry

    Adds a random tech from the target country within the given category and tech area constraints. The country must be able to research said tech (weight > 0, fulfils potential trigger)

    copy_random_tech_from = {
    	who = <country>
    	category = computing (optional)
    	area = physics (optional)
    	progress = 0.5/variable (optional: this makes it grant the tech option rather than the whole tech)
    }

    The game's own scripts use it 11 times.

    As the game uses it
    copy_random_tech_from = {
    	who = fromfrom.target
    	area = physics
    	progress = 0.30
    }
  • copy_techs_fromcountry

    Copies all techs from the target country to the scoped country, except for some exceptions listed. Tech weights (and weight modifiers) are honoured, meaning that techs a country should not have will not be copied.

    copy_techs_from = { 
    	target = country
    	except = { tech_1 tech_2 }
    }

    The game's own scripts use it 14 times.

    As the game uses it
    copy_techs_from = {
    	target = root
    }
  • copy_traditions_fromcountry

    Copies the traditions of the target country into the scoped country. Traditions are added to the existing traditions, and the potential/possible triggers are respected.the traditions listed in the exceptions list are not copied.

    copy_traditions_from = {
        target = FROM
        exceptions = { tradition1 tradition2 }
    }

    The game's own scripts use it once.

  • country_add_ethiccountry

    Adds a specific ethic to the scoped country

    country_add_ethic = <key>

    The game's own scripts use it 40 times.

    As the game uses it
    country_add_ethic = ethic_pacifist
  • country_eventcountry

    Fires a country event for the scoped country, with optional DAYS and RANDOM delay

    country_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay, capped at value)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }

    The game's own scripts use it 5,953 times. Event IDs →

    As the game uses it
    country_event = {
    	id = story.5
    	days = 30
    }
  • country_remove_ethiccountry

    Removes a specific ethic from the scoped country

    country_remove_ethic = <key>

    The game's own scripts use it 19 times.

    As the game uses it
    country_remove_ethic = ethic_pacifist
  • create_balanced_fleetcountry

    Creates a fleet of the requested size, distributing ships deterministically across the listed designs by each ship_size's ai_ship_data.fraction.

    create_balanced_fleet = {
    	name = <string>
    	size = <int>
    	can_overflow = yes/no # default yes
    	ship_designs = { NAME_a NAME_b } # optional; if omitted, uses the country's own designs
    	effect = { <set_location etc effects go here> }
    }

    The game's own scripts use it 12 times.

  • create_fleet_from_naval_capcountry

    Creates a new fleet from empire designs up to specified fraction of naval cap

    create_fleet_from_naval_cap = 0.5
    create_fleet_from_naval_cap = { fraction = 0.5 can_overflow = yes/no (default yes) ship_owner_type = <country/federation/galactic_community>

    The game's own scripts use it 10 times.

    As the game uses it
    create_fleet_from_naval_cap = {
    	fraction = 0.1
    	ship_owner_type = galactic_community
    }
  • create_leadercountry

    Creates a new leader for the scoped country

    create_leader = {
    	name = random / <string>
    	species = last_created / <target>
    	class = random_ruler / <key>
    	skill = <int> # The leader skill level, minimum LEADER_SKILL_MIN and maximum LEADER_MAX_SKILL_CAP.
    	set_age = <int>
    	traits = { <level> = <key> <level> = <key> } # The traits of the leader, e.g. "1 = leader_trait_bureaucrat".
    		If <level> is a positive int, the trait is added if the leader's level is at least <level>.
    		If the leader would have gained a trait selection on <level>, this trait consumes it (but only once per level).
    		If <level> is 0 or non-int, the trait is added regardless of level and doesn't consume trait selections.
    		Supports the same special keys as add_trait.
    	gender = <gender> # Optional, default = random.
    	event_leader = yes / no # Optional, default = no. Sets if this is a event leader or not. Is checked through is_event_leader.
    	immortal = yes / no # Optional, default = no.
    	hide_age = yes / no # Optional, default = no.
    	sub_type = <key> # Optional. Used for scientist subtypes.
    	can_manually_change_location = yes / no # Optional, default = yes.
    	can_assign_to_council = yes/no # Optional, default = yes.
    	hide_leader = yes / no # Optional, default = no. Hides the leader from the player's list of leaders, and doesn't count them towards the leader cap.
    	randomize_traits = yes / no # Optional, default = yes. Does not randomize for levels that are specified in traits.
    	leader_age_min = <int> # Optional, but requires leader_age_max if used. Used to randomize leader age within the age span between this and leader_age_max.
    	leader_age_max = <int> # Optional, but requires leader_age_min if used. Used to randomize leader age within the age span between this and leader_age_min.
    	use_regnal_name = yes/no # Optional, default = no. If generating a random name, use regnal names if the name list has them.	effect = { <effect> } # Optional. Scripted effect(s) that are run on the leader after it has been created.
    
    	custom_description = <key> # Optional.
    	custom_catch_phrase = <string> # Optional.
    	skip_background_generation = yes / no # Optional, default = no. Disables random generation of a background.
    	background_planet = <target> # Optional. Used as the home planet of the leader.
    	background_job = <key> # Optional.
    	background_ethic = <key> # Optional.
    }

    The game's own scripts use it 334 times.

    As the game uses it
    create_leader = {
    	class = commander
    	species = owner_main_species
    	name = random
    	skill = 1
    }
  • create_patron_relationcountry

    Creates a relation with Shroud patron

    create_patron_relation = <patron_name>
  • create_point_of_interestplanet, country, ship, pop, pop group

    Creates a point of interest for the scoped country at a specific location, associated with an event chain

    create_point_of_interest = { id = <key> name = <string> desc = <string> event_chain = <key> location = <target> }

    The game's own scripts use it 159 times.

  • create_random_fleetcountry

    Creates a fleet of the requested size by repeatedly picking ships from the listed designs at random, weighted by each entry's weight (default 1). Each entry may also specify a guaranteed min count and a max cap. If ship_designs is omitted, falls back to the country's own AI-recruitable designs at uniform weight.

    create_random_fleet = {
    	name = <string>
    	size = <int>
    	can_overflow = yes/no # default yes
    	ship_designs = { # optional; if omitted, uses the country's own designs at uniform weight
    		NAME_a # bare name, weight 1, no min/max
    		{ design = NAME_b weight = 2.4 min = 1 max = 3 }
    	}
    	effect = { <set_location etc effects go here> }
    }

    The game's own scripts use it 9 times.

  • create_saved_leadercountry

    Creates a new saved leader for the scoped country with a lookup key. See create_leader for parameters.

    create_saved_leader = {  }

    The game's own scripts use it 2 times.

    As the game uses it
    create_saved_leader = {
    	creator = this
    	name = "Backup Portrait"
    	key = clone_army_main_species_generic_portrait
    	species = owner_main_species
    }
  • deactivate_fog_machinecountry

    Deactivates country fog machine

    deactivate_fog_machine = yes

    The game's own scripts use it 7 times.

    As the game uses it
    deactivate_fog_machine = yes
  • declare_warcountry

    Declares war between the scoped country and target country

    declare_war = {
    	target = <target country>
    	name = <optional war name>
    	attacker_war_goal = <war goal>
    }

    The game's own scripts use it 28 times.

    As the game uses it
    declare_war = {
    	target = root
    	name = NAME_Psionic_War
    	attacker_war_goal = wg_psionic_war
    }
  • destroy_countrycountry

    Destroys the scoped country

    destroy_country = yes

    The game's own scripts use it 115 times.

    As the game uses it
    destroy_country = yes
  • divide_variablemegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, ambient object, species, bypass, faction, war, federation, starbase, deposit, sector, dig site, first contact, spy network, espionage operation, espionage asset, agreement, situation, astral rift, ship growth stage, colony

    Divides a previously-set variable by a specific amount

    divide_variable = { which = <string> value = <float>/<variable>/<scope.variable>/trigger:<trigger> }

    The game's own scripts use it 40 times.

    As the game uses it
    divide_variable = {
    	which = new_pops
    	value = 100
    }
  • downgrade_all_buildingsplanet, country

    Downgrades all non-capital buildings on the scoped planet/country. Leaves tier 1 buildings untouched.

    downgrade_all_buildings = yes

    The game's own scripts use it once.

    As the game uses it
    downgrade_all_buildings = yes
  • downgrade_buildings_of_typeplanet, country

    Downgrades all buildings of a specified type on the planet/country.

    downgrade_buildings_of_type = yes
  • effect_on_blobcountry

    Executes an effect on systems with colonies owned by the scoped country, starting at an origin, and until a certain percentage of owned colonies matching the planet_limit has been covered.

    effect_on_blob = {
    	center = <system target>
    	owned_planets_percentage = 1.0/variable
    	planet_limit = { <colony triggers> }
    	effect = { <system effects> }
    }

    The game's own scripts use it 5 times.

  • enable_faction_of_typecountry

    Forces scoped country to evaluate whether to create a specific faction type immediately, rather than monthly

    enable_faction_of_type = <key>

    The game's own scripts use it 5 times.

    As the game uses it
    enable_faction_of_type = xenoist
  • enable_galactic_marketcountry

    Enables the galactic market.

    enable_galactic_market = <yes/no>

    The game's own scripts use it 7 times.

    As the game uses it
    enable_galactic_market = no
  • enable_patron_first_contact_projectcountry

    Enables a specific special research project for the target country at a specific location (should be the same as the current scope where possible). This special project will be the one used for the Patron First Contact. The relation contact state will be set to In Progress if needed.

    enable_patron_first_contact_project = {
    	name = <project key>
    	patron = <patron key>
    	owner = <target, default = root> location = <target, ideally THIS (that is default)> }

    The game's own scripts use it 5 times.

    As the game uses it
    enable_patron_first_contact_project = {
    	name = ENDBRINGERS_COMMUNE_WITH_THE_VOICE
    	patron = end_of_the_cycle
    	owner = this
    }
  • end_all_treaties_withcountry

    Ends all treaties with the target

    end_all_treaties_with = <target>

    The game's own scripts use it 3 times.

    As the game uses it
    end_all_treaties_with = prev
  • end_event_chaincountry

    Ends a specific situation log event chain for the scoped country

    end_event_chain = <key>

    The game's own scripts use it 515 times.

    As the game uses it
    end_event_chain = become_the_crisis_chain
  • end_rivalrycountry

    Force-end rivalry with target country

    end_rivalry = <target>

    The game's own scripts use it 11 times.

    As the game uses it
    end_rivalry = from
  • end_trucecountry

    Force-end truce with target country

    end_truce = <target>

    The game's own scripts use it 2 times.

    As the game uses it
    end_truce = root
  • establish_communicationscountry

    Establish communications between scoped country and target country

    establish_communications = <target>

    The game's own scripts use it 23 times.

    As the game uses it
    establish_communications = from
  • establish_communications_no_messagecountry

    Silently establish communications between scoped country and target country

    establish_communications_no_message = <target>

    The game's own scripts use it 188 times.

    As the game uses it
    establish_communications_no_message = prev
  • establish_contactcountry

    Establishes first contact between the scoped country and target country at the set location

    establish_contact = { who = <target> location = <target> }

    The game's own scripts use it 25 times.

    As the game uses it
    establish_contact = {
    	who = root
    	location = from
    }
  • every_enslaved_speciesplanet, country, ship, colony

    Check if any of the species with enslaved pops in the current scope meet the specified criteria - executes the enclosed effects on all of them for which the limit triggers return true

    every_enslaved_species = { limit = { <triggers> } <effects> }
  • every_owned_speciesplanet, country, ship, colony

    Check if any of the species in the current scope meet the specified criteria - executes the enclosed effects on all of them for which the limit triggers return true

    every_owned_species = { limit = { <triggers> } <effects> }

    The game's own scripts use it 51 times.

    As the game uses it
    every_owned_species = {
    	limit = {
    		has_species_flag = evopred_vassal_counted@event_target:evopred_purge_overlord
    	}
    	remove_species_flag = evopred_vassal_counted@event_target:evopred_purge_overlord
    }
  • exile_leader_ascountry, fleet, leader, army

    Exiles the scoped country/fleet/army/leader and saves them with a custom name

    exile_leader_as = <key>/<key@scope>

    The game's own scripts use it 95 times.

    As the game uses it
    exile_leader_as = tamperion
  • export_modifier_duration_to_variableplanet, country, pop, pop group, fleet

    Exports the remaining duration of a specified modifier in the current scope to a specified variable.

    export_modifier_duration_to_variable = { modifier = modifier_name variable = <string> }

    The game's own scripts use it once.

    As the game uses it
    export_modifier_duration_to_variable = {
    	modifier = relic_activation_cooldown
    	variable = lateral_artifacting_remaining_duration
    }
  • export_modifier_to_variablemegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, species, faction, colony

    Exports the value of a specified modifier in the current scope to a specified variable.

    export_modifier_to_variable = { modifier = logistic_growth_mult variable = <string> }

    The game's own scripts use it 8 times.

    As the game uses it
    export_modifier_to_variable = {
    	modifier = fake_pop_growth_mod
    	variable = zombie_pop_amount
    }
  • export_resource_income_to_variablecountry

    Exports the value of the current country's monthly income of the specified resource to a variable.

    export_resource_income_to_variable = { resource = energy variable = <string> }

    The game's own scripts use it 16 times.

    As the game uses it
    export_resource_income_to_variable = {
    	resource = food
    	variable = food_income_to_give
    }
  • export_resource_maximum_to_variablecountry

    Exports the value of the current country's maximum of the specified resource to a variable.

    export_resource_maximum_to_variable = { resource = energy variable = <string> }

    The game's own scripts use it once.

    As the game uses it
    export_resource_maximum_to_variable = {
    	resource = energy
    	variable = energy_max_value
    }
  • export_resource_stockpile_to_variablecountry

    Exports the value of the current country's stockpile of the specified resource to a variable.

    export_resource_stockpile_to_variable = { resource = energy variable = <string> }

    The game's own scripts use it 39 times.

    As the game uses it
    export_resource_stockpile_to_variable = {
    	resource = food
    	variable = food_before
    }
  • export_trigger_value_to_variablemegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, ambient object, species, bypass, faction, war, federation, starbase, deposit, sector, dig site, first contact, spy network, espionage operation, espionage asset, agreement, situation, astral rift, ship growth stage, colony

    Exports the value of a trigger to a specified variable (so for num_pops, it'll export the number of pops).

    export_trigger_value_to_variable = {
    	trigger = has_resource
    	parameters = { resource = energy } (optional: specify extra parameters for triggers with { }
    	variable = <string> (this example will print the amount of energy the scoped object has to a variable)
    	rounded = yes (default: no)
    }

    The game's own scripts use it 94 times.

    As the game uses it
    export_trigger_value_to_variable = {
    	trigger = count_owned_pop_amount
    	variable = pops_devoured
    	rounded = yes
    }
  • fill_astral_rift_event_poolcountry

    Fills the astral rift event pool for every playable country.

    The game's own scripts use it once.

    As the game uses it
    fill_astral_rift_event_pool = yes
  • finish_all_researchescountry

    Instantly finish current researches for scoped country.

    finish_all_researches = yes
  • finish_council_agendacountry

    Tries to finish the current council agenda for the scoped country

    finish_council_agenda = yes/no

    The game's own scripts use it once.

    As the game uses it
    finish_council_agenda = yes
  • floor_variablemegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, ambient object, species, bypass, faction, war, federation, starbase, deposit, sector, dig site, first contact, spy network, espionage operation, espionage asset, agreement, situation, astral rift, ship growth stage, colony

    Rounds a previously-set variable down to the previous integer.

    floor_variable = <string>

    The game's own scripts use it 8 times.

    As the game uses it
    floor_variable = experience_bonus
  • force_add_civiccountry

    Adds civic to a government without checking the restrictions

    force_add_civic = <civic>

    The game's own scripts use it 37 times.

    As the game uses it
    force_add_civic = civic_anglers
  • force_remove_civiccountry

    Removes civic from a government without checking the restrictions

    force_remove_civic = <civic>/2

    The game's own scripts use it 35 times.

    As the game uses it
    force_remove_civic = civic_chosen
  • force_remove_civic_by_indexcountry

    Removes civic from a government without checking the restrictions

    force_remove_civic = <civic>/2

    The game's own scripts use it 6 times.

    As the game uses it
    force_remove_civic_by_index = 1
  • force_show_diplomacycountry

    Forces the diplomacy view to open for the scoped country targeted at the given country, on the diplomacy tab. Only works inside on_custom_diplomacy events, relic activation effects, or events triggered from those. Does nothing if communications are missing or if the target has custom_diplomacy = yes.

    force_show_diplomacy = <target country>

    The game's own scripts use it once.

    As the game uses it
    force_show_diplomacy = event_target:great_khan_empire
  • force_show_espionagecountry

    Forces the diplomacy view to open for the scoped country targeted at the given country, on the espionage tab. Only works inside on_custom_diplomacy events, relic activation effects, or events triggered from those. Does nothing if communications are missing or if espionage is not actionable against the target.

    force_show_espionage = <target country>
  • get_trade_datacountry

    Passes special trade offer data from the target enclave country to the scoped country.

    Only works inside certain parts of the script marked as ai_trade_facility.
    get_trade_data = { target = <target> }

    The game's own scripts use it 4 times.

    As the game uses it
    get_trade_data = {
    	target = event_target:mercenary_enclave_country
    }
  • give_culling_rewardscountry

    Gives associated culling rewards from a space fauna design to the target country.

    give_culling_rewards = {
    	design = <key>
    	mult = <value> (optional, default: 1)
    }

    The game's own scripts use it 2 times.

    As the game uses it
    give_culling_rewards = {
    	design = from
    	mult = 2
    }
  • give_dnacountry

    Gives given space fauna DNA with given rarity to the target country.

    give_dna = { ship_category = <key> rarity = <key> (optional) }

    The game's own scripts use it 2 times.

    As the game uses it
    give_dna = {
    	ship_category = voidworm
    	rarity = epic
    }
  • give_specimencountry

    Gives a given specimen to the target country.

    give_specimen = { key = <specimen> origin = <key> }

    The game's own scripts use it 166 times.

    As the game uses it
    give_specimen = {
    	key = rainaissance
    	targets = {
    		root.from
    	}
    }
  • give_technologycountry

    Instantly gives a specific tech to the scoped country

    give_technology = { tech = tech_desert_colonization message = yes }

    The game's own scripts use it 422 times. Technology IDs →

    As the game uses it
    give_technology = {
    	tech = tech_shields_2
    }
  • go_to_next_pre_ftl_agecountry

    Advances country to next pre-FTL technology level if possible. Does nothing if has_next_pre_ftl_age would be false, or if argument is 'no'.

    go_to_next_pre_ftl_age = <yes/no>
  • guarantee_countrycountry

    Makes a country guarantee another country

    guarantee_country = <target>
    guarantee_country = { target = <target> }
  • integrate_speciescountry

    Triggers the sub-species integration step for a country.

    integrate_species = yes

    The game's own scripts use it once.

    As the game uses it
    integrate_species = yes
  • issue_contractcountry

    Adds the specified contract to a target system.

    The issuing country is the scoped country, contract and system are specified as parameter to the effect. You can additionally restrict who can pick up the contract by using a target
    example: issue_contract = {
    	contract = harvest_resources
    	location = overlord.capital
    	<target = this>
    }

    The game's own scripts use it 27 times.

    As the game uses it
    issue_contract = {
    	contract = contract_intercept_raid_heirs
    	location = event_target:contract_system
    	target = root
    }
  • join_alliancecountry

    Join federation with target

    join_alliance = { who = <target> override_requirements = yes/no }

    The game's own scripts use it 21 times.

    As the game uses it
    join_alliance = {
    	who = root
    	name = NAME_Loyalists
    	override_requirements = yes
    }
  • join_warcountry

    Joins wars on the side of target country

    join_war = <target>

    The game's own scripts use it 10 times.

    As the game uses it
    join_war = from
  • join_war_on_sidecountry

    Joins the war on the specified side.

    join_war_on_side = { war = <target> side = attackers/defenders/<country> }

    The game's own scripts use it 10 times.

    As the game uses it
    join_war_on_side = {
    	war = from
    	side = root
    }
  • kill_exiled_leadercountry

    Kills the scoped leader saved with a custom name

    kill_exiled_leader = <key>/<key@scope>

    The game's own scripts use it 3 times.

    As the game uses it
    kill_exiled_leader = storm_leader@owner
  • kill_leaderplanet, country, ship, fleet, leader, army, colony

    Kills the scoped leader or leader of the scoped object

    kill_leader = {
    	class = <key, optional, if left out will kill scoped leader, can be used multiple times>
    	ability = <key, optional, see leader class for list of abilities, will kill leader that has this ability, can be used multiple times>
    
    	show_notification = <yes/no>
    	heir = <yes, optional, if added to type = ruler, will kill heir instead>
    	fire = yes (default: no; if yes, fires on_leader_fired instead of on_leader_death
    }

    The game's own scripts use it 219 times.

    As the game uses it
    kill_leader = {
    	fire = yes
    	show_notification = no
    }
  • leave_alliancecountry

    Removes scoped country from any alliances it is in

    leave_alliance = {
    	override_requirements = yes/no (default: no)
    	apply_opinion_penalty = yes (default: no; sets whether 'Broke Federation' opinion is applied)
    }

    The game's own scripts use it 20 times.

    As the game uses it
    leave_alliance = {
    	override_requirements = yes
    	apply_opinion_penalty = no
    }
  • make_special_tradecountry

    Makes special trade deal between the target enclave country and the scoped country.

    Only works inside certain parts of the script marked as ai_trade_facility.
    make_special_trade = { target = <target> }

    The game's own scripts use it 4 times.

    As the game uses it
    make_special_trade = {
    	target = event_target:mercenary_enclave_country
    }
  • merge_speciescountry

    Triggers the merge of similar sub-species for a country.

    integrate_species = yes

    The game's own scripts use it once.

    As the game uses it
    merge_species = yes
  • modify_speciesplanet, country, ship, pop, pop group, leader, species, colony

    Creates a new, modified species based on an already-extant species

    modify_species = {
    	species = <target> # species to modify
    	base = <target>/auto/none # new base species; default: auto (uses species)
    	add_trait = <key> # optional, can specify multiple
    	remove_trait = <key> # optional, can specify multiple
    	add_traits_at_start_of_list = yes # optional, pushes out other traits if needed
    	ideal_planet_class = <target or pc_name> # optional
    	change_scoped_species = yes/no # modify scoped pop group/planet/leader/country; default: yes
    	portrait = <target or portrait name> # optional
    	add_random_species_trait = { <trigger> } adds a random trait filtered by the given trigger (all species traits minus already owned and DLC-locked), the Scope is the trait token, and the original scope is in Prev 
    	on_random_trait_added = { <effect> } effect is fired for randomly selected trait, the Scope is the trait, the original scope is in Prev, and From contains Species 
    	sapient = <Y/N, determines if species is pre-sapient>
    	effect = { SCOPE_SPECIES } # optional effect to run on the resulting new species, is executed after any handling of change_scoped_species
    }

    The game's own scripts use it 199 times.

    As the game uses it
    modify_species = {
    	species = this
    	add_trait = trait_plasmic
    	portrait = this
    }
  • modulo_variablemegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, ambient object, species, bypass, faction, war, federation, starbase, deposit, sector, dig site, first contact, spy network, espionage operation, espionage asset, agreement, situation, astral rift, ship growth stage, colony

    Modulos a previously-set variable by a specific amount i.e. X % Y

    modulo_variable = { which = <string> value = <float>/<variable>/<scope.variable>/trigger:<trigger> }
  • multiply_variablemegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, ambient object, species, bypass, faction, war, federation, starbase, deposit, sector, dig site, first contact, spy network, espionage operation, espionage asset, agreement, situation, astral rift, ship growth stage, colony

    Multiplies a previously-set variable by a specific amount

    multiply_variable = { which = <string> value = <float>/<variable>/<scope.variable>/trigger:<trigger> }

    The game's own scripts use it 68 times.

    As the game uses it
    multiply_variable = {
    	which = killed_biomass
    	value = -1
    }
  • open_shroud_tabcountry

    Opens the Shroud tab

    open_shroud_tab = yes
  • ordered_enslaved_speciesplanet, country, ship, colony

    Check if any of the species with enslaved pops in the current scope meet the specified criteria - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_enslaved_species = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }
  • ordered_owned_speciesplanet, country, ship, colony

    Check if any of the species in the current scope meet the specified criteria - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object according to the order specified (position 0, order_by = trigger:num_pops would run the effects on the X with the most pops)

    ordered_owned_species = {
    	limit = { <triggers> }
    	position = <integer, starting with 0>
    	order_by = <variable>/trigger:<trigger>
    	inverse = yes/no (default: no - if yes, then 0 is lowest rather than highest)
    	<effects>
    }

    The game's own scripts use it once.

  • owned_fleet_list_tooltipcountry

    Prints a list of the country's fleets that match the limit triggers in a tooltip, each separated by a line break.

    owned_fleet_list_tooltip = { limit = { <triggers> } divider_tooltip = localisation }
  • owned_leader_list_tooltipcountry

    Prints a list of the country's leaders that match the limit triggers in a tooltip, each separated by a line break.

    owned_leader_list_tooltip = { limit = { <triggers> } }
  • owned_planet_list_tooltipcountry

    Prints a list of the country's colonies that match the limit triggers in a tooltip, each separated by a line break.

    owned_planet_list_tooltip = { limit = { <triggers> } }

    The game's own scripts use it 6 times.

    As the game uses it
    owned_planet_list_tooltip = {
    	limit = {
    		has_carrier_flag = mass_shift_affected
    	}
    }
  • owned_pop_faction_list_tooltipcountry

    Prints a list of the country's pop factions that match the limit triggers in a tooltip, each separated by a line break.

    owned_pop_faction_list_tooltip = { limit = { <triggers> } }
  • pass_resolutioncountry

    Immediately passes the first found (oldest) proposed/voting for/failed resolution OR a new resolution of this type.

    pass_resolution = <resolution type>
  • pass_resolution_no_cooldowncountry

    Immediately passes the first found (oldest) proposed/voting for/failed resolution OR a new resolution of this type. Skips the cooldown on the relevant category.

    pass_resolution_no_cooldown = <resolution type>

    The game's own scripts use it 8 times.

    As the game uses it
    pass_resolution_no_cooldown = resolution_emperor_gto
  • pass_targeted_resolutioncountry

    Immediately passes the first found (oldest) proposed/voting for/failed resolution OR a new resolution of this type that has the specified target. Ignores whether the target is valid or not.

    pass_targeted_resolution = { resolution = <resolution type> target = <target>

    The game's own scripts use it 4 times.

    As the game uses it
    pass_targeted_resolution = {
    	resolution = resolution_declare_crisis
    	target = root.owner
    }
  • perform_astral_action_unlock_checkcountry

    Unlocks Astral Actions that have become unlockable since the last time this effect was called.

    perform_astral_action_unlock_check = yes
  • progress_all_researchescountry

    Make current researches for scoped country advance by given amount.

    progress_all_researches = 0.2

    The game's own scripts use it once.

    As the game uses it
    progress_all_researches = @foresight_tech_progression
  • propose_resolutioncountry

    Proposes the resolution of the given type

    ppropose_resolution = {
    	resolution = <resolution type>
    	target = <event_target:country> (optional)}
  • random_enslaved_speciesplanet, country, ship, colony

    Check if any of the species with enslaved pops in the current scope meet the specified criteria - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_enslaved_species = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }
  • random_owned_speciesplanet, country, ship, colony

    Check if any of the species in the current scope meet the specified criteria - executes the enclosed effects on one of them for which the limit triggers return true. Picks the specific object randomly.

    random_owned_species = {
    	limit = { <triggers> }
    	weights = { (optional - adds weights to affect the chance a specific object is selected)
    		base = float
    		modifier = { <add/factor = float> <triggers> }
    	}
    	<effects>
    }

    The game's own scripts use it 20 times.

    As the game uses it
    random_owned_species = {
    	limit = {
    		is_flora_species = yes
    	}
    	save_event_target_as = plants_species
    }
  • randomize_flag_symbolcountry

    Randomizes a country's flag symbol within the selected category

    randomize_flag_symbol = pirate

    The game's own scripts use it 9 times.

    As the game uses it
    randomize_flag_symbol = pirate
  • rebuild_owned_starbase_designscountry

    Re-pick the auto-designed loadout of the country's non-designable starbases (so a changed starbase weapon/defense preference takes effect on existing stations)

    rebuild_owned_starbase_designs = yes

    The game's own scripts use it 12 times.

    As the game uses it
    rebuild_owned_starbase_designs = yes
  • refresh_accordscountry

    Manually refresh Patrons accords

    refresh_accords = yes

    The game's own scripts use it 2 times.

    As the game uses it
    refresh_accords = yes
  • refresh_auto_generated_ship_designscountry

    Refresh ship designs that are aut-generated such as colony ships

    refresh_auto_generated_ship_designs = yes

    The game's own scripts use it 45 times.

    As the game uses it
    refresh_auto_generated_ship_designs = yes
  • refresh_leader_poolcountry

    Refreshes the scoped country's leader pool.

    refresh_leader_pool = yes

    The game's own scripts use it 7 times.

    As the game uses it
    refresh_leader_pool = yes
  • refresh_portraitscountry

    Signals to portrait objects that they need to refresh some of their properties

    refresh_portraits = planet/room/character/all

    The game's own scripts use it 19 times.

    As the game uses it
    refresh_portraits = character
  • refresh_psionic_aura_typecountry

    Forces an Empire's Psionic Aura to immediately update its type

    refresh_psionic_aura_type = yes

    The game's own scripts use it 3 times.

    As the game uses it
    refresh_psionic_aura_type = yes
  • refresh_species_rightscountry

    Manually refresh species rights.

    refresh_species_rights = yes

    The game's own scripts use it 4 times.

    As the game uses it
    refresh_species_rights = yes
  • refuse_covenantcountry

    Refuses covenant proposition with Shroud Patron.

    refuse_covenant = <patron_name>

    The game's own scripts use it 10 times.

    As the game uses it
    refuse_covenant = {
    	patron = end_of_the_cycle
    	reset_attunement = yes
    }
  • release_vivarium_faunacountry

    Releases into the wild space fauna contained in the scoped country's Vivarium, from all or given ship category. Resulting fleet owner can be specified. Space Fauna can be culled for resources instead by specifying 'cull_vivarium_critter = yes'.release_vivarium_fauna = { category = <ship_category>/all location = <target> owner = <country>cull_vivarium_critter = <yes/no> }

    The game's own scripts use it once.

    As the game uses it
    release_vivarium_fauna = {
    	category = all
    	cull_vivarium_critter = yes
    }
  • release_vivarium_fauna_countcountry

    Releases into the wild a specific amount of space fauna contained in the scoped country's Vivarium.Rarest fauna is released in priority. Resulting fleet owners can be specified. release_vivarium_fauna_count = { count = <capacity_to_release> location = <target> owners = { <category> = <country> } }

    The game's own scripts use it once.

  • remove_communicationscountry

    Remove communications between scoped country and target country

    remove_communications = <target>

    The game's own scripts use it once.

    As the game uses it
    remove_communications = root.controller
  • remove_country_flagcountry

    Removes a flag from the scoped country

    remove_country_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 2,143 times.

    As the game uses it
    remove_country_flag = bunkbeds_ready
  • remove_envoys_tocountry

    Removes any envoys from scoped country assigned to target country

    remove_envoys_to = <country>
  • remove_favorscountry

    Remove <value/all> favors that scoped country have on target country:

    remove_favors = {
    target = <target>
    value = <value/all/variable> }

    The game's own scripts use it 2 times.

    As the game uses it
    remove_favors = {
    	target = event_target:third_party
    	value = 2
    }
  • remove_from_federationcountry

    The scoped country is removed from any federation its in

    remove_from_federation = yes
  • remove_from_galactic_communitycountry

    Tries to remove the scoped country from the Galactic Community

    remove_from_galactic_community = yes/no

    The game's own scripts use it 16 times.

    As the game uses it
    remove_from_galactic_community = yes
  • remove_from_galactic_councilcountry

    Tries to remove the scoped country from the Galactic Council

    remove_from_galactic_council = yes/no

    The game's own scripts use it 10 times.

    As the game uses it
    remove_from_galactic_council = yes
  • remove_modifiermegastructure, planet, country, ship, pop, pop group, fleet, system, faction, federation, starbase, spy network, espionage operation, astral rift, storm influence field, colony

    Removes a specific modifier from the scope object

    remove_modifier = <key>

    The game's own scripts use it 1,312 times. Modifier IDs →

    As the game uses it
    remove_modifier = no_lifetree
  • remove_notification_modifiercountry

    Remove a notification modifier to the country

    remove_notification_modifier = <key>

    The game's own scripts use it 10 times.

    As the game uses it
    remove_notification_modifier = ghost_signal_1
  • remove_opinion_modifiercountry

    Removes a specific opinion modifier towards target country or any country from the scoped country

    remove_opinion_modifier = { modifier = <key> who = <target (optional)> }

    The game's own scripts use it 47 times.

    As the game uses it
    remove_opinion_modifier = {
    	who = prev
    	modifier = opinion_new_contact
    }
  • remove_patroncountry

    Remove a patron from the shroud plane.

    remove_patron = <patron_key>

    The game's own scripts use it 12 times.

    As the game uses it
    remove_patron = the_outsider
  • remove_permanent_councillorcountry

    Remove the provided country from their permanent council position

    remove_permanent_councillor = yes/no

    The game's own scripts use it 3 times.

    As the game uses it
    remove_permanent_councillor = yes
  • remove_point_of_interestplanet, country

    Removes a specific point of interest from the scoped country's situation log

    remove_point_of_interest = <key>

    The game's own scripts use it 189 times.

    As the game uses it
    remove_point_of_interest = ransomeer_poi
  • remove_relation_flagcountry

    Removes a specific relation flag towards target country from the scoped country

    remove_relation_flag = {
    	who = <target>
    	flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
    }

    The game's own scripts use it 48 times.

    As the game uses it
    remove_relation_flag = {
    	who = FROM
    	flag = riggan_trade
    }
  • remove_reliccountry

    Removes the specified relic from the scoped country.

    remove_relic = <relic_key>

    The game's own scripts use it 11 times.

    As the game uses it
    remove_relic = r_galatron
  • remove_saved_leadercountry

    Removes a saved leader for the scoped country with a lookup key

    remove_saved_leader = <string>
  • remove_secret_fealtycountry

    Removes a secret fealty pact between the scoped subject country and the target empire

    remove_secret_fealty = <target>

    The game's own scripts use it 2 times.

    As the game uses it
    remove_secret_fealty = FROM
  • remove_ship_designcountry

    Removes a specific ship design from the scoped country

    remove_ship_design = <target/last_created_design>

    The game's own scripts use it 2 times.

    As the game uses it
    remove_ship_design = event_target:remove_this_design
  • remove_specimencountry

    Removes specified specimen from the target country. This will destroy the specimen

    remove_specimen = <specimen_key/exhibit_target>

    The game's own scripts use it 2 times.

    As the game uses it
    remove_specimen = prev
  • replace_patroncountry

    Replace a patron with another one, creating the patron relation if it does not yet exist, and setting the new patron to the replaced patron's position in the shroud plane.

    replace_patron = { new_patron = <patron_key> replaced_patron = <patron_key> }

    The game's own scripts use it once.

  • reset_event_chain_countercountry

    Resets n event chain counter for the scoped country

    reset_event_chain_counter = { event_chain = <key> counter = <key> }

    The game's own scripts use it 12 times.

    As the game uses it
    reset_event_chain_counter = {
    	event_chain = the_reckoning_chain
    	counter = reckoning_integrity
    }
  • reset_policy_cooldownscountry

    Resets the cooldown period of all policies for a country

    reset_policy_cooldowns = yes

    The game's own scripts use it once.

    As the game uses it
    reset_policy_cooldowns = yes
  • reset_years_of_peacecountry

    Resets years of peace for a country.

    reset_years_of_peace = yes

    The game's own scripts use it once.

    As the game uses it
    reset_years_of_peace = yes
  • restore_country_backup_datacountry

    Restores backed up data to the scoped country.

    See store_country_backup_data for what data can be backed up.
    restore_country_backup_data = <yes/no>

    The game's own scripts use it 5 times.

    As the game uses it
    restore_country_backup_data = yes
  • return_leader_from_exilecountry

    Returns the leader from a custom name

    return_leader_from_exile = <key>/<key@scope>

    The game's own scripts use it 9 times.

    As the game uses it
    return_leader_from_exile = from
  • revert_accordscountry

    Launches the on_revert effects for all accords of a Shroud Patron.

    revert_accords = <patron_key>

    The game's own scripts use it 5 times.

    As the game uses it
    revert_accords = the_cradle_of_souls
  • roll_ai_preferred_patroncountry

    Rolls the major Shroud Patron scoped AI will devote themselves to, by selecting the patron with the highest attunement value.

    roll_ai_preferred_patron = yes

    The game's own scripts use it once.

    As the game uses it
    roll_ai_preferred_patron = yes
  • room_name_overridecountry

    Sets the room background of the empire. Provide an empty string to remove the override.

    room_name_override = <room_name>

    The game's own scripts use it 8 times.

    As the game uses it
    room_name_override = ""
  • round_variablemegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, ambient object, species, bypass, faction, war, federation, starbase, deposit, sector, dig site, first contact, spy network, espionage operation, espionage asset, agreement, situation, astral rift, ship growth stage, colony

    Rounds a previously-set variable to the closest integer.

    round_variable = <string>

    The game's own scripts use it 11 times.

    As the game uses it
    round_variable = recycled_robots
  • round_variable_to_closestmegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, ambient object, species, bypass, faction, war, federation, starbase, deposit, sector, dig site, first contact, spy network, espionage operation, espionage asset, agreement, situation, astral rift, ship growth stage, colony

    Rounds a previously-set variable to the closest X

    round_variable_to_closest = {
    	which = <string>
    	value = <float>/<variable>/<scope.variable>/trigger:<trigger> (variable will be rounded to a multiple of this value)
    }

    The game's own scripts use it 6 times.

    As the game uses it
    round_variable_to_closest = {
    	which = scrap_value
    	value = 10
    }
  • run_ai_strategic_datacountry

    Recomputes ALL strategic data for AI = yes

    The game's own scripts use it once.

    As the game uses it
    run_ai_strategic_data = yes
  • run_ai_strategic_war_datacountry

    Recomputes strategic war ( attack / defense ) data for AI = yes

    The game's own scripts use it once.

    As the game uses it
    run_ai_strategic_war_data = yes
  • save_global_event_target_asmegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, ambient object, species, bypass, ship design, faction, war, federation, starbase, deposit, sector, dig site, first contact, spy network, espionage operation, espionage asset, agreement, situation, debris, astral rift, galactic community, exhibit, pop, job, colony, mission

    Saves the current scope as an arbitrarily-named target to be referenced later, accessible globally until cleared

    save_global_event_target_as = <string>/<string@scope>

    The game's own scripts use it 386 times.

    As the game uses it
    save_global_event_target_as = smeegibb
  • set_adjectivecountry

    Sets the adjective of the scoped country

    set_adjective = <string>
  • set_advisor_activecountry

    Enables or disables the VIR window pop-in

    set_advisor_active = no

    The game's own scripts use it 6 times.

    As the game uses it
    set_advisor_active = no
  • set_aggro_rangecountry, fleet

    Sets the scoped fleet/country's aggro range in intra-system units

    set_aggro_range = <int>

    The game's own scripts use it 6 times.

    As the game uses it
    set_aggro_range = 300
  • set_aggro_range_measure_fromcountry, fleet

    Determines whether the scoped fleet/country's aggro range is measured from the fleet's current position or its spawn location

    set_aggro_range_measure_from = <key, self/return_point>

    The game's own scripts use it 3 times.

    As the game uses it
    set_aggro_range_measure_from = self
  • set_ai_armor_ratiocountry

    Sets the AI armor ratio override for the scoped country.

    set_ai_armor_ratio = 0.7

    The game's own scripts use it 6 times.

    As the game uses it
    set_ai_armor_ratio = @defense_preference_major_ratio
  • set_ai_personalitycountry

    Sets the AI personality of a country to a new one

    set_ai_personality=<personality>

    The game's own scripts use it 2 times.

    As the game uses it
    set_ai_personality = became_the_crisis
  • set_ai_preferred_patroncountry

    Set the Shroud Patron scoped AI will devote themselves to.

    set_ai_preferred_patron = <patron_key>

    The game's own scripts use it once.

    As the game uses it
    set_ai_preferred_patron = end_of_the_cycle
  • set_ai_shields_ratiocountry

    Sets the AI shields ratio override for the scoped country.

    set_ai_shields_ratio = 0.7

    The game's own scripts use it 6 times.

    As the game uses it
    set_ai_shields_ratio = @defense_preference_major_ratio
  • set_ai_ship_rolescountry

    Sets the AI ship role overrides for the scoped country.

    set_ai_ship_roles = { corvette = gunship destroyer = { artillery = 70 gunship = 30 } }

    The game's own scripts use it 6 times.

  • set_ai_starbase_armor_ratiocountry

    Sets the AI armor ratio override for the scoped country's auto-designed starbases.

    set_ai_starbase_armor_ratio = 0.7

    The game's own scripts use it 12 times.

    As the game uses it
    set_ai_starbase_armor_ratio = @defense_preference_major_ratio
  • set_ai_starbase_shields_ratiocountry

    Sets the AI shields ratio override for the scoped country's auto-designed starbases.

    set_ai_starbase_shields_ratio = 0.7

    The game's own scripts use it 12 times.

    As the game uses it
    set_ai_starbase_shields_ratio = @defense_preference_major_ratio
  • set_ai_starbase_weapon_preferencecountry

    Sets the AI weapon preference override for the scoped country's auto-designed starbases.

    set_ai_starbase_weapon_preference = weapon_type_energy

    The game's own scripts use it 10 times.

    As the game uses it
    set_ai_starbase_weapon_preference = weapon_type_energy
  • set_ai_weapon_preferencecountry

    Sets the AI weapon preference override for the scoped country.

    set_ai_weapon_preference = weapon_type_energy

    The game's own scripts use it 8 times.

    As the game uses it
    set_ai_weapon_preference = weapon_type_energy
  • set_attunementcountry

    Sets attunement of the specified patron to a specific amount.

    set_attunement = { value = <value> patron = <patron> }

    The game's own scripts use it 4 times.

    As the game uses it
    set_attunement = {
    	patron = end_of_the_cycle
    	value = @max_attunement
    }
  • set_awarenesscountry

    Sets awareness for the scoped (pre-FTL) country

    set_awareness = 52.3

    The game's own scripts use it 16 times.

    As the game uses it
    set_awareness = 0
  • set_built_speciescountry

    Changes the built species of the scoped object

    set_built_species = <target>

    The game's own scripts use it 2 times.

    As the game uses it
    set_built_species = last_created_species
  • set_city_graphical_culturecountry

    Sets the scoped country's city graphical culture

    set_city_graphical_culture = <key>
  • set_closed_borderscountry

    Changes closed borders status between two countries

    set_closed_borders = {
    	who = target
    	status = yes/no
    	forced = <int>/<variable> (number of years)
    }

    The game's own scripts use it 11 times.

    As the game uses it
    set_closed_borders = {
    	who = prevprev
    	status = no
    	forced = 5
    }
  • set_council_agendacountry

    Set the Country's council agenda

    set_council_agenda = agenda_lets_be_friends

    The game's own scripts use it 7 times.

    As the game uses it
    set_council_agenda = agenda_infinite_opportunities
  • set_council_position_title_femalecountry

    Sets the scoped country's council position's female title.

    set_council_position_title_female = { position_tag = COUNCIL_POSITION_TAG title = TITLE_FEMALE }
  • set_council_position_title_malecountry

    Sets the scoped country's council position's male title.

    set_council_position_title_male = { position_tag = COUNCIL_POSITION_TAG title = TITLE_MALE }
  • set_council_position_to_councilcountry

    Assigns a council position to the country's council, if possible.

    set_council_position_to_council = COUNCIL_POS_KEY

    The game's own scripts use it 12 times.

    As the game uses it
    set_council_position_to_council = councilor_state
  • set_country_code_flagscountry

    Sets bool flags as used by code, not defined in script:

    set_country_code_flags = { some_flag_1 = yes some_flag_2 = no }
    Supported flags: colonizer rebel track_all_situations custom_name is_in_breach_of_any has_advisor autopick_leader_traits crisis_fighter is_under_crisis_attack initialized is_affected_by_war_exhaustion is_nomadic killed

    The game's own scripts use it 2 times.

    As the game uses it
    set_country_code_flags = {
    	colonizer = yes
    }
  • set_country_flagcountry

    Sets an arbitrarily-named flag on the scoped country

    set_country_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 4,968 times.

    As the game uses it
    set_country_flag = yuht_1
  • set_country_typecountry

    Changes the country type of the scoped country

    set_country_type = <key>

    The game's own scripts use it 20 times.

    As the game uses it
    set_country_type = default
  • set_custom_capital_locationcountry

    Sets a custom spatial object as custom country capital location.

    set_custom_capital_location = <target>

    The game's own scripts use it 8 times.

    As the game uses it
    set_custom_capital_location = prev
  • set_empire_flagcountry

    Sets the flag of the current Empire.

    set_empire_flag = <flag>
  • set_empire_namecountry

    Sets the name of the current Empire.

    set_empire_name = "name_loc_key"
  • set_faction_hostilitycountry

    Sets the aggro state of the scoped faction-type country

    set_faction_hostility = { target = country set_hostile = yes set_neutral = no set_friendly = no }

    The game's own scripts use it 142 times.

    As the game uses it
    set_faction_hostility = {
    	target = prev
    	set_hostile = no
    	set_neutral = no
    	set_friendly = yes
    }
  • set_faction_propertiescountry

    Sets country's faction properties:

    set_faction_properties = { some_flag_1 = yes some_flag_2 = no }

    The game's own scripts use it 5 times.

    As the game uses it
    set_faction_properties = {
    	needs_border_access = no
    }
  • set_fauna_fleet_growth_stancecountry, fleet

    Sets Space Fauna growth stance. Setting to 'none' resets stance to use default country policy.

    set_fauna_fleet_growth_stance = <value> (controlled/excessive/none)
  • set_federation_leadercountry, federation

    Sets a country to lead a federation

    set_federation_leader = <target>

    The game's own scripts use it 11 times.

    As the game uses it
    set_federation_leader = root
  • set_female_heir_titlecountry

    Sets the country's female heir title to a custom value

    set_female_heir_title = "Little Executioneress"
  • set_female_ruler_titlecountry

    Sets the country's female ruler title to a custom value

    set_female_ruler_title = "Grand Executionerress"

    The game's own scripts use it once.

    As the game uses it
    set_female_ruler_title = RT_CENTRAL_CRYSTAL_COMMANDER
  • set_galactic_custodiancountry

    Sets whether or not the scoped country is the Galactic Custodian

    set_galactic_custodian = yes/no

    The game's own scripts use it 6 times.

    As the game uses it
    set_galactic_custodian = no
  • set_galactic_emperorcountry

    Sets whether or not the scoped country is the Galactic Emperor

    set_galactic_emperor = yes/no

    The game's own scripts use it 4 times.

    As the game uses it
    set_galactic_emperor = no
  • set_government_cooldowncountry

    Locks the country's government for a given period of days, the default cooldown, or unlocks it.

    set_government_cooldown = 500/default/no

    The game's own scripts use it 9 times.

    As the game uses it
    set_government_cooldown = no
  • set_graphical_culturemegastructure, country, ship, fleet, starbase

    Sets the scoped object's graphical culture

    set_graphical_culture = <key>

    The game's own scripts use it 59 times.

    As the game uses it
    set_graphical_culture = ai_02
  • set_heircountry

    Sets the target leader to be the scoped country's heir

    set_heir = <target>
  • set_hostilecountry

    Sets the target country as hostile. This will work on countries you don't have comms with, unlike set_faction_hostility.

    set_hostile = from

    The game's own scripts use it 16 times.

    As the game uses it
    set_hostile = root
  • set_leadercountry, fleet, army

    Reinstates a previously-exiled leader to the scoped country/fleet/army/pop faction

    set_leader = <key>/<key@scope>

    The game's own scripts use it 38 times.

    As the game uses it
    set_leader = last_created_leader
  • set_male_heir_titlecountry

    Sets the country's male heir title to a custom value

    set_male_heir_title = "Little Executioner"
  • set_male_ruler_titlecountry

    Sets the country's male ruler title to a custom value

    set_male_ruler_title = "Grand Executioner"

    The game's own scripts use it once.

    As the game uses it
    set_male_ruler_title = RT_CENTRAL_CRYSTAL_COMMANDER
  • set_market_leadercountry

    Set scoped country as the current Galactic Market leader.

    set_market_leader = <yes/no>

    The game's own scripts use it 5 times.

    As the game uses it
    set_market_leader = yes
  • set_mission_countercountry

    Sets a mission counter for the scoped country to a specific amount

    set_mission_counter = { mission = <key> counter = <key> amount = <int>/<variable> }

    The game's own scripts use it 2 times.

    As the game uses it
    set_mission_counter = {
    	mission = MISSION_CS_STORM_FEVER_CHALLENGE_3
    	counter = days_storm_rider_spend_in_storm
    	amount = 0
    }
  • set_namemegastructure, planet, country, ship, fleet, system, leader, army, faction, war, federation, sector, first contact, colony

    Sets the name of the scoped object

    set_name = <string>/<target>

    The game's own scripts use it 190 times.

    As the game uses it
    set_name = {
    	key = WAYSTATION_NAME
    	variable_string = [root.GetName]
    }
  • set_origincountry

    Sets the country's origin to a certain value. Note: This will not run effects executed during galaxy generation.

    set_origin = <origin>

    The game's own scripts use it 36 times. Origin IDs →

    As the game uses it
    set_origin = origin_default
  • set_patron_first_contact_statecountry

    Sets the contact state with a Shroud Patron (will create the relation if needed).

    set_patron_first_contact_state = {
    	patron = <patron_name>
    	state = <none / in_progress / completed (default)>
    }

    The game's own scripts use it 16 times.

    As the game uses it
    set_patron_first_contact_state = {
    	patron = the_outsider
    	state = completed
    }
  • set_playercountry

    Assign the player of the target country to play the scoped country instead

    event_target:new_country = { set_player = event_target:old_country }

    The game's own scripts use it 4 times.

    As the game uses it
    set_player = root
  • set_policycountry

    Sets a policy to a specific option for the scoped country and specifies if policy cooldown should go into effect

    set_policy = { policy = <key> option = <key> cooldown = <bool> }

    The game's own scripts use it 130 times. Policy IDs →

    As the game uses it
    set_policy = {
    	policy = slavery
    	option = slavery_allowed
    	cooldown = no
    }
  • set_policy_cooldowncountry

    Sets the specified policy group to have a cooldown as if the policy had just been changed.

    set_policy_cooldown = <policy group e.g. diplomatic_stance>

    The game's own scripts use it 45 times.

    As the game uses it
    set_policy_cooldown = purge
  • set_pre_ftl_agecountry

    Set pre-FTL technology level. Does nothing if the country is not pre-FTL.

    set_pre_ftl_age = <age>

    The game's own scripts use it 38 times.

    As the game uses it
    set_pre_ftl_age = iron_age
  • set_relation_flagcountry

    Sets a relation flag for the scoped country towards target country

    set_relation_flag = {
    	who = <target>
    	flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
    }

    The game's own scripts use it 30 times.

    As the game uses it
    set_relation_flag = {
    	who = root
    	flag = DefiledCorpseTrue
    }
  • set_resourcecountry

    Sets the specific resource to the stockpile for the country scope:

    set_resource = {
    	resource = <resource_name>
    	value = <variable>
    }

    The game's own scripts use it 2 times.

    As the game uses it
    set_resource = {
    	resource = energy
    	value = 0
    }
  • set_resource_convertercountry

    Sets the resource currency converter for the country

    set_resource_converter = <converter_key/none>

    The game's own scripts use it 6 times.

    As the game uses it
    set_resource_converter = none
  • set_ruler_title_femalecountry

    Sets the scoped country's female ruler's title.

    set_ruler_title_female = RULER_TITLE_FEMALE

    The game's own scripts use it 4 times.

    As the game uses it
    set_ruler_title_female = RT_GREAT_KHAN
  • set_ruler_title_malecountry

    Sets the scoped country's male ruler's title.

    set_ruler_title_male = RULER_TITLE_MALE

    The game's own scripts use it 4 times.

    As the game uses it
    set_ruler_title_male = RT_GREAT_KHAN
  • set_saved_datemegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, ambient object, species, bypass, faction, war, federation, starbase, deposit, sector, dig site, first contact, spy network, espionage operation, espionage asset, agreement, situation, astral rift, ship growth stage, colony

    Sets an arbitrarily-named date flag for the scoped object. Acts both as an <scope object>_flag and as a means for saving a date. The flag can then be referred to in localisations [This.<flag>] to produce the date.

    set_saved_date = {
    	key = <key> (refer to this in locs; note: this is actually a <country/whatever>_flag)
    	days_from_present = <int>/<variable> (time until the date you wish to save)
    	expires = <int>/<variable> (time until the saved date is cleared, default is never)
    }

    The game's own scripts use it 67 times.

    As the game uses it
    set_saved_date = {
    	key = lootboxed_recently
    	days_from_present = 500
    	expires = 500
    }
  • set_ship_prefixcountry

    Sets the ship prefix of the scoped country

    set_ship_prefix = <string>
  • set_subject_ofcountry

    Sets the scoped country to be a subject of target country. If use_demanded_terms is set to yes, then the subject agreement will use terms that have previously been demanded in a diplomatic action. If allow_instant_negotiation is set to yes, then the subject and overlord can re-negotiate their agreement right away without having to way for the cooldown. If preset is specified, then the agreement will start as that preset

    set_subject_of = { who = <target>
    use_demanded_terms = yes
    allow_instant_negotiation = yes
    preset = <preset_name> [optional] }

    The game's own scripts use it 75 times.

    As the game uses it
    set_subject_of = {
    	who = root
    	preset = preset_thrall
    }
  • set_timed_country_flagcountry

    Sets an arbitrarily-named flag on the scoped country for a set duration

    set_timed_country_flag = { 
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }

    The game's own scripts use it 1,085 times.

    As the game uses it
    set_timed_country_flag = {
    	flag = cfl_hoster
    	years = 5
    }
  • set_timed_relation_flagcountry

    Sets an arbitrarily-named flag for the scoped country towards target country for a set duration

    set_timed_relation_flag = {
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	who = <target>
    	days/months/years = <int>
    }

    The game's own scripts use it 23 times.

    As the game uses it
    set_timed_relation_flag = {
    	flag = just_encountered
    	who = from
    	days = 5
    }
  • set_trade_conversionscountry

    Sets the trade conversions for the scoped Country. If they do not add up to 1.0 any remaining trade the country keeps as income

    set_trade_conversion = { energy = 0.5 minerals = 0.2 }

    The game's own scripts use it 9 times.

    As the game uses it
    set_trade_conversions = {
    	trade = 0.50
    	energy = 0.15
    	consumer_goods = 0.15
    	unity = 0.075
    }
  • set_trucecountry

    Force a truce with target country of a specified type, or a war

    set_truce = { target = <country/war> type = war/liberation/alliance/guarantee/none }

    The game's own scripts use it 20 times.

    As the game uses it
    set_truce = {
    	target = FROM
    	type = war
    }
  • set_tutorial_levelcountry

    Changes the scoped country's tutorial level (0 none, 1 limited, 2 full)

    set_tutorial_level = 0

    The game's own scripts use it 6 times.

    As the game uses it
    set_tutorial_level = 0
  • set_variablemegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, ambient object, species, bypass, faction, war, federation, starbase, deposit, sector, dig site, first contact, spy network, espionage operation, espionage asset, agreement, situation, astral rift, ship growth stage, colony

    Sets or creates an arbitrarily-named variable with a specific value in the current scope

    (Note: Colony doesn't store variables. Using any of the variable effects/triggers in colony scope will access variables in the colony carrier instead.)
    set_variable = { which = <string> value = <float>/<variable>/<scope.variable>/trigger:<trigger> }

    The game's own scripts use it 590 times.

    As the game uses it
    set_variable = {
    	which = market_rating
    	value = 0
    }
  • set_variable_to_random_valuemegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, ambient object, species, bypass, faction, war, federation, starbase, deposit, sector, dig site, first contact, spy network, espionage operation, espionage asset, agreement, situation, astral rift, ship growth stage, colony

    Sets a variable to a random value within the specified bounds.

    set_variable_to_random_value = { which = <some_variable> min = -100 max = 100 rounded = yes/no }

    The game's own scripts use it 23 times.

    As the game uses it
    set_variable_to_random_value = {
    	which = local_roll
    	min = 0
    	max = 1
    	rounded = no
    }
  • set_visitedcountry

    Sets the target system as 'visited' (i.e. low system intel on the map)

    set_visited = <target>

    The game's own scripts use it 47 times.

    As the game uses it
    set_visited = prev
  • set_war_goalcountry, war

    Sets a war goal to the scoped rebel country/war

    set_war_goal = { type = <key> target = <target> enemy = <target> }
  • shift_ethiccountry

    Shifts an empire towards a specific ethic, adjusting afterwards to keep number of ethics points consistent

    shift_ethic = <key>

    The game's own scripts use it 106 times.

    As the game uses it
    shift_ethic = ethic_pacifist
  • start_astral_action_cooldowncountry

    Starts the cooldown of an astral action defined with uses_custom_cooldown = yes

    start_astral_action_cooldown=<key>

    The game's own scripts use it once.

    As the game uses it
    start_astral_action_cooldown = action_flash_forge_hyper_relay
  • start_situationcountry

    Begins a situations.

    start_situation = { type = <situation_type> target = <scope> }

    The game's own scripts use it 117 times.

    As the game uses it
    start_situation = {
    	type = situation_toxify_world
    	target = root
    }
  • steal_reliccountry

    Steal all/a random/a specific relic from a target country

    steal_relic = { target = <Target Country> relic = <relic_name/all/random>

    The game's own scripts use it 3 times.

    As the game uses it
    steal_relic = {
    	target = from
    	relic = all
    }
  • steal_specimenscountry

    Steals random specimens from given country.

    steal_specimens = { who = <country> category = <category_key>/all/any count = <int>show_nofication = <yes/no> }

    The game's own scripts use it 2 times.

    As the game uses it
    steal_specimens = {
    	who = root.from
    	category = all
    	count = 1
    	show_notification = yes
    }
  • stop_missioncountry

    Stops the mission with the given status, triggering the relevant effects.

    stop_mission = { mission = <mission_key> status = success }
  • store_country_backup_datacountry

    Stores a copy of the specified data of the scoped country. The values default to 'no'.

    store_country_backup_data = {
    flag = <yes/no>
    room = <yes/no>
    name = <yes/no
    ethics = <yes/no>
    government = <yes/no>
    }

    The game's own scripts use it 6 times.

    As the game uses it
    store_country_backup_data = {
    	flag = yes
    	room = yes
    }
  • subtract_variablemegastructure, planet, country, ship, pop, pop group, fleet, system, leader, army, ambient object, species, bypass, faction, war, federation, starbase, deposit, sector, dig site, first contact, spy network, espionage operation, espionage asset, agreement, situation, astral rift, ship growth stage, colony

    Decrements a previously-set variable by a specific amount

    subtract_variable = { which = <string> value = <float>/<variable>/<scope.variable>/trigger:<trigger> }

    The game's own scripts use it 91 times.

    As the game uses it
    subtract_variable = {
    	which = fe_lab_1_build_count
    	value = 1
    }
  • transfer_galactic_defense_force_fleetscountry

    Moves all owned GDF fleets to the target.

    transfer_galactic_defense_force_fleets = <target>

    The game's own scripts use it 2 times.

    As the game uses it
    transfer_galactic_defense_force_fleets = root
  • transfer_resources_to_empirecountry

    Transfers the scoped country's stockpile of each listed resource to another country:

    transfer_resources_to_empire = {
    	target = <country scope>
    	resources = { minerals energy ... }
    	percentage = 0.5/variable (optional: share of each stockpile to transfer, clamped to [0, 1]; default 1.0. Any amount above the target's storage capacity is lost, with the remainder disappearing)
    }

    The game's own scripts use it once.

  • unlock_council_selectioncountry

    Unlocks council selection

    unlock_council_selection = yes

    The game's own scripts use it 2 times.

    As the game uses it
    unlock_council_selection = yes
  • unlock_council_slotscountry

    Unlocks council slots

    unlock_council_slots = 1

    The game's own scripts use it 10 times.

    As the game uses it
    unlock_council_slots = 1
  • unlock_exhibitcountry

    Unlocks an exhibit for given category from the target country.

    unlock_exhibit = <category>

    The game's own scripts use it 3 times.

    As the game uses it
    unlock_exhibit = xeno_geology
  • weighted_random_owned_pop_groupplanet, country, ship, system, faction, sector, colony

    Weighted random on owned popgroups based on the popgroup size. Supports the same scopes as the owned_pop_group script list

    The game's own scripts use it 141 times.

    As the game uses it
    weighted_random_owned_pop_group = {
    	limit = {
    		is_organic_species = yes
    	}
    	kill_single_pop = yes
    }
  • wincountry

    The scoped country wins the game

    win = yes

    The game's own scripts use it 7 times.

    As the game uses it
    win = yes

Planets

  • add_blockerplanet, ship, colony

    Adds a blocker to a colony carrier, with some control over what it is set to block (add_deposit will add a random planetary deposit to block)

    add_blocker = {
    	type = <key>
    	blocked_deposit = none (default)/<deposit scope - copies the type to the blocked deposit but any flags or variables are lost>/random
    }

    The game's own scripts use it 101 times.

    As the game uses it
    add_blocker = {
    	type = d_toxic_kelp
    	blocked_deposit = none
    }
  • add_buildingplanet, ship, colony

    Adds a specific building on the scoped colony

    add_building = <key>
    or
    	add_building = {
    		district = <district_type_key>
    		zone = <zone_type_key>
    		building = <building_type_key>
    	}

    The game's own scripts use it 552 times. Building IDs →

    As the game uses it
    add_building = {
    	district = district_ark_city
    	zone = zone_research
    	building = building_fe_lab_2
    }
  • add_colony_progressplanet

    Adds to ongoing colonization progress on the scoped planet

    add_colony_progress = <0.0-1.0>
  • add_depositplanet, ship, astral rift, colony

    Adds resource deposit to the scoped object (note: if you add a blocker, it will add a random deposit that can be blocked by that deposit)

    add_deposit = <key/random/random_blocker/random_nonblocker>

    The game's own scripts use it 1,868 times. Deposit IDs →

    As the game uses it
    add_deposit = d_energy_3
  • add_deposit_category_effectplanet

    Adds random non-blocker resource deposit to the scoped planet of a certain category

    add_deposit_category_effect = <category>
  • add_districtplanet, ship, colony

    Adds a specific district on the scoped colony

    add_district = <key>
    or
    add_district = {
    	district_type = <key>
    	ignore_cap = <yes/no> #default no
    	type_conversion = <yes/no> #default no
    }

    The game's own scripts use it 213 times. District IDs →

    As the game uses it
    add_district = {
    	district_type = district_city
    	ignore_cap = yes
    }
  • add_holdingplanet, ship, colony

    Adds a specific holding on the scoped colony

    add_holding = { holding = <key> owner = <owner> }

    The game's own scripts use it once.

    As the game uses it
    add_holding = {
    	holding = holding_garrison
    	owner = event_target:overlord_empire
    }
  • add_planet_devastationplanet, ship, colony

    Instantly adds devastation to scoped planet

    add_planet_devastation = 5

    The game's own scripts use it 104 times.

    As the game uses it
    add_planet_devastation = 5
  • add_random_non_blocker_depositplanet

    Adds random non-blocker resource deposit to the scoped planet

    add_random_non_blocker_deposit = yes

    The game's own scripts use it once.

    As the game uses it
    add_random_non_blocker_deposit = yes
  • add_terraform_progressplanet, ship

    Adds terraforming progress to scoped planet, finishes the terraformation, if enough progress is reached

    The game's own scripts use it 4 times.

    As the game uses it
    add_terraform_progress = 0.1
  • add_terraformation_total_time_multplanet, ship

    Adds a percentage to the total time of the current terraforminog process on the planet

    terraformation_total_time_mult = <value>

    The game's own scripts use it once.

    As the game uses it
    add_terraformation_total_time_mult = 0.25
  • add_zoneplanet, ship, colony

    Adds zone to the district of the colony

    add_zone = {
    		district = <district_type_key/district_slot_index>
    		zone = <zone_type_key>
    		zone_slot = <zone_slot_index>
    		replace = <yes/no>
    	}

    The game's own scripts use it 126 times.

    As the game uses it
    add_zone = {
    	district = 0
    	zone = zone_central_spire
    	zone_slot = 1
    	replace = yes
    }
  • cancel_terraformationplanet, ship

    Cancels terraformation of the scoped planet

    cancel_terraformation = yes
  • carrier_eventplanet, ship, colony

    Fires a colony carrier event for the scoped carrier, with optional DAYS and RANDOM delay

    carrier_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay, capped at value)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }

    The game's own scripts use it 941 times.

    As the game uses it
    carrier_event = {
    	id = aquatics.170
    	days = 5400
    	random = 360
    }
  • change_colony_foundation_dateplanet

    Changes the colony foundation date (affecting on_colony_X_years pulses) by a specific number of days. Use with care, you can probably break things with this!

    change_colony_foundation_date = <+/- int>

    The game's own scripts use it 4 times.

    As the game uses it
    change_colony_foundation_date = -461
  • change_pcplanet, ship, colony

    Changes the class of the scoped planet

    change_pc = <class/random list>
    change_pc = { class = <class/random list> inherit_entity = yes }

    The game's own scripts use it 377 times. Planet class IDs →

    As the game uses it
    change_pc = pc_arid
  • change_planet_sizeplanet, ship, colony

    Increases or reduces the size of the scoped planet by a specified amount

    change_planet_size = <+/- int>

    The game's own scripts use it 20 times.

    As the game uses it
    change_planet_size = 1
  • check_planet_employmentplanet, ship, colony

    Immediately runs a job evaluation on the colony, firing and employing pops as needed

    check_planet_employment = yes

    The game's own scripts use it 9 times.

    As the game uses it
    check_planet_employment = yes
  • clear_blockerdeposit

    Clears scoped deposit blocker and fires its on_cleared effect

    clear_blocker = yes

    The game's own scripts use it 34 times.

    As the game uses it
    clear_blocker = yes
  • clear_blockersplanet, ship, colony

    Removes all blockers from the scoped planet

    clear_blockers = yes

    The game's own scripts use it 87 times.

    As the game uses it
    clear_blockers = yes
  • clear_depositsplanet, ship, colony

    Removes all deposits from the scoped colony carrier

    clear_deposits = yes

    The game's own scripts use it 565 times.

    As the game uses it
    clear_deposits = yes
  • clear_planet_modifiersplanet, ship, colony

    Clear modifiers on target planet

    clear_planet_modifiers = yes

    The game's own scripts use it 155 times.

    As the game uses it
    clear_planet_modifiers = yes
  • clear_planet_purge_typeplanet, ship, colony

    Clears the purge type for the entire planet

    clear_planet_purge_type = yes

    The game's own scripts use it 13 times.

    As the game uses it
    clear_planet_purge_type = yes
  • close_branch_officeplanet, ship, colony

    Close branch office on scoped planet

    close_branch_office = yes

    The game's own scripts use it 15 times.

    As the game uses it
    close_branch_office = yes
  • colony_eventcolony

    Fires a colony event for the scoped colony, with optional DAYS and RANDOM delay

    colony_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay, capped at value)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }

    The game's own scripts use it 20 times.

    As the game uses it
    colony_event = {
    	id = akx.9100
    	days = 320
    	random = 40
    }
  • conquerplanet

    Conquers the planet by setting its owner to target country and adding an unhappiness modifier

    conquer = <target country>

    The game's own scripts use it once.

    As the game uses it
    conquer = root
  • create_archaeological_sitemegastructure, planet, ship, fleet, system, ambient object, starbase, debris, astral rift, colony

    Creates a archaeological site associated with the scope object

    create_archaeological_site = <site type>

    The game's own scripts use it 84 times.

    As the game uses it
    create_archaeological_site = random
  • create_armyplanet, ship, colony

    Creates a new army

    create_army = {
    	name = <string>
    	owner = <target>
    	species = <target>/random
    	type = <key>
    }

    The game's own scripts use it 141 times.

    As the game uses it
    create_army = {
    	name = random
    	owner = root
    	species = root
    	type = clone_army
    }
  • create_colonyplanet, ship

    Creates a colony on the scoped planet

    create_colony = {
    	owner = <target>
    	species = <target / key>
    	ethos = <random / target / { ethic = <key> ethic = <key> }>
    }

    The game's own scripts use it 27 times.

    As the game uses it
    create_colony = {
    	owner = root
    	species = root.species
    	ethos = owner
    }
  • create_cosmic_storm_influence_fieldplanet, ship, starbase, colony

    Creates a storm influence field in a certain radius

    radius = <float>

    The game's own scripts use it 3 times.

  • create_mining_stationplanet, astral rift

    Creates a mining station in orbit of the scoped planet or astral rift

    create_mining_station = { owner = <target> }

    The game's own scripts use it 43 times.

    As the game uses it
    create_mining_station = {
    	owner = root
    }
  • create_pop_groupplanet, ship, colony

    Creates a new pop group based on an existing one with overrides. If no existing pop group is passed, species is mandatory.

    create_pop_group = {
    	pop_group = <base pop group> (optional; if omitted, species is required)
    	species = last_created / <target> / random (optional; if omitted, base pop group is required)
    	ethos = { ethic = <key> } / random (optional; if no base group and no ethic is provided, ethos will be randomized)
    	category = <pop category> (optional; if omitted and no base group is defined, use category from first assigned job)
    	size = <number> (optional, default: POP_BULK_UNIT_SIZE)
    	random = <number> (optional) If set, the amount will be randomized in [max(0, size - random), size + random].
    	growth_category = <key> (optional, default: 'GROWTH_CAT_OTHER')
    	effect = <init effect> (optional)
    }

    The game's own scripts use it 380 times.

    As the game uses it
    create_pop_group = {
    	size = 400
    	species = owner_main_species
    }
  • create_rebelsplanet, ship, colony

    Creates a rebellion

    create_rebels = {
    	name = <random / string>
    	authority = <random / key>
    	civics = random / { civic = <key> civic = random }
    	species = <target>
    	ethos = <random / { ethic = <key> ethic = <key> }
    }

    The game's own scripts use it 5 times.

  • create_research_stationplanet, astral rift

    Creates a research station in orbit of the scoped planet or astral rift

    create_research_station = { owner = <target> }

    The game's own scripts use it 24 times.

    As the game uses it
    create_research_station = {
    	owner = root
    }
  • create_sectorplanet, ship, colony

    Creates a sector with the scoped colony as capital, if it's not already within a sector

    create_sector = yes

    The game's own scripts use it once.

    As the game uses it
    create_sector = yes
  • create_starbaseplanet, system

    Creates a starbase in orbit of the star of the scoped galactic object

    create_starbase = {
    	owner = <target>
    	size = <ship_size>
    	design=<starbase global design>s
    	module = <starbase_module>
    	building = <starbase_building>
    	effect = { ... }
    }

    The game's own scripts use it 106 times.

    As the game uses it
    create_starbase = {
    	size = orbital_ring_tier_1
    	owner = FROM
    	effect = { }
    }
  • destroy_colonyplanet, ship, colony

    Destroys the colony on the scoped carrier

    destroy_colony = yes

    The game's own scripts use it 77 times.

    As the game uses it
    destroy_colony = yes
  • destroy_cosmic_storm_influence_fieldplanet, starbase

    Destroys a storm influence field with center

    center = <target>
  • disable_buildingplanet, ship, colony

    Disables a single instance of a specific building on the scoped colony

    disable_building = <building_type_key>
  • establish_branch_officeplanet, ship, colony

    Establish branch office on scoped planet for target country

    establish_branch_office = <target>

    The game's own scripts use it 2 times.

    As the game uses it
    establish_branch_office = root
  • finish_terraformationplanet, ship

    Finishes the current terraforming process on the planet

    finish_terraformation = yes

    The game's own scripts use it 3 times.

    As the game uses it
    finish_terraformation = yes
  • planet_eventplanet

    Fires a planet event for the scoped planet, with optional DAYS and RANDOM delay

    planet_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay, capped at value)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }

    The game's own scripts use it once. Event IDs →

    As the game uses it
    planet_event = {
    	id = distar.257
    	days = 90
    }
  • prevent_anomalyplanet

    Disables or enables anomaly generation for the scoped planet

    prevent_anomaly = yes

    The game's own scripts use it 541 times.

    As the game uses it
    prevent_anomaly = yes
  • remove_all_armiesplanet, ship, colony

    Removes all armies on scoped colony

    remove_all_armies = yes

    The game's own scripts use it 4 times.

    As the game uses it
    remove_all_armies = yes
  • remove_all_buildingsplanet, ship, colony

    Removes all buildings from the scoped colony

    remove_all_buildings = yes

    The game's own scripts use it 34 times.

    As the game uses it
    remove_all_buildings = yes
  • remove_all_districtsplanet, ship, colony

    Removes all districts from the scoped colony

    remove_all_districts = yes

    The game's own scripts use it 7 times.

    As the game uses it
    remove_all_districts = yes
  • remove_buildingplanet, ship, colony

    Removes a single instance of a specific building from the scoped colony

    remove_building = <building_type_key>

    The game's own scripts use it 72 times.

    As the game uses it
    remove_building = building_capital
  • remove_carrier_flagplanet, ship, colony

    Removes a flag from the scoped colony carrier

    remove_carrier_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 215 times.

    As the game uses it
    remove_carrier_flag = boosted_once
  • remove_depositplanet, ship, deposit, astral rift, colony

    Remove resource deposit on the scoped colony carrier or deposit, does not fire on_cleared if used on a blocker

    remove_deposit = <key/yes>

    The game's own scripts use it 141 times. Deposit IDs →

    As the game uses it
    remove_deposit = yes
  • remove_deposit_flagdeposit

    Removes a flag from the scoped deposit

    remove_deposit_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • remove_districtplanet, ship, colony

    Removes a specific district from the scoped colony

    remove_district = <key>

    The game's own scripts use it 13 times.

    As the game uses it
    remove_district = district_city
  • remove_holdingplanet, ship, colony

    Removes a specific holding from the scoped planet

    remove_holding = { holding = <key> owner = <owner> }

    The game's own scripts use it 2 times.

    As the game uses it
    remove_holding = {
    	holding = holding_idyllic_bloom
    	owner = root
    }
  • remove_planetplanet, ship, colony

    Removes the planet from the scope

    remove_planet = yes

    The game's own scripts use it 42 times.

    As the game uses it
    remove_planet = yes
  • remove_planet_flagplanet, ship, colony

    Removes a flag from the scoped planet. Also valid in colony/carrier/ship scope, where it removes from the colony carrier's flags.

    remove_planet_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 132 times.

    As the game uses it
    remove_planet_flag = being_devoured
  • remove_random_buildingplanet

    Removes last built building from the scoped planet

    remove_random_building = yes
  • remove_random_districtplanet, ship, colony

    Removes a random district from the scoped planet. Bigger district is more likely to be removed.

    remove_random_district = yes

    The game's own scripts use it 2 times.

    As the game uses it
    remove_random_district = yes
  • remove_zoneplanet, ship, colony

    Removes a zone from the district of the colony

    remove_zone = {
    		district = <district_type_key/district_slot_index>
    		zone = <zone_type_key>
    		zone_slot = <zone_slot_index>
    		all = <yes/no>
    	}
  • repair_all_buildingsplanet, ship, colony

    Repairs all ruined buildings on the scoped planet

    repair_all_buildings = yes
  • repair_buildingplanet, ship, colony

    Repairs a single instance of a specific building on the scoped colony

    repair_building = <building_type_key>
  • reroll_depositsplanet, ship, colony

    Rebuild resource deposits on target colony carrier

    reroll_deposits = yes

    The game's own scripts use it 32 times.

    As the game uses it
    reroll_deposits = yes
  • reroll_planet_modifiersplanet, ship, colony

    Rebuild modifiers on target planet

    reroll_planet_modifiers = yes

    The game's own scripts use it 5 times.

    As the game uses it
    reroll_planet_modifiers = yes
  • ruin_buildingplanet, ship, colony

    Ruins a single instance of a specific building on the scoped colony

    ruin_building = <building_type_key>/random_no_capital

    The game's own scripts use it 17 times.

    As the game uses it
    ruin_building = random_no_capital
  • select_decisionplanet, ship, colony

    Selects a decision on a colony carrier

    The game's own scripts use it 4 times.

    As the game uses it
    select_decision = {
    	name = decision_hunker_down
    }
  • set_capitalplanet, ship, colony

    Sets the scoped planet to be the capital of its owner country

    set_capital = yes

    The game's own scripts use it 44 times.

    As the game uses it
    set_capital = yes
  • set_carrier_flagplanet, ship, colony

    Sets an arbitrarily-named flag on the scoped colony carrier

    (Note: Colony doesn't store flags. Using any of the carrier_flag effects/triggers in colony scope will access flags in the colony carrier instead.)
    set_carrier_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 519 times.

    As the game uses it
    set_carrier_flag = has_orbital
  • set_colony_typeplanet, ship, colony

    Sets the colony's designation type

    set_colony_type = <colony type>

    The game's own scripts use it 9 times.

    As the game uses it
    set_colony_type = col_city
  • set_controllerplanet, ship, fleet, colony

    Instantly sets the planet/fleet's controller to target country. If the fleet is a starbase, starts occupation, otherwise the fleet is leased out.

    set_controller = <target>

    The game's own scripts use it 49 times.

    As the game uses it
    set_controller = root
  • set_depositplanet, ship, colony

    Replaces resource deposit on the scoped planet

    set_deposit = <key/random>

    The game's own scripts use it 181 times.

    As the game uses it
    set_deposit = d_alloys_1
  • set_deposit_flagdeposit

    Sets an arbitrarily-named flag on the scoped deposit

    set_deposit_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 43 times.

    As the game uses it
    set_deposit_flag = planet@event_target:target_planet
  • set_ownermegastructure, planet, ship, fleet, leader, army, starbase, colony

    Instantly sets the owner of the scoped object to target country

    set_owner = <target>

    The game's own scripts use it 275 times.

    As the game uses it
    set_owner = root
  • set_planet_entityplanet, ship

    Change entity of a planet.

    set_planet_entity = {
    	entity = <name of entity>
    	graphical_culture = <target or name of culture>
    	picture = <picture override>
    	atmosphere_color = <color from 3 components>
    	atmosphere_intensity = <0.0 - 1.0>
    	atmosphere_width = <0.0 - 1.0> 
    }

    The game's own scripts use it 99 times.

    As the game uses it
    set_planet_entity = {
    	entity = city_planet_entity
    	graphical_culture = owner
    }
  • set_planet_flagplanet, ship, colony

    Sets an arbitrarily-named flag on the scoped planet. Also valid in colony/carrier/ship scope, where it writes the colony carrier's flags.

    set_planet_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 497 times.

    As the game uses it
    set_planet_flag = precursor_world
  • set_planet_nameplanet

    Sets the name of the current planet.

    set_planet_name = "name"
  • set_planet_purge_typeplanet, ship, colony

    Sets the purge type for the entire planet

    set_planet_purge_type = <type>

    The game's own scripts use it 14 times.

    As the game uses it
    set_planet_purge_type = purge_normal
  • set_planet_sizeplanet, ship, colony

    Sets the planet size to a specified number

    set_planet_size = <int>

    The game's own scripts use it 16 times.

    As the game uses it
    set_planet_size = 6
  • set_planetary_ascension_tierplanet, ship, colony

    Sets the colony's ascension tier to the specified value

    set_planetary_ascension_tier = 3

    The game's own scripts use it 5 times.

    As the game uses it
    set_planetary_ascension_tier = 0
  • set_ringplanet, ship

    Adds or removes a planetary ring around the scoped planet

    set_ring = no

    The game's own scripts use it 3 times.

    As the game uses it
    set_ring = yes
  • set_sector_capitalplanet, ship, colony

    Sets the scoped colony to be the capital of the sector it is part of. If used in the capital sector, it will shift the empire capital. Warning: Experimental, may have unintended consequences.

    set_sector_capital = yes
  • set_surveyedplanet, ship, system, astral rift

    Sets the colony carrier/astral rift or system as un/surveyed by target country

    set_surveyed = { surveyed = yes surveyor = <target> }

    The game's own scripts use it 58 times.

    As the game uses it
    set_surveyed = {
    	surveyed = yes
    	surveyor = Prev
    }
  • set_system_lockedplanet, ship, colony

    Sets the system lock status for the scoped colony or carrier and cancels any current encampment or packup process

    set_system_locked = yes/no

    The game's own scripts use it 2 times.

    As the game uses it
    set_system_locked = no
  • set_terraform_progressplanet, ship

    Sets terraforming progress of scoped planet, finishes the terraformation, if enough progress is reached

  • set_timed_carrier_flagplanet, ship, colony

    Sets an arbitrarily-named flag on the scoped colony carrier for a set duration

    set_timed_carrier_flag = { 
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }

    The game's own scripts use it 122 times.

    As the game uses it
    set_timed_carrier_flag = {
    	flag = recent_parade
    	years = 40
    }
  • set_timed_deposit_flagdeposit

    Sets an arbitrarily-named flag on the scoped deposit for a set duration

    set_timed_deposit_flag = { 
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }
  • set_timed_planet_flagplanet, ship, colony

    Sets an arbitrarily-named flag on the scoped planet for a set duration. Also valid in colony/carrier/ship scope, where it writes the colony carrier's flags.

    set_timed_planet_flag = { 
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }

    The game's own scripts use it 18 times.

    As the game uses it
    set_timed_planet_flag = {
    	flag = devolved_planet
    	days = 360
    }
  • spawn_systemmegastructure, planet, ship, fleet, system, starbase, no scope, colony

    Spawns a new system at a position relative to the scoped object.

    spawn_system = { min_jumps = <value> max_jumps = <value> min_distance = <int 0-100> max_distance = <int 0-100> initializer = <key for pre-defined system>/random hyperlane=<yes/no> is_discovered=<yes/no>}

    The game's own scripts use it 110 times.

    As the game uses it
    spawn_system = {
    	initializer = random
    	effect = {
    		find_or_spawn_reckoning_planet = yes
    	}
    }
  • start_colonyplanet, ship

    Starts colonization of the scoped planet

    start_colony = {
    	owner = <target>
    	species = <target / key>
    	ethos = <random / target / { ethic = <key> ethic = <key> }>
    }

    The game's own scripts use it once.

    As the game uses it
    start_colony = {
    	owner = event_target:new_planet_owner
    	species = event_target:new_planet_owner.species
    }
  • start_terraform_processplanet, ship, colony

    Starts terraforming process of scoped planet

    start_terraform_process = <class/random list>
    start_terraform_process = { class = <class/random list> inherit_entity = yes }

    The game's own scripts use it 6 times.

    As the game uses it
    start_terraform_process = pc_arid
  • start_terraform_progressplanet, ship, colony

    Starts terraforming progress of scoped planet

    start_terraform_progress = <class/random list>
    start_terraform_progress = { class = <class/random list> inherit_entity = yes }

    The game's own scripts use it once.

    As the game uses it
    start_terraform_progress = {
    	class = pc_volcanic
    	required_progress = 20
    }
  • steal_planet_outputplanet

    Steals resource output from a planet and gives it to a target empire or stockpile.

    steal_planet_output = { planet = <target> who = <country or ship scope> resource = <key|group|all> max_amount = <value> percentage = <value|scripted_value> mode = <duplicate|steal> (default: steal) notification_mode = <none|thief_only|both> (default: thief_only) show_in_monthly_resources_mode = <none|thief_only|both> (default: thief_only) }
    resource groups: basic, advanced, strategic, rare, other, research, material (material = basic + advanced + strategic + rare)

    The game's own scripts use it once.

  • stop_terraform_processplanet, ship, colony

    Stops terraforming process of scoped planet

    The game's own scripts use it 5 times.

    As the game uses it
    stop_terraform_process = yes
  • trigger_megastructure_iconplanet

    if a planet has trigger_megastructure_icon = yes then the map icon for the star will show a megastructure icon

  • validate_and_repair_planet_buildings_and_districtsplanet, ship, colony

    Replace/removes all invalid (potential trigger not fulfilled) buildings and districts, then repairs all ruined buildings on the scoped colony

    validate_and_repair_planet_buildings_and_districts = yes

    The game's own scripts use it 4 times.

    As the game uses it
    validate_and_repair_planet_buildings_and_districts = yes
  • validate_planet_buildings_and_districtsplanet, ship, colony

    Checks whether the planets and districts on the planet are valid (their potential triggers are fulfilled), removes or replaces them if not.

    validate_planet_buildings_and_districts = yes

    The game's own scripts use it 17 times.

    As the game uses it
    validate_planet_buildings_and_districts = yes

Pops and species

  • add_pop_amountpop group

    Adds the amount of pops to the scope pop group.

    add_pop_amount = <num>
    OR
    	add_pop_amount = {
    		amount = <number>
    		random = <number> The amount will be randomized in [max(0, size - random), size + random].
    		growth_category = <key> (optional, default: 'GROWTH_CAT_OTHER')
    	}

    The game's own scripts use it 2 times.

    As the game uses it
    add_pop_amount = {
    	amount = root.local_pop_amount
    }
  • change_species_characteristicsspecies

    Changes the characteristics of a species

    change_species_characteristics = {
    	sapient = <Y/N, determines if species is pre-sapient>
    	immortal = <Y/N, determines if species leaders are immortal>
    	can_be_modified = <Y/N, determines if the species can be modified>
    	add_trait = <key> # optional, can specify multiple
    	remove_trait = <key> # optional, can specify multiple
    	add_traits_at_start_of_list = yes # optional, pushes out other traits if needed
    	portrait = <key/species/leader event target, limits >
    	gender = <any/male/female/leader event target, limits species to this gender or removes limit if 'any'>
    	can_change_leader = <Y/N, apply portrait and gender (randomizes new name) changes to existing leaders>

    The game's own scripts use it 70 times.

    As the game uses it
    change_species_characteristics = {
    	add_trait = trait_adaptive_mutations
    	add_traits_at_start_of_list = yes
    }
  • change_species_portraitspecies

    Changes the portrait of the species in scope.

    change_species_portrait = <key or species event target>
  • displace_pop_amountpop group

    Raises on_pop_displaced on_action

    displace_pop_amount = {
    	amount = <amount> OR percentage = <percentage>
    	random = <number> (optional) If set, the amount will be randomized in [max(0, size - random), size + random].
    }

    The game's own scripts use it 3 times.

    As the game uses it
    displace_pop_amount = {
    	amount = 100
    	random = 10
    }
  • force_faction_evaluationpop group

    Forces target pop group to immediately evaluate their attraction to various pop factions

    force_faction_evaluation = yes

    The game's own scripts use it 5 times.

    As the game uses it
    force_faction_evaluation = yes
  • kill_assigned_pop_amountpop, job

    Instantly destroys part of the assigned pops to this job

    kill_assigned_pop_amount = {
    	limit = { <triggers> }
    	amount = <amount killed> OR percentage = <percentage killed>
    	random = <number> (optional)
    	growth_category = <key> (optional, default: 'GROWTH_CAT_OTHER')
    }

    The game's own scripts use it 13 times.

    As the game uses it
    kill_assigned_pop_amount = {
    	amount = 1
    }
  • mutate_speciesspecies

    Randomly mutate a species.

    mutate_species = yes

    The game's own scripts use it 2 times.

    As the game uses it
    mutate_species = yes
  • pop_change_ethicpop group

    Changes scoped pop group to chosen ethic.

    pop_change_ethic = {
    	ethic = <key>
    	amount = <amount> OR percentage = <percentage>
    	random = <number> (optional) If set, the amount will be randomized in [max(0, size - random), size + random].
    }
  • pop_faction_eventfaction

    Fires a pop faction event for the scoped pop faction, with optional DAYS and RANDOM delay

    pop_faction_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay from 0 to value, which is added on to the 'days' delay)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }

    The game's own scripts use it 12 times.

    As the game uses it
    pop_faction_event = {
    	id = factions.0
    }
  • pop_force_add_ethicpop group

    Adds a specific ethic to the scoped pop group regardless if pop-species allows ethic divergence or not.

    pop_force_add_ethic = {
    	ethic = <key>
    	amount = <amount> OR percentage = <percentage>
    	random = <number> (optional) If set, the amount will be randomized in [max(0, size - random), size + random].
    }

    The game's own scripts use it 3 times.

  • pop_force_remove_ethicpop group

    Removes an amount of pops from an ethic and redistribute these to any other

    pop_force_remove_ethic = {
    	ethic = <key>
    	amount = <amount> OR percentage = <percentage>
    	random = <number> (optional) If set, the amount will be randomized in [max(0, size - random), size + random].
    }

    The game's own scripts use it 2 times.

    As the game uses it
    pop_force_remove_ethic = {
    	ethic = ethic_materialist
    	percentage = 1
    }
  • pop_force_transfer_ethicpop group

    Transfers an amount of pops from an ethic to another

    pop_force_transfer_ethic = {
    	new_ethic = <key>
    	old_ethic = <key>
    	amount = <amount> OR percentage = <percentage>
    	random = <number> (optional) If set, the amount will be randomized in [max(0, size - random), size + random].
    }

    The game's own scripts use it 2 times.

  • pop_group_eventpop group

    Fires a pop group event for the scoped pop group, with optional DAYS and RANDOM delay

    pop_group_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay from 0 to value, which is added on to the 'days' delay)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }

    The game's own scripts use it 5 times. Event IDs →

    As the game uses it
    pop_group_event = {
    	id = refugees.1
    }
  • pop_remove_ethicpop group

    Removes a specific ethic from the scoped pop

    pop_remove_ethic = {
    	ethic = <key>
    	amount = <amount> OR percentage = <percentage>
    	random = <number> (optional) If set, the amount will be randomized in [max(0, size - random), size + random].
    }
  • remove_pop_amountpop group

    Removes the amount of pops from the scope pop group.

    remove_pop_amount = <num>
    OR
    	remove_pop_amount = {
    		amount = <number>
    		random = <number> The amount will be randomized in [max(0, size - random), size + random].
    		growth_category = <key> (optional, default: 'GROWTH_CAT_OTHER')
    	}

    The game's own scripts use it 6 times.

    As the game uses it
    remove_pop_amount = 5
  • remove_pop_faction_flagfaction

    Removes a flag from the scoped pop faction

    remove_pop_faction_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it once.

    As the game uses it
    remove_pop_faction_flag = promoted_faction
  • remove_pop_flagpop

    Removes a flag from the scoped pop

    remove_pop_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • remove_pop_group_flagpop group

    Removes a flag from the scoped pop group

    remove_pop_group_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 4 times.

    As the game uses it
    remove_pop_group_flag = event_purge
  • remove_species_flagspecies

    Removes a flag from the scoped species

    remove_species_flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 20 times.

    As the game uses it
    remove_species_flag = trait_exd
  • rename_speciesspecies

    Renames the species.

    rename_species = { 
    	use one of the following:
    	name = "an entry within the species name database"
    	name = random
    	name_list = "key"
    }
  • sacrifice_assigned_pop_amountpop, job

    Instantly sacrifices part of the assigned pops to this job

    sacrifice_assigned_pop_amount = {
    	limit = { <triggers> }
    	amount = <amount sacrificed> OR percentage = <percentage sacrificed>
    }

    The game's own scripts use it 2 times.

    As the game uses it
    sacrifice_assigned_pop_amount = {
    	percentage = 1
    }
  • scale_pop_amountpop group

    Scales the amount of pops in the scope pop group

    scale_pop_amount = <value>
  • set_citizenship_typepop, pop group, leader, species

    Set citizenship type for scoped species/pop group/leader

    set_citizenship_type = { country = <target> type = citizenship_full cooldown = yes }

    The game's own scripts use it 45 times.

    As the game uses it
    set_citizenship_type = {
    	country = ROOT
    	type = citizenship_full
    	cooldown = yes
    }
  • set_colonization_controlspop, pop group, leader, species

    Set colonization control for scoped species/pop group/leader

    set_colonization_controls = { country = <target> type = yes/no cooldown = yes }

    The game's own scripts use it 3 times.

    As the game uses it
    set_colonization_controls = {
    	country = ROOT
    	type = colonization_control_no
    	cooldown = yes
    }
  • set_faction_extortedfaction

    Sets the scope faction as extorted and removes extortion from any other ones

    set_faction_extorted = <yes|no>

    The game's own scripts use it 61 times.

    As the game uses it
    set_faction_extorted = no
  • set_habitability_traitspecies

    Set planet preference trait for scoped species (removing the current one, if any).

    set_habitability_trait = { trait = <trait> }

    The game's own scripts use it 6 times.

    As the game uses it
    set_habitability_trait = {
    	trait = trait_auto_hab_preference
    }
  • set_living_standardpop, pop group, leader, species

    Set living standard for scoped species/pop group/leader

    set_living_standard = { country = <target> type = living_standard_good cooldown = yes }

    The game's own scripts use it 15 times.

    As the game uses it
    set_living_standard = {
    	country = root.owner
    	type = living_standard_hive_mind
    	cooldown = no
    }
  • set_migration_controlspop, pop group, leader, species

    Set migration control for scoped species/pop group/leader

    set_migration_controls = { country = <target> type = yes/no cooldown = yes }

    The game's own scripts use it once.

    As the game uses it
    set_migration_controls = {
    	country = root.owner
    	type = migration_control_no
    	cooldown = no
    }
  • set_military_service_typepop, pop group, leader, species

    Set military service type for scoped species/pop group/leader

    set_military_service_type = { country = <target> type = military_service_full cooldown = yes }

    The game's own scripts use it 4 times.

    As the game uses it
    set_military_service_type = {
    	country = ROOT
    	type = military_service_full
    	cooldown = yes
    }
  • set_pop_factionpop, pop group

    Sets a ratio of the scoped pop group to belong to a specific pop faction

    set_pop_faction = {
    	faction = <target>
    	ratio = <value (0-1)>
    }
  • set_pop_faction_flagfaction

    Sets an arbitrarily-named flag on the scoped pop faction

    set_pop_faction_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 2 times.

    As the game uses it
    set_pop_faction_flag = promoted_faction
  • set_pop_flagpop

    Sets an arbitrarily-named flag on the scoped pop

    set_pop_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • set_pop_group_flagpop group

    Sets an arbitrarily-named flag on the scoped pop group

    set_pop_group_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 6 times.

    As the game uses it
    set_pop_group_flag = b_worlder
  • set_population_controlspop, pop group, leader, species

    Set population control for scoped species/pop group/leader

    set_population_controls = { country = <target> type = yes/no cooldown = yes }

    The game's own scripts use it 4 times.

    As the game uses it
    set_population_controls = {
    	country = prev.owner
    	type = population_control_no
    	cooldown = no
    }
  • set_purge_typepop, pop group, leader, species

    Set purge type for scoped species/pop group/leader

    set_purge_type = { country = <target> type = purge_full cooldown = yes }

    The game's own scripts use it once.

    As the game uses it
    set_purge_type = {
    	type = purge_displacement
    	country = prev
    }
  • set_slavery_typepop, pop group, leader, species

    Set slavery type for scoped species/pop group/leader

    set_slavery_type = { country = <target> type = slavery_livestock cooldown = yes }

    The game's own scripts use it 3 times.

    As the game uses it
    set_slavery_type = {
    	type = slavery_domestic
    	country = prev
    }
  • set_species_flagspecies

    Sets an arbitrarily-named flag on the scoped species

    set_species_flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 30 times.

    As the game uses it
    set_species_flag = trait_exd
  • set_species_homeworldspecies

    Defines a homeworld for the current species.

    set_species_homeworld = <target planet>

    The game's own scripts use it 9 times.

    As the game uses it
    set_species_homeworld = prevprev
  • set_species_identityspecies

    Sets the current species scopes identity to match the target scopes making them evaluate as the same species in is_same_species trigger.

    set_species_identity = new/<target species>
  • set_timed_pop_faction_flagfaction

    Sets an arbitrarily-named flag on the scoped pop faction for a set duration

    set_timed_pop_faction_flag = {
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days = <int>
    }
  • set_timed_pop_flagpop

    Sets an arbitrarily-named flag on the scoped pop for a set duration

    set_timed_pop_flag = {
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }
  • set_timed_pop_group_flagpop group

    Sets an arbitrarily-named flag on the scoped pop group for a set duration

    set_timed_pop_group_flag = {
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }

    The game's own scripts use it 4 times.

    As the game uses it
    set_timed_pop_group_flag = {
    	flag = changed_pop
    	days = 2
    }
  • set_timed_species_flagspecies

    Sets an arbitrarily-named flag on the scoped species for a set duration

    set_timed_species_flag = { 
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }

    The game's own scripts use it once.

    As the game uses it
    set_timed_species_flag = {
    	flag = primitive_species
    	years = 10
    }

Leaders

  • add_ageleader

    Adds the age of the scoped leader

    add_age = <int>

    The game's own scripts use it 10 times.

    As the game uses it
    add_age = -5
  • add_experienceleader

    Adds a sum of experience points to the scoped leader

    add_experience = 200

    The game's own scripts use it 117 times.

    As the game uses it
    add_experience = 10
  • add_skillleader

    Adds to the scoped leader's skill level

    add_skill = 2

    The game's own scripts use it 8 times.

    As the game uses it
    add_skill = 1
  • add_skill_without_trait_selectionleader

    Adds to the scoped leader's skill level but does not select any traits

    add_skill_without_trait_selection = 2

    The game's own scripts use it 14 times.

    As the game uses it
    add_skill_without_trait_selection = 1
  • add_timed_traitleader

    Adds a specific trait to the scoped leader for a specific duration

    add_timed_trait = { trait = <trait> days/months/years = <value>/<variable> }
  • add_traitleader

    Adds a specific trait to the scoped leader or a random common/negative trait

    add_trait = <trait>/random_common/random_negative
    or
    add_trait = {
    	trait = <trait>/random_common/random_negative
    	consume_selection = yes/no (if yes and leader has unspent trait selections, consume one of them; default: no)
    	show_message = yes/no (default: yes)
    }

    The game's own scripts use it 666 times. Leader trait IDs →

    As the game uses it
    add_trait = {
    	trait = leader_trait_scout
    	show_message = no
    	consume_selection = yes
    }
  • change_background_ethicleader

    Changes the background ethic of a leader

    change_background_ethic = <key>
  • change_leader_classleader

    Changes the class of the leader in scope.

    change_leader_class = <leader class event target>

    The game's own scripts use it 8 times.

    As the game uses it
    change_leader_class = envoy
  • change_leader_portraitleader

    Changes the portrait of the leader in scope.

    change_leader_portrait = <key or species event target>

    The game's own scripts use it 15 times.

    As the game uses it
    change_leader_portrait = mol12
  • freeze_leader_ageleader

    Freezes the scoped leader's age. The 'no' case will disable the freeze granted by this effect.

    freeze_leader_age = yes

    The game's own scripts use it 3 times.

    As the game uses it
    freeze_leader_age = no
  • leader_eventleader

    Fires a leader event for the scoped leader

    leader_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay from 0 to value, which is added on to the 'days' delay)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }

    The game's own scripts use it 32 times. Event IDs →

    As the game uses it
    leader_event = {
    	id = bio.5002
    	days = 180
    	random = 180
    }
  • recruitableleader

    Sets scoped leader as non/recruitable

    recruitable = yes
  • remove_all_negative_traitsleader

    Removes all negative traits from the scoped leader

    remove_all_negative_traits = yes

    The game's own scripts use it 7 times.

    As the game uses it
    remove_all_negative_traits = yes
  • remove_all_positive_traitsleader

    Removes all non-negative traits from the scoped leader

    remove_all_positive_traits = yes
  • remove_all_traitsleader

    Removes all traits from the scoped leader

    remove_all_traits = yes

    The game's own scripts use it 3 times.

    As the game uses it
    remove_all_traits = yes
  • remove_from_empire_councilleader

    Removes scoped leader from empire council

    remove_from_empire_council = yes
  • remove_leader_flagleader

    Removes a flag from the scoped leader

    remove_leader_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 103 times.

    As the game uses it
    remove_leader_flag = paladin_ace
  • remove_traitleader

    Removes a specific trait from the scoped leader, or removes all negative traits

    remove_trait = <key/all_negative>

    The game's own scripts use it 140 times.

    As the game uses it
    remove_trait = all_negative
  • set_ageleader

    Sets the age of the scoped leader

    set_age = <int>

    The game's own scripts use it 54 times.

    As the game uses it
    set_age = 0
  • set_cooldownleader

    Locks the leader in its current role for the next X days.

    set_cooldown = int

    The game's own scripts use it 5 times.

    As the game uses it
    set_cooldown = 0
  • set_council_positionleader

    Sets the scoped leader to a council position if it is present in the government of the leader's owner country.

    set_council_position = COUNCIL_POS_KEY

    The game's own scripts use it 20 times.

    As the game uses it
    set_council_position = councilor_state
  • set_genderleader

    Sets the gender of the scoped leader

    set_gender = female

    The game's own scripts use it once.

    As the game uses it
    set_gender = female
  • set_immortalleader

    Sets the scoped leader immortal. The 'no' case will not override immortality granted by species characteristics (but will disable immortality granted by this effect).

    set_immortal = yes

    The game's own scripts use it 17 times.

    As the game uses it
    set_immortal = no
  • set_leader_flagleader

    Sets an arbitrarily-named flag on the scoped leader

    set_leader_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 194 times.

    As the game uses it
    set_leader_flag = astropath
  • set_leader_tierleader

    Sets the leader's tier.

    set_leader_tier = leader_tier_default
  • set_skillleader

    Sets the scoped leader's level

    set_skill = 3

    The game's own scripts use it 6 times.

    As the game uses it
    set_skill = 1
  • set_timed_leader_flagleader

    Sets an arbitrarily-named flag on the scoped leader for a set duration

    set_timed_leader_flag = { 
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }

    The game's own scripts use it 2 times.

    As the game uses it
    set_timed_leader_flag = {
    	flag = ignore_autocracy_ruler_trait_restriction
    	days = 1
    }
  • set_years_servedleader

    Copies years served duration from the target

    set_years_served = <target>

    The game's own scripts use it once.

    As the game uses it
    set_years_served = from
  • unassign_leadership, fleet, leader, army

    Unassigns scoped leader from their post or unassigns leader from the scoped planet/ship/fleet/army

    unassign_leader = <target>

    The game's own scripts use it 34 times.

    As the game uses it
    unassign_leader = this

Fleets, ships and armies

  • add_growthship, fleet

    Adds a specific amount of growth (non-fauna ships)

    add_growth = 120

    The game's own scripts use it 4 times.

    As the game uses it
    add_growth = 1
  • add_mission_progressfleet

    Adds or subtracts progress to/from the scoped observation post's current mission

    add_mission_progress = <+/- float>

    The game's own scripts use it once.

    As the game uses it
    add_mission_progress = -0.5
  • add_resource_to_local_stockpileship, fleet

    Adds specific resources to a ship's stockpile (ship must be able to collect resources; will not add resources above capacity):

    add_resource_to_local_stockpile = {
    	<resource_name_1> = <value_1>
    	<resource_name_2> = <value_2>
    	...
    	mult = <variable> (optional: multiplies all gained resources by a variable)
    }
  • auto_follow_fleetship, fleet

    Makes a fleet or ship auto-move to target fleet and potentially attack it

    auto_follow_fleet = { target = <fleet> attack_fleet = yes }

    The game's own scripts use it 8 times.

    As the game uses it
    auto_follow_fleet = {
    	target = event_target:science_ship_fleet
    	attack_fleet = no
    }
  • auto_move_to_planetship, fleet

    Makes a fleet or ship auto-move to target planet

    auto_move_to_planet = { target = <planet> clear_auto_move_on_arrival = yes }

    The game's own scripts use it 52 times.

    As the game uses it
    auto_move_to_planet = {
    	target = event_target:return_point
    	destroy_on_arrival = yes
    	clear_auto_move_on_arrival = yes
    }
  • clear_fleet_actionsfleet

    Clears all queued fleet actions for target fleet

    clear_fleet_actions = <target>

    The game's own scripts use it 34 times.

    As the game uses it
    clear_fleet_actions = this
  • clear_ordersfleet

    Clears all fleet orders from the scoped fleet

    clear_orders = yes

    The game's own scripts use it 13 times.

    As the game uses it
    clear_orders = yes
  • create_army_transportfleet

    Creates a new army in a new transport ship

    create_army_transport = {
    	ship_name = <string>
    	graphical_culture = <key>
    	army_name = <string>
    	army_type = <key>
    	species = <target>
    }
  • create_shipfleet, starbase

    Creates a new ship

    create_ship = {
    	name = <string/random>
    	design = <ship design key/target/last_created_design, or use random_existing_design>
    	random_existing_design = <ship size key>
    	graphical_culture = <graphical culture key> graphical_culture_fallback = <graphical culture key>
    prefix = <Y(default)/N, determines if ship name should use owner country prefix>
    	suffix = <Y/N(default), determines if ship name should use numericals. If so, name will be added to the owner country's namelist>
    	colonizer_species = <species, default: fleet owner founder species> age = <int> (optional)
    	rarity = <common/rare/epic/exceptional, used only if ship is space fauna> (optional, fallbacks to highest owned genetic material if applicable but not set)
    	growth_stage = <integer value between 1 and the amount of growth stages in the design> (optional, use the first growth stage by default)
    	create_colony = yes/no (default: yes; if yes, will also create the carrier colony,only when ship_size is marked to carry a colony. WARNING: carrier ships with no colony are killed on a daily basis)
    }

    The game's own scripts use it 210 times.

    As the game uses it
    create_ship = {
    	name = random
    	design = NAME_Beta
    	graphical_culture = owner
    }
  • create_smaller_size_creature_in_fleetship

    Creates new creatures of the smaller ship size in the same fleet

    create_smaller_size_creature_in_fleet = <value>

    The game's own scripts use it once.

  • damage_armyarmy

    Damages scoped army by a specific amount

    damage_army = 250

    The game's own scripts use it 2 times.

    As the game uses it
    damage_army = 250
  • damage_shipship, fleet

    Damages ship (or all ships in scoped fleet) by a specific amount

    damage_ship = 120
    Can also specify attacker (ship or country) for on-action attribution:
    damage_ship = { amount = 120 attacker = <ATTACKER SHIP OR COUNTRY> }

    The game's own scripts use it 16 times.

    As the game uses it
    damage_ship = {
    	amount = 10000
    	attacker = event_target:arkship
    }
  • destroy_and_spawn_debris_forship, fleet

    Sets the current ship or fleet to be destroyed and spawn a debris project for the specified country.

    destroy_and_spawn_debris_for = from

    The game's own scripts use it once.

    As the game uses it
    destroy_and_spawn_debris_for = root.owner
  • dismantlefleet

    Dismantles the scoped orbital station (fleet)

    dismantle = yes

    The game's own scripts use it 70 times.

    As the game uses it
    dismantle = yes
  • end_fleet_contractfleet

    Breaks fleet lease contract

    end_fleet_contract = yes

    The game's own scripts use it 10 times.

    As the game uses it
    end_fleet_contract = {
    	initiator = root
    	reason = cancelled
    }
  • fleet_action_research_special_projectfleet

    Sends a fleet to research a special project

    fleet_action_research_special_project = { special_project = test_project target = event_target:project_planet }

    The game's own scripts use it 3 times.

    As the game uses it
    fleet_action_research_special_project = {
    	special_project = military_joint_project
    	target = event_target:military_exercises_target
    }
  • fleet_eventfleet

    Fires a fleet event for the scoped fleet, with optional DAYS and RANDOM delay

    fleet_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay from 0 to value, which is added on to the 'days' delay)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }

    The game's own scripts use it 543 times. Event IDs →

    As the game uses it
    fleet_event = {
    	id = nomads.520
    	scopes = {
    		from = fromfrom
    	}
    }
  • give_fleetfleet

    Leases fleet out to the new controller country for a numbed of days

    give_fleet = {
    	controller = <target country> 
    	days = <number of days>
    }

    The game's own scripts use it 9 times.

    As the game uses it
    give_fleet = {
    	controller = from
    	days = 720
    }
  • lock_animation_stateship, fleet

    Locks the animation state of the scoped object. This will let it change states until it hits the given state, at which point it won't change states anymore. "none" clears this behavior.

    lock_animation_state = "closing"/none

    The game's own scripts use it 2 times.

    As the game uses it
    lock_animation_state = none
  • modify_armyarmy

    Modifies army with parameters:

    modify_army = {
    	name = <string>
    	owner = <target>
    	species = <target>/random
    	type = <key>
    }

    The game's own scripts use it 10 times.

    As the game uses it
    modify_army = {
    	name = random
    	type = robotic_army
    	species = event_target:synthspecies@root.owner
    }
  • order_forced_returnfleet

    Forces scoped fleet to retreat to friendly territory

    order_forced_return = yes
  • prolong_fleet_contractfleet

    Prolongs fleet's lease contract for a numbed of days

    prolong_fleet_contract = { days = <number of days> }
  • queue_actionsfleet

    Adds actions to the scoped fleet's action queue

    queue_actions = { repeat = { <fleet actions> } }

    The game's own scripts use it 63 times.

    As the game uses it
    queue_actions = {
    	wait = {
    		duration = 180
    	}
    	effect = champions_forge_departure_effect
    }
  • reanimate_space_faunaship, debris

    Reanimates Space Fauna ship(s) back to life in zombie form.

    reanimate_space_fauna = {
    	fleet = <fleet>
    }

    The game's own scripts use it 2 times.

    As the game uses it
    reanimate_space_fauna = {
    	fleet = event_target:reanimating_fleet
    }
  • reduce_hpship

    Reduces the hull points of the scoped ship by a specific amount

    reduce_hp = 120
  • reduce_hp_percentship

    Reduces the hull points of the scoped ship by a relative amount

    reduce_hp_percent = 0.25

    The game's own scripts use it 42 times.

    As the game uses it
    reduce_hp_percent = 13
  • reduce_shieldship

    Reduces the shield points of the scoped ship by a specific amount

    reduce_shield = 120

    The game's own scripts use it 2 times.

    As the game uses it
    reduce_shield = @inf_conduit_ship_damage
  • remove_armyarmy

    Removes the scoped army

    remove_army = yes

    The game's own scripts use it 16 times.

    As the game uses it
    remove_army = yes
  • remove_army_flagarmy

    Removes a flag from the scoped army

    remove_army_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • remove_auto_move_targetship, fleet

    Makes a fleet or ship stop auto-moving

    remove_auto_move_target = yes

    The game's own scripts use it 7 times.

    As the game uses it
    remove_auto_move_target = yes
  • remove_design_flagship design

    Removes a flag from the scoped design

    remove_design_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • remove_fleet_flagfleet

    Removes a flag from the scoped fleet

    remove_fleet_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 57 times.

    As the game uses it
    remove_fleet_flag = hunted_fleet
  • remove_ship_flagship

    Removes a flag from the scoped ship

    remove_ship_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 29 times.

    As the game uses it
    remove_ship_flag = lase2
  • remove_terrifiedship, fleet

    Removes terrified state on the target ship/fleet (all ships).

    remove_terrified = yes

    The game's own scripts use it once.

    As the game uses it
    remove_terrified = yes
  • repair_amountship, fleet

    Restores a certain amount of hull points to the scoped ship or fleet

    repair_amount = 10.0

    The game's own scripts use it 8 times.

    As the game uses it
    repair_amount = 1000
  • repair_armor_amountship, fleet

    Restores a certain amount of armor points to the scoped ship or fleet

    repair_armor_amount = 10.0

    The game's own scripts use it once.

  • repair_armor_percentageship, fleet

    Restores a certain percentage of armor points to the scoped ship or fleet

    repair_armor_percentage = 0.1

    The game's own scripts use it 3 times.

    As the game uses it
    repair_armor_percentage = 0.25
  • repair_percentageship, fleet

    Restores a certain percentage of hull points to the scoped ship or fleet

    repair_percentage = 0.1

    The game's own scripts use it 10 times.

    As the game uses it
    repair_percentage = 0.2
  • repair_shield_amountship, fleet

    Restores a certain amount of shield points to the scoped ship or fleet

    repair_shield_amount = 10.0

    The game's own scripts use it 8 times.

    As the game uses it
    repair_shield_amount = @energy_siphon_shield_l_regen
  • repair_shield_percentageship, fleet

    Restores a certain percentage of shield points to the scoped ship or fleet

    repair_shield_percentage = 0.1

    The game's own scripts use it once.

    As the game uses it
    repair_shield_percentage = heal_percentage
  • repair_shipship

    Restores all hull points to the scoped ship

    repair_ship = yes

    The game's own scripts use it 5 times.

    As the game uses it
    repair_ship = yes
  • reset_growthship, fleet

    Resets growth to zero (non-fauna ships)

    reset_growth = {}
  • return_from_miafleet

    If the target fleet is MIA, returns it from MIA immediately

    return_from_mia = <target>

    The game's own scripts use it once.

    As the game uses it
    return_from_mia = this
  • set_animation_statemegastructure, ship, fleet

    Sets the animation state of the scoped object

    set_animation_state = "closing"

    The game's own scripts use it once.

    As the game uses it
    set_animation_state = closing
  • set_army_flagarmy

    Sets an arbitrarily-named flag on the scoped army

    set_army_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it once.

    As the game uses it
    set_army_flag = had_second_chance
  • set_auto_upgrade_componentsship design

    Sets wether or not the design automatically upgrades its components.

    set_auto_upgrade_components = yes

    The game's own scripts use it once.

    As the game uses it
    set_auto_upgrade_components = yes
  • set_cloaking_activefleet

    Sets current fleet's cloaking status

    set_cloaking_active = yes|no

    The game's own scripts use it 11 times.

    As the game uses it
    set_cloaking_active = no
  • set_confusedship, fleet

    Sets the confusion state on the target ship/fleet (all ships). Clears at the end of combat.

    set_confused = yes/no

    The game's own scripts use it 2 times.

    As the game uses it
    set_confused = no
  • set_design_flagship design

    Sets an arbitrarily-named flag on the scoped design

    set_design_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 2 times.

    As the game uses it
    set_design_flag = bulwark_battlewright
  • set_disable_at_healthship, fleet

    Sets the scoped ship to become disabled at a certain hull point percentage

    set_disable_at_health = <0-1 float> | no

    The game's own scripts use it 13 times.

    As the game uses it
    set_disable_at_health = no
  • set_disabledship

    Enables or disables the scoped ship

    set_disabled = no

    The game's own scripts use it 50 times.

    As the game uses it
    set_disabled = no
  • set_event_lockedfleet

    Silently disables the scoped fleet to prevent player action, remember to unlock at the end of the event

    set_event_locked = no

    The game's own scripts use it 85 times.

    As the game uses it
    set_event_locked = no
  • set_fleet_bombardment_stancefleet

    Sets the bombardment stance of the scoped fleet

    set_fleet_bombardment_stance = selective

    The game's own scripts use it once.

    As the game uses it
    set_fleet_bombardment_stance = indiscriminate
  • set_fleet_flagfleet

    Sets an arbitrarily-named flag on the scoped fleet

    set_fleet_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 109 times.

    As the game uses it
    set_fleet_flag = NAME_Nyx
  • set_fleet_formationfleet

    Sets a custom fleet formation on a fleet.

    set_fleet_formation = { position = { x = 1 y = 1 } position = { x = 2 y = 1 } }
  • set_fleet_settingsfleet

    Set fleet's settings, any unspecified setting will set to default value.

    set_fleet_settings = { can_upgrade = no can_change_leader = no ... }

    The game's own scripts use it 4 times.

    As the game uses it
    set_fleet_settings = {
    	garrison = yes
    }
  • set_fleet_stancefleet

    Sets the stance of the scoped fleet

    set_fleet_stance = <key, aggressive/passive/evasive>

    The game's own scripts use it 19 times.

    As the game uses it
    set_fleet_stance = evasive
  • set_formation_scalefleet

    Scales the scoped fleet's formation's ship spacing, above and below 1.0

    set_formation_scale = <float>
  • set_home_basefleet

    Set the home base of the scoped fleet to the specified starbase

    set_home_base = event_target:cool_starbase
  • set_locationfleet, ambient object

    Sets the fleet/ambient object's location, can be fine-tuned

    set_location = <target>
    set_location = {
    	target = <target>
    	distance = <int/random>
    	angle = <int/random>
    	direction = <in_system/out_system>
    }

    The game's own scripts use it 459 times.

    As the game uses it
    set_location = {
    	target = prev
    	distance = 300
    	angle = 90
    	direction = in_system
    }
  • set_miafleet

    Sets the current fleet to go missing in action with the MIA type defided by <key>

    set_mia = <key>

    The game's own scripts use it 34 times.

    As the game uses it
    set_mia = mia_fleet_eaten
  • set_mia_return_delayfleet

    If the scoped fleet is MIA, sets the return date in a given number of days, starting from current date

    set_mia_return_delay = <int>

    The game's own scripts use it 6 times.

    As the game uses it
    set_mia_return_delay = 0
  • set_missionfleet

    Sets the current mission of an observation station

    set_mission = passive_observation

    The game's own scripts use it 4 times.

    As the game uses it
    set_mission = no_observation
  • set_ship_designship, fleet

    Changes which design a ship uses/all ships in a fleet use, to the target design

    set_ship_design = {
      design = <ship design key/target/last_created_design, or use random_existing_design>
      random_existing_design = <ship size key>
    }

    The game's own scripts use it 2 times.

    As the game uses it
    set_ship_design = {
    	design = NAME_Behemoth_04_jump
    }
  • set_ship_flagship

    Sets an arbitrarily-named flag on the scoped ship

    set_ship_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 27 times.

    As the game uses it
    set_ship_flag = is_confused
  • set_terrified_byship, fleet

    Sets which ship terrified the target ship/fleet (all ships). Clears at the end of combat.

    set_terrified_by = <attacker>

    The game's own scripts use it 6 times.

    As the game uses it
    set_terrified_by = root.from
  • set_timed_ambient_object_flagfleet

    Sets an arbitrarily-named flag on the scoped ambient object for a set duration

    set_timed_ambient_object_flag = {
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }
  • set_timed_army_flagarmy

    Sets an arbitrarily-named flag on the scoped army for a set duration

    set_timed_army_flag = { 
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }
  • set_timed_fleet_flagfleet

    Sets an arbitrarily-named flag on the scoped fleet for a set duration

    set_timed_fleet_flag = {
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }

    The game's own scripts use it 12 times.

    As the game uses it
    set_timed_fleet_flag = {
    	flag = aggro_cooldown
    	days = 30
    }
  • set_timed_ship_flagship

    Sets an arbitrarily-named flag on the scoped ship for a set duration

    set_timed_ship_flag = {
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }

    The game's own scripts use it 11 times.

    As the game uses it
    set_timed_ship_flag = {
    	flag = combat_rage
    	days = 30
    }
  • ship_eventship

    Fires a ship event for the scoped ship, with optional DAYS and RANDOM delay

    ship_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay from 0 to value, which is added on to the 'days' delay)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }

    The game's own scripts use it 599 times. Event IDs →

    As the game uses it
    ship_event = {
    	id = bioship.1
    	days = 5
    	random = 5
    }
  • spawn_custom_debrisfleet

    Spawns a custom debris project with the current fleet.

    for = <country> - country to give the debris project to.
    	should_add_ship_to_debris = trigger (optional) - used to check if the ship must be added to the debris.
    	must_scavenge/must_reanimate/must_research = yes/no (default no) - used to specify and override country behaviour towards this debris. (Note: must_scavenge is always set to true if the killed ship stockpile is not empty.)
    	reset_killed_ship_designs = yes/no (default no) - used to force the fleet to reset its killed ships designs.
    	reset_killed_ship_stockpile = yes/no (default no) - used to force the fleet to reset its killed ships stockpile.
    	Note: Killed ship designs and stockpile are always reset at the end of combat, but after on_fleet_exit_battle has fired.

    The game's own scripts use it 3 times.

    As the game uses it
    spawn_custom_debris = {
    	for = from.owner
    	reset_killed_ship_designs = yes
    	reset_killed_ship_stockpile = yes
    }
  • transfer_resource_stockpileship

    Transfers all resources from the scoped ship to another ship or country:

    transfer_resource_stockpile = {
    	target = <ship/country scope> (Must be able to collect resources; will not add resources above capacity)
    	mult = <variable> (optional: multiplies all transferred resources by a variable if this is less than 1, all resources are removed from the ship but the target only receives a fraction, e.g.mult = 0.5 would give the target 50 % of the ship's stockpile with the remainder disappearing)
    }

    The game's own scripts use it 4 times.

    As the game uses it
    transfer_resource_stockpile = {
    	target = root
    }

Systems and space

  • add_asteroid_beltsystem

    Adds an asteroid belt at the distance in the scope.

    add_asteroid_belt = {
    	radius=<desired radius>
    	type=<asteroid belt type key>
    }
  • add_aura_intensitysystem

    Adds value to Psionic Aura intensity in scoped system

    add_aura_intensity = <int>

    The game's own scripts use it 6 times.

    As the game uses it
    add_aura_intensity = @accord_aura_intensity_loss
  • add_claimssystem

    Adds claims on target system

    add_claims = { who = <country> num_of_claims = x show_notification = no }

    The game's own scripts use it 19 times.

    As the game uses it
    add_claims = {
    	who = root
    	num_of_claims = 1
    	show_notification = no
    }
  • add_expedition_log_entrydig site

    Adds a specific expedition log entry to an archaeological site chapter

    add_expedition_log_entry = {
    	title = <loc key>
    	tooltip = <loc key>
    }
  • add_stage_cluesdig site, first contact, astral rift

    Adds clues to the current stage of an archaeological or first contact site

    add_stage_clues = <int>

    The game's own scripts use it 101 times.

    As the game uses it
    add_stage_clues = 1
  • add_stage_modifierespionage operation, astral rift

    Adds a specific modifier to the target's current stage for a set duration or until stage is changed

    add_stage_modifier = { modifier = <key> days = <int>, -1 means it never expires> }

    The game's own scripts use it 33 times.

    As the game uses it
    add_stage_modifier = {
    	modifier = astral_rift_difficulty_decrease_1
    }
  • add_starbase_componentstarbase

    Adds a ship component to a starbase, standalone from any module or building

    add_starbase_component = { component = <component key> }

    The game's own scripts use it 11 times.

    As the game uses it
    add_starbase_component = {
    	component = STARBASE_AURA_ZRONI_STORM
    }
  • astral_rift_eventastral rift

    Fires an astral rift event with optional DAYS and RANDOM

    delay
    astral_rift_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay from 0 to value, which is added on to the 'days' delay)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }

    The game's own scripts don't use it. Event IDs →

  • bypass_eventbypass

    Fires a bypass event for the scoped bypass, with optional DAYS and RANDOM delay

    bypass_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay, capped at value)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }
  • cancel_contractmission

    Cancels the scoped to contract.

    Has options for whether the contract cost should be refunded to the issuer, and if messages of the cancellation should be shown to the player.
    cancel_contract = {
    	refund = yes/no (optional - default: yes)
    	show_message = yes/no (optional - default: yes)
    }

    The game's own scripts use it 11 times.

    As the game uses it
    cancel_contract = {
    	refund = no
    	show_message = no
    }
  • cosmic_storm_eventcosmic storm

    Fires a storm event for the scoped storm

    storm_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay from 0 to value, which is added on to the 'days' delay)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }

    The game's own scripts don't use it. Event IDs →

  • cosmic_storm_influence_field_eventstorm influence field

    Fires a storm event for the scoped storm influence field

    storm_influence_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay from 0 to value, which is added on to the 'days' delay)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }
  • create_bypassmegastructure

    Creates a bypass in the parent SpatialObject (stored in FromFrom), of the type passed in "type".

    create_bypass = { owner = <target> type = <bypass type> effect = { <effects> } }
  • create_nebulasystem

    Creates a new Nebula with a given radius centered around the current system.

    create_nebula = {
    	name = <name> (loc synced, optional - default is random)
    	radius = 100
    	effect = { <effects on every system in the new nebula> }
    }

    The game's own scripts use it 8 times.

    As the game uses it
    create_nebula = {
    	radius = 1
    	effect = {
    		create_nebula_4 = yes
    	}
    }
  • destroy_cosmic_stormcosmic storm

    Destroy the scoped storm.

    The game's own scripts use it once.

    As the game uses it
    destroy_cosmic_storm = yes
  • destroy_psionic_aurasystem

    Destroy Psionic Aura in scoped system.

    destroy_psionic_aura = yes

    The game's own scripts use it 2 times.

    As the game uses it
    destroy_psionic_aura = yes
  • expire_site_eventdig site

    Manually flags an archaeological event as expired

    expire_site_event = ancrel.7003

    The game's own scripts use it 30 times.

    As the game uses it
    expire_site_event = fedev.9461
  • finish_astral_riftastral rift

    Ends the Astral Rift exploration

    finish_astral_rift = yes

    The game's own scripts use it 118 times.

    As the game uses it
    finish_astral_rift = yes
  • finish_current_stagedig site

    Finish the current stage

    finish_current_stage = yes/no/<country>
    yes = trigger stage completed for each stage and current excavator.
    no = do not trigger any stage completed
    country = use this country instead of excavator, no stage complete will be triggered.
  • finish_first_contactfirst contact

    Ends the First Contact

    finish_first_contact = yes

    The game's own scripts use it 5 times.

    As the game uses it
    finish_first_contact = yes
  • finish_sitedig site

    Finish the whole archaeological site

    finish_site	 = yes/no/<country>
    yes = trigger stage completed for each stage and current excavator.
    no = do not trigger any stage completed
    country = use this country instead of excavator, no stage complete will be triggered.
  • finish_upgrademegastructure

    Finish the current upgrade of a Mega Structure.

    finish_upgrade = yes

    The game's own scripts use it 3 times.

    As the game uses it
    finish_upgrade = yes
  • first_contact_eventfirst contact

    Fires a first contact event for the scoped first contact site, with optional DAYS and RANDOM delay

    first_contact_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay from 0 to value, which is added on to the 'days' delay)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }

    The game's own scripts use it 46 times. Event IDs →

    As the game uses it
    first_contact_event = {
    	id = fircon.1220
    }
  • lock_bypassbypass

    Lock a Bypass for exclusive access for a given country.

    lock_bypass = { country = owner duration = 360 }

    The game's own scripts use it 2 times.

    As the game uses it
    lock_bypass = {
    	country = owner
    	duration = 1440
    }
  • lock_storm_in_placecosmic storm

    If yes, locks a Cosmic Storm in place. If no, it advances again at its normal speed.

    The game's own scripts use it 3 times.

    As the game uses it
    lock_storm_in_place = no
  • move_systemsystem

    Moves scoped system to a position relative to the given system/planet/ship.

    move_system = { target = <system/planet/ship> min_jumps = <value> max_jumps = <value> min_distance = <int 0-100> max_distance = <int 0-100> hyperlane=<yes/no> reset_terra_incognita = <yes/no>}

    The game's own scripts use it once.

  • pass_debris_ownershipdebris

    Passes the scoped debris ownership to the specified country

    pass_debris_ownership = { owner = <target country> }

    The game's own scripts use it 3 times.

    As the game uses it
    pass_debris_ownership = {
    	owner = from
    }
  • recalculate_storm_influence_fieldstorm influence field

    Recalculates the influence for each system in an influence field

  • remove_ambient_object_flagambient object

    Removes a flag from the scoped ambient object

    remove_ambient_object_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • remove_archaeology_flagdig site

    Removes a flag from the scoped arc site

    remove_archaeology_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • remove_astral_rift_flagastral rift

    Removes a flag from the scoped astral rift

    remove_astral_rift_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it once.

    As the game uses it
    remove_astral_rift_flag = sample_rig_available
  • remove_claimssystem

    Removes claims on target system

    remove_claims = { who = <country> num_of_claims = x }

    The game's own scripts use it 13 times.

    As the game uses it
    remove_claims = {
    	who = from
    }
  • remove_first_contact_flagfirst contact

    Removes a flag from the scoped first contact site

    remove_first_contact_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • remove_megastructure_flagmegastructure

    Removes a flag from the scoped mega structure

    remove_megastructure_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it once.

    As the game uses it
    remove_megastructure_flag = crisis_sphere_of@root
  • remove_mission_flagmission

    Removes a flag from the scoped mission

    remove_mission_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • remove_random_starbase_buildingstarbase

    Remove a number of random building(s) matching/not matching a type from the starbase

    remove_random_starbase_building = {
    	type = <starbase building> ( optional. default: all )
    	count = <int> (optional. default: 1 )
    }
  • remove_random_starbase_modulestarbase

    Remove a number of random module(s) matching/not matching a type from the starbase

    remove_random_starbase_module = {
    	type = <starbase module> ( optional. default: all )
    	count = <int> (optional. default: 1 )
    }

    The game's own scripts use it once.

    As the game uses it
    remove_random_starbase_module = {
    	type != shipyard
    	count = 1
    }
  • remove_sector_flagsector

    Removes a flag from the scoped sector

    remove_sector_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • remove_stage_modifierespionage operation, astral rift

    Removes a specific modifier from the target current stage

    remove_stage_modifier = <key>
  • remove_star_flagsystem

    Removes a flag from the scoped system

    remove_star_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 182 times.

    As the game uses it
    remove_star_flag = ring_section_1
  • remove_starbase_buildingstarbase

    Remove a building from a certain slot or all slots on a starbase

    remove_starbase_building = { slot = <int> (optional, default = all) building = <starbase_building> (optional) }

    The game's own scripts use it 53 times.

    As the game uses it
    remove_starbase_building = {
    	slot = 1
    }
  • remove_starbase_componentstarbase

    Removes the specified ship component to a starbase. Only works for components that are standalone from any module or building.

    remove_starbase_component = { component = <component key> }

    The game's own scripts use it 6 times.

    As the game uses it
    remove_starbase_component = {
    	component = STARBASE_AURA_ZRONI_STORM
    }
  • remove_starbase_flagstarbase

    Removes a flag from the scoped starbase

    remove_starbase_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 2 times.

    As the game uses it
    remove_starbase_flag = tribute_vault_loyalty_set
  • remove_starbase_modulestarbase

    Removes a module from a certain slot or all slots on a starbase

    remove_starbase_module = { slot = <int> (optional, default = all) module = <starbase_module> (optional) }

    The game's own scripts use it 41 times.

    As the game uses it
    remove_starbase_module = {
    	slot = 2
    	module = all
    }
  • renew_bypass_lockbypass

    Renew a Bypass Lock's duration as if it was just built.

    renew_bypass_lock = yes

    The game's own scripts use it once.

    As the game uses it
    renew_bypass_lock = yes
  • reset_current_stagedig site

    Resets the current stage

    reset_current_stage = yes/no
    yes = also randomize new difficulty if stage allows that.
    no = does not change difficulty
  • set_ambient_object_flagambient object

    Sets an arbitrarily-named flag on the scoped ambient object

    set_ambient_object_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 97 times.

    As the game uses it
    set_ambient_object_flag = debris
  • set_archaeology_flagdig site

    Sets an arbitrarily-named flag on the scoped arc site

    set_archaeology_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 15 times.

    As the game uses it
    set_archaeology_flag = fire
  • set_asteroid_beltsystem

    Sets an asteroid belt at the distance in the scope.

    set_asteroid_belt = {
    	radius=<desired radius>
    	type=<asteroid belt type key>
    }

    The game's own scripts use it once.

    As the game uses it
    set_asteroid_belt = {
    	radius = 0
    }
  • set_astral_rift_flagastral rift

    Sets an arbitrarily-named flag on the scoped astral rift

    set_astral_rift_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 81 times.

    As the game uses it
    set_astral_rift_flag = killed_creature
  • set_aura_intensitysystem

    Sets given intensity to Psionic Aura in scoped system

    set_aura_intensity = <int>

    The game's own scripts use it 3 times.

    As the game uses it
    set_aura_intensity = 999
  • set_cosmic_stormsystem

    Sets a storm on a system

    cosmic_storm = <target>

    The game's own scripts use it once.

    As the game uses it
    set_cosmic_storm = {
    	cosmic_storm = prev
    }
  • set_current_stagedig site

    Sets the current stage for this arc site (first chapter is index 0).

    set_current_stage = <stage number>
  • set_first_contact_flagfirst contact

    Sets an arbitrarily-named flag on the scoped first contact site

    set_first_contact_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 82 times.

    As the game uses it
    set_first_contact_flag = seen_aliens
  • set_first_contact_stagefirst contact

    Sets the given stage for the scoped first contact

    set_first_contact_stage = <stage name>

    The game's own scripts use it 157 times.

    As the game uses it
    set_first_contact_stage = nomad_stage_2
  • set_haltedmegastructure

    Sets the mega structure upgrade to halted status for n days. -1 days = indefinitely

    set_halted = nDays

    The game's own scripts use it 9 times.

    As the game uses it
    set_halted = 0
  • set_megastructure_flagmegastructure

    Sets an arbitrarily-named flag on the scoped mega structure

    set_megastructure_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 26 times.

    As the game uses it
    set_megastructure_flag = crisis_sphere
  • set_mission_flagmission

    Sets an arbitrarily-named flag on the scoped mission

    set_mission_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 2 times.

    As the game uses it
    set_mission_flag = NOMAD_STAR_JOURNAL_MIGHTY_BEASTS_FLAG
  • set_next_astral_rift_eventastral rift

    Sets next Astral Rift event through an astral rift event ID, and another astral rift event ID to be called in case of a roll failed, alongside a trigger probability. To fire an Astral Rift event immediately, use astral_rift_event instead.

    set_next_astral_rift_event = {
    	id = <event_id>
    	on_roll_failed = <event_id> (optional: specify astral rift event set when a roll fails)
    	fail_probability = <float> (optional: specify astral rift event probability to trigger on a failed roll)
    }

    The game's own scripts use it 397 times.

    As the game uses it
    set_next_astral_rift_event = {
    	id = astral_rift.25
    	on_roll_failed = astral_rift.30
    	fail_probability = @default_failure_probability
    }
  • set_overclockmegastructure

    Switches the scoped megastructure to an overclock mode, replacing the current one. Ignores potential, possible and cost, but starts the megastructure's overclock_cooldown unless told otherwise.

    set_overclock = <overclock_type>
    set_overclock = { overclock = <overclock_type> cooldown = yes/no }
  • set_sector_flagsector

    Sets an arbitrarily-named flag on the scoped sector

    set_sector_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • set_ship_construction_typestarbase

    Set scoped starbase's current construction type

    set_ship_construction_type = <starbase_type/none>

    The game's own scripts use it 11 times.

    As the game uses it
    set_ship_construction_type = none
  • set_site_progress_lockeddig site, first contact

    Locks or unlocks the progress of a site

    set_site_progress_locked = yes/no

    The game's own scripts use it 1,336 times.

    As the game uses it
    set_site_progress_locked = no
  • set_star_classsystem

    Sets the star's star class, affecting system and galactic map graphics and potentially modifiers. Also changes the planet class of the system's primary star.

    set_star_class = <star class>

    The game's own scripts use it 16 times.

    As the game uses it
    set_star_class = sc_a
  • set_star_flagsystem

    Sets an arbitrarily-named flag on the scoped system

    set_star_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 464 times.

    As the game uses it
    set_star_flag = spy_orb_built
  • set_starbase_buildingstarbase

    Sets a building in a slot on a starbase

    set_starbase_building = { slot = <int> building = <starbase_building> }

    The game's own scripts use it 9 times.

    As the game uses it
    set_starbase_building = {
    	slot = 1
    	building = feeder
    }
  • set_starbase_flagstarbase

    Sets an arbitrarily-named flag on the scoped starbase

    set_starbase_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 3 times.

    As the game uses it
    set_starbase_flag = gravity_well_station
  • set_starbase_modulestarbase

    Sets a module in a slot on a starbase

    set_starbase_module = { slot = <int> module = <starbase_module> }

    The game's own scripts use it 88 times.

    As the game uses it
    set_starbase_module = {
    	slot = 1
    	module = shipyard
    }
  • set_starbase_sizestarbase

    Sets the ship size of a starbase

    set_starbase_size = <ship_size>

    The game's own scripts use it 39 times.

    As the game uses it
    set_starbase_size = starbase_exd
  • set_storm_flagcosmic storm

    Sets an arbitrarily-named flag on the scoped cosmic storm.

    set_storm_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 4 times.

    As the game uses it
    set_storm_flag = storm_stormfall
  • set_timed_archaeology_flagdig site

    Sets an arbitrarily-named flag on the scoped arc site for a set duration

    set_timed_archaeology_flag = { 
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }
  • set_timed_first_contact_flagfirst contact

    Sets an arbitrarily-named flag on the scoped first contact site for a set duration

    set_timed_first_contact_flag = {
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }

    The game's own scripts use it once.

    As the game uses it
    set_timed_first_contact_flag = {
    	flag = first_contact_event_fired
    	days = 125
    }
  • set_timed_megastructure_flagmegastructure

    Sets an arbitrarily-named flag on the scoped mega structure for a set duration

    set_timed_megastructure_flag = {
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }
  • set_timed_sector_flagsector

    Sets an arbitrarily-named flag on the scoped sector for a set duration

    set_timed_sector_flag = { 
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }
  • set_timed_star_flagsystem

    Sets an arbitrarily-named flag on the scoped system for a set duration

    set_timed_star_flag = { 
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>

    The game's own scripts use it 33 times.

    As the game uses it
    set_timed_star_flag = {
    	flag = conduit_target
    	days = 180
    }
  • set_timed_starbase_flagstarbase

    Sets an arbitrarily-named flag on the scoped starbase for a set duration

    set_timed_starbase_flag = { 
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }

    The game's own scripts use it 8 times.

    As the game uses it
    set_timed_starbase_flag = {
    	flag = piracy_collected
    	days = 29
    }
  • spawn_astral_riftsystem

    Spawns a new astral rift in the scoped system.

    If the id is not set or equal to none, spawns a random rift from the pool once exploration begins.
    Can be spawned relatively to an existing spatial object, tolerance is applied to the angle to avoid already existing planets.
    spawn_astral_rift = { random_pos = yes/no (default = no, exclusive with relative_to and in_place_of) orbit_distance = 100 orbit_angle = 360 id = astral_rift_key/none (optional) relative_to = target (optional) tolerance = (optional) in_place_of = spatial_object (optional) graphics_entity_name = entity (optional) spawn_sound = yes/no (default = yes) init_effect = {} }

    The game's own scripts use it 9 times.

    As the game uses it
    spawn_astral_rift = {
    	random_pos = yes
    	orbit_angle = 360
    	id = crystal
    	graphics_entity_name = crystal_rift_entity
    }
  • spawn_megastructuresystem

    Spawns a mega structure in a system.

    spawn_megastructure = {
    	type = ring_world_ruined
    	name = <string>
    	owner = <target>
    	planet = <planet/star target>
    	coords_from = <target> (use this or 'planet' to set the location)
    	graphical_culture = <target>
    	orbit_distance = 50
    	orbit_angle = 50
    }

    The game's own scripts use it 90 times. Megastructure IDs →

    As the game uses it
    spawn_megastructure = {
    	type = behemoth_chrysalis
    	owner = root.owner
    	planet = solar_system.star
    	coords_from = this
    }
  • spawn_natural_wormholesystem

    Spawns a new natural wormhole in the scoped system.

    Use in_place_of instead of orbit_X / random_pos to use the location of an existing spatial object
    spawn_natural_wormhole = { bypass_type = <wormhole/sealed_wormhole> orbit_distance = 100 orbit_angle = 90 random_pos = yes/no in_place_of = <target> (optional) graphics_entity_name = <entity> (optional) }

    The game's own scripts use it 33 times.

    As the game uses it
    spawn_natural_wormhole = {
    	bypass_type = shroud_tunnel
    	random_pos = no
    	orbit_angle = 360
    	orbit_distance = 15
    }
  • spawn_planetsystem

    Spawns a planet in a system.

    The game's own scripts use it 68 times.

    As the game uses it
    spawn_planet = {
    	class = pc_ringworld_seam
    	name = NAME_Ring_Section
    	orbit_angle = 0
    	orbit_distance = 45
    }
  • spawn_psionic_aurasystem

    Spawns a Psionic Aura in scoped system, where country is the aura's owner.

    spawn_psionic_aura = { country = <country>

    The game's own scripts use it 7 times.

    As the game uses it
    spawn_psionic_aura = {
    	owner = prev
    	type = exiled_aura
    	update_type = no
    }
  • starbase_eventstarbase

    Fires a starbase event for the scoped starbase

    starbase_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay from 0 to value, which is added on to the 'days' delay)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }

    The game's own scripts use it 9 times.

    As the game uses it
    starbase_event = {
    	id = nomads.5010
    	days = 30
    }
  • system_eventsystem

    Fires a system event for the scoped system

    system_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay from 0 to value, which is added on to the 'days' delay)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }

    The game's own scripts use it 36 times. Event IDs →

    As the game uses it
    system_event = {
    	id = cstorms.1816
    	scopes = {
    		from = this
    	}
    }
  • unset_cosmic_stormsystem

    Unsets a storm on a system

    The game's own scripts use it once.

    As the game uses it
    unset_cosmic_storm = yes
  • upgrade_megastructure_tomegastructure

    Starts an upgrade process on a mega structure.

    upgrade_megastructure_to = <new_type>

    The game's own scripts use it 9 times.

    As the game uses it
    upgrade_megastructure_to = think_tank_4

Diplomacy, wars and espionage

  • add_associate_memberfederation

    Add specified country as an associate member

    add_associate_member = { who = <target> override_requirements = yes/no }
  • add_cohesionfederation

    Add cohesion to the federation

    add_cohesion = <value>

    The game's own scripts use it 83 times.

    As the game uses it
    add_cohesion = -5
  • add_espionage_informationespionage operation

    Adds information to the current stage of an espionage operation

    add_espionage_information = <value>
  • add_federation_experiencefederation

    Adds experience to the scoped federation

    add_federation_experience = <federation experience>

    The game's own scripts use it 8 times.

    As the game uses it
    add_federation_experience = 100
  • add_loyaltyagreement

    Add loyalty to subject of an agreement

    add_loyalty = 5

    The game's own scripts use it 20 times.

    As the game uses it
    add_loyalty = -3
  • add_situation_progresssituation

    Adds progress to scoped situation

    add_situation_progress = 5.5

    The game's own scripts use it 223 times.

    As the game uses it
    add_situation_progress = 3
  • add_spy_network_levelspy network

    Adds levels to the current Spy Network

    add_spy_network_level = <int>

    The game's own scripts use it 41 times.

    As the game uses it
    add_spy_network_level = 2
  • agreement_eventagreement

    Fires an agreement event for the scoped agreement

    agreement_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay from 0 to value, which is added on to the 'days' delay)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }
  • assign_espionage_assetespionage operation

    Assigns espionage asset to the scope operation from owning spy network

    assign_espionage_asset = <espionage asset type>
  • change_situation_targetsituation

    Changes the target of a Situation.

    change_situation_target = none/scope

    The game's own scripts use it 7 times.

    As the game uses it
    change_situation_target = none
  • convert_to_specialistagreement

    Starts the process of converting the subject of the scoped agreement to the given specialist type.

    Can also be used to remove the specialization from a subject, by using 'none' as value.
    convert_to_specialist = <specialist_subject_type>

    The game's own scripts use it 4 times.

    As the game uses it
    convert_to_specialist = none
  • create_espionage_assetspy network

    Creates espionage asset within a given spy network

    create_espionage_asset = {
    	type = <espionage asset type>
    	effect = { <effects executed on asset> }
    }

    The game's own scripts use it 37 times.

    As the game uses it
    create_espionage_asset = {
    	type = asset_clerk
    }
  • destroy_espionage_assetspy network, espionage operation

    Destroys espionage asset within a given spy network/operation

    destroy_espionage_asset = <espionage asset type>

    The game's own scripts use it 78 times.

    As the game uses it
    destroy_espionage_asset = asset_clerk
  • dissolve_federationfederation

    Dissolved the current federation

    dissolve_federation = yes

    The game's own scripts use it 5 times.

    As the game uses it
    dissolve_federation = yes
  • espionage_operation_eventespionage operation

    Fires a espionage event event for the scoped object, with optional DAYS and RANDOM delay

    espionage_operation_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay from 0 to value, which is added on to the 'days' delay)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }

    The game's own scripts use it 49 times. Event IDs →

    As the game uses it
    espionage_operation_event = {
    	id = preftl_operation.3003
    	days = 10
    	random = 5
    }
  • finish_current_operation_stageespionage operation

    Finish the current operation phase

    finish_current_operation_stage = yes/no
    yes = trigger stage completed for each stage and current excavator.
    no = do not trigger any stage completed
  • remove_agreement_flagagreement

    Removes a flag from the scoped agreement

    remove_agreement_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • remove_associate_memberfederation

    Removes a specific associate member from the federation

    remove_associate_member = { who = <country> override_requirements = yes/no }
  • remove_espionage_asset_flagespionage asset

    Removes a flag from the scoped espionage asset

    remove_espionage_asset_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • remove_espionage_operation_flagespionage operation

    Removes a flag from the scoped espionage operation

    remove_espionage_operation_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • remove_federation_flagfederation

    Removes a flag from the scoped federation

    remove_federation_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 60 times.

    As the game uses it
    remove_federation_flag = cheap_bid_flag
  • remove_situation_flagsituation

    Removes a flag from the scoped situation

    remove_situation_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 294 times.

    As the game uses it
    remove_situation_flag = siding_caeli
  • remove_spynetwork_flagspy network

    Removes a flag from the scoped spy network

    remove_spynetwork_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 2 times.

    As the game uses it
    remove_spynetwork_flag = spy_support_contract_network@root
  • remove_war_flagwar

    Removes a flag from the scoped war

    remove_war_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • remove_war_participantwar

    Removes a specified country from the war

    remove_war_participant = <target>

    The game's own scripts use it 16 times.

    As the game uses it
    remove_war_participant = prev
  • set_agreement_flagagreement

    Sets an arbitrarily-named flag on the scoped agreement

    set_agreement_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • set_agreement_presetagreement

    Sets the preset of an agreement and applies its terms on the agreement if 'apply_terms' is 'yes'.

    set_agreement_preset = {
    	preset = <preset key>
    	apply_terms = no #Defaults to 'yes'
    }

    The game's own scripts use it 12 times.

    As the game uses it
    set_agreement_preset = {
    	preset = preset_scion
    	apply_terms = yes
    }
  • set_agreement_termsagreement

    Sets agreement terms of the agreement. Can be used to set multiple terms at once, including resource subsidies.

    set_agreement_terms = {
    	subject_diplomacy = subject_can_not_do_diplomacy
    	subject_integration = subject_can_be_integrated
    	resource_subsidies_alloys = 0.5
    }

    The game's own scripts use it 16 times.

    As the game uses it
    set_agreement_terms = {
    	subject_integration = subject_can_not_be_integrated
    	subject_holdings_limit = subject_holdings_limit_1
    	joins_subject_wars = joins_subject_wars_all
    	joins_overlord_wars = joins_overlord_wars_none
    }
  • set_allow_subjects_to_joinfederation

    Sets right for subjects to join federation. Please don't use outside law on_enact, functional effect! Use set_federation_law and has_federation_law instead.

    set_allow_subjects_to_join = <yes/no>

    The game's own scripts use it 3 times.

    As the game uses it
    set_allow_subjects_to_join = no
  • set_diplomacy_action_settingfederation

    Sets diplomatic action custom setting. Please don't use outside law on_enact, functional effect! Use set_federation_law and has_federation_law instead.

    set_diplomacy_action_setting = {
    	action = <action_key>
    	settings = { vote_type = default }
    }

    The game's own scripts use it 21 times.

    As the game uses it
    set_diplomacy_action_setting = {
    	action = action_declare_war
    	settings = {
    		vote_type = leader
    	}
    }
  • set_equal_voting_powerfederation

    Sets different voting weight. Please don't use outside law on_enact, functional effect! Use set_federation_law and has_federation_law instead.

    set_equal_voting_power = <yes/no>

    The game's own scripts use it 3 times.

    As the game uses it
    set_equal_voting_power = no
  • set_espionage_asset_flagespionage asset

    Sets an arbitrarily-named flag on the scoped espionage asset

    set_espionage_asset_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)
  • set_espionage_operation_flagespionage operation

    Sets an arbitrarily-named flag on the scoped espionage operation

    set_espionage_operation_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 74 times.

    As the game uses it
    set_espionage_operation_flag = reward_tech
  • set_espionage_operation_progress_lockedespionage operation

    Locks or unlocks the progress of an espionage operation

    set_espionage_operation_progress_locked = yes/no

    The game's own scripts use it 159 times.

    As the game uses it
    set_espionage_operation_progress_locked = no
  • set_federation_flagfederation

    Sets an arbitrarily-named flag on the scoped federation

    set_federation_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 47 times.

    As the game uses it
    set_federation_flag = cheap_bid_flag
  • set_federation_lawfederation

    Sets the given law for the scoped federation

    set_federation_law = <federation law>

    The game's own scripts use it 100 times.

    As the game uses it
    set_federation_law = research_pact_no
  • set_federation_settingsfederation

    Sets diplomatic action custom setting. Please don't use outside law on_enact, functional effect! Use set_federation_law and has_federation_law instead.

    set_federation_settings = {
    	<setting> = <value>
    	...
    }

    The game's own scripts use it 13 times.

    As the game uses it
    set_federation_settings = {
    	commercial_pact = no
    	waystation_pact = no
    }
  • set_federation_succession_termfederation

    Sets scoped federation's succession term to the specified value. Please don't use outside law on_enact, functional effect! Use set_federation_law and has_federation_law instead.

    set_federation_succession_type = <federation succession term>
    Federation succession terms: status_change/years_10/years_20/years_30/years_40

    The game's own scripts use it 9 times.

    As the game uses it
    set_federation_succession_term = years_10
  • set_federation_succession_typefederation

    Sets scoped federation's succession type to the specified value. Please don't use outside law on_enact, functional effect! Use set_federation_law and has_federation_law instead.

    set_federation_succession_type = <federation succession type>
    Federation succession types: strongest/diplomatic_weight/rotation/challenge/random

    The game's own scripts use it 7 times.

    As the game uses it
    set_federation_succession_type = tech
  • set_federation_typefederation

    Sets federation type to the scoped federation

    set_federation_type = <federation type>

    The game's own scripts use it 11 times.

    As the game uses it
    set_federation_type = trade_federation
  • set_free_migrationfederation

    Sets unified migration flag for federation. Please don't use outside law on_enact, functional effect! Use set_federation_law and has_federation_law instead.

    set_free_migration = <yes/no>

    The game's own scripts use it 2 times.

    As the game uses it
    set_free_migration = no
  • set_only_leader_builds_fleetsfederation

    Sets exclusive right to build fleets by federation leader. Please don't use outside law on_enact, functional effect! Use set_federation_law and has_federation_law instead.

    set_only_leader_builds_fleets = <yes/no>

    The game's own scripts use it 2 times.

    As the game uses it
    set_only_leader_builds_fleets = no
  • set_rule_can_subject_be_integratedagreement

    Changes the agreement term for whether the Subject can be integrated

    set_rule_can_subject_be_integrated = <yes/no>

    The game's own scripts use it 2 times.

    As the game uses it
    set_rule_can_subject_be_integrated = no
  • set_rule_can_subject_do_diplomacyagreement

    Changes the agreement term for whether the Subject can do diplomacy

    set_rule_can_subject_do_diplomacy = <yes/no>

    The game's own scripts use it 3 times.

    As the game uses it
    set_rule_can_subject_do_diplomacy = no
  • set_rule_can_subject_expandagreement

    Changes the agreement term for whether the Subject can expand

    set_rule_can_subject_expand = <can_expand/can_expand_with_tithe/cannot_expand>

    The game's own scripts use it 3 times.

    As the game uses it
    set_rule_can_subject_expand = can_expand
  • set_rule_can_subject_voteagreement

    Changes the agreement term for whether the Subject can vote independently of its overlord in GalCom/federations

    set_rule_can_subject_vote = <yes/no>

    The game's own scripts use it 3 times.

    As the game uses it
    set_rule_can_subject_vote = no
  • set_rule_join_overlord_warsagreement

    Changes the agreement term for Subject to join Overlord wars

    set_rule_join_overlord_wars = <none/defensive/offensive/all>

    The game's own scripts use it 8 times.

    As the game uses it
    set_rule_join_overlord_wars = all
  • set_rule_join_subject_warsagreement

    Changes the agreement term for Overlord to wars of its Subject

    set_rule_join_subject_wars = <none/defensive/offensive/all>

    The game's own scripts use it 8 times.

    As the game uses it
    set_rule_join_subject_wars = all
  • set_rule_subject_has_accessagreement

    Changes the agreement term for whether the Subject can access the overlord's territory (and territories the overlord has access to) despite closed borders

    set_rule_subject_has_access = <yes/no>

    The game's own scripts use it 2 times.

    As the game uses it
    set_rule_subject_has_access = no
  • set_rule_subject_has_sensorsagreement

    Changes the agreement term for whether the Subject gets sensors data from Overlord

    set_rule_subject_has_sensors = <yes/no>

    The game's own scripts use it 2 times.

    As the game uses it
    set_rule_subject_has_sensors = no
  • set_situation_approachsituation

    Sets the approach to the Situation. Respects allow and potential triggers.

    set_situation_approach = <approach> (name field of the approach)

    The game's own scripts use it 106 times.

    As the game uses it
    set_situation_approach = approach_encourage
  • set_situation_flagsituation

    Sets an arbitrarily-named flag on the scoped situation

    set_situation_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 637 times.

    As the game uses it
    set_situation_flag = watch_nwo
  • set_situation_lockedsituation

    Locks the Situation so it will not progress until unlocked.

    set_situation_locked = yes/no (no unlocks it)

    The game's own scripts use it 107 times.

    As the game uses it
    set_situation_locked = no
  • set_situation_progresssituation

    Sets the progress of scoped situation

    set_situation_progress = 5.5

    The game's own scripts use it 2 times.

    As the game uses it
    set_situation_progress = 1750
  • set_spynetwork_flagspy network

    Sets an arbitrarily-named flag on the scoped spy network

    set_spynetwork_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it 4 times.

    As the game uses it
    set_spynetwork_flag = spy_support_contract_network@root
  • set_timed_agreement_flagagreement

    Sets an arbitrarily-named flag on the scoped agreement for a set duration

    set_timed_agreement_flag = {
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }
  • set_timed_espionage_asset_flagespionage asset

    Sets an arbitrarily-named flag on the scoped espionage asset for a set duration

    set_timed_espionage_asset_flag = { 
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }
  • set_timed_espionage_operation_flagespionage operation

    Sets an arbitrarily-named flag on the scoped espionage operation for a set duration

    set_timed_espionage_operation_flag = {
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }

    The game's own scripts use it 2 times.

    As the game uses it
    set_timed_espionage_operation_flag = {
    	flag = operation_random_event_fired
    	days = 90
    }
  • set_timed_federation_flagfederation

    Sets an arbitrarily-named flag on the scoped federation for a set duration

    set_timed_federation_flag = {
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }

    The game's own scripts use it 19 times.

    As the game uses it
    set_timed_federation_flag = {
    	flag = leylines_valid
    	days = 50
    }
  • set_timed_situation_flagsituation

    Sets an arbitrarily-named flag on the scoped situation for a set duration

    set_timed_situation_flag = {
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }

    The game's own scripts use it 116 times.

    As the game uses it
    set_timed_situation_flag = {
    	flag = speed_up_flag
    	days = 90
    }
  • set_timed_spynetwork_flagspy network

    Sets an arbitrarily-named flag on the scoped spy network for a set duration

    set_timed_spynetwork_flag = { 
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }

    The game's own scripts use it once.

    As the game uses it
    set_timed_spynetwork_flag = {
    	flag = issued_spy_support_contract
    	years = 10
    }
  • set_timed_war_flagwar

    Sets an arbitrarily-named flag on the scoped war for a set duration

    set_timed_war_flag = { 
    	flag = <key> (note: one can use <key>@scope e.g. my_flag@from to track relationships between objects)
    	days/months/years = <int>/<variable>
    }
  • set_war_flagwar

    Sets an arbitrarily-named flag on the scoped war

    set_war_flag = <key> (note: one can use e.g. my_flag@from to track relationships between objects)

    The game's own scripts use it once.

    As the game uses it
    set_war_flag = nomad_mercs
  • situation_eventsituation

    Fires a situation event for the scoped situation

    situation_event = {
    	id = <id>
    	days = x (optional: specify delay)
    	random = y (optional: specify random delay from 0 to value, which is added on to the 'days' delay)
    	scopes = { from = fromfrom } (optional: specify scope overrides)
    }

    The game's own scripts use it 335 times. Event IDs →

    As the game uses it
    situation_event = {
    	id = unplugged.3901
    	days = 1800
    	random = 120
    }
  • unassign_espionage_assetespionage operation

    Unassigns espionage asset from the scope operation to owning spy network

    unassign_espionage_asset = <espionage asset type>

Script effects: questions

How do I run a script effect in the console?

Open the console with the ~ key and type effect followed by the effect as scripts write it, for example effect add_deposit = d_energy_3 or effect set_planet_flag = my_flag. It runs on what you have selected (a planet, a fleet…) or on your empire, so the effect must work in that scope. Using the console turns achievements off for that game.

What is a scope?

The thing an effect works on: an empire (country), a planet, a fleet, a leader, a system and so on. Each effect lists the scopes it accepts; Loops such as every_owned_planet run the effects inside them on each thing they go through.

Is there a list of planet modifiers and other IDs these effects take?

Yes: planet modifiers, modifiers from events, deposits, planet classes, technologies, traditions, relics and event IDs each have their own list on this site, linked from the effects that take them.

Where does this list come from?

From the game itself: Stellaris writes every effect with its description, usage and scopes when you type script_docs in the console. The list here is from Stellaris 4.5.1; how often the game uses each effect, and the examples, are from Stellaris 4.5.2. The groups are ours.

From the game files · effects Stellaris 4.5.1, examples Stellaris 4.5.2. Planet modifiers' own console lines are on Planet modifiers.

Spotted a mistake on this page, or have an idea for the site?