##################
### TECH COSTS ###
##################
#If you change any of these, use replace in files so the values are the same across all files

@tier1cost1 = 240
@tier1cost2 = 360
@tier1cost3 = 480
@tier1cost4 = 600

@tier2cost1 = 900
@tier2cost2 = 1200
@tier2cost3 = 1500
@tier2cost4 = 1800

@tier3cost1 = 2320
@tier3cost2 = 2840
@tier3cost3 = 3360
@tier3cost4 = 3880

####################
### TECH WEIGHTS ###
####################

@tier1weight1 = 100
@tier1weight2 = 95
@tier1weight3 = 90
@tier1weight4 = 85

@tier2weight1 = 75
@tier2weight2 = 70
@tier2weight3 = 65
@tier2weight4 = 60

@tier3weight1 = 50
@tier3weight2 = 45
@tier3weight3 = 40
@tier3weight4 = 35

# ## physics technologies

# ##################
# Science Ship actions
# ##################

tech_databank_uplinks = {
	area = physics
	cost = @tier2cost1
	tier = 2
	category = { computing }
	weight = @tier2weight1
	
	# allows Science Ships to boost the research-output of a planet
	
	feature_flags = { assist_research }
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
}

tech_improved_databank_uplinks = {
	area = physics
	cost = @tier2cost4
	tier = 2
	category = { computing }
	prerequisites = { "tech_databank_uplinks" }
	weight = @tier2weight4
	
	# unlocks uplink-component, assist research-action is twice as effective
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_IMPROVED_UPLINKS_FORMS_TITLE"
			desc = "TECH_UNLOCK_IMPROVED_UPLINKS_FORMS_DESC"
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
}

# ##################
# Basic Science Lab
# ##################

tech_basic_science_lab_1 = {
	cost = 0
	area = physics
	tier = 0
	category = { computing }
	start_tech = yes
		
	# # unlock basic science lab lvl 1
}

# ##################
# Physics Lab and Computers/AI
# ##################

