#############################################################################################

# Modifiers

#############################################################################################

icon = "gfx/interface/icons/planet_modifiers/pm_dangerous_wildlife.dds"

icon_frame = 2

###############################

# Country

###############################

max_rivalries = 3

max_embassies = 3

all_technology_research_speed = 0.10

influence_gain_mult = -0.1

influence_gain_add = 3

alliance_influence_cost = 1

rivalry_influence_gain = 0.5

country_leader_cap = 1

country_leader_pool_size = 1

country_trade_attractiveness = 0.10

country_core_sector_planet_cap = 2

country_resettlement_cost_mult = -0.15

country_ship_upgrade_cost_mult = -0.15

country_engineering_tech_research_speed = 0.3

country_society_tech_research_speed = -0.10

country_physics_tech_research_speed = -0.10

category_biology_research_speed_mult = 0.1

category_statecraft_research_speed_mult = 0.1

category_industry_research_speed_mult = 0.1

category_materials_research_speed_mult = 0.1

category_rocketry_research_speed_mult = 0.1

category_voidcraft_research_speed_mult = 0.1

category_field_manipulation_research_speed_mult = 0.1

category_particles_research_speed_mult = 0.1

category_computing_research_speed_mult = 0.1

category_psionics_research_speed_mult = 0.1

category_new_worlds_research_speed_mult = 0.1

category_military_theory_research_speed_mult = 0.1

science_ship_survey_speed = 0.20

ship_anomaly_research_speed_mult = 0.20

ship_anomaly_generation_chance_mult = 0.10

ship_anomaly_fail_risk = -0.10

ship_anomaly_research_speed_mult = 0.35

leader_age = 50

leader_influence_cost = 0.20

leader_skill_levels = 1

max_minerals = 1500

num_tech_alternatives_add = 1

edict_influence_cost = -0.25

edict_length_mult = 0.25

species_leader_exp_gain = 0.25

###############################

# Construction

###############################

shipsize_military_station_small_build_cost_mult = -0.15

shipsize_military_station_medium_build_cost_mult = -0.15

shipsize_military_station_large_build_cost_mult = -0.15

shipsize_military_station_small_upkeep_mult = -0.2

shipsize_military_station_medium_upkeep_mult = -0.2

shipsize_military_station_large_upkeep_mult = -0.2

shipsize_constructor_build_cost_mult = -0.15

shipsize_mining_station_build_cost_mult = -0.15

shipsize_colonizer_build_cost_mult = -0.35

shipsize_terraform_station_build_cost_mult = -0.25

shipsize_orbital_station_build_cost_mult = -0.2

shipsize_outpost_station_build_cost_mult = -0.15

shipsize_corvette_build_cost_mult = -0.2

shipsize_destroyer_build_cost_mult = -0.2

shipsize_cruiser_build_cost_mult = -0.2

shipsize_battleship_build_cost_mult = -0.2

building_mining_network_1_build_cost_mult = -0.15

###############################

# Spaceport

###############################

spaceport_ship_build_cost_mult = -0.10

spaceport_ship_build_time_mult = -0.25

spaceport_module_cost_mult = -0.1

###############################

# Planet

###############################

planet_ship_build_speed_mult = 0.20

planet_army_build_speed_mult = -0.33

planet_army_build_cost_mult = -0.15

planet_building_cost_mult = 0.15

planet_sensor_range_mult = 0.25

planet_migration_all_pull = 1

planet_migration_xeno_pull = 1

planet_border_mult = 1.0

planet_clear_blocker_time_mult = -0.06

planet_clear_blocker_cost_mult = -0.25

planet_colony_development_speed_mult = 0.25

pc_nuked_habitability = 1

terraforming_cost_mult = -0.25

pc_desert_habitability = 0.1

pc_arid_habitability = 0.1

pc_tropical_habitability = 0.1

pc_continental_habitability = 0.1

pc_tundra_habitability = 0.1

pc_ocean_habitability = 0.1

pc_arctic_habitability = 0.1

pc_ai_habitability = 0.1

pc_nuked_habitability = 0.1

pc_gaia_habitability = 0.1

pc_ringworld_habitable_habitability = 0.1

###############################

# Army

###############################

