######################
### NSC TECH COSTS ###
######################

@tier1cost4 = 3500
@tier2cost4 = 7000
@tier3cost4 = 14000
@tier4cost4 = 28000
@tier5cost4 = 56000

@tier6cost1 = 60000
@tier6cost2 = 64000
@tier6cost3 = 68000
@tier6cost4 = 72000

@tier7cost1 = 76000
@tier7cost2 = 80000
@tier7cost3 = 84000
@tier7cost4 = 88000




####################################################################################################################################################################
### SHIP HULLS & UPGRADES ##########################################################################################################################################
####################################################################################################################################################################

tech_pd_frigate_1 = {
	cost = @tier2cost2
	area = engineering
	tier = 2
	category = { voidcraft }
	prerequisites = { "tech_cruisers" }
	weight = @tier2weight1

	potential = {
		country_uses_bio_ships = no
	}
	
	gateway = ship
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_PD_FRIGATE_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_PD_FRIGATE_CONSTRUCTION_DESC"
		}
	}
	
	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_pd_frigate_1 }
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}

	technology_swap = {
		name = tech_nsc_space_fauna_pd
		inherit_icon = no
		inherit_effects = no

		trigger = {
			is_beastmasters_empire = yes
		}

		modifier = {
			weapon_type_point_defense_weapon_damage_mult = 0.1
			weapon_type_point_defense_weapon_fire_rate_mult = 0.1
		}
	}
}

tech_StrikeCruiser_1 = {
	cost = @tier3cost2
	area = engineering
	tier = 3
	category = { voidcraft }
	prerequisites = { "tech_cruisers" }
	weight = @tier3weight3

	potential = {
		country_uses_bio_ships = no
	}
	
	gateway = ship
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_STRIKECRUISER_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_STRIKECRUISER_CONSTRUCTION_DESC"
		}
	}
	
	modifier = {
		command_limit_add = 10
		country_naval_cap_add = 20
	}
	
	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_StrikeCruiser_1 }
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}
}

tech_Battlecruiser_1 = {
	cost = @tier3cost4
	area = engineering
	tier = 3
	category = { voidcraft }
	prerequisites = { "tech_cruisers" }
	weight = @tier3weight1

	potential = {
		country_uses_bio_ships = no
	}
	
	gateway = ship
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_BATTLECRUISER_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_BATTLECRUISER_CONSTRUCTION_DESC"
		}
	}
	
	modifier = {
		command_limit_add = 10
		country_naval_cap_add = 20
	}
	
	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_Battlecruiser_1 }
		}   
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}
}

tech_escortcarrier_1 = {
	cost = @tier3cost3
	area = engineering
	tier = 2
	category = { voidcraft }
	prerequisites = { "tech_cruisers" }
	weight = @tier2weight1

	potential = {
		country_uses_bio_ships = no
	}
	
	gateway = ship

	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_ESCORTCARRIER_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_ESCORTCARRIER_CONSTRUCTION_DESC"
		}
	}

	modifier = {
		command_limit_add = 10
		country_naval_cap_add = 20
	}
	
	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_escortcarrier_1 }
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}
}

tech_Carrier_1 = {
	cost = @tier4cost1
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_battleships" }
	weight = @tier4weight3

	potential = {
		country_uses_bio_ships = no
	}
	
	gateway = ship

	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_CARRIER_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_CARRIER_CONSTRUCTION_DESC"
		}
	}
	
	modifier = {
		command_limit_add = 10
		country_naval_cap_add = 20
	}
	
	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_Carrier_1 }
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}
}

tech_heavycarrier_1 = {
	cost = @tier4cost2
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_Carrier_1" }
	weight = @tier4weight1

	potential = {
		country_uses_bio_ships = no
	}
	
	gateway = ship
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_HEAVYCARRIER_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_HEAVYCARRIER_CONSTRUCTION_DESC"
		}
	}
	
	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_heavycarrier_1 }
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}

	technology_swap = {
		name = tech_nsc_space_fauna_strikecraft_2
		inherit_icon = no
		inherit_effects = no

		trigger = {
			is_beastmasters_empire = yes
		}

		modifier = {
			weapon_type_strike_craft_weapon_damage_mult = 0.05
			weapon_type_strike_craft_weapon_fire_rate_mult = 0.05
		}
	}
}

