################################
#Energy
################################

building_plentiful_traditions_trading_terminal = {
	base_buildtime = 360
	planet_limit = 1

	category = trade

	building_sets = {
		urban
		trade
	}
	
	potential = {
		exists = owner
		NOT = { has_modifier = resort_colony }	
		NOT = { has_modifier = slave_colony }
		owner = {
			OR = {
				has_active_tradition = tr_plentiful_aspiration_gestalt_finish
				has_active_tradition = tr_plentiful_aspiration_finish
			}
		}
	}
	
	allow = {
		has_major_upgraded_capital = yes
	}
	
	planet_modifier = {
		planet_jobs_energy_produces_mult = 0.05
	}

	resources = {
		category = planet_buildings
		cost = {
			minerals = 200
			rare_crystals = 50
		}
		produces = {
			energy = 4
			unity = 1
		}
	}

	upgrades = {
		building_plentiful_traditions_advanced_trading_terminal
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_regular_empire = yes }
		}
		modifier = {
			trade_value_mult = 0.05
			job_politician_add = 100
			job_clerk_add = 200
			job_technician_add = 300
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_hive_empire = yes }
		}
		modifier = {
			job_synapse_drone_add = 100
			job_technician_drone_add = 500
			planet_jobs_energy_produces_mult = 0.05
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_machine_empire = yes }
		}
		modifier = {
			job_evaluator_add = 500
			planet_jobs_energy_produces_mult = 0.05
		}
	}
	
	show_tech_unlock_if = { 
		owner = {
			OR = {
				has_active_tradition = tr_plentiful_aspiration_gestalt_finish
				has_active_tradition = tr_plentiful_aspiration_finish
			}
		}
	}
	
	ai_weight = {
		weight = 10
	}
}

building_plentiful_traditions_advanced_trading_terminal = {
	base_buildtime = 360
#	planet_limit = 1
	can_build = no

	category = trade

	building_sets = {
		urban
		trade
	}
	
	potential = {
		exists = owner
		NOT = { has_modifier = resort_colony }	
		NOT = { has_modifier = slave_colony }
		owner = {
			has_ascension_perk = ap_plentiful_traditions_trade_empire
		}
	}
	
	allow = {
		has_major_upgraded_capital = yes
	}
	
	planet_modifier = {
		planet_jobs_energy_produces_mult = 0.10
	}

	resources = {
		category = planet_buildings
		cost = {
			minerals = 300
			rare_crystals = 75
		}
		produces = {
			energy = 6
			unity = 2
		}
		upkeep = {
			rare_crystals = 1
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_regular_empire = yes }
		}
		modifier = {
			trade_value_mult = 0.10
			job_politician_add = 200
			job_clerk_add = 400
			job_technician_add = 600
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_hive_empire = yes }
		}
		modifier = {
			job_synapse_drone_add = 200
			job_technician_drone_add = 1000
			planet_jobs_energy_produces_mult = 0.10
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_machine_empire = yes }
		}
		modifier = {
			job_evaluator_add = 1000
			planet_jobs_energy_produces_mult = 0.10
		}
	}
	
	show_tech_unlock_if = { 
		owner = {
			has_ascension_perk = ap_plentiful_traditions_trade_empire
		}
	}
	
	ai_weight = {
		weight = 10
	}
}

building_plentiful_traditions_trading_depot = {
	base_buildtime = 360
	planet_limit = 1

	category = resource

	building_sets = {
		generator
	}

	potential = {
		exists = owner
		NOT = { has_modifier = resort_colony }	
		NOT = { has_modifier = slave_colony }
		owner = {
			has_tradition = tr_plentiful_aspiration_4
		}
	}
	
	allow = {
		has_major_upgraded_capital = yes
	}

	resources = {
		category = planet_buildings
		cost = {
			minerals = 325
			rare_crystals = 50
		}
		produces = {
			energy = 2
			unity = 3
		}
	}

	country_modifier = {
		country_resource_max_energy_add = 1000
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_regular_empire = yes }
		}
		modifier = {
			job_clerk_add = 200
			job_technician_add = 300
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_hive_empire = yes }
		}
		modifier = {
			job_technician_drone_add = 500
			job_synapse_drone_add = 100
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_machine_empire = yes }
		}
		modifier = {
			job_technician_drone_add = 500
			job_coordinator_add = 100
		}
	}
	
	show_tech_unlock_if = { 
		owner = {
			has_tradition = tr_plentiful_aspiration_4
		}
	}
	
	ai_weight = {
		weight = 10
	}
}


