#Technological Ascendancy, first bonus perk.
tech_esap_technological_ascendancy_bonus_1_shield = {
	cost = @tier3cost2
	area = physics
	tier = 3
	category = { field_manipulation }	
	prerequisites = { "tech_shields_5" }
	is_rare = yes
	weight = @tier3weight3
	is_reverse_engineerable = no
	
	modifier = {
		ship_shield_mult = 0.05
	}

	weight_modifier = {
		modifier = {
			factor = 0
			Not = { has_ascension_perk = ap_esap_technological_ascendancy_bonus_1 }
		}
		modifier = {
			factor = 1.5
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_esap_technological_ascendancy_bonus_1_shield }
			}
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_esap_technological_ascendancy_bonus_1_shield
		}
	}
}

tech_esap_technological_ascendancy_bonus_1_phys_research = {
	cost = @tier3cost2
	area = physics
	tier = 3
	category = { computing }	
	prerequisites = { }
	is_rare = yes
	weight = @tier3weight3
	is_reverse_engineerable = no
	
	modifier = {
		country_physics_tech_research_speed = 0.025
	}

	weight_modifier = {
		modifier = {
			factor = 0
			Not = { has_ascension_perk = ap_esap_technological_ascendancy_bonus_1 }
		}
		modifier = {
			factor = 1.5
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_esap_technological_ascendancy_bonus_1_phys_research }
			}
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_esap_technological_ascendancy_bonus_1_phys_research
		}
	}
}

tech_esap_technological_ascendancy_bonus_1_laser = {
	cost = @tier4cost3
	area = physics
	tier = 4
	category = { particles }	
	prerequisites = { "tech_lasers_5" }
	is_rare = yes
	weight = @tier4weight3
	is_reverse_engineerable = no
	
	modifier = {
		weapon_type_energy_weapon_damage_mult = 0.05
		weapon_type_energy_weapon_fire_rate_mult = 0.05
	}

	weight_modifier = {
		modifier = {
			factor = 0
			Not = { has_ascension_perk = ap_esap_technological_ascendancy_bonus_1 }
		}
		modifier = {
			factor = 1.5
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_esap_technological_ascendancy_bonus_1_laser }
			}
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_esap_technological_ascendancy_bonus_1_laser
		}
	}
}

tech_esap_technological_ascendancy_bonus_1_survey = {
	cost = @tier4cost3
	area = physics
	tier = 4
	category = { computing }	
	prerequisites = { }
	is_rare = yes
	weight = @tier4weight3
	is_reverse_engineerable = no
	
	modifier = {
		science_ship_survey_speed = 0.33
	}

	weight_modifier = {
		modifier = {
			factor = 0
			Not = { has_ascension_perk = ap_esap_technological_ascendancy_bonus_1 }
		}
		modifier = {
			factor = 1.5
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_esap_technological_ascendancy_bonus_1_survey }
			}
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_esap_technological_ascendancy_bonus_1_survey
		}
	}
}

tech_esap_technological_ascendancy_bonus_1_admin_cap = {
	cost = @tier5cost3
	area = physics
	tier = 5
	category = { particles }	
	prerequisites = { }
	is_rare = yes
	weight = @tier5weight3
	is_reverse_engineerable = no
	
	modifier = {
		empire_size_pops_mult = -0.10
	}

	weight_modifier = {
		modifier = {
			factor = 0
			Not = { has_ascension_perk = ap_esap_technological_ascendancy_bonus_1 }
		}
		modifier = {
			factor = 1.5
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_esap_technological_ascendancy_bonus_1_admin_cap }
			}
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_esap_technological_ascendancy_bonus_1_admin_cap
		}
	}
}

tech_esap_technological_ascendancy_bonus_1_society_research = {
	cost = @tier3cost2
	area = society
	tier = 3
	category = { statecraft }	
	prerequisites = { }
	is_rare = yes
	weight = @tier3weight3
	is_reverse_engineerable = no
	
	modifier = {
		country_society_tech_research_speed = 0.025
	}

	weight_modifier = {
		modifier = {
			factor = 0
			Not = { has_ascension_perk = ap_esap_technological_ascendancy_bonus_1 }
		}
		modifier = {
			factor = 1.5
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_esap_technological_ascendancy_bonus_1_society_research }
			}
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_esap_technological_ascendancy_bonus_1_society_research
		}
	}
}

tech_esap_technological_ascendancy_bonus_1_army = {
	cost = @tier3cost2
	area = society
	tier = 3
	category = { military_theory }	
	prerequisites = { }
	is_rare = yes
	weight = @tier3weight3
	is_reverse_engineerable = no
	
	modifier = {
		army_damage_mult = 0.20
		army_morale = 0.20
	}	
	
	#Enables elite squad

	weight_modifier = {
		modifier = {
			factor = 0
			Not = { has_ascension_perk = ap_esap_technological_ascendancy_bonus_1 }
		}
		modifier = {
			factor = 1.5
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_esap_technological_ascendancy_bonus_1_army }
			}
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_esap_technological_ascendancy_bonus_1_army
		}
	}
}

tech_esap_technological_ascendancy_bonus_1_lifespan = {
	cost = @tier4cost3
	area = society
	tier = 4
	category = { biology }	
	prerequisites = { }
	is_rare = yes
	weight = @tier4weight3
	is_reverse_engineerable = no
	
	modifier = {
		leader_lifespan_add = 20
	}

	weight_modifier = {
		modifier = {
			factor = 0
			Not = { has_ascension_perk = ap_esap_technological_ascendancy_bonus_1 }
		}
		modifier = {
			factor = 1.5
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_esap_technological_ascendancy_bonus_1_lifespan }
			}
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_esap_technological_ascendancy_bonus_1_lifespan
		}
	}
}

