Effects

From Stellaris Wiki
Jump to navigation Jump to search

Version

Outliner top.png
Please help with verifying or updating older sections of this article. At least some were last verified for version 2.5.

This article is for the PC version of Stellaris only.

Introduction[edit]

An Effect is a script that does something, similar to a function in other programming languages. An Effect differs from a Trigger in that a Trigger always returns a boolean, True or False, and doesn't change anything in the game. An Effect is the script that actually changes game state (i.e. Applies modifiers, creates or destroys objects, etc.) The list below is not complete, as it only includes the Effects built-in to the engine. More effects are scripted and located in common/scripted_effects. You can write your own effects there as well. If you have Event code that is repeated multiple times, it is usually easier to put the code into an Effect and just call the Effect from the event code everyplace it needs to run. An Effect runs in the scope in which it is called. Be careful using the FROM scope in effects, as you can't be sure from where the script will always be run.

Dump Export[edit]

Effects, dumped from the trigger_docs ingame command.

Name Desc Example Scopes Target Category
tooltip Just a tooltip planet country ship pop fleet ??? Control
hidden_effect Prevents enclosed effects from being displayed in tooltip hidden_effect = {

<effects> }

all none Control
custom_tooltip Displays a specific localization string in tooltip custom_tooltip = <string> all none Control
if Executes enclosed effects if limit criteria are met if = {

limit = { <triggers> } <effects> }

all none Control
random_list Picks one random set of effects from a list, influenced by relative weight random_list = {

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

all none Control
locked_random_list 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> } }

all none Control
every_owned_planet Executes enclosed effects on every planet -owned by the scoped country- that meet the limit criteria every_owned_planet = {

limit = { <triggers> } <effects> }

country none Scope
random_owned_planet Executes enclosed effects on a planet -owned by the scoped country- that meets the limit criteria random_owned_planet = {

limit = { <triggers> } <effects> }

country none Scope
every_controlled_planet Executes enclosed effects on every planet -controlled by the scoped country- that meet the limit criteria every_controlled_planet = {

limit = { <triggers> } <effects> }

country none Scope
random_controlled_planet Executes enclosed effects on a random planet -owned by the scoped country- that meets the limit criteria random_controlled_planet = {

limit = { <triggers> } <effects> }

country none Scope
remove_deposit Remove resource deposit on the scoped planet or deposit, does not fire on_cleared if used on a blocker add_deposit = <key/yes> planet deposit none Planets
set_owner Instantly sets the owner of the scoped planet/fleet/army/starbase to target country set_owner = <target> planet fleet army starbase none General
unemploy_pop Fires scoped pop from its job unemploy_pop = yes pop THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Megastructure
check_planet_employment Immediately runs a job evaluation on the planet, firing and employing pops as needed check_planet_employment = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Pops
change_species_portrait Changes the portrait of the species in scope. change_species_portrait = <key or species event target> species none Species
every_war_defender Executes enclosed effects on every defender that meets the limit criteria in the scoped country's war with a specific enemy every_war_defender = {

enemy = <target> limit = { <triggers>} <effects> }

country none Scope
clear_pop_category Resets category of a pop clear_pop_category = yes pop THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Pops
every_war_attacker Executes enclosed effects on every attacker that meets the limit criteria in the scoped country's war with a specific enemy every_war_attacker = {

enemy = <target> limit = { <triggers> } <effects> }

country none Scope
random_war_defender Executes enclosed effects on a random defender that meets the limit criteria in the scoped country's war with a specific enemy random_war_defender = {

enemy = <target> limit = { <triggers> } <effects> }

all none Scope
add_random_non_blocker_deposit Adds random non-blocker resource deposit to the scoped planet add_random_non_blocker_deposit = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
random_war_attacker Executes enclosed effects on a random attacker that meets the limit criteria in the scoped country's war with a specific enemy random_war_attacker = {

enemy = <target> limit = { <triggers> } <effects> }

all none Scope
remove_last_built_building Removes last built building from the scoped planet remove_last_built_building = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
remove_all_buildings Removes all buildings from the scoped planet remove_all_buildings = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
give_technology Instantly gives a specific tech to the scoped country give_technology = {

tech = tech_desert_colonization message = yes }

country none Country
add_building Begins construction of a specific building on the scoped tile add_building = <key> planet none Planets
add_planet_devastation Instantly adds devastation to scoped planet add_planet_devastation = 5 planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
create_half_species Creates a new pop from a half-species on the planet create_half_species = {

species_one = <target> species_two = <target> }

all none Species
calculate_modifier Forces target planet or country to calculate its internal modifier calculate_modifier = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Control
establish_branch_office Establish branch office on scoped planet for target country establish_branch_office = <target> planet none Planets
close_branch_office Close branch office on scoped planet close_branch_office = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
clear_blockers Removes all blockers from the scoped planet clear_blockers = yes planet none Planets
set_built_species Changes the built species of the scoped object set_built_species = <target> country none ???
set_country_flag Sets an arbitrarily-named flag on the scoped country set_country_flag = <key> country none Control
set_planet_flag Sets an arbitrarily-named flag on the scoped planet set_planet_flag = <key> planet none Control
set_fleet_flag Sets an arbitrarily-named flag on the scoped fleet set_fleet_flag = <key> fleet none Control
set_ship_flag Sets an arbitrarily-named flag on the scoped ship set_ship_flag = <key> ship none Control
remove_country_flag Removes a flag from the scoped country remove_country_flag = <key> country none Control
remove_planet_flag Removes a flag from the scoped planet remove_planet_flag = <key> planet none Control
remove_fleet_flag Removes a flag from the scoped fleet remove_fleet_flag = <key> fleet none Control
remove_ship_flag Removes a flag from the scoped ship remove_ship_flag = <key> ship none Control
every_owned_ship Executes enclosed effects on every ship -owned by the scoped country- that meet the limit criteria every_owned_ship = {

limit = { <triggers> } <effects> }

country none Scope
random_owned_ship Executes enclosed effects on a random ship -owned by the scoped country/fleet- that meets the limit criteria random_owned_ship = {

limit = { <triggers> } <effects> }

country fleet none Scope
create_species Creates a new species create_species = {

}

all none Species
create_country Creates a new country create_country = {

}

