namespace = gt_events

# generic add the modifier event!  
ship_event = {
    id = gt_events.1
    hide_window = yes
	
	is_triggered_only = yes
	
    trigger = {
		exists = owner
		owner = { has_technology = GT_shipsize_mining_station_hull_add }
		OR = {
			is_ship_class = shipclass_mining_station
			is_ship_class = shipclass_research_station
		}
		NOT = { has_modifier = gt_shield_bonus_1 }
    }
    immediate = {
        add_modifier = { modifier = gt_shield_bonus_1 }
    }
}

# when system changes owner 1
# From = system
# FromFrom = country (new owner)
# This = country (previous owner)
event = {
    id = gt_events.2
    hide_window = yes
	
	is_triggered_only = yes
	
    trigger = {
		exists = FromFrom
		FromFrom = {
			OR = {
				is_country_type = default
				is_country_type = awakened_fallen_empire
				is_country_type = fallen_empire
			}
		}
		FromFrom = { has_technology = GT_shipsize_mining_station_hull_add }
    }
    immediate = {
		FromFrom = {
			every_owned_ship = {
				ship_event = { id = gt_events.1 }
			}
		}
    }
}

# when system changes owner 2
# From = system
# FromFrom = country (previous owner)
# This = country (new owner)
event = {
    id = gt_events.3
    hide_window = yes
	
	is_triggered_only = yes
	
    trigger = {
		exists = This
		This = {
			OR = {
				is_country_type = default
				is_country_type = awakened_fallen_empire
				is_country_type = fallen_empire
			}
		}
		This = { has_technology = GT_shipsize_mining_station_hull_add }
    }
    immediate = {
		This = {
			every_owned_ship = {
				ship_event = { id = gt_events.1 }
			}
		}
    }
}

# This = construction ship
# From = planet it is built on
# Fires when construction is complete,
# immediately before station is created
event = {
    id = gt_events.4
    hide_window = yes
	
	is_triggered_only = yes
	
    trigger = {
		this.owner = { has_technology = GT_shipsize_mining_station_hull_add }
    }
    immediate = {
		this.owner = {
			every_owned_ship = {
				ship_event = { id = gt_events.1 days = 1 }
			}
		}
    }
}