################################
#Food
################################

building_plentiful_traditions_pillar_of_affliction = {
	base_buildtime = 360
	planet_limit = 1

	category = resource

	building_sets = {
		farming
	}

	potential = {
		exists = owner
		NOT = { is_planet_class = pc_machine }
		NOT = { has_modifier = resort_colony }	
		NOT = { is_planet_class = pc_habitat }
		NOT = { has_modifier = slave_colony }
		owner = {
			has_tradition = tr_plentiful_mutagenesis_4
		}
	}
	
	allow = {
		has_major_upgraded_capital = yes
	}

	resources = {
		category = planet_buildings
		cost = {
			minerals = 275
			exotic_gases = 50
		}
		upkeep = {
			energy = 2
		}
		produces = {
			food = 4
			unity = 1
		}
	}

	upgrades = {
		building_plentiful_traditions_advanced_pillar_of_affliction
	}

	country_modifier = {
		country_resource_max_food_add = 1000
	}
	
	planet_modifier  = {
		planet_jobs_food_produces_mult = 0.05
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				is_regular_empire = yes
				is_fallen_empire_spiritualist = no
				OR = {
					is_anglers_empire = no
					AND = {
						is_anglers_empire = yes
						NOT = { PREV = { planet = { is_wet = yes } } }
					}
				}
			}
		}
		modifier = {
			job_farmer_add = 500
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				is_regular_empire = yes
				is_fallen_empire_spiritualist = no
				is_anglers_empire = yes
				PREV = { planet = { is_wet = yes } }
			}
		}
		modifier = {
			job_angler_add = 500
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_fallen_empire_spiritualist = yes }
		}
		modifier = {
			job_fe_acolyte_farm_add = 500
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_gestalt = yes }
		}
		modifier = {
			job_agri_drone_add = 500
		}
	}
	
	show_tech_unlock_if = { 
		owner = {
			has_tradition = tr_plentiful_mutagenesis_4
		}
	}
	
	ai_weight = {
		weight = 10
	}
}

building_plentiful_traditions_advanced_pillar_of_affliction = {
	base_buildtime = 360
#	planet_limit = 1
	can_build = no

	category = resource

	building_sets = {
		farming
	}
	
	potential = {
		exists = owner
		NOT = { is_planet_class = pc_machine }
		NOT = { has_modifier = resort_colony }	
		NOT = { is_planet_class = pc_habitat }
		NOT = { has_modifier = slave_colony }
		owner = {
			has_ascension_perk = ap_plentiful_traditions_food_is_life
		}
	}
	
	allow = {
		has_major_upgraded_capital = yes
	}

	resources = {
		category = planet_buildings
		cost = {
			minerals = 400
			exotic_gases = 75
		}
		upkeep = {
			energy = 3
			exotic_gases = 1
		}
		produces = {
			food = 6
			unity = 2
		}
	}

	country_modifier = {
		country_resource_max_food_add = 2000
	}
	
	planet_modifier  = {
		planet_jobs_food_produces_mult = 0.10
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				is_regular_empire = yes
				is_fallen_empire_spiritualist = no
				OR = {
					is_anglers_empire = no
					AND = {
						is_anglers_empire = yes
						NOT = { PREV = { planet = { is_wet = yes } } }
					}
				}
			}
		}
		modifier = {
			job_farmer_add = 1000
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				is_regular_empire = yes
				is_fallen_empire_spiritualist = no
				is_anglers_empire = yes
				PREV = { planet = { is_wet = yes } }
			}
		}
		modifier = {
			job_angler_add = 1000
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_fallen_empire_spiritualist = yes }
		}
		modifier = {
			job_fe_acolyte_farm_add = 1000
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_gestalt = yes }
		}
		modifier = {
			job_agri_drone_add = 1000
		}
	}
	
	show_tech_unlock_if = { 
		owner = {
			has_ascension_perk = ap_plentiful_traditions_food_is_life
		}
	}
	
	ai_weight = {
		weight = 10
	}
}