all none Country
create_fleet Creates a new fleet create_fleet = {

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

all none Ships
create_army Creates a new army create_army = { } planet none Armies
modify_army Modifies army with parameters: modify_army = { } army none Armies
set_location Sets the fleet/ambient object's location, can be fine-tuned set_location = { <target> } fleet ambient_object none General
create_ship Creates a new ship create_ship = { } fleet starbase none Ships
create_pop Creates a new pop on the scoped planet create_pop = { } planet none Pops
create_colony Creates a colony on the scoped planet create_colony_effect = { } planet none Planets
set_capital Sets the scoped planet to be the capital of its owner country set_capital = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Country
change_pc Changes the class of the scoped planet change_pc = <class/random list>

change_pc = { class = <class/random list> inherit_entity = yes }

planet none Planets
random_country Iterate through all countries random_country = {

limit = { <triggers> } <effects> }

all none Scpoe
random_pop Executes enclosed effects on a random pop that meets the limit criteria random_pop = {

limit = { <triggers> } <effects> }

planet none Scope
kill_pop Instantly destroys the scoped pop kill_pop = yes pop THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Pops
destroy_colony Destroys the colony on the scoped planet destroy_colony = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
add_experience Adds a sum of experience points to the scoped leader add_experience = 200 leader none Leaders
set_ring Adds or removes a planetary ring around the scoped planet set_ring = no planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Control
create_mining_station Creates a mining station in orbit of the scoped planet create_mining_station = {

owner = <target> }

planet none Stations
create_research_station Creates a research station in orbit of the scoped planet create_research_station = {

owner = <target> }

planet none Stations
set_pop_flag Sets an arbitrarily-named flag on the scoped country set_country_flag = <key> pop none Control
remove_pop_flag Removes a flag from the scoped pop remove_fleet_flag = <key> pop none Control
every_owned_pop Iterate through all owned pops every_owned_pop = {

limit = { <triggers> } <effects> }

planet country pop_faction none Scope
set_name Sets the name of the scoped country/planet/ship/fleet/leader/army/system/pop faction set_name = <string> megastructure planet country ship fleet galactic_object leader army pop_faction none General
random_planet Executes enclosed effects on a random planet that meets the limit criteria random_planet = {

limit = { <triggers> } <effects> }

all none Scope
add_modifier Adds a specific modifier to the scoped planet/pop/country/fleet/ship/pop/system/faction for a set duration add_modifier = {

modifier = <key> days = <int, -1 means it never expires> }

megastructure planet country ship pop fleet galactic_object pop_faction none General
reduce_hp Reduces the hull points of the scoped ship by a specific amount reduce_hp = 120 ship none Ships
reduce_hp_percent Reduces the hull points of the scoped ship by a relative amount reduce_hp_percent = 0.25 ship none Ships
repair_ship Restores all hull points to the scoped ship repair_ship = yes ship THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Ships
destroy_country Destroys the scoped country destroy_country = yes country THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Country
set_variable Sets or creates an arbitrarily-named variable with a specific value in the current scope set_variable = {

which = <string> value = <int> }

all none Control
remove_global_flag Removes a global flag remove_global_flag = <key> all none Control
set_global_flag Sets an arbitrarily-named global flag to every country set_global_flag = <key> all none Control
change_variable Increments a previously-set variable by a specific amount change_variable = {

which = <string> value = <int> }

all none Control
every_pop Executes enclosed effects for every pop in the game that meet the limit criteria every_pop = {

limit = { <triggers> } <effects> }

all none Scope
every_country Iterate through all countries every_country = {

limit = { <triggers> } <effects> }

all none Scope
every_playable_country switches Scope to and goes through all playable countries all none none Scope
random_playable_country Scopes to a random playable country all none none Scope
every_ship Executes enclosed effects for every ship in the game that meet the limit criteria every_ship = {

limit = { <triggers> } <effects> }

all none Scope
every_planet Executes enclosed effects for every planet in the game that meet the limit criteria every_planet = {

limit = { <triggers> } <effects> }

all none Scope
set_event_locked Silently disables the scoped fleet to prevent player action, remember to unlock at the end of the event set_event_locked = no fleet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Ships
clear_orders Clears all fleet orders from the scoped fleet clear_order = yes fleet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Ships
order_forced_return Forces scoped fleet to retreat to friendly territory order_forced_return = yes fleet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Ships
declare_war Declares war between the scoped country and target country declare_war = { } country none Warfare
set_star_flag Sets an arbitrarily-named flag on the scoped system set_star_flag = <key> galactic_object none Control
remove_star_flag Removes a flag from the scoped system remove_star_flag = <key> galactic_object none Control
set_spawn_system_batch Optimizes the calls for spawn_system effect. Spawn system should be located in a block between Begin and End.

End: set_spawn_system_batch = end

all none Control
spawn_system Spawns a new system at a position relative to the scoped system/planet/ship. spawn_system = {

min_jumps = <value> max_jumps = <value> min_distance = <int 0-100> max_distance = <int 0-100> initializer = <key for pre-defined system> hyperlane=<yes/no> is_discovered=<yes/no> }

megastructure planet ship fleet galactic_object starbase no_scope none Systems
random_research_station Executes enclosed effects on a random orbital research station that meets the limit criteria random_research_station = {

limit = { <triggers> } <effects> }

planet ??? Scope
dismantle Dismantles the scoped orbital station (fleet) dismantle = yes fleet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Ships
random_mining_station Executes enclosed effects on a random orbital mining station that meets the limit criteria random_research_station = {

limit = { <triggers> } <effects> }

planet ??? Scope
set_advisor_active Enables or disables the VIR window pop-in set_advisor_active = no country THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Control
save_event_target_as Saves the current scope as an arbitrarily-named target to be referenced later in the (unbroken) event chain save_event_target_as = <string> all none Control
save_global_event_target_as Saves the current scope as an arbitrarily-named target to be referenced later, accessible globally until cleared save_event_target_as = <string> all none Control
clear_global_event_target Deletes the specified saved global target reference clear_global_event_target = <string> all none Control
clear_global_event_targets Deletes all saved global target references clear_global_event_targets = yes all THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Control
break Prevents execution of subsequent effects in the same effect block, used with if-statements break = yes all THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Control
set_tutorial_level Changes the scoped country's tutorial level (0 none, 1 limited, 2 full) set_tutorial_level = 0 country none Control
begin_event_chain Starts a situation log event chain for target country begin_event_chain = {

event_chain = <key> target = <target> }

all none Control
end_event_chain Ends a specific situation log event chain for the scoped country end_event_chain = <key> country none Control
queue_actions Adds actions to the scoped fleet's action queue queue_actions = {

repeat = { <fleet actions> } }

fleet none Ships
clear_fleet_actions Clears all queued fleet actions for target fleet clear_fleet_actions = <target> fleet none Ships
destroy_fleet Destroys the target fleet (with death graphics) destroy_fleet = <target> all none Ships
create_ambient_object Creates a new ambient object create_ambient_object = {

type = <key> location = <target> }