# on game start country,
# we distribute some early techs based on empire ethics, civics, origins and what not
# both complete techs as partial techs. 
# country_event = {
    # id = gt_events.10
    # hide_window = yes
	
	# is_triggered_only = yes
	
    # trigger = {
    # }
    # immediate = {
		# # ETHICS and Empires
		# # has_ethic = ethic_xenophobe
		# # has_ethic = ethic_fanatic_xenophobe
		# # has_ethic = ethic_xenophile
		# # has_ethic = ethic_fanatic_xenophile
		# # has_ethic = ethic_militarist
		# # has_ethic = ethic_fanatic_militarist
		# # has_ethic = ethic_pacifist
		# # has_ethic = ethic_fanatic_pacifist
		# # has_ethic = ethic_materialist
		# # has_ethic = ethic_fanatic_materialist
		# # has_ethic = ethic_spiritualist
		# # has_ethic = ethic_fanatic_spiritualist
		# # has_ethic = ethic_egalitarian
		# # has_ethic = ethic_fanatic_egalitarian
		# # has_ethic = ethic_authoritarian
		# # has_ethic = ethic_fanatic_authoritarian
		# # has_authority = auth_corporate
		# # is_hive_empire = yes
		# # is_machine_empire = yes
		
		# # 
		
		# # GT_ship_anomaly_generation_chance_mult
		# random_list = {
			# 10 = { }
			# 10 = {
				# add_research_option = GT_ship_anomaly_generation_chance_mult
				# random_list = {
					# 10 = { add_tech_progress = { tech = GT_ship_anomaly_generation_chance_mult progress = 0.42 } }
					# 10 = { add_tech_progress = { tech = GT_ship_anomaly_generation_chance_mult progress = 0.58 } }
					# 10 = { add_tech_progress = { tech = GT_ship_anomaly_generation_chance_mult progress = 0.71 } }
					# 10 = { add_tech_progress = { tech = GT_ship_anomaly_generation_chance_mult progress = 0.82 } }
					# 10 = { add_tech_progress = { tech = GT_ship_anomaly_generation_chance_mult progress = 0.95 } }
				# }
			# }
			# # 2 = { give_technology = { tech = GT_ship_anomaly_generation_chance_mult } }
		# }
		# # GT_ship_experience_gain_mult
		# random_list = {
			# 10 = { }
			# 10 = {
				# add_research_option = GT_ship_experience_gain_mult
				# random_list = {
					# 10 = { add_tech_progress = { tech = GT_ship_experience_gain_mult progress = 0.42 } }
					# 10 = { add_tech_progress = { tech = GT_ship_experience_gain_mult progress = 0.58 } }
					# 10 = { add_tech_progress = { tech = GT_ship_experience_gain_mult progress = 0.71 } }
					# 10 = { add_tech_progress = { tech = GT_ship_experience_gain_mult progress = 0.82 } }
					# 10 = { add_tech_progress = { tech = GT_ship_experience_gain_mult progress = 0.95 } }
				# }
			# }
			# # 2 = { give_technology = { tech = GT_ship_experience_gain_mult } }
		# }
		# # GT_station_gatherers_build_cost_mult
		# random_list = {
			# 10 = { }
			# 10 = {
				# add_research_option = GT_station_gatherers_build_cost_mult
				# random_list = {
					# 10 = { add_tech_progress = { tech = GT_station_gatherers_build_cost_mult progress = 0.42 } }
					# 10 = { add_tech_progress = { tech = GT_station_gatherers_build_cost_mult progress = 0.58 } }
					# 10 = { add_tech_progress = { tech = GT_station_gatherers_build_cost_mult progress = 0.71 } }
					# 10 = { add_tech_progress = { tech = GT_station_gatherers_build_cost_mult progress = 0.82 } }
					# 10 = { add_tech_progress = { tech = GT_station_gatherers_build_cost_mult progress = 0.95 } }
				# }
			# }
			# # 2 = { give_technology = { tech = GT_station_gatherers_build_cost_mult } }
		# }
		# # GT_station_researchers_build_cost_mult
		# random_list = {
			# 10 = { }
			# 10 = {
				# add_research_option = GT_station_researchers_build_cost_mult
				# random_list = {
					# 10 = { add_tech_progress = { tech = GT_station_researchers_build_cost_mult progress = 0.42 } }
					# 10 = { add_tech_progress = { tech = GT_station_researchers_build_cost_mult progress = 0.58 } }
					# 10 = { add_tech_progress = { tech = GT_station_researchers_build_cost_mult progress = 0.71 } }
					# 10 = { add_tech_progress = { tech = GT_station_researchers_build_cost_mult progress = 0.82 } }
					# 10 = { add_tech_progress = { tech = GT_station_researchers_build_cost_mult progress = 0.95 } }
				# }
			# }
			# # 2 = { give_technology = { tech = GT_station_researchers_build_cost_mult } }
		# }
		# # GT_planet_building_refund_mult
		# random_list = {
			# 10 = { }
			# 10 = {
				# add_research_option = GT_planet_building_refund_mult
				# random_list = {
					# 10 = { add_tech_progress = { tech = GT_planet_building_refund_mult progress = 0.42 } }
					# 10 = { add_tech_progress = { tech = GT_planet_building_refund_mult progress = 0.58 } }
					# 10 = { add_tech_progress = { tech = GT_planet_building_refund_mult progress = 0.71 } }
					# 10 = { add_tech_progress = { tech = GT_planet_building_refund_mult progress = 0.82 } }
					# 10 = { add_tech_progress = { tech = GT_planet_building_refund_mult progress = 0.95 } }
				# }
			# }
			# # 2 = { give_technology = { tech = GT_planet_building_refund_mult } }
		# }
		# # GT_ship_science_ship_build_cost_mult
		# random_list = {
			# 10 = { }
			# 10 = {
				# add_research_option = GT_ship_science_ship_build_cost_mult
				# random_list = {
					# 10 = { add_tech_progress = { tech = GT_ship_science_ship_build_cost_mult progress = 0.42 } }
					# 10 = { add_tech_progress = { tech = GT_ship_science_ship_build_cost_mult progress = 0.58 } }
					# 10 = { add_tech_progress = { tech = GT_ship_science_ship_build_cost_mult progress = 0.71 } }
					# 10 = { add_tech_progress = { tech = GT_ship_science_ship_build_cost_mult progress = 0.82 } }
					# 10 = { add_tech_progress = { tech = GT_ship_science_ship_build_cost_mult progress = 0.95 } }
				# }
			# }
			# # 2 = { give_technology = { tech = GT_ship_science_ship_build_cost_mult } }
		# }
		# # GT_shipsize_science_build_speed_mult
		# random_list = {
			# 10 = { }
			# 10 = {
				# add_research_option = GT_shipsize_science_build_speed_mult
				# random_list = {
					# 10 = { add_tech_progress = { tech = GT_shipsize_science_build_speed_mult progress = 0.42 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_science_build_speed_mult progress = 0.58 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_science_build_speed_mult progress = 0.71 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_science_build_speed_mult progress = 0.82 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_science_build_speed_mult progress = 0.95 } }
				# }
			# }
			# # 2 = { give_technology = { tech = GT_shipsize_science_build_speed_mult } }
		# }
		# # GT_shipclass_mining_station_hull_mult
		# random_list = {
			# 10 = { }
			# 10 = {
				# add_research_option = GT_shipclass_mining_station_hull_mult
				# random_list = {
					# 10 = { add_tech_progress = { tech = GT_shipclass_mining_station_hull_mult progress = 0.42 } }
					# 10 = { add_tech_progress = { tech = GT_shipclass_mining_station_hull_mult progress = 0.58 } }
					# 10 = { add_tech_progress = { tech = GT_shipclass_mining_station_hull_mult progress = 0.71 } }
					# 10 = { add_tech_progress = { tech = GT_shipclass_mining_station_hull_mult progress = 0.82 } }
					# 10 = { add_tech_progress = { tech = GT_shipclass_mining_station_hull_mult progress = 0.95 } }
				# }
			# }
			# # 2 = { give_technology = { tech = GT_shipclass_mining_station_hull_mult } }
		# }
		# # GT_shipclass_research_station_hull_mult
		# random_list = {
			# 10 = { }
			# 10 = {
				# add_research_option = GT_shipclass_research_station_hull_mult
				# random_list = {
					# 10 = { add_tech_progress = { tech = GT_shipclass_research_station_hull_mult progress = 0.42 } }
					# 10 = { add_tech_progress = { tech = GT_shipclass_research_station_hull_mult progress = 0.58 } }
					# 10 = { add_tech_progress = { tech = GT_shipclass_research_station_hull_mult progress = 0.71 } }
					# 10 = { add_tech_progress = { tech = GT_shipclass_research_station_hull_mult progress = 0.82 } }
					# 10 = { add_tech_progress = { tech = GT_shipclass_research_station_hull_mult progress = 0.95 } }
				# }
			# }
			# # 2 = { give_technology = { tech = GT_shipclass_research_station_hull_mult } }
		# }
		# # GT_shipsize_science_hull_add
		# random_list = {
			# 10 = { }
			# 10 = {
				# add_research_option = GT_shipsize_science_hull_add
				# random_list = {
					# 10 = { add_tech_progress = { tech = GT_shipsize_science_hull_add progress = 0.42 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_science_hull_add progress = 0.58 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_science_hull_add progress = 0.71 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_science_hull_add progress = 0.82 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_science_hull_add progress = 0.95 } }
				# }
			# }
			# # 2 = { give_technology = { tech = GT_shipsize_science_hull_add } }
		# }
		# # GT_shipsize_mining_station_hull_add
		# random_list = {
			# 10 = { }
			# 10 = {
				# add_research_option = GT_shipsize_mining_station_hull_add
				# random_list = {
					# 10 = { add_tech_progress = { tech = GT_shipsize_mining_station_hull_add progress = 0.42 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_mining_station_hull_add progress = 0.58 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_mining_station_hull_add progress = 0.71 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_mining_station_hull_add progress = 0.82 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_mining_station_hull_add progress = 0.95 } }
				# }
			# }
			# # 2 = { give_technology = { tech = GT_shipsize_mining_station_hull_add } }
		# }
		# # GT_ship_constructor_cost_mult
		# random_list = {
			# 10 = { }
			# 10 = {
				# add_research_option = GT_ship_constructor_cost_mult
				# random_list = {
					# 10 = { add_tech_progress = { tech = GT_ship_constructor_cost_mult progress = 0.42 } }
					# 10 = { add_tech_progress = { tech = GT_ship_constructor_cost_mult progress = 0.58 } }
					# 10 = { add_tech_progress = { tech = GT_ship_constructor_cost_mult progress = 0.71 } }
					# 10 = { add_tech_progress = { tech = GT_ship_constructor_cost_mult progress = 0.82 } }
					# 10 = { add_tech_progress = { tech = GT_ship_constructor_cost_mult progress = 0.95 } }
				# }
			# }
			# # 2 = { give_technology = { tech = GT_ship_constructor_cost_mult } }
		# }
		# # GT_shipsize_constructor_build_speed_mult
		# random_list = {
			# 10 = { }
			# 10 = {
				# add_research_option = GT_shipsize_constructor_build_speed_mult
				# random_list = {
					# 10 = { add_tech_progress = { tech = GT_shipsize_constructor_build_speed_mult progress = 0.42 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_constructor_build_speed_mult progress = 0.58 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_constructor_build_speed_mult progress = 0.71 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_constructor_build_speed_mult progress = 0.82 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_constructor_build_speed_mult progress = 0.95 } }
				# }
			# }
			# # 2 = { give_technology = { tech = GT_shipsize_constructor_build_speed_mult } }
		# }
		# # GT_shipsize_mining_station_build_speed_mult
		# random_list = {
			# 10 = { }
			# 10 = {
				# add_research_option = GT_shipsize_mining_station_build_speed_mult
				# random_list = {
					# 10 = { add_tech_progress = { tech = GT_shipsize_mining_station_build_speed_mult progress = 0.42 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_mining_station_build_speed_mult progress = 0.58 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_mining_station_build_speed_mult progress = 0.71 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_mining_station_build_speed_mult progress = 0.82 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_mining_station_build_speed_mult progress = 0.95 } }
				# }
			# }
			# # 2 = { give_technology = { tech = GT_shipsize_mining_station_build_speed_mult } }
		# }
		# # GT_shipsize_research_station_build_speed_mult
		# random_list = {
			# 10 = { }
			# 10 = {
				# add_research_option = GT_shipsize_research_station_build_speed_mult
				# random_list = {
					# 10 = { add_tech_progress = { tech = GT_shipsize_research_station_build_speed_mult progress = 0.42 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_research_station_build_speed_mult progress = 0.58 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_research_station_build_speed_mult progress = 0.71 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_research_station_build_speed_mult progress = 0.82 } }
					# 10 = { add_tech_progress = { tech = GT_shipsize_research_station_build_speed_mult progress = 0.95 } }
				# }
			# }
			# # 2 = { give_technology = { tech = GT_shipsize_research_station_build_speed_mult } }
		# }
    # }
# }



























