You are on page 1of 20

#_civic = civic_machine_terminator

has_valid_civic = civic_machine_assimilator
}
}
}
}
}

# Root = taker country


# This = giver country
can_get_claim_from_lost_system = {
custom_tooltip = {
fail_text = CANNOT_ADD_CLAIM_NOT_VALID_EMPIRE
OR = {
is_country_type = default
is_country_type = fallen_empire
is_country_type = awakened_fallen_empire
}
root = {
OR = {
is_country_type = default
is_country_type = fallen_empire
is_country_type = awakened_fallen_empire
}
}
}
custom_tooltip = {
fail_text = CANNOT_ADD_CLAIM_DEVOURING_SWARM
NOT = { has_valid_civic = civic_hive_devouring_swarm }
}
custom_tooltip = {
fail_text = CANNOT_ADD_CLAIM_ASSIMILATOR
NOT = { has_valid_civic = civic_machine_assimilator }
}
custom_tooltip = {
fail_text = CANNOT_ADD_CLAIM_PURIFIERS
NAND = {
has_valid_civic = civic_fanatic_purifiers
NOT = { is_same_species = root }
}
}
custom_tooltip = {
fail_text = CANNOT_ADD_CLAIM_EXTERMINATOR
NAND = {
has_valid_civic = civic_machine_terminator
NOR = {
is_same_species = root
has_country_flag = synthetic_empire
has_authority = auth_machine_intelligence
}
}
}
}

#Root = country
#This = species
species_has_citizenship = {
has_citizenship_type = { type = citizenship_full country = root }
}
#Root = country
#This = pop
should_abduct_pop = {
planet = {
exists = owner
owner = { is_hostile = root }
}
NAND = {
has_citizenship_type = { type = citizenship_purge country = root }
NOR = {
has_purge_type = { type = purge_matrix country = root }
has_purge_type = { type = purge_processing country = root }
has_purge_type = { type = purge_labor_camps country = root }
}
}
}

#Root = planet
#This = species
species_can_live_on_planet = {
NAND = {
root = { is_planet_class = pc_machine }
NOR = {
has_trait = trait_machine_unit
has_trait = trait_mechanical
AND = {
has_trait = trait_cybernetic
exists = root.owner
root.owner = {
has_authority = auth_machine_intelligence
has_civic = civic_machine_assimilator # Assimilator
empire
}
}
}
}
NAND = {
root = { is_planet_class = pc_hive }
NOT = { has_trait = trait_hive_mind }
}
}

#Root = country
#This = pop
can_vote_in_democratic_election = {
has_citizenship_rights = yes
is_sapient = yes
is_enslaved = no
is_being_purged = no
}

#Root = country
#This = pop
can_generate_leader_from_pop = {
has_citizenship_rights = yes
NOT = { has_trait = trait_syncretic_proles }
NOT = { has_trait = trait_nerve_stapled }
OR = {
is_robot_pop = no
root = { has_technology = tech_synthetic_leaders }
root = { has_authority = auth_machine_intelligence }
root = { is_mechanical_empire = yes }
}
}

#Root = country
#This = species
can_generate_leader_from_species = {
is_sapient = yes
OR = {
NAND = {
NOT = { root = { has_technology = "tech_synthetic_leaders" } }
has_trait = "trait_mechanical"
}
has_citizenship_type = { type = citizenship_full country = root }
}
}

#Root = country
#This = pop
can_generate_military_leader_from_pop = {
can_be_military_leader = yes
OR = {
is_robot_pop = no
root = { has_technology = tech_synthetic_leaders }
root = { has_authority = auth_machine_intelligence }
root = { is_mechanical_empire = yes }
}
}

#Root = species
#This = country
can_generate_army_from_planet = {
any_owned_pop = {
is_same_species = root
can_be_soldier = yes
}
}

#Root = planet
#This = country
can_release_vassal = {
custom_tooltip = {
fail_text = default
NOT = { has_valid_civic = civic_fanatic_purifiers }
}
custom_tooltip = {
fail_text = default
NOT = { has_valid_civic = civic_machine_terminator }
}
custom_tooltip = {
fail_text = default
NOT = { has_valid_civic = civic_machine_assimilator }
}
custom_tooltip = {
fail_text = default
NOT = { has_valid_civic = civic_hive_devouring_swarm }
}
}

