Conditions

From Stellaris Wiki
Jump to: navigation, search

Version

Outliner top.png
This article may contain outdated information that is inaccurate for the current version of the game. It was last updated for 1.4.

Logical operators[edit]

Operators allow conditions and triggers to be manipulated in order to return a simple true or false statement to be processed.

Name Description Example
If Returns true if the conditional statement inside the block evaluates to true.
   If ={ 
       owner ={ 
           has_ethic = fanatic_xenophile 
       } 
   }
And Returns true if all conditional statements inside the block evaluates to true.
   And ={ 
       owner ={
           has_ethic = fanatic_xenophile
       } 
       owner ={ 
           has_ethic = individualist 
       } 
   }
Or Returns true if at least one conditional statement inside the block evaluates to true.
   Or ={ 
       owner ={
           has_ethic = fanatic_xenophile
       } 
       owner ={ 
           has_ethic = individualist 
       } 
   }
Not Negates the conditional statement contained inside the block. Turns a statement returning false into true, and vice versa.
   Not ={
       owner = {
           has_ethic = fanatic_xenophile
       } 
   } 
Nor Neither one of statements below should be true
   Nor ={
       has_ethic = fanatic_xenophile
       has_ethic = fanatic_militarist
   } 

Scopes[edit]

Scopes specify the target of the trigger or condition in question. They allow for variables to be checked on other objects that the trigger script is not attached to. Currently, Stellaris recognises a set of keywords as valid scopes. These are outlined in the table below.

Name Description
capital If the script this belongs to is attached to a nation, capital will return the capital planet of the nation.
controller Returns the empire which may be not owner, but currently control this object (i.e. in case of occupation)
root Returns the object that the script belongs to. If called on a planet-level script, then this returns the planet.
from Returns the location of the object that the script belongs to. If this is attached to a ship-level script, then this returns the ship's current planet.
fromfrom Returns the location of the object that the script belongs to, twice removed. If this is attached
owner Returns the empire that has control over the object that the script belongs to.
prev Returns the object from previous scope
prevprev  ??
prevprevprev  ??
prevprevprevprev  ??
random  ??
this Returns the current scope object in the cycle (i.e., for example, each instance in every_sector)

Trigger list[edit]

Triggers, dumped from the triggers_doc ingame command.