tech_physics_lab_1 = {
	cost = @tier1cost1
	area = physics
	tier = 1
	category = { computing }
	weight = @tier1weight1
		
	#unlock physics lab lvl 1
	
	weight_modifier = {
		modifier = {
			factor = 5
			is_ai = yes
		}	
		modifier = {
			factor = 2
			years_passed > 5
		}
		modifier = {
			factor = 2
			years_passed > 10
		}		
		modifier = {
			factor = 2
			years_passed > 15
		}		
		modifier = {
			factor = 2
			years_passed > 20
		}		
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
	
	ai_weight = {
		weight = 10
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
}

tech_physics_lab_2 = {
	cost = @tier2cost1
	area = physics
	tier = 2
	category = { computing }
	prerequisites = { "tech_physics_lab_1" "tech_colonial_centralization"}
	weight = @tier2weight1
		
	#unlock physics lab lvl 2
	
	weight_modifier = {
		modifier = {
			factor = 2
			years_passed > 25
		}
		modifier = {
			factor = 2
			years_passed > 30
		}		
		modifier = {
			factor = 2
			years_passed > 35
		}		
		modifier = {
			factor = 2
			years_passed > 40
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
	
	ai_weight = {
		weight = 10
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
}

tech_physics_lab_3 = {
	cost = @tier3cost1
	area = physics
	tier = 3
	category = { computing }
	prerequisites = { "tech_physics_lab_2" "tech_galactic_ambitions"}
	weight = @tier3weight1
		
	# # unlock physics lab lvl 3
	
	weight_modifier = {
		modifier = {
			factor = 2
			years_passed > 25
		}
		modifier = {
			factor = 2
			years_passed > 30
		}		
		modifier = {
			factor = 2
			years_passed > 35
		}		
		modifier = {
			factor = 2
			years_passed > 40
		}	
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
	
	ai_weight = {
		weight = 10
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
}

tech_global_research_initiative = {
	area = physics
	tier = 2
	cost = @tier2cost1
	category = { statecraft }
	prerequisites = { "tech_physics_lab_1" "tech_colonial_centralization" }
	weight = @tier2weight1
	is_rare = yes
	
	weight_modifier = {
		modifier = {
			factor = 0.75
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_statecraft"
				}
			}
		}
		modifier = {
			factor = 0
			NOT = {
				OR = {
					has_ethic = ethic_materialist
					has_ethic = ethic_fanatic_materialist
				}
			}
		}
		modifier = {
			factor = 3
			OR = {
				has_ethic = ethic_materialist
				has_ethic = ethic_fanatic_materialist
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 3
			OR = {
				has_ethic = ethic_materialist
				has_ethic = ethic_fanatic_materialist
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}

tech_administrative_ai = {
	area = physics
	tier = 1
	cost = @tier1cost1
	category = { computing }	
	prerequisites = { "tech_basic_science_lab_1" }
	weight = @tier1weight1
	
	modifier = {
		all_technology_research_speed = 0.05
	}
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
}

#AI-Controlled Colony Ships
tech_cryostasis_1 = {
	cost = @tier1cost3
	area = physics
	tier = 1
	category = { computing }
	prerequisites = { "tech_administrative_ai" "tech_colonization_1" }
	weight = @tier1weight3
	
	modifier = {
		planet_colony_development_speed_mult = 0.25	
	}
}

#Self-Aware Colony Ships
tech_cryostasis_2 = {
	cost = @tier2cost4
	area = physics
	tier = 2
	category = { computing }
	prerequisites = { "tech_self_aware_logic" "tech_cryostasis_1" }
	
	modifier = {
		planet_colony_development_speed_mult = 0.25	
	}
}

tech_self_aware_logic = {
	area = physics
	tier = 2
	cost = @tier2cost2
	category = { computing }
	prerequisites = { "tech_administrative_ai" }
	weight = @tier2weight2
	
	modifier = {
		num_tech_alternatives_add = 1
	}
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
}

tech_sentient_ai = {
	area = physics
	tier = 3
	cost = @tier3cost2
	category = { computing }
	is_rare = yes
	is_dangerous = yes
	prerequisites = { "tech_self_aware_logic" }
	weight = @tier3weight2
	
	modifier = {
		all_technology_research_speed = 0.1
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.10
			NOT = {
				research_leader = {
					area = physics
					has_trait = "leader_trait_expertise_computing"
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
				has_level > 2
			}
		}
		modifier = {
			factor = 1.10
			research_leader = {
				area = society
				has_trait = "leader_trait_maniacal"
			}
		}
		modifier = {
			factor = 1.20
			research_leader = {
				area = society
				has_trait = "leader_trait_spark_of_genius"
			}
		}
		#BREAKTHROUGH - check for scientist
	}
	
	ai_weight = {
		factor = 3 #rare tech
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
}

tech_combat_computers_1 = {
	area = physics
	tier = 1
	cost = @tier1cost3
	category = { computing }	
	ai_update_type = military
	prerequisites = { "tech_administrative_ai" }
	weight = @tier1weight3
	
	# unlocks aggressive / defensive combat computers
	
	weight_modifier = {
		modifier = {
			factor = 2
			has_technology = tech_spaceport_3
		}
		modifier = {
			factor = 2
			has_technology = tech_spaceport_4
		}		
		modifier = {
			factor = 2
			has_technology = tech_spaceport_5
		}		
		modifier = {
			factor = 2
			has_technology = tech_spaceport_6
		}		
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_COMBAT_COMPUTERS_1_TITLE"
			desc = "TECH_UNLOCK_COMBAT_COMPUTERS_1_DESC"
		}
	}
	
	ai_weight = {
		weight = 3
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
}

tech_combat_computers_2 = {
	area = physics
	tier = 2
	cost = @tier2cost3
	category = { computing }
	ai_update_type = military
	prerequisites = { "tech_combat_computers_1" "tech_self_aware_logic" }
	weight = @tier2weight3
	
	# unlocks additional combat computers
	
	weight_modifier = {	
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_COMBAT_COMPUTERS_2_TITLE"
			desc = "TECH_UNLOCK_COMBAT_COMPUTERS_2_DESC"
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
}

tech_combat_computers_3 = {
	area = physics
	tier = 3
	cost = @tier3cost2
	category = { computing }
	ai_update_type = military
	is_rare = yes	
	prerequisites = { "tech_sentient_ai" }
	weight = @tier3weight2
	
	# unlocks sentient combat computers
	
	weight_modifier = {
		modifier = {
			factor = 0.10
			NOT = {
				research_leader = {
					area = physics
					has_trait = "leader_trait_expertise_computing"
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
				has_level > 2
			}
		}
		#BREAKTHROUGH - check for scientist
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_COMBAT_COMPUTERS_3_TITLE"
			desc = "TECH_UNLOCK_COMBAT_COMPUTERS_3_DESC"
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
}

#Active Countermeasures
tech_pd_tracking_1 = {
	area = physics
	tier = 1
	cost = @tier1cost2
	category = { computing }		
	ai_update_type = military
	prerequisites = { "tech_administrative_ai" }
	weight = @tier1weight2
	
	# unlocks point defence 1
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
}

#Interlinked Support Systems
tech_pd_tracking_2 = {
	area = physics
	tier = 2
	cost = @tier2cost2
	category = { computing }
	ai_update_type = military
	prerequisites = { "tech_pd_tracking_1" }
	weight = @tier2weight2
	
	# unlocks point defence 2
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}	
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
}

#Predictive Algorithms
tech_pd_tracking_3 = {
	area = physics
	tier = 3
	cost = @tier3cost3
	category = { computing }
	ai_update_type = military
	prerequisites = { "tech_pd_tracking_2" }
	weight = @tier3weight3
	
	# unlocks point defence 3
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}		
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}
}

tech_synchronized_defences = {
	area = physics
	tier = 1
	cost = @tier1cost3
	category = { computing }
	ai_update_type = military		
	prerequisites = { "tech_pd_tracking_1" }
	is_rare = yes
	weight = @tier1weight3
	
	# unlocks orbital module - synchronized_defenses
	
	weight_modifier = {
		modifier = {
			factor = 0.25
			NOT = {
				research_leader = {
					area = physics
					has_trait = "leader_trait_expertise_voidcraft"
				}
			}
		}
		modifier = {
			factor = 0.75
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 1.10
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.20
			has_ethic = ethic_fanatic_militarist
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_computing"
			}
		}
	}	
}

# ##################
# Ship Reactors
# ##################

tech_fission_power = {
	area = physics
	cost = 0
	tier = 0
	start_tech = yes
	category = { industry }
	ai_update_type = military
}

tech_fusion_power = {
	area = physics
	cost = @tier1cost1
	tier = 1
	category = { particles }
	ai_update_type = military	
	prerequisites = { "tech_fission_power" }
	weight = @tier1weight1
	
	modifier = {
		max_energy = 250
	}
	
	weight_modifier = {
		factor = 1.5
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
	
	ai_weight = {
		factor = 3 #important component
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
}

tech_cold_fusion_power = {
	area = physics
	cost = @tier2cost1
	tier = 2
	category = { particles }
	ai_update_type = military
	prerequisites = { "tech_fusion_power" }
	weight = @tier2weight1
	
	modifier = {
		max_energy = 250
	}
	
	weight_modifier = {
		factor = 1.5
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}	
	
	ai_weight = {
		factor = 4 #important component
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
}

tech_antimatter_power = {
	area = physics
	cost = @tier2cost4
	tier = 2
	category = { particles }
	ai_update_type = military	
	prerequisites = { "tech_cold_fusion_power" }
	weight = @tier2weight4

	modifier = {
		max_energy = 250
	}
	
	weight_modifier = {
		factor = 1.5
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
	
	ai_weight = {
		factor = 3 #important component
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
}

tech_zero_point_power = {
	area = physics
	cost = @tier3cost4
	tier = 3
	category = { particles }
	ai_update_type = military	
	prerequisites = { "tech_antimatter_power" }
	weight = @tier3weight4
	
	modifier = {
		max_energy = 250
	}
	
	weight_modifier = {
		factor = 1.5
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
	
	ai_weight = {
		factor = 3 #important component
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
}

# ##################
# Shields and related techs
# ##################

tech_shields_1 = {
	area = physics
	cost = @tier1cost1
	tier = 1
	category = { field_manipulation }
	ai_update_type = military
	weight = @tier1weight1
	
	modifier = {
		planet_fortification_strength = 0.2
	}
	
	weight_modifier = {
		factor = 1.25
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
	
	ai_weight = {
		factor = 2 #good component
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
}

tech_shields_2 = {
	area = physics
	cost = @tier1cost4
	tier = 1
	category = { field_manipulation }
	ai_update_type = military
	prerequisites = { "tech_shields_1" }
	weight = @tier1weight4
	
	modifier = {
		planet_fortification_strength = 0.2
	}
	
	weight_modifier = {
		factor = 1.25
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}	
	
	ai_weight = {
		factor = 2 #good component
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
}

tech_shields_3 = {
	area = physics
	cost = @tier2cost3
	tier = 2
	category = { field_manipulation }
	ai_update_type = military
	prerequisites = { "tech_shields_2" }
	weight = @tier2weight3
	
	modifier = {
		planet_fortification_strength = 0.2
	}
	
	weight_modifier = {
		factor = 1.25
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
	
	ai_weight = {
		factor = 2 #good component
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
}

tech_shields_4 = {
	area = physics
	cost = @tier3cost1
	tier = 3
	category = { field_manipulation }
	ai_update_type = military
	prerequisites = { "tech_shields_3" }
	weight = @tier3weight1
	
	modifier = {
		planet_fortification_strength = 0.2
	}
	
	weight_modifier = {
		factor = 1.25
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
	
	ai_weight = {
		factor = 2 #good component
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
}

tech_shields_5 = {
	area = physics
	cost = @tier3cost4
	tier = 3
	category = { field_manipulation }
	ai_update_type = military
	prerequisites = { "tech_shields_4" }
	weight = @tier3weight4
	
	modifier = {
		planet_fortification_strength = 0.2
	}
	
	weight_modifier = {
		factor = 1.25
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
	
	ai_weight = {
		factor = 2 #good component
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
}

tech_shield_rechargers_1 = {
	area = physics
	cost = @tier2cost4
	tier = 2
	category = { field_manipulation }
	ai_update_type = military	
	prerequisites = { "tech_shields_3" }
	weight = @tier2weight4
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
	
	ai_weight = {
		factor = 2 #good component
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
}

tech_shield_recharge_aura_1 = {
	area = physics
	cost = @tier2cost4
	tier = 2
	category = { field_manipulation }
	ai_update_type = military	
	is_rare = yes
	prerequisites = { "tech_shields_3" }
	weight = @tier2weight4
	
	weight_modifier = {
		modifier = {
			factor = 0.2
		}
		modifier = {
			factor = 4
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
		modifier = {
			factor = 4
			research_leader = {
				area = physics
				has_trait = "leader_trait_spark_of_genius"
			}
		}
	}
	
	ai_weight = {
		factor = 2 #good component
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
	
		
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_SHIELD_RECHARGE_AURA_1_TITLE"
			desc = "TECH_UNLOCK_SHIELD_RECHARGE_AURA_1_DESC"
		}
	}
}

tech_planetary_shield_generator = {
	area = physics
	cost = @tier2cost4
	tier = 2
	category = { field_manipulation }
	ai_update_type = military	
	is_rare = yes
	prerequisites = { "tech_shields_3" }
	weight = @tier2weight4
	
	weight_modifier = {
		factor = 0.25
	}
	
	# unlocks building: planetary shield generator
}

# ##################
# Sensors
# ##################

tech_sensors_2 = {
	area = physics
	cost = @tier1cost1
	tier = 1
	category = { voidcraft }
	ai_update_type = all
	weight = @tier1weight1
	
	modifier = {
		science_ship_survey_speed = 0.15
	}
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
	
	ai_weight = {
		factor = 1.25 #good component
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_SENSOR_2_TITLE"
			desc = "TECH_UNLOCK_SENSOR_2_DESC"
		}
	}
}

tech_sensors_3 = {
	area = physics
	cost = @tier2cost1
	tier = 2
	category = { voidcraft }
	ai_update_type = all	
	prerequisites = { "tech_sensors_2" }
	weight = @tier2weight1
	
	modifier = {
		science_ship_survey_speed = 0.05
	}
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
	
	ai_weight = {
		factor = 1.25 #good component
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_SENSOR_3_TITLE"
			desc = "TECH_UNLOCK_SENSOR_3_DESC"
		}
	}
}

tech_sensors_4 = {
	area = physics
	cost = @tier3cost1
	tier = 3
	category = { voidcraft }
	ai_update_type = all	
	prerequisites = { "tech_sensors_3" }
	weight = @tier3weight1
		
	modifier = {
		science_ship_survey_speed = 0.05
	}
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}	
	
	ai_weight = {
		factor = 1.25 #good component
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_SENSOR_4_TITLE"
			desc = "TECH_UNLOCK_SENSOR_4_DESC"
		}
	}
}

tech_orbital_sensor_array = {
	area = physics
	cost = @tier1cost2
	tier = 1
	category = { voidcraft }
	is_rare = yes	
	prerequisites = { "tech_sensors_2" }
	weight = @tier1weight2
	
	# unlocks observatory orbital module
	
	weight_modifier = {
		modifier = {
			factor = 0.25
			NOT = {
				research_leader = {
					area = physics
					has_trait = "leader_trait_expertise_voidcraft"
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_voidcraft"
				has_level > 2
			}
		}
		modifier = {
			factor = 1.50
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_voidcraft"
				has_level > 3
			}
		}
		modifier = {
			factor = 1.10
			research_leader = {
				area = society
				has_trait = "leader_trait_maniacal"
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_spark_of_genius"
			}
		}
	}
	
	ai_weight = {
		factor = 3	#rare tech
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
}

# ##################
# Power Plants
# ##################

tech_power_plant_1 = {
	cost = 0
	area = physics
	tier = 0
	category = { industry }
	start_tech = yes
		
	## unlock power plant lvl 1
}

#Power Plant II
tech_power_plant_2 = {
	cost = @tier1cost1
	area = physics
	tier = 1
	category = { industry }	
	prerequisites = { "tech_power_plant_1" }
	weight = @tier1weight1
		
	## unlock power plant lvl 2	
	modifier = {
		max_energy = 250
	}
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
	
	ai_weight = {
		factor = 3	#power plants are good
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
}

#Power Plant III
tech_power_plant_3 = {
	cost = @tier2cost1
	area = physics
	tier = 2
	category = { industry }
	prerequisites = { "tech_power_plant_2" "tech_colonial_centralization"}
	weight = @tier2weight1
		
	## unlock power plant lvl 3
	
	modifier = {
		max_energy = 250
	}	
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
	
	ai_weight = {
		factor = 3	#power plants are good
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
}

#Power Plant IV
tech_power_plant_4 = {
	cost = @tier2cost4
	area = physics
	tier = 2
	category = { industry }
	prerequisites = { "tech_power_plant_3" "tech_galactic_administration"}
	weight = @tier2weight4
		
	## unlock power plant lvl 4
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
	
	ai_weight = {
		factor = 3	#power plants are good
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
}

#Solar Panel Network
tech_solar_panel_network = {
	cost = @tier1cost1
	area = physics
	tier = 1
	category = { industry }
	prerequisites = { "tech_space_construction" }
	weight = @tier1weight1
	
	# ## unlock orbital building - solar panel network
	
	weight_modifier = {
		modifier = {
			is_ai = yes
			factor = 10
		}
		modifier = {
			factor = 2
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
	
	ai_weight = {
		factor = 10
	}
}

#Global Energy Management
tech_power_hub_1 = {
	cost = @tier1cost1
	area = physics
	tier = 1
	category = { industry }	
	prerequisites = { "tech_power_plant_1" }
	weight = @tier1weight1
		
	# unlock power hub 1
	modifier = {
		max_energy = 500
	}
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_industry"
			}			
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
}

#Planetary Power Grid
tech_power_hub_2 = {
	cost = @tier2cost1
	area = physics
	tier = 2
	category = { industry }	
	prerequisites = { "tech_power_hub_1" "tech_colonial_centralization"}
	weight = @tier2weight1
		
	# unlock power hub 2
	modifier = {
		max_energy = 500
	}	
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_industry"
			}			
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
}


# ##################
# FTL Drives 
# ##################

tech_wormhole_generation_1  = {
	cost = 0
	area = physics
	tier = 0
	category = { field_manipulation }
	
	is_reverse_engineerable = no
	
	weight_modifier = {
		factor = 1
		modifier = {
			factor = 0
			OR = {
				has_technology = "tech_hyper_drive_1"
				has_technology = "tech_warp_drive_1"
			}
		}
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_WORMHOLE_1_TITLE"
			desc = "TECH_UNLOCK_WORMHOLE_1_DESC"
		}
	}	
}

tech_wormhole_generation_2  = {
	cost = @tier2cost1
	area = physics
	tier = 2
	category = { field_manipulation }
	ai_update_type = all
	is_reverse_engineerable = no	
	prerequisites = { "tech_wormhole_generation_1" }
	weight = @tier2weight1
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
	
	modifier = {
		ship_ftl_wormhole_speed_mult = 0.25
		ship_ftl_wormhole_range_mult = 0.5
	}
	
	ai_weight = {
		factor = 4 #FTL techs are good
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
}

tech_wormhole_generation_3  = {
	cost = @tier3cost1
	area = physics
	tier = 3
	category = { field_manipulation }
	ai_update_type = all
	is_reverse_engineerable = no	
	prerequisites = { "tech_wormhole_generation_2" }
	weight = @tier3weight1
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
	
	modifier = {
		ship_ftl_wormhole_speed_mult = 0.25
		ship_ftl_wormhole_range_mult = 0.5
	}
	
	ai_weight = {
		factor = 4 #FTL techs are good
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
}

tech_hyper_drive_1  = {
	cost = 0
	area = physics
	tier = 0
	category = { particles }
	
	feature_flags = {
		hyperlanes
	}
	
	is_reverse_engineerable = no
	
	weight_modifier = {
		factor = 1
		modifier = {
			factor = 0
			OR = {
				has_technology = "tech_warp_drive_1"
				has_technology = "tech_wormhole_generation_1"
			}
		}
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_HYPERDRIVE_1_TITLE"
			desc = "TECH_UNLOCK_HYPERDRIVE_1_DESC"
		}
	}
}

tech_hyper_drive_2 = {
	cost = @tier2cost1
	area = physics
	tier = 2
	category = { particles }
	ai_update_type = all
	is_reverse_engineerable = no
	prerequisites = { "tech_hyper_drive_1" }
	weight = @tier2weight1
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_particles"
			}
		}
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_HYPERDRIVE_2_TITLE"
			desc = "TECH_UNLOCK_HYPERDRIVE_2_DESC"
		}
	}	
	
	ai_weight = {
		factor = 4 #FTL techs are good
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_particles"
			}
		}
	}
}

tech_hyper_drive_3 = {
	cost = @tier3cost1
	area = physics
	tier = 3
	category = { particles }
	ai_update_type = all
	is_reverse_engineerable = no
	prerequisites = { "tech_hyper_drive_2" }
	weight = @tier3weight1
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_particles"
			}
		}
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_HYPERDRIVE_3_TITLE"
			desc = "TECH_UNLOCK_HYPERDRIVE_3_DESC"
		}
	}
	
	ai_weight = {
		factor = 4 #FTL techs are good
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_particles"
			}
		}
	}
}

tech_hyperlane_mapping = {
	cost = @tier2cost1
	area = physics
	tier = 2
	category = { particles }
	
	is_rare = yes
	weight = @tier2weight1
	
	feature_flags = {
		hyperlanes
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.10
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_particles"
				}
			}
		}
		modifier = {
			factor = 1.10
			research_leader = {
				area = society
				has_trait = "leader_trait_maniacal"
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_spark_of_genius"
			}
		}
		
		#maybe add factor if discovered debris with hyperlane drive
		modifier = {
			factor = 0
			has_technology = "tech_hyper_drive_1"
		}
	}
	
	ai_weight = {
		factor = 0	#AI doesn't need it :O
	}
}

tech_warp_drive_1 = {
	cost = 0
	area = physics
	tier = 0
	category = { field_manipulation }
	
	is_reverse_engineerable = no
	
	weight_modifier = {
		factor = 0
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_WARPDRIVE_1_TITLE"
			desc = "TECH_UNLOCK_WARPDRIVE_1_DESC"
		}
	}
}

tech_warp_drive_2 = {
	cost = @tier2cost1
	area = physics
	tier = 2
	category = { field_manipulation }
	ai_update_type = all
	is_reverse_engineerable = no	
	prerequisites = { "tech_warp_drive_1" }
	weight = @tier2weight1
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_WARPDRIVE_2_TITLE"
			desc = "TECH_UNLOCK_WARPDRIVE_2_DESC"
		}
	}
	
	ai_weight = {
		factor = 4 #FTL techs are good
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
}

tech_warp_drive_3 = {
	cost = @tier3cost1
	area = physics
	tier = 3
	category = { field_manipulation }
	ai_update_type = all
	is_reverse_engineerable = no	
	prerequisites = { "tech_warp_drive_2" }
	weight = @tier3weight1
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_WARPDRIVE_3_TITLE"
			desc = "TECH_UNLOCK_WARPDRIVE_3_DESC"
		}
	}

	ai_weight = {
		factor = 4 #FTL techs are good
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
}

tech_jump_drive_1 = {
	cost = @tier3cost1
	area = physics
	tier = 3
	category = { field_manipulation }
	ai_update_type = all
	is_reverse_engineerable = yes
	is_rare = yes
	is_dangerous = yes
	weight = @tier3weight1
	is_dangerous = yes
	prerequisites = { "tech_wormhole_generation_3" }
	
	weight_modifier = {
		factor = 0.01
	}
	
	ai_weight = {
		factor = 20 #FTL techs are good
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_JUMPDRIVE_1_TITLE"
			desc = "TECH_UNLOCK_JUMPDRIVE_1_DESC"
		}
	}
}

# ##################
# Debuff auras
# ##################


tech_aura_quantum_destabilizer = {
	area = physics
	cost = @tier2cost4
	tier = 2
	category = { field_manipulation }
	ai_update_type = military	
	is_rare = yes
	prerequisites = { "tech_shields_3" }
	weight = @tier2weight4
	
	weight_modifier = {
		modifier = {
			factor = 0.2
		}
		modifier = {
			factor = 4
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
		modifier = {
			factor = 4
			research_leader = {
				area = physics
				has_trait = "leader_trait_spark_of_genius"
			}
		}
	}
	
	ai_weight = {
		factor = 2 #good component
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
	
		
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_QUANTUM_DESTABILIZER_AURA_1_TITLE"
			desc = "TECH_UNLOCK_QUANTUM_DESTABILIZER_AURA_1_DESC"
		}
	}
}