#Root = species
#This = country
can_release_vassal_from_species = {
root = {
is_sapient = yes
NOR = {
has_trait = trait_machine_unit
has_trait = trait_hive_mind
has_trait = trait_mechanical
has_trait = trait_nerve_stapled
}
}
}

# Root = species
# This = country
can_generate_army_from_species = {
root = {
OR = {
has_military_service_type = { type = military_service_full
country = prev }
has_military_service_type = { type = military_service_limited
country = prev }
}
}
}

# Root = species
# This = country
can_modify_species = {
OR = {
NOT = { has_trait = trait_self_modified }
is_same_species = root
}
}

#This = country, suject


#Root = country, overlord
#From = target solar system
#This rule is a condition for when subjects that normally cannot colonize outside
their borders are allowed to
subject_can_expand = {
root = { has_valid_civic = civic_feudal_realm }
}

#Root = country, attacker


#This = country, target
#This rule is a condition for taking hostile actions towards neutral targets. Such
as landing troops or attacking their fleets
can_take_hostile_actions = {
if = {
limit = {
ROOT = {
has_policy_flag = first_contact_attack_not_allowed
}
NOT = {
is_hostile = ROOT
has_communications = ROOT
}
}
custom_tooltip = {
text = "CAN_TAKE_HOSTILE_ACTION_FIRST_CONTACT_PROTOCOL"
always = no
}
}
else_if = {
limit = {
AND = {
NOT = { has_country_flag = hostile_to_nomads }
ROOT = {
is_country_type = nomad
}
}
}
custom_tooltip = {
text = "CAN_TAKE_HOSTILE_ACTION_FIRST_CONTACT_PROTOCOL"
always = no
}
}
else_if = {
#attacking primitives with non-interference
limit = {
ROOT = {
is_country_type = default
OR = {
has_policy_flag = interference_passive
has_policy_flag = interference_active
}
}
is_primitive = yes
}
custom_tooltip = {
text = "CAN_TAKE_HOSTILE_ACTION_NATIVE_INTERFERENCE"
always = no
}
}
else_if = {
limit = {
is_primitive = yes
ROOT = { is_country_type = default }
capital_scope = {
root = {
NOT = {
any_planet_within_border = {
is_same_value = prevprev
}
}
}
}
}
custom_tooltip = {
text = ""
always = no
}
}
else_if = {
limit = {
ROOT = { is_subject_type = satrapy }
is_country_type = faction
root = {
any_owned_planet = {
exists = controller
controller = {
is_same_value = prevprevprev
}
}
}
}
custom_tooltip = {
text = ""
always = yes
}
}
else_if = {
limit = {
ROOT = { is_subject_type = satrapy }
}
custom_tooltip = {
text = "CAN_TAKE_HOSTILE_ACTION_SATRAPY"
always = no
}
}
else = {
always = yes
}
}

#Root = country, attacker


#This = country, target
#This rule is a condition for declaring war
can_declare_war = {
custom_tooltip = {
fail_text = "ACTION_DECLARE_WAR_OVERLORD_ON_SUBJECT"
NOT = {
AND = {
OR = {
is_subject_type = "vassal"
is_subject_type = "protectorate"
is_subject_type = "signatory"
}
overlord = {
is_same_value = root
}
}
}
}
if = {
limit = {
exists = root
ROOT = {
has_policy_flag = no_wars
OR = {
is_subject = no
overlord = {
is_same_value = root
}
}
}
}
custom_tooltip = {
text = "CAN_DECLARE_WAR_POLICY"
always = no
}
}
if = {
limit = {
exists = root
ROOT = {
is_ai = yes
}
}
ROOT = {
is_at_war = no
}
}
}

#Root = country
#This = planet
can_colonize_planet = {
always = yes
}

#Root = country
#This = planet
can_colonize_outside_borders = {
always = no
}

#Root = country
#This = planet
can_terraform_planet = {
NAND = {
root = { has_policy_flag = pre_sapients_protect }
any_owned_pop = { is_sapient = no }
}
custom_tooltip = {
fail_text = "requires_actor_not_devouring_swarm_lithoid"
root = { is_lithoid_devouring_swarm = no }
}
}

