### This file contains techs that unlock new auxilar slot components and new auras

### tech costs
@tier3cost1 = 3000
@tier3cost2 = 4000
@tier3cost3 = 5000

@tier4cost1 = 6000
@tier4cost2 = 8000
@tier4cost3 = 10000

@tier5cost1 = 14000
@tier5cost2 = 17000
@tier5cost3 = 20000

### tech weights
@tier3weight1 = 65
@tier3weight2 = 60
@tier3weight3 = 50

@tier4weight1 = 45
@tier4weight2 = 40
@tier4weight3 = 35

@tier5weight1 = 30
@tier5weight2 = 25
@tier5weight3 = 20

############################################################
###                     TECHNOLOGIES                     ###
############################################################

############################################################
##             Empowered Maneuver Thrusters               ##
##             Unlocks auxiliary component                ##
############################################################

nhsc_tech_maneuverthrusters = {
	area = engineering
	category = { voidcraft }
	tier = 4
	cost = @tier4cost1
	weight = @tier4weight1
	prerequisites = { "nhsc_tech_centralresearchbureau" "tech_thrusters_4" }
	is_rare = yes

	weight_modifier = {
		factor = 1.25
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}

	ai_weight = {
		factor = 2
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
}

############################################################
##                     Repair Drones                      ##
##             Unlocks auxiliary component                ##
############################################################

nhsc_tech_repairdrones = {
	 area = engineering
	category = { materials }
	tier = 4
	cost = @tier4cost1
	weight = @tier4weight1
	prerequisites = { "nhsc_tech_centralresearchbureau" "tech_cruisers" }
	
	weight_modifier = {
		factor = 1.25
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_materials"
			}
		}
	}

	ai_weight = {
		factor = 2
		modifier = {
			factor = 1.25
			research_leader = {
				area = engineering
				has_trait = "leader_trait_expertise_materials"
			}
		}
	}
}

############################################################
##              Improved Shield Capacitors                ##
##             Unlocks auxiliary component                ##
############################################################