Name Desc Scopes Target
text shows custom text  ???
custom_tooltip shows a custom tooltip for the effects within  ???
if a conditional trigger  ???
and all inside trigger must be true  ??? capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
or at least one entry inside trigger must be true  ??? capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
not negates content of trigger  ??? capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
happiness Compares pop happiness (not to be confused with the modifier pop_happiness which is applied to country) pop
has_ring Checks if a planet has a ring or not (bool) planet none
hidden_trigger hides the tooltip for the effects within  ??? capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
has_owner checks if a planet is colonized planet none
any_owned_planet switches Scope to and goes through each owned planet (but not occupied planets) country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
any_controlled_planet switches scope to and goes through each controlled planets (= owned planets + occupied planets) country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
is_ai checks if a country is AI controlled country
always either always false or true  ???
has_trait checks if an empire's dominant species, pop, or leader has a certain Trait country pop
has_ethic checks if an empire's dominant species has a certain Ethic country pop
is_moon checks if a planet is a moon planet none
opinion Checks this country's opinion value of target country country  ???
any_pop switches scope to and goes through each pop unit on the planet or all pops of the scope species planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
is_owned_by checks if a planet or galactic object is owned by target empire planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
is_same_species checks if a pop or empire is of the same species as another pop or empire country pop capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
any_war_defender switches scope to and goes through each defender in the war against a specified enemy country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
any_war_attacker switches scope to and goes through each attacker in the war against a specified enemy country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
ideal_planet_class Checks the ideal planet class of a target country country
is_same_empire checks if an empire is the same as another country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
is_planet_class checks if a planet is of a certain class planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
has_strategic_resource checks if a planet has a specific strategic resource planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
is_star_class checks if a planet star is of a certain class planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
distance Compares the min/max distance to a target with a value fleet planet pop ship none
has_technology checks if a country has a technology of at least a specific level country
has_planet_modifier checks if a planet has a planet modifier planet none
has_planet_flag checks if a planet has a specified flag planet none
has_country_flag checks if a country has a specified flag country
has_fleet_flag Checks if a fleet has a specified flag fleet
has_ship_flag checks if a ship has a specified flag ship
is_ship_class checks if a ship is a specified class fleet ship
is_ship_size checks if a ship is a specified size fleet ship
is_capital checks if a planet is its owners capital planet none
has_ground_combat checks if a planet has ground combat planet none
is_at_war checks if a country is at war country
num_owned_planets compares the number of owned planets in a country with a value country
has_government checks if a country has a specified government country
num_pops compares the number of pops on a planet with a value country planet none
is_primitive Checks if a country is primitive (bool) country
is_inside_nebula checks if a planet/ship is inside a nebula fleet planet ship none
is_pirate Checks if a country is a pirate country (bool) country
is_inside_border checks if a planet/ship/fleet is inside the border of the specified country fleet planet ship capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
any_country Trigger Scope for any country  ??? capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
planet_size compares the planet size planet  ??? none
any_planet any planet in a solar system or sector (use any_controlled_planet or any_owned_planet for country) galactic_object, sector capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
influence Checks country influence country
is_star checks if a planet is a star planet none
is_asteroid checks if a planet is an asteroid planet none
is_at_war_with checks if an empire is at war with another empire country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
their_opinion Checks target country's opinion value of this country country  ???
is_same_species_class checks if a pop or empire is of the same species class as another pop or empire country pop capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
has_alliance Checks if a country is in an alliance (bool) country
has_federation Checks if a country is in an federation (bool) country
is_colonizable Checks if a planet is colonizable (bool) planet none
gender Checks the gender of a leader  ???
has_level Checks if leader has at least specified level of specified skill  ???
num_minerals compares the number of minerals on a planet with a value planet none
num_physics compares the number of physics resources on a planet with a value planet none
num_society compares the number of society resources on a planet with a value planet none
num_engineering compares the number of engineering resources on a planet with a value planet none
num_modifiers Compares the number of modifiers on a planet with a value planet none
has_any_strategic_resource Checks whether a planet has any strategic resource (bool) planet none
free_leader_slots Compares the number of free leader slots country fleet planet pop ship none
has_pop_flag Checks if a pop has a specified flag pop
is_occupied_flag Checks if a planet is under military occupation planet none
can_colonize checks if a planet is colonizable by a country's founder species planet none
can_join_factions checks if scoped pop can join a factions pop
is_damaged Checks if a ship is damaged ship
has_hp Compares the hit points of a ship with a value ship
is_surveyed Checks if a planet/system as been survey by specified country planet none
has_global_flag Checks a global trigger country fleet planet pop ship none
check_variable Compares the variable value country fleet planet none
any_planet_within_border switches Scope to and goes through each random planet within border country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
any_owned_ship any ship owned by a country country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
any_ship any ship in the game  ??? capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
energy Checks for country energy country
pop_has_ethic checks if a pop has a certain Ethic pop
pop_has_trait checks if a pop has a certain trait pop
is_colony checks if a planet is a colony planet none
habitability Checks for species habitability on current planet planet none
has_building checks if a planet or tile has a building planet none
is_controlled_by checks if a planet is controlled by a certain country planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
is_terraformed checks if a planet has ever been terraformed planet none
is_terraforming checks if a planet is being terraformed right now planet none
has_planet_edict checks if a planet has an edict planet none
has_country_edict checks if a country has an edict country
has_observation_outpost checks if a planet has an observation outpost planet none
is_federation_leader checks if a country is a federation leader country
starting_system checks if a system is the starting system for an empire
has_star_flag checks if a star has a specified flag
has_mining_station checks if a planet has a mining station planet none
has_research_station checks if a planet has a research station planet none
has_spaceport checks if a planet has a spaceport planet none
any_spaceport any spaceport trigger planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
any_research_station any research station outpost planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
any_mining_station any mining station outpost planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
any_system any system trigger  ??? capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
any_system_within_border any system within border trigger country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
army_type checks what type an army type is
has_army checks if a planet has an army planet none
is_advisor_active checks if a country has an advisor country
count_pops Counts the amount of pops which fill a requirement and compare it to a number planet none
is_enslaved checks if a pop is enslaved pop
is_being_purged checks if a pop is being exterminated pop
graphical_culture checks if a country has specified graphical culture country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
income Compares country income. country
expenses Compares country expenses. country
produced_energy Compares the amount of produced energy of a country. country
trade_income Compares the previous months income from the trade of a country. country
trade_expenses Compares the previous months expenses from the trade of a country. country
ship_maintenance Compares the previous months ship maintenance of a country. country
army_maintenance Compares the previous months army maintenance of a country. country
colony_maintenance Compares the previous months colony maintenance of a country. country
station_maintenance Compares the previous months station maintenance of a country. country
construction_expenses Compares the previous months construction expenses of a country. country
federation_expenses Compares the previous months federation expenses of a country. country
has_anomaly checks if a planet has an anomaly planet none
stored_physics_points Compares the amount of stored physics points a country has. country
stored_society_points Compares the amount of stored society points a country has. country
stored_engineering_points Compares the amount of stored engineering points a country has. country
balance Compares country balance. country
running_balance Compares country running balance. country
is_planet checks if a planet is of the same as the scope planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
is_pop checks if a pop is of the same as the scope pop capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
is_ship checks if a ship is of the same as the scope planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
is_army checks if an army is of the same as the scope capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
is_country checks if a country is of the same as the scope country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
is_tutorial_level Compares the tutorial level of the player of a country. country
is_multiplayer checks if the game is running in multiplayer  ???
has_event_chain checks if the country has an event chain country
is_species_class Checks if the founder species of a country, or a pop is of a specific species country pop capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
vassals compares the number of vassals country  ???
has_opinion_modifier checks if the country has an opinion modifier country
has_established_contact checks if the country has contact with another country. country
has_completed_event_chain_counter checks if the country has completed counter in event chain. country
has_planet_class checks if a star has planet of certain class capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
is_disabled checks if a ship or fleet is disabled fleet ship  ???
has_existing_ship_design checks if a country has a specific ship design country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
has_grown_pop Checks if a planet or tile has a grown pop planet  ??? none
has_growing_pop Checks if a planet or tile has a growing pop planet  ??? none
has_resource Compares the resources of planet or tile. planet  ??? none
has_building_construction checks if a planet or tile has a building construction planet none
any_neighboring_tile switches scope to and goes through each neighboring tile capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
any_tile switches scope to and goes through each tile planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
has_blocker checks if a planet or tile has a blocker planet none
free_pop_tiles compares a value with the amount of free tiles for pops planet  ??? none
free_building_tiles compares a value with the amount of free tiles for buildings planet  ??? none
has_relation_flag checks for relation flags country  ???
reverse_has_relation_flag checks for reverse relation flags country  ???
exists checks for object existence  ???  ???
has_edict checks if a planet or country has an edict activated country planet  ??? none
has_moon checks if a planet has a moon planet none
num_moons Compares number of moons of planet. planet none
is_in_cluster checks if a galactic object belongs to a cluster planet  ??? none
any_moon any moon trigger planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
num_adjacent_tiles adjacent tiles with a value
is_sentient checks if a pop is sentient pop
leader_class checks if a leader is a specific type capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
is_preventing_anomaly checks if a planet is currently preventing anomalies country fleet planet pop ship none
observation_outpost_owner Owner of an observation outpost planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
observation_outpost observation outpost planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
has_deposit checks if a tile/planet has a deposit planet none
has_deposit_for checks if a tile has a deposit for specific ship class planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
colony_age colony age in months compared with a value planet none
is_rim_system checks if a system is on the galactic rim country fleet planet pop ship none owner
any_rim_system switches scope to and goes through each rim system capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
has_mission checks if a fleet has a certain mission fleet
is_country_type checks if country is of specified type country
has_modifier checks if scope object has a modifier country planet pop none
switch Switches between scopes  ???  ???
sectors Compares number of sectors country
num_fleets checks if a country has the said number of fleets country  ???
num_ships checks if a country has the said number of ships country fleet  ???
any_ship_in_system any ship in system capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
mission_progress checks if a mission has a certain progress fleet
num_ethics compares the number of ethics with a value country pop
num_traits compares the number of traits with a value country pop
has_truce checks if a country has truce with certain country country
has_access_military checks if a country has military access to a system  ???
has_access_civilian checks if a country has civilian access to a system  ???
has_access_construction checks if a country has constraction access to a system  ???
is_ringworld checks if a planet is a ringworld planet none
member_of_faction Checks if pop is a member of a faction ( targets yes/no/specific faction ) pop capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
support Compares the relative support of a pop faction
is_ideal_planet_class Checks if a planet is of ideal class for country planet none
is_pop_faction_type Checks if pop faction is specific type capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
is_same_value checks if two scopes have the same value  ??? capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
sector_controlled Checks if the planet/fleet is controlled by the sector fleet planet none
sectors_over_limit Compares number of sectors over the limit country
is_orbital_tile Checks if a tile is the tile that stations collect from
orbital_bombardment Checks the orbital bombardment status of a planet planet none
intel_level checks if scope-country has intel level </>/= [level] in [system] ( intel_level = { level > low system = FROMFROM } ) country
members compares the number of alliance members
is_researching_area checks if a leader is researching a specific area capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
any_owned_leader switches Scope to and goes through each owned leader country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
any_owned_pop switches scope to and goes through each pop unit on the planet or all pops of the scope species country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
has_faction checks if an empire has a certain faction type country
count_owned_pops Counts the amount of pops which fill a requirement and compare it to a number country
can_declare_war Checks if we can declare war against a target country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
is_hostile Checks if country is hostile against a target country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
has_communications Checks if country has communication with another country country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
has_country_resource Compares the stored resources of a country. country  ???
has_leader_flag checks if a leader has a specified flag
num_killed_ships Compares how many ships scope country has killed of [target] country  ???
num_taken_planets Compares how many planets scope country has taken from [target] country  ???
count_ships compares number of ships in a fleet that matches the [limit = {..}] fleet  ???
count_owned_ships compares number of ships in a country that matches the [limit = {..}] country  ???
has_pop_faction_flag checks if a pop faction has a specified flag pop
research_leader switches Scope to and goes to research leader country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
leader_of_faction Checks if leader is the leader of a faction ( targets yes/no/specific faction ) capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
is_scope_valid Checks if the current scope is valid  ???
opposing_ethics_divergence Compares the opposing ethics divergence. country pop  ???
is_war_leader Checks if country is war leader country
can_create_sector Checks if a sector can be created on the targeted planet country owner
is_in_alliance_with Checks if country is in an alliance with target country country
is_in_federation_with Checks if country is in a federation with target country country
can_change_policy Checks if a country can change anything with a policy country  ???
count_pop_factions Counts the amount of pop factions which fill a requirement and compare it to a number country
has_fleet_order checks if a ship or a fleet has a fleet order fleet ship
closest_system switches scope to closest system that passes limit  ???  ???
num_communications compares the number of planets on a planet with a value country
is_ironman Check if current game is ironman.  ???
has_monthly_income checks monthly income of resource compared against specific value country  ???
last_changed_policy checks the last changed policy of a country against specified policy country  ???
any_sector switches scope to and goes through each sector of a country country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
has_policy_flag checks if a country has a policy country
any_owned_fleet any fleet owned by a country country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
count_deposits counts number of deposits of given type on planet or tile planet  ??? none
has_ground_support_stance checks if a fleet has a certain bombardment stance fleet
has_tech_option checks if a country has a technology option country
is_species Checks if the founder species of a country, or a pop is of a specific species pop capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
count_tech_options Compares the amount of tech options a country has against a value, can specify which area country  ???
last_increased_tech Compares against the last increased tech of a country country last_increased_tech = { tech = tech_repeatable_weapon_type_strike_craft_fire_rate level > 0 }, last_increased_tech = tech_strike_craft_1
has_country_strategic_resource Compares the resources of a country. country  ???
has_point_of_interest Checks if the scope location has a point of interest country planet ship has_point_of_interest = { poi = <id> }
is_point_of_interest Checks if the scoped location has a point of interest system planet  ???
is_being_repaired Checks if a fleet or ship is being repaired fleet ship
any_war switches Scope to any war country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
any_defender switches Scope to any defender in the war capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
any_attacker switches Scope to any attacker in the war capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
has_orbital_station checks if a planet has an orbital station planet none
any_orbital_station any orbital station planet capital controller from fromfrom none owner prev prevprev prevprevprev prevprevprevprev random root this
has_prev_building checks if a tile previously had a building (only latest building)
any_ambient_object any ambient object trigger  ??? capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
any_system_ambient_object any system ambient object trigger capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
has_ambient_object_flag checks if an ambient object has a specified flag
war_demand_counter Compares a war demand trigger  ???
attacker_war_score checks the war score of the attackers in a war  ???
defender_war_score checks the war score of the defenders in a war  ???
off_war_score_sum checks the sum of war score in all offensive wars country  ???
def_war_score_sum checks the sum of war score in all defensive wars country  ???
any_bordering_country any bordering country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
galaxy_percentage checks if the scope owns systems corresponding to a certain galaxy percentage country  ???
custom_tooltip_fail shows custom text when trigger is failing  ???
count_armies Counts the amount of armies which fill a requirement and compare it to a number country planet none
original_owner checks if a planet is still owned by first colonizer planet none
is_in_combat Checks if a fleet or ship is being repaired fleet ship
any_member any member in an alliance capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
is_guaranteeing checks if scope country is guaranteeing target country country
is_war_participant Checks if a country is participating in scope war
is_homeworld checks if a planet is its owners homeworld planet none
years_passed compares the number of years that have passed since game start with a value  ???
is_threatened_to Attitude check, if country is threatened by target country country
is_protective_to Attitude check, if country is protective of target country country
is_friendly_to Attitude check, if country is friendly to target country country
is_hostile_to Attitude check, if country is hostile to target country country
is_ruined Checks if a building is ruined or not
is_dismissive_to Attitude check, if country is dismissive of target country country
is_patronizing_to Attitude check, if country is patronizing to target country country
is_angry_to Attitude check, if country is angry at target country country
is_neighbor_of Checks if the country/planet is neighbors with target country planet country (needs testing)
any_neighbor_country Trigger Scope for any neighboring country country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
is_rival Attitude check, if country is a rival of target country country
is_unfriendly_to Attitude check, if country is unfriendly to target country country
is_loyal_to Attitude check, if country is loyal to target country country
is_disloyal_to Attitude check, if country is disloyal to target country country
is_cordial_to Attitude check, if country is cordial to target country country
is_domineering_to Attitude check, if country is domineering towards target country country
is_wary_to Attitude check, if country is wary of target country country Does not work as of 1.6.1
fleet_power Checks country fleet power country
has_election_type checks if a country has a specified election type country
has_ai_personality Checks if an Empire has a certain personality type country
has_ai_personality_type Checks if an Empire has a certain personality type country
has_ai_personality_behaviour Checks if an Empire has a certain personality behaviour country
has_valid_ai_personality checks if a country has a valid ai country
has_migration_access checks if scope country has migration access to target country country
grants_migration_access Checks if a country grants migration access to anyone country
logged_in_to_pdx_account Checks if the local human is logged in to a Pdx account. This WILL cause an out of sync if used for anything that can change the game state  ???  ???
tech_unlocked_ratio ratio of tech between this and from country  ???
has_special_project checks if a country has a special project available country
would_join_war Checks if a country would join the side of a certain country in a hypothetical war country
is_subject Checks if a country is a vassal, tributary, or other kind of subject state. country
is_subject_type Checks if a country is a particular type of subject state. country
can_be_subject Checks if country can be subject of 'subject_type' under 'overlord' country  ???
Supported Scopes: ???