#Root = country
#This = pop
can_colonize_with_pop = {
has_colonization_control = {
value = no
country =root
}
OR = {
NOT = { has_trait = trait_self_modified }
is_same_species = root
}
if = {
limit = {
OR = {
has_culture_shock = yes
is_sapient = no
}
}
custom_tooltip = {
always = no
}
}
else = {
always = yes
}
}

#Root = country
#This = species
can_colonize_with_species = {
has_colonization_control = {
value = no
country =root
}
OR = {
NOT = { has_trait = trait_self_modified }
is_same_species = root
}
if = {
limit = {
is_sapient = no
}
custom_tooltip = {
always = no
}
}
else = {
always = yes
}
}

# Root = Pop
# From = Country
# This = Pop
# NOTE: species_has_happiness is also checked for this
pop_has_random_ethics = {
NOT = { has_citizenship_type = { type = citizenship_organic_trophy } }
}

# Root = Species
# From = Country
# This = Species
species_has_happiness = {
NOR = {
has_trait = trait_machine_unit
has_trait = trait_hive_mind
has_trait = trait_nerve_stapled
AND = {
has_trait = trait_mechanical
OR = {
NOT = { exists = from }
from = { has_authority = auth_machine_intelligence }
from = { NOT = { has_technology =
tech_synthetic_workers } }
from = { has_policy_flag = ai_outlawed }
}
}
AND = {
has_trait = trait_cybernetic
exists = from
from = {
has_authority = auth_machine_intelligence
has_civic = civic_machine_assimilator # Assimilator empire
}
}
}
}

#Root = country, us
#This = country, them
#This rule is a condition for determining if a country is hostile towards another.
not to be confused with can_take_hostile_action
can_be_hostile_towards = {
if = {
limit = { is_primitive = yes }
ROOT = {
NOT = { has_policy_flag = interference_passive }
}
}
else_if = {
limit = { ROOT = { is_primitive = yes } }
NOT = { has_policy_flag = interference_passive }
}
else_if = {
limit = { is_country_type = ratlings }
always = yes
}
}

# Checks if a pop can procreate


# This = Species
# Root = Planet
can_species_procreate = {
is_sapient = yes
NOR = {
has_trait = trait_machine_unit
has_trait = trait_mechanical
}
NAND = {
root = { has_modifier = slave_colony }
NOT = { has_citizenship_type = { type = citizenship_slavery country =
root.owner } }
}
}

# Checks if a pop can be assembled


# This = Species
# Root = Planet
can_species_be_assembled = {
is_sapient = yes
OR = {
has_trait = trait_machine_unit
has_trait = trait_mechanical
}
}

#This rule is a condition for bombarding planets


#Root = fleet, potential attacker
#From = planet, potential target
can_orbital_bombard = {
exists = FROM.OWNER
NOT = {
any_owned_ship = {
is_ship_size = colossus
}
}
OR = {
AND = {
ROOT.OWNER = {
NOT = { has_communications = FROM.OWNER }
}
FROM.OWNER = {
NOT = { is_country_type = primitive }
}
}
AND = {
ROOT.OWNER = {
NOR = {
has_policy_flag = interference_passive
has_policy_flag = interference_active
}
}
FROM.OWNER = { is_country_type = primitive }
}
ROOT.OWNER = { is_at_war_with = FROM.CONTROLLER }
FROM = { is_planet_class = pc_infested }
FROM.CONTROLLER = {
OR = {
is_country_type = swarm
is_country_type = ai_empire
is_country_type = cybrex_empire
}
}
ROOT.OWNER = {
OR = {
is_country_type = extradimensional
is_country_type = extradimensional_2
is_country_type = extradimensional_3
is_country_type = swarm
is_country_type = ai_empire
is_country_type = cybrex_empire
is_country_type = dormant_marauders
is_country_type = marauder_raiders
is_country_type = ruined_marauders
is_country_type = gray_goo
is_country_type = vol
AND = {
is_country_type = awakened_marauders
FROM.CONTROLLER = {
NAND = {
is_subject_type = satrapy
NOT = { has_country_flag =
rebelling_satrapy }
}
}
}
}
}
AND = {
from.controller = {
is_country_type = faction
NOT = { is_same_value = root.owner }
}
from.owner = {
is_same_value = root.owner
}
}
}
}

#Check if it is possible to build orbital stations on this planet