nhsc_tech_advshieldcapacitors = {
	area = physics
	category = { field_manipulation }
	tier = 4
	cost = @tier4cost1
	weight = @tier4weight1
	ai_update_type = all	
	prerequisites = { "nhsc_tech_centralresearchbureau" "tech_shield_rechargers_1" }
	is_rare = yes

	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
	
	ai_weight = {
		factor = 2
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
}

############################################################
##          Crystal-Infused Shield Capacitors             ##
##             Unlocks auxiliary component                ##
############################################################

nhsc_tech_crystalinfusedcapacitor = {
	area = physics
	category = { field_manipulation }
	tier = 4
	cost = @tier4cost1
	weight = @tier4weight1
	ai_update_type = all	
	prerequisites = { "tech_shield_rechargers_1" "tech_crystal_armor_1" }
	is_rare = yes

	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
	
	ai_weight = {
		factor = 2
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
}

############################################################
##          Crystal-Forged Shield Capacitors              ##
##             Unlocks auxiliary component                ##
############################################################

nhsc_tech_crystalforgedcapacitor = {
	area = physics
	category = { field_manipulation }
	tier = 4
	cost = @tier4cost1
	weight = @tier4weight1
	ai_update_type = all	
	prerequisites = { "tech_shield_rechargers_1" "tech_crystal_armor_2" }
	is_rare = yes

	weight_modifier = {
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
	
	ai_weight = {
		factor = 2
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
}

############################################################
##                Stellarite Power Core                   ##
##             Unlocks auxiliary component                ##
############################################################

nhsc_tech_stellarite_powercore = {
	area = physics
	category = { field_manipulation }
	tier = 4
	cost = @tier4cost1
	weight = @tier4weight1
	ai_update_type = all	
	prerequisites = { }
	is_rare = yes

	weight_modifier = {
		modifier = {
			factor = 0
			NOT = { has_country_flag = nhsc_killed_stellarite_devourer }
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
	
	ai_weight = {
		factor = 2
		modifier = {
			factor = 0
			NOT = { has_country_flag = nhsc_killed_stellarite_devourer }
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_field_manipulation"
			}
		}
	}
}

############################################################
##               Warhead Standardization                  ##
##             Unlocks auxiliary component                ##
############################################################

nhsc_tech_standardized_warheads = {
	area = engineering
	category = { voidcraft }
	tier = 4
	cost = @tier4cost1
	weight = @tier4weight1
	ai_update_type = all	
	prerequisites = { "nhsc_tech_centralresearchbureau" }

	weight_modifier = {
		modifier = {
			factor = 0
			is_country_type = default
			NOT = {    
				has_technology = "tech_missiles_5"
				has_technology = "tech_swarmer_missiles_2"
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
	
	ai_weight = {
		factor = 2
		modifier = {
			factor = 0
			is_country_type = default
			NOT = {    
				has_technology = "tech_missiles_5"
				has_technology = "tech_swarmer_missiles_2"
			}
		}
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_voidcraft"
			}
		}
	}
}

############################################################
##                 Psionic Reinforcement                  ##
##             Unlocks auxiliary component                ##
############################################################

nhsc_tech_psi_reinforcement = {
	area = society
	category = { psionics }
	tier = 5  
	cost = @tier5cost1
	weight = @tier5weight1
	ai_update_type = military
	prerequisites = { "tech_psionic_shield" "nhsc_tech_psiweapons" }
	is_rare = yes
	is_reverse_engineerable = no

	prereqfor_desc = {
		component = {
			title = "TECH_UNLOCK_PSIREINFORCEMENT_TITLE"
			desc = "TECH_UNLOCK_PSIREINFORCEMENT_DESC"
		}
	}

	weight_modifier = {
		modifier = {
			factor = 0.75
			NOR = {
				research_leader = {
					area = physics
					has_trait = "leader_trait_expertise_psionics"
				}
				research_leader = {
					area = physics
					has_trait = "leader_trait_curator"
				}
				research_leader = {
					area = physics
					has_trait = "leader_trait_spark_of_genius"
				}
				research_leader = {
					area = physics
					has_trait = "leader_trait_maniacal"
				}
			}		
		}
	}
	
	ai_weight = {
		factor = 2
		modifier = {
			factor = 1.25
			research_leader = {
				area = physics
				has_trait = "leader_trait_expertise_psionics"
			}
		}
	}

}

############################################################
##            Automatic Dreadnought Protocols             ##
##             Unlock special ship computer               ##
############################################################

nhsc_tech_dreadnought_computer = {
	area = physics
	category = { computing }
	tier = 4
	cost = @tier4cost1
	weight = @tier4weight1
	ai_update_type = all
	is_rare = yes
	
	prereqfor_desc = {
		hide_prereq_for_desc = component
		custom = {
			title = "NHSC_TECH_UNLOCK_DREADNOUGHT_COMPUTER_TITLE"
			desc = "NHSC_TECH_UNLOCK_DREADNOUGHT_COMPUTER_DESC"
		}
	}
	
	weight_modifier = {
		modifier = {
			factor = 0	### event tech
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 0	### only from debris
		}
	}
}

nhsc_tech_dreadnought_computer_nsc = {
	area = physics
	category = { computing }
	tier = 4
	cost = @tier4cost1
	weight = @tier4weight1
	ai_update_type = all
	is_rare = yes

	prereqfor_desc = {
		hide_prereq_for_desc = component
		custom = {
			title = "NHSC_TECH_UNLOCK_DREADNOUGHT_COMPUTER_TITLE"
			desc = "NHSC_TECH_UNLOCK_DREADNOUGHT_COMPUTER_DESC"
		}
	}

	weight_modifier = {
		modifier = {
			factor = 0	### event tech
		}
	}
	
	ai_weight = {
		modifier = {
			factor = 0	### only from debris
		}
	}
}