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

# ##################
# Basic army
# ##################

tech_defense_army = {
	cost = 0
	area = society
	start_tech = yes
	category = { military_theory }
	tier = 0
	
	## unlock defense army, militia and basic attachments
}

# ##################
# Farming
# ##################

#Eco Simulation
tech_eco_simulation = {
	cost = 0
	area = society
	tier = 0
	category = { biology }
	start_tech = yes
	
	# unlocks farms level 1
}

#Orbital Hydroponics
tech_orbital_hydroponics = {
	cost = @tier1cost1
	area = society
	tier = 1
	category = { biology }	
	prerequisites = { "tech_eco_simulation" }
	weight = @tier1weight1
	
	# unlocks hydroponics farm module
	
	weight_modifier = {
		modifier = {
			factor = 1.5
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 2
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}	
	
	ai_weight = {
		factor = 1.5 #farms are good
		modifier = {
			factor = 2
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 4
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

#Hydroponics
tech_hydroponics = {
	cost = @tier1cost1
	area = society
	tier = 1
	category = { biology }
	prerequisites = { "tech_eco_simulation" }
	weight = @tier1weight1
	
	# unlocks farms level 2
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
	
	ai_weight = {
		factor = 1.5 #farms are good
		modifier = {
			factor = 1.25
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

#Gene Crops
tech_gene_crops = {
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	prerequisites = { "tech_hydroponics" "tech_colonial_centralization"}
	weight = @tier2weight1
	
	# unlocks farms level 3
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
	
	ai_weight = {
		factor = 1.5 #farms are good
		modifier = {
			factor = 1.25
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

#Nano-Vitality Crops
tech_nano_vitality_crops = {
	cost = @tier2cost4
	area = society
	tier = 2
	category = { biology }	
	prerequisites = { "tech_gene_crops" "tech_galactic_administration"}
	weight = @tier2weight4
	
	# unlocks farms level 4
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
	
	ai_weight = {
		factor = 1.5 #farms are good
		modifier = {
			factor = 1.25
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

tech_nutrient_replication = {
	cost = @tier3cost3
	area = society
	tier = 3
	category = { biology }
	prerequisites = { "tech_nano_vitality_crops" }
	weight = @tier3weight3
		
	modifier = {
		tile_resource_food_mult = 0.25
	}
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

# ##################
# Biolab and Colonization
# ##################

#Bio Lab 1
tech_biolab_1 = {
	cost = @tier1cost1
	area = society
	tier = 1
	category = { biology }
	weight = @tier1weight1
	
	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 = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
	
	ai_weight = {
		weight = 10
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

#Bio Lab 2
tech_biolab_2 = {
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	prerequisites = { "tech_biolab_1" "tech_colonial_centralization"}
	weight = @tier2weight1
	
	weight_modifier = {
		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 = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}	
	
	ai_weight = {
		weight = 10
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

#Bio Lab 3
tech_biolab_3 = {
	cost = @tier3cost1
	area = society
	tier = 3
	category = { biology }	
	prerequisites = { "tech_biolab_2" "tech_galactic_administration" }
	weight = @tier3weight1
	
	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 = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
	
	ai_weight = {
		weight = 10
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

#Xenology
tech_alien_life_studies = {
	cost = @tier1cost3
	area = society
	tier = 1
	category = { biology }
	prerequisites = { "tech_biolab_1" }
	weight = @tier1weight3
	
	weight_modifier = {
		modifier = {
			factor = 2
			has_ethic = ethic_xenophile
		}
		modifier = {
			factor = 3
			has_ethic = ethic_fanatic_xenophile
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
		modifier = {
			factor = 0
			NOT = { has_country_flag = first_alien_life }
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_xenophile
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_xenophile
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
		modifier = {
			factor = 0
			NOT = { has_country_flag = first_alien_life }
		}
	}
}

#Xeno Zoo
tech_xeno_zoo = {
	cost = @tier1cost4
	area = society
	tier = 1
	category = { biology }
	prerequisites = { "tech_alien_life_studies" }
	weight = @tier1weight4
	
	weight_modifier = {
		modifier = {
			factor = 0.50
			NOT = {
				has_ethic = ethic_xenophile
			}
		}
		modifier = {
			factor = 1.50
			has_ethic = ethic_fanatic_xenophile
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
		modifier = {
			factor = 0
			OR = {
				has_ethic = ethic_xenophobe
				has_ethic = ethic_fanatic_xenophobe
			}
		}
		modifier = {
			factor = 0
			NOT = { has_country_flag = first_alien_life }
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_xenophile
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_xenophile
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
		modifier = {
			factor = 0
			NOT = { has_country_flag = first_alien_life }
		}
	}
}

#New Worlds Protocol
tech_colonization_1 = {
	cost = @tier1cost2
	area = society
	tier = 1
	category = { new_worlds }
	prerequisites = { "tech_spaceport_1" }
	weight = @tier1weight2
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_COLONY_SHIP_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_COLONY_SHIP_CONSTRUCTION_DESC"
		}
	}
	
	weight_modifier = {
		factor = 3
		modifier = {
			factor = 100
			is_ai = yes
		}
		modifier = {
			factor = 5
			years_passed > 2
		}	
		modifier = {
			factor = 5
			years_passed > 4
		}
		modifier = {
			factor = 10
			years_passed > 6
		}
		modifier = {
			factor = 10
			years_passed > 9
		}			
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
	}
	
	ai_weight = {
		weight = 10000
	}
}

#
tech_colonization_2 = {
	cost = @tier2cost1
	area = society
	tier = 2
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier2weight1
	
	modifier = {
		pop_environment_tolerance = 0.05
	}
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
	}
}

#
tech_colonization_3 = {
	cost = @tier2cost4
	area = society
	tier = 2
	category = { new_worlds }
	prerequisites = { "tech_colonization_2" }
	weight = @tier2weight4
	
	modifier = {
		pop_environment_tolerance = 0.05
	}
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
	}
}

#Frontier Health
tech_frontier_health = {
	cost = @tier1cost2
	area = society
	tier = 1
	category = { biology }
	prerequisites = { "tech_colonization_1" }
	weight = @tier1weight2
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

tech_desert_colonization = {
	cost = @tier2cost1
	area = society
	tier = 2
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier2weight1
	
	weight_modifier = {
		modifier = {
			factor = 0
			NOT = {	has_country_flag = "desert_surveyed" }
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = { #for those who are only one step away in ideal planet class
			factor = 2
			OR = {
				ideal_planet_class = pc_tropical
				ideal_planet_class = pc_arid
			}
		}
		modifier = { #deny those who are too far away in ideal planet class, except if they have a Pop in the Empire that prefers that planet-type. Robots can live anywhere
			factor = 0
			AND = {
				OR = {
					ideal_planet_class = pc_ocean
					ideal_planet_class = pc_arctic
				}
				NOT = {
					any_owned_pop = {
						OR = {
							has_trait = trait_pc_desert_preference
							has_trait = trait_robotic_1
							has_trait = trait_robotic_2
							has_trait = trait_robotic_3
						}
					}
				}
			}
		}
	}
	
	weight_groups = {
		colonization
	}
	mod_weight_if_group_picked = {
		repeatable = 0.01
	}
	
	ai_weight = {
		weight = 3
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 10
			OR = {
				ideal_planet_class = pc_tropical
				ideal_planet_class = pc_arid
			}
		}
	}
}

tech_tropical_colonization = {
	cost = @tier2cost1
	area = society
	tier = 2
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier2weight1
	
	weight_modifier = {
		modifier = {
			factor = 0
			NOT = {	has_country_flag = "tropical_surveyed" }
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 2
			OR = {
				ideal_planet_class = pc_continental
				ideal_planet_class = pc_desert
			}
		}
		modifier = { #deny those who are too far away in ideal planet class, except if they have a Pop in the Empire that prefers that planet-type. Robots can live anywhere
			factor = 0
			AND = {
				OR = {
					ideal_planet_class = pc_arctic
					ideal_planet_class = pc_tundra
				}
				NOT = {
					any_owned_pop = {
						OR = {
							has_trait = trait_pc_tropical_preference
							has_trait = trait_robotic_1
							has_trait = trait_robotic_2
							has_trait = trait_robotic_3
						}
					}
				}
			}
		}
	}
	
	weight_groups = {
		colonization
	}
	mod_weight_if_group_picked = {
		repeatable = 0.01
	}
	
	ai_weight = {
		weight = 3
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 10
			OR = {
				ideal_planet_class = pc_continental
				ideal_planet_class = pc_desert
			}
		}
	}
}

tech_continental_colonization = {
	cost = @tier2cost1
	area = society
	tier = 2
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier2weight1
	
	weight_modifier = {
		modifier = {
			factor = 0
			NOT = {	has_country_flag = "continental_surveyed" }
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 2
			OR = {
				ideal_planet_class = pc_tropical
				ideal_planet_class = pc_ocean
			}
		}
		modifier = { #deny those who are too far away in ideal planet class, except if they have a Pop in the Empire that prefers that planet-type. Robots can live anywhere
			factor = 0
			AND = {
				OR = {
					ideal_planet_class = pc_tundra
					ideal_planet_class = pc_arid
				}
				NOT = {
					any_owned_pop = {
						OR = {
							has_trait = trait_pc_continental_preference
							has_trait = trait_robotic_1
							has_trait = trait_robotic_2
							has_trait = trait_robotic_3
						}
					}
				}
			}
		}
	}
	
	weight_groups = {
		colonization
	}
	mod_weight_if_group_picked = {
		repeatable = 0.01
	}
	
	ai_weight = {
		weight = 3
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 10
			OR = {
				ideal_planet_class = pc_tropical
				ideal_planet_class = pc_ocean
			}
		}
	}
}

tech_ocean_colonization = {
	cost = @tier2cost1
	area = society
	tier = 2
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier2weight1
	
	weight_modifier = {
		modifier = {
			factor = 0
			NOT = {	has_country_flag = "ocean_surveyed" }
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 2
			OR = {
				ideal_planet_class = pc_continental
				ideal_planet_class = pc_arctic
			}
		}
		modifier = { #deny those who are too far away in ideal planet class, except if they have a Pop in the Empire that prefers that planet-type. Robots can live anywhere
			factor = 0
			AND = {
				OR = {
					ideal_planet_class = pc_arid
					ideal_planet_class = pc_desert
				}
				NOT = {
					any_owned_pop = {
						OR = {
							has_trait = trait_pc_ocean_preference
							has_trait = trait_robotic_1
							has_trait = trait_robotic_2
							has_trait = trait_robotic_3
						}
					}
				}
			}
		}
	}
	
	weight_groups = {
		colonization
	}
	mod_weight_if_group_picked = {
		repeatable = 0.01
	}
	
	ai_weight = {
		weight = 3
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 10
			OR = {
				ideal_planet_class = pc_continental
				ideal_planet_class = pc_arctic
			}
		}
	}
}

tech_arctic_colonization = {
	cost = @tier2cost1
	area = society
	tier = 2
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier2weight1
	
	weight_modifier = {
		modifier = {
			factor = 0
			NOT = {	has_country_flag = "arctic_surveyed" }
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 2
			OR = {
				ideal_planet_class = pc_ocean
				ideal_planet_class = pc_tundra
			}
		}
		modifier = { #deny those who are too far away in ideal planet class, except if they have a Pop in the Empire that prefers that planet-type. Robots can live anywhere
			factor = 0
			AND = {
				OR = {
					ideal_planet_class = pc_desert
					ideal_planet_class = pc_tropical
				}
				NOT = {
					any_owned_pop = {
						OR = {
							has_trait = trait_pc_arctic_preference
							has_trait = trait_robotic_1
							has_trait = trait_robotic_2
							has_trait = trait_robotic_3
						}
					}
				}
			}
		}
	}
	
	weight_groups = {
		colonization
	}
	mod_weight_if_group_picked = {
		repeatable = 0.01
	}
	
	ai_weight = {
		weight = 3
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 10
			OR = {
				ideal_planet_class = pc_ocean
				ideal_planet_class = pc_tundra
			}
		}
	}
}

tech_tundra_colonization = {
	cost = @tier2cost1
	area = society
	tier = 2
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier2weight1
	
	weight_modifier = {
		modifier = {
			factor = 0
			NOT = {	has_country_flag = "tundra_surveyed" }
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 2
			OR = {
				ideal_planet_class = pc_arctic
				ideal_planet_class = pc_arid
			}
		}
		modifier = { #deny those who are too far away in ideal planet class, except if they have a Pop in the Empire that prefers that planet-type. Robots can live anywhere
			factor = 0
			AND = {
				OR = {
					ideal_planet_class = pc_tropical
					ideal_planet_class = pc_continental
				}
				NOT = {
					any_owned_pop = {
						OR = {
							has_trait = trait_pc_tundra_preference
							has_trait = trait_robotic_1
							has_trait = trait_robotic_2
							has_trait = trait_robotic_3
						}
					}
				}
			}
		}
	}
	
	weight_groups = {
		colonization
	}
	mod_weight_if_group_picked = {
		repeatable = 0.01
	}
	
	ai_weight = {
		weight = 3
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 10
			OR = {
				ideal_planet_class = pc_arctic
				ideal_planet_class = pc_arid
			}
		}
	}
}
tech_arid_colonization = {
	cost = @tier2cost1
	area = society
	tier = 2
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier2weight1
	
	weight_modifier = {
		modifier = {
			factor = 0
			NOT = {	has_country_flag = "arid_surveyed" }
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 2
			OR = {
				ideal_planet_class = pc_tundra
				ideal_planet_class = pc_desert
			}
		}
		modifier = { #deny those who are too far away in ideal planet class, except if they have a Pop in the Empire that prefers that planet-type. Robots can live anywhere
			factor = 0
			AND = {
				OR = {
					ideal_planet_class = pc_continental
					ideal_planet_class = pc_ocean
				}
				NOT = {
					any_owned_pop = {
						OR = {
							has_trait = trait_pc_arid_preference
							has_trait = trait_robotic_1
							has_trait = trait_robotic_2
							has_trait = trait_robotic_3
						}
					}
				}
			}
		}
	}
	
	weight_groups = {
		colonization
	}
	mod_weight_if_group_picked = {
		repeatable = 0.01
	}
	
	ai_weight = {
		factor = 3
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 10
			OR = {
				ideal_planet_class = pc_tundra
				ideal_planet_class = pc_desert
			}
		}
	}
}

tech_frontier_collectives = {
	cost = @tier1cost3
	area = society
	tier = 1
	category = { new_worlds }
	is_rare = yes
	prerequisites = { "tech_colonization_1" }
	weight = @tier1weight3

	weight_modifier = {
		modifier = {
			factor = 0.10
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_new_worlds"
				}
			}
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_collectivist
		}
		modifier = {
			factor = 2
			has_ethic = ethic_fanatic_collectivist
		}
		modifier = {
			factor = 0
			NOT = {
				OR = {
					has_ethic = ethic_collectivist
					has_ethic = ethic_fanatic_collectivist
				}
			}
		}
	}	

	modifier = {
		country_resettlement_cost_mult = -0.15
		planet_colony_development_speed_mult = 0.25
	}

	ai_weight = {
		factor = 3 #rare tech
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
	}
}

tech_frontier_commissars = {
	 cost = @tier2cost4
	 area = society
	 tier = 2
	 category = { new_worlds }
	 is_rare = yes	
	 prerequisites = { "tech_frontier_collectives" }
	weight = @tier2weight4
	
	 weight_modifier = {
		 modifier = {
			 factor = 0.10
			 NOT = {
				 research_leader = {
					 area = society
					 has_trait = "leader_trait_expertise_new_worlds"
				 }
			 }
		 }
		 modifier = {
			 factor = 1.10
			 research_leader = {
				 area = society
				 has_trait = "leader_trait_maniacal"
			 }
		 }
		 modifier = {
			 factor = 1.5
			 has_ethic = ethic_collectivist
		 }
		 modifier = {
			 factor = 2
			 has_ethic = ethic_fanatic_collectivist
		 }
		modifier = {
			factor = 0
			NOT = {
				OR = {
					has_ethic = ethic_collectivist
					has_ethic = ethic_fanatic_collectivist
				}
				has_technology = "tech_frontier_collectives"
			}
		}
	 }
	
	modifier = {
		pop_ethic_shift = -0.20
		planet_colony_development_speed_mult = 0.25
	}
	
	 ai_weight = {
		 factor = 3 #rare tech
		 modifier = {
			 factor = 1.25
			 research_leader = {
				 area = society
				 has_trait = "leader_trait_expertise_new_worlds"
			 }
		 }
	 }
 }

#Frontier Initiatives
tech_frontier_initiatives = {
	cost = @tier1cost3
	area = society
	tier = 1
	category = { new_worlds }
	is_rare = yes	
	prerequisites = { "tech_colonization_1" }
	weight = @tier1weight3
		
	feature_flags = {
		colony_ship_rushed
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.10
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_new_worlds"
				}
			}
		}
		modifier = {
			factor = 1.10
			has_trait = trait_nomadic
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_individualist
		}
		modifier = {
			factor = 2
			has_ethic = ethic_fanatic_individualist
		}
		modifier = {
			factor = 0
			has_technology = "tech_frontier_collectives"
		}
		modifier = {
			factor = 0
			NOT = {
				OR = {
					has_ethic = ethic_individualist
					has_ethic = ethic_fanatic_individualist
				}
			}
		}
	}
	
	ai_weight = {
		factor = 3 #rare tech
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
	}
}

#Frontier Traditions
tech_frontier_traditions = {
	cost = @tier2cost4
	area = society
	tier = 2
	category = { new_worlds }
	is_rare = yes	
	prerequisites = { "tech_frontier_initiatives" }
	weight = @tier2weight4
	
	#unlocks pioneering terminal module
	
	weight_modifier = {
		modifier = {
			factor = 0.10
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_new_worlds"
				}
			}
		}
		modifier = {
			factor = 1.10
			has_trait = trait_nomadic
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_individualist
		}
		modifier = {
			factor = 2
			has_ethic = ethic_fanatic_individualist
		}
		modifier = {
			factor = 0
			NOT = {
				OR = {
					has_ethic = ethic_individualist
					has_ethic = ethic_fanatic_individualist
				}
			}
		}
	}
	
	ai_weight = {
		factor = 3 #rare tech
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
	}
}

tech_tb_mountain_range = {
	cost = @tier1cost2
	area = society
	tier = 1
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier1weight2
	
	weight_groups = {
		tile_blockers
	}
	mod_weight_if_group_picked = {
		repeatable = 0.01
	}
	
	weight_modifier = {
		modifier = {
			factor = 2
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_mountain_range"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 3
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_mountain_range"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}	
	}
}

tech_tb_volcano = {
	cost = @tier1cost2
	area = society
	tier = 1
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier1weight2
	
	weight_groups = {
		tile_blockers
	}
	mod_weight_if_group_picked = {
		repeatable = 0.01
	}
	
	weight_modifier = {
		modifier = {
			factor = 2
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_active_volcano"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 3
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_active_volcano"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}	
	}
}

tech_tb_dangerous_wildlife = {
	cost = @tier1cost2
	area = society
	tier = 1
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier1weight2
	
	weight_groups = {
		tile_blockers
	}
	mod_weight_if_group_picked = {
		repeatable = 0.01
	}
	
	weight_modifier = {
		modifier = {
			factor = 2
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_dangerous_wildlife"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 3
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_dangerous_wildlife"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}	
	}
}

tech_tb_dense_jungle = {
	cost = @tier1cost2
	area = society
	tier = 1
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier1weight2
	
	weight_groups = {
		tile_blockers
	}
	mod_weight_if_group_picked = {
		repeatable = 0.01
	}
	
	weight_modifier = {
		modifier = {
			factor = 2
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_dense_jungle"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 3
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_dense_jungle"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}	
	}
}

tech_tb_quicksand_basin = {
	cost = @tier1cost2
	area = society
	tier = 1
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier1weight2
	
	weight_groups = {
		tile_blockers
	}
	mod_weight_if_group_picked = {
		repeatable = 0.01
	}
	
	weight_modifier = {
		modifier = {
			factor = 2
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_quicksand_basin"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 3
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_quicksand_basin"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}	
	}
}

tech_tb_noxious_swamp = {
	cost = @tier1cost2
	area = society
	tier = 1
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier1weight2
	
	weight_groups = {
		tile_blockers
	}
	mod_weight_if_group_picked = {
		repeatable = 0.01
	}
	
	weight_modifier = {
		modifier = {
			factor = 2
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_noxious_swamp"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 3
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_noxious_swamp"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}	
	}
}

tech_tb_massive_glacier = {
	cost = @tier1cost2
	area = society
	tier = 1
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier1weight2
	
	weight_groups = {
		tile_blockers
	}
	mod_weight_if_group_picked = {
		repeatable = 0.01
	}
	
	weight_modifier = {
		modifier = {
			factor = 2
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_massive_glacier"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 3
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_massive_glacier"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}	
	}
}

tech_tb_toxic_kelp = {
	cost = @tier1cost2
	area = society
	tier = 1
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier1weight2
	
	weight_groups = {
		tile_blockers
	}
	mod_weight_if_group_picked = {
		repeatable = 0.01
	}
	
	weight_modifier = {
		modifier = {
			factor = 2
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_toxic_kelp"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 3
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_toxic_kelp"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}	
	}
}

tech_tb_deep_sinkhole = {
	cost = @tier1cost2
	area = society
	tier = 1
	category = { new_worlds }
	prerequisites = { "tech_colonization_1" }
	weight = @tier1weight2
	
	weight_groups = {
		tile_blockers
	}
	mod_weight_if_group_picked = {
		repeatable = 0.01
	}
	
	weight_modifier = {
		modifier = {
			factor = 2
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_deep_sinkhole"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 3
		}
		modifier = {
			factor = 0
			NOT = {
				any_owned_planet =  {
					any_tile = {
						has_blocker = "tb_deep_sinkhole"
					}
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
		modifier = {
			factor = 0
			num_owned_planets < 2
		}	
	}
}

# ##################
# Terraformation
# ##################

tech_terrestrial_sculpting = {
	cost = @tier2cost1
	area = society
	tier = 2
	category = { new_worlds }
	weight = @tier2weight1
	
	feature_flags = {
		build_terraform_station
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.33
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_new_worlds"
				}
			}
		}
		modifier = {
			factor = 0
			NOT = { has_country_flag = homesystem_surveyed }
			is_ai = no
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
	}	
}

tech_atmospheric_manipulation = {
	cost = @tier2cost3
	area = society
	tier = 2
	category = { new_worlds }
	prerequisites = { "tech_terrestrial_sculpting" }
	weight = @tier2weight3
	
	# unlocks additional terraforming-options
	
	prereqfor_desc = {
		diplo_action = {
			title = "TECH_UNLOCK_TERRAFORMING_TEMP_CHANGE_TITLE"
			desc = "TECH_UNLOCK_TERRAFORMING_TEMP_CHANGE_DESC"
		}
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.33
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_new_worlds"
				}
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
	}
}

# ##################
# Genetics
# ##################

#Genome Mapping
tech_genome_mapping = {
	cost = @tier1cost1
	area = society
	tier = 1
	category = { biology }
	weight = @tier1weight1
	
	modifier = {
		leader_age = 10
		tile_resource_food_mult = 0.1
	}
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

#Epigenetic Triggers
tech_epigenetic_triggers = {
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	prerequisites = { "tech_genome_mapping" }
	weight = @tier2weight1
	
	feature_flags = {
		uplifting
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.5
			has_ethic = ethic_fanatic_xenophobe
		}
		modifier = {
			factor = 0.75
			has_ethic = ethic_xenophobe
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_xenophile
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_xenophile
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
		modifier = {
			factor = 0
			NOT = { has_country_flag = first_alien_life }
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 0.5
			has_ethic = ethic_fanatic_xenophobe
		}
		modifier = {
			factor = 0.75
			has_ethic = ethic_xenophobe
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_xenophile
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_xenophile
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
		modifier = {
			factor = 0
			NOT = { has_country_flag = first_alien_life }
		}
	}
}

#Cloning
tech_cloning = {
	cost = @tier2cost3
	area = society
	tier = 2
	category = { biology }	
	prerequisites = { "tech_epigenetic_triggers" }
	weight = @tier2weight3
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

#Gene Banks
tech_gene_banks = {
	cost = @tier3cost2
	area = society
	tier = 3
	category = { biology }
	is_rare = yes
	prerequisites = { "tech_cloning" }
	weight = @tier3weight2
	
	weight_modifier = {
		modifier = {
			factor = 0.10
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_biology"
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_spark_of_genius"
			}
		}
		modifier = {
			factor = 1.5
			research_leader = {
				area = society
				has_level > 4
			}
		}
		modifier = {
			factor = 0.75
			research_leader = {
				area = society
				has_level < 2
			}
		}
	}
	
	ai_weight = {
		factor = 3 #rare tech
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

tech_gene_seed_purification = {
	cost = @tier3cost2
	area = society
	category = { biology }
	tier = 3
	is_rare = yes
	prerequisites = { "tech_cloning" }
	weight = @tier3weight2
	
	# unlocks gene-warrior armies
	
	weight_modifier = {
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 0.10
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_biology"
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_spark_of_genius"
			}
		}
		modifier = {
			factor = 1.5
			research_leader = {
				area = society
				has_level > 4
			}
		}
		modifier = {
			factor = 0.75
			NOT = {
				research_leader = {
					area = society
					has_level > 3
				}
			}
		}
	}
	
	ai_weight = {
		factor = 3 #rare tech
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

tech_morphogenetic_field_mastery = {
	cost = @tier2cost3
	area = society
	category = { biology }
	tier = 2
	is_rare = yes
	prerequisites = { "tech_epigenetic_triggers" }
	weight = @tier2weight3
	
	# unlocks xeno-armies
	
	weight_modifier = {
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 0.10
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_biology"
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_maniacal"
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_spark_of_genius"
			}
		}
		modifier = {
			factor = 1.5
			research_leader = {
				area = society
				has_level > 4
			}
		}
		modifier = {
			factor = 0.75
			NOT = {
				research_leader = {
					area = society
					has_level > 2
				}
			}
		}
	}
	
	ai_weight = {
		factor = 3 #rare tech
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

#Gene Tailoring
tech_gene_tailoring = {
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }	
	prerequisites = { "tech_epigenetic_triggers" }
	weight = @tier2weight2
	
	modifier = {
		trait_points = 1
	}
	
	feature_flags = {
		modify_traits
		pop_self_modification
	}
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

#Targeted Gene Expressions
tech_gene_expressions = {
	cost = @tier2cost4
	area = society
	category = { biology }
	tier = 2
	is_rare = yes
	prerequisites = { "tech_gene_tailoring" }
	weight = @tier2weight4
	
	modifier = {
		trait_points = 1
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.50
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_biology"
				}
			}
		}
		modifier = {
			factor = 1.50
			research_leader = {
				area = society
				has_trait = "leader_trait_spark_of_genius"
			}
		}
		modifier = {
			factor = 1.50
			OR = {
				has_ethic = ethic_collectivist
				has_ethic = ethic_fanatic_collectivist
			}
		}
		modifier = {
			factor = 0.10
			OR = {
				has_ethic = ethic_individualist
				has_ethic = ethic_fanatic_individualist
			}
		}
	}	
	
	ai_weight = {
		factor = 3 #rare tech
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

#Selected Lineages
tech_selected_lineages = {
	cost = @tier2cost2
	area = society
	category = { biology }
	tier = 2
	is_rare = yes
	prerequisites = { "tech_epigenetic_triggers" }
	weight = @tier2weight2
	
	# Modifiers from this tech is added through a policy-option
	modifier = {
		# leader_skill_levels = 1
		# leader_age = 30
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.50
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_biology"
				}
			}
		}
		modifier = {
			factor = 1.50
			research_leader = {
				area = society
				has_trait = "leader_trait_spark_of_genius"
			}
		}
		modifier = {
			factor = 1.50
			OR = {
				has_ethic = ethic_individualist
				has_ethic = ethic_fanatic_individualist
			}
		}
		modifier = {
			factor = 0.10
			OR = {
				has_ethic = ethic_collectivist
				has_ethic = ethic_fanatic_collectivist
			}
		}
	}
	
	ai_weight = {
		factor = 3 #rare tech
		modifier = {
			factor = 1.50
			has_ethic = ethic_fanatic_individualist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

#Capacity Boosters
tech_capacity_boosters = {
	cost = @tier3cost1
	area = society
	category = { biology }
	tier = 3
	is_rare = yes
	prerequisites = { "tech_selected_lineages" }
	weight = @tier3weight1
	
	# Modifiers from this tech is added through a policy-option
	modifier = {
		# leader_skill_levels = 2
		# leader_influence_cost = 0.35
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.10
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_biology"
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_spark_of_genius"
			}
		}
		modifier = {
			factor = 1.5
			research_leader = {
				area = society
				has_level > 4
			}
		}
		modifier = {
			factor = 0.75
			NOT = {
				research_leader = {
					area = society
					has_level > 2
				}
			}
		}
	}
	
	ai_weight = {
		factor = 3 #rare tech
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_biology"
			}
		}
	}
}

#Regenerative Hull Tissue
tech_regenerative_hull_tissue = {
	area = society
	cost = @tier3cost3
	tier = 3
	is_rare = yes
	category = { materials }
	ai_update_type = military
	weight = @tier3weight3
	
	weight_modifier = { 
		factor = 0 		# Can only be reverse engineered
	}
}

# ##################
# Fleet Organization
# ##################

#Doctrine: Space Combat
tech_doctrine_fleet_size_1 = {
	cost = @tier1cost1
	area = society
	tier = 1
	category = { military_theory }
	weight = @tier1weight1
	
	modifier = {
		navy_size_mult = 0.10
	}
	
	weight_modifier = {
		factor = 3
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
	
	ai_weight = {
		factor = 3
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
}

#Doctrine: Reactive Formations
tech_doctrine_fleet_size_2 = {
	cost = @tier1cost3
	area = society
	tier = 1
	category = { military_theory }
	prerequisites = { "tech_doctrine_fleet_size_1" }
	weight = @tier1weight3
	
	modifier = {
		navy_size_mult = 0.10
	}
	
	weight_modifier = {
		factor = 3
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
	
	ai_weight = {
		factor = 3
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
}

#Doctrine: Interstellar Warfare
tech_doctrine_fleet_size_3 = {
	cost = @tier2cost1
	area = society
	tier = 2
	category = { military_theory }
	prerequisites = { "tech_doctrine_fleet_size_2" }
	weight = @tier2weight1
	
	modifier = {
		navy_size_mult = 0.10
	}
	
	weight_modifier = {
		factor = 3
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
	
	ai_weight = {
		factor = 3
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
}

#Doctrine: Fluid Fleet Templates
tech_doctrine_fleet_size_4 = {
	cost = @tier2cost4
	area = society
	tier = 2
	category = { military_theory }
	prerequisites = { "tech_doctrine_fleet_size_3" }
	weight = @tier2weight4
	
	modifier = {
		navy_size_mult = 0.10
	}
	
	weight_modifier = {
		factor = 3
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
	
	ai_weight = {
		factor = 3
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
}

#Doctrine: Armada Battle Formation
tech_doctrine_fleet_size_5 = {
	cost = @tier3cost1
	area = society
	tier = 3
	category = { military_theory }
	prerequisites = { "tech_doctrine_fleet_size_4" }
	weight = @tier3weight1
	
	modifier = {
		navy_size_mult = 0.10
	}
	
	weight_modifier = {
		factor = 3
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
	
	ai_weight = {
		factor = 3
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
}

#Interstellar Fleet Traditions
tech_interstellar_fleet_traditions = {
	cost = @tier1cost4
	area = society
	tier = 1
	category = { military_theory }
	prerequisites = { "tech_doctrine_fleet_size_2" }
	weight = @tier1weight4
		
	#unlocks fleet academy
	
	weight_modifier = {
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
}

#Doctrine: Fleet Support 
tech_doctrine_fleet_support = {
	cost = @tier1cost2
	area = society
	tier = 1
	category = { military_theory }
	prerequisites = { "tech_doctrine_fleet_size_1" }
	weight = @tier1weight2
	
	#unlocks crew quarters and engineering bay modules
	
	weight_modifier = {
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
}

tech_doctrine_command_matrix = {
	cost = @tier2cost2
	area = society
	tier = 2
	category = { military_theory }
	prerequisites = { "tech_doctrine_fleet_size_3" }
	weight = @tier2weight2
	
	modifier = { 
		ship_upkeep_mult = -0.1 
	}
	
	weight_modifier = {
		modifier = {
			factor = 0
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_military_theory"
				}
			}
		}
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
}

#Doctrine: Refit Standards
tech_doctrine_refit_standards = {
	cost = @tier1cost4
	area = society
	tier = 2
	category = { military_theory }
	prerequisites = { "tech_doctrine_fleet_size_2" }
	weight = @tier1weight4
	
	modifier = { 
		country_ship_upgrade_cost_mult = -0.15
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
}


# ##################
# Army Organization
# ##################
tech_centralized_command = {
	cost = @tier1cost1
	area = society
	tier = 1
	category = { military_theory }
	weight = @tier1weight1
	
	modifier = { 
		army_upkeep_mult = -0.1
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
}

#Combat Training
tech_combat_training = {
	cost = @tier1cost4
	area = society
	tier = 1
	category = { military_theory }
	prerequisites = { "tech_centralized_command" }
	weight = @tier1weight4
	
	# unlocks army training-centre
	
	modifier = { 
		army_upkeep_mult = -0.1
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 0.8
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_military_theory"
			}
		}
	}
}


# ##################
# Psionics
# ##################

#Psionic Theory
tech_psionic_theory = {
	cost = @tier2cost4
	area = society
	tier = 2
	category = { psionics }
	is_rare = yes
	weight = @tier2weight4
	
	weight_modifier = {
		modifier = {
			factor = 0.05
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_psionics"
				}
				has_ethic = "ethic_spiritualist"
				has_ethic = "ethic_fanatic_spiritualist"
			}
		}
		modifier = {
			factor = 1.10
			research_leader = {
				area = society
				has_level > 2
				has_trait = "leader_trait_expertise_psionics"
			}
		}
		modifier = {
			factor = 1.5
			research_leader = {
				area = society
				has_level > 3
				has_trait = "leader_trait_expertise_psionics"
			}
		}
		modifier = {
			factor = 2
			research_leader = {
				area = society
				has_level > 4
				has_trait = "leader_trait_expertise_psionics"
			}
		}
		modifier = {
			factor = 2
			has_ethic = "ethic_spiritualist"
		}
		modifier = {
			factor = 3
			has_ethic = "ethic_fanatic_spiritualist"
		}
		modifier = {
			factor = 5
			research_leader = {
				area = society
				has_trait = "leader_trait_maniacal"
			}
		}
		modifier = {
			factor = 0
			AND = {
				OR = {
					has_ethic = "ethic_materialist"
					has_ethic = "ethic_fanatic_materialist"
				}
				NOT = {
					research_leader = {
						area = society
						has_trait = "leader_trait_expertise_psionics"
					}
				}
			}
		}
	}
	
	ai_weight = {
		factor = 5 #very rare tech
		modifier = {
			factor = 1.5
			OR = {
				has_ethic = ethic_spiritualist
				has_ethic = ethic_fanatic_spiritualist
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_psionics"
			}
		}
	}
}

#Telepathy
tech_telepathy = {
	cost = @tier3cost1
	area = society
	tier = 3
	category = { psionics }
	is_rare = yes	
	prerequisites = { "tech_psionic_theory" }
	weight = @tier3weight1
	
	weight_modifier = {
		modifier = {
			factor = 0.50
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_psionics"
				}
			}
		}
		modifier = {
			factor = 1.10
			research_leader = {
				area = society
				has_level > 2
				has_trait = "leader_trait_expertise_psionics"
			}
		}
		modifier = {
			factor = 1.5
			research_leader = {
				area = society
				has_level > 3
				has_trait = "leader_trait_expertise_psionics"
			}
		}
		modifier = {
			factor = 2
			research_leader = {
				area = society
				has_level > 4
				has_trait = "leader_trait_expertise_psionics"
			}
		}
		modifier = {
			factor = 2
			has_ethic = "ethic_spiritualist"
		}
		modifier = {
			factor = 3
			has_ethic = "ethic_fanatic_spiritualist"
		}
		modifier = {
			factor = 4
			research_leader = {
				area = society
				has_trait = "leader_trait_maniacal"
			}
		}
	}
	
	ai_weight = {
		factor = 5 #very rare tech
		modifier = {
			factor = 1.5
			OR = {
				has_ethic = ethic_spiritualist
				has_ethic = ethic_fanatic_spiritualist
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_psionics"
			}
		}
	}
}

tech_precognition_interface = {
	cost = @tier3cost1
	area = society
	tier = 3
	category = { psionics }
	is_rare = yes
	prerequisites = { "tech_telepathy" }
	weight = @tier3weight1
	
	# unlocks precognitive interface-component, combat-computer granting evasion to ships
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_COMBAT_COMPUTER_PRECOG_TITLE"
			desc = "TECH_UNLOCK_COMBAT_COMPUTER_PRECOG_DESC"
		}
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.50
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_psionics"
				}
			}
		}
		modifier = {
			factor = 1.10
			research_leader = {
				area = society
				has_level > 2
				has_trait = "leader_trait_expertise_psionics"
			}
		}
		modifier = {
			factor = 1.5
			research_leader = {
				area = society
				has_level > 3
				has_trait = "leader_trait_expertise_psionics"
			}
		}
		modifier = {
			factor = 2
			research_leader = {
				area = society
				has_level > 4
				has_trait = "leader_trait_expertise_psionics"
			}
		}
		modifier = {
			factor = 2
			has_ethic = "ethic_spiritualist"
		}
		modifier = {
			factor = 3
			has_ethic = "ethic_fanatic_spiritualist"
		}
		modifier = {
			factor = 4
			research_leader = {
				area = society
				has_trait = "leader_trait_maniacal"
			}
		}
	}
	
	ai_weight = {
		factor = 5 #very rare tech
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_psionics"
			}
		}
	}
}

tech_psi_jump_drive_1 = {
	cost = @tier3cost4
	area = society
	tier = 3
	category = { psionics }
	ai_update_type = all
	is_reverse_engineerable = no
	is_rare = yes
	is_dangerous = yes
	prerequisites = { "tech_precognition_interface" }
	weight = @tier3weight4
	is_dangerous = yes
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_PSI_JUMPDRIVE_1_TITLE"
			desc = "TECH_UNLOCK_PSI_JUMPDRIVE_1_DESC"
		}
	}
	
	weight_modifier = {
		factor = 0.01
	}
}


# ##################
# Trade and Diplomacy
# ##################

#Xeno Outreach
tech_xeno_outreach = {
	cost = 0
	area = society
	category = { statecraft }
	tier = 0
	start_tech = yes
}

#Xeno Relations
tech_xeno_relations = {
	cost = 0
	area = society
	category = { statecraft }
	tier = 0
	start_tech = yes

	# unlocks alliances
	prereqfor_desc = {
		diplo_action = {
			title = "TECH_UNLOCK_DIPLOMATIC_ACTION_CREATE_ALLIANCE_TITLE"
			desc = "TECH_UNLOCK_DIPLOMATIC_ACTION_CREATE_ALLIANCE_DESC"
		}
	}	
}

#Xeno Supremacy
tech_xeno_supremacy = {
	cost = 0
	area = society
	category = { statecraft }
	tier = 0
	start_tech = yes

	# unlocks vassals
	prereqfor_desc = {
		diplo_action = {
			title = "TECH_UNLOCK_DIPLOMATIC_ACTION_CREATE_VASSAL_TITLE"
			desc = "TECH_UNLOCK_DIPLOMATIC_ACTION_CREATE_VASSAL_DESC"
		}
	}
}

#Purity Campaigns
tech_purity_campaigns = {
	cost = @tier1cost2
	area = society
	tier = 1
	category = { statecraft }	
	prerequisites = { "tech_planetary_government" }
	weight = @tier1weight2
	is_rare = yes
	
	# unlocks Monument to Purity planetary wonder
	# edict towards keeping species - you dont take kindly to - out
	
	weight_modifier = {
		modifier = {
			factor = 0.50
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_statecraft"
				}
			}
		}
		modifier = {
			factor = 3
			OR = {
				has_ethic = ethic_xenophobe
				has_ethic = ethic_fanatic_xenophobe
			}
		}	
		modifier = {
			factor = 0
			NOT = {
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
			}
		}
		modifier = {
			factor = 0
			num_communications < 1
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 3
			has_ethic = ethic_fanatic_xenophobe
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}

tech_xeno_diplomacy = {
	cost = @tier2cost1
	area = society
	category = { statecraft }
	tier = 2	
	weight = @tier2weight1
	
	# unlocks federations
	prereqfor_desc = {
		diplo_action = {
			title = "TECH_UNLOCK_DIPLOMATIC_ACTION_CREATE_FEDERATION_TITLE"
			desc = "TECH_UNLOCK_DIPLOMATIC_ACTION_CREATE_FEDERATION_DESC"
		}
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.50
			OR = {
				has_ethic = ethic_xenophobe
				has_ethic = ethic_fanatic_xenophobe
			}
		}
		modifier = {
			factor = 4
			OR = {
				has_ethic = ethic_xenophile
				has_ethic = ethic_fanatic_xenophile
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
		modifier = {
			factor = 0
			num_communications < 1
		}
		modifier = {
			factor = 3
			num_communications > 3
		}		
	}
	
	weight_groups = {
		diplomacy
	}
	mod_weight_if_group_picked = {
		diplomacy = 0.25
	}
	
	ai_weight = {
		factor = 3
		modifier = {
			factor = 10
			has_ai_personality_type = federation_builder
		}	
		modifier = {
			factor = 2
			has_ethic = ethic_xenophile
		}
		modifier = {
			factor = 4
			has_ethic = ethic_fanatic_xenophile
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}

#Xeno Integration
tech_xeno_integration = {
	cost = @tier2cost1
	area = society
	category = { biology }
	tier = 2	
	prerequisites = { "tech_xeno_relations" }
	weight = @tier2weight1
	
	# leaders from other species available
	
	weight_modifier = {	
		modifier = {
			factor = 0.50
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_statecraft"
				}
			}
		}
		modifier = {
			factor = 3
			has_ethic = ethic_xenophile
		}
		modifier = {
			factor = 6
			has_ethic = ethic_fanatic_xenophile
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
		modifier = {
			factor = 0
			OR = {
				has_ethic = ethic_xenophobe
				has_ethic = ethic_fanatic_xenophobe
			}
		}
		modifier = {  # checks if there's any Pops not belonging to main species in the Empire
			factor = 0
			NOT = {
				any_owned_pop = {
					NOT = {
						is_same_species = ROOT
					}
				}
			}
		}
	}
}

#Galactic Ambitions
tech_galactic_ambitions = {
	cost = @tier1cost4
	area = society
	category = { statecraft }
	tier = 1	
	prerequisites = { "tech_xeno_outreach" }
	weight = @tier1weight4
	
	modifier = {
		country_border_mult = 0.2
	}
	
	prereqfor_desc = {
		intel = {
			title = "TECH_UNLOCK_SURVEY_INTEL_TITLE"
			desc = "TECH_UNLOCK_SURVEY_INTEL_DESC"
		}	
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_BORDER_EXTRUDER_2_TITLE"
			desc = "TECH_UNLOCK_BORDER_EXTRUDER_2_DESC"
		}
	}
	
	weight_modifier = {
		modifier = {
			factor = 2
			num_communications > 2
		}
		modifier = {
			factor = 2
			num_communications > 3
		}			
		modifier = {
			factor = 2
			num_communications > 4
		}			
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
		modifier = {
			factor = 0
			num_communications < 1
		}		
	}
	
	ai_weight = {
		modifier = {
			factor = 1.5
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 2
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}

#Manifest Destiny
tech_manifest_destiny = {
	cost = @tier2cost3
	area = society
	category = { statecraft }
	tier = 2
	is_rare = yes	
	prerequisites = { "tech_galactic_ambitions" }
	weight = @tier2weight3
		
	modifier = {
		# reduced influence-cost in war-negotiation
		country_border_mult = 0.2
	}
	
	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_BORDER_EXTRUDER_3_TITLE"
			desc = "TECH_UNLOCK_BORDER_EXTRUDER_3_DESC"
		}
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.25
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_statecraft"
				}
			}
		}
		modifier = {
			factor = 1.05
			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 = {
		modifier = {
			factor = 1.5
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 2
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}

# ##################
# Empire Management
# ##################

tech_paradise_dome = {
	cost = @tier1cost3
	area = society
	tier = 1
	category = { statecraft }
	is_rare = yes
	prerequisites = { "tech_planetary_unification" }
	weight = @tier1weight3
	
	#unlocks Paradise Dome building
	
	weight_modifier = {
		modifier = {
			factor = 0
			NOT = {
				OR = {
					has_ethic = ethic_pacifist
					has_ethic = ethic_fanatic_pacifist
				}
			}
		}
		modifier = {
			factor = 3
			has_ethic = ethic_fanatic_spiritualist
		}
	}	
	
	ai_weight = {
		modifier = {
			factor = 2
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}	
	}
}

#Virtual Combat Simulations
tech_virtual_combat_arena = {
	cost = @tier1cost3
	area = society
	tier = 1
	category = { military_theory }
	is_rare = yes
	prerequisites = { "tech_centralized_command" }
	weight = @tier1weight3
	
	#unlocks Coliseum planetary wonder
	
	weight_modifier = {
		modifier = {
			factor = 0
			NOT = {
				OR = {
					has_ethic = ethic_militarist
					has_ethic = ethic_fanatic_militarist
				}
			}
		}
		modifier = {
			factor = 1.10
			research_leader = {
				area = society
				has_trait = "leader_trait_substance_abuser"
			}
		}
		modifier = {
			factor = 4
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}	
	
	ai_weight = {
		modifier = {
			factor = 2
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}	
	}
}

tech_planetary_government = {
	cost = 0
	area = society
	tier = 0
	category = { statecraft }
	start_tech = yes
	
	# unlocks Planetary Outpost
}

#Planetary Unification
tech_planetary_unification = {
	cost = @tier1cost1
	area = society
	tier = 1
	category = { statecraft }
	prerequisites = { "tech_planetary_government" }
	weight = @tier1weight1
	
	modifier = {
		influence_gain_add = 1
	}
	# also unlocks planet-happiness edict
	
	weight_modifier = {
		factor = 4
		modifier = {
			factor = 0.75
			NOT = {
				OR = {
					has_ethic = ethic_pacifist
					has_ethic = ethic_fanatic_pacifist
				}
			}
		}
	}
	
	ai_weight = {
		factor = 2
		modifier = {
			factor = 0.75
			NOT = {
				OR = {
					has_ethic = ethic_pacifist
					has_ethic = ethic_fanatic_pacifist
				}
			}
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_collectivist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_collectivist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}

#Colonial Centralization
tech_colonial_centralization = {
	cost = @tier1cost4
	area = society
	tier = 1
	category = { new_worlds }
	prerequisites = { "tech_planetary_unification" }
	weight = @tier1weight4
	
	# unlocks Planetary Capital
	# unlocks production-targets edict
	
	modifier = {
		influence_gain_add = 1
	}
	
	weight_modifier = {
		factor = 4
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
	}
	
	ai_weight = {
		factor = 10
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_new_worlds"
			}
		}
	}
}

#Galactic Administration
tech_galactic_administration = {
	cost = @tier2cost2
	area = society
	tier = 2
	category = { statecraft }
	prerequisites = { "tech_colonial_centralization" }
	weight = @tier2weight2
	
	# unlocks Empire Capital-Complex, advanced government forms
	prereqfor_desc = {
		government = {
			title = "TECH_UNLOCK_ADVANCED_GOVERNMENT_FORMS_TITLE"
			desc = "TECH_UNLOCK_ADVANCED_GOVERNMENT_FORMS_DESC"
		}
	}
	
	modifier = {
		influence_gain_add = 1
	}
	
	weight_modifier = {
		factor = 4
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
	
	ai_weight = {
		factor = 10
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}

tech_galactic_markets = {
	cost = @tier2cost3
	area = society
	tier = 2
	category = { statecraft }
	prerequisites = { "tech_galactic_administration" }
	weight = @tier2weight3
	is_rare = yes
	
	# unlocks Galactic Stock Exchange empire wonder
	
	weight_modifier = {
		modifier = {
			factor = 0.25
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_statecraft"
				}
			}
		}
		modifier = {
			factor = 0
			NOT = {
				OR = {
					has_ethic = ethic_individualist
					has_ethic = ethic_fanatic_individualist
				}
			}
		}
		modifier = {
			factor = 2
			has_ethic = ethic_fanatic_individualist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
		modifier = {
			factor = 0
			num_communications < 2
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 2
			has_ethic = ethic_fanatic_individualist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}

#Hyper-Entertainment Forum
tech_hyper_entertainment_forum = {
	cost = @tier2cost1
	area = society
	tier = 2
	category = { statecraft }
	prerequisites = { "tech_colonial_centralization" }
	weight = @tier2weight1
	is_rare = yes
	
	# unlocks Hyper-Entertainment planet wonder
	
	weight_modifier = {
		modifier = {
			factor = 0
			NOT = {
				OR = {
					has_ethic = ethic_individualist
					has_ethic = ethic_fanatic_individualist
				}
			}
		}
		modifier = {
			factor = 3
			OR = {
				has_ethic = ethic_individualist
				has_ethic = ethic_fanatic_individualist
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 3
			OR = {
				has_ethic = ethic_individualist
				has_ethic = ethic_fanatic_individualist
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}

#Galactic Benevolence
tech_galactic_benevolence = {
	cost = @tier2cost2
	area = society
	tier = 2
	category = { statecraft }	
	prerequisites = { "tech_galactic_administration" }
	weight = @tier2weight2
	is_rare = yes
	
	# unlocks Ministry of Benevolence empire wonder
	
	weight_modifier = {
		modifier = {
			factor = 0.50
			NOT = {
				research_leader = {
					area = society
					has_trait = "leader_trait_expertise_statecraft"
				}
			}
		}
		modifier = {
			factor = 0
			NOT = {
				OR = {
					has_ethic = ethic_collectivist
					has_ethic = ethic_fanatic_collectivist
				}
			}
		}
		modifier = {
			factor = 3
			OR = {
				has_ethic = ethic_collectivist
				has_ethic = ethic_fanatic_collectivist
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 3
			has_ethic = ethic_fanatic_collectivist
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}

#Adaptive Bureaucracy
tech_adaptive_bureaucracy = {
	cost = @tier1cost2
	area = society
	tier = 1
	category = { statecraft }
	prerequisites = { "tech_planetary_unification" }
	weight = @tier1weight2
	
	modifier = {
		country_leader_cap = 2
		edict_influence_cost = -0.15
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.5
			num_owned_planets < 2
		}
		modifier = {
			factor = 1.5
			num_owned_planets > 2
		}		
		modifier = {
			factor = 1.5
			num_owned_planets > 3
		}
		modifier = {
			factor = 1.5
			num_owned_planets > 4
		}	
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}
#Living State
tech_living_state = {
	cost = @tier2cost2
	area = society
	tier = 2
	category = { statecraft }
	prerequisites = { "tech_colonial_centralization" }
	weight = @tier2weight2
	
	modifier = {
		country_leader_cap = 2
		country_leader_pool_size = 1
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.5
			num_owned_planets < 5
		}	
		modifier = {
			factor = 1.5
			num_owned_planets > 5
		}		
		modifier = {
			factor = 1.5
			num_owned_planets > 6
		}
		modifier = {
			factor = 1.5
			num_owned_planets > 7
		}	
		modifier = {
			factor = 1.25
			OR = {
				has_ethic = ethic_collectivist
				has_ethic = ethic_fanatic_collectivist			
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}

#Collective Self
tech_collective_self = {
	cost = @tier3cost2
	area = society
	tier = 3
	category = { statecraft }
	prerequisites = { "tech_living_state" }
	weight = @tier3weight2
	
	modifier = {
		country_leader_cap = 2
		leader_influence_cost = -0.10
	}
	
	weight_modifier = {
		modifier = {
			factor = 0.5
			num_owned_planets < 7
		}	
		modifier = {
			factor = 1.5
			num_owned_planets > 8
		}		
		modifier = {
			factor = 1.5
			num_owned_planets > 9
		}
		modifier = {
			factor = 1.5
			num_owned_planets > 10
		}
		modifier = {
			factor = 1.5
			OR = {
				has_ethic = ethic_collectivist
				has_ethic = ethic_fanatic_collectivist			
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
		modifier = {
			factor = 0
			OR = {
				has_ethic = ethic_individualist
				has_ethic = ethic_fanatic_individualist	
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}

tech_ethical_equations = {
	cost = @tier1cost2
	area = society
	tier = 0
	category = { statecraft }
	start_tech = yes
	weight = @tier1weight2
	
	#unlocks slavery
	
	weight_modifier = {
		factor = 2
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
		modifier = {
			factor = 1.25
			has_ethic = ethic_collectivist
		}
		modifier = {
			factor = 2
			has_ethic = ethic_fanatic_collectivist
		}
		modifier = {
			factor = 0.05
			has_ethic = ethic_individualist
		}
		modifier = {
			factor = 0
			has_ethic = ethic_fanatic_individualist
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}

#Neural Implants
tech_neural_implants = {
	cost = @tier1cost4
	area = society
	tier = 1
	category = { statecraft }
	prerequisites = { "tech_ethical_equations" "tech_genome_mapping" }
	weight = @tier1weight4
	
	# unlocks slave processing plant, slave armies
	
	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_pop = { is_enslaved = yes }
		}
		modifier = {
			factor = 1.25
			OR = {
				has_ethic = ethic_collectivist
				has_ethic = ethic_fanatic_collectivist
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
		modifier = {
			factor = 0
			NOT = {
				has_policy_flag = slavery_allowed_all
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 3
			AND = {
				has_policy_flag = slavery_allowed_all
				any_owned_pop = { is_enslaved = yes }
			}
		}
		modifier = {
			factor = 1.25
			OR = {
				has_ethic = ethic_collectivist
				has_ethic = ethic_fanatic_collectivist
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}

# ##################
# Social Engineering
# ##################

#Artificial Moral Codes
tech_artificial_moral_codes = {
	cost = @tier2cost2
	area = society
	tier = 2
	category = { statecraft }
	weight = @tier2weight3
	
	modifier = {
		pop_resettlement_cost_mult = -0.1
	}
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}

#Synthetic Thought Patterns
tech_synthetic_thought_patterns = {
	cost = @tier2cost4
	area = society
	tier = 2
	category = { statecraft }
	is_rare = yes	
	prerequisites = { "tech_artificial_moral_codes" }
	weight = @tier2weight4
	
	modifier = {
		edict_influence_cost = -0.15
		pop_resettlement_cost_mult = -0.1
	}
	
	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_spark_of_genius"
			}
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}

#Will to Power
tech_will_to_power = {
	cost = @tier3cost3
	area = society
	tier = 3
	category = { statecraft }
	is_rare = yes	
	prerequisites = { "tech_synthetic_thought_patterns" }
	weight = @tier3weight3

	# unlocks spaceport-module: orbital mind control laser
	
	weight_modifier = {
		modifier = {
			factor = 0.20
			NOT = {
				OR = {
					has_ethic = ethic_collectivist
					has_ethic = ethic_fanatic_collectivist
				}
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_spark_of_genius"
			}
		}
		modifier = {
			factor = 5
			research_leader = {
				area = society
				has_trait = "leader_trait_maniacal"
			}
		}
	}
	
	ai_weight = {
		factor = 3 #rare tech
		modifier = {
			factor = 1.25
			research_leader = {
				area = society
				has_trait = "leader_trait_expertise_statecraft"
			}
		}
	}
}


# ##################
# Other
# ##################