all none Systems
destroy_ambient_object Destroys target ambient object destroy_ambient_object = <target> all none Systems
add_trait Adds a specific trait to the scoped leader add_trait = <trait> leader none Leaders
remove_trait Removes a specific trait from the scoped leader remove_trait = <key> leader none Leaders
modify_species Creates a new, modified species based on an already-extant species modify_species = { } planet country pop leader none Species
add_opinion_modifier Adds a specific opinion modifier for the scoped country towards target country add_opinion_modifier = {

modifier = <key> who = <target> }

country none Country
establish_contact Establishes first contact between the scoped country and target country at the set location establish_contact = {

who = <target> location = <target> }

country none Diplomacy
set_faction_hostility Sets the aggro state of the scoped faction-type country set_faction_hostility = {

target = country set_hostile = yes set_neutral = no set_friendly = no }

country none Country
set_market_leader Set scoped country as the current Galactic Market leader. set_market_leader = <yes/no> country THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Diplomacy
random_system_planet Executes enclosed effects on a random planet within the scoped system that meets the limit criteria random_system_planet = {

limit = { <triggers> } <effects> }

galactic_object none Scope
add_event_chain_counter 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> }

country none Control
add_anomaly Adds a specific anomaly category to the scoped planet, ignoring the spawn effects add_anomaly = { category = <anomaly> } all none Planets
set_disable_at_health Sets the scoped ship to become disabled at a certain hull point percentage set_disable_at_health = <0-1 float> ship none Ships
remove_building Removes a specific building from the scoped planet remove_building = <key> planet none Planets
change_planet_size Adds/Removes tiles to/from the scoped planet to adjust its planet size change_planet_size = <+/- int> planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
every_deposit Executes on every deposit on planet planet none Scope
random_deposit Executes enclosed effects on a random deposit on the scoped planet that meets the limit criteria random_deposit = {

limit = { <triggers> } <effects> }

planet none Scope
create_point_of_interest 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> }

planet country ship pop none Control
remove_point_of_interest Removes a specific point of interest from the scoped country's situation log remove_point_of_interest = <key> country none Control
set_relation_flag Sets a relation flag for the scoped country towards target country set_relation_flag = {

who = <target> flag = <key> }

country none Diplomacy
remove_relation_flag Removes a specific relation flag towards target country from the scoped country remove_relation_flag = {

who = <target> flag = <key> }

country none Diplomacy
random_moon Executes enclosed effects on a random moon that meets the limit criteria random_moon = {

limit = { <triggers> } <effects> }

planet none Scope
every_moon Executes enclosed effects on every moon that meets the limit criteria every_moon = {

limit = { <triggers> } <effects> }

planet none Scope
kill_leader Kills the scoped leader or leader of the scoped country/fleet/ship/planet/army kill_leader = {

type = general type = scientist } kill_leader = { type = <key, optional, if left out will kill scoped leader> show_notification = <yes/no> heir = <yes, optional, if added to type = ruler, will kill heir instead> }

planet country ship fleet leader army none Leaders
assign_leader Assigns target leader to the scoped country/fleet/army/pop faction assign_leader = <target> country fleet army pop_faction none Leaders
country_add_ethic Adds a specific ethic to the scoped country country_add_ethic = <key> country none Country
country_remove_ethic Removes a specific ethic from the scoped country country_remove_ethic = <key> country none Country
set_timed_country_flag Sets an arbitrarily-named flag on the scoped country for a set duration set_timed_country_flag = {

flag = <key> days = <int> }

country none Control
set_timed_fleet_flag Sets an arbitrarily-named flag on the scoped fleet for a set duration set_timed_fleet_flag = {

flag = <key> days = <int> }

fleet none Control
set_timed_global_flag Sets an arbitrarily-named global flag for a set duration set_timed_global_flag = {

flag = <key> days = <int> }

all none Control
set_timed_planet_flag Sets an arbitrarily-named flag on the scoped planet for a set duration set_timed_planet_flag = {

flag = <key> days = <int> }

planet none Control
set_timed_pop_flag Sets an arbitrarily-named flag on the scoped pop for a set duration set_timed_pop_flag = {

flag = <key> days = <int> }

pop none Control
set_timed_relation_flag Sets an arbitrarily-named flag for the scoped country towards target country for a set duration set_timed_relation_flag = {

flag = <key> who = <target> days = <int> }

country none Control
set_timed_ship_flag Sets an arbitrarily-named flag on the scoped ship for a set duration set_timed_ship_flag = {

flag = <key> days = <int> }

ship none Control
set_timed_star_flag Sets an arbitrarily-named flag on the scoped system for a set duration set_timed_system_flag = {

flag = <key> days = <int> }

galactic_object none Control
every_planet_within_border Executes enclosed effects on every planet within the scoped country's borders that meet the limit criteria every_planet_within_border = {

limit = { <triggers> } <effects> }

country none Scope
every_rim_system Iterate through all rim systems every_rim_system = {

limit = { <triggers> } <effects> }

all none Scope
random_rim_system Iterate through all rim systems random_rim_system = {

limit = { <triggers> } <effects> }

all none Scope
remove_modifier Removes a specific modifier from the scopes planet/country/pop/system remove_modifier = <key> megastructure planet country ship pop fleet galactic_object pop_faction none General
add_ship_design Adds a specific ship design to the scoped country add_ship_design = <target> country none Ships
add_mission_progress Adds or subtracts progress to/from the scoped observation post's current mission add_mission_progress = <+/- float> fleet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Stations
create_army_transport Creates a new army in a new transport ship create_army_transport = { } fleet none Armies
switch Executes the first appropriate effect set for a specific trigger switch = { } all none General
set_pop_faction Sets the scoped pop to belong to a specific pop faction set_pop_faction = <target> pop none Pops
set_graphical_culture Sets the scoped object's graphical culture set_graphical_culture = <key> megastructure country none Country
set_formation_scale Scales the scoped fleet's formation's ship spacing, above and below 1.0 set_formation_scale = <float> fleet none Ships
set_controller Instantly sets the planet/fleet's controller to target country set_controller = <target> planet fleet none General
force_faction_evaluation Forces target pop to immediately evaluate their attraction to various pop factions force_faction_evaluation = yes pop THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Pops
enable_faction_of_type Forces scoped country to evaluate whether to create a specific faction type immediately, rather than monthly enable_faction_of_type = <key> country none Country
clear_uncharted_space Clears uncharted space from the galaxy map for the scoped country, in a radius around target system clear_uncharted_space = { from = <target> } country none Country
every_owned_leader Executes enclosed effects on every leader owned by scoped country that meets the limit criteria every_owned_leader = {

limit = { <triggers> } <effects> }