tech_esap_technological_ascendancy_bonus_1_influence = {
	cost = @tier4cost3
	area = society
	tier = 4
	category = { statecraft }	
	prerequisites = { }
	is_rare = yes
	weight = @tier4weight3
	is_reverse_engineerable = no
	
	modifier = {
		country_tech_influence_produces_add = 0.5
	}

	weight_modifier = {
		modifier = {
			factor = 0
			Not = { has_ascension_perk = ap_esap_technological_ascendancy_bonus_1 }
		}
		modifier = {
			factor = 1.5
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_esap_technological_ascendancy_bonus_1_influence }
			}
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_esap_technological_ascendancy_bonus_1_influence
		}
	}
}

tech_esap_technological_ascendancy_bonus_1_envoy = {
	cost = @tier5cost3
	area = society
	tier = 5
	category = { statecraft }	
	prerequisites = { }
	is_rare = yes
	weight = @tier5weight3
	is_reverse_engineerable = no
	
	modifier = {
		envoys_add = 1
	}


	weight_modifier = {
		modifier = {
			factor = 0
			Not = { has_ascension_perk = ap_esap_technological_ascendancy_bonus_1 }
		}
		modifier = {
			factor = 1.5
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_esap_technological_ascendancy_bonus_1_envoy }
			}
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_esap_technological_ascendancy_bonus_1_envoy
		}
	}
}

tech_esap_technological_ascendancy_bonus_1_engineering_research = {
	cost = @tier3cost2
	area = engineering
	tier = 3
	category = { industry }	
	prerequisites = { }
	is_rare = yes
	weight = @tier3weight3
	is_reverse_engineerable = no
	
	modifier = {
		country_engineering_tech_research_speed = 0.025
	}

	weight_modifier = {
		modifier = {
			factor = 0
			Not = { has_ascension_perk = ap_esap_technological_ascendancy_bonus_1 }
		}
		modifier = {
			factor = 1.5
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_esap_technological_ascendancy_bonus_1_engineering_research }
			}
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_esap_technological_ascendancy_bonus_1_engineering_research
		}
	}
}

tech_esap_technological_ascendancy_bonus_1_armor = {
	cost = @tier3cost2
	area = engineering
	tier = 3
	category = { materials }	
	prerequisites = { "tech_ship_armor_5" }
	is_rare = yes
	weight = @tier3weight3
	is_reverse_engineerable = no
	
	modifier = {
		ship_armor_mult = 0.05
	}

	weight_modifier = {
		modifier = {
			factor = 0
			Not = { has_ascension_perk = ap_esap_technological_ascendancy_bonus_1 }
		}
		modifier = {
			factor = 1.5
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_esap_technological_ascendancy_bonus_1_armor }
			}
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_esap_technological_ascendancy_bonus_1_armor
		}
	}
}

tech_esap_technological_ascendancy_bonus_1_missiles = {
	cost = @tier4cost3
	area = engineering
	tier = 4
	category = { propulsion }	
	prerequisites = { "tech_missiles_5" }
	is_rare = yes
	weight = @tier4weight3
	is_reverse_engineerable = no
	
	modifier = {
		weapon_type_explosive_weapon_damage_mult = 0.05
		weapon_type_explosive_weapon_fire_rate_mult = 0.05
	}

	weight_modifier = {
		modifier = {
			factor = 0
			Not = { has_ascension_perk = ap_esap_technological_ascendancy_bonus_1 }
		}
		modifier = {
			factor = 1.5
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_esap_technological_ascendancy_bonus_1_missiles }
			}
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_esap_technological_ascendancy_bonus_1_missiles
		}
	}
}

tech_esap_technological_ascendancy_bonus_1_kinetic = {
	cost = @tier4cost3
	area = engineering
	tier = 4
	category = { materials }	
	prerequisites = { "tech_mass_drivers_5" }
	is_rare = yes
	weight = @tier4weight3
	is_reverse_engineerable = no
	
	modifier = {
		weapon_type_kinetic_weapon_damage_mult = 0.05
		weapon_type_kinetic_weapon_fire_rate_mult = 0.05
	}

	weight_modifier = {
		modifier = {
			factor = 0
			Not = { has_ascension_perk = ap_esap_technological_ascendancy_bonus_1 }
		}
		modifier = {
			factor = 1.5
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_esap_technological_ascendancy_bonus_1_kinetic }
			}
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_esap_technological_ascendancy_bonus_1_kinetic
		}
	}
}

tech_esap_technological_ascendancy_bonus_1_stations = {
	cost = @tier5cost3
	area = engineering
	tier = 5
	category = { voidcraft }	
	prerequisites = { }
	is_rare = yes
	weight = @tier5weight3
	is_reverse_engineerable = no
	
	modifier = {
		station_gatherers_cost_mult = -0.10
		station_researchers_produces_mult = 0.10
	}

	weight_modifier = {
		modifier = {
			factor = 0
			Not = { has_ascension_perk = ap_esap_technological_ascendancy_bonus_1 }
		}
		modifier = {
			factor = 1.5
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_esap_technological_ascendancy_bonus_1_stations }
			}
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_esap_technological_ascendancy_bonus_1_stations
		}
	}
}