tech_supercarrier_1 = {
	cost = @tier4cost3
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_heavycarrier_1" }
	weight = @tier4weight1

	potential = {
		country_uses_bio_ships = no
	}
	
	gateway = ship
	
	prereqfor_desc = {
		hide_prereq_for_desc = component
		ship = {
			title = "TECH_UNLOCK_SUPERCARRIER_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_SUPERCARRIER_CONSTRUCTION_DESC"
		}
	}
	
	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_supercarrier_1 }
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}

	technology_swap = {
		name = tech_nsc_space_fauna_strikecraft_3
		inherit_icon = no
		inherit_effects = no

		trigger = {
			is_beastmasters_empire = yes
		}

		modifier = {
			weapon_type_strike_craft_weapon_damage_mult = 0.05
			weapon_type_strike_craft_weapon_fire_rate_mult = 0.05
		}
	}
}

tech_spitfire_1 = {
	cost = @tier4cost1
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_battleships" }
	weight = @tier3weight1

	potential = {
		country_uses_bio_ships = no
	}
	
	gateway = ship
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_SPITFIRE_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_SPITFIRE_CONSTRUCTION_DESC"
		}
	}
	
	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_spitfire_1 }
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}

	technology_swap = {
		name = tech_nsc_space_fauna_spitfire_1
		inherit_icon = no
		inherit_effects = no

		trigger = {
			is_beastmasters_empire = yes
		}

		modifier = {
			gunship_weapon_damage_mult = 0.05
			gunship_weapon_fire_rate_mult = 0.05
		}
	}
}

tech_Dreadnought_1 = {
	cost = @tier4cost4
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_battleships" }
	weight = @tier4weight3

	potential = {
		country_uses_bio_ships = no
	}
	
	gateway = ship

	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_DREADNOUGHT_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_DREADNOUGHT_CONSTRUCTION_DESC"
		}
	}
	
	modifier = {
		command_limit_add = 10
		country_naval_cap_add = 20
	}
	
	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_Dreadnought_1 }
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}
}

tech_Flagship_1 = {
	cost = @tier5cost4
	area = engineering
	tier = 5
	category = { voidcraft }
	is_rare = yes
	weight = @tier5weight3

	potential = {
		country_uses_bio_ships = no
        OR = {
            AND = {
                NOT = { host_has_dlc = "Apocalypse" }
                has_technology = tech_Dreadnought_1
            }
            AND = {
                host_has_dlc = "Apocalypse"
                has_technology = tech_titans
            }
        }
    }
	
	gateway = ship

	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_FLAGSHIP_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_FLAGSHIP_CONSTRUCTION_DESC"
		}
	}
	
	modifier = {
		command_limit_add = 50
		country_naval_cap_add = 200
	}
	
	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_Flagship_1 }
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_Flagship_1
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}
}

tech_supportcruiser_1 = {
	cost = @tier4cost4
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_battleships" }
	weight = @tier4weight3

	potential = {
		country_uses_bio_ships = no
	}
	
	gateway = ship

	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_SUPPORTSHIP_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_SUPPORTSHIP_CONSTRUCTION_DESC"
		}
	}
	
	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_supportcruiser_1 }
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}
}

tech_explorationship_1 = {
	cost = @tier2cost2
	area = engineering
	tier = 2
	category = { voidcraft }
	prerequisites = { "tech_destroyers" }
	weight = 90

	potential = {
		country_uses_bio_ships = no
	}
	
	gateway = ship

	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_EXPLORATIONSHIP_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_EXPLORATIONSHIP_CONSTRUCTION_DESC"
		}
	}
	
	weight_modifier = {	
		modifier = {
			factor = 1.25
			has_tradition = tr_supremacy_adopt
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}
}

tech_explorationship_2 = {
	cost = @tier2cost4
	area = engineering
	tier = 2
	category = { voidcraft }
	prerequisites = { "tech_explorationship_1" "tech_cruisers" }
	weight = 80

	potential = {
		country_uses_bio_ships = no
	}
	
	gateway = ship

	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_EXPLORATIONSHIP2_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_EXPLORATIONSHIP2_CONSTRUCTION_DESC"
		}
	}
	
	modifier = {
		command_limit_add = 10
		country_naval_cap_add = 20
	}

	weight_modifier = {
		modifier = {
			factor = 0.1
			years_passed < 20
		}	
		modifier = {
			factor = 1.25
			has_tradition = tr_supremacy_adopt
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}
}

tech_explorationship_3 = {
	cost = @tier3cost3
	area = engineering
	tier = 3
	category = { voidcraft }
	prerequisites = { "tech_explorationship_2" "tech_battleships" }
	weight = 60

	potential = {
		country_uses_bio_ships = no
	}
	
	gateway = ship

	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_EXPLORATIONSHIP3_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_EXPLORATIONSHIP3_CONSTRUCTION_DESC"
		}
	}

	weight_modifier = {
		modifier = {
			factor = 0.1
			years_passed < 40
		}	
		modifier = {
			factor = 1.25
			has_tradition = tr_supremacy_adopt
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}
}