country none Scope
random_owned_leader Executes enclosed effects on a random leader owned by scoped country that meets the limit criteria random_owned_leader = {

limit = { <triggers> } <effects> }

country none Scope
establish_communications Establish communications between scoped country and target country establish_communications = <target> country none Diplomacy
add_monthly_resource_mult 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 = <multiplier, float> max = <max cap, int> min = <min cap, int> }

country none Country
set_leader_flag Sets an arbitrarily-named flag on the scoped leader set_leader_flag = <key> leader none Control
remove_leader_flag Removes a flag from the scoped leader remove_leader_flag = <key> leader none Control
add_research_option Adds a tech research option to the scoped country's tech view list, permanent until researched add_research_option = <key> country THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Country
set_heir Sets the target leader to be the scoped country's heir set_heir = <target> country none Country
leave_alliance Removes scoped country from any alliances it is in leave_alliance = { override_requirements = yes/no } country none Diplomacy
random_owned_pop Iterate through all owned pops random_owned_pop = {

limit = { <triggers> } <effects> }

planet country pop_faction none Scope
set_policy 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> }

all none Country
recruitable Sets scoped leader as non/recruitable recruitable = yes leader THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Leaders
closest_system 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'> limit = { <triggers> } <effects> }

all none Scope
random_owned_fleet Executes enclosed effects on a random fleet owned by the scoped country that meets the limit criteria random_owned_fleet = {

limit = { <triggers> } <effects> }

country none Scope
random_ambient_object Executes enclosed effects on a random ambient object in the game that meets the limit criteria random_ambient_object = {

limit = { <triggers> } <effects> }

all none Scope
random_system_ambient_object Executes enclosed effects on a random ambient object in the scoped system that meets the limit criteria random_system_ambient_object = {

limit = { <triggers> } <effects> }

galactic_object none Scope
every_ambient_object Executes enclosed effects on every ambient object in the game that meets the limit criteria every_ambient_object = {

limit = { <triggers> } <effects> }

all none Scope
every_system_ambient_object Executes enclosed effects on every ambient object in the scoped system that meets the limit criteria every_system_ambient_object = {

limit = { <triggers> } <effects> }

galactic_object none Scope
set_ambient_object_flag Sets an arbitrarily-named flag on the scoped ambient object set_ambient_object_flag = <key> ambient_object none Control
set_timed_ambient_object_flag Sets an arbitrarily-named flag on the scoped ambient object for a set duration set_timed_ambient_object_flag = {

flag = <key> days = <int> }

fleet none Control
remove_ambient_object_flag Removes a flag from the scoped ambient object remove_ambient_object_flag = <key> ambient_object none Control
every_fleet_in_system Executes enclosed effects on every fleet in the scoped system that meets the limit criteria every_fleet_in_system = {

limit = { <triggers> } <effects> }

galactic_object none Scope
random_fleet_in_system Executes enclosed effects on a random fleet in the scoped system that meets the limit criteria random_fleet_in_system = {

limit = { <triggers> } <effects> }

galactic_object none Scope
set_aggro_range Sets the scoped fleet/country's aggro range in intra-system units set_aggro_range = <int> country fleet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Warfare
set_fleet_stance Sets the stance of the scoped fleet set_fleet_stance = <key, aggressive/passive/evasive> fleet none Ships
set_aggro_range_measure_from 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> country fleet none Warfare
establish_communications_no_message Silently establish communications between scoped country and target country establish_communications_no_message = <target> country none Diplomacy
set_subject_of Sets the scoped country to be a specific subject of target country set_subject_of = { who = <target> subject_type = <key> } country none Control
unassign_leader Unassigns scoped leader from their post or unassigns leader from the scoped planet/ship/fleet/army unassign_leader = <target> ship fleet leader army none Pops
exile_leader_as Exiles the scoped country/fleet/army/pop faction's leader and saves them with a custom name exile_leader_as = <key> country fleet leader army pop_faction THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Leaders
set_leader Reinstates a previously-exiled leader to the scoped country/fleet/army/pop faction set_leader = <key> country fleet army pop_faction none Leaders
add_skill Adds a sum of experience points to the scoped leader add_skill = 200 leader none Leaders
set_skill Sets the scoped leader's level set_skill = 3 leader none Leaders
every_neighbor_system Executes enclosed effects on every one of the scoped system's neighboring systems that meet the limit criteria every_neighboring_system = {

ignore_hyperlanes = <yes/no> limit = { <triggers> } <effects> }

galactic_object none Scope
random_neighbor_system Executes enclosed effects on a random system neigboring the scoped system that meets the limit criteria random_neighboring_system = {

ignore_hyperlanes = <yes/no> limit = { <triggers> } <effects> }

galactic_object none Scope
set_federation_leader Sets a country to lead a federation country none Diplomacy
add_colony_progress Adds to ongoing colonization progress on the scoped planet add_colony_progress = <0.0-1.0> planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
start_colony Starts colonization of the scoped planet start_colony = { } planet none Planets
subtract_variable Decrements a previously-set variable by a specific amount subtract_variable = {

which = <string> value = <int> }

all none Control
multiply_variable Multiplies a previously-set variable by a specific amount multiply_variable = {

which = <string> value = <int> }

all none Control
divide_variable Divides a previously-set variable by a specific amount divide_variable = {

which = <string> value = <int> }

all none Control
play_sound Play the defined sound effect play_sound = myfirstsoundeffect all THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Control
set_crisis_sound Sets the crisis ambient loop to the current effect set_crisis_sound = myfirstsoundeffect all THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Control
stop_crisis_sound Stops the crisis ambient loop stop_crisis_sound = yes all THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Control
set_is_female Sets the gender of the scoped leader set_is_female = true leader THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Leaders
create_fleet_from_naval_cap Creates a new fleet from empire designs up to specified fraction of naval cap create_fleet_from_naval_cap = 0.5 country THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Warfare
remove_opinion_modifier Removes a specific opinion modifier towards target country or any contry from the scoped country remove_opinion_modifier = {

modifier = <key> who = <target (optional)> }

country none Diplomacy
set_war_goal Sets a war goal to the scoped rebel country/war set_war_goal = {

type = <key> target = <target> enemy = <target> }

country war none Country
change_country_flag 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> } }

country none Control
add_threat Adds diplomatic threat from target country add_threat = {

who = <system/planet/country> amount = 4 }

planet country galactic_object none Diplomacy
set_mission Sets the current mission of an observation station fleet none Stations
change_dominant_species 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 }

country none Country
end_rivalry Force-end rivalry with target country end_rivalry = <target> country none Diplomacy
set_species_flag Sets an arbitrarily-named flag on the scoped species set_species_flag = <key> species none Control
set_timed_species_flag Sets an arbitrarily-named flag on the scoped species for a set duration set_timed_species_flag = {

flag = <key> days = <int> }