################################
#Minerals
################################

building_plentiful_traditions_purification_facility = {
	base_buildtime = 360
	planet_limit = 1

	category = resource

	building_sets = {
		mining
	}

	potential = {
		exists = owner
		NOT = { has_modifier = resort_colony }	
		NOT = { is_planet_class = pc_habitat }
		NOT = { has_modifier = slave_colony }
		owner = {
			has_tradition = tr_plentiful_industry_4
		}
	}
	
	allow = {
		has_major_upgraded_capital = yes
	}

	resources = {
		category = planet_buildings
		cost = {
			minerals = 275
			volatile_motes = 50
		}
		upkeep = {
			energy = 2
		}
		produces = {
			minerals = 4
			unity = 1
		}
	}

	upgrades = {
		building_plentiful_traditions_advanced_purification_facility
	}

	country_modifier = {
		country_resource_max_minerals_add = 1000
	}

	planet_modifier  = {
		planet_jobs_minerals_produces_mult = 0.05
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_regular_empire = yes }
		}
		modifier = {
			job_miner_add = 500
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_gestalt = yes }
		}
		modifier = {
			job_mining_drone_add = 500
		}
	}
	
	show_tech_unlock_if = { 
		owner = {
			has_tradition = tr_plentiful_industry_4
		}
	}
	
	ai_weight = {
		weight = 10
	}
}

building_plentiful_traditions_advanced_purification_facility = {
	base_buildtime = 360
#	planet_limit = 1
	can_build = no

	category = resource

	building_sets = {
		mining
	}

	potential = {
		exists = owner
		NOT = { has_modifier = resort_colony }	
		NOT = { is_planet_class = pc_habitat }
		NOT = { has_modifier = slave_colony }
		owner = {
			has_ascension_perk = ap_plentiful_traditions_industrial_mining_excavation
		}
	}
	
	allow = {
		has_major_upgraded_capital = yes
	}

	resources = {
		category = planet_buildings
		cost = {
			minerals = 400
			volatile_motes = 75
		}
		upkeep = {
			energy = 3
			volatile_motes = 1
		}
		produces = {
			minerals = 6
			unity = 2
		}
	}

	country_modifier = {
		country_resource_max_minerals_add = 2000
	}

	planet_modifier  = {
		planet_jobs_minerals_produces_mult = 0.10
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_regular_empire = yes }
		}
		modifier = {
			job_miner_add = 1000
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_gestalt = yes }
		}
		modifier = {
			job_mining_drone_add = 1000
		}
	}
	
	show_tech_unlock_if = { 
		owner = {
			has_ascension_perk = ap_plentiful_traditions_industrial_mining_excavation
		}
	}
	
	ai_weight = {
		weight = 10
	}
}

################################
#Platform
################################

building_plentiful_traditions_obelisk0 = {
	base_buildtime = 60
	planet_limit = 1

	category = resource

	building_sets = {
		urban
	}
	
	potential = {
		exists = owner
		NOT = { has_modifier = resort_colony }	
		NOT = { has_modifier = slave_colony }
		owner = {
			NOT = {
				has_authority = auth_machine_intelligence
			}
			OR = {
				has_tradition = tr_plentiful_mysticism_1
				has_tradition = tr_plentiful_mysticism_2
				has_tradition = tr_plentiful_mysticism_3
			}
		}
		planet = {
			NOT = {
				has_building = building_plentiful_traditions_obelisk1
				has_building = building_plentiful_traditions_obelisk2
				has_building = building_plentiful_traditions_obelisk3
			}
		}
	}
	
	allow = {
		has_major_upgraded_capital = yes
	}

	resources = {
		category = planet_buildings
		cost = {
			minerals = 75
			exotic_gases = 5
			volatile_motes = 5
			rare_crystals = 5
		}
		produces = {
			food = 0.01
			energy = 0.01
			minerals = 0.01
		}
	}
	
	upgrades = {
		building_plentiful_traditions_obelisk1
		building_plentiful_traditions_obelisk2
		building_plentiful_traditions_obelisk3
	}
	
	show_tech_unlock_if = { 
		owner = {
			NOT = {
				has_authority = auth_machine_intelligence
			}
			OR = {
				has_tradition = tr_plentiful_mysticism_1
				has_tradition = tr_plentiful_mysticism_2
				has_tradition = tr_plentiful_mysticism_3
			}
		}
	}
	
	ai_weight = {
		weight = 10
		
	}
}

