
tr_nanotech_adopt = {
	possible = {
		custom_tooltip = {
			fail_text = REQUIRES_FINISHED_TRANSFORMATION
			has_country_flag = nanotech_traditions_unlocked
		}
	}
	custom_tooltip = tr_nanotech_adopt_modifier_desc
	unlocks_agenda = agenda_nanotech_unstoppable_swarm
	#Unlocks nanolab 1 and Starbase building
}

tr_nanotech_finish = {
	on_enabled = {
		hidden_effect = {
			country_event = { id = timeline.83 }
		}
	}
	custom_tooltip_with_modifiers = tr_nanotech_finish_modifier_desc

	modifier = {
		empire_size_colonies_mult = -0.5
		ascension_perks_add = 1
	}
}

tr_nanotech_1 = {
	custom_tooltip_with_modifiers = tr_nanotech_1_modifier_desc
	#Unlocks nanolab 2 and buffs nano research units
	modifier = {
		planet_farmers_food_produces_add = -1
		planet_farmers_nanites_produces_add = 0.2
		planet_miners_minerals_produces_add = -1
		planet_miners_nanites_produces_add = 0.2
	}
	ai_weight = {
		factor = 1000
	}
}

tr_nanotech_2 = {
	custom_tooltip = tr_nanotech_2_modifier_desc
	#Unlocks the Cauldron and the Nanite Transmutation Tech option
	on_enabled = {
		add_research_option = tech_nanite_transmutation
		add_tech_progress = {
			tech = tech_nanite_transmutation
			progress = 0.33
		}
	}
	ai_weight = {
		factor = 1000
	}
}

tr_nanotech_3 = {
	possible = {
		has_tradition = tr_nanotech_1
	}
	custom_tooltip = tr_nanotech_3_modifier_desc
	#Unlocks Starbase Building and Make Nanite World Decision
	ai_weight = {
		factor = 1000
	}
	tradition_swap = {
		name = tr_nanotech_3_nomad
		inherit_name = yes
		inherit_icon = yes
		trigger = {
			is_nomadic = yes
		}

		custom_tooltip = tr_nanotech_3_modifier_nomadic_desc
		weight = {
			factor = 1000
		}
	}
}

tr_nanotech_4 = {
	possible = {
		has_tradition = tr_nanotech_2
	}
	custom_tooltip = tr_nanotech_4_modifier_desc
	#Unlocks Nanite Swarmer ship and nanite ship component research options
	on_enabled = {
		add_research_option = tech_nanite_repair_system
		add_research_option = tech_nanite_autocannon
		add_research_option = tech_nanite_flak_batteries
		add_tech_progress = {
			tech = tech_nanite_repair_system
			progress = 0.25
		}
		add_tech_progress = {
			tech = tech_nanite_autocannon
			progress = 0.25
		}
		add_tech_progress = {
			tech = tech_nanite_flak_batteries
			progress = 0.25
		}
	}
	ai_weight = {
		factor = 1000
	}
}

tr_nanotech_5 = {
	possible = {
		has_tradition = tr_nanotech_3
		has_tradition = tr_nanotech_4
	}
	custom_tooltip_with_modifiers = tr_nanotech_5_modifier_desc
	#Unlocks the nanite edicts
	#Every 5 years, double the size of orbital nanite deposits that you're harvesting, up to a max of 50 OR spawns a number of nanite swarmers depending on the size of the deposit
	ai_weight = {
		factor = 1000
	}
}