tech_explorationship_4 = {
	cost = @tier4cost4
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_explorationship_3" "tech_Dreadnought_1" }
	weight = 60

	potential = {
		country_uses_bio_ships = no
	}
	
	gateway = ship

	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_EXPLORATIONSHIP4_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_EXPLORATIONSHIP4_CONSTRUCTION_DESC"
		}
	}

	weight_modifier = {
		modifier = {
			factor = 0.1
			years_passed < 60
		}	
		modifier = {
			factor = 1.25
			has_tradition = tr_supremacy_adopt
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}
}




####################################################################################################################################################################
### STARBASE MODULES/BUILDINGS #####################################################################################################################################
####################################################################################################################################################################

tech_drydock_1 = {
	cost = @tier3cost1
	area = engineering
	tier = 3
	is_rare = yes
	category = { voidcraft }
	prerequisites = { "tech_starbase_2" }
	weight = @tier3weight1	
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_DRYDOCK_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_DRYDOCK_CONSTRUCTION_DESC"
		}
	}
	
	weight_modifier = {
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_drydock_1
		}
	}
	
	ai_weight = { factor = @ai_starbase_types_factor }
}

tech_sensorstation_1 = {
	cost = @tier2cost1
	area = engineering
	tier = 2
	is_rare = yes
	category = { voidcraft }
	prerequisites = { "tech_sensors_4" }
	weight = @tier2weight1
	
	weight_modifier = {	
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_sensorstation_1 }
		}
		modifier = {
			factor = 1.5
			is_specialist_subject_type = { TYPE = bulwark }
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_sensorstation_1
		}
	}
	
	ai_weight = { factor = @ai_starbase_types_factor }
}

tech_starbase_6 = {
	cost = @tier5cost3
	area = engineering
	tier = 5
	category = { voidcraft }
	prerequisites = { "tech_starbase_5" }
	weight = @tier5weight3
		
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_STRONGHOLD_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_STRONGHOLD_CONSTRUCTION_DESC"
		}
	}
	
	weight_modifier = {	
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_starbase_6 }
        }
		modifier = {
			factor = 1.5
			is_specialist_subject_type = { TYPE = bulwark }
		}
		
	}
	
	ai_weight = { factor = @ai_starbase_types_factor }
}

tech_starbase_7 = {
	cost = @tier5cost3
	area = engineering
	tier = 5
	category = { voidcraft }
	prerequisites = { "tech_starbase_6" }
	weight = @tier5weight3
		
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_HEADQUARTERS_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_HEADQUARTERS_CONSTRUCTION_DESC"
		}
	}
	
	weight_modifier = {	
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_starbase_6 }
        }
		modifier = {
			factor = 1.5
			is_specialist_subject_type = { TYPE = bulwark }
		}	
	}
	
	ai_weight = { factor = @ai_starbase_types_factor }
}

tech_space_defense_station_2 = {
	cost = @tier3cost3
	area = engineering
	tier = 3
	category = { voidcraft }
	prerequisites = { "tech_starbase_2" }
	weight = @tier2weight3
		
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_DEFENSESTATION_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_DEFENSESTATION_CONSTRUCTION_DESC"
		}
	}
	
	weight_modifier = {	
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_space_defense_station_2 }
		}
		modifier = {
			factor = 1.5
			is_specialist_subject_type = { TYPE = bulwark }
		}
	}
	
	ai_weight = { factor = @ai_starbase_types_factor }
}

tech_space_defense_station_3 = {
	cost = @tier4cost3
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_starbase_3" "tech_space_defense_station_2" }
	weight = @tier2weight3
		
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_DEFENSEFORTRESS_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_DEFENSEFORTRESS_CONSTRUCTION_DESC"
		}
	}
	
	weight_modifier = {	
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_space_defense_station_3 }
		}
		modifier = {
			factor = 1.5
			is_specialist_subject_type = { TYPE = bulwark }
		}
	}
	
	ai_weight = { factor = @ai_starbase_types_factor }
}

tech_mining_base = {
	cost = @tier3cost2
	area = engineering
	tier = 3
	is_rare = yes
	category = { voidcraft }
	prerequisites = { "tech_mineral_purification_1" }
	weight = @tier3weight1
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_MINING_BASE_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_MINING_BASE_CONSTRUCTION_DESC"
		}
	}
	
	weight_modifier = {
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_mining_base
		}
		modifier = {
			factor = 1.5
			is_specialist_subject_type = { TYPE = prospectorium }
		}
	}
	
	ai_weight = { factor = @ai_starbase_types_factor }
}