#this: planet
#root: country
can_planet_support_orbital_station = {
custom_tooltip = {
fail_text = "ORBITAL_STATION_ALREADY_EXISTS"
has_any_megastructure = no
NOT = { has_planet_flag = has_megastructure }
}
}

# Check if full sensor range in entire galaxy


# root: country
has_full_sensor_range = {
OR = {
has_megastructure = spy_orb_4
has_megastructure = spy_orb_restored
}
}

# Determines if notification messages should be sent after a ground combat


# this: planet
# from: winner
# root: loser
show_notification_for_ground_combat = {
NOR = {
has_planet_flag = slave_revolt
has_planet_flag = revolt_in_progress
}
}

# Determines if the "per_neighbor_rival" static modifier should be applied to an


empire
# this: country
should_apply_neighbor_rival_modifier = {
OR = {
has_non_swapped_tradition = tr_supremacy_great_game
has_swapped_tradition = tr_supremacy_great_game_machine
has_swapped_tradition = tr_supremacy_great_game_hive
}
}

#Root: Rebelling against country


#This: Rebel country
are_rebels_hostile = {
is_country_type = rebel #Rebels change country type after taking their
initial planet (action.30)
}

#Root: planet
should_colony_be_destroyed_on_pc_change = {
is_planet_class = pc_infested
}

# Is the given fleet the portal for given extradimensional country


# root: country (ED)
# this: fleet
is_extradimensional_portal = { # is this portal mine
is_ship_size = dimensional_portal_ed
OR = {
owner = { is_same_value = root } # owner is me
OR = {
AND = { # portal is unbidden and I am unbidden
root = { is_country_type = extradimensional }
any_owned_ship = { has_ship_flag = unbidden_portal }
}
AND = { # portal is aberrant and I am aberrant
root = { is_country_type = extradimensional_2 }
any_owned_ship = { has_ship_flag = aberrant_portal }
}
AND = { # portal is vehement and I am vehement
root = { is_country_type = extradimensional_3 }
any_owned_ship = { has_ship_flag = vehement_portal }
}
}
}
}

# Is the given fleet an anchor for given extradimensional country


# root: country (ED)
# this: fleet
is_extradimensional_anchor = {
root = {
OR = {
is_country_type = extradimensional
is_country_type = extradimensional_2
is_country_type = extradimensional_3
}
}
any_owned_ship = { is_ship_size = starbase_exd }
owner = { is_same_value = root }
}

# Will colonizing this planet tick off a fallen empire?


# Root = fallen empire
# This = planet
will_anger_fallen_empire = {
OR = {
AND = {
root = { has_ai_personality_behaviour = demands_clear_borders }
is_neighbor_of = root
}
AND = {
root = { has_ai_personality_behaviour = holy_planets }
has_modifier = "holy_planet"
}
}
}

# Can the country have robot pop


# root: country
can_have_robot_pops = {
exists = this
NOT = { has_authority = auth_hive_mind }
NOT = { has_policy_flag = robots_outlawed }
}

# Can purge/disassembly be individually stopped by owner


# scope: pop
can_stop_purge_pop_manually = {
custom_tooltip = {
fail_text = "ENTIRE_SPECIES_BEING_PURGED"
NOT = { has_citizenship_type = { type = citizenship_purge } }
}
}

# Can the pop be purged/disassembled individually by its owner


# scope: pop
can_purge_pop_manually = {
custom_tooltip = {
fail_text = "ALREADY_BEING_PURGED"
NOT = { has_citizenship_type = { type = citizenship_purge } }
}
custom_tooltip = {
fail_text = "ACTION_CANNOT_PURGE_CITIZEN"
exists = owner
OR = {
is_robot_pop = yes
is_sapient = no
owner = { has_authority = auth_hive_mind }
has_citizenship_type = { type = citizenship_slavery }
has_citizenship_type = { type = citizenship_full_machine }
}
}
custom_tooltip = {
fail_text = "ACTION_CANNOT_PURGE_POLICY"
exists = owner
OR = {
is_robot_pop = yes
AND = {
is_sapient = no
owner = { NOT = { has_policy_flag =
pre_sapients_protect } }
}
owner = { has_ethic = ethic_gestalt_consciousness }
owner = { has_policy_flag = purge_allowed }
}
}
custom_tooltip = {
fail_text = "ACTION_DISASSEMBLE_SYNTHETICS"
exists = owner
OR = {
is_robot_pop = no
owner = { has_authority = auth_hive_mind }
NAND = {
has_trait = trait_mechanical
owner = { has_policy_flag = ai_full_rights }
}
}
}
}

