############
#  星基技术
############

#天穹屏障
tech_starbase_6 = {
	cost = 40000
	area = engineering
	tier = 5
	category = { voidcraft }
	prerequisites = { "tech_starbase_5" }
	weight = @tier5weight2

    potential = {
        is_nomadic = no
    }

	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_STARBASE_1_TITLE"
			desc = "TECH_UNLOCK_STARBASE_1_DESC"
		}
	}

	weight_modifier = {
		modifier = {
			factor = 0.1
			NOT = { years_passed > 70 }
		}
		modifier = {
			factor = 10
			any_neighbor_country = {
				has_technology = tech_starbase_5
			}
		}
		modifier = {
			factor = 2
			years_passed > 90
		}
		modifier = {
			factor = 3
			years_passed > 95
		}
		modifier = {
			factor = 4
			years_passed > 100
		}
		modifier = {
			factor = 5
			count_starbase_sizes = {
				starbase_size = starbase_starfortress
				count >= 3
			}
		}
		modifier = {
			factor = 1.25
			has_tradition = tr_unyielding_adopt
		}
		modifier = {
			factor = 5
			has_modifier = agenda_impenetrable_border_finish
		}
	}	
	ai_weight = { factor = 100 }
}

#不落要塞
tech_starbase_7 = {
	cost = 50000
	area = engineering
	tier = 5
	category = { voidcraft }
	prerequisites = { "tech_starbase_6" }
	weight = @tier5weight3

    potential = {
        is_nomadic = no
    }

	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_STARBASE_2_TITLE"
			desc = "TECH_UNLOCK_STARBASE_2_DESC"
		}
	}
	weight_modifier = {
		modifier = {
			factor = 0.1
			NOT = { years_passed > 70 }
		}
		modifier = {
			factor = 10
			any_neighbor_country = {
				has_technology = tech_starbase_5
			}
		}
		modifier = {
			factor = 2
			years_passed > 90
		}
		modifier = {
			factor = 3
			years_passed > 95
		}
		modifier = {
			factor = 4
			years_passed > 100
		}
		modifier = {
			factor = 5
			count_starbase_sizes = {
				starbase_size = starbase_starfortress
				count >= 3
			}
		}
		modifier = {
			factor = 1.25
			has_tradition = tr_unyielding_adopt
		}
		modifier = {
			factor = 5
			has_modifier = agenda_impenetrable_border_finish
		}
	}
	ai_weight = { factor = 100 }
}

#叹息之墙
tech_starbase_8 = {
	cost = 60000
	area = engineering
	tier = 5
	category = { voidcraft }

    potential = {
        is_nomadic = no
		owner? = {
			has_ascension_perk = ap_galgxy_barrier
		}
	}

	weight = @tier5weight3		
	prereqfor_desc = {
		ship = {
			title = "TECH_UNLOCK_STARBASE_3_TITLE"
			desc = "TECH_UNLOCK_STARBASE_3_DESC"
		}
	}
	weight_modifier = {
		modifier = {
			factor = 0.1
			NOT = { years_passed > 70 }
		}
		modifier = {
			factor = 10
			any_neighbor_country = {
				has_technology = tech_starbase_5
			}
		}
		modifier = {
			factor = 2
			years_passed > 90
		}
		modifier = {
			factor = 3
			years_passed > 95
		}
		modifier = {
			factor = 4
			years_passed > 100
		}
		modifier = {
			factor = 5
			count_starbase_sizes = {
				starbase_size = starbase_starfortress
				count >= 3
			}
		}
		modifier = {
			factor = 1.25
			has_tradition = tr_unyielding_adopt
		}
		modifier = {
			factor = 5
			has_modifier = agenda_impenetrable_border_finish
		}
	}
	ai_weight = { factor = 100 }
}



############
#  专精技术
############
tech_shipyard_enhance = {
	cost = 24000
	area = engineering
	tier = 4
	category = { voidcraft }
	prerequisites = { "tech_starbase_6" }
	is_rare = yes
	weight = @tier4weight3

	weight_modifier = {	
		modifier = {
			factor = 1.25
            has_trait_in_council = { TRAIT = leader_trait_expertise_voidcraft }
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_synchronized_defences }
			}
		}
	}
	ai_weight = { factor = 100 }
}

tech_anchorage_enhance = {
	cost = 24000
	area = society
	tier = 4
	category = { military_theory }
	prerequisites = { "tech_interstellar_fleet_traditions" }
	weight = @tier4weight3
	is_rare = yes
	weight_modifier = {
		factor = 3
		modifier = {
			factor = 2
			is_militarist = yes
		}
		modifier = {
			factor = 1.25
            has_trait_in_council = { TRAIT = leader_trait_expertise_voidcraft }
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_synchronized_defences }
			}
		}
	}

	ai_weight = {
		factor = 3
		modifier = {
			factor = 2
			is_militarist = yes
		}
	}
}


############
#  建筑技术
############