tech_power_station = {
	cost = @tier3cost2
	area = physics
	tier = 3
	is_rare = yes
	category = { voidcraft }
	prerequisites = { "tech_power_hub_1" }
	weight = @tier3weight1
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_POWER_STATON_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_POWER_STATON_CONSTRUCTION_DESC"
		}
	}
	
	weight_modifier = {
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_power_station
		}
		modifier = {
			factor = 1.5
			is_specialist_subject_type = { TYPE = prospectorium }
		}
	}
	
	ai_weight = { factor = @ai_starbase_types_factor }
}




####################################################################################################################################################################
### REACTORS #######################################################################################################################################################
####################################################################################################################################################################

tech_graviton_power = {
	area = physics
	cost = @tier6cost1
	tier = 5
	category = { particles }
	ai_update_type = military
	prerequisites = { 
		OR = {
			tech_zero_point_power
			tech_bio_dark_matter_power_core
		} 	
	}
	weight = @tier3weight3
	
	gateway = power_generation
	
	prereqfor_desc = {
		hide_prereq_for_desc = component
		custom = {
			title = "TECH_UNLOCK_GRAVITON_POWER_TITLE"
			desc = "TECH_UNLOCK_GRAVITON_POWER_DESC"
		}
	}
	weight_modifier = {
		factor = 1.5
		modifier = {
			factor = 2
			has_technology = tech_starbase_5
		}	
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_graviton_power }
		}
	}
	
	ai_weight = {
		factor = 100
	}
}

tech_naquadria_power = {
	area = physics
	cost = @tier6cost2
	tier = 5
	category = { particles }
	ai_update_type = military
	prerequisites = { "tech_graviton_power" }
	weight = @tier3weight3
	
	gateway = power_generation
	
	prereqfor_desc = {
		hide_prereq_for_desc = component
		custom = {
			title = "TECH_UNLOCK_NAQUADRIA_POWER_TITLE"
			desc = "TECH_UNLOCK_NAQUADRIA_POWER_DESC"
		}
	}
	
	weight_modifier = {
		factor = 1.5
		modifier = {
			factor = 3
			has_technology = tech_starbase_5
		}	
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_naquadria_power }
		}
	}
	
	ai_weight = {
		factor = 100
	}
}

tech_singularity_power = {
	area = physics
	cost = @tier6cost3
	tier = 5
	category = { particles }
	ai_update_type = military	
	prerequisites = { "tech_naquadria_power" } 
	weight = @tier3weight3
	
	gateway = power_generation
	
	prereqfor_desc = {
		hide_prereq_for_desc = component
		custom = {
			title = "TECH_UNLOCK_SINGULARITY_POWER_TITLE"
			desc = "TECH_UNLOCK_SINGULARITY_POWER_DESC"
		}
	}
	
	weight_modifier = {
		factor = 1.5
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_singularity_power }
		}
		modifier = {
			factor = 3
			has_technology = tech_battleships
		}	
	}
	
	ai_weight = {
		factor = 100
	}
}

tech_multidimensional_power = {
	area = physics
	cost = @tier6cost4
	tier = 5
	category = { particles }
	ai_update_type = military
	prerequisites = { "tech_singularity_power" }
	weight = @tier3weight3
	
	gateway = power_generation
	
	prereqfor_desc = {
		hide_prereq_for_desc = component
		custom = {
			title = "TECH_UNLOCK_MULTIDIMENSIONAL_POWER_TITLE"
			desc = "TECH_UNLOCK_MULTIDIMENSIONAL_POWER_DESC"
		}
	}
	
	weight_modifier = {
		factor = 1.5
		modifier = {
			factor = 3
			has_technology = tech_battleships
		}	
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_multidimensional_power }
		}
	}
	
	ai_weight = {
		factor = 100
	}
}

tech_optimized_enigmatic_power = {
	area = physics
	cost = @tier7cost1
	tier = 5
	category = { particles }
	is_rare = yes
	ai_update_type = military
	prerequisites = { "tech_dark_matter_power_core" "tech_multidimensional_power" }
	weight = @tier5weight3
	
	gateway = power_generation
	
	prereqfor_desc = {
		hide_prereq_for_desc = component
		custom = {
			title = "TECH_UNLOCK_OPTIMIZED_ENIGMATIC_POWER_TITLE"
			desc = "TECH_UNLOCK_OPTIMIZED_ENIGMATIC_POWER_DESC"
		}
	}
	
	weight_modifier = {
		factor = 1.5
		modifier = {
			factor = 5
			has_technology = tech_dark_matter_power_core
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_optimized_enigmatic_power
		}
	}
	
	ai_weight = {
		factor = 100
	}
}