species none Control
remove_species_flag Removes a flag from the scoped species remove_species_flag = <key> species none Control
auto_move_to_planet Makes a fleet or ship auto-move to target planet auto_move_to_planet = {

target = <planet> clear_auto_move_on_arrival = yes }

ship fleet none Ships
remove_auto_move_target Makes a fleet or ship stop auto-moving remove_auto_move_target = yes ship fleet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Ships
auto_follow_fleet Makes a fleet or ship auto-move to target fleet and potentially attack it auto_follow_fleet = {

target = <fleet> attack_fleet = yes }

ship fleet none Ships
set_closed_borders Changes closed borders status between two countries country none Diplomacy
every_war_participant Iterate through all war participants every_war_participant = {

limit = { <triggers> } <effects> }

war none Scope
repair_percentage Restores all hull points to the scoped ship repair_ship = yes ship fleet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Ships
endgame_telemetry Send endgame telemetry event all THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Control
set_deposit Replaces resource deposit on the scoped planet set_deposit = <key/random> planet none Planets
randomize_flag_symbol Randomizes a country's flag symbol within the selected category randomize_flag_symbol = pirate country THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Country
add_claims Adds claims on target system add_claims = {

who = <country> num_of_claims = x show_notification = no }

galactic_object none Diplomacy
remove_claims Removes claims on target system remove_claims = {

who = <country> num_of_claims = x }

galactic_object none Diplomacy
create_military_fleet Creates a military fleet with the designs of a specified country. all none Warfare
guarantee_country Makes a country guarantee another country country none Diplomacy
every_owned_fleet Executes enclosed effects on every fleet owned by the scoped country that meets the limit criteria every_owned_fleet = {

limit = { <triggers> } <effects> }

country none Scope
every_subject switches Scope to and goes through all Subjects country none Scope
random_subject Scopes to a random Subject country none Scope
set_species_homeworld Defines a homeworld for the current species. species none Species
clear_resources Clears resources of a country country none Planets
reroll_planet_modifiers Rebuild modifiers on target planet reroll_planet_modifiers = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
reroll_deposits Rebuild resource deposits on target planet reroll_deposits = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
delete_fleet Deletes the target fleet (no death graphics) delete_fleet = <target>

}

all none Ships
add_trust Adds trust on scope country towards target country add_trust = {

amount = <amount> who = <target> }

country none Diplomacy
add_tradition Adds the specified tradition to the scoped country. add_tradition = <tradition_key> country none none Country
join_war Joins wars on the side of target country join_war = <target> country none Diplomacy
add_global_ship_design Adds a specific global design to the game add_global_ship_design = <target> all none Ships
every_mining_station Executes enclosed effects on every orbital mining station in the game that meets the limit criteria every_mining_station = {

limit = { <triggers> } <effects> }

planet country none Scope
every_research_station Executes enclosed effects on every orbital mining station in the game that meets the limit criteria every_mining_station = {

limit = { <triggers> } <effects> }

planet country none Scope
set_timed_leader_flag Sets an arbitrarily-named flag on the scoped leader for a set duration set_timed_leader_flag = {

flag = <key> days = <int> }

leader none Control
set_species_identity Sets the current species scopes identity to match the target scopes making them evaluate as the same species in is_same_species trigger. species none Control
pop_force_add_ethic Adds a specific ethic to the scoped pop regardless if pop-species allows ethic divergence or not. pop_add_ethic = <key> pop none Pops
set_empire_name Sets the name of the current Empire. country none Country
set_empire_flag Sets the flag of the current Empire. country none Country
set_planet_name Sets the name of the current planet. planet none Planets
set_fleet_formation Sets a custom fleet formation on a fleet. set_fleet_formation = {

position = { x = 1 y = 1 } position = { x = 2 y = 1 } }

fleet none Ships
create_message Creates a message, can take multiple variables create_message = {

type = BYPASS_EXPLORED localization = BYPASS_EXPLORED_MESSAGE days = 30 target = root variable = { type = name localization = SYSTEM1 scope = from } variable = { type = name localization = SYSTEM2 scope = fromfrom } }

all none Control
set_halted Sets the mega structure upgrade to halted status for n days set_halted = nDays megastructure none Megastructure
upgrade_megastructure_to Starts an upgrade process on a mega structure. upgrade_megastructure_to = <new_type> megastructure THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Megastructure
set_planet_entity Change entity of a planet. planet none Planets
remove_planet Removes the planet from the scope remove_planet = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
set_megastructure_flag Sets an arbitrarily-named flag on the scoped mega structure set_star_flag = <key> megastructure none Control
set_timed_megastructure_flag Sets an arbitrarily-named flag on the scoped mega structure for a set duration set_timed_megastructure_flag = {

flag = <key> days = <int> }

megastructure none Control
remove_megastructure_flag Removes a flag from the scoped mega structure remove_megastructure_flag = <key> megastructure none Control
destroy_ship Destroys the target ship (with death graphics) destroy_ship = <target> all none Ships
delete_ship Deletes the target ship (no death graphics) delete_ship = <target> all none Ships
change_species Changes the species of the scoped object change_species = <target> country ship pop leader army none Species
change_leader_portrait Changes the portrait of the leader in scope. change_leader_portrait = <key or species event target> leader none Leaders
resettle_pop Instantly resettles pop resettle_pop = {

pop = <target pop> planet = <target planet> tile = <target tile> }

all none Pops
set_citizenship_type Set citizenship type for scoped species/pop/leader set_citizenship_type = {

country = <target> type = citizenship_full cooldown = yes }

pop leader species none Species
set_military_service_type Set military service type for scoped species/pop/leader set_military_service_type = {

country = <target> type = military_service_full cooldown = yes }

pop leader species none Species
set_purge_type Set purge type for scoped species/pop/leader set_purge_type = {

country = <target> type = purge_full cooldown = yes }

pop leader species none Diplomacy
set_slavery_type Set slavery type for scoped species/pop/leader set_slavery_type = {

country = <target> type = slavery_livestock cooldown = yes }

pop leader species none Species
set_population_controls Set population control for scoped species/pop/leader set_population_controls = {

country = <target> type = yes cooldown = yes }

pop leader species none Species
set_migration_controls Set migration control for scoped species/pop/leader set_migration_controls = {

country = <target> type = yes cooldown = yes }

pop leader species none Species
set_living_standard Set living standard for scoped species/pop/leader set_living_standard = {

country = <target> type = living_standard_good cooldown = yes }