Supported targets:

has_skill

Checks level of skill for a leader
has_experience Checks amount of experience for a leader
any_neighbor_system Trigger Scope for any neighboring system capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
is_under_colonization Checks if a planet is being colonized (bool) planet none
has_colony_progress Checks progress of establishing a colony on planet planet none
is_growing Checks if a pop is growing pop
is_colony_pop Checks if a pop is a colony pop pop
is_subspecies checks if a pop or empire is a subspecies of the same species as another pop or empire country pop capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
is_valid checks to see if the target of a scope is valid country planet  ??? none
fortification_health compares a value with fortification health percentage planet  ??? none
subject_can_diplomacy Checks if we are allowed by our overlord to do certain diplomatic actions country capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
has_surveyed_class Checks a country has surveyed planet class trigger country
fleet_size Checks fleet size fleet
check_pop_faction_parameter Compares a pop faction parameter against a value
pop_percentage Checks the percentage of pops in the scope that fulfill the specified criteria planet country pop_percentage = { percentage > 0.74 limit = { <triggers> } }
num_species Checks if the number of species on a planet, in an empire or in a pop faction is according to the argument. Does not count genetically modified species as unique. planet country num_species > 8
num_unique_species Checks if the number of species on a planet, in an empire or in a pop faction is according to the argument. Counts genetically modified species as unique. planet country num_unique_species < 12
has_diplo_migration_treaty Checks if two countries have a migration treaty. country has_diplo_migration_treaty = country
count_countries Checks the number of countries in the scope that fulfill the specified criteria all count_countries = { count < 6 limit = { <triggers> } }
is_crises_allowed Check if current game allows crises all is_crises_allowed = yes
num_strategic_resources Checks the country's num of strategic resources country num_strategic_resources < 3
is_robot_pop Checks if the pop is of a robotic species class. pop
host_has_dlc Checks if the host has a certain dlc enabled  ???  ???
local_has_dlc Checks if the host has a certain dlc enabled  ??? capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
num_rare_techs Compares number of researched rare technologies country
is_core_sector Checks if the current sector is the country's core sector  ???
has_mandate Checks if a leader has mandate <yes/no/mandate_key> capital controller from fromfrom owner prev prevprev prevprevprev prevprevprevprev random root this
has_spaceport_module Checks if a spaceport has a module upgrade fleet planet none
has_free_spaceport_module_slot Checks if a spaceport has a free module slot fleet planet none
is_spaceport_module_slot_free Checks if a specific spaceport module slot is free fleet planet none
can_build_spaceport_module Checks if a spaceport is allowed to build a specific module upgrade fleet planet none
num_free_spaceport_module_slots Compares the parameter to the amount of free spaceport module slots fleet planet none
num_spaceport_modules Compares the parameter to the amount of spaceport modules fleet planet none
species_portrait Checks if a species uses a certain portrait. country pop
num_armies checks if a country has the said number of armies country  ???
is_proposing_war_demands Checks if currently proposing wardemands or handling existing wardemands country fleet planet pop ship  ??? none
has_civic Checks if currently scoped country has a specific civic or not country  ??? none
used_naval_capacity_percent Checks the used percentage of naval capacity country  ??? none