tech_defense_enhance = {
	area = physics
	tier = 4
	cost = @tier4cost3
	category = { computing }
	ai_update_type = military
	prerequisites = { "tech_synchronized_defences" }
	is_rare = yes
	weight = @tier4weight3

	weight_modifier = {
		factor = 0.5
		modifier = {
			factor = 0.75
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 0.65
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 1.10
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.20
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor =1.2
			has_ascension_perk = ap_technological_ascendancy
		}
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_synchronized_defences }
			}
		}
	}

}

tech_phase_radar = {
	area = physics
	tier = 4
	cost = @tier4cost3
	category = { computing }
	is_rare = yes
	weight = @tier4weight3

	weight_modifier = {
		factor = 0.5
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_synchronized_defences }
			}
		}
	}

	ai_weight = {
		weight = 100
	}
}

tech_plasma_coldchain = {
	area = physics
	tier = 4
	cost = @tier4cost3
	category = { particles }
	ai_update_type = military
	is_rare = yes
	weight = @tier4weight3

	weight_modifier = {
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_synchronized_defences }
			}
		}
	}

	ai_weight = {
		weight = 100
	}
}

tech_particle_chaos = {
	area = physics
	tier = 4
	cost = @tier4cost3
	category = { particles }
	ai_update_type = military
	is_rare = yes
	weight = @tier4weight3

	weight_modifier = {
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_synchronized_defences }
			}
		}
	}

	ai_weight = {
		weight = 100
	}
}

tech_maintenance_center = {
	area = society
	tier = 4
	cost = @tier4cost3
	category = { military_theory }
	ai_update_type = military
	is_rare = yes
	weight = @tier4weight3

	weight_modifier = {
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_synchronized_defences }
			}
		}
	}

	ai_weight = {
		weight = 100
	}
}

tech_engineering_department = {
	area = engineering
	tier = 4
	cost = @tier4cost3
	category = { materials }
	ai_update_type = military
	is_rare = yes
	weight = @tier4weight3

	weight_modifier = {
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_synchronized_defences }
			}
		}
	}

	ai_weight = {
		weight = 100
	}
}



############
#  光环技术
############
tech_command_matrix_1 = {
	cost = @tier4cost3
	area = society
	tier = 4
	category = { military_theory }
	prerequisites = { "tech_command_matrix" }
	weight = @tier4weight3
	is_rare = yes

	modifier = {
		ship_fire_rate_mult = 0.10
	}

	weight_modifier = {
		factor = 3
		modifier = {
			factor = 2
			is_militarist = yes
		}

	}

	ai_weight = {
		modifier = {
			factor = 2
			is_militarist = yes
		}

	}
}

tech_disruption_field_enhance = {
	area = physics
	tier = 4
	cost = @tier4cost3
	category = { particles }
	ai_update_type = military
	is_rare = yes
	weight = @tier4weight3

	weight_modifier = {
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_synchronized_defences }
			}
		}
	}

	ai_weight = {
		weight = 100
	}
}

tech_gravity_edge = {
	area = physics
	tier = 4
	cost = @tier4cost3
	category = { particles }
	ai_update_type = military
	is_rare = yes
	weight = @tier4weight3

	weight_modifier = {
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_synchronized_defences }
			}
		}
	}

	ai_weight = {
		weight = 100
	}
}

tech_nebula_fluctuator = {
	area = physics
	tier = 4
	cost = @tier4cost3
	category = { particles }
	ai_update_type = military
	is_rare = yes
	weight = @tier4weight3

	weight_modifier = {
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_synchronized_defences }
			}
		}
	}

	ai_weight = {
		weight = 100
	}
}

tech_gravity_beacon = {
	area = physics
	tier = 4
	cost = @tier4cost3
	category = { particles }
	ai_update_type = military
	is_rare = yes
	weight = @tier4weight3

	weight_modifier = {
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_synchronized_defences }
			}
		}
	}

	ai_weight = {
		weight = 100
	}
}

tech_subspace_energy = {
	area = physics
	tier = 4
	cost = @tier4cost3
	category = { particles }
	ai_update_type = military

	prerequisites = {
		"tech_mine_zro"
	}
	is_rare = yes
	weight = @tier4weight3

	weight_modifier = {
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_synchronized_defences }
			}
		}
	}

	ai_weight = {
		weight = 100
	}
}


#稀有科技
tech_build_boost = {
	area = engineering
	tier = 4
	cost = @tier4cost3
	category = { materials }
	ai_update_type = military
	is_rare = yes
	weight = @tier4weight3

	modifier = {
		starbase_upgrade_speed_mult = 0.50
	}
	weight_modifier = {
		modifier = {
			factor = @federation_perk_factor
			has_federation = yes
			federation = {
				has_federation_perk = rare_tech_boost
				any_member = { has_technology = tech_synchronized_defences }
			}
		}
	}

	ai_weight = {
		weight = 100
	}
}