pop leader species none Species
shift_ethic Shifts an empire towards a specific ethic, adjusting aferwards to keep number of ethics points consistent shift_ethic = <key> country none Country
pop_change_ethic Changes scoped pop to chosen ethic pop_change_ethic = <key> pop none Pops
clear_ethos Clears all ethics of specified pop or country clear_ethos = yes country pop THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Country
clear_planet_modifiers Clear modifiers on target planet

(not currently working)

clear_planet_modifiers = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
remove_all_armies Removes all armies on scoped planet remove_all_armies = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Armies
mutate_species Randomly mutate a species. species THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Species
rename_species use one of the following: rename_species = {

}

species none Species
reset_years_of_peace Resets years of peace for a country. country THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Warfare
add_ruler_trait Adds a specific ruler trait to the scoped leader, even if they are not currently ruler; it becomes active when they become ruler add_ruler_trait = <trait> leader none Leaders
remove_ruler_trait Removes a specific ruler trait from the scoped leader, even if they are not currently ruler; this is relevant if they ever become ruler remove_ruler_trait = <trait> leader none Leaders
add_notification_modifier Add a notification modifier to the country add_notification_modifier = <key> country THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Control
remove_notification_modifier Remove a notification modifier to the country remove_notification_modifier = <key> country THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Control
set_city_graphical_culture Sets the scoped country's city graphical culture set_city_graphical_culture = <key> country none Country
set_player Assign the player of the target country to play the scoped country instead event_target:new_country = {

set_player = event_target:old_country }

country none Country
change_species_characteristics Changes the characteristics of a species change_species_characteristics = {

portrait = <key or species event target> }

species none Species
copy_techs_from 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 = {} country none Country
create_bypass Creates a bypass in the parent SpatialObject (stored in FromFrom), of the type passed in "type". megastructure none ???
activate_gateway Activates the gateway associated with a megastructure. all THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Megastructure
spawn_natural_wormhole Spawns a new natural wormhole in the scoped system. spawn_natural_wormhole = {

bypass_type = <wormhole/sealed_wormhole> orbit_distance = 100 orbit_angle = 90 random_pos = yes/no }

galactic_object none Systems
link_wormholes Link the wormhole from the scoped system to the wormhole in the target system. link_wormholes = from galactic_object THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Systems
create_starbase Creates a starbase in orbit of the star of the scoped galactic object create_starbase = { } galactic_object none Systems
set_starbase_size Sets the ship size of a starbase set_starbase_size = <ship_size> starbase none Diplomacy
set_starbase_module Sets a module in a slot on a starbase set_starbase_module = {

slot = <int> module = <starbase_module> }

starbase none Starbase
set_starbase_building Sets a building in a slot on a starbase set_starbase_building = {

slot = <int> buiding = <starbase_buildin> }

starbase none Starbase
add_casus_belli Adds a Casus Belli to the scoped country against the target country. add_casus_belli = {

type = cb_subjugation who = <country> days = 10 }

country none Warfare
get_galaxy_setup_value 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 = <int> ] }

all none Control
finish_upgrade Finish the current upgrade of a Mega Structure. megastructure none Megastructure
effect_on_blob Executes an effect on systems with planets owned by the scoped country, starting at an origin, and until a certain percentage of owned planets matching the planet_limit has been covered. effect_on_blob = { } country none Control
add_seen_bypass_type Makes the scoped country remember that it has encountered the bypass type add_seen_bypass_type = bypass_type country none ???
add_seen_bypass Makes the scoped country remember that it has encountered the bypass add_seen_bypass = FROM country THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV ???
set_fleet_bombardment_stance Sets the bombardment stance of the scoped fleet set_fleet_stance = selective fleet none Ships
check_casus_belli_valid Re-evaluate the specified casus belli type with given target country check_casus_belli_valid = { } country none Warfare
copy_ethos_and_authority Makes the scoped country copy the ethos and government authority of the target country. copy_ethos_and_authority = FROM country THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Country
clone_leader Clones the last created leader for the scoped country clone_leader = { } country none Leaders
set_home_base Set the home base of the scoped fleet to the specified starbase set_home_base = event_target:cool_starbase fleet ??? Ships
add_hyperlane Adds a hyperlane between two systems add_hyperlane = {

from = <system> to = <system> }

all none Systems
remove_hyperlane Removes existing hyperlane between two systems remove_hyperlane = {

from = <system> to = <system> }

all none Systems
else_if 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> }

all none Control
create_saved_leader Creates a new saved leader for the scoped country with a lookup key create_saved_leader = { } country none Leaders
remove_saved_leader Removes a saved leader for the scoped country with a lookup key remove_saved_leader = <string> country none Leaders
activate_saved_leader Moves a saved leader to the active for the scoped country with a lookup key activate_saved_leader = { } country none Leaders
add_relic Adds the specified relic to the scoped country. add_relic = <relic_key> country none Archeology
remove_relic Removes the specified relic from the scoped country. remove_relic = <relic_key> country none Archeology
delete_megastructure Deletes the target mega structure (no death graphics) delete_megastructure = <target> all none Megastructure
add_random_research_option Adds s 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 = { } country none Country
add_asteroid_belt Adds an asteroid belt at the distance in the scope. galactic_object none Systems
set_asteroid_belt Sets an asteroid belt at the distance in the scope. galactic_object none Systems
fleet_action_research_special_project Sends a fleet to research a special project fleet_action_research_special_project = {

special_project = test_project target = event_target:project_planet }

fleet none Ships
remove_last_built_district Removes last built district from the scoped planet remove_last_built_district = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
remove_all_districts Removes all districts from the scoped planet remove_all_districts = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
remove_district Removes a specific district from the scoped planet remove_district = <key> planet none Planets
add_district Begins construction of a specific district on the scoped tile add_district = <key> planet none Planets
enable_on_market Enables a resource on the Galactic Market enable_on_market = <resource_key> all none Diplomacy
enable_galactic_market Enables the galactic market. enable_galactic_market = <yes/no> country THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Diplomacy
add_timed_trait Adds a specific trait to the scoped leader for a specific duration add_timed_trait = {

trait = <trait> days/months/years = <value> }

leader none Leaders
create_archaeological_site Creates a archaeological site associated with the scope object create_archaeological_site = <site type> megastructure planet ship fleet galactic_object ambient_object starbase none Archeology
destroy_archaeological_site Destroys a archaeological site in right hand site event target destroy_archaeological_site = <event target> all ??? Archeology
add_stage_clues Adds clues to the current stage of a archaeological site add_stage_clues = <int> archaeological_site THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Archeology
add_expedition_log_entry Adds clues to the current stage of a archaeological site add_stage_clues = <int> archaeological_site none Archeology
reset_current_stage Resets the current stage reset_current_stage = yes/no

