#####Overwritten to prevent being taken if you adopt engineering traditon#####
ap_galactic_wonders_utopia = {
	on_enabled = {
		custom_tooltip = "add_research_options_galactic_wonders_utopia"
		hidden_effect = {
			if = {
				limit = {
					NOT = { has_technology = tech_ring_world }
					can_research_technology = tech_ring_world
				}
				add_research_option = tech_ring_world
			}
			if = {
				limit = {
					NOT = { has_technology = tech_dyson_sphere }
				}
				add_research_option = tech_dyson_sphere
			}
		}
	}

	possible = {
		custom_tooltip = {
			fail_text = "requires_mega_engineering"
			has_technology = tech_mega_engineering
		}
		custom_tooltip = {
			fail_text = "requires_built_or_repaired_megastructure"
			has_country_flag = has_built_or_repaired_megastructure
		}
	}

	potential = {
		host_has_dlc = "Utopia"
		NOR = {
			host_has_dlc = "Megacorp"
			has_ascension_perk = ap_galactic_wonders_utopia
		}
		#####Vanilla Change#####
		NOT = {
			has_tradition = tr_oeo_engineering_adopt
		}
	}

	ai_weight = {
		factor = 20
		modifier = {
			factor = 2
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 3
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 2
			has_ethic = ethic_materialist
		}
		modifier = {
			factor = 3
			has_ethic = ethic_fanatic_materialist
		}
	}
}

ap_galactic_wonders_megacorp = {
	on_enabled = {
		if = {
			limit = {
				NOT = { has_technology = tech_matter_decompressor }
			}
			add_research_option = tech_matter_decompressor
		}
	}

	possible = {
		custom_tooltip = {
			fail_text = "requires_mega_engineering"
			has_technology = tech_mega_engineering
		}
		custom_tooltip = {
			fail_text = "requires_built_or_repaired_megastructure"
			has_country_flag = has_built_or_repaired_megastructure
		}
	}

	potential = {
		host_has_dlc = "Megacorp"
		NOR = {
			host_has_dlc = "Utopia"
			has_ascension_perk = ap_galactic_wonders_megacorp
		}
		#####Vanilla Change#####
		NOT = {
			has_tradition = tr_oeo_engineering_adopt
		}
	}

	ai_weight = {
		factor = 10
		modifier = {
			factor = 2
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 3
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 2
			has_ethic = ethic_materialist
		}
		modifier = {
			factor = 3
			has_ethic = ethic_fanatic_materialist
		}
	}
}

ap_galactic_wonders_utopia_and_megacorp = {
	on_enabled = {
		custom_tooltip = "add_research_options_galactic_wonders_utopia_megacorp"
		hidden_effect = {
			if = {
				limit = {
					NOT = { has_technology = tech_ring_world }
				}
				add_research_option = tech_ring_world
			}
			if = {
				limit = {
					NOT = { has_technology = tech_dyson_sphere }
				}
				add_research_option = tech_dyson_sphere
			}
			if = {
				limit = {
					NOT = { has_technology = tech_matter_decompressor }
				}
				add_research_option = tech_matter_decompressor
			}
		}
	}

	possible = {
		custom_tooltip = {
			fail_text = "requires_mega_engineering"
			has_technology = tech_mega_engineering
		}
		custom_tooltip = {
			fail_text = "requires_built_or_repaired_megastructure"
			has_country_flag = has_built_or_repaired_megastructure
		}

	}

	potential = {
		host_has_dlc = "Utopia"
		host_has_dlc = "Megacorp"
		NOT = {
			has_ascension_perk = ap_galactic_wonders_utopia_and_megacorp
		}
		#####Vanilla Change#####
		NOT = {
			has_tradition = tr_oeo_engineering_adopt
		}
	}

	ai_weight = {
		factor = 20
		modifier = {
			factor = 2
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 3
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 2
			has_ethic = ethic_materialist
		}
		modifier = {
			factor = 3
			has_ethic = ethic_fanatic_materialist
		}
	}
}
