building_plentiful_traditions_tower_of_affinity = {
	base_buildtime = 360
	planet_limit = 1

	category = unity

	building_sets = {
		government
		unity
	}
	
	potential = {
		exists = owner
		NOT = { has_modifier = slave_colony }
		owner = {
			has_tradition = tr_plentiful_affinity_5
		}
	}
	
	allow = {
		has_upgraded_capital = yes
	}
	
	resources = {
		category = planet_buildings
		cost = {
			minerals = 275
		}
		upkeep = {
			energy = 1
			alloys = 5
		}
		produces = {
			society_research = 4
			unity = 2
		}
	}

	planet_modifier  = {
		pop_resettlement_cost_mult = -0.35
		country_resettlement_cost_mult = -0.1
	}
	
	inline_script = {
		script = jobs/entertainers_add
		AMOUNT = 1500
	}
	
	prerequisites = {
		"tech_cultural_heritage"
	}
	triggered_desc = {
		trigger = {
			exists = owner
			owner = { is_gestalt = no }
		}
		text = job_culture_worker_effect_desc
	}
	
	triggered_desc = {
		trigger = {
			exists = owner
			owner = { is_hive_empire = yes }
		}
		text = job_synapse_drone_effect_desc
	}
	
	triggered_desc = {
		trigger = {
			exists = owner
			owner = { is_machine_empire = yes }
		}
		text = job_coordinator_effect_desc
	}
	
	show_tech_unlock_if = { 
		owner = {
			has_tradition = tr_plentiful_affinity_5
		}
	}
	
	ai_weight = {
		weight = 5
	}
}

building_plentiful_traditions_citadel_of_motion = {
	base_buildtime = 360
	planet_limit = 1

	category = unity

	building_sets = {
		government
		unity
	}
	
	potential = {
		exists = owner
		NOT = { has_modifier = resort_colony }	
		NOT = { has_modifier = slave_colony }
		owner = {
			has_active_tradition = tr_plentiful_faith_finish_machine
		}
	}
	
	allow = {
		has_major_upgraded_capital = yes
		owner = {
			NOT = { 
				any_owned_planet = {
					has_building = building_plentiful_traditions_citadel_of_motion
				}
			}
			NOT = { 
				any_owned_planet = {
					has_building_construction = building_plentiful_traditions_citadel_of_motion
				}
			}
		}
	}
	
	convert_to = {
		building_plentiful_traditions_house_of_prayer
	}

	resources = {
		category = planet_buildings
		cost = {
			minerals = 325
			exotic_gases = 50
		}
		upkeep = {
			energy = 3
			exotic_gases = 1
		}
		produces = {
			unity = 7
		}
	}
	
	country_modifier = {
		country_base_influence_produces_add = 1
		country_resource_max_influence_add = 150
		planet_housing_add = 10
	}
	

	inline_script = {
		script = jobs/entertainers_add
		AMOUNT = 1500
	}
	
	show_tech_unlock_if = { 
		owner = {
			has_active_tradition = tr_plentiful_faith_finish_machine
		}
	}
	
	ai_weight = {
		weight = 12
	}
}

building_plentiful_traditions_house_of_prayer = {
	base_buildtime = 360
	planet_limit = 1

	category = unity

	building_sets = {
		government
		unity
	}
	
	potential = {
		exists = owner
		NOT = { has_modifier = resort_colony }	
		NOT = { has_modifier = slave_colony }
		owner = {
			has_active_tradition = tr_plentiful_faith_finish
		}
	}
	
	allow = {
		has_major_upgraded_capital = yes
		owner = {
			NOT = { 
				any_owned_planet = {
					has_building = building_plentiful_traditions_house_of_prayer
				}
			}
			NOT = { 
				any_owned_planet = {
					has_building_construction = building_plentiful_traditions_house_of_prayer
				}
			}
		}
	}
	
	convert_to = {
		building_plentiful_traditions_citadel_of_motion
	}

	resources = {
		category = planet_buildings
		cost = {
			minerals = 325
			exotic_gases = 50
		}
		upkeep = {
			energy = 3
			exotic_gases = 1
		}
		produces = {
			unity = 6
		}
	}

	planet_modifier  = {
		#country_base_influence_produces_add = 1
		pop_happiness = 0.10
		pop_ethic_spiritualist_attraction_mult = 0.20
		planet_housing_add = 1000
	}
	
	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { 
				is_gestalt = no				
				is_spiritualist = no
			}
		}
		modifier = {
			job_culture_worker_add = 400
			job_priest_add = 100
		}
	}
	
	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { 
				is_gestalt = no				
				is_spiritualist = yes
			}
		}
		modifier = {
			job_priest_add = 500
		}
	}
	
	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_hive_empire = yes }
		}
		modifier = {
			job_synapse_drone_add = 500
		}
	}
	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_machine_empire = yes }
		}
		modifier = {
			job_evaluator_add = 500
		}
	}
	
	show_tech_unlock_if = { 
		owner = {
			has_active_tradition = tr_plentiful_faith_finish
		}
	}

	ai_weight = {
		weight = 12
	}
}

building_plentiful_traditions_sanctum_of_keys = {
	base_buildtime = 300
	planet_limit = 1

	category = unity

	building_sets = {
		government
		unity
	}
	
	potential = {
		exists = owner
		NOT = { has_modifier = resort_colony }	
		NOT = { has_modifier = slave_colony }
		owner = {
			has_active_tradition = tr_plentiful_mysticism_5
		}
	}
	
	allow = {
		has_major_upgraded_capital = yes
	}

	resources = {
		category = planet_buildings
		cost = {
			minerals = 275
			influence = 50
		}
		upkeep = {
			energy = 2
		}
		produces = {
			unity = 6
		}
	}

	planet_modifier  = {
		pop_happiness = 0.05
		pop_environment_tolerance = 0.05
		pop_amenities_usage_mult = -0.05
		pop_housing_usage_mult = -0.05
	}
	

	inline_script = {
		script = jobs/entertainers_add
		AMOUNT = 1500
	}
	
	show_tech_unlock_if = { 
		owner = {
			has_active_tradition = tr_plentiful_mysticism_5
		}
	}
	
	ai_weight = {
		weight = 12
	}
}

building_plentiful_traditions_sanctum_of_the_collective = {
	base_buildtime = 300
	planet_limit = 1

	category = unity

	building_sets = {
		government
		unity
	}
	
	potential = {
		exists = owner
		NOT = { has_modifier = resort_colony }	
		NOT = { has_modifier = slave_colony }
		owner = {
			has_active_tradition =  tr_plentiful_mysticism_5_machine
		}
	}
	
	allow = {
		has_major_upgraded_capital = yes
	}

	resources = {
		category = planet_buildings
		cost = {
			minerals = 275
			influence = 50
		}
		upkeep = {
			energy = 2
		}
		produces = {
			unity = 8
		}
	}

	planet_modifier  = {
		planet_stability_add = 10
	}
	
	inline_script = {
		script = jobs/entertainers_add
		AMOUNT = 1500
	}
	
	show_tech_unlock_if = { 
		owner = {
			has_active_tradition =  tr_plentiful_mysticism_5_machine
		}
	}
		
	ai_weight = {
		weight = 12
	}
}

