群星
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
阅读
编辑
编辑源代码
查看历史
讨论
编辑“
Conditions
”
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
{{version|3.0}} == Logical boolean operators == Operators allow conditions and triggers to be manipulated in order to return a simple '''true''' or '''false''' statement to be processed. They appear: * In condition blocks (<code>trigger</code> section of [[Event modding|events]], or equivalent: <code>mult_modifier</code>, <code>can_use_…</code>, <code>potential</code>, <code>allow</code>, …) * In the <code>limit</code> clause of command blocks * In scripted blocks: as [[#Scripted Triggers|scripted trigger]]s (or [[scripted effect]]s), which can be used to group conditions into re-usable '''macro'''. * At the root of events for [[Event_modding#Pre-triggers|pre-trigger]]s used to improve performances (actually only on planets) {| class="wikitable sortable" style="font-size:90%; text-align:left;width:100%" |- ! Name !! Description !! Example |- ! if…<br>else_if…<br>else… | Returns true if the conditional statement inside the block evaluates to true. |class=mw-code| if = { limit = { owner = { has_ethic = ethic_fanatic_xenophile } } … } else_if = { limit = { … } … } else = { … } |- ! AND |Returns true if all conditional statements inside the block evaluate to true.<br>This is usually the default in a trigger or new scope, so is not needed to be explicitly specified. i.e. <i>trigger = { AND = { A B } }</i> is the same as <i>trigger = { A B }</i><br>Putting the conditions most likely to be false first can slightly help performance of the scripting engine. |class=mw-code| AND = { has_ethic = ethic_fanatic_xenophile has_ethic = ethic_egalitarian } |- ! OR | Returns true if at least one conditional statement inside the block evaluates to true.<br>Putting the conditions most likely to be true first can slightly help performance of the scripting engine. |class=mw-code| OR = { has_ethic = ethic_fanatic_xenophile has_ethic = ethic_egalitarian } |- ! NOT | Returns true if the conditional statement inside the block evaluates to false, and false if it evaluates to true.<br>Note that NOT only accepts one statement. If you use more than one, it will usually work, but can cause unforeseen bugs, as well as put an error in the error.log file.<br>It's better to use NOR or NAND for blocks containing more than one statement. |class=mw-code| NOT = { has_ethic = ethic_fanatic_xenophile } |- ! NOR | Returns true if none of the conditional statements inside the block evaluate to true. Same as NOT = { OR = { <conditions> } } (all are false). |class=mw-code| NOR = { has_ethic = ethic_fanatic_xenophile has_ethic = ethic_fanatic_militarist } |- ! NAND | Returns true unless all of the conditional statements inside the block evaluate to true. Same as NOT = { AND = { <conditions> } } (at minimum one is false). |class=mw-code| NAND = { has_ethic = ethic_fanatic_xenophile has_technology = "tech_zero_point_power" } |- ! calc_true_if | Returns true if at least <code>amount</code> conditions return true. <code>amount</code> supports numerical operators. |class=mw-code| calc_true_if = { amount >= 3 leader_class = scientist is_researching_area = society gender = female has_level > 2 leader_age < 85 } |} It is important to remember [[wikipedia:De Morgan's laws|De Morgan's laws]] to use NOR and NAND correctly:<br> NAND = { A B } <=> NOT = { AND = { A B } } <=> OR = { NOT = { A } NOT = { B } }<br> NOR = { A B } <=> NOT = { OR = { A B } } <=> AND = { NOT = { A } NOT = { B } } So this means a list of NOTs in an AND can be simplified: trigger = { NOT = { A } NOT = { B } NOT = { C } } is the same as: trigger = { NOR = { A B C } } Conversely, a list of NOTs in an OR can be simplified: trigger = { OR = { NOT = { A } NOT = { B } NOT = { C } } } is the same as: trigger = { NAND = { A B C } } ---- If you need [[wikipedia:Exclusive or|XOR]] logic, you can use <code>calc_true_if</code> or something like this: trigger = { OR = { A B } NAND = { A B } } is the same as: trigger = { calc_true_if = { amount = 1 A B } } Or this for 3 input XOR logic: trigger = { OR = { AND = { OR = { A B C } NOR = { AND = { A B } AND = { A C } AND = { B C } } } AND = { A B C } } } is the same as: trigger = { OR = { AND = { A B C } calc_true_if = { amount = 1 A B C } } } == Scopes == [[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. The most commonly used are outlined in the table below. An empire or nation scope is referred to as country scope. {| class="wikitable sortable" style="font-size:90%; text-align:left" width="100%" |- ! Name !! Description |- | capital || If the script this belongs to is attached to a country, capital will return the capital planet of the country. |- | controller || Returns the country 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 country that has control over the object that the script belongs to. |- | planet || Returns the planet of the current object. |- | prev || Returns the object from previous scope |- | prevprev || Returns the object from the scope before the previous scope |- | prevprevprev || Returns the object from the third previous scope (i.e. the previous scope before the prevprev scope) |- | prevprevprevprev || Returns the object from the fourth previous scope in the pattern of prev, prevprev and prevprevprev |- | random || ⁇ |- | this || Returns the current scope object in the cycle (i.e., for example, each instance in every_sector) |- | pop || Returns the pop attached to the current object. |- |} == Trigger list == The vanilla game has many scripted triggers defined you can use, though they don't show here, as this list is only the triggers built-in to the engine. In addition, you can write your own scripted triggers. Scripted Triggers are stored in the <code>./common/scripted_triggers/</code> directory. Current built-in triggers can be found in an '''''triggers.log''''' file in your local data folder's script_documentation (defaults to "%USERPROFILE%\Documents\Paradox Interactive\Stellaris\'''logs\script_documentation\'''").<ref>This list is dumped from the <i>trigger_docs</i> in-game command and formatted with [[Talk:Effects#Regexp|this regexp]].</ref> {| class="wikitable sortable" style="font-size:90%; text-align:left; width:100%; margin-left:auto; margin-right:-0.8em;" ! Name !! Desc !! Example !! Scope |- |text |For 'desc={trigger={' use. Shows custom text |class="mw-code"| text = <text> |all |- |not |An inverted trigger |class="mw-code"| |all |- |custom_tooltip |Replaces the tooltips for the enclosed triggers with a custom text |class="mw-code"| custom_tooltip = { text = <text used as fallback for both fails and successes> fail_text = <text used for fails["string"/ default/ none]> success_text = <text used for seccesses["string"/ default/ none]> <triggers> } |all |- |if |Evaluates the triggers if the display_triggers of the limit are met |class="mw-code"| if = { limit = { <display_triggers> } <triggers> } |all |- |any_playable_country |Iterate through all playable countries – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_playable_country = { <count=<num/ all>> <triggers> } |all |- |has_mission |Checks if the observation post has a specific mission (as defined in <code>common/observation_station_missions/00_missions.txt</code>) |class="mw-code"| has_mission = technological_enlightenment_4 |fleet |- |switch |Switch case for a trigger |class="mw-code"| switch = { trigger = pop_has_ethic ethic_xenophile = { <trigger> } ethic_xenophobe = { <trigger> } default = { <trigger> } } |all |- |num_fleets |Checks the country's number of fleets |class="mw-code"| num_fleets < 8 |country |- |num_ships |Checks the country/ fleet's number of ships |class="mw-code"| num_ships > 39 |country fleet |- |research_leader |Checks if the country's researcher in a specific field meets the specified criteria |class="mw-code"| research_leader = { area = engineering <triggers> } |country |- |has_fleet_order |Checks if the ship/ fleet has a specific fleet order. Fleet orders include: move_to_system_point_order orbit_planet_order build_orbital_station_order build_space_station_order colonize_planet_order survey_planet_order research_discovery_orde research_anomaly_order collect_data_fleet_order upgrade_design_at_starbase_fleet_order upgrade_design_at_orbitable_fleet_order return_fleet_order repair_fleet_order evade_hostiles_order follow_order assist_research_order land_armies_order merge_fleet_order aggressive_stance_fleet_order auto_explore_order auto_patrol_order build_megastructure_fleet_order destroy_planet_order planet_killer_weapon_windup_order planet_killer_weapon_fire_order explore_bypass_order use_bypass_order jumpdrive_order jumpdrive_windup experimental_subspace_navigation_fleet_order excavate_archaeological_site_fleet_order |class="mw-code"| has_fleet_order = survey_planet_order |ship fleet |- |closest_system |Finds the closest system within the given hyperlane steps and limit = { <triggers> }. If this system does not exist, it returns false. If it does exist, it is checked against the triggers outside of the limit = {}. |class="mw-code"| closest_system = { limit = { <triggers> } min_steps = 2 max_steps = 20 use_bypasses = yes/ no (default: no) <triggers> } |all |- |any_owned_fleet |Iterate through each fleet owned by the country – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_owned_fleet = { <count=<num/ all>> <triggers> } |country |- |has_orbital_station |Checks if the planet has any kind of orbital station |class="mw-code"| has_orbital_station = yes |planet |- |any_orbital_station |Checks if the planet's orbital station meets the specified criteria |class="mw-code"| any_orbital_station = { <triggers> } |planet |- |else_if |Evaluates the enclosed triggers if the display_triggers of the preceding `if` or `else_if` is not met and its own display_trigger of the limit is met |class="mw-code"| if = { limit = { <display_triggers> } <triggers> } else_if = { limit = { <display_triggers> } <triggers> } |all |- |happiness |Checks the pop's happiness percentage |class="mw-code"| happiness < 90 |pop |- |is_half_species |Check if scoped species is half species of specific/ any species |class="mw-code"| is_half_species = <target/ any> |species |- |faction_approval |Checks the scoped faction's approval percentage |class="mw-code"| faction_approval < 0.9 |pop_faction |- |has_designation |Checks if the colony has a certain designation (as defined in <code>common/colony_types/00_colony_types.txt</code>) |class="mw-code"| has_designation = col_rural/ <planet scope> |planet |- |colony_type |Checks if the colony is of a certain type (as defined in <code>common/colony_types/00_colony_types.txt</code>) |class="mw-code"| colony_type = col_rural/ <planet scope> |planet |- |num_favors |Check amount of favors that scoped country can collect from target country: |class="mw-code"| num_favors = { target = <country> value ><= <value> } |country |- |last_building_changed |Checks if the last building queued/ unqueued/ built/ demolished/ upgraded was the specified building (as defined by filies in <code>common/buildings/</code>) |class="mw-code"| last_building_changed = building_capitol |planet |- |empire_size |Checks the empire's size. Identical to empire_sprawl trigger. |class="mw-code"| empire_size < 20 |country |- |empire_sprawl |Checks the empire's sprawl. Identical to empire_size trigger. |class="mw-code"| empire_sprawl < 20 |country |- |empire_sprawl_over_cap |Checks how much the empire's sprawl is over its admin capacity |class="mw-code"| empire_sprawl_over_cap < 5 |country |- |empire_sprawl_cap_fraction |Checks the empire's sprawl compared to its admin level |class="mw-code"| empire_sprawl_cap_fraction < 0.5 |country |- |last_district_changed |Checks if the last district queued/ unqueued/ built/ demolished/ upgraded was the specified district (as defined by files in <code>common/districts/</code>) |class="mw-code"| last_district_changed = district_capitol |planet |- |has_ring |Checks if the planet has a planetary ring |class="mw-code"| has_ring = yes |planet |- |is_moon |Checks if the planet is the moon of another planet |class="mw-code"| is_moon = yes |planet |- |opinion |Checks the country's opinion of the target country |class="mw-code"| opinion = { who = <target> value = -70 } |country |- |opinion_level |Checks the country's opinion level of the target country (with support for comparison operators) |class="mw-code"| opinion_level = { who = <target> level >= neutral } |country |- |envoy_opinion_change |Checks the country's opinion of the target country has been changed by envoys |class="mw-code"| envoy_opinion_change = { who = <target> value >= 25 } |country |- |ideal_planet_class |Checks if the pop, species or country's ideal planet class is a specific class (as defined by files in <code>common/planet_classes/</code>) |class="mw-code"| ideal_planet_class = pc_tundra/ <planet scope> |country pop species |- |ethos |Checks the average ethics divergence on the planet, i.e. num of pops not of the country's ethics / total num of pops |class="mw-code"| ethos < 0.4 |planet |- |distance |Checks the ship/ fleet/ planet/ leader/ pop/ system's galaxy map distance to target in absolute units |class="mw-code"| distance = { source = <target> min_distance >= 50 max_distance <= 120 type=<hyperlane/ euclidean> bypass_empire=<empire> min_jumps = 2 max_jumps = 10 same_solar_system = yes/ no (default: no; this toggles whether the trigger checks galaxy map or solar system distances) } |megastructure planet ship pop fleet galactic_object leader ambient_object starbase deposit archaeological_site first_contact |- |is_pirate |Checks if the country is a pirate country |class="mw-code"| is_pirate = yes |country |- |planet_size |Checks the planet's size |class="mw-code"| planet_size < 20 |planet |- |gender |Checks the leader's gender |class="mw-code"| gender = female/ male/ indeterminable (as defined by <code>common/scripted_triggers/scripted_loc_mascfem_triggers.txt</code>) |leader |- |any_planet_within_border |Iterate through each planet within the current empire's borders – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_planet_within_border = { <count=<num/ all>> <triggers> } |country |- |any_owned_ship |Iterate through each ship in the fleet or owned by the country – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_owned_ship = { <count=<num/ all>> <triggers> } |country fleet |- |pop_has_ethic |Checks if the pop has a specific ethos (as defined by <code>common/ethics/00_ethics.txt</code>) |class="mw-code"| pop_has_ethic = ethic_fanatic_xenophile |pop |- |pop_has_trait |Checks if the pop has a specific trait (as defined by files in <code>common/traits/</code>) |class="mw-code"| pop_has_trait = trait_decadent |pop |- |has_observation_outpost |Checks if the planet has an observation post |class="mw-code"| has_observation_outpost = yes |planet |- |starting_system |Checks if the system is the starting system for any country |class="mw-code"| starting_system = yes |galactic_object |- |graphical_culture |Checks if the country has specific graphical culture (as defined by files in <code>common/graphical_culture/</code>) |class="mw-code"| graphical_culture = fungoid_01 |country ship |- |is_civilian |Checks if the scoped fleet or ship is civilian (as set by the line <code>is_civilian = yes</code> in ship definitions in files in <code>common/ship_sizes/</code>) |class="mw-code"| is_civilian = <yes/ no> |ship fleet |- |vassals |Checks the country's number of vassals |class="mw-code"| vassals > 0 |country |- |exists |Checks if a target scope exists |class="mw-code"| exists = <target> |all |- |has_edict |Checks if the country has a specific edict enabled (as defined by files in <code>common/edicts/</code>) |class="mw-code"| has_edict = crystal_sonar |country |- |is_designable |Checks if the scoped ship design, ship or fleet (all ships) has a designable ship size. |class="mw-code"| is_designable = yes |ship fleet design |- |is_in_cluster |Checks if the planet/ system belongs to a specific spawning cluster |class="mw-code"| is_in_cluster = resource_cluster_3 |planet galactic_object |- |any_moon |Iterate through each moon of the planet – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_moon = { <count=<num/ all>> <triggers> } |planet |- |num_empires |Checks the number of regular empires in the galaxy |class="mw-code"| num_empires > 3 |country |- |leader_class |Checks if the leader is of a specific class (as defined by <code>common/leader_classes/00_base_classes.txt</code>) |class="mw-code"| leader_class = scientist |leader |- |leader_age |Checks the scope leader's age |class="mw-code"| leader_age > 85 |leader |- |observation_outpost |Checks if the planet's observation post meets the specified criteria |class="mw-code"| observation_outpost = { <triggers> } |planet |- |has_deposit |Checks if the planet has any, or a specific, deposit (as defined by files in <code>common/deposits/</code>) |class="mw-code"| has_deposit = yes has_deposit = d_immense_engineering_deposit |planet deposit |- |is_same_value |Checks if the current scope and the target scope are the same thing |class="mw-code"| is_same_value = <target> |all |- |intel |Checks the country's Intel on the target country |class="mw-code"| intel = { who = <target> value = 70 } |country |- |has_pop_faction_flag |Checks if the pop faction has a specific flag (as defined by files in <code>common/pop_faction_types/</code>) |class="mw-code"| has_pop_faction_flag = <flag> |pop pop_faction |- |num_communications |Checks the country's number of established communications |class="mw-code"| num_communications > 3 |country |- |last_changed_policy |Checks if the last policy changed by the country was a specific policy |class="mw-code"| last_changed_policy = slavery |country |- |is_species |Checks if the pop/ country's founder species is of a specific pre-defined species |class="mw-code"| is_species = ROBOT_POP_SPECIES_2 |country pop leader species |- |last_increased_tech |Checks if the country's last researched technology was a specific tech |class="mw-code"| last_increased_tech = tech_gene_expressions |country |- |any_war |Iterate through all wars the country is engaged in – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_war = { <count=<num/ all>> <triggers> } |country |- |any_defender |Iterate through all defenders in the current war – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_defender = { <count=<num/ all>> <triggers> } |war |- |any_attacker |Iterate through all attackers in the current war – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_attacker = { <count=<num/ all>> <triggers> } |war |- |original_owner |Checks if the planet is still owned by its first colonizer |class="mw-code"| original owner = yes |planet |- |tech_unlocked_ratio |Checks the relative amount of already-researched tech between the country and target country |class="mw-code"| tech_unlocked_ratio = { who = <target> ratio = 0.4 } |country |- |can_colonize |Checks if the planet can be colonized by target country |class="mw-code"| can_colonize = { who = <target> status = yes } |planet |- |has_special_project |Checks if the country has a specific special project available |class="mw-code"| has_special_project = EMERGENCY_BUOY_PROJECT |country |- |has_completed_special_project_in_log |Checks if the country has completed a specific special project as part of an in-progress event chain |class="mw-code"| has_completed_special_project_in_log = EMERGENCY_BUOY_PROJECT |country |- |has_failed_special_project_in_log |Checks if the country has failed, timed out or aborted a specific special project as part of an in-progress event chain |class="mw-code"| has_failed_special_project_in_log = EMERGENCY_BUOY_PROJECT |country |- |is_subspecies |Checks if the pop/ country/ species is a subspecies of the target species |class="mw-code"| is_subspecies = <target> |country pop leader species |- |is_valid |Checks to see if target scope is valid for the country/ planet/ army |class="mw-code"| is_valid = yes/ no |planet country army |- |check_pop_faction_parameter |Checks if one of the faction's parameters is the same as target scope |class="mw-code"| check_pop_faction_parameter = { which = <parameter> value = <target> } |pop_faction |- |is_robot_pop |Checks if the pop is a robot |class="mw-code"| is_robot_pop = yes |pop |- |num_fallen_empires |Checks the number of fallen empires in the galaxy |class="mw-code"| num_fallen_empires > 3 |country |- |is_preferred_weapons |Checks if the country's AI prefers weapons using this component tag |class="mw-code"| is_preferred_weapons = weapon_type_energy |country |- |has_access_fleet |Checks if the target country is allowed to enter the system |class="mw-code"| has_access_fleet = <target> |galactic_object |- |is_point_of_interest |Checks if the planet/ country/ ship/ system/ ambient object has a specific point of interest for a specific event chain for a specific country |class="mw-code"| is_point_of_interest = { id = <id> event_chain = <event_chain> owner = <target> } |planet country ship galactic_object ambient_object |- |terraformed_by |Checks if planet is terraformed by country. |class="mw-code"| terraformed_by = <scope> |planet |- |has_megastructure |Checks if a country or star has a mega structure. |class="mw-code"| has_megastructure = spy_orb_4 |country galactic_object |- |recently_lost_war |Checks if the country recently lost a war ('recently' meaning recent enough to have a truce) |class="mw-code"| recently_lost_war = yes |country |- |count_diplo_ties |Checks the number of diplomatic in the scope that fulfill the specified criteria |class="mw-code"| count_diplo_ties = { count < 6 limit = { <triggers> } } |country |- |has_research_agreement |Checks if two countries have a research agreement. |class="mw-code"| has_research_agreement = <target> |country |- |has_tributary |Checks if the target country is a tributary of the current scope. |class="mw-code"| has_tributary = <target> |country |- |upgrade_days_left |Checks how many days an upgrading megastructure will take to complete its upgrade. |class="mw-code"| upgrade_days_left > 360 |megastructure |- |has_any_megastructure |Checks if the scope has a megastructure |class="mw-code"| has_any_megastructure = yes |planet galactic_object |- |former_living_standard_type |Compares the former living standard type with the given one. |class="mw-code"| former_living_standard_type = living_standard_normal |pop |- |former_citizenship_type |Compares the former citizenship type with the given one. |class="mw-code"| former_citizenship_type = citizenship_full |pop |- |former_military_service_type |Compares the former military service type with the given one. |class="mw-code"| former_military_service_type = military_service_full |pop |- |former_slavery_type |Compares the former slavery type with the given one. |class="mw-code"| former_slavery_type = slavery_normal |pop |- |former_purge_type |Compares the former purge type with the given one. |class="mw-code"| former_purge_type = purge_normal |pop |- |former_population_control_type |Compares the former population control type with the given one. |class="mw-code"| former_population_control_type = population_control_yes |pop |- |former_migration_control_type |Compares the former migration control type with the given one. |class="mw-code"| former_migration_control_type = migration_control_yes |pop |- |is_alliance_fleet |Checks if the scoped fleet is an alliance fleet. |class="mw-code"| is_alliance_fleet = <yes/ no> |fleet |- |is_researching_special_project |Checks if the country is currently researching a specific special project |class="mw-code"| is_researching_special_project = special_project_name |country leader |- |last_activated_relic |Checks if the specified relic was the last activated one |class="mw-code"| last_activated_relic = <relic_key> |country |- |any_system_planet |Iterate through each planet in the current system – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_system_planet = { <count=<num/ all>> <triggers> } |galactic_object |- |is_scope_type |Checks currently in the specified scope: |class="mw-code"| is_scope_type = fleet valid tokens are: none, megastructure, planet, country, ship, pop, fleet, galactic_object, leader, army, ambient_object, species, design,pop_faction, war, alliance, starbase,deposit,observer, sector. |all |- |is_robotic |Check if the species in the scope is a robot species or not |class="mw-code"| is_robotic=<yes/ no> |species |- |has_unlocked_all_traditions |Checks if the country has unlocked all traditions |class="mw-code"| has_unlocked_all_traditions = yes/ no |country |- |has_potential_claims |Checks if the country has any potential claims they can make. |class="mw-code"| has_potential_claims = yes/ no |country |- |has_available_jobs |Check that you have available job of a specific type |class="mw-code"| has_available_jobs = "miner" |planet |- |is_galactic_custodian |Checks if an empire is Custodian of the Galactic Council |class="mw-code"| is_galactic_custodian = yes/ no |country |- |has_galactic_custodian |Checks if the Galactic Community has named a Custodian |class="mw-code"| has_galactic_custodian = yes/ no |all |- |is_galactic_emperor |Checks if an empire is the Galactic Emperor |class="mw-code"| is_galactic_emperor = yes/ no |country |- |has_galactic_emperor |Checks if the Galactic Emperor has taken over |class="mw-code"| has_galactic_emperor = yes/ no |all |- |imperial_authority |Checks imperial authority. |class="mw-code"| imperial_authority >=< 40 |all |- |has_stage_modifier |Checks if the espionage operation has a certain modifier specific for the current stage |class="mw-code"| has_modifier = <modifier> |espionage_operation |- |galactic_defense_force_exists |Checks if the Galactic Defense Force or Imperial Armada exists |class="mw-code"| galactic_defense_force_exists = yes/ no |all |- |has_intel_level |Checks the country's intel level on a category for the target country |class="mw-code"| has_intel_level = { who = <target> category = economy level = 2 } |country |- |has_intel_report |Checks if the country has intel report of at least the specified level on a category for the target country |class="mw-code"| has_intel_report = { who = <target> category = economy level = 2 } |country |- |has_intel |Checks if the specified intel is available for the target country (stale intel will not return true) |class="mw-code"| has_intel = { who = <target> intel = system_low_intel } |country |- |has_stale_intel |Checks if the specified intel is stale for the target country (available intel will not return true) |class="mw-code"| has_stale_intel = { who = <target> intel = system_low_intel } |country |- |and |all inside trigger must be true |class="mw-code"| |all |- |or |At least one entry inside the trigger must be true |class="mw-code"| |all |- |is_star |Checks if the planet is a star |class="mw-code"| is_star = yes |planet |- |is_asteroid |Checks if the planet is an asteroid |class="mw-code"| is_asteroid = yes |planet |- |species_portrait |Checks if the species (or pop/ empire's dominant species) uses a certain portrait |class="mw-code"| species_portrait = rep13 |country pop species |- |is_neutral_to |Checks if the country has a neutral attitude towards target country |class="mw-code"| is_neutral_to = <target> |country |- |trust |Checks the country's trust of the target country |class="mw-code"| trust = { who = <target> value = 50 } |country |- |name_list_category |Checks if a specific name list is used for the a species during empire creation |class="mw-code"| |dlc_recommendation |- |hidden_trigger |Hides the tooltip for the triggers within |class="mw-code"| hidden_trigger = { <triggers> } |all |- |has_district |Checks if the planet has any, or a specific, district |class="mw-code"| has_district = yes has_district = district_mining |planet |- |free_district_slots |Checks the planet's number of slots available for new constructions |class="mw-code"| free_district_slots > 2 |planet |- |diplomacy_weight |Checks the countrys diplomacy weight |class="mw-code"| diplomacy_weight > 200 |country |- |has_owner |Checks if the planet is colonized (in planet scope) or the system has an owner (in system scope) |class="mw-code"| has_owner = yes |planet galactic_object |- |free_housing |Checks the planet's available housing |class="mw-code"| free_housing > 5 |planet |- |is_ai |Checks if the country is played by the AI |class="mw-code"| is_ai = no |country |- |always |Sets trigger to be either always true or false |class="mw-code"| always = yes |all |- |has_trait |Checks if a pop/ leader/ species/ country's dominant species has a certain trait |class="mw-code"| has_trait = leader_trait_carefree |country pop leader species dlc_recommendation |- |has_ethic |Checks if a country has a certain ethos |class="mw-code"| has_ethic = ethic_fanatic_pacifist |country pop dlc_recommendation |- |is_owned_by |Checks if the planet/ system/ army/ ship is owned by the target country |class="mw-code"| is_owned_by = <target> |megastructure planet ship pop fleet galactic_object leader army pop_faction starbase deposit sector archaeological_site first_contact spy_network espionage_operation |- |pop_can_live_on_planet |Checks if the pop's species is allowed to live on its planet |class="mw-code"| pop_can_live_on_planet = yes |pop |- |days_passed |Checks the number of in-game days passed since the 2200.1.1 start |class="mw-code"| days_passed < 15 |all |- |free_amenities |Checks the planet's available amenities |class="mw-code"| free_amenities > 5 |planet |- |has_deficit |Checks if the country has a deficit of the defined resource |class="mw-code"| has_deficit = minerals |country |- |has_commercial_pact |Check if the country has a commercial pact with target country |class="mw-code"| has_commercial_pact = <target> |country |- |is_being_assimilated |Checks if the pop is being purged |class="mw-code"| is_being_assimilated = yes |pop |- |num_guaranteed_colonies |Checks the number of guaranteed colonies defined in setup |class="mw-code"| num_guaranteed_colonies > 1 |all |- |num_owned_relics |Checks the number of relics owned by the scoped country |class="mw-code"| num_owned_relics > 1 |country |- |has_branch_office |Check if the planet has a branch office owned by target country/ any country/ no country |class="mw-code"| has_branch_office = <target/ yes/ no> |planet |- |is_same_species |checks if the scoped object is of the same species as another object |class="mw-code"| is_same_species = <target> |country ship pop leader army species |- |is_criminal_syndicate |Checks if the country is a criminal syndicate |class="mw-code"| is_criminal_syndicate = yes |country |- |is_blocker |Checks if scoped deposit is a blocker-type |class="mw-code"| is_blocker = yes |deposit |- |is_same_empire |Checks if the country is the same as another, target country |class="mw-code"| is_same_empire = <target> |country |- |free_branch_office_building_slots |Checks the planet's number of branch office slots available for new constructions |class="mw-code"| free_branch_office_building_slots > 2 |planet |- |branch_office_value |Checks the planet's branch officevalue |class="mw-code"| branch_office_value = { who = <target> value > 10 } |planet |- |free_jobs |Checks the number of jobs compared to pops on the planet |class="mw-code"| free_jobs > 12 |planet |- |is_planet_class |Checks if the planet is of a certain class |class="mw-code"| is_planet_class = pc_tundra/ <planet scope> |planet |- |has_strategic_resource |Checks if the planet has any strategic resource |class="mw-code"| has_strategic_resource = yes |planet |- |is_star_class |Checks if the system/ planet (star) is of a certain class |class="mw-code"| is_star_class = sc_black_hole/ <system scope> |planet galactic_object |- |has_technology |Checks if the country has a technology (of at least a specific level) |class="mw-code"| has_technology = tech_spaceport_4 |country |- |can_research_technology |Checks whether the current country is allowed to have the specified technology, i.e. does it fulfil the potential = { } field for that tech, and for any prereq techs that tech has. |class="mw-code"| can_research_technology = <tech key> |country |- |can_copy_random_tech_from |Checks whether the target country has a technology the current country can steal via copy_random_tech_from effect |class="mw-code"| can_copy_random_tech_from = { who = <country> category = computing (optional) area = physics (optional) } |country |- |can_set_policy |Checks if the country is allowed to set its policy to a specific one using set_policy effect |class="mw-code"| can_set_policy = { policy = <key> option = <key> } |country |- |any_fleet_in_orbit |Iterate through each fleet orbiting the current planet/ starbase/ megastructure – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_fleet_in_orbit = { <count=<num/ all>> <triggers> } |megastructure planet starbase |- |planet_devastation |Checks the planet's devastation |class="mw-code"| planet_devastation > 10 |planet |- |is_pop_category |Checks if the pop has the chosen pop category |class="mw-code"| is_pop_category = <key> |pop |- |won_the_game |Checks if scoped country won the game |class="mw-code"| won_the_game = yes |country |- |planet_stability |Compares the stability present on the planet with the given value |class="mw-code"| planet_stability > 50 |planet |- |perc_communications_with_playable |Checks the country's percentage of communications with playable empires |class="mw-code"| perc_communications_with_playable > 0.3 |country |- |planet_crime |Compares the crime present on the planet with the given value |class="mw-code"| planet_crime > 50 |planet |- |has_job |Checks if the pop has a specific job, or any job if set to yes |class="mw-code"| has_job = <key/ yes> |pop |- |has_planet_modifier |Checks if the planet has a specific planet modifier |class="mw-code"| has_planet_modifier = pm_titanic_life |planet |- |is_deposit_type |Checks if deposit is specified type |class="mw-code"| is_deposit_type = d_immense_engineering_deposit |deposit |- |has_built_species |Checks if country has a built species defined |class="mw-code"| has_built_species = yes/ no |country |- |num_buildings |Checks the number the planet has of any, or a specific, building |class="mw-code"| num_buildings = { type = <key/ any> value > 2 } |planet |- |num_districts |Checks the number the planet has of any, or a specific, district |class="mw-code"| num_districts = { type = <key/ any> value > 2 } |planet |- |num_free_districts |Checks the number of available slots the planet has of any, or a specific, district |class="mw-code"| num_free_districts = { type = <key/ any> value > 2 } |planet |- |has_planet_flag |Checks if the planet has a specific flag |class="mw-code"| has_planet_flag = <flag> |planet |- |has_first_contact_flag |Checks if the first contact site has a specific flag |class="mw-code"| has_first_contact_flag = <flag> |first_contact |- |has_federation_flag |Checks if the federation has a specific flag |class="mw-code"| has_federation_flag = <flag> |federation |- |has_country_flag |Checks if the empire has a specific flag |class="mw-code"| has_country_flag = <flag> |country |- |has_fleet_flag |Checks if the fleet has a specific flag |class="mw-code"| has_fleet_flag = <flag> |fleet |- |has_ship_flag |Checks if the ship has a specific flag |class="mw-code"| has_ship_flag = <flag> |ship |- |is_ship_class |Checks if the ship/ fleet/ design is a specific class |class="mw-code"| is_ship_class = shipclass_colonizer |ship fleet design |- |is_ship_size |Checks if the ship/ fleet/ design is a specific ship size |class="mw-code"| is_ship_size = mining_station |ship fleet design |- |is_capital |Checks if the planet is its owner's capital |class="mw-code"| is_capital = yes |planet |- |is_capital_system |Checks if the solar system has its owner's capital |class="mw-code"| is_capital_system = yes |galactic_object |- |has_ground_combat |Checks if ground combat is taking place on the planet |class="mw-code"| has_ground_combat = yes |planet |- |is_at_war |Checks if the country is at war |class="mw-code"| is_at_war = yes |country |- |num_owned_planets |Checks the country's or sector's number of owned planets |class="mw-code"| num_owned_planets < 8 |country sector |- |has_government |Checks if the country has a specific government type, or any government at all |class="mw-code"| has_government = <yes/ any/ no/ none/ type> |country |- |num_pops |Checks the number of pops on the planet/ country/ pop faction/ sector |class="mw-code"| num_pops > 12 |planet country pop_faction sector |- |num_unemployed |Checks the number of unemployed pops on the planet |class="mw-code"| num_unemployed > 3 |planet |- |would_work_job |Checks if the pop will work a specific job if a vacancy becomes available (i.e. does it meet the requirements, would it have a higher job weight?) |class="mw-code"| would_work_job = <key> |pop |- |is_primitive |Checks if the country is a primitive, pre-FTL civilization |class="mw-code"| is_primitive = yes |country |- |is_archetype |Checks if species has specified archetype: |class="mw-code"| is_archetype = PRESAPIENT |species |- |is_inside_nebula |checks if the planet/ ship/ fleet/ system is inside a nebula |class="mw-code"| is_inside_nebula = yes |planet ship fleet galactic_object |- |is_in_frontier_space |checks if the planet/ ship/ fleet/ system is in frontier space |class="mw-code"| is_in_frontier_space = yes |planet ship fleet galactic_object |- |is_inside_border |Checks if the planet/ ship/ fleet/ system is inside the borders of the target country |class="mw-code"| is_inside_border = <target> |planet ship fleet galactic_object |- |any_country |Iterate through all countries – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_country = { <count=<num/ all>> <triggers> } |all |- |any_pop |Checks if any of the planet/ species/ pop faction pops meet the specified criteria. Warning: deprecated, use any_owned_pop/ any_species_pop |class="mw-code"| any_pop = { <triggers> } |planet species pop_faction |- |is_overlord |Checks if the country is the overlord of any subject countries |class="mw-code"| is_overlord = yes |country |- |is_at_war_with |Checks if the country is at war with the target country |class="mw-code"| is_at_war_with = <target> |country |- |their_opinion |Checks target country's opinion value of the current country |class="mw-code"| their_opinion = { who = <target> value > 25 } |country |- |is_same_species_class |Checks if the pop/ country is of the same species class as another pop/ country |class="mw-code"| is_same_species_class = <target> |country ship pop leader army species |- |has_federation |Checks if the country is in a federation |class="mw-code"| has_federation = yes |country |- |is_colonizable |Checks if the planet can theoretically be colonized |class="mw-code"| is_colonizable = yes |planet |- |has_level |Checks if the leader has a specific experience level |class="mw-code"| has_level > 2 |leader |- |num_minerals |Checks the planet's total amount of minerals |class="mw-code"| num_minerals < 20 |planet |- |num_physics |Checks the planet's total amount of physics research |class="mw-code"| num_physics = 8 |planet |- |num_society |Checks the planet's total amount of society research |class="mw-code"| num_society > 8 |planet |- |num_engineering |Checks the planet's total amount of engineering research |class="mw-code"| num_engineering < 8 |planet |- |num_modifiers |Checks the planet's number of modifiers |class="mw-code"| num_modifiers < 3 |planet |- |has_any_strategic_resource |Checks if the planet has any strategic resource |class="mw-code"| has_any_strategic_resource = yes |planet |- |has_pop_flag |Checks if the pop has a specific flag |class="mw-code"| has_pop_flag = <flag> |pop |- |is_occupied_flag |Checks if the planet is under military occupation |class="mw-code"| is_occupied_flag = yes |planet |- |is_damaged |Checks if the ship is damaged |class="mw-code"| is_damaged = yes |ship |- |has_hp |Checks the ship's hull points |class="mw-code"| has_hp > 200 |ship |- |is_surveyed |Checks if the planet/ system has been survey by target country |class="mw-code"| is_surveyed = { who = <target> status = yes } |planet galactic_object |- |has_global_flag |Checks if a Global Flag has been set |class="mw-code"| has_global_flag = <flag> |all |- |is_variable_set |Checks if the specified variable is set on the current scope. Use to avoid unset variables errors |class="mw-code"| is_variable_set = my_var |megastructure planet country ship pop fleet galactic_object leader army species pop_faction war federation starbase sector first_contact |- |check_variable |Checks a variable for the country/ leader/ planet/ system/ fleet |class="mw-code"| check_variable = { which = <variable> value < <float>/ <variable>/ <scope> / value = { scope = <scope> variable >=< <variable> } } |megastructure planet country ship pop fleet galactic_object leader army species pop_faction war federation starbase sector first_contact |- |check_variable_arithmetic |Checks a variable for the scope if a certain amount of arithmetic is done to it (note: the variable's value is not changed by this trigger) |class="mw-code"| check_variable_arithmetic = { which = <variable> by = <float>/ <variable>/ <scope> / by = { scope = <scope> variable = <variable> } mode = add/ subtract/ multiply/ divide/ modulo value < <float>/ <variable>/ <scope> / value = { scope = <scope> variable >=< <variable> } } |megastructure planet country ship pop fleet galactic_object leader army species pop_faction war federation starbase sector first_contact |- |check_modifier_value |Checks the value of a specified modifier in the current scope against a value. |class="mw-code"| check_modifier_value = { modifier = pop_growth_speed_reduction value > 1.05 |megastructure planet country ship pop fleet galactic_object leader army species design pop_faction spy_network espionage_operation |- |check_galaxy_setup_value |Checks the value for a specific option from the galaxy setup |class="mw-code"| check_galaxy_setup_value = { setting = <string> value >=< <float> ] } possible values: num_empires, num_advanced_empires, num_fallen_empires, num_marauder_empires, mid_game_year, end_game_year, victory_year, num_guaranteed_colonies, num_gateways, num_wormhole_pairs, num_hyperlanes, habitable_worlds_scale, primitive_worlds_scale, crisis_strength_scale, tech_costs_scale |all |- |is_colony |Checks if the planet is colonized |class="mw-code"| is_colony = yes |planet |- |habitability |Checks the planet's habitability (0 to 1) for target pop/ species |class="mw-code"| habitability = { who = <target> value = 0.6 } |planet |- |has_building |Checks if the planet has any, or a specific, building |class="mw-code"| has_building = yes has_building = building_capital_3 |planet |- |has_active_building |Checks if the planet has a specific building, and that that building is not disabled or ruined. |class="mw-code"| has_building = yes has_active_building = building_capital_3 |planet |- |is_controlled_by |Checks if the planet is controlled by the target country |class="mw-code"| is_controlled_by = <target> |planet |- |is_terraformed |Checks if the planet has ever been terraformed |class="mw-code"| is_terraformed = yes |planet |- |is_terraforming |Checks if the planet is currently being terraformed |class="mw-code"| is_terraforming = yes |planet |- |is_federation_leader |Checks if the country is the leader of their federation |class="mw-code"| is_federation_leader = yes |country |- |is_mobile |Checks if the scoped fleet can move. |class="mw-code"| is_mobile = <yes/ no> |fleet |- |is_in_sensor_range |Checks if the specified ship, fleet, planet or system is within sensor range of the scoped country. |class="mw-code"| is_in_sensor_range = <ship/ fleet/ system> |country |- |is_in_sensor_range_of_country |Checks if the scoped ship, fleet, planet or system is within sensor range of the specified country. |class="mw-code"| is_in_sensor_rangeof_country = root.owner |planet ship fleet galactic_object |- |has_star_flag |Checks if the solar system has a specific flag |class="mw-code"| has_star_flag = <flag> |galactic_object dlc_recommendation |- |has_mining_station |Checks if the planet has an orbital mining station |class="mw-code"| has_mining_station = yes |planet |- |has_research_station |Checks if the planet has an orbital research station |class="mw-code"| has_research_station = yes |planet |- |any_research_station |Checks if the planet's orbital research station meets the specified criteria |class="mw-code"| any_research_station = { <triggers> } |planet |- |any_mining_station |Checks if the planet's orbital mining station meets the specified criteria |class="mw-code"| any_mining_station = { <triggers> } |planet |- |army_type |Checks the army's type |class="mw-code"| army_type = assault_army |army |- |is_defensive_army |Checks if the army is defensive |class="mw-code"| is_defensive_army = yes |army |- |has_army |Checks if the planet has an army |class="mw-code"| has_army = yes |planet |- |is_advisor_active |checks if a country has an advisor |class="mw-code"| |country |- |count_pops |Checks the number of pops in the scope that fulfill the specified criteria. Warning: deprecated, use count_owned_pop/ count_species_pop |class="mw-code"| count_pops = { limit = { <triggers> } count < 6 } |planet species pop_faction |- |is_enslaved |Checks if the pop is a slave |class="mw-code"| is_enslaved = yes |pop |- |is_being_purged |Checks if the pop is being purged |class="mw-code"| is_being_purged = yes |pop |- |is_idle |Checks if scoped leader is idle |class="mw-code"| is_idle = yes |leader |- |income |Checks the country's monthly energy credit income |class="mw-code"| income < 90 |country |- |expenses |Checks the country's monthly energy credit expenses |class="mw-code"| expenses > 28 |country |- |num_uncleared_blockers |Checks the planet's total amount of uncleared blockers |class="mw-code"| num_uncleared_blockers > 3 |planet |- |local_human_species_class |Checks if local humans founder species is a specific species class |class="mw-code"| is_species_class = MAM |all |- |num_envoys_to_federation |Checks the country's number of envoys sent to its federation |class="mw-code"| num_envoys_to_federation < 2 |country |- |num_envoys_to_galcom |Checks the country's number of envoys sent to the galactic community |class="mw-code"| num_envoys_to_galcom < 2 |country |- |has_envoy_task |Checks the scoped envoy's task. |class="mw-code"| has_envoy_task = { task = improve_relations/ harm_relations/ federation/ galactic_community/ spy_network/ first_contact/ strengthen_imperial_authority/ undermine_imperial_authority/ none target = <country> (optional) } |leader |- |has_envoy_cooldown |Checks the scoped envoy currently has a cooldown on its status. |class="mw-code"| has_envoy_cooldown = yes/ no |leader |- |trade_income |Checks the country's energy credits income from trade for the previous month |class="mw-code"| trade_income < 30 |country |- |has_anomaly |Checks if the planet has an anomaly |class="mw-code"| has_anomaly = yes |planet |- |stored_physics_points |Checks the country's amount of stored physics research |class="mw-code"| stored_physics_points |country |- |stored_society_points |Checks the country's amount of stored society research |class="mw-code"| stored_society_points |country |- |stored_engineering_points |Checks the country's amount of stored engineering research |class="mw-code"| stored_engineering_points |country |- |balance |Checks the country's energy credit balance |class="mw-code"| balance < 39 |country |- |running_balance |Checks the country's running energy credit balance |class="mw-code"| running_balance > 61 |country |- |is_planet |Checks if the planet is the same as target planet |class="mw-code"| is_planet = <target> |planet |- |is_pop |Checks if the pop is the same as target pop |class="mw-code"| is_pop = <target> |pop |- |is_ship |Checks if the ship is the same as target ship |class="mw-code"| is_ship = <target> |ship |- |is_army |Checks if the army is the same as target army |class="mw-code"| is_army = <target> |army |- |is_country |Checks if the country is the same as target country |class="mw-code"| is_country = <target> |country |- |is_tutorial_level |Checks the country's tutorial level (0 off, 1 limited, 2 full) |class="mw-code"| is_tutorial_level = 0 |country |- |is_multiplayer |Checks if the game is running in multiplayer |class="mw-code"| is_multiplayer = yes |all |- |has_event_chain |Checks if the country has a specific event chain |class="mw-code"| has_event_chain = old_gods_chain |country |- |is_species_class |Checks if the pop/ country's founder species is a specific species class |class="mw-code"| is_species_class = MAM |country pop species dlc_recommendation |- |has_opinion_modifier |Checks if the country has a specific opinion modifier towards target country or anyone |class="mw-code"| has_opinion_modifier = { who = <target (optional)> modifier = encroaching_colony is_reverse = no } |country |- |has_established_contact |Checks if the country has established contact with target country |class="mw-code"| has_established_contact = <target> |country |- |has_completed_event_chain_counter |Checks if the country has completed a specific counter in an event chain |class="mw-code"| has_completed_event_chain_counter = { event_chain = amoebas_2_chain counter = amoebas_slaughtered } |country |- |has_planet_class |Checks if the system has planet of specific class |class="mw-code"| has_planet_class = pc_tundra/ <scope> |galactic_object |- |is_disabled |Checks if the ship/ fleet is disabled |class="mw-code"| is_disabled = yes |ship fleet |- |has_existing_ship_design |Checks if the country has a specific ship design available |class="mw-code"| |country |- |has_resource |Checks if the planet has a specific amount of a specific resource |class="mw-code"| has_resource = { type = minerals amount < 5 } has_resource = no |planet country deposit |- |has_building_construction |Checks if the planet has any, or a specific, ongoing building construction |class="mw-code"| has_building_construction = yes has_building_construction = building_capital_3 |planet |- |num_fallen_empires_setting |Checks the number of fallen empires defined in setup |class="mw-code"| num_fallen_empires_setting > 1 |all |- |any_deposit |Iterate through each deposit on the planet – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_deposit = { <count=<num/ all>> <triggers> } |planet |- |free_building_slots |Checks the planet's number of slots available for new constructions |class="mw-code"| free_building_slots > 2 |planet |- |has_relation_flag |Checks if the country has a relation flag towards target country |class="mw-code"| has_relation_flag = { who = <target> flag = <flag> } |country |- |reverse_has_relation_flag |Checks if the target country has a relation flag towards the country |class="mw-code"| reverse_has_relation_flag = { who = <target> flag = <flag> } |country |- |has_moon |Checks if the planet has a moon |class="mw-code"| has_moon = yes |planet |- |num_moons |Checks the planet's number of moons |class="mw-code"| num_moons < 4 |planet |- |is_sapient |Checks if the pop is sapient |class="mw-code"| is_sapient = no |pop species |- |is_preventing_anomaly |Checks if the planet is prevented from generating anomalies |class="mw-code"| is_preventing_anomaly = yes |planet |- |has_deposit_for |Checks if the planet has a deposit for a specific ship class |class="mw-code"| has_deposit_for = shipclass_mining_station |planet |- |colony_age |Checks the planet's (colony's) age in months |class="mw-code"| colony_age > 12 |planet |- |is_bottleneck_system |Checks if the system is bottleneck within the range NDefines::NGameplay::SYSTEM_BOTTLENECK_RADIUSis_bottleneck_system = yes |class="mw-code"| |galactic_object |- |is_rim_system |Checks if the system is on the galactic rim |class="mw-code"| is_rim_system = yes |galactic_object |- |any_rim_system |Iterate through all rim systems – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_rim_system = { <count=<num/ all>> <triggers> } |all |- |is_country_type |Checks if the country is a specific type (country types are defined in files in the <code>common/country_types/</code> folder) |class="mw-code"| is_country_type = fallen_empire |country |- |has_modifier |Checks if the scope object has a certain modifier |class="mw-code"| has_modifier = <modifier> |megastructure planet country ship pop galactic_object pop_faction federation spy_network espionage_operation |- |any_ship_in_system |Iterate through each ship in the current system – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_ship_in_system = { <count=<num/ all>> <triggers> } |galactic_object |- |mission_progress |Checks if the observation post has achieved specific progress in a mission |class="mw-code"| mission_progress > 0.7 |fleet |- |num_ethics |Checks the country/ pop's number of ethics |class="mw-code"| num_ethics = 3 |country pop |- |num_traits |Checks the country/ pop/ leader/ species' number of traits |class="mw-code"| num_traits < 3 |country pop leader species |- |has_truce |Checks if the country has a truce with target country |class="mw-code"| has_truce = <target> |country |- |has_system_trade_value |Checks the system's trade value |class="mw-code"| has_system_trade_value > 200 |galactic_object |- |can_access_system |Checks if the scoped fleet is able to enter the system. Note: Avoid overusing this, it is a performance-intensive trigger! |class="mw-code"| can_access_system = <solar system> |fleet |- |is_ringworld |Checks if the planet is a ringworld |class="mw-code"| is_ringworld = yes |planet |- |member_of_faction |Checks if the pop belongs to any, or a specific, faction |class="mw-code"| member_of_faction = no/ <pop faction scope>/ isolationist |pop |- |support |Checks the faction's support level |class="mw-code"| support > 0.5 |pop_faction |- |is_ideal_planet_class |Checks if the planet is of the ideal class for target country, species or pop |class="mw-code"| is_ideal_planet_class = { who = <target> status = yes/ no } |planet |- |is_pop_faction_type |Checks the faction's type |class="mw-code"| is_pop_faction_type = isolationist |pop_faction |- |intel_level |Checks the country's intel level of target system |class="mw-code"| intel_level = { level > low system = <target> } |country |- |is_researching_area |Checks the scientist's field of research |class="mw-code"| is_researching_area = society |leader |- |any_owned_leader |Iterate through each leader that is owned by the country – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_owned_leader = { <count=<num/ all>> <triggers> } |country |- |any_owned_pop |Iterate through all owned pops – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_owned_pop = { <count=<num/ all>> <triggers> } |planet country pop_faction sector |- |has_faction |Checks if the country has any instance of target faction type |class="mw-code"| has_faction = isolationist |country |- |count_owned_pops |Count the number of owned pops in the country that fulfill the specified criteria. Warning: deprecated, use count_owned_pop |class="mw-code"| count_owned_pops = { limit = { <triggers> } count > 12 } |planet country pop_faction |- |can_declare_war |Checks if the country can declare war against target country |class="mw-code"| can_declare_war = { target = <target country> attacker_war_goal = <war goal> } |country |- |is_hostile |Checks if the country is hostile towards target country |class="mw-code"| is_hostile = <target> |country |- |is_forced_neutral |Checks if the country has been set to be neutral towards target country via set_faction_hostility |class="mw-code"| is_forced_neutral = <target> |country |- |is_forced_friendly |Checks if the country has been set to be friendly towards target country via set_faction_hostility |class="mw-code"| is_forced_friendly = <target> |country |- |has_communications |Checks if the country has established communications with target country |class="mw-code"| has_communications = <target> |country |- |has_country_resource |Checks the country's amount of a specific stored resource |class="mw-code"| has_country_resource = { type = minerals amount > 99 } |country |- |has_leader_flag |Checks if the leader has a specific flag |class="mw-code"| has_leader_flag = <flag> |leader |- |num_killed_ships |Checks how many of target country's ships that the country has destroyed |class="mw-code"| num_killed_ships = { target = <target> value > 5 } |country |- |num_taken_planets |Checks how many planets the country has taken from target country |class="mw-code"| num_taken_planets = { target = <target> value > 1 } |country |- |leader_of_faction |Checks if the leader is the leader of a faction |class="mw-code"| leader_of_faction = yes/ no/ <pop faction scope>/ isolationist |leader |- |is_scope_valid |Checks if the current scope is valid |class="mw-code"| is_scope_valid = yes |all |- |opposing_ethics_divergence |Checks how far removed the country/ pop's ethos is from target's |class="mw-code"| opposing_ethics_divergence = { steps > 1 who = <target> } |country pop |- |is_war_leader |Checks if the country leads in a war |class="mw-code"| is_war_leader = yes |country pop_faction |- |is_in_federation_with |Checks if the country is in a federation with target country |class="mw-code"| is_in_federation_with = <target> |country |- |can_change_policy |Checks if the country can change a specific policy |class="mw-code"| can_change_policy = slavery |country |- |is_ironman |Check if current game is running in ironman mode |class="mw-code"| is_ironman = yes |all |- |has_monthly_income |Checks the country's monthly income of a specific resource |class="mw-code"| has_monthly_income = { resource = engineering_research value < 20 } |country |- |else |Evaluates the triggers if the display_triggers of preceding 'if' or 'else_if' is not met |class="mw-code"| if = { limit = { <display_triggers> } <triggers> } else = { <triggers> } |all |- |has_policy_flag |Checks if the country has a specific policy |class="mw-code"| has_policy_flag = slavery_not_allowed |country |- |count_deposits |Checks the number of deposits on the planet that meet the specified criteria |class="mw-code"| count_deposits = { type = <deposit> count < 2 } |planet |- |has_tech_option |Checks if the country has a tech research option currently available |class="mw-code"| has_tech_option = tech_mining_network_2 |country |- |count_tech_options |Checks the country's number available tech research options in a specific field |class="mw-code"| count_tech_options = { area = physics count > 0 } |country |- |has_point_of_interest |Checks if the scoped country has a specific point of interest in its situation log |class="mw-code"| has_point_of_interest = { poi = <id> } |planet country ship fleet galactic_object ambient_object |- |is_being_repaired |Checks if the ship/ fleet is being repaired |class="mw-code"| is_being_repaired = yes |ship fleet |- |compare_distance |Checks whether the current scope is closer to a specified object than it is to a second specified object within the same solar system. |class="mw-code"| compare_distance = { closer_object = root further_object = from } |megastructure planet ship pop fleet galactic_object leader ambient_object starbase deposit archaeological_site first_contact |- |any_ambient_object |Iterate through every ambient object in the game – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_ambient_object = { <count=<num/ all>> <triggers> } |all |- |any_system_ambient_object |Iterate through every ambient object in the solar system – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_system_ambient_object = { <count=<num/ all>> <triggers> } |galactic_object |- |has_ambient_object_flag |Checks if the ambient object has a specific flag |class="mw-code"| has_ambient_object_flag = <flag> |ambient_object |- |is_ambient_object_type |Checks if the ambient object is a specific type. |class="mw-code"| is_ambient_object_type = caravaneer_billboard_1 |ambient_object |- |any_bordering_country |Iterate through all bordering countries of a system – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_bordering_country = { <count=<num/ all>> <triggers> } |galactic_object |- |galaxy_percentage |Checks if the country has a specific percentage (0.00-1.00) of the galaxy within its borders |class="mw-code"| galaxy_percentage > 0.40 |country |- |custom_tooltip_fail |Shows custom text only when the associated trigger fails |class="mw-code"| custom_tooltip_fail = { text = <text> <triggers> } |all |- |count_armies |Checks the number of armies on/ in the planet/ country that meet the specified criteria |class="mw-code"| count_armies = { limit = { <triggers> } count < 12 } |planet country |- |is_in_combat |Checks if the ship/ fleet is engaged in combat |class="mw-code"| is_in_combat = yes |ship fleet |- |any_member |Iterate through each member of the federation – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_member = { <count=<num/ all>> <triggers> } |federation |- |is_guaranteeing |Checks if the country is guaranteeing the independence of target country |class="mw-code"| is_guaranteeing = <target> |country |- |is_war_participant |Checks if target country is participating in the war on the specified side |class="mw-code"| is_war_participant = { who = <target>/ war = <target> side = attackers/ defenders/ <target> } |country war |- |is_homeworld |Checks if the planet is its owner's homeworld |class="mw-code"| is_homeworld = yes |planet |- |is_friendly_to |Checks if the country has a friendly attitude towards target country |class="mw-code"| is_friendly_to = <target> |country |- |is_hostile_to |Checks if the country has a hostile attitude towards target country |class="mw-code"| is_hostile_to = <target> |country |- |is_protective_to |Checks if the country has a protective attitude towards target country |class="mw-code"| is_protective_to = <target> |country |- |is_threatened_to |Checks if the country has a threatened attitude towards target country |class="mw-code"| is_threatened_to = <target> |country |- |years_passed |Checks the number of in-game years passed since the 2200 start |class="mw-code"| years_passed < 150 |all |- |mid_game_years_passed |Checks the number of in-game years passed since the mid-game start date |class="mw-code"| mid_game_years_passed >= 50 |all |- |end_game_years_passed |Checks the number of in-game years passed since the end-game start date |class="mw-code"| end_game_years_passed >= 50 |all |- |is_dismissive_to |Checks if the country has a dismissive attitude towards target country |class="mw-code"| is_dismissive_to = <target> |country |- |is_patronizing_to |Checks if the country has a patronizing attitude towards target country |class="mw-code"| is_patronizing_to = <target> |country |- |is_angry_to |Checks if the country has an angry attitude towards target country |class="mw-code"| is_angry_to = <target> |country |- |is_neighbor_of |Checks if the country/ planet is neighbors with target country |class="mw-code"| is_neighbor_of = <target> |planet country ship fleet galactic_object |- |is_rival |Checks if the country has a rival attitude towards target country |class="mw-code"| is_rival = <target> |country |- |is_unfriendly_to |Checks if the country has an unfriendly attitude towards target country |class="mw-code"| is_unfriendly_to = <target> |country |- |is_loyal_to |Checks if the country has a loyal attitude towards target country |class="mw-code"| is_loyal_to = <target> |country |- |is_disloyal_to |Checks if the country has a disloyal attitude towards target country |class="mw-code"| is_disloyal_to = <target> |country |- |is_cordial_to |Checks if the country has a cordial attitude towards target country |class="mw-code"| is_cordial_to = <target> |country |- |is_domineering_to |Checks if the country has a domineering attitude towards target country |class="mw-code"| is_domineering_to = <target> |country |- |fleet_power |Checks the scope's total fleet power |class="mw-code"| fleet_power > 2500 |country fleet federation |- |has_election_type |Checks if the country has a specific election type |class="mw-code"| has_election_type = oligarchic |country |- |has_ai_personality |Checks if an AI empire has a certain personality type |class="mw-code"| has_ai_personality = fanatic_befrienders |country |- |has_ai_personality_behaviour |Checks if a country has a certain AI personality behavior |class="mw-code"| has_ai_personality_behaviour = slaver |country |- |has_valid_ai_personality |Checks if the country has a valid AI personality |class="mw-code"| has_valid_ai_personality = yes |country |- |has_migration_access |Checks if the country has migration access to target country |class="mw-code"| has_migration_access = <target> |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 |class="mw-code"| |all |- |would_join_war |Checks if the country would join the side of target country in a hypothetical war |class="mw-code"| would_join_war = { attacker = <target> defender = <target> side = <target> } |country |- |can_be_subject |Checks if the country can be a subject of a specific type under target country |class="mw-code"| can_be_subject = { subject_type = tributary overlord = <target> } |country |- |count_war_participants |Checks the number of participants in the war on a specific side that meet the specified criteria |class="mw-code"| count_war_participants = { limit = { <triggers> } side = target count < 4 |war |- |count_potential_war_participants |Checks the amount of potential war participants in a specific war that meet the specified criteria |class="mw-code"| count_potential_war_participants = { attacker = <target> defender = <target> side = <target> limit = { <triggers> } count > 2 |all |- |has_skill |Checks if the leader has a specific experience level |class="mw-code"| has_skill > 2 |leader |- |has_experience |Checks if the leader has a specific amount of experience |class="mw-code"| has_experience < 900 |leader |- |any_neighbor_system |Iterate through all a system's neighboring systems by hyperlane – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_neighbor_system = { <count=<num/ all>> <triggers> } |galactic_object |- |is_under_colonization |Checks if the planet is being colonized |class="mw-code"| is_under_colonization = yes |planet |- |has_colony_progress |Checks the planet's progress towards completing colonization |class="mw-code"| has_colony_progress > 20 |planet |- |distance_to_empire |Checks the ship/ fleet/ planet/ system's galaxy map distance to target empire |class="mw-code"| distance = { who = <target> distance = x } |planet ship fleet galactic_object |- |is_unemployed |Checks if the pop is unemployed |class="mw-code"| is_unemployed = yes |pop |- |years_of_peace |Checks the number of in-game years country has been at peace, with optional parameter to delay from start of game |class="mw-code"| years_of_peace = { value > 10 delay = 0 } |country |- |is_within_borders_of |Checks if the planet/ system/ fleet/ ship is within the borders of the target country |class="mw-code"| is_within_borders_of = <target> |planet ship fleet galactic_object |- |num_marauder_empires_to_spawn |Checks the number of marauder empires specified by the galaxy setup |class="mw-code"| num_marauder_empires_to_spawn > 1 |all |- |has_species_flag |Checks if the species has a specific flag |class="mw-code"| has_species_flag = <flag> |species |- |has_auto_move_target |Checks if the fleet/ ship has an active auto-move target set |class="mw-code"| has_auto_move_target = yes |ship fleet |- |count_starbase_modules |Checks the number of starbase modules that are of the specified type or not |class="mw-code"| count_starbase_modules = { type = anchorage count < 12 } |starbase |- |is_belligerent_to |Checks if the country has a belligerent attitude towards target country |class="mw-code"| is_belligerent_to = <target> |country |- |is_imperious_to |Checks if the country has a imperious attitude towards target country |class="mw-code"| is_imperious_to = <target> |country |- |is_arrogant_to |Checks if the country has a arrogant attitude towards target country |class="mw-code"| is_arrogant_to = <target> |country |- |has_association_status |Check if the country has federation association status with target country |class="mw-code"| has_association_status = <target> |country |- |is_original_owner |Checks if the target country is the planet's original owner |class="mw-code"| is_original_owner = <target> |planet |- |can_work_job |Checks if the pop can work a job |class="mw-code"| can_work_job = yes |pop |- |subject_can_diplomacy |Checks if the current country is allowed by its overlord to take diplomatic action |class="mw-code"| subject_can_diplomacy = <target> |country |- |has_surveyed_class |Checks if the country has surveyed any planet of a specific class |class="mw-code"| has_surveyed_class = pc_tundra |country |- |fleet_size |Checks the fleet's fleet size |class="mw-code"| fleet_size < 125 |fleet |- |host_has_dlc |Checks if the host has a specific DLC enabled |class="mw-code"| |all |- |local_has_dlc |Checks if the local player has a specific DLC enabled |class="mw-code"| |all |- |num_rare_techs |Checks the country's number of researched rare technologies |class="mw-code"| num_rare_techs < 4 |country |- |num_repeatable_techs |Checks the country's number of researched repeatable technologies |class="mw-code"| num_repeatable_techs < 4 |country |- |has_mandate |Checks if the leader has any, or a specific, mandate |class="mw-code"| has_mandate = no has_mandate = mandate_shipwright |leader |- |nor |An inverted OR trigger |class="mw-code"| |all |- |nand |An inverted AND trigger |class="mw-code"| |all |- |num_energy |Checks the planet's total amount of energy |class="mw-code"| num_energy > 19 |planet |- |num_armies |Checks the country's number of armies |class="mw-code"| num_armies < 20 |country |- |has_war_goal |Checks if a war goal is set. |class="mw-code"| has_war_goal = yes |all |- |max_naval_capacity |Checks the country's max naval capacity in absolute numbers |class="mw-code"| max_naval_capacity > 120 |country |- |used_naval_capacity_integer |Checks the country's used naval capacity in absolute numbers |class="mw-code"| used_naval_capacity_integer < 89 |country |- |used_naval_capacity_percent |Checks the country's used naval capacity in relative terms (0.00-1.00) |class="mw-code"| used_naval_capacity_percent < 0.75 |country |- |war_begun_num_fleets_gone_mia |Checks amount of target country's fleets that went MIA when the war began |class="mw-code"| war_begun_num_fleets_gone_mia = { who = <target> value < 10 } |war |- |custom_tooltip_success |Shows custom text only when the associated trigger passes |class="mw-code"| custom_tooltip_success = { text = <text> <triggers> } |all |- |has_active_event |Checks if country has active events: |class="mw-code"| has_active_event = { event.1 event.2 event.n } |country |- |success_text |For 'desc={trigger={' use. Shows custom text when the associated trigger passes. |class="mw-code"| success_text = { text = <text> <triggers> } |all |- |fail_text |For 'desc={trigger={' use. Shows custom text when the associated trigger fails. |class="mw-code"| fail_text = { text = <text> <triggers> } |all |- |is_subject_type |Checks if the country is a specific type of subject |class="mw-code"| is_subject_type = vassal |country |- |has_defensive_pact |Checks if the country has a defensive pact with target country |class="mw-code"| has_defensive_pact = <target> |country |- |calc_true_if |Returns true if the specified number of sub-triggers return true |class="mw-code"| calc_true_if = { amount = 2 <trigger> <trigger> <trigger> } |all |- |is_researching_technology |Checks if the country is currently researching a specific technology |class="mw-code"| is_researching_technology = tech_gene_seed_purification |country |- |is_subject |Checks if the country is a subject of any other country |class="mw-code"| is_subject = no |country |- |any_subject |Iterate through all subjects of the scoped country – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_subject = { <count=<num/ all>> <triggers> } |country |- |log |Prints a message to game.log for debugging purposes |class="mw-code"| log = <string> |all |- |is_enigmatic_to |Checks if the country has a enigmatic attitude towards target country |class="mw-code"| is_enigmatic_to = <target> |country |- |is_berserker_to |Checks if the country has a berserker attitude towards target country |class="mw-code"| is_berserker_to = <target> |country |- |has_same_ethos |Checks if a country has the same ethos (complete set of ethics) as a country or pop |class="mw-code"| has_same_ethos = <target> |country pop |- |is_majority_species |Checks if the specified species is the majority species on the current planet. |class="mw-code"| is_majority_species = <species> |planet |- |has_closed_borders |Check if the country has closed its borders to target country |class="mw-code"| has_closed_borders = <target> |country |- |is_difficulty |Checks the game's difficulty level (0 to 5, with 0 as Cadet and 5 as Grand Admiral |class="mw-code"| is_difficulty = 2 |all |- |is_exact_same_species |Checks if the scoped object is originally of the same species, or currently of the exact same species instance, as another object |class="mw-code"| is_exact_same_species = <target> |country ship pop leader army species |- |can_control_access_for |Checks if the country is allowed to control target country's border access to the country |class="mw-code"| can_control_access_for = <target> |country |- |is_overlord_to |Checks if the country has an overlord attitude towards target country |class="mw-code"| is_overlord_to = <target> |country |- |is_improving_relations_with |Checks if the country has an envoy sent to the target country to improve relations |class="mw-code"| is_improving_relations_with = <target> |country |- |is_harming_relations_with |Checks if the country has an envoy sent to the target country to harm relations |class="mw-code"| is_harming_relations_with = <target> |country |- |distance_to_core_percent |Checks the ship/ fleet/ planet/ leader/ pop/ system's distance to the galactic core in percent, where center = 0 and galactic rim = 100 |class="mw-code"| distance_to_core_percent < 60 |all |- |has_non_aggression_pact |Check if the country has a non-aggression pact with target country |class="mw-code"| has_non_aggression_pact = <target> |country |- |happiness_planet |Checks the average happiness on the planet |class="mw-code"| happiness_planet < 0.6 |planet |- |pre_ruler_leader_class |Checks the rulers previous leader class |class="mw-code"| pre_ruler_leader_class = scientist |leader |- |has_hp_percentage |Checks a fleet or ship's hit points percentage |class="mw-code"| has_hp_percentage > 0.5 |ship fleet |- |can_join_factions |Checks if scoped pop can join a faction |class="mw-code"| |pop |- |is_custodial_to |Checks if the country has a custodial attitude towards target country |class="mw-code"| is_custodial_to = <target> |country |- |has_valid_civic |Checks if the current country has a certain civic and if its validated |class="mw-code"| has_valid_civic = my_test_civic_1 |country |- |has_non_swapped_tradition |Checks if a country has the given tradition and it is not swapped. Also returns true if the tradition is swapped but has inherit_effects = yes (i.e. it's a cosmetic flavor swap). |class="mw-code"| has_non_swapped_tradition = tr_my_santa_claus_tradition |country |- |has_swapped_tradition |Checks if a country has the given swapped tradition. |class="mw-code"| has_swapped_tradition = tr_my_santa_claus_tradition |country |- |is_event_leader |Checks if a leader is a special event leader (defined in create_leader) |class="mw-code"| is_event_leader = no |leader |- |is_crises_allowed |Check if current game allows crises |class="mw-code"| is_crises_allowed = yes |all |- |allowed_crisis_type |Checks which crisis is allowed to spawn in the current game |class="mw-code"| allowed_crisis_type = prethoryn/ unbidden/ contingency/ all |all |- |is_custom_capital_location |Checks if the spatial object is its owner's custom capital location |class="mw-code"| is_custom_capital_location = yes |planet ship fleet galactic_object |- |resource_stockpile_compare |Checks specific resource stockpile for the country scope: |class="mw-code"| resource_stockpile_compare = { resource = <resource_name> value ><= <value> mult = <variable> (optional: multiply the value by a variable, e.g. for when you are doing the same with add_resource) } |country |- |planet_resource_compare |Checks specific resource value for scoped planet: |class="mw-code"| planet_resource_compare = { resource = <resource_name> value ><= <value> type = upkeep/ produces/ balance (default)} |planet |- |resource_income_compare |Checks specific resource income value for the country scope: |class="mw-code"| resource_income_compare = { resource = <resource_name> value ><= <value> } |country |- |market_resource_price |Checks market price of a specific resource for the current country: |class="mw-code"| market_resource_price = { resource = <resource_name> amount = <value> (how much are you buying/ selling) trade_type = market_buy/ market_sell/ not_set (i.e. price without market fees) value ><= <value> } |country |- |pop_percentage |Checks the percentage of pops in the scope that fulfill the specified criteria |class="mw-code"| pop_percentage = { percentage > 0.74 limit = { <triggers> } exclude = { <triggers> } (optional: specifies pops to exclude from the calculation) } |planet country pop_faction sector |- |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. |class="mw-code"| num_species > 8 |planet country pop_faction |- |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. |class="mw-code"| num_unique_species < 12 |planet country pop_faction |- |has_diplo_migration_treaty |Checks if two countries have a migration treaty. |class="mw-code"| |country |- |has_presence |Checks if a system contains any fleets, stations, mega structures or colonized planets. |class="mw-code"| has_presence = yes |galactic_object |- |is_megastructure_type |is_megastructure_type = <name of type>. Compares the type of scope's mega structure to a type from the database |class="mw-code"| |megastructure |- |is_upgrading |is_upgrading = <yes/ no>. Checks if the scope's fleet or mega structure is currently upgrading |class="mw-code"| |megastructure fleet |- |relative_power |Compares relative power between two countries. relative_power = { who = <target country> category = <fleet/ economy/ technology/ all> value ><= <pathetic/ inferior/ equivalent/ superior/ overwhelming> |class="mw-code"| |country federation |- |has_tradition |Checks if a country has the given tradition. |class="mw-code"| has_tradition = tr_my_santa_claus_tradition |country |- |any_relation |Iterate through all relations – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_relation = { <count=<num/ all>> <triggers> } |country |- |has_megastructure_flag |Checks if the mega structure has a specific flag |class="mw-code"| has_megastructure_flag = <flag> |megastructure |- |has_citizenship_type |Checks if a species/ pop/ leader has a particular citizenship type in their country |class="mw-code"| has_citizenship_type = { country = <who> type = <type> } |pop leader species |- |has_population_control |Checks if the pop is prevented from reproducing |class="mw-code"| has_population_control = yes |pop |- |has_migration_control |Checks if the pop is prevented from migrating |class="mw-code"| has_migration_control = yes |pop |- |species_planet_slave_percentage |Checks if a pop's planet has a specific percentage (0.00-1.00) of the same species enslaved |class="mw-code"| species_planet_slave_percentage > 0.40 |pop |- |has_ascension_perk |Checks if a country has the given ascension perk. |class="mw-code"| has_ascension_perk = ap_my_ascension_perk |country |- |num_ascension_perks |Compares the number of AP points the country has spent with the given value |class="mw-code"| num_ascension_perks > 7 |country |- |pop_produces_resource |Checks if a pop is currently producing a particular resource |class="mw-code"| pop_produces_resource = { type = minerals amount < 5 } |pop |- |has_military_service_type |Checks if a species/ pop/ leader has a particular military service type in their country |class="mw-code"| has_military_service_type = { country = <who> type = <type> } |pop leader species |- |has_purge_type |Checks if a species/ pop/ leader has a particular purge type in their country |class="mw-code"| has_purge_type = { country = <who> type = <type> } |pop leader species |- |has_slavery_type |Checks if a species/ pop/ leader has a particular slavery type in their country |class="mw-code"| has_slavery_type = { country = <who> type = <type> } |pop leader species |- |has_living_standard |Checks if a species/ pop/ leader has a particular living standard in their country |class="mw-code"| has_living_standard = { country = <who> type = <type> } |pop leader species |- |num_ascension_perk_slots |Compares the number of unlocked ascension perk slots of the scope with the given value |class="mw-code"| num_ascension_perks > 7 |country |- |is_fleet_idle |Checks if the ship/ fleet is idfle |class="mw-code"| is_fleet_idle = yes |ship fleet |- |debug_break |Trigger an assertion to stop the debugger when encountering this trigger; returns the value it is assigned |class="mw-code"| debug_break = yes |all |- |has_civic |Checks if the current country has the specified civic |class="mw-code"| has_civic = my_test_civic_1 |country dlc_recommendation |- |has_authority |Checks if the current country has the specified government authority |class="mw-code"| has_authority = auth_democratic |country dlc_recommendation |- |has_invalid_civic |Checks if the current country has a certain civic and if its invalidated |class="mw-code"| has_invalid_civic = my_test_civic_1 |country |- |has_colonization_control |Checks if the pop is prevented from migrating |class="mw-code"| has_colonization_control = { value = bool country = scope } |pop species |- |has_trade_route |Checks if a system has trade route going through. |class="mw-code"| has_trade_route = <yes/ no> |galactic_object |- |trade_route_value |Checks the trade value going through the system. |class="mw-code"| trade_route_value >=< 40 |galactic_object |- |trade_intercepted_percentage |Checks the intercepted trade value ratio going through the system. |class="mw-code"| trade_intercepted_percentage >=< 40 |galactic_object |- |trade_intercepted_value |Checks the intercepted trade value going through the system. |class="mw-code"| trade_intercepted_value >=< 40 |galactic_object |- |trade_protected_value |Checks the protected trade value going through the system. |class="mw-code"| trade_protected_value >=< 40 |galactic_object |- |trade_protected_percentage |Checks the protected trade value ratio going through the system. |class="mw-code"| trade_protected_percentage >=< 40 |galactic_object |- |num_trade_routes |Counts the number trade routes in the empire. |class="mw-code"| num_trade_routes >=< 40 |country |- |count_species |Counts the number of species in the scope that fulfill the specified criteria, not counting sub-species as unique. |class="mw-code"| count_species = { count > 4 limit = { <triggers> } } |planet country |- |count_exact_species |Counts the number of species in the scope that fulfill the specified criteria, counting sub-species as unique. |class="mw-code"| count_exact_species = { count > 4 limit = { <triggers> } } |planet country |- |is_constructing |Checks if the scoped construction ship is building the specified thing |class="mw-code"| is_constructing = megastructure | <megastructure type> | starbase | mining_station | research_station | observation_post | <ship class> |ship fleet |- |has_ruler_trait |Checks if a leader has a certain ruler trait, even if they are not currently ruler |class="mw-code"| has_ruler_trait = leader_trait_carefree |leader |- |num_trait_points |Checks the country/ pop/ leader/ species' number of traits points spent |class="mw-code"| num_traits < 3 |country pop leader species |- |has_component |Checks if a ship has a certain component |class="mw-code"| has_component = <component template key> |ship |- |has_notification_modifier |Checks if a country has a certain notification modifier |class="mw-code"| has_notification_modifier = <key> |country |- |pop_maintenance_cost |Checks the maintenace costs of a pop |class="mw-code"| pop_maintenance_cost = { value > 0.5 resource = energy } |pop |- |conditional_tooltip |The enclosed trigger will be completely ignored if the condition in "trigger" isn't true. Useful to hide part of tooltips that are not relevant. |class="mw-code"| |all |- |has_natural_wormhole |Returns true if the scopes system contains at least one natural wormhole |class="mw-code"| has_natural_wormhole = yes |galactic_object |- |has_claim |Checks if the country has claims on the given country or system. |class="mw-code"| has_claim = <country|system> |country |- |num_active_gateways |Checks the number of active gateways in the galaxy |class="mw-code"| num_active_gateways < 3 |all |- |attacker_war_exhaustion |Checks the war exhaustion of the war's attackers |class="mw-code"| attacker_war_exhaustion > 0.6 |war |- |defender_war_exhaustion |Checks the war exhaustion of the war's defenders |class="mw-code"| defender_war_exhaustion < 0.2 |war |- |off_war_exhaustion_sum |Checks the country's total war exhaustion for all offensive wars |class="mw-code"| off_war_exhaustion_sum < 0.1 |country |- |def_war_exhaustion_sum |Checks the country's total war exhaustion for all defemsove wars |class="mw-code"| def_war_exhaustion_sum > 0.75 |country |- |has_starbase_module |Checks if the starbase has a specific module |class="mw-code"| has_starbase_module = <starbase module> |starbase |- |has_starbase_building |Checks if the starbase has a specific building |class="mw-code"| has_starbase_building = <starbase building> |starbase |- |has_starbase_size |Compares the starbase ship size |class="mw-code"| has_starbase_size >= <starbase ship size> |starbase |- |has_seen_any_bypass |Checks the scoped country has ever encountered a bypass of a given type before |class="mw-code"| has_seen_any_bypass = bypass_type |country |- |has_seen_specific_bypass |Checks the scoped country has encountered a specific bypass before |class="mw-code"| has_seen_specific_bypass = ROOT |country |- |owns_any_bypass |Checks if the scoped country controls any system containing a bypass of a specific type |class="mw-code"| owns_any_bypass = bypass_type |country |- |has_casus_belli |Checks if the country has a valid casus belli (any casus belli or a specific one) on the given country. |class="mw-code"| has_casus_belli = { target = <country> type = <cb_type> #optional } |country |- |num_starbases |Counts the number of starbases owned by the scoped country |class="mw-code"| num_starbases >= 1 |country |- |num_owned_active_gateways |Checks the number of active gateways owned by the scoped country |class="mw-code"| num_owned_active_gateways < 3 |country |- |using_war_goal |Checks if a war has a specific war goal |class="mw-code"| using_war_goal = { type = <war goal> owner = <eventtarget, country> } |war |- |is_total_war |Checks if a war is a total war |class="mw-code"| is_total_war = yes/ no |war |- |has_status |Checks the current status of the scoped ship or fleet. |class="mw-code"| has_status = <colossus status> #charging/ firing |ship fleet |- |valid_planet_killer_target |Checks if the scoped fleet can target the given planet with its planet killer weapon |class="mw-code"| valid_planet_killer_target = <planet> |fleet |- |has_orbital_bombardment |Checks whether a planet is under bombardment |class="mw-code"| has_orbital_bombardment = yes |planet |- |has_orbital_bombardment_stance |Checks to what degree the planet is being bombarded |class="mw-code"| has_orbital_bombardment_stance = selective |planet |- |count_starbase_sizes |Checks if the scoped country has a specified quantity of a starbase size |class="mw-code"| count_starbase_sizes = { starbase_size = <starbase_ship_size> count >= 2} |country |- |command_limit |Checks the country's command limit |class="mw-code"| command_limit > 120 |country |- |has_hyperlane_to |Checks if the system has a hyperlane connection to target system |class="mw-code"| has_hyperlane_to = <target> |galactic_object |- |is_bridge |Checks if a system has the bridge flag or not. |class="mw-code"| is_bridge = <yes/ no> |galactic_object |- |inverted_switch |Switch case for a trigger treated as NOT. |class="mw-code"| inverted_switch = { trigger = pop_has_ethic ethic_xenophile = { <trigger> } ethic_xenophobe = { <trigger> } default = { <trigger> } } |all |- |is_scope_set |Checks if the scope is set for appropriate target |class="mw-code"| is_scope_set = <target> |planet country ship pop fleet |- |is_primary_star |Checks if the planet is the system's primary star |class="mw-code"| is_primary_star = yes |planet |- |uses_district_set |Checks if the planet has the specified tag for district usage: |class="mw-code"| uses_district_set = standard |planet |- |last_changed_species_rights_type |Check if the last species rights type changed for the pop or leader is of type type |class="mw-code"| last_changed_species_rights_type = <living_standard/ citizenship/ military_service/ slavery/ purge/ colonization_control/ population_control/ migration_control/ none> |pop leader |- |controlled_systems |Checks the country's or sector's number of owned systems |class="mw-code"| controlled_systems < 3 |country sector |- |exploitable_planets |Checks the country has planets that are unexploited |class="mw-code"| exploitable_planets < 3 |country |- |controlled_colonizable |Checks the country controls planets that are colonizable |class="mw-code"| controlled_colonizable > 0 |country |- |ai_colonize_plans |Checks how many plans the AI have for colonization (lighter than controlled_colonizable for AI) |class="mw-code"| ai_colonize_plans > 0 |country |- |scientist_count |Checks the countrys' number of scientists |class="mw-code"| scientist_count < 4 |country |- |has_ai_expansion_plan |Checks if the country AI has any plans to expand |class="mw-code"| has_ai_expansion_plan = no |country |- |is_on_market |Checks if resource is enabled on the Galactic Market |class="mw-code"| is_on_market = <resource_name> |all |- |can_buy_on_market |Checks if the current country can buy the specified resource on the market or galactic market |class="mw-code"| can_buy_on_market = <resource_name> |country |- |highest_threat |Checks the countrys' highest threat against it |class="mw-code"| highest_threat > 100 |country |- |has_rival |Checks if the target country is the country's rival |class="mw-code"| has_rival = <target> |country |- |has_overlord |Checks if the target country is the country's overlord |class="mw-code"| has_overlord = <target> |country |- |has_sector_type |Checks if the sector has a specific type |class="mw-code"| has_sector_type = <sector type> |sector |- |num_sectors |Counts the number of sectors owned by the scoped country |class="mw-code"| num_sectors >= 1 |country |- |has_deposit_category |Checks if a deposit has specified category |class="mw-code"| has_deposit_category = <category key> |deposit |- |has_relic |Checks if the scoped country has the specified relic |class="mw-code"| has_relic = <relic_key> |country |- |caravaneers_enabled |Checks if Caravaneers are enabled in game setup |class="mw-code"| |all |- |xeno_compatibility_enabled |Checks if Xeno Compatibility are enabled in game setup |class="mw-code"| |all |- |num_housing |Checks the planet's total housing |class="mw-code"| num_housing > 5 |planet |- |is_sector_capital |Checks if the planet is its sector's capital |class="mw-code"| is_sector_capital = yes |planet |- |has_sector_focus |Checks if the sector has a certain focus |class="mw-code"| has_sector_focus = basic |sector |- |is_site_last_die_result |Compares the last dice roll. |class="mw-code"| is_site_last_die_result >= <int> |archaeological_site first_contact |- |is_current_stage_difficulty |Compares the current stage difficulty. |class="mw-code"| is_current_stage_difficulty >= <int> |archaeological_site first_contact |- |is_site_at_stage |Compares the current stage index. |class="mw-code"| is_site_at_stage >= <int> |archaeological_site |- |is_current_stage_clues |Compares the current stage clues. |class="mw-code"| is_current_stage_clues >= <int> |archaeological_site first_contact |- |is_site_days_to_next_die_roll |Compares days to next die roll. |class="mw-code"| is_site_days_to_next_die_roll >= <int> |archaeological_site first_contact |- |is_site_last_excavator |Checks last excavating country. |class="mw-code"| is_site_last_excavator = <country> |archaeological_site |- |is_site_type |Checks the type of the site. |class="mw-code"| is_site_type = <archaeological site type key> |archaeological_site |- |is_site_completed |Checks if the site has been completed. |class="mw-code"| is_site_completed = yes/ no |archaeological_site first_contact |- |is_site_under_excavation |Checks if the site is currently being excavated. |class="mw-code"| is_site_under_excavation_ = yes/ no |archaeological_site |- |is_site_current_stage_score |Compares the current stage discovery score. |class="mw-code"| is_site_current_stage_score >= <int> |archaeological_site first_contact |- |is_site_current_stage_score_no_die |Compares the current stage discovery score excluding the current die roll. |class="mw-code"| is_site_current_stage_score_no_die >= <int> |archaeological_site first_contact |- |is_current_excavator_fleet |Checks current excavator fleet. |class="mw-code"| is_current_excavator_fleet = <fleet> |archaeological_site |- |is_artificial |Checks if the planet is artificial (as set in planet_classes) |class="mw-code"| is_artificial = yes |planet |- |federation_experience |Checks experience of the federation. |class="mw-code"| federation_experience >=< 40 ); |federation |- |federation_cohesion |Checks cohesion of the federation. |class="mw-code"| federation_cohesion >=< 40 ); |federation |- |federation_cohesion_growth |Checks cohesion growth of the federation. |class="mw-code"| federation_cohesion_growth >=< 40 ); |federation |- |has_any_federation_law_in_category |Checks if given law category has any active law |class="mw-code"| has_any_federation_law_in_category = <federation law category> |federation |- |has_federation_law |Checks if given law has been enacted in scoped federation |class="mw-code"| has_federation_law = <federation law> |federation |- |has_federation_perk |Checks if given perk has been unlocked in scoped federation |class="mw-code"| has_federation_perk = <federation perk> |federation |- |has_federation_type |Checks if federation has specific federation type |class="mw-code"| has_federation_type = <federation trype> |federation |- |federation_level |Checks federation level in comparison to given value in scoped federation |class="mw-code"| federation_level >=< <federation level> |federation |- |is_voting_on_resolution |Checks if the Galactic Community is currently voting on any, or a specific, resolution |class="mw-code"| is_voting_on_resolution = <resolution/ any> |all |- |is_proposing_resolution |Checks if the scoped country is currently proposing any, or a specific, resolution |class="mw-code"| is_proposing_resolution = <resolution/ any> |country |- |is_years_since_community_formation |Compare with number of years since the formation of the Galactic Community. NOTE: A negative value means it hasn't been formed yet! |class="mw-code"| is_years_since_community_formationn >= <int32> |all |- |is_years_since_council_establishment |Compares with number of years since the establishment of the Galactic Council. NOTE: A negative value means it hasn't been established yet! |class="mw-code"| is_years_since_council_establishment >= <int32> |all |- |is_galactic_community_formed |Checks if the Galactic Community has been formed |class="mw-code"| is_galactic_community_formed = yes/ no |all |- |is_galactic_council_established |Checks if the Galactic Council has been established |class="mw-code"| is_galactic_council_established = yes/ no |all |- |is_galactic_community_member |Checks if scoped country is part of the Galactic Community |class="mw-code"| is_galactic_community_member = yes/ no |country |- |is_part_of_galactic_council |Checks if scoped country is part of the Galactic Council |class="mw-code"| is_part_of_galactic_council = yes/ no |country |- |num_members |Checks number of members in scoped federation |class="mw-code"| num_members >=< <integer value> |federation |- |num_associates |Checks number of associates in scoped federation |class="mw-code"| num_associates >=< <integer value> |federation |- |has_origin |Checks if scoped country has specified origin |class="mw-code"| has_origin = <origin key> |country dlc_recommendation |- |is_last_lost_relic |Checks whether the relic passed in parameter is the last relic lost by the country int the current scope. |class="mw-code"| is_last_lost_relic = <relic_key> |country |- |is_last_received_relic |Checks whether the relic passed in parameter is the last relic received by the country int the current scope. |class="mw-code"| is_last_received_relic = <relic_key> |country |- |is_active_resolution |Checks if the provided Resolution is active in the Community |class="mw-code"| is_active_resolution = <resolution_type_key> |all |- |is_in_breach_of_any |Checks if an empire is in breach of any galactic resolution |class="mw-code"| is_in_breach_of_any = yes/ no |country |- |in_breach_of |Checks if the scoped country is in breach of the specified resolution (or would be, were it to be enacted) |class="mw-code"| in_breach_of = <resolution> |country |- |num_council_positions |Compares the number of council positions in the Galactic Community. |class="mw-code"| num_council_positions >= <int32> |all |- |galactic_community_rank |Compares empire rank ( sorted by diplomatic weight ) in the Galactic Community. NOTE: If the scoped country isn't part of the community this returns -1. |class="mw-code"| galactic_community_rank >= <int32> |country |- |is_permanent_councillor |Checks if an empire has a permanent seat on the Galactic Council |class="mw-code"| is_permanent_councillor = yes/ no |country |- |has_federation_setting |Checks if given setting is on for scoped federation |class="mw-code"| has_federation_setting = <setting> |federation |- |any_owned_species |Check if any of the species <on the planet/ in the country> meet the specified criteria – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_owned_species = { <count=<num/ all>> <triggers> } |planet country |- |any_enslaved_species |Check if any of the species with enslaved pops <on the planet/ in the country> meet the specified criteria – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_enslaved_species = { <count=<num/ all>> <triggers> } |planet country |- |num_ai_empires_setting |Checks the number of AI empires defined in setup |class="mw-code"| num_ai_empires_setting >= 1 |all |- |num_defensive_pacts |Checks the number of defensive pacts the current country has. |class="mw-code"| num_defensive_pacts > 2 |country |- |num_support_independence |Checks the number of empires the current country is supporting the independence of. |class="mw-code"| num_support_independence > 2 |country |- |num_guarantees |Checks the number of empires the current country is guaranteeing. |class="mw-code"| num_guarantees > 2 |country |- |num_non_aggression_pacts |Checks the number of non-aggression pacts the current country has. |class="mw-code"| num_non_aggression_pacts > 2 |country |- |num_commercial_pacts |Checks the number of commercial pacts the current country has. |class="mw-code"| num_commercial_pacts > 2 |country |- |num_research_agreements |Checks the number of research agreements a country has |class="mw-code"| num_research_agreements > 2 |country |- |num_migration_pacts |Checks the number of migration pacts a country has |class="mw-code"| num_migration_pacts > 2 |country |- |num_rivals |Checks the number of rivalries a country has |class="mw-code"| num_rivals > 2 |country |- |num_closed_borders |Checks the number of countries the country has closed borders to |class="mw-code"| num_closed_borders > 2 |country |- |num_truces |Checks the number of truces country has |class="mw-code"| num_truces > 2 |country |- |galaxy_size |Checks whether the galaxy size if of a certain type |class="mw-code"| galaxy_size=medium |all |- |pop_has_happiness |Checks if the current pop has happiness or not. |class="mw-code"| pop_has_happiness = yes/ no |pop |- |has_current_purge |Checks if any pops are being purged on the current planet. |class="mw-code"| has_current_purge = yes/ no |planet |- |species_has_happiness_with_owner |Checks if the current species has happiness or not when owned by a specified country. |class="mw-code"| species_has_happiness_with_owner = country |species |- |num_planets_in_system |Checks the solar system's total number of planets |class="mw-code"| num_planets_in_system > 5 |galactic_object |- |num_assigned_jobs |Checks the number of pops the planet or country has that work a specific job. |class="mw-code"| num_assigned_jobs = { job = <key>/ unemployed value > 2 } |planet country |- |has_active_first_contact_with |Checks if the scoped country has an active First Contact site with the target country |class="mw-code"| has_active_first_contact_with = <country> |country |- |can_have_first_contact_site_with |Checks if the scoped country is allowed to have a First Contact site with the target country |class="mw-code"| can_have_first_contact_site_with = <country> |country |- |is_current_first_contact_stage |Checks if the scoped first contact is at the specified stage. |class="mw-code"| is_current_first_contact_stage = default_stage_2 |first_contact |- |has_spynetwork |Checks if scoped country has any spynetworks with a value > 0 |class="mw-code"| has_spynetwork = yes |country |- |has_espionage_asset |Checks if the scope hold an asset of specified type |class="mw-code"| has_espionage_asset = <asset type> |spy_network espionage_operation |- |has_espionage_operation_flag |Checks if the espionage operation has a specific flag |class="mw-code"| has_espionage_operation_flag = <flag> |espionage_operation |- |has_menace_perk |Checks if a country has a specific Menace Perk unlocked. |class="mw-code"| has_menace_perk = <menace_perk_name> |country |- |num_organic_pops_per_year |Checks how many organic pops the planet expects to gain in a year on average (through growth and assembly) at the current rate. |class="mw-code"| num_organic_pops_per_year > 0.41 |planet |- |num_artificial_pops_per_year |Checks how many artificial pops the planet expects to assemble in a year on average at the current rate. |class="mw-code"| num_artificial_pops_per_year > 0.41 |planet |- |has_spy_power |Compares the spy power of the network |class="mw-code"| has_spy_power = <num> |spy_network |- |has_available_spy_power |Compares the available spy power of the network |class="mw-code"| has_available_spy_power = <num> |spy_network |- |has_espionage_category |Checks if the scope is of a specific category |class="mw-code"| has_espionage_category = <espionage category key> |espionage_operation |- |is_running_espionage_operation |Checks if the scope is currently running an espionage operation |class="mw-code"| is_running_espionage_operation = <bool> |country spy_network |- |has_espionage_type |Checks if the scope is of a specific type |class="mw-code"| has_espionage_type = <espionage type key> |espionage_operation |- |relative_encryption_decryption |Divides the encryption value of the scope object with the decryption value of the target and compares with value. |class="mw-code"| Target is only used for country scope. relative_encryption_decryption = { target = <country> value > 1.0 } |country spy_network espionage_operation |- |is_espionage_operation_days_to_next_die_roll |Compares days to next die roll. |class="mw-code"| is_espionage_operation_days_to_next_die_roll >= <value> |espionage_operation |- |is_espionage_operation_chapter |Compares the current espionage operation chapter index. |class="mw-code"| is_espionage_operation_chapter >= <int> |espionage_operation |- |is_espionage_operation_difficulty |Compares the espionage operation difficulty. |class="mw-code"| is_espionage_operation_difficulty >= <value> |espionage_operation |- |is_espionage_operation_score_no_die |Compares the current espionage score excluding the current die roll. |class="mw-code"| is_espionage_operation_score_no_die >= <value> |espionage_operation |- |is_espionage_operation_score |Compares the current espionage score. |class="mw-code"| is_espionage_operation_score >= <value> |espionage_operation |- |is_espionage_operation_last_die_result |Compares the last dice roll. |class="mw-code"| is_espionage_operation_last_die_result >= <int> |espionage_operation |- |num_espionage_assets |Compares the number of assets associated with the scope object. |class="mw-code"| num_espionage_assets = <int> |spy_network espionage_operation |- |has_ship_owner_type |Checks if the ship/ fleet/ design has a specific owner type (country/ federation/ galactic_community/ global_ship_design) |class="mw-code"| has_ship_owner_type = galactic_community |ship fleet design |- |has_crisis_level |Checks if a country has a specific Crisis Level unlocked. |class="mw-code"| has_crisis_level = <crisis_level_name> |country |- |has_spynetwork_value |Compares spy network value of the scoped object |class="mw-code"| has_spynetwork_value >= <value> |spy_network |- |is_spynetwork_level |Compares spy network level of the scoped object |class="mw-code"| is_spynetwork_level >= <int> |spy_network |- |is_counter_espionage |Compares counter espionage of the scoped object |class="mw-code"| is_counter_espionage >= <value> |country |- |has_embassy |Check if the country has an embassy with the target country |class="mw-code"| has_embassy = <target> |country |- |is_spynetwork_max_level |Compares spy network max level of the scoped object |class="mw-code"| is_spynetwork_max_level >= <int> |spy_network |- |has_job_category |Checks if the pop is currently working this strata job (worker, specialist, complex_drone, etc.) Returns false if unemployed. |class="mw-code"| has_job_category = <key> |pop |- |count_ambient_object |Iterate through every ambient object in the game – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_ambient_object = { count = <num/ all> limit = { <triggers> } } |all |- |count_system_ambient_object |Iterate through every ambient object in the solar system – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_system_ambient_object = { count = <num/ all> limit = { <triggers> } } |galactic_object |- |any_owned_army |Iterate through each army that is owned by the country – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_owned_army = { <count=<num/ all>> <triggers> } |country |- |count_owned_army |Iterate through each army that is owned by the country – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_owned_army = { count = <num/ all> limit = { <triggers> } } |country |- |any_planet_army |Iterate through each army on the planet (not in ground combat) belonging to the planet owner – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_planet_army = { <count=<num/ all>> <triggers> } |planet |- |count_planet_army |Iterate through each army on the planet (not in ground combat) belonging to the planet owner – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_planet_army = { count = <num/ all> limit = { <triggers> } } |planet |- |any_ground_combat_defender |Iterate through each army currently defending the planet in ground combat – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_ground_combat_defender = { <count=<num/ all>> <triggers> } |planet |- |count_ground_combat_defender |Iterate through each army currently defending the planet in ground combat – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_ground_combat_defender = { count = <num/ all> limit = { <triggers> } } |planet |- |any_ground_combat_attacker |Iterate through each army currently attacking the planet in ground combat – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_ground_combat_attacker = { <count=<num/ all>> <triggers> } |planet |- |count_ground_combat_attacker |Iterate through each army currently attacking the planet in ground combat – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_ground_combat_attacker = { count = <num/ all> limit = { <triggers> } } |planet |- |count_country |Iterate through all countries – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_country = { count = <num/ all> limit = { <triggers> } } |all |- |count_relation |Iterate through all relations – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_relation = { count = <num/ all> limit = { <triggers> } } |country |- |any_neighbor_country |Iterate through all neighbor countries – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_neighbor_country = { <count=<num/ all>> <triggers> } |country |- |count_neighbor_country |Iterate through all neighbor countries – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_neighbor_country = { count = <num/ all> limit = { <triggers> } } |country |- |count_bordering_country |Iterate through all bordering countries of a system – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_bordering_country = { count = <num/ all> limit = { <triggers> } } |galactic_object |- |any_rival_country |Iterate through all countries rivalled by the scoped country – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_rival_country = { <count=<num/ all>> <triggers> } |country |- |count_rival_country |Iterate through all countries rivalled by the scoped country – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_rival_country = { count = <num/ all> limit = { <triggers> } } |country |- |any_federation_ally |Iterate through all countries in a federation with the scoped country – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_federation_ally = { <count=<num/ all>> <triggers> } |country |- |count_federation_ally |Iterate through all countries in a federation with the scoped country – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_federation_ally = { count = <num/ all> limit = { <triggers> } } |country |- |count_playable_country |Iterate through all playable countries – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_playable_country = { count = <num/ all> limit = { <triggers> } } |all |- |count_subject |Iterate through all subjects of the scoped country – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_subject = { count = <num/ all> limit = { <triggers> } } |country |- |any_spynetwork |Iterate through each spynetwork – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_spynetwork = { <count=<num/ all>> <triggers> } |country no_scope |- |count_spynetwork |Iterate through each spynetwork – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_spynetwork = { count = <num/ all> limit = { <triggers> } } |country no_scope |- |any_espionage_operation |Iterate through each espionage operation – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_espionage_operation = { <count=<num/ all>> <triggers> } |country no_scope spy_network |- |count_espionage_operation |Iterate through each espionage operation – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_espionage_operation = { count = <num/ all> limit = { <triggers> } } |country no_scope spy_network |- |any_espionage_asset |Iterate through each espionage asset – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_espionage_asset = { <count=<num/ all>> <triggers> } |no_scope spy_network espionage_operation |- |count_espionage_asset |Iterate through each espionage asset – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_espionage_asset = { count = <num/ all> limit = { <triggers> } } |no_scope spy_network espionage_operation |- |any_federation |Iterate through each federation – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_federation = { <count=<num/ all>> <triggers> } |all |- |count_federation |Iterate through each federation – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_federation = { count = <num/ all> limit = { <triggers> } } |all |- |any_first_contact |Iterate through each first contact (both active and complete) that this country is engaging in – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_first_contact = { <count=<num/ all>> <triggers> } |country |- |count_first_contact |Iterate through each first contact (both active and complete) that this country is engaging in – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_first_contact = { count = <num/ all> limit = { <triggers> } } |country |- |any_active_first_contact |Iterate through each active (non-completed) first contact that this country is engaging in – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_active_first_contact = { <count=<num/ all>> <triggers> } |country |- |count_active_first_contact |Iterate through each active (non-completed) first contact that this country is engaging in – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_active_first_contact = { count = <num/ all> limit = { <triggers> } } |country |- |any_galaxy_fleet |Iterate through each fleet in the entire game – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_galaxy_fleet = { <count=<num/ all>> <triggers> } |all |- |count_galaxy_fleet |Iterate through each fleet in the entire game – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_galaxy_fleet = { count = <num/ all> limit = { <triggers> } } |all |- |any_combatant_fleet |Iterate through each fleet this fleet is in combat with – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_combatant_fleet = { <count=<num/ all>> <triggers> } |fleet |- |count_combatant_fleet |Iterate through each fleet this fleet is in combat with – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_combatant_fleet = { count = <num/ all> limit = { <triggers> } } |fleet |- |any_fleet_in_system |Iterate through each fleet in the current system – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_fleet_in_system = { <count=<num/ all>> <triggers> } |galactic_object |- |count_fleet_in_system |Iterate through each fleet in the current system – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_fleet_in_system = { count = <num/ all> limit = { <triggers> } } |galactic_object |- |count_owned_fleet |Iterate through each fleet owned by the country – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_owned_fleet = { count = <num/ all> limit = { <triggers> } } |country |- |count_fleet_in_orbit |Iterate through each fleet orbiting the current planet/ starbase/ megastructure – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_fleet_in_orbit = { count = <num/ all> limit = { <triggers> } } |megastructure planet starbase |- |count_owned_leader |Iterate through each leader that is owned by the country – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_owned_leader = { count = <num/ all> limit = { <triggers> } } |country |- |any_pool_leader |Iterate through each leader that is recruitable for the country – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_pool_leader = { <count=<num/ all>> <triggers> } |country |- |count_pool_leader |Iterate through each leader that is recruitable for the country – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_pool_leader = { count = <num/ all> limit = { <triggers> } } |country |- |any_envoy |Iterate through each envoy available to the country – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_envoy = { <count=<num/ all>> <triggers> } |country |- |count_envoy |Iterate through each envoy available to the country – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_envoy = { count = <num/ all> limit = { <triggers> } } |country |- |any_megastructure |Iterate through each megastructure – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_megastructure = { <count=<num/ all>> <triggers> } |all |- |count_megastructure |Iterate through each megastructure – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_megastructure = { count = <num/ all> limit = { <triggers> } } |all |- |any_owned_megastructure |Iterate through each owned megastructure – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_owned_megastructure = { <count=<num/ all>> <triggers> } |country |- |count_owned_megastructure |Iterate through each owned megastructure – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_owned_megastructure = { count = <num/ all> limit = { <triggers> } } |country |- |any_system_megastructure |Iterate through each megastructure in system – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_system_megastructure = { <count=<num/ all>> <triggers> } |all |- |count_system_megastructure |Iterate through each megastructure in system – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_system_megastructure = { count = <num/ all> limit = { <triggers> } } |all |- |count_member |Iterate through each member of the federation – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_member = { count = <num/ all> limit = { <triggers> } } |federation |- |any_associate |Iterate through each associate member of the federation – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_associate = { <count=<num/ all>> <triggers> } |federation |- |count_associate |Iterate through each associate member of the federation – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_associate = { count = <num/ all> limit = { <triggers> } } |federation |- |count_system_planet |Iterate through each planet in the current system – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_system_planet = { count = <num/ all> limit = { <triggers> } } |galactic_object |- |count_planet_within_border |Iterate through each planet within the current empire's borders – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_planet_within_border = { count = <num/ all> limit = { <triggers> } } |country |- |any_owned_planet |Iterate through each inhabited planet owned by the current empire – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_owned_planet = { <count=<num/ all>> <triggers> } |country sector |- |count_owned_planet |Iterate through each inhabited planet owned by the current empire – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_owned_planet = { count = <num/ all> limit = { <triggers> } } |country sector |- |any_controlled_planet |Iterate through each inhabited planet controlled by the current empire – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_controlled_planet = { <count=<num/ all>> <triggers> } |country |- |count_controlled_planet |Iterate through each inhabited planet controlled by the current empire – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_controlled_planet = { count = <num/ all> limit = { <triggers> } } |country |- |any_galaxy_planet |Iterate through each planet ANYWHERE in the game; warning: resource intensive! - checks whether the enclosed triggers return true for any of them |class="mw-code"| any_galaxy_planet = { <count=<num/ all>> <triggers> } |all |- |count_galaxy_planet |Iterate through each planet ANYWHERE in the game; warning: resource intensive! - checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_galaxy_planet = { count = <num/ all> limit = { <triggers> } } |all |- |count_deposit |Iterate through each deposit on the planet – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_deposit = { count = <num/ all> limit = { <triggers> } } |planet |- |count_moon |Iterate through each moon of the planet – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_moon = { count = <num/ all> limit = { <triggers> } } |planet |- |count_owned_pop |Iterate through all owned pops – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_owned_pop = { count = <num/ all> limit = { <triggers> } } |planet country pop_faction sector |- |any_species_pop |Iterate through each pop that belongs to this species; warning: resource-intensive! - checks whether the enclosed triggers return true for any of them |class="mw-code"| any_species_pop = { <count=<num/ all>> <triggers> } |species |- |count_species_pop |Iterate through each pop that belongs to this species; warning: resource-intensive! - checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_species_pop = { count = <num/ all> limit = { <triggers> } } |species |- |any_pop_faction |Iterate through all the country's pop factions – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_pop_faction = { <count=<num/ all>> <triggers> } |country |- |count_pop_faction |Iterate through all the country's pop factions – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_pop_faction = { count = <num/ all> limit = { <triggers> } } |country |- |any_galaxy_sector |Iterate through all sectors in the game – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_galaxy_sector = { <count=<num/ all>> <triggers> } |all |- |count_galaxy_sector |Iterate through all sectors in the game – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_galaxy_sector = { count = <num/ all> limit = { <triggers> } } |all |- |any_owned_sector |Iterate through every owned sector – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_owned_sector = { <count=<num/ all>> <triggers> } |country |- |count_owned_sector |Iterate through every owned sector – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_owned_sector = { count = <num/ all> limit = { <triggers> } } |country |- |count_owned_ship |Iterate through each ship in the fleet or owned by the country – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_owned_ship = { count = <num/ all> limit = { <triggers> } } |country fleet |- |count_ship_in_system |Iterate through each ship in the current system – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_ship_in_system = { count = <num/ all> limit = { <triggers> } } |galactic_object |- |any_owned_pop_species |Iterate through each species of a country's owned pops – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_owned_pop_species = { <count=<num/ all>> <triggers> } |country |- |count_owned_pop_species |Iterate through each species of a country's owned pops – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_owned_pop_species = { count = <num/ all> limit = { <triggers> } } |country |- |any_galaxy_species |Check if any species in the galaxy meet the specified criteria – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_galaxy_species = { <count=<num/ all>> <triggers> } |all |- |count_galaxy_species |Check if any species in the galaxy meet the specified criteria – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_galaxy_species = { count = <num/ all> limit = { <triggers> } } |all |- |count_owned_species |Check if any of the species <on the planet/ in the country> meet the specified criteria – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_owned_species = { count = <num/ all> limit = { <triggers> } } |planet country |- |count_enslaved_species |Check if any of the species with enslaved pops <on the planet/ in the country> meet the specified criteria – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_enslaved_species = { count = <num/ all> limit = { <triggers> } } |planet country |- |any_owned_starbase |Iterate through every owned starbase – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_owned_starbase = { <count=<num/ all>> <triggers> } |country |- |count_owned_starbase |Iterate through every owned starbase – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_owned_starbase = { count = <num/ all> limit = { <triggers> } } |country |- |any_system |Iterate through all systems – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_system = { <count=<num/ all>> <triggers> } |all |- |count_system |Iterate through all systems – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_system = { count = <num/ all> limit = { <triggers> } } |all |- |count_rim_system |Iterate through all rim systems – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_rim_system = { count = <num/ all> limit = { <triggers> } } |all |- |any_system_within_border |Iterate through all systems within the country's or sector's borders – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_system_within_border = { <count=<num/ all>> <triggers> } |country sector |- |count_system_within_border |Iterate through all systems within the country's or sector's borders – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_system_within_border = { count = <num/ all> limit = { <triggers> } } |country sector |- |count_neighbor_system |Iterate through all a system's neighboring systems by hyperlane – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_neighbor_system = { count = <num/ all> limit = { <triggers> } } |galactic_object |- |any_neighbor_system_euclidean |Iterate through all a system's neighboring systems (by closeness, not by hyperlanes) – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_neighbor_system_euclidean = { <count=<num/ all>> <triggers> } |galactic_object |- |count_neighbor_system_euclidean |Iterate through all a system's neighboring systems (by closeness, not by hyperlanes) – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_neighbor_system_euclidean = { count = <num/ all> limit = { <triggers> } } |galactic_object |- |any_war_participant |Iterate through all war participants – checks whether the enclosed triggers return true for any of them |class="mw-code"| any_war_participant = { <count=<num/ all>> <triggers> } |war |- |count_war_participant |Iterate through all war participants – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_war_participant = { count = <num/ all> limit = { <triggers> } } |war |- |count_attacker |Iterate through all attackers in the current war – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_attacker = { count = <num/ all> limit = { <triggers> } } |war |- |count_defender |Iterate through all defenders in the current war – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_defender = { count = <num/ all> limit = { <triggers> } } |war |- |count_war |Iterate through all wars the country is engaged in – checks whether the enclosed triggers return true for X/ all of them |class="mw-code"| count_war = { count = <num/ all> limit = { <triggers> } } |country |} For comparing different game '''versions''' of Stellaris triggers (modifiers and effects) since launch, you can use the [[wikipedia:GitHub|GitHub]] file history feature [https://github.com/OldEnt/stellaris-triggers-modifiers-effects-list/commits/master here] <small> (created by OldEnt)</small>. == Scripted Triggers == There are more than singular Conditions can be used for a Condition. See [[Dynamic modding#Scripted Triggers|Scripted Triggers]] for details. {{ModdingNavbox}} [[Category:模组制作]]
摘要:
请注意您对群星百科的所有贡献都被认为是在知识共享署名-非商业性使用-相同方式共享下发布,请查看在
群星百科:版权
的细节。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源。
未经许可,请勿提交受版权保护的作品!
为防止机器编辑,请完成下方验证
取消
编辑帮助
(在新窗口中打开)
本页使用的模板:
Template:Clear
(
编辑
)
Template:ModdingNavbox
(
编辑
)
Template:Navbox
(
编辑
)
Template:Navboxgroup
(
编辑
)
Template:Version
(
编辑
)
×
登录
密码
记住登录
加入群星百科
忘记密码?
其他方式登录