
tech_hyper_relays = {
	cost = @tier2cost3
	area = physics
	tier = 2
	category = { particles }
	is_rare = yes
	is_reverse_engineerable = no
	weight = @tier2weight3
	prerequisites = { OR = { "tech_f93_zro_drive_2" "tech_hyper_drive_2" } }

	potential = { has_overlord_dlc = yes }

	feature_flags = { hyper_relay_construction }

	weight_modifier = {
		factor = 0.5
		modifier = {
			factor = 0
			NOR = {
				has_technology = tech_mine_rare_crystals
				has_technology = tech_rare_crystals
				has_country_flag = has_market_access
			}
		}
		modifier = {
			factor = 0.2
			NOR = {
				has_trait_in_council = { TRAIT = leader_trait_expertise_particles }
				has_trait_in_council = { TRAIT = leader_trait_curator }
				has_trait_in_council = { TRAIT = leader_trait_spark_of_genius }
				has_trait_in_council = { TRAIT = leader_trait_spark_of_genius_2 }
				has_trait_in_council = { TRAIT = leader_trait_maniacal }
				has_trait_in_council = { TRAIT = leader_trait_maniacal_2 }
				has_trait_in_council = { TRAIT = leader_trait_maniacal_3 }
				has_seen_any_bypass = relay_bypass
			}
		}
		modifier = {
			factor = 2
			OR = {
				has_megastructure = hyper_relay
				has_megastructure = hyper_relay_ruined
				has_megastructure = hyper_relay_restored
			}
		}
		modifier = {
			factor = 1.25
			has_tradition = tr_expansion_finish
		}

		modifier = {
			factor = 1.5
			has_seen_any_bypass = relay_bypass
		}
		modifier = {
			factor = 1.25
			has_technology = tech_experimental_subspace_navigation
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_hyper_relays
		}
		modifier = {
			factor = @ap_grasp_the_void_travel_tech
			has_ascension_perk = ap_grasp_the_void
		}
		modifier = {
			factor = @eager_explorer_effect
			is_eager_explorer_empire = yes
		}
	}

	ai_weight = {
		factor = 4 #FTL techs are good

		modifier = {
			factor = 2
			is_ai = no #auto-research
		}
		modifier = {
			factor = 5 # Don't pass this up if you're the first to get the opportunity
			NOT = { has_seen_any_bypass = relay_bypass }
		}
	}
}