no = does not change difficulty

archaeological_site THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Archeology
finish_current_stage Finish the current stage finish_current_stage = yes/no/<country>

country = use this country instead of excavator, no stage complete will be triggered.

archaeological_site none Archeology
finish_site Finish the whole archaeological site finish_site = yes/no/<country>

country = use this country instead of excavator, no stage complete will be triggered.

archaeological_site none Archeology
set_site_progress_locked Locks or unlocks the progress of a site set_site_progress_locked = yes/no archaeological_site THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Leaders
custom_tooltip_with_params Displays a specific localization string with parameters in tooltip custom_tooltip_with_param = { } all none Control
steal_relic Steal all/a random/a specific relic from a target country steal_relic = {

target = <Target Country> relic = <relic_name/all/random> }

country none Control
validate_planet_buildings_and_districts Rebuild modifiers on target planet reroll_planet_modifiers = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Control
country_event Fires a country event for the scoped country, with optional DAYS and RANDOM delay country_event = {

id = <event id> days = 30 random = 8 }

country none Control
planet_event Fires a planet event for the scoped planet, with optional DAYS and RANDOM delay planet_event = {

id = <event id> days = 30 random = 8 }

planet none Control
random All enclosed effects may or may not be executed depending on set chance random = {

chance = 50 <effects> }

all none Control
create_ship_design 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> }

all none Ships
change_government Change the scoped country's government authority and/or civics change_government = random country none Country
ship_event Fires a ship event for the scoped ship, with optional DAYS and RANDOM delay ship_event = {

id = <event id> days = 30 random = 8 }

ship none Control
pop_event Fires a pop event for the scoped pop, with optional DAYS and RANDOM delay pop_event = {

id = <event id> days = 30 random = 8 }

pop none Control
enable_special_project Enables a specific special research project for target country at a specific location (should be same as the current scope where possible) enabble_special_project = {

name = <project key> owner = <target> location = <target, ideally THIS> }

all none Control
add_resource Adds specific resource to the stockpile for the country scope: add_resource = { } country none Country
fleet_event Fires a fleet event for the scoped fleet, with optional DAYS and RANDOM delay fleet_event = {

id = <event id> days = 30 random = 8 }

fleet none Control
random_planet_within_border Executes enclosed effects on a random planet within the scoped country's borders that meets the limit criteria random_planet_within_border = {

limit = { <triggers> } <effects> }