tech_bh_power_2 = {
	area = physics
	cost = @tier5cost2
	tier = 5
	category = { particles }
	is_rare = yes
	ai_update_type = military
	prerequisites = { "tech_Flagship_1" }
	weight = @tier5weight2
	
	gateway = power_generation
	
	prereqfor_desc = {
		hide_prereq_for_desc = component
		custom = {
			title = "TECH_UNLOCK_BH_POWER_TITLE"
			desc = "TECH_UNLOCK_BH_POWER_DESC"
		}
	}
	
	weight_modifier = {
		factor = 1.5
		modifier = {
			factor = 5
			has_technology = tech_dark_matter_power_core
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_bh_power_2
		}
	}
	
	ai_weight = {
		factor = 100
	}
}

tech_bh_power_3 = {
	area = physics
	cost = @tier5cost3
	tier = 5
	category = { particles }
	is_rare = yes
	ai_update_type = military
	prerequisites = { "tech_bh_power_2" }
	weight = @tier5weight3
	
	gateway = power_generation
	
	prereqfor_desc = {
		hide_prereq_for_desc = component
		custom = {
			title = "TECH_UNLOCK_BH_POWER_TITLE"
			desc = "TECH_UNLOCK_BH_POWER_DESC"
		}
	}
	
	weight_modifier = {
		factor = 1.5
		modifier = {
			factor = 5
			has_technology = tech_bh_power_3
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_bh_power_3
		}
	}
	
	ai_weight = {
		factor = 100
	}
}




####################################################################################################################################################################
### REACTOR BOOSTERS ###############################################################################################################################################
####################################################################################################################################################################

tech_nsc_reactor_boosters_1 = {
	area = physics
	cost = @tier4cost1
	tier = 4
	category = { particles }
	ai_update_type = military
	prerequisites = { "tech_reactor_boosters_3" "tech_graviton_power" }
    weight = @tier4weight1

	weight_modifier = {
		factor = 1.5
	}
	
	ai_weight = {
		factor = @energy_grid_ai_factor
	}
}

tech_nsc_reactor_boosters_2 = {
	area = physics
	cost = @tier4cost2
	tier = 4
	category = { particles }
	ai_update_type = all
	prerequisites = { "tech_nsc_reactor_boosters_1" "tech_naquadria_power" }
	weight = @tier4weight2
	
	weight_modifier = {
		factor = 1.5
	}
	
	ai_weight = {
		factor = @energy_grid_ai_factor
	}
}

tech_nsc_reactor_boosters_3 = {
	area = physics
	cost = @tier4cost3
	tier = 4
	category = { particles }
	ai_update_type = all
	prerequisites = { "tech_singularity_power" "tech_nsc_reactor_boosters_2" }
	weight = @tier4weight3
	
	weight_modifier = {
		factor = 1.5
	}
	
	ai_weight = {
		factor = @energy_grid_ai_factor
	}
}




####################################################################################################################################################################
### BATTLECRUISER UPGRADES #########################################################################################################################################
####################################################################################################################################################################

tech_battlecruiser_build_speed = {
	cost = @tier4cost1
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_Battlecruiser_1" }
	weight = @tier4weight2
	
	modifier = {
		shipsize_Battlecruiser_build_speed_mult = 0.25
		ship_Battlecruiser_cost_mult = -0.05
	}
	
	weight_modifier = {}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}

	technology_swap = {
		name = tech_nsc_large_space_fauna_speed_1
		inherit_icon = no
		inherit_effects = no

		trigger = {
			is_beastmasters_empire = yes
		}

		modifier = {
			large_space_fauna_ship_cost_mult = -0.05
			large_space_fauna_build_speed_mult = 0.1
		}
	}
}

tech_battlecruiser_hull_1 = {
	cost = @tier4cost3
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_Battlecruiser_1" }
	weight = @tier4weight3
	
	modifier = { shipsize_Battlecruiser_hull_mult = 0.1 }
	
	weight_modifier = {}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}

	technology_swap = {
		name = tech_nsc_large_space_fauna_hull_1
		inherit_icon = no
		inherit_effects = no

		trigger = {
			is_beastmasters_empire = yes
		}

		modifier = {
			large_space_fauna_ship_hull_mult = 0.05
		}
	}
}

tech_battlecruiser_hull_2 = {
	cost = @tier5cost1
	area = engineering
	tier = 4
	is_rare = yes
	category = { voidcraft }
	prerequisites = { "tech_battlecruiser_hull_1" }
	weight = @tier4weight3
	
	modifier = { shipsize_Battlecruiser_hull_mult = 0.1 }
	
	weight_modifier = {
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_battlecruiser_hull_2
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}

	technology_swap = {
		name = tech_nsc_large_space_fauna_hull_2
		inherit_icon = no
		inherit_effects = no

		trigger = {
			is_beastmasters_empire = yes
		}

		modifier = {
			large_space_fauna_ship_hull_mult = 0.05
		}
	}
}