1.6 example[edit]

This is a custom scripted effect, that can be run using

   upgrade_mod_lv4_to_lv5 = yes
   upgrade_mod_lv4_to_lv5 = { 
    #this code checks if the scope has the modifier that is called modifier_lvl_4 and replaces it with modifier_lvl_5.  
    if = {  
       limit = { #wiki example might be outdated. Limit is the part where we write the condition that needs to be satisfied
               has_modifier = modifier_lvl_4 #checks if the scope has the modifier that is named modifier_lvl_4 
               }
       # the code below works if the conditions in limits are satisfied 
       remove_modifier= modifier_lvl_4 #removes the modifier from the scope
       add_modifier = { 
                      modifier=  modifier_lvl_5 #adds the modifier modifier_lvl_5 to the scope
                   }
     }

}

References[edit]


Modding
Static modding DefinesStatic modifiersMapSpeciesTraitsEthosGovernmentsEmpiresPoliciesEdictsTechnologyBuildingsShipsFleetsEventsCrisisAnomaliesAgenda
Dynamic modding EffectsConditionsScopesModifiersGameplayDecisionsObjectivesAI
Media/localisation Maya exporterGraphicsPortraitsFlagsEvent picturesEvent soundsInterfaceIconsMusicLocalisation
Other Console commandsSave-game editingSteam Workshop