army_health = 0.05

army_damage_mult = 0.05

army_upkeep_mult = -0.05

army_morale = 0.20

army_rank_increase = 1

army_defense_morale_mult = 0.2

army_defense_damage_mult = 0.2

army_attack_morale_mult = 0.2

army_attack_damage_mult = 0.2

###############################

# Fleet

###############################

ship_upkeep_mult = -0.10

ship_fire_rate_mult = 0.05

ship_armor_add = 10

ship_hitpoints_add = 1500

ship_weapon_damage = 0.15

ship_shield_hp_mult = -0.33

ship_evasion_mult = 0.05

ship_combat_speed_mult = 0.2

ship_speed_mult = 0.15

ship_emergency_ftl_mult = -0.25

ship_reparation_speed_mult = 0.15

ship_auto_repair_add = 0.02

ship_sensor_range_mult = 0.25

ship_hitpoints_mult = 0.2

navy_size_add = 0.1

navy_size_mult = 1

damage_vs_country_type_amoeba_mult = 0.2

damage_vs_country_type_crystal_mult = 0.2

damage_vs_country_type_drone_mult = 0.1

damage_vs_country_type_cloud_mult = 0.1

damage_vs_country_type_swarm_mult = 0.2

###############################

# Pops

###############################

pop_other_species_happiness = 0.01

pop_environment_tolerance = -0.10

pop_slavery_tolerance = -0.1

pop_food_req_mult = -0.10

pop_growth_req_mult = -0.25

pop_ethic_shift = -0.20

pop_happiness = -0.2

pop_robot_production_output = 0.2

pop_xenophobia = 0.2

pop_alien_slavery_tolerance = 1.0

pop_migration_time = -0.5

pop_eff_wo_slaves = -0.1

pop_fortification_defense = 0.5

slave_production_output = 0.2

slave_food_output = 0.2

pop_war_happiness = 0.05

pop_xenophobia = -0.2

garrison_health = 1.0

###############################

# Tile

###############################

tile_resource_minerals_mult = 1

tile_resource_food_mult = 0.20

tile_resource_energy_mult = 1

tile_resource_physics_research_mult = 1

tile_resource_society_research_mult = 1

tile_resource_engineering_research_mult = 1

building_time_mult = -0.05

#############################################################################################

# Effects

#############################################################################################

###############################

# Events

###############################

is_advisor_event = yes

is_triggered_only = yes

hide_window = yes

location = FROM

diplomatic = yes # Sets the event to be a diplomatic event between player and another country

option = { is_dialog_only = yes }

auto_opens = yes

fire_only_once = yes

###############################

# General

###############################

Macros can be created for integers/floats so they're stored in one location

@tier1materialreward = 6

save_event_target_as = DerelictShipLocation

custom_tooltip = example_tooltip

set_global_flag = example_flag

set_variable = {

which = var

value = 1

}

change_variable = {

which = var

value = 1

}

spawn_system = { initializer = "special_init_03" }

spawn_system = {

min_distance = 20

max_distance = 50

system = "sol_system"

}

add_modifier = {

modifier = "example_modifier"

days = -1

}

remove_modifier = example_modifier

###############################

# Anomaly

###############################

prevent_anomaly = no

add_anomaly = TUTORIAL_CAT

###############################

# Country

###############################

country_event = { id = example_event.1 days = 30 }

begin_event_chain = {

event_chain = "star_power_chain"

target = root

}

end_event_chain = "subterranean_civilization_chain"

add_event_chain_counter = {

event_chain = "star_power_chain"

counter = "systems_visited_poi"

amount = 1

}

set_country_flag = example_flag

set_timed_country_flag = {

flag = day_0

days = 7

}

remove_country_flag = example_flag

set_relation_flag = {

who = root

flag = example_flag

}

remove_relation_flag = example_flag

set_tutorial_level = full

set_advisor_active = yes

set_faction_hostility = { set_hostile = yes }

establish_communications_no_message = root.owner

establish_communications = event_target:contact_empire

give_technology = tech_terrestrial_sculpting

country_add_ethic = "ethic_xenophobe"

unlock_next_tech = social_engineering_tech_tree

add_minerals = 500

add_energy = -75