####################################################################################################################################################################
### CARRIER UPGRADES ###############################################################################################################################################
####################################################################################################################################################################

tech_carrier_build_speed = {
	cost = @tier4cost2
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_Carrier_1" }
	weight = @tier4weight2
	
	modifier = {
		shipsize_Carrier_build_speed_mult = 0.25
		ship_Carrier_cost_mult = -0.05
	}
	
	weight_modifier = {}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}

	technology_swap = {
		name = tech_nsc_space_fauna_strikecraft_1
		inherit_icon = no
		inherit_effects = no

		trigger = {
			is_beastmasters_empire = yes
		}

		modifier = {
			weapon_type_strike_craft_weapon_damage_mult = 0.05
			weapon_type_strike_craft_weapon_fire_rate_mult = 0.05
		}
	}
}

tech_carrier_hull_1 = {
	cost = @tier4cost3
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_Carrier_1" }
	weight = @tier4weight3
	
	modifier = { 
		shipsize_Carrier_hull_mult = 0.1
	}
	
	weight_modifier = {}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}

	technology_swap = {
		name = tech_nsc_space_fauna_shield_1
		inherit_icon = no
		inherit_effects = no

		trigger = {
			is_beastmasters_empire = yes
		}

		modifier = {
			space_fauna_ship_shield_mult = 0.1
		}
	}
}

tech_carrier_hull_2 = {
	cost = @tier5cost1
	area = engineering
	tier = 5
	is_rare = yes
	category = { voidcraft }
	prerequisites = { "tech_carrier_hull_1" }
	weight = @tier5weight1
	
	modifier = { 
		shipsize_Carrier_hull_mult = 0.1
	}
	
	weight_modifier = {
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_carrier_hull_2
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}

	technology_swap = {
		name = tech_nsc_space_fauna_shield_2
		inherit_icon = no
		inherit_effects = no

		trigger = {
			is_beastmasters_empire = yes
		}

		modifier = {
			space_fauna_ship_shield_mult = 0.1
		}
	}
}




####################################################################################################################################################################
### DREADNOUGHT UPGRADES ###########################################################################################################################################
####################################################################################################################################################################

tech_dreadnought_build_speed = {
	cost = @tier5cost1
	area = engineering
	tier = 5
	category = { voidcraft }
	prerequisites = { "tech_Dreadnought_1" }
	weight = @tier5weight1
	
	modifier = {
		shipsize_Dreadnought_build_speed_mult = 0.25
		ship_Dreadnought_cost_mult = -0.05
	}
	
	weight_modifier = {
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_dreadnought_build_speed
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}

	technology_swap = {
		name = tech_nsc_space_fauna_firerate_1
		inherit_icon = no
		inherit_effects = no

		trigger = {
			is_beastmasters_empire = yes
		}

		modifier = {
			space_fauna_ship_fire_rate_mult = 0.1
		}
	}
}

tech_dreadnought_hull_1 = {
	cost = @tier5cost1
	area = engineering
	tier = 5
	category = { voidcraft }
	prerequisites = { "tech_Dreadnought_1" }
	weight = @tier5weight1
	
	modifier = { shipsize_Dreadnought_hull_mult = 0.1 }
	
	weight_modifier = {
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_dreadnought_hull_1
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}

	technology_swap = {
		name = tech_nsc_space_fauna_armor_1
		inherit_icon = no
		inherit_effects = no

		trigger = {
			is_beastmasters_empire = yes
		}

		modifier = {
			space_fauna_ship_armor_mult = 0.1
		}
	}
}

tech_dreadnought_hull_2 = {
	cost = @tier5cost2
	area = engineering
	tier = 5
	is_rare = yes
	category = { voidcraft }
	prerequisites = { "tech_dreadnought_hull_1" }
	weight = @tier5weight2
	
	modifier = { shipsize_Dreadnought_hull_mult = 0.1 }
	
	weight_modifier = {
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_dreadnought_hull_2
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}

	technology_swap = {
		name = tech_nsc_space_fauna_armor_2
		inherit_icon = no
		inherit_effects = no

		trigger = {
			is_beastmasters_empire = yes
		}

		modifier = {
			space_fauna_ship_armor_mult = 0.1
		}
	}
}




####################################################################################################################################################################
### FLAGSHIP UPGRADES ##############################################################################################################################################
####################################################################################################################################################################

tech_flagship_hull_1 = {
	cost = @tier5cost3
	area = engineering
	tier = 5
	category = { voidcraft }
	prerequisites = { "tech_Flagship_1" }
	weight = @tier5weight3
	
	modifier = { shipsize_Flagship_hull_mult = 0.1 }
	
	weight_modifier = {
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_flagship_hull_1
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}
}