# THIS = Fleet
fleet_uses_templates = {
is_ship_class = shipclass_military
is_designable = yes
is_alliance_fleet = no
}

# this = starbase
can_starbase_repair_ships = {
has_starbase_size >= starbase_starport
}

# this = ship
# root = country that kills ship
can_spawn_debris = {
root = { is_country_type = default }
exists = owner
owner = { NOT = { has_ascension_perk = ap_enigmatic_engineering } }
}

# this = system
# root = country
# Determines if AI-controlled empires should restrict (and thus avoid) a system
# Used by regular empires, fallen empires & crises
ai_should_restrict_system = {
OR = {
AND = {
root = { is_country_type = fallen_empire }
exists = owner
owner = { is_country_type = awakened_marauders }
}
AND = {
root = { is_country_type = awakened_marauders }
exists = owner
owner = { is_country_type = fallen_empire }
}
AND = {
root = {
OR = {
is_country_type = fallen_empire
is_country_type = awakened_marauders
}
}
any_ship_in_system = {
exists = owner
owner = {
OR = {
is_country_type = guardian_dragon
is_country_type = guardian_stellarite
is_country_type = guardian_wraith
is_country_type = guardian_horror
is_country_type = guardian_fortress
is_country_type = guardian_dreadnought
}
}
}
}
}
}

# this = country
can_subjugate_empires = {
always = yes
}

# THIS = Fleet
can_jump_drive = {
always = yes # Moved cooldown to code
}

# this = country
can_spawn_occupation_armies = {
OR = {
is_country_type = default
is_country_type = fallen_empire
is_country_type = awakened_fallen_empire
}
}

# this = system
# root = country
system_blocks_sensors = {
OR = {
is_inside_nebula = yes
has_star_flag = lcluster
has_star_flag = sealed_system
}
}

# Root = country attempting to target system for movement


# This = system being targeted
can_enter_system_by_jump = {
custom_tooltip = {
success_text = "debug: can jump"
fail_text = cannot_jump_to_system

# Sealed system
OR = {
NOT = { has_star_flag = sealed_system }
AND = {
root = { has_country_flag = entered_sealed_system }
has_star_flag = sealed_system
}
}

# L-Cluster
NOT = { has_star_flag = lcluster }
}
}

# This = pop
can_resettle_pop = {
IF = { #Done as an IF/ELSE so the tooltip isn't hideous and unreadable
limit = { is_shackled_robot = yes }
is_shackled_robot = yes
}
ELSE = {
owner = {
OR = {
has_policy_flag = resettlement_allowed
is_gestalt = yes
}
}
}
}

# This = Planet
can_resettle_planet = {
is_controlled_by = owner
has_ground_combat = no
has_orbital_bombardment = no
owner = {
OR = {
has_policy_flag = resettlement_allowed
is_gestalt = yes
any_owned_pop = {
is_shackled_robot = yes
}
}
}
custom_tooltip = {
text = "RESETTLE_PLANET_UNDER_COLONIZATION"
exists = this
is_under_colonization = no
}
}

# This = Planet
should_spawn_deposits = {
habitable_structure = no
}

# This = Planet
is_new_colony = {
has_building = building_colony_shelter
}

# This = pop
pop_generates_crime = {
is_sapient = yes
is_non_sapient_robot = no
is_being_assimilated = no
}

# This = planet
can_pops_grow_on_planet = {
NOR = {
has_modifier = planet_population_control
has_modifier = planet_population_control_gestalt
AND = { # conquered by crisis
exists = controller
controller = {
OR = {
is_country_type = ai_empire
is_country_type = swarm
}
}
}
}
}

# This = planet
can_pops_assemble_on_planet = {
NOR = {
has_modifier = planet_robot_assembly_control
has_modifier = planet_population_control_gestalt
AND = { # conquered by crisis
exists = controller
controller = {
OR = {
is_country_type = ai_empire
is_country_type = swarm
}
}
}
}
}

# This = planet
can_pops_decline_on_planet = {
always = yes
}