add_influence = -100

add_research_option = tech_fission_power

add_tech_progress = {

tech = tech_fission_power

progress = 0.80

}

add_monthly_resource_mult = {

resource = physics_research / engineering_research / society_research

value = 60

min = 2

max = 5

}

add_war_demand = {

type = cede_planet

parameter:planet = prev

target = prev.owner

warscore_cost = 50

}

set_timed_relation_flag = {

flag = no_coms who = event_target:MyCountry

days = 90

}

add_opinion_modifier = {

who = event_target:MyCountry

modifier = opinion_crew_saved

}

set_policy = {

policy = slavery

option = slavery_allowed_all

cooldown = no

}

set_subject_of = {

who = root

subject_type = vassal / protectorate

}

add_threat = {

who = root

amount = 4 # scales to pops

}

create_fleet = { name = "Head-in-Sand" }

create_military_fleet = {

owner = this

scaled_size = {

base = 3

}

}

create_point_of_interest = {

id = anomaly.4035.poi.1

name = "anomaly.4035.poi_1"

desc = "anomaly.4035.poi.desc"

event_chain = star_power_chain

location = event_target:some_system_1

}

remove_point_of_interest = anomaly.4035.poi.1

create_ambient_object = {

type = "derelict_ship_object"

location = solar_system

}

###############################

# Observation Outpost

###############################

dismantle = yes

add_mission_progress = -0.2

###############################

# System

###############################

clear_uncharted_space = {

from = prevprev

radius = 5

}

###############################

# Planet

###############################

planet_event = { id = colony.54 days = 35 random = 40 }

set_star_flag = example_flag

set_planet_flag = example_flag

remove_planet_flag = example_flag

remove_star_flag = example_flag

change_pc = pc_continental

change_planet_size > 1

purge = no

destroy_colony = yes

set_primitive_age = industrial_age

create_army = {

name = "Invading Horde"

owner = event_target:subterranean_nation

species = event_target:subterranean_species

type = "industrial_army"

leader = last_created_leader

}

create_species = {

name = "AI" / random

class = AI / ART / etc

portrait = random

traits = random

homeworld = event_target:WarriorHomePlanet # optional

}

modify_species = {

species = ROOT

add_trait = trait_rapid_breeders

remove_trait = trait_weak

}

surveyed = {

set_surveyed = yes

surveyor = event_target:ship_owner

}

enable_special_project = {

name = "DERELICT_SHIP_PROJECT"

owner = root

location = this

}

create_mining_station = {

owner = ROOT

}

create_ambient_object = {

type = "derelict_ship_object"

location = from

}

destroy_ambient_object = this

create_country = { # Each part is optional aside from type

name = "Refugees" / random

type = faction

name_list = "PRT2"

government = random

auto_delete = yes

ethos = {

ethic = "ethic_xenophile"

ethic = "ethic_militarist"

}

day_zero_contact = no

flag = random

flag = {

icon = {

category = "pirate"

file = "flag_pirate_7.dds"

}

background = {

category = "backgrounds"

file = "00_solid.dds"

}

colors = {

"red"

"red"

"null"

"null"

}

}

}

destroy_country = yes

create_pop_faction = {

type = slave

pop = root

}

###############################

# Pops

###############################

enslave_pop = yes

kill_pop = yes

pop_add_ethic = ethic_fanatic_pacifist

pop_remove_ethic = ethic_fanatic_militarist

force_faction_evaluation = this

kill_pop_faction = yes

set_pop_flag = "SUPER_DUPER_FLAG"

pop_event = { id = henrik.138 }

###############################

# Army

###############################

remove_army = yes

###############################

# Fleet

###############################

ship_event = { id = example_event.1 }

assign_leader = last_created_leader

destroy_fleet = this / spaceport

set_fleet_flag = example_flag

remove_fleet_flag = example_flag

set_fleet_stance = aggressive

set_aggro_range_measure_from = self

set_aggro_range = 500

set_disabled = no

set_owner = prev

create_ship = {

graphical_culture = "pirate_01"

name = "Life Tree Protector"

design = "Large Space Organism"

}

create_ship_design = {

design = "Reaver"

ftl = event_target:owner_country

}