tech_flagship_hull_2 = {
	cost = @tier5cost4
	area = engineering
	tier = 5
	is_rare = yes
	category = { voidcraft }
	prerequisites = { "tech_flagship_hull_1" }
	weight = @tier5weight3
	
	modifier = { shipsize_Flagship_hull_mult = 0.1 }
	
	weight_modifier = {
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_flagship_hull_2
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}
}



####################################################################################################################################################################
### STARBASE UPGRADES ##############################################################################################################################################
####################################################################################################################################################################

tech_stronghold_upgrades = {
	cost = @tier5cost4
	area = engineering
	tier = 5
	is_rare = yes
	category = { voidcraft }
	prerequisites = { "tech_starbase_6" }
	weight = @tier5weight3
	
	modifier = {
		starbase_upgrade_cost_mult = -0.1
		starbase_upgrade_speed_mult = 0.1
		starbases_upkeep_mult = -0.1
	}
	
	weight_modifier = {
		modifier = {
			factor = 1.5
			is_specialist_subject_type = { TYPE = bulwark }
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_stronghold_upgrades
		}
	}
	
	ai_weight = {
		factor = @ai_starbase_types_factor
	}
}

tech_defense_platforms_1 = {
	cost = @tier4cost2
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_starbase_4" }
	weight = @tier4weight1
	
	modifier = { starbase_defense_platform_capacity_add = 4 }
	
	weight_modifier = {
		modifier = {
			factor = 1.5
			is_specialist_subject_type = { TYPE = bulwark }
		}
	}
	
	ai_weight = {
		factor = @ai_starbase_types_factor
	}
}

tech_defense_platforms_2 = {
	cost = @tier4cost3
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_defense_platforms_1" "tech_starbase_5" }
	weight = @tier4weight2
	
	modifier = { starbase_defense_platform_capacity_add = 8 }
	
	weight_modifier = {
		modifier = {
			factor = 1.5
			is_specialist_subject_type = { TYPE = bulwark }
		}
	}
	
	ai_weight = {
		factor = @ai_starbase_types_factor
	}
}

tech_defense_platforms_3 = {
	cost = @tier4cost4
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_defense_platforms_2" "tech_starbase_6" }
	weight = @tier4weight3
	
	modifier = { starbase_defense_platform_capacity_add = 12 }
	
	weight_modifier = {
		modifier = {
			factor = 1.5
			is_specialist_subject_type = { TYPE = bulwark }
		}
	}
	
	ai_weight = {
		factor = @ai_starbase_types_factor
	}
}

tech_defense_platforms_4 = {
	cost = @tier5cost1
	area = engineering
	tier = 5
	category = { voidcraft }
	prerequisites = { "tech_defense_platforms_3" "tech_starbase_7" }
	weight = @tier5weight1
	
	modifier = { starbase_defense_platform_capacity_add = 16 }
	
	weight_modifier = {
		modifier = {
			factor = 1.5
			is_specialist_subject_type = { TYPE = bulwark }
		}
	}
	
	ai_weight = {
		factor = @ai_starbase_types_factor
	}
}




####################################################################################################################################################################
### UPKEEP REDUCTION ###############################################################################################################################################
####################################################################################################################################################################

tech_ship_upkeep_1 = {
	cost = @tier4cost3
	area = engineering
	tier = 3
	category = { voidcraft }
	prerequisites = { "tech_Battlecruiser_1" }
	weight = @tier4weight2
	
	modifier = { ships_upkeep_mult = -0.20 }
	
	weight_modifier = {}
	
	ai_weight = {
		factor = @ai_starbase_types_factor
	}
}

tech_starbase_upkeep_1 = {
	cost = @tier4cost3
	area = engineering
	tier = 3
	category = { voidcraft }
	prerequisites = { "tech_starbase_4" }
	weight = @tier4weight2
	
	modifier = { starbases_upkeep_mult = -0.20 }
	
	weight_modifier = {
		modifier = {
			factor = 1.5
			is_specialist_subject_type = { TYPE = bulwark }
		}
	}
	
	ai_weight = {
		factor = @ai_starbase_types_factor
	}
}




####################################################################################################################################################################
### HYPERLANE MANIPULATION #########################################################################################################################################
####################################################################################################################################################################