# This = planet
# Root = country
can_force_grow_on_planet = {
exists = owner
owner = { NOT = { has_policy_flag = population_controls_not_allowed } }
}

# This = planet
# Root = country
can_force_decline_on_planet = {
owner = { NOT = { has_policy_flag = population_controls_not_allowed } }
custom_tooltip = {
fail_text = FORCED_DECLINE_ALREADY_PURGING
NOT = {
any_owned_pop = {
has_citizenship_type = { type = citizenship_purge }
NOT = { has_purge_type = { country = from type =
purge_neutering } }
}
}
}
}

# This = species
# Root = country
can_force_decline_species = {
OR = {
has_citizenship_type = { country = root type = citizenship_slavery }
has_citizenship_type = { country = root type =
citizenship_robot_servitude }
}
}

# This = country
can_build_branch_offices = {
custom_tooltip = {
fail_text = BRANCH_OFFICE_NOT_MEGACORP
has_authority = auth_corporate
}
}

# This = country
can_support_branch_offices = {
is_country_type = default
is_regular_empire = yes
NOT = { has_authority = auth_corporate }
}

# This = planet
# Root = country
can_build_branch_office_on_planet = {
custom_tooltip = {
fail_text = requires_recipient_not_fanatic_purifiers
exists = owner
owner = {
OR = {
is_same_species = root
NOT = { has_civic = civic_fanatic_purifiers }
}
}
}
custom_tooltip = {
fail_text = BRANCH_OFFICE_NOT_COMMERCIAL_PACT
exists = owner
OR = {
root = { is_criminal_syndicate = yes }
owner = { has_commercial_pact = root }
owner = { is_in_federation_with = root }

# allow branch offices in subsidiaries and vice versa


root = {
is_subject = yes
is_subject_type = subsidiary
overlord = { is_same_value = owner }
}
owner = {
is_subject = yes
is_subject_type = subsidiary
overlord = { is_same_value = root }
}
}
}
custom_tooltip = {
fail_text = BRANCH_OFFICE_CRIMINAL_HERITAGE_HAS_TRUCE
exists = owner
OR = {
root = { is_criminal_syndicate = no }
owner = {
NOR = {
has_truce = root
is_at_war_with = root
}
}
}
}
custom_tooltip = {
fail_text = BRANCH_OFFICE_CRIMINAL_COOLDOWN
exists = owner
OR = {
root = { is_criminal_syndicate = no }
AND = {
root = { is_criminal_syndicate = yes }
NOT = { has_planet_flag =
criminal_branch_closed_cooldown_planet@root }
}
}
}
}

# This = country
# Checked by is_criminal_syndicate trigger
is_criminal_syndicate_rule = {
has_authority = auth_corporate
has_valid_civic = civic_criminal_heritage
}

# This = planet
can_crossbreed_species_on_planet = {
exists = owner
owner = { has_ascension_perk = ap_xeno_compatibility }
count_species = {
limit = {
is_crossbreeding_possible = yes
}
count >= 2
}
}

# This = species one


# Root = species two
can_crossbreed_species = {
is_crossbreeding_possible = yes
root = { is_crossbreeding_possible = yes }
}

# No scope
can_win_timed_victory = {
custom_tooltip = {
fail_text = VICTORY_CONDITION_CRISIS_IN_PROGRESS
NOT = {
any_country = {
is_crisis_faction = yes
NOT = { is_country_type = awakened_marauders }
}
}
}
custom_tooltip = {
fail_text = VICTORY_CONDITION_WAR_IN_HEAVEN_IN_PROGRESS
NOT = { has_global_flag = war_in_heaven_ongoing }
}
}

# This = country
can_use_galactic_market = {
is_country_type = default
NOR = {
has_civic = civic_fanatic_purifiers
has_civic = civic_hive_devouring_swarm
has_civic = civic_machine_terminator
}
}

# ROOT = country
# THIS = pop
can_be_sold_on_slave_market = {
OR = {
is_enslaved = yes
is_non_sapient_robot = yes
is_shackled_robot = yes
}
OR ={
ROOT = { is_ai = no }
has_citizenship_rights = no
AND = {
is_unemployed = yes
planet = {
count_pops = {
count > 3
limit = { is_unemployed = yes }
}
}
}
}
}

You might also like