set_location = {

target = PREVPREV

distance = 35

angle = random

}

queue_actions = {

wait = {

duration = 10

random = 3

}

orbit_planet = ROOT

move_to = FROM

effect = {

id = "blah"

}

repeat = {

max_iterations = 10 #limits how many times stuff can be repeated

while = { #AND-trigger. If this trigger fails the repetition will be stopped

id = "something_unique" #this trigger needs a unique ID for save/load to work

}

move_to = PREV #actions to repeat

}

find_closest_planet = { #finds the closest planet in the system which fulfills the trigger

trigger = {

id = "something_unique"

}

found_planet = { #sets current scope to a planet scope with the found planet

<fleet actions for when a planet was found>

}

failed = { #no scope changes

<fleet action for when no planet was found>

}

find_random_system = {

trigger = {

}

found_system = {

move_to = this

}

}

}

clear_fleet_actions = this/prev/root

###############################

# Leader

###############################

Types are: admiral / general / scientist / governor

Fleet scope allows leader effects on the leader of the scoped fleet

set_leader_flag = example_flag

remove_leader_flag = example_flag

add_trait = leader_trait_maniacal

set_age = 1

add_experience = 100

create_leader = {

type = admiral

species = last_created

name = "0101010111"

skill = 400

traits = {

trait = leader_trait_aggressive

trait = leader_trait_fleet_logistician

}

}

kill_leader = {

type = scientist

show_notification = no

}

###############################

# Tile

###############################

set_blocker = tb_noxious_swamp

remove_blocker = yes

add_deposit = d_vast_society_deposit

clear_deposits = yes

set_building = "building_capital_1"

set_ruined = yes

create_pop = {

species = event_target:RefugeeAliens / last_created

ethos = {

ethic = "ethic_xenophile"

ethic = "ethic_fanatic_individualist"

}

ethos = owner

}

#############################################################################################

# Triggers

#############################################################################################

# Note: > and < can be used instead of = for inclusive checks.

# Generic

always = yes

is_ai = no

has_global_flag = example_flag

check_variable = {

which = "angry_subterraneans"

value < 1

}

exists = ROOT

###############################

# Country

###############################

has_event_chain = example_chain

has_policy_flag = interference_passive

has_country_flag = example_flag

has_edict = crystal_sonar

has_ethic = ethic_militarist

has_technology = tech_mine_satramene

has_government = indirect_democracy

has_anomaly = yes

has_tech_option = tech_fission_power

has_communications = PREV

has_ai_personality = honorbound_warriors

has_country_edict = information_quarantine

is_country_type = primitive

is_advisor_active = no

is_same_value = event_target:MyCountry

is_country = ROOT

is_hostile = from

ideal_planet_class = pc_arid

num_fleets < 2

num_ships < 3

num_communications > 0

num_moons < 2

num_minerals > 0

num_owned_planets = 1

num_modifiers > 0

last_changed_policy = slavery

influence > 50

minerals > 50

energy > 49

running_balance < -1

has_relation_flag = {

who = root

flag = AbandonedRefugees

}

has_completed_event_chain_counter = {

event_chain = star_power_chain

counter = systems_visited_poi

}

has_established_contact = {

who = event_target:MyCountry

}

intel_level = { level > low system = this }

their_opinion = {

who = event_target:book_writer

value < 11

}

###############################

# System

###############################

has_star_flag = precursor_1

is_star_class = sc_pirate_system

has_owner = no

distance = {

source = ROOT

max_distance = 30

min_distance = 0

}

min_steps = 10

max_steps = 15

is_same_value = event_target:green_trigger_1

###############################

# Planet

###############################

# Primitive ages

# bronze_age / iron_age / late_medieval_age / renaissance_age / steam_age / industrial_age / machine_age / atomic_age

is_planet_class = pc_arctic

is_capital = no

is_moon = yes

is_asteroid = yes

is_ringworld = no

is_star = no

is_homeworld = no

is_sentient = no

has_owner = yes

has_planet_flag = tutorial_anomaly_planet

has_planet_modifier = "example"

has_ground_combat = no

has_any_strategic_resource = no

has_army = yes

has_planet_edict = biochemical_suppression

has_observation_outpost = yes

has_mining_station = no

has_research_station = no

original_owner = yes

orbital_bombardment = limited / full / soft

fortification_health > 1

num_pops > 0

colony_age > 240

free_pop_tiles < 1

is_surveyed = {

who = event_target:ship_owner

status = no

}

habitability = {

who = prev

value > 0.5

}

has_resource = {

type = energy

amount > 0

}

###############################

# Observation Outpost

###############################

has_mission = technological_enlightenment_1

mission_progress > 0.2

###############################

# Fleet

###############################

has_fleet_flag = example_flag

###############################

# Ship

###############################

is_ship_class = shipclass_military

is_ship_size = mining_station

count_owned_ships = {

limit = { is_ship_class = shipclass_military }

count > 11

}

###############################

# Leader

###############################

Types are: admiral / general / scientist / governor

has_level = 3

has_leader_flag = example_flag

has_trait = leader_trait_carefree

is_researching_area = engineering / physics / society

leader_class = admiral

gender = female

num_traits < 3

###############################

# Tile

###############################

has_blocker = no

has_grown_pop = no

has_growing_pop = no

has_building = no

is_orbital_tile = no

has_building_construction = no

is_ruined = no

has_growing_pop = no

###############################

# Pop

###############################

is_enslaved = no

is_being_purged = no

is_robot_pop = no

has_ethic = "ethic_pacifist"

is_species = "ROBOT_POP_SPECIES_1"

is_pop_faction_type = slave

is_same_species = owner_main_species

count_pop_factions = {

limit = { is_pop_faction_type = slave }

count < 1

}

###############################

# Ambient Object

###############################

has_ambient_object_flag = manufactory

###############################

# Switch

###############################

Used in the desc = { } of events

Can use any trigger for the current scope as a RHA

The modifier itself is the key (as a scope), with it's contents being effect

switch = {

trigger = has_modifier

hazardous_weather = { text = anomaly.6660.desc.weather }

weak_magnetic_field = { text = anomaly.6660.desc.magnetic }

}

##############################################################

# Scopes

##############################################################

# Core

ROOT

me

from

fromfrom

fromfromfrom

prev

prevprev

prev

this

event_target:NameHere

Core scopes can be extended with some specific scopes, like so: owner.capital_scope = { }

hidden: can be appended to scopes to hide them

hidden_effect = { }

NOT = { }

AND = { }

OR = { }

if = { limit = { }

else = { }

break = yes

}

random_list = {

50 = {

modifier = {

factor = 1

}

}

50 = { }

}

###############################

# Country

###############################

capital_scope = { }

any_country = { }

owner = { }

owner_species = { }

every_owned_ship = { }

any_owned_ship = { }

any_neighbor_country = { }

random_neighbor_country = { limit = { } }

solar_system = { }

random_system = { }

random_system = { limit = {} }

random_owned_planet = { limit = {} }

random_rim_system = { limit = { } }

every_country = { limit = { } }

random_country = { limit = { } }

# Use these to catch a newly-created object in the code to execute stuff to

last_created_ambient_object = { }

last_created_leader = { }

last_created_species = { }

last_created_fleet = { }

last_created_country = { }

last_created_pop = { }

###############################

# System

###############################

any_system = { }

any_moon = { }

any_neighbor_system = { }

any_controlled_planet = { }

any_ship_in_system = { }

any_planet = { }

space_owner = { }

closest_system = { limit = {} }

random_planet = { limit = {} }

random_system_ambient_object limit = {} }

random_system_planet = { limit = {} }

random_research_station = { }

every_system_planet = { }

###############################

# Planet

###############################

orbital_deposit_tile = { }

every_tile = { }

every_tile = { limit = {} }

random_tile = { limit = {} }

orbit = { }

observation_outpost = { }

observation_outpost_owner = { }

any_tile = { }

any_research_station = { }

any_pop = { }

random_owned_pop = { }

every_owned_pop = { }

random_pop = { }

best_tile_for_pop = { limit = { } }

random_army = { }

###############################

# Fleet

###############################

random_owned_ship = { limit = {} }

fleet = { }

###############################

# Leader

###############################

leader = { }

###############################

# Tile

###############################

random_neighboring_tile = { limit = {} }