tech_hyperlane_generation = {
	cost = @tier5cost3
	area = physics
	tier = 5
	category = { particles }
	is_rare = yes
	is_reverse_engineerable = no
	prerequisites = { "tech_mega_engineering" }
	weight = @tier5cost3
	
	prereqfor_desc = {
		custom = {
			title = "TECH_UNLOCK_HYPERLANE_GENERATION_TITLE"
			desc = "TECH_UNLOCK_HYPERLANE_GENERATION_DESC"
		}
	}

	weight_modifier = {
		factor = 0.5
		modifier = {
			factor = 1.25
			has_tradition = tr_discovery_adopt
		}
		modifier = {
			factor = 4
			owns_any_bypass = gateway
		}
	}
	
	ai_weight = {
		factor = 2
	}
}




####################################################################################################################################################################
### MISCELLANEOUS TECHS ############################################################################################################################################
####################################################################################################################################################################

tech_specialcomponents_1 = {
	cost = @tier2cost3
	area = engineering
	tier = 2
	category = { voidcraft }
	prerequisites = { "tech_cruisers" }
	weight = @tier2weight3
	
	gateway = ship
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_SPECIALCOMPONENTS_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_SPECIALCOMPONENTS_CONSTRUCTION_DESC"
		}
	}
	
	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_specialcomponents_1 }
		}	
		modifier = {
			factor = 0.1
			years_passed < 10
		}
		modifier = {
			factor = 1
			years_passed > 20
		}
		modifier = {
			factor = 2
			years_passed > 30
		}
		modifier = {
			factor = 3
			years_passed > 40
		}
		modifier = {
			factor = 4
			years_passed > 50
		}
	}
	
	ai_weight = {
		factor = @ai_ship_types_factor
	}
}

tech_nsc_ai_computer_1 = {
	cost = @tier5cost3
	area = engineering
	tier = 3
	category = { voidcraft }
	weight = @tier2weight3
	
	potential = {
		OR = {
			has_technology = tech_explorationship_1
			has_technology = tech_Carrier_1
			has_technology = tech_Flagship_1
			has_technology = tech_juggernaut
		}
    }
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_AICOMPUTER_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_AICOMPUTER_CONSTRUCTION_DESC"
		}
	}	

	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_nsc_ai_computer_1 }
		}	
		modifier = {
			factor = 0.1
			years_passed < 30
		}
		modifier = {
			factor = 10
			years_passed > 30
		}
	}
	
	ai_weight = {
		factor = 0
	}
}

tech_tomahawk_cruise_missile_1 = {
	cost = @tier4cost3
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_missiles_5" }
	weight = @tier4weight3
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_CRUISEMISSILE_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_CRUISEMISSILE_CONSTRUCTION_DESC"
		}
	}
	
	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_tomahawk_cruise_missile_1 }
		}
	}
	
	ai_weight = {
		factor = 10
		modifier = {
			factor = @favored_weapon_ai_tech_factor
			is_preferred_weapons = weapon_type_explosive
		}
		modifier = {
			factor = @disfavored_weapon_ai_tech_factor
			NOT = { is_preferred_weapons = weapon_type_explosive }
		}
	}
}

tech_galactic_mall = {
	cost = @tier5cost4
	area = society
	tier = 5
	category = { statecraft }
	prerequisites = { "tech_mega_engineering" }
	weight = @tier5weight3
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_GALACTIC_MALL_TITLE"
			desc = "TECH_UNLOCK_GALACTIC_MALL_DESC"
		}
	}

	potential = {
		country_uses_consumer_goods = yes
	}
	
	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_galactic_mall }
		}
	}
	
	ai_weight = {
		factor = @best_megastructure_ai_tech_factor
	}
}

tech_hospital = {
	cost = @tier5cost4
	area = society
	tier = 5
	category = { biology }
	prerequisites = { "tech_mega_engineering" }
	weight = @tier5weight3
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_HOPSITAL_TITLE"
			desc = "TECH_UNLOCK_HOSPITAL_DESC"
		}
	}
	
	weight_modifier = {
		modifier = {
			factor = 10
			any_neighbor_country = { has_technology = tech_hospital }
		}
	}
	
	ai_weight = {
		factor = @best_megastructure_ai_tech_factor
	}
}




####################################################################################################################################################################
### LOCKS & CHECKS #################################################################################################################################################
####################################################################################################################################################################

tech_nsc_dlc_check = {
	area = physics
	cost = 0
	Tier = 0
	start_tech = yes
	category = { particles }

	potential = { host_has_dlc = "Apocalypse" }
	
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_NSC_DLC_CONSTRUCTION_TITLE"
			desc = "TECH_UNLOCK_NSC_DLC_CONSTRUCTION_DESC"
		}
	}
	
	ai_weight = { factor = 0 }
}

tech_nsc_disabled_sections = {
	area = society
	cost = 0
	tier = 0
	category = { materials }
	ai_update_type = all
	weight = 0

	ai_weight = { factor = 0 }
	potential = { always = no }
}