##################
### 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

# ##################
# Spaceport slots and Ship Sizes
# ##################

# Spaceport
tech_spaceport_1 = {
	cost = 0
	area = engineering	start_tech = yes
	category = { voidcraft }
	tier = 0
	
	# unlocks additional terraforming-options
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_SCIENCE_SHIP_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_SCIENCE_SHIP_CONSTRUCTION_DESC"
		}
		# used to separate the entries
		custom = {
			title = "TECH_UNLOCK_CORVETTE_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_CORVETTE_CONSTRUCTION_DESC"
		}
		# used to separate the entries
		custom = {
			title = "TECH_UNLOCK_SPACEPORT_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_SPACEPORT_CONSTRUCTION_DESC"
		}
	}

	## unlock spaceport and corvette
}

tech_spaceport_2 = {
	cost = @tier1cost3
	area = engineering
	tier = 1
	category = { voidcraft }
	prerequisites = { "tech_space_construction" }
	weight = @tier1weight3
	
	modifier = {
		max_minerals = 2000
	}
	
	feature_flags = { spaceport_level_2 }
	
	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = {
				has_technology = tech_spaceport_2
			}
		}	
		modifier = {
			factor = 2
			years_passed > 4
		}
		modifier = {
			factor = 3
			years_passed > 7
		}
		modifier = {
			factor = 4
			years_passed > 10
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
	
	ai_weight = {
		factor = 100 #important tech - destroyers
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
}

tech_spaceport_3 = {
	cost = @tier2cost1
	area = engineering
	tier = 1
	category = { voidcraft }	
	prerequisites = { "tech_spaceport_2" }
	weight = @tier2weight1
	
	## unlock destroyer	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_DESTROYER_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_DESTROYER_CONSTRUCTION_DESC"
		}
	}
	
	modifier = {
		max_minerals = 2000
	}
	
	feature_flags = { spaceport_level_3 }
	
	weight_modifier = {
		modifier = {
			factor = 0.1
			NOT = { years_passed > 10 }
		}	
		modifier = {
			factor = 10
			any_neighbor_country = {
				has_technology = tech_spaceport_3
			}
		}		
		modifier = {
			factor = 2
			years_passed > 15
		}
		modifier = {
			factor = 3
			years_passed > 20
		}
		modifier = {
			factor = 4
			years_passed > 30
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
	
	ai_weight = {
		factor = 100 #important tech
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
}

tech_spaceport_4 = {
	cost = @tier2cost2
	area = engineering
	tier = 2
	category = { voidcraft }	
	prerequisites = { "tech_spaceport_3" }
	weight = @tier2weight2
		
	modifier = {
		max_minerals = 2000
	}		
		
	feature_flags = { spaceport_level_4 }
	
	weight_modifier = {
		modifier = {
			factor = 0.1
			NOT = { years_passed > 15 }
		}
		modifier = {
			factor = 10
			any_neighbor_country = {
				has_technology = tech_spaceport_4
			}
		}		
		modifier = {
			factor = 2
			years_passed > 20
		}
		modifier = {
			factor = 3
			years_passed > 25
		}
		modifier = {
			factor = 4
			years_passed > 30
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
	
	ai_weight = {
		factor = 100 #important tech
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
}

tech_spaceport_5 = {
	cost = @tier2cost4
	area = engineering
	tier = 2
	category = { voidcraft }	
	prerequisites = { "tech_spaceport_4" }
	weight = @tier2weight4	
		
	## unlock cruisers	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_CRUISER_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_CRUISER_CONSTRUCTION_DESC"
		}
	}
	
	modifier = {
		max_minerals = 2000
	}	
	
	feature_flags = { spaceport_level_5 }
	
	weight_modifier = {
		modifier = {
			factor = 0.1
			NOT = { years_passed > 20 }
		}	
		modifier = {
			factor = 10
			any_neighbor_country = {
				has_technology = tech_spaceport_5
			}
		}		
		modifier = {
			factor = 2
			years_passed > 30
		}
		modifier = {
			factor = 3
			years_passed > 35
		}
		modifier = {
			factor = 4
			years_passed > 40
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
	
	ai_weight = {
		factor = 100 #higher factor due to cruiser hull
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
}

tech_spaceport_6 = {
	cost = @tier3cost2
	area = engineering
	tier = 3
	category = { voidcraft }	
	prerequisites = { "tech_spaceport_5" }
	weight = @tier3weight2
		
	## unlock battleships	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_BATTLESHIP_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_BATTLESHIP_CONSTRUCTION_DESC"
		}
	}
	
	modifier = {
		max_minerals = 2000
	}
	
	feature_flags = { spaceport_level_6 }
	
	weight_modifier = {
		modifier = {
			factor = 0.1
			NOT = { years_passed > 50 }
		}	
		modifier = {
			factor = 10
			any_neighbor_country = {
				has_technology = tech_spaceport_6
			}
		}
		modifier = {
			factor = 2
			years_passed > 60
		}
		modifier = {
			factor = 3
			years_passed > 65
		}
		modifier = {
			factor = 4
			years_passed > 70
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
	
	ai_weight = {
		factor = 100 #higher factor due to battleship hull
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
}

tech_cruiser_yard = {
	cost = @tier2cost4
	area = engineering
	tier = 2
	category = { voidcraft }	
	prerequisites = { "tech_spaceport_5" }
	weight = @tier2weight4
		
	## unlock cruiser assembly yard
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
}

tech_battleship_yard = {
	cost = @tier3cost3
	area = engineering
	tier = 2
	category = { voidcraft }	
	prerequisites = { "tech_spaceport_6" }
	weight = @tier3weight3
		
	## unlock battleship assembly yard
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
}

# ##################
# Strike Craft
# ##################

tech_strike_craft_1 = {
	cost = @tier2cost3
	area = engineering
	tier = 2
	ai_update_type = military
	category = { voidcraft }	
	prerequisites = { "tech_spaceport_5" }
	weight = @tier2weight3
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
		
	## unlock strike craft 1
}

tech_strike_craft_2 = {
	cost = @tier2cost4
	area = engineering
	tier = 2
	ai_update_type = military
	category = { voidcraft }	
	prerequisites = { "tech_strike_craft_1" }
	weight = @tier2weight4
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
		
	## unlock strike craft 2
}

tech_strike_craft_3 = {
	cost = @tier3cost2
	area = engineering
	tier = 3
	ai_update_type = military
	category = { voidcraft }	
	prerequisites = { "tech_strike_craft_2" }
	weight = @tier3weight2
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
		
	## unlock strike craft 3
}


# ##################
# Armies & Attachments
# ##################

tech_assault_armies = {
	cost = @tier1cost1
	area = engineering
	tier = 0
	category = { voidcraft }
	prerequisites = { "tech_defense_army" }
	start_tech = yes
}

# ##################
# Ship Armor Components
# ##################

#Nanocomposite Materials
tech_ship_armor_1 = {
	area = engineering
	cost = @tier1cost2
	tier = 1
	category = { materials }
	ai_update_type = military	
	prerequisites = { "tech_spaceport_1" }
	weight = @tier1weight2
	
	weight_modifier = {
		factor = 1.25
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_materials"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_materials"
			}
		}
	}
}

#Ceramo-Metal Materials
tech_ship_armor_2 = {
	area = engineering
	cost = @tier1cost4
	tier = 1
	category = { materials }
	ai_update_type = military	
	prerequisites = { "tech_ship_armor_1" }
	weight = @tier1weight4
	
	weight_modifier = {
		factor = 1.25
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_materials"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_materials"
			}
		}
	}
}

#Plasteel Materials
tech_ship_armor_3 = {
	area = engineering
	cost = @tier2cost2
	tier = 2
	category = { materials }
	ai_update_type = military	
	prerequisites = { "tech_ship_armor_2" }
	weight = @tier2weight2
	
	weight_modifier = {
		factor = 1.25
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_materials"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_materials"
			}
		}
	}
}

#Durasteel Materials
tech_ship_armor_4 = {
	area = engineering
	cost = @tier2cost4
	tier = 2
	category = { materials }
	ai_update_type = military	
	prerequisites = { "tech_ship_armor_3" }
	weight = @tier2weight4
	
	weight_modifier = {
		factor = 1.25
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_materials"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_materials"
			}
		}
	}
}

#Neutronium Materials
tech_ship_armor_5 = {
	area = engineering
	cost = @tier3cost4
	tier = 3
	category = { materials }
	ai_update_type = military	
	prerequisites = { "tech_ship_armor_4" "tech_mine_neutronium" }
	weight = @tier3weight4
	
	weight_modifier = {
		factor = 1.25
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_materials"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_materials"
			}
		}
	}
}

# ##################
# Ship Hull Improvement Components
# ##################

#Crystal-Infused Plating
tech_crystal_armor_1 = {
	area = engineering
	cost = @tier2cost2
	tier = 1
	category = { materials }
	ai_update_type = military	
	weight = 0
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_materials"
			}
		}
	}
}

#Crystal-Forged Plating
tech_crystal_armor_2 = {
	area = engineering
	cost = @tier3cost2
	tier = 2
	is_rare = yes
	category = { materials }
	ai_update_type = military	
	weight = 0
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_materials"
			}
		}
	}
}

# ##################
# Thruster Components
# ##################

#Chemical Thrusters
tech_thrusters_1 = {
	area = engineering
	cost = 0
	start_tech = yes
	tier = 0
	category = { rocketry }
	ai_update_type = all
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_THRUSTER_1_TITLE"
			desc = "TECH_UNLOCK_THRUSTER_1_DESC"
		}
	}
}

