tr_rg_nanotech_adopt = {
	possible = {
		custom_tooltip = {
			fail_text = REQUIRES_lgate_or_gray
			OR = {
				has_country_flag = origin_rg_gray
				has_country_flag = gray_owner
				AND = {
					has_event_chain = l_cluster_chain
					has_technology = tech_lgate_activation
				}
			}
		}
	}
	custom_tooltip = tr_rg_nanotech_adopt_modifier_desc
	unlocks_agenda = agenda_nanotech_unstoppable_swarm
	#Unlocks nanolab 1 and Starbase building
}

tr_rg_nanotech_finish = {
	custom_tooltip_with_modifiers = tr_rg_nanotech_finish_modifier_desc
	on_enabled = {
		give_technology = {
			tech = tech_object_gray_5
			message = no
		}
	}

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

tr_rg_nanotech_1 = {
	custom_tooltip_with_modifiers = tr_rg_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_rg_nanotech_2 = {
	custom_tooltip = tr_rg_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_rg_nanotech_5 = {
	possible = {
		has_tradition = tr_rg_nanotech_1
		has_tradition = tr_rg_nanotech_2
	}
	custom_tooltip_with_modifiers = tr_rg_nanotech_5_modifier_desc
	#Unlocks the nanite edicts
	on_enabled = {
		country_event = {
			id = rg_event.25
		}
	}
	#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
	}
}

tr_rg_nanotech_3 = {
	possible = {
		has_tradition = tr_rg_nanotech_5
	}
	custom_tooltip = tr_rg_nanotech_3_modifier_desc
	on_enabled = {
		give_technology = {
			tech = tech_object_gray_7
			message = no
		}
	}
	#Unlocks Starbase Building and Make Nanite World Decision
	ai_weight = {
		factor = 1000
	}
}

tr_rg_nanotech_4 = {
	possible = {
		has_tradition = tr_rg_nanotech_5
	}
	custom_tooltip = tr_rg_nanotech_4_modifier_desc
	#Unlocks Nanite Swarmer ship and nanite ship component research options
	on_enabled = {
		rg_storm_relic_add = yes
	}
	ai_weight = {
		factor = 1000
	}
}