building_plentiful_traditions_obelisk1 = {
	base_buildtime = 240
	can_build = no
#	planet_limit = 1

	category = resource

	building_sets = {
		urban
	}
	
	potential = {
		exists = owner
		NOT = { has_modifier = resort_colony }	
		NOT = { has_modifier = slave_colony }
		owner = {
			has_tradition = tr_plentiful_mysticism_1
		}
	}
	
	allow = {
		has_major_upgraded_capital = yes
	}

	resources = {
		category = planet_buildings
		cost = {
			minerals = 250
			exotic_gases = 25
		}
		produces = {
			food = 3
			energy = 1
			unity = 2
		}
	}
	
	planet_modifier  = {
		planet_jobs_food_produces_mult = 0.05
		planet_housing_add = 500
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_regular_empire = yes }
		}
		modifier = {
			job_farmer_add = 500
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_gestalt = yes }
		}
		modifier = {
			job_agri_drone_add = 500
		}
	}
	
	show_tech_unlock_if = { 
		owner = {
			NOT = {
				has_authority = auth_machine_intelligence
			}
			has_tradition = tr_plentiful_mysticism_1
		}
	}
	
	ai_weight = {
		weight = 500
	}
}

building_plentiful_traditions_obelisk2 = {
	base_buildtime = 240
	can_build = no
#	planet_limit = 1

	category = resource

	building_sets = {
		urban
	}
	
	potential = {
		exists = owner
		NOT = { has_modifier = resort_colony }	
		NOT = { has_modifier = slave_colony }
		owner = {
			has_tradition = tr_plentiful_mysticism_2
		}
	}
	
	allow = {
		has_major_upgraded_capital = yes
	}

	resources = {
		category = planet_buildings
		cost = {
			minerals = 250
			rare_crystals = 25
		}
		produces = {
			energy = 3
			minerals = 1
			unity = 2
		}
	}
	
	planet_modifier  = {
		planet_jobs_energy_produces_mult = 0.05
		planet_housing_add = 500
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_regular_empire = yes }
		}
		modifier = {
			job_technician_add = 500
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_gestalt = yes }
		}
		modifier = {
			job_technician_drone_add = 5
		}
	}
	
	show_tech_unlock_if = { 
		owner = {
			NOT = {
				has_authority = auth_machine_intelligence
			}
			has_tradition = tr_plentiful_mysticism_2
		}
	}
	
	ai_weight = {
		weight = 500
	}
}

building_plentiful_traditions_obelisk3 = {
	base_buildtime = 240
	can_build = no
#	planet_limit = 1

	category = resource

	building_sets = {
		urban
	}
	
	potential = {
		exists = owner
		NOT = { has_modifier = resort_colony }	
		NOT = { has_modifier = slave_colony }
		owner = {
			has_tradition = tr_plentiful_mysticism_3
		}
	}
	
	allow = {
		has_major_upgraded_capital = yes
	}

	resources = {
		category = planet_buildings
		cost = {
			minerals = 250
			volatile_motes = 25
		}
		produces = {
			minerals = 3
			food = 1
			unity = 2
		}
	}
	
	planet_modifier  = {
		planet_jobs_minerals_produces_mult = 0.05
		planet_housing_add = 500
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_regular_empire = yes }
		}
		modifier = {
			job_miner_add = 500
		}
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = { is_gestalt = yes }
		}
		modifier = {
			job_mining_drone_add = 500
		}
	}
	
	show_tech_unlock_if = { 
		owner = {
			NOT = {
				has_authority = auth_machine_intelligence
			}
			has_tradition = tr_plentiful_mysticism_3
		}
	}
	
	ai_weight = {
		weight = 500
	}
}