#Ion Thrusters
tech_thrusters_2 = {
	area = engineering
	cost = @tier1cost1
	tier = 1
	category = { rocketry }
	ai_update_type = all	
	prerequisites = { "tech_thrusters_1" }
	weight = @tier1weight1
	
	weight_modifier = {
		factor = 1.25
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_rocketry"
			}
		}
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_THRUSTER_2_TITLE"
			desc = "TECH_UNLOCK_THRUSTER_2_DESC"
		}
	}
	
	ai_weight = {
		factor = 1.25 #important component
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_rocketry"
			}
		}
	}
}

#Plasma Thrusters
tech_thrusters_3 = {
	area = engineering
	cost = @tier2cost1
	tier = 2
	category = { rocketry }
	ai_update_type = all	
	prerequisites = { "tech_thrusters_2" }
	weight = @tier2weight1
	
	weight_modifier = {
		factor = 1.25
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_rocketry"
			}
		}
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_THRUSTER_3_TITLE"
			desc = "TECH_UNLOCK_THRUSTER_3_DESC"
		}
	}
	
	ai_weight = {
		factor = 1.25 #important component
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_rocketry"
			}
		}
	}
}

#Impulse Thrusters
tech_thrusters_4 = {
	area = engineering
	cost = @tier3cost1
	tier = 3
	category = { rocketry }
	ai_update_type = all	
	prerequisites = { "tech_thrusters_3" }
	weight = @tier3weight1
	
	weight_modifier = {
		factor = 1.25
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_rocketry"
			}
		}
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_THRUSTER_4_TITLE"
			desc = "TECH_UNLOCK_THRUSTER_4_DESC"
		}
	}
	
	ai_weight = {
		factor = 1.25 #important component
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_rocketry"
			}
		}
	}
}

# ##################
# Defense Stations
# ##################

#Defense Platform
tech_space_defense_station_1 = {
	cost = @tier1cost1
	area = engineering
	tier = 1
	category = { voidcraft }	
	prerequisites = { "tech_space_construction" }
	weight = @tier1weight1
	
	weight_modifier = {
		modifier = {
			factor = 2
			is_ai = yes
		}
		modifier = {
			factor = 5
			has_technology = tech_spaceport_2
		}	
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
		modifier = {
			factor = 1.25
			OR = {
				has_ethic = ethic_militarist
				has_ethic = ethic_fanatic_militarist
			}
		}
	}
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_DEFENSE_PLATFORM_TITLE"
			desc = "TECH_UNLOCK_DEFENSE_PLATFORM_DESC"
		}
	}
	
	ai_weight = {
		weight = 10
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
		
	## unlock defense platform
}

#Defense Station
tech_space_defense_station_2 = {
	cost = @tier2cost1
	area = engineering
	tier = 2
	category = { voidcraft }	
	prerequisites = { "tech_space_defense_station_1" }
	weight = @tier2weight1
	
	weight_modifier = {
		modifier = {
			factor = 2
			is_ai = yes
		}		
		modifier = {
			factor = 5
			has_technology = tech_spaceport_4
		}		
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
		modifier = {
			factor = 1.25
			OR = {
				has_ethic = ethic_militarist
				has_ethic = ethic_fanatic_militarist
			}
		}
	}
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_DEFENSE_STATION_TITLE"
			desc = "TECH_UNLOCK_DEFENSE_STATION_DESC"
		}
	}
	
	ai_weight = {
		weight = 10
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
		
	## unlock defense station
}

#Fortress
tech_space_defense_station_3 = {
	cost = @tier3cost1
	area = engineering
	tier = 3
	category = { voidcraft }	
	prerequisites = { "tech_space_defense_station_2" }
	weight = @tier3weight1
	
	weight_modifier = {
		modifier = {
			factor = 5
			has_technology = tech_spaceport_6
		}		
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
		modifier = {
			factor = 1.25
			OR = {
				has_ethic = ethic_militarist
				has_ethic = ethic_fanatic_militarist
			}
		}
	}
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_FORTRESS_TITLE"
			desc = "TECH_UNLOCK_FORTRESS_DESC"
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
		
	## unlock space fortress
}

#Corps of Engineers
tech_space_defense_station_improvement = {
	cost = @tier2cost3
	area = engineering
	tier = 2
	category = { voidcraft }		
	prerequisites = { "tech_space_defense_station_2" }
	is_rare = yes
	weight = @tier2weight3
	
	# unlocks spaceport-module - reinforced hull layers	
	# unlock defense station +25% HP and -10% cost
	
	modifier = {
		shipclass_military_station_build_cost_mult = -0.15
		shipclass_military_station_hit_points_mult = 0.25
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.25
			NOT = {
				research_leader = {
					area = engineering
					has_trait = "leader_trait_expertise_voidcraft"
				}
			}
		}
		modifier = {
			factor = 1.25
			OR = {
				has_ethic = ethic_militarist
				has_ethic = ethic_fanatic_militarist
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
}

# ##################
# Industry and Robotics
# ##################

tech_basic_industry = {
	cost = 0
	area = engineering
	start_tech = yes
	category = { industry }
	tier = 0
	icon = "t_space_construction"
	
	## unlock mining network lvl 1
}

#Powered Exoskeletons
tech_powered_exoskeletons = {
	cost = @tier1cost1
	area = engineering
	tier = 1
	category = { industry }	
	prerequisites = { "tech_basic_industry" }
	weight = @tier1weight1
	
	modifier = {
		army_damage_mult = 0.05
		tile_resource_minerals_mult = 0.05
	}
	
	weight_modifier = {
		factor = 1.5
		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"
			}
		}
	}
}

#Mining Network 2
tech_mining_network_2 = {
	cost = @tier1cost1
	area = engineering
	tier = 1
	category = { industry }	
	prerequisites = { "tech_basic_industry" }
	weight = @tier1weight1
	
	modifier = {
		max_minerals = 1000
	}	
		
	# unlock mining network lvl 2
	
	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"
			}
		}
	}
}

#Mining Network 3
tech_mining_network_3 = {
	cost = @tier2cost1
	area = engineering
	tier = 2
	category = { industry }
	prerequisites = { "tech_mining_network_2" "tech_colonial_centralization" }
	weight = @tier2weight1
	
	modifier = {
		max_minerals = 1000
	}
		
	# unlock mining network lvl 3
	
	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"
			}
		}
	}
}

#Mining Network 4
tech_mining_network_4 = {
	cost = @tier2cost4
	area = engineering
	tier = 2
	category = { industry }
	prerequisites = { "tech_mining_network_3" "tech_galactic_administration" }
	weight = @tier2weight4
	
	modifier = {
		max_minerals = 1000
	}
		
	# unlock mining network lvl 4
	
	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"
			}
		}
	}
}

#Mineral Processing
tech_mineral_processing_1 = {
	cost = @tier1cost1
	area = engineering
	tier = 1
	category = { industry }	
	prerequisites = { "tech_mining_network_2" }
	weight = @tier1weight1
		
	# unlock mineral processing plant 1
	modifier = {
		max_minerals = 1000
	}	
	
	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"
			}
		}
	}
}

#Advanced Mineral Processing
tech_mineral_processing_2 = {
	cost = @tier2cost1
	area = engineering
	tier = 2
	category = { industry }	
	prerequisites = { "tech_mineral_processing_1" "tech_colonial_centralization" }
	weight = @tier2weight1
		
	# unlock mineral processing plant 2	
	modifier = {
		max_minerals = 1000
	}	
	
	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"
			}
		}
	}
}

#Engineering Lab 1
tech_engineering_lab_1 = {
	cost = @tier1cost1
	area = engineering
	tier = 1
	category = { industry }
	weight = @tier1weight1
		
	## unlock engineering 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 = engineering
				has_trait = "leader_trait_expertise_industry"
			}			
		}
	}
	
	ai_weight = {
		weight = 10
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
}

#Engineering Lab 2
tech_engineering_lab_2 = {
	cost = @tier2cost1
	area = engineering
	tier = 2
	category = { industry }	
	prerequisites = { "tech_engineering_lab_1" "tech_colonial_centralization" }
	weight = @tier2weight1
		
	## unlock engineering 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 = engineering
				has_trait = "leader_trait_expertise_industry"
			}			
		}
	}
	
	ai_weight = {
		weight = 10
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
}

#Engineering Lab 3
tech_engineering_lab_3 = {
	cost = @tier3cost2
	area = engineering
	tier = 3
	category = { industry }	
	prerequisites = { "tech_engineering_lab_2" "tech_galactic_administration" }
	weight = @tier3weight2
		
	## unlock engineering 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 = engineering
				has_trait = "leader_trait_expertise_industry"
			}			
		}
	}
	
	ai_weight = {
		weight = 10
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
}

#Robotic Workers
tech_robotic_workers = {
	cost = @tier1cost3
	area = engineering
	tier = 1
	category = { industry }	
	prerequisites = { "tech_powered_exoskeletons" }
	weight = @tier1weight3
		
	## unlock robot POP lvl 1
	
	weight_modifier = {
		factor = 1.5
		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"
			}
		}
	}
}

#Droids
tech_droid_workers = {
	cost = @tier2cost1
	area = engineering
	tier = 2
	category = { industry }
	prerequisites = { "tech_robotic_workers" "tech_colonial_centralization" }
	is_rare = yes
	weight = @tier2weight1
	
	## unlock robot POP lvl 2, robot Army lvl 1

	weight_modifier = {
		modifier = {
			factor = 0.25
			NOT = {
				research_leader = {
					area = engineering
					has_trait = "leader_trait_expertise_industry"
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_industry"
				has_level > 2
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
}

#Synthetics
tech_synthetic_workers = {
	cost = @tier3cost2
	area = engineering
	tier = 3
	category = { industry }
	prerequisites = { "tech_droid_workers" "tech_galactic_administration" "tech_sentient_ai" }
	is_rare = yes
	is_dangerous = yes
	weight = @tier3weight2

	## unlock robot POP lvl 3, robot Army lvl 2
	
	weight_modifier = {
		factor = 5	# Requires rare tech, so higher weight
		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"
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_industry"
				has_level > 2
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
}

#Synthetic Personality Matrix
tech_synthetic_leaders = {
	cost = @tier3cost3
	area = engineering
	tier = 3
	category = { industry }
	prerequisites = { "tech_synthetic_workers" }
	is_rare = yes
	weight = @tier3weight3
		
	## unlocks robot-leaders
	
	weight_modifier = {
		modifier = {
			factor = 0.10
			NOT = {
				research_leader = {
					area = engineering
					has_trait = "leader_trait_expertise_industry"
				}
			}
		}
		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"
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_industry"
				has_level > 3
			}
		}
		#BREAKTHROUGH - check for scientist
	}
}


# ##################
# Space Mining
# ##################

tech_space_construction = {
	cost = 0
	area = engineering
	tier = 0
	category = { industry }
	start_tech = yes
	
	weight = 50
	
	weight_modifier = {
		factor = 1
		modifier = {
			factor = 1.5
			has_technology = tech_wormhole_generation_1
		}
	}
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_CONSTRUCTION_SHIP_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_CONSTRUCTION_SHIP_CONSTRUCTION_DESC"
		}
		# used to separate the entries
		custom = {
			title = "TECH_UNLOCK_MINING_STATION_TITLE"
			desc = "TECH_UNLOCK_MINING_STATION_DESC"
		}
		# used to separate the entries
		custom = {
			title = "TECH_UNLOCK_RESEARCH_STATION_TITLE"
			desc = "TECH_UNLOCK_RESEARCH_STATION_DESC"
		}
	}
	
	ai_weight = {
		factor = 10 #very important tech
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_industry"
			}
		}
	}
	
	## unlock construction ship, mining station, research station
}


# ##################
# Aura Effects
# ##################