country none Scope
pop_remove_ethic Removes a specific ethic from the scoped pop pop_remove_ethic = <key> pop none Pops
create_rebels Creates a rebellion create_rebels = { } planet none Warfare
cancel_terraformation Cancels terraformation of the scoped planet cancel_terraformation = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
set_primitive_age Sets a 'primitive age' for the scoped (primitive, pre-FTL) country set_primitive_age = renaissance_age country none Species
while Repeats enclosed effects while limit criteria are met or until set iteration count is reached while = {

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

all none Control
clear_blocker Clears scoped deposit blocker and fires its on_cleared effect clear_blocker = yes deposit none Planets
every_system_in_cluster Executes enclosed effects on every system in the cluster that meet the limit criteria every_system_in_cluster = {

limit = { <triggers> } <effects> }

all none Scope
create_cluster Creates a cluster centered around the specified spatial object all none Systems
remove_army Removes the scoped army remove_army = yes army THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Armies
prevent_anomaly Disables or enables anomaly generation for the scoped planet prevent_anomaly = yes planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
observation_outpost_owner Executes enclosed effects on the owner of the observation post in orbit around the scoped planet observation_outpost_owner = { <effects> } planet ??? Scope
observation_outpost Executes enclosed effects on every observation post in the game that meets the limit criteria observation_outpost = {

limit = { <triggers> } <effects> }

planet country none Scope
add_deposit Adds resource deposit to the scoped planet add_deposit = <key/random> planet none Planets
clear_deposits Removes all deposits from the scoped planet clear_deposits = yes planet none Planets
set_country_type Changes the country type of the scoped country set_country_type = <key> country none Country
set_age Sets the age of the scoped leader set_age = <int> leader THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Leaders
conquer Conquers the planet by setting its owner to target country and adding an unhappiness modifier conquer = <target country> planet none Warfare
pop_faction_event Fires a pop faction event for the scoped pop faction, with optional DAYS and RANDOM delay pop_faction_event = {

id = <event id> days = 30 random = 8 }

pop_faction none Control
set_pop_faction_flag Sets an arbitrarily-named flag on the scoped pop's faction/pop faction set_pop_faction_flag = <key> pop pop_faction none Pops
remove_pop_faction_flag Removes a flag from the scoped pop's faction/pop faction remove_pop_faction_flag = <key> pop pop_faction none Control
set_timed_pop_faction_flag Sets an arbitrarily-named flag on the scoped pop faction for a set duration set_timed_pop_faction_flag = {

flag = <key> days = <int> }

pop pop_faction none Control
add_tech_progress Gives percentage progress (0.0-1.0) in a specific tech to the scoped country add_tech_progress = {

tech = <key> progress = <float> }

country none Country
abort_special_project Aborts a specific special project for the country, removing it from the situation log abort_special_project = {

type = <project key> location = <target> }

country none Control
every_pop_faction Executes enclosed effects on every pop faction within the scoped country that meets the limit criteria every_pop_faction = {

limit = { <triggers> } <effects> }

country none Scope
random_pop_faction Executes enclosed effects on a random pop faction within the scoped country that meets the limit criteria random_pop_faction = {

limit = { <triggers> } <effects> }

country none Scope
observer_event Fires an observer event for all observers. all none Control
set_custom_capital_location Sets a custom spatial object as custom country capital location. country none Country
spawn_planet Spawns a planet in a system. galactic_object none Systems
spawn_megastructure Spawns a mega structure in a system. galactic_object none Megastructure
remove_megastructure Removes a mega structure. remove_megastructure = <target mega structure> all none Megastructure
trigger_megastructure_icon if a planet has trigger_megastructure_icon = yes then the map icon for the star will show a megastructure icon planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Leaders
run_ai_strategic_data Recomputes ALL strategic data for AI = yes country THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Control
add_static_war_exhaustion Adds static war exhaustion, scaled with value_for_planet_destruction, to owner of the battle location owner = {

add_static_war_exhaustion = { attacker = <country> location = <planet> value_for_planet_destruction = <0.0-1.0> #scales the amount WE that is added } } }

country none Warfare
set_planet_size Adds/Removes tiles to/from the scoped planet to adjust its planet size set_planet_size = <int> planet THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Planets
run_ai_strategic_war_data Recomputes strategic war ( attack / defense ) data for AI = yes country THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Control
expire_site_event Manually flags an archaeological event as expired expire_site_event = ancrel.7003 archaeological_site none Archeology
every_system_planet Executes enclosed effects on every planet within the scoped system that meets the limit criteria random_system = {

limit = { <triggers> } <effects> }

galactic_object none Scope
surveyed Sets the planet as un/surveyed by target country surveyed = {

set_surveyed = yes surveyor = <target> }

planet none Control
join_alliance Join federation with target join_alliance = {

who = <target> override_requirements = yes/no }

country none Diplomacy
create_leader Creates a new leader for the scoped country create_leader = { } country none Leaders
set_disabled Enables or disables the scoped ship set_disabled = no ship THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Ships
else Executes enclosed effects if limit criteria of preceding 'if' or 'else_if' is not met if = {

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

all none Control
log Prints a message to game.log for debugging purposes. all THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV Control
debug_break Trigger an assertion to stop the debugger when encountering this effect; argument is ignored debug_break = yes all none Control
inverted_switch Executes the first appropriate effect set for a specific trigger treated as NOT. inverted_switch = { } all none Control
random_owned_army Iterate through each army that is owned by the country random_owned_army = {

limit = { <triggers> } <effects> }

country none Scope
every_owned_army Iterate through each army that is owned by the country every_owned_army = {

limit = { <triggers> } <effects> }

country none Scope
random_planet_army Iterate through each defending army on a planet random_planet_army = {

limit = { <triggers> } <effects> }

planet none Scope
every_planet_army Iterate through each defending army on a planet every_planet_army = {

limit = { <triggers> } <effects> }

planet none Scope
random_relation Iterate through all relations random_relation = {

limit = { <triggers> } <effects> }

country none Scope
every_relation Iterate through all relations every_relation = {

limit = { <triggers> } <effects> }

country none Scope
random_neighbor_country Iterate through all neighbor countries random_neighbor_country = {

limit = { <triggers> } <effects> }

country none Scope
every_neighbor_country Iterate through all neighbor countries every_neighbor_country = {

limit = { <triggers> } <effects> }

country none Scope
random_bordering_country Iterate through all bordering countries of a system random_bordering_country = {

limit = { <triggers> } <effects> }

galactic_object none Scope
every_bordering_country Iterate through all bordering countries of a system every_bordering_country = {

limit = { <triggers> } <effects> }

galactic_object none Scope
random_combatant_fleet Iterate through each fleet this fleet is in combat with random_combatant_fleet = {

limit = { <triggers> } <effects> }

fleet none Scope
every_combatant_fleet Iterate through each fleet this fleet is in combat with every_combatant_fleet = {

limit = { <triggers> } <effects> }

fleet none Scope
random_pool_leader Iterate through each leader that is recruitable for the country random_pool_leader = {

limit = { <triggers> } <effects> }

country none Scope
every_pool_leader Iterate through each leader that is recruitable for the country every_pool_leader = {

limit = { <triggers> } <effects> }

country none Scope
random_megastructure Iterate through each megastructure random_megastructure = {

limit = { <triggers> } <effects> }

all none Scope
every_megastructure Iterate through each megastructure every_megastructure = {

limit = { <triggers> } <effects> }

all none Scope
random_owned_megastructure Iterate through each owned megastructure random_owned_megastructure = {

limit = { <triggers> } <effects> }

country none Scope
every_owned_megastructure Iterate through each owned megastructure every_owned_megastructure = {

limit = { <triggers> } <effects> }

country none Scope
random_system_megastructure Iterate through each megastructure in system random_system_megastructure = {

limit = { <triggers> } <effects> }

all none Scope
every_system_megastructure Iterate through each megastructure in system every_system_megastructure = {

limit = { <triggers> } <effects> }

all none Scope
random_owned_pop_species Iterate through each species of a country's owned pops random_owned_pop_species = {

limit = { <triggers> } <effects> }

country none Scope
every_owned_pop_species Iterate through each species of a country's owned pops every_owned_pop_species = {

limit = { <triggers> } <effects> }

country none Scope
random_owned_starbase Iterate through every owned starbase random_owned_starbase = {

limit = { <triggers> } <effects> }

country none Scope
every_owned_starbase Iterate through every owned starbase every_owned_starbase = {

limit = { <triggers> } <effects> }

country none Scope
random_system Iterate through all systems random_system = {

limit = { <triggers> } <effects> }

all none Scope
every_system Iterate through all systems every_system = {

limit = { <triggers> } <effects> }

all none Scope
random_system_within_border Iterate through all systems within the country's borders random_system_within_border = {

limit = { <triggers> } <effects> }

country none Scope
every_system_within_border Iterate through all systems within the country's borders every_system_within_border = {

limit = { <triggers> } <effects> }

country none Scope
random_war_participant Iterate through all war participants random_war_participant = {

limit = { <triggers> } <effects> }

war none Scope
random_sector Iterate through all sectors random_sector = {

limit = { <triggers> } <effects> }

all none Scope
every_sector Iterate through all sectors every_sector = {

limit = { <triggers> } <effects> }

all none Scope
random_owned_sector Iterate through every owned sector random_owned_sector = {

limit = { <triggers> } <effects> }

country none Scope
every_owned_sector Iterate through every owned sector every_owned_sector = {

limit = { <triggers> } <effects> }

country none Scope

Depreciated[edit]

set_primitive [DEPRECATED, USE SET_COUNTRY_TYPE] Sets the scoped country as primitive
set_primitive = yes
country THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV

Scripted Effects[edit]

There are more than singular Effects can be used for an Effect. See Scripted Effects for details.


Empire EmpireEthicsGovernments • Civics • OriginsMandatesAgendasTraditions • Ascension PerksEdictsPoliciesRelicsTechnologiesCustom Empires
Pops JobsFactions
Leaders LeadersLeader Traits
Species SpeciesSpecies Traits
Planets PlanetsPlanetary Feature • Orbital DepositBuildings • DistrictsPlanetary Decisions
Systems SystemsStarbasesMegastructuresBypassesMap
Fleets FleetsShips • Components
Land Warfare ArmiesBombardment Stance
Diplomacy Diplomacy • Federations • Galactic CommunityOpinion ModifiersCasus Belli • War Goals
Events EventsAnomaliesSpecial projectsArchaeological Sites
Gameplay GameplayDefinesResources • Economy
Dynamic modding EffectsConditionsScopesModifiersVariablesAI
Media/localisation Maya exporterGraphicsPortraitsFlagsEvent picturesInterfaceIconsMusicLocalisation
Other Console commandsSave-game editingSteam Workshop