##########################################################################
# Empire Policies
# 
# #####
#
# AI:
# Base AI-weight is 100, if unchanged
# AI will grab whatever policy-option has the highest weight
#
# #####
# 
##########################################################################

war_philosophy = {

	potential = {
		always = yes   # only normal Empires should have this policy
	}
	
	allow = {
		is_at_war = no # Not allowed to change policies in this group while at war
	}
	
	option = {
		name = "unrestricted_wars"
		
		policy_flags = {
			unrestricted_wars
		}
		
		valid = {
			NOT = {
				has_ethic = "ethic_fanatic_pacifist"
			}
		}	
		
		AI_weight = {
			modifier = {
				factor = 10
				has_valid_ai_personality = no
				NOT = {
					has_ethic = "ethic_pacifist"
					has_ethic = "ethic_fanatic_pacifist"
				}
			}
			modifier = {
				factor = 10
				has_valid_ai_personality = yes
				OR = {
					has_ai_personality_behaviour = conqueror
					has_ai_personality_behaviour = subjugator
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_pacifist"
					has_ethic = "ethic_fanatic_pacifist"
				}
			}			
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_pacifist"
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_pacifist"
			}			
		}
	}
	
	option = {
		name = "liberation_wars"
		
		policy_flags = {
			liberation_wars
		}
				
		AI_weight = {
			modifier = {
				factor = 5
				has_valid_ai_personality = no
				has_ethic = "ethic_pacifist"
			}
			modifier = {
				factor = 5
				has_valid_ai_personality = yes
				OR = {
					has_ai_personality_behaviour = conqueror
					has_ai_personality_behaviour = subjugator
					has_ai_personality_behaviour = liberator
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_pacifist"
					has_ethic = "ethic_fanatic_pacifist"
				}
			}			
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_fanatic_pacifist"
			}			
		}		
	}	
	
	option = {
		name = "no_wars"
		
		policy_flags = {
			no_wars
		}				
		
		AI_weight = {
			modifier = {
				factor = 10
				has_ethic = "ethic_fanatic_pacifist"
			}
			modifier = {
				factor = 10
				has_valid_ai_personality = yes
				NOR = {
					has_ai_personality_behaviour = liberator
					has_ai_personality_behaviour = conqueror
					has_ai_personality_behaviour = subjugator
				}
			}			
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_militarist"
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_militarist"
			}			
		}		
	}
}

slavery = {
	potential = {
		always = yes
	}
	
	option = {
		name = "slavery_not_allowed"
		
		on_enabled = {
			custom_tooltip = "ALL_POPS_EMANCIPATED"

			hidden_effect = {
				every_owned_pop = {
					limit = { is_enslaved = yes }
					enslave_pop = no
				}
			}
		}
		
		policy_flags = {
			slavery_not_allowed
		}
		
		AI_weight = {
			modifier = {
				factor = 2
				OR = {
					has_ethic = "ethic_fanatic_individualist"
					has_ethic = "ethic_individualist"
				}
				NOR = {
					has_ethic = "ethic_fanatic_xenophobe"
					has_ethic = "ethic_xenophobe"
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.10
				pop_has_trait = trait_decadent
			}
		}
	}
	
	option = {
		name = "slavery_allowed_regulated_xenos_only"
		
		prerequisites = {
			"tech_ethical_equations"
		}
		
		valid = {
			OR = {
				has_ethic = "ethic_xenophobe"
				has_ethic = "ethic_fanatic_xenophobe"
			}		
		}
		
		policy_flags = {
			slavery_allowed_regulated_xenos_only
		}

		modifier = {
			slave_production_output = -0.10
			slave_food_output = -0.10
		}
		
		AI_weight = {
			modifier = {
				factor = 0
				has_valid_ai_personality = yes
				NOT = { has_ai_personality_behaviour = slaver }
			}		
			modifier = {
				factor = 1.5
				OR = {
					has_ethic = "ethic_fanatic_collectivist"
					has_ethic = "ethic_collectivist"
				}
			}
			modifier = {
				factor = 1.0
				OR = {
					has_ethic = "ethic_fanatic_xenophobe"
					has_ethic = "ethic_xenophobe"
				}
				NOT = {
					has_ethic = "ethic_fanatic_individualist"
					has_ethic = "ethic_individualist"
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_individualist"
				NOT = { pop_has_trait = trait_decadent }
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_individualist"
				NOT = { pop_has_trait = trait_decadent }
			}
		}
	}
		
	option = {
		name = "slavery_allowed_xenos_only"
		
		potential = {
			num_communications > 0
		}
		valid = {
			OR = {
				has_ethic = "ethic_xenophobe"
				has_ethic = "ethic_fanatic_xenophobe"
			}
		}
		policy_flags = {
			slavery_allowed_xenos_only
		}
		modifier = {}
		
		AI_weight = {
			modifier = {
				factor = 0
				has_valid_ai_personality = yes
				NOT = { has_ai_personality_behaviour = slaver }
			}		
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_fanatic_xenophile"
					has_ethic = "ethic_xenophile"
				}
			}
			modifier = {
				factor = 2
				OR = {
					has_ethic = "ethic_fanatic_xenophobe"
					has_ethic = "ethic_xenophobe"
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_xenophile"
				NOT = { pop_has_trait = trait_decadent }
				owner = {
					is_same_species = ROOT
				}
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_xenophile"
				NOT = { pop_has_trait = trait_decadent }
				owner = {
					is_same_species = ROOT
				}
			}
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_collectivist"
				NOT = { pop_has_trait = trait_decadent }
				owner = {
					NOT = { is_same_species = ROOT }
				}
			}
			modifier = {
				add = -0.05
				NOR = {
					pop_has_ethic = "ethic_collectivist" 
					pop_has_ethic = "ethic_fanatic_collectivist"
					pop_has_trait = trait_decadent
				}
				owner = {
					NOT = { is_same_species = ROOT }
				}
			}
		}
	}

	option = {
		name = "slavery_allowed_regulated"
		
		prerequisites = {
			"tech_ethical_equations"
		}
		
		valid = {
			OR = {
				has_ethic = "ethic_collectivist"
				has_ethic = "ethic_fanatic_collectivist"
			}			
		}
		
		policy_flags = {
			slavery_allowed_regulated
		}

		modifier = {
			slave_production_output = -0.10
			slave_food_output = -0.10
		}
		
		AI_weight = {
			modifier = {
				factor = 0
				has_valid_ai_personality = yes
				NOT = { has_ai_personality_behaviour = slaver }
			}		
			modifier = {
				factor = 1.5
				OR = {
					has_ethic = "ethic_fanatic_collectivist"
					has_ethic = "ethic_collectivist"
				}
			}
			modifier = {
				factor = 1.0
				OR = {
					has_ethic = "ethic_fanatic_xenophobe"
					has_ethic = "ethic_xenophobe"
				}
				NOT = {
					has_ethic = "ethic_fanatic_individualist"
					has_ethic = "ethic_individualist"
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_individualist"
				NOT = { pop_has_trait = trait_decadent }
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_individualist"
				NOT = { pop_has_trait = trait_decadent }
			}
		}
	}
	
	option = {
		name = "slavery_allowed_all"
		
		prerequisites = {
			"tech_ethical_equations"
		}
		
		valid = {
			OR = {
				has_ethic = "ethic_collectivist"
				has_ethic = "ethic_fanatic_collectivist"
			}		
		}
		
		policy_flags = {
			slavery_allowed_all
		}
		modifier = {}
		
		AI_weight = {
			modifier = {
				factor = 0
				has_valid_ai_personality = yes
				NOT = { has_ai_personality_behaviour = slaver }
			}		
			modifier = {
				factor = 2
				OR = {
					has_ethic = "ethic_fanatic_collectivist"
					has_ethic = "ethic_collectivist"
				}
			}
			modifier = {
				factor = 1.5
				OR = {
					has_ethic = "ethic_fanatic_xenophobe"
					has_ethic = "ethic_xenophobe"
				}
				NOR = {
					has_ethic = "ethic_fanatic_individualist"
					has_ethic = "ethic_individualist"
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_individualist"
				NOT = { pop_has_trait = trait_decadent }
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_individualist"
				NOT = { pop_has_trait = trait_decadent }
			}
		}
	}
}

slavery_procreation = {
	
	potential = {
		OR = {
			has_policy_flag = slavery_allowed_xenos_only
			has_policy_flag = slavery_allowed_all
		}
	}
	
	option = {
		name = "slavery_procreation_allowed"
		
		AI_weight = {
			base = 10
		}
	}
	
	option = {
		name = "slavery_procreation_not_allowed"
		
		policy_flags = {
			slavery_procreation_not_allowed
		}
		
		AI_weight = {
			base = 0
		}
		
		on_enabled = {
			hidden_effect = {
				every_owned_pop = {
					limit = { 
						is_enslaved = yes
						is_growing = yes
					}
					kill_pop = yes
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				is_enslaved = yes
			}
		}
	}	
}

purge = {

	potential = {
		always = yes
	}
	
	option = {
		name = "purge_not_allowed"
		
		on_enabled = {
			# custom_tooltip = "policy_purge_allowed_effect_disable"
			every_owned_pop = {
				limit = { is_being_purged = yes }
				purge = no
			}
		}
		
		policy_flags = {
			purge_not_allowed
		}
		
		AI_weight = {
			modifier = {
				factor = 2
				OR = {
					has_ethic = "ethic_fanatic_individualist"
					has_ethic = "ethic_individualist"
					has_ethic = "ethic_fanatic_pacifist"
					has_ethic = "ethic_pacifist"
				}
			}		
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_fanatic_individualist"
					has_ethic = "ethic_individualist"
					has_ethic = "ethic_fanatic_pacifist"
					has_ethic = "ethic_pacifist"
				}
				OR = {
					has_ethic = "ethic_fanatic_xenophobe"
					has_ethic = "ethic_xenophobe"
				}
			}
		}
	}
	
	option = {
		name = "purge_allowed_xenos_only"
		
		policy_flags = {
			purge_allowed_xenos_only
		}
		modifier = {}
		
		potential = {
			num_communications > 0
		}
		
		valid = {
			OR = {
				has_ethic = "ethic_xenophobe"
				has_ethic = "ethic_fanatic_xenophobe"
				has_ethic = "ethic_collectivist"
				has_ethic = "ethic_fanatic_collectivist"
			}
		}
		
		AI_weight = {
			modifier = {
				factor = 0
				has_valid_ai_personality = yes
				NOT = { has_ai_personality_behaviour = purger }
			}			
			modifier = {
				factor = 2
				OR = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_fanatic_individualist"
					has_ethic = "ethic_individualist"
					has_ethic = "ethic_fanatic_pacifist"
					has_ethic = "ethic_pacifist"
					has_ethic = "ethic_fanatic_xenophile"
					has_ethic = "ethic_xenophile"
				}
				NOT = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_xenophile"
				owner = {
					is_same_species = ROOT
				}
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_xenophile"
				owner = {
					is_same_species = ROOT
				}
			}
		}
	}
	
	option = {
		name = "purge_allowed_all"
		
		potential = {
		}
		valid = {
			OR = {
				has_ethic = "ethic_collectivist"
				has_ethic = "ethic_fanatic_collectivist"
			}
		}
		policy_flags = {
			purge_allowed_all
		}
		modifier = {}
		
		AI_weight = {
			modifier = {
				factor = 2
				OR = {
					has_ethic = "ethic_collectivist"
					has_ethic = "ethic_fanatic_collectivist"
				}
			}
			modifier = {
				factor = 1.5
				OR = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				NOR = {
					pop_has_ethic = "ethic_collectivist"
					pop_has_ethic = "ethic_fanatic_collectivist"
				}
			}
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_individualist"
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_individualist"
			}			
		}
	}
}

orbital_bombardment = {

	potential = {
		always = yes
	}
	
	option = {
		name = "orbital_bombardment_light"
		
		policy_flags = {
			allow_orbital_bombardment_light
		}
		
		on_enabled = {
			# custom_tooltip = "policy_allow_slavery_effect_disable"
		}
		
		AI_weight = {
			modifier = {
				factor = 4
				OR = {
					has_ethic = "ethic_pacifist"
					has_ethic = "ethic_fanatic_pacifist"
				}
			}
			modifier = {
				factor = 0.5
				NOT = {
					has_ethic = "ethic_pacifist"
					has_ethic = "ethic_fanatic_pacifist"
				}
			}			
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_militarist"
					has_ethic = "ethic_fanatic_militarist"
				}
			}			
		}
	}
	option = {
		name = "orbital_bombardment_limited"
		
		policy_flags = {
			allow_orbital_bombardment_light
			allow_orbital_bombardment_limited
		}
		modifier = {}
		
		valid = {
			NOT = {
				has_ethic = "ethic_fanatic_pacifist"
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_pacifist"
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_pacifist"
			}			
		}
		
		AI_weight = {
			modifier = {
				factor = 2
				OR = {
					has_ethic = "ethic_militarist"
					has_ethic = "ethic_xenophobe"
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_fanatic_militarist"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}			
		}
	}
	option = {
		name = "orbital_bombardment_full"
		
		potential = {
		}
		
		valid = {
			OR = {
				has_ethic = "ethic_militarist"
				has_ethic = "ethic_fanatic_militarist"
			}
		}
		
		policy_flags = {
			allow_orbital_bombardment_light
			allow_orbital_bombardment_limited
			allow_orbital_bombardment_full
		}
		modifier = {}
		
		AI_weight = {
			modifier = {
				factor = 2
				OR = {
					has_ethic = "ethic_fanatic_militarist"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}		
			modifier = {
				factor = 0
				NOT = {
					OR = {
						has_ethic = "ethic_fanatic_militarist"
						has_ethic = "ethic_fanatic_xenophobe"
					}
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_pacifist"
			}
			modifier = {
				add = -0.2
				pop_has_ethic = "ethic_fanatic_pacifist"
			}					
		}
	}
}

interference = {

	potential = {
		has_country_flag = encountered_first_primitive
	}
	
	option = {
		name = "interference_passive"
		
		policy_flags = {
			interference_passive
		}
		
		on_enabled = {
			# custom_tooltip = "policy_allow_slavery_effect_disable"
		}
		
		valid = {
			NOT = {
				has_ethic = "ethic_fanatic_xenophobe"
			}
		}
		
		pop_happiness = {
			base = 0
		}
	}
	
	option = {
		name = "interference_active"
		
		policy_flags = {
			interference_active
		}
		modifier = {}
		
		valid = {
			NOT = {
				has_ethic = "ethic_fanatic_xenophile"
			}
		}
		
		AI_weight = {
			modifier = {
				factor = 2
				has_valid_ai_personality = yes
				OR = {
					has_ai_personality_behaviour = infiltrator
					has_ai_personality_behaviour = dominator
				}
			}		
			modifier = {
				factor = 0
				has_valid_ai_personality = yes
				NOR = {
					has_ai_personality_behaviour = infiltrator
					has_ai_personality_behaviour = dominator
				}
			}		
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_fanatic_xenophile"
			}			
		}
	}
	option = {
		name = "interference_full"
		
		potential = {
		}
		valid = {
			NOR = {
				has_ethic = "ethic_pacifist"
				has_ethic = "ethic_fanatic_pacifist"
				has_ethic = "ethic_xenophile"
				has_ethic = "ethic_fanatic_xenophile"
			}
		}
		policy_flags = {
			interference_full
		}
		modifier = {}
		AI_weight = {
			modifier = {
				factor = 3
				has_valid_ai_personality = yes
				OR = {
					has_ai_personality_behaviour = infiltrator
					has_ai_personality_behaviour = dominator
				}
			}		
			modifier = {
				factor = 0
				has_valid_ai_personality = yes
				NOR = {
					has_ai_personality_behaviour = infiltrator
					has_ai_personality_behaviour = dominator
				}
			}	
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_pacifist"
					has_ethic = "ethic_fanatic_pacifist"
					has_ethic = "ethic_xenophile"
					has_ethic = "ethic_fanatic_xenophile"
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_xenophile"
			}
			modifier = {
				add = -0.10
				pop_has_ethic = "ethic_fanatic_xenophile"
			}
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_pacifist"
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_pacifist"
			}			
		}
	}
}

enlightenment = {

	potential = {
		has_country_flag = encountered_first_primitive
	}
	
	option = {
		name = "enlightenment_not_allowed"
		
		policy_flags = {
			enlightenment_not_allowed
		}
		
		on_enabled = {
			# custom_tooltip = "policy_allow_slavery_effect_disable"
		}
		AI_weight = {
			weight = 1
		}
		
		pop_happiness = {
			base = 0
		}
	}
	
	option = {
		name = "enlightenment_allowed"
		
		policy_flags = {
			enlightenment_allowed
		}
		modifier = {}
		
		valid = {
			NOT = {
				has_ethic = "ethic_fanatic_xenophobe"
			}
		}
		
		AI_weight = {
			modifier = {
				factor = 2
				has_valid_ai_personality = yes
				has_ai_personality_behaviour = uplifter
			}		
			modifier = {
				factor = 0
				has_valid_ai_personality = yes
				NOT = { has_ai_personality_behaviour = uplifter }
			}		
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_xenophobe"
			}
			modifier = {
				add = -0.10
				pop_has_ethic = "ethic_fanatic_xenophobe"
			}
		}
	}
}

migration = {

	potential = {
		always = yes
	}
	
	option = {
		name = "migration_not_allowed"
		
		policy_flags = {
			migration_not_allowed
		}
		
		on_enabled = {
			# custom_tooltip = "policy_allow_slavery_effect_disable"
		}
		
		valid = {
			NOT = {
				has_ethic = "ethic_fanatic_individualist"
			}
			grants_migration_access = no
		}
		
		AI_weight = {
			modifier = {
				factor = 5
				OR = {
					has_ethic = "ethic_collectivist"
					has_ethic = "ethic_fanatic_collectivist"
				}
			}		
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_individualist"
					has_ethic = "ethic_fanatic_individualist"
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_individualist"
			}
			modifier = {
				add = -0.10
				pop_has_ethic = "ethic_fanatic_individualist"
			}			
		}
	}
	
	option = {
		name = "migration_allowed_primary_only"
		
		policy_flags = {
			migration_allowed_primary_only
		}
		modifier = {}
		
		valid = {
			grants_migration_access = no
		}
		
		AI_weight = {
			modifier = {
				factor = 2
				has_valid_ai_personality = no
				OR = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}
			modifier = {
				factor = 2
				has_valid_ai_personality = yes
				NOT = { has_ai_personality_behaviour = multispecies }
			}			
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_xenophile"
				owner = {
					is_same_species = ROOT
				}
			}
			modifier = {
				add = -0.10
				pop_has_ethic = "ethic_fanatic_xenophile"
				owner = {
					is_same_species = ROOT
				}
			}
			modifier = {
				add = -0.05
				NOT = {
					pop_has_ethic = "ethic_xenophobe"
					pop_has_ethic = "ethic_fanatic_xenophobe"				
				}
				pop_has_ethic = "ethic_individualist"
				owner = {
					NOT = {
						is_same_species = ROOT
					}
				}
			}
			modifier = {
				add = -0.10
				pop_has_ethic = "ethic_fanatic_individualist"
				NOR = {
					pop_has_ethic = "ethic_xenophobe"
					pop_has_ethic = "ethic_fanatic_xenophobe"				
				}				
				owner = {
					NOT = {
						is_same_species = ROOT
					}
				}
			}
		}
	}
	
	option = {
		name = "migration_allowed_all"
		
		policy_flags = {
			migration_allowed_all
		}
		modifier = {}
		
		valid = {
			NOT = {
				has_ethic = "ethic_fanatic_xenophobe"
			}
		}
		
		AI_weight = {
			modifier = {
				factor = 2
				OR = {
					has_ethic = "ethic_individualist"
					has_ethic = "ethic_fanatic_individualist"
				}
			}
			modifier = {
				factor = 2
				has_valid_ai_personality = no
				OR = {
					has_ethic = "ethic_xenophile"
					has_ethic = "ethic_fanatic_xenophile"
				}
			}
			modifier = {
				factor = 2
				has_valid_ai_personality = yes
				has_ai_personality_behaviour = multispecies
			}			
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}
			modifier = {
				factor = 10
				has_ai_personality_behaviour = migrator
			}				
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_xenophobe"
				owner = {
					is_same_species = ROOT
				}
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_xenophobe"
				owner = {
					is_same_species = ROOT
				}
			}
		}
	}
}

resettlement = {
	potential = {
		always = yes
	}
	
	option = {
		name = "resettlement_not_allowed"
		
		policy_flags = {
			resettlement_not_allowed
		}
		
		AI_weight = {
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"				
					has_ethic = "ethic_collectivist"
					has_ethic = "ethic_fanatic_collectivist"
					has_government = "theocratic_oligarchy"
					has_government = "transcendent_oligarchy"	
				}
			}
		}
	}
	
	option = {
		name = "resettlement_allowed"
		
		policy_flags = {
			resettlement_allowed
		}
		modifier = {}
		
		valid = {
			NOR = {			
				has_ethic = ethic_individualist
				has_ethic = ethic_fanatic_individualist
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				NOR = {
					pop_has_ethic = "ethic_xenophobe"
					pop_has_ethic = "ethic_fanatic_xenophobe"					
					pop_has_ethic = "ethic_collectivist" 
					pop_has_ethic = "ethic_fanatic_collectivist"
					AND = {
						tile = {
							owner = {
								OR = {
									has_government = "theocratic_oligarchy"
									has_government = "transcendent_oligarchy"									
								}
							}
						}
						OR = {
							pop_has_ethic = "ethic_spiritualist" 
							pop_has_ethic = "ethic_fanatic_spiritualist"							
						}
					}
				}
			}
		}
		
		AI_weight = {
			modifier = {
				factor = 0
				NOR = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"
					has_ethic = "ethic_collectivist"
					has_ethic = "ethic_fanatic_collectivist"
					has_government = "theocratic_oligarchy"
					has_government = "transcendent_oligarchy"
				}
			}
			modifier = {
				factor = 10
				OR = {		
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"				
					has_ethic = "ethic_collectivist"
					has_ethic = "ethic_fanatic_collectivist"
					has_government = "theocratic_oligarchy"
					has_government = "transcendent_oligarchy"						
				}
			}
		}		
	}
}

voting_rights = {

	potential = {
		is_country_type = default   # only normal Empires should have this policy
	}
	
	option = {
		name = "voting_not_allowed"
		
		potential = {
			has_election_type = none
		}
		
		policy_flags = {
			voting_not_allowed
		}
		
		on_enabled = {
			# custom_tooltip = "policy_allow_slavery_effect_disable"
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_individualist"
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_individualist"
			}
		}
	}
	
	option = {
		name = "voting_allowed_elites_only"
		
		potential = {
			has_election_type = oligarchic
		}
		
		policy_flags = {
			voting_allowed_elites_only
		}
		
		on_enabled = {
			# custom_tooltip = "policy_allow_slavery_effect_disable"
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_fanatic_individualist"
			}
		}
	}
	
	option = {
		name = "voting_allowed_primary_only"
		
		policy_flags = {
			voting_allowed_primary_only
		}
		modifier = {}
		
		potential = {
			has_election_type = democratic
		}
		
		AI_weight = {
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_xenophile"
					has_ethic = "ethic_fanatic_xenophile"
				}
			}
			modifier = {
				factor = 2
				has_valid_ai_personality = no
				OR = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}
			modifier = {
				factor = 2
				has_valid_ai_personality = yes
				NOT = { has_ai_personality_behaviour = multispecies }
			}	
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_xenophile"
				owner = {
					is_same_species = ROOT
				}
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_xenophile"
				owner = {
					is_same_species = ROOT
				}
			}
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_collectivist"
				owner = {
					NOT = { is_same_species = ROOT }
				}
			}
			modifier = {
				add = -0.1
				NOT = {
					pop_has_ethic = "ethic_collectivist"
					pop_has_ethic = "ethic_fanatic_collectivist"
				}
				owner = {
					NOT = { is_same_species = ROOT }
				}
			}
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_individualist"
				NOT = {
					pop_has_ethic = "ethic_xenophobe"
					pop_has_ethic = "ethic_fanatic_xenophobe"				
				}				
				owner = {
					NOT = { is_same_species = ROOT }
				}
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_individualist"
				NOT = {
					pop_has_ethic = "ethic_xenophobe"
					pop_has_ethic = "ethic_fanatic_xenophobe"				
				}				
				owner = {
					NOT = { is_same_species = ROOT }
				}
			}
		}
	}
	
	option = {
		name = "voting_allowed_all"
		
		policy_flags = {
			voting_allowed_all
		}
		modifier = {}
		
		potential = {
			has_election_type = democratic
		}
			
		valid = {
			NOT = { 
				has_ethic = "ethic_fanatic_xenophobe"
			}
		}
		
		AI_weight = {
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}
			modifier = {
				factor = 2
				has_valid_ai_personality = no
				OR = {
					has_ethic = "ethic_xenophile"
					has_ethic = "ethic_fanatic_xenophile"
				}
			}
			modifier = {
				factor = 2
				has_valid_ai_personality = yes
				has_ai_personality_behaviour = multispecies
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_xenophobe"
				owner = {
					is_same_species = ROOT
				}
			}
		}
	}
}

leadership = {

	potential = {
		always = yes
	}
	
	option = {
		name = "leadership_primary_only"
		
		policy_flags = {
			leadership_allow_dominant_only
		}
		
		on_enabled = {
			# custom_tooltip = "policy_allow_slavery_effect_disable"
		}
		
		AI_weight = {
			modifier = {
				factor = 2
				has_valid_ai_personality = no
				OR = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}
			modifier = {
				factor = 2
				has_valid_ai_personality = yes
				NOT = { has_ai_personality_behaviour = multispecies }
			}		
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_xenophile"
					has_ethic = "ethic_fanatic_xenophile"
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				is_robot_pop = yes
			}			
			modifier = {
				add = -0.05
				is_robot_pop = no
				owner = {
					NOT = { 
						is_same_species = ROOT
					}
				}
			}
		}
	}
	
	option = {
		name = "leadership_allow_xeno"
		
		policy_flags = {
			leadership_allow_xeno
		}
		modifier = {}
		
		valid = {
			NOT = {
				has_ethic = "ethic_fanatic_xenophobe"
			}
		}
		
		AI_weight = {
			modifier = {
				factor = 2
				has_valid_ai_personality = no
				OR = {
					has_ethic = "ethic_xenophile"
					has_ethic = "ethic_fanatic_xenophile"
				}
			}
			modifier = {
				factor = 2
				has_valid_ai_personality = yes
				has_ai_personality_behaviour = multispecies
			}			
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}			
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				is_robot_pop = yes
			}			
			modifier = {
				add = -0.05
				NOT = {
					pop_has_ethic = "ethic_xenophobe"
					pop_has_ethic = "ethic_fanatic_xenophobe"
					pop_has_ethic = "ethic_xenophile"
					pop_has_ethic = "ethic_fanatic_xenophile"
				}
				owner = {
					is_same_species = ROOT
				}
			}			
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_xenophobe"
				owner = {
					is_same_species = ROOT
				}
			}
			modifier = {
				add = -0.2
				pop_has_ethic = "ethic_fanatic_xenophobe"
				owner = {
					is_same_species = ROOT
				}
			}
		}
		
		prerequisites = { tech_xeno_integration }
	}
	
	option = {
		name = "leadership_allow_robot"
		
		policy_flags = {
			leadership_allow_robot
		}
		modifier = {}
		
		prerequisites = { tech_synthetic_leaders }
		
		AI_weight = {
			modifier = {
				factor = 0
				has_valid_ai_personality = yes
				NOT = { has_ai_personality_behaviour = robot_liberator }
			}
			modifier = {
				factor = 10
				has_valid_ai_personality = yes
				has_ai_personality_behaviour = robot_liberator
			}			
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_spiritualist"
					has_ethic = "ethic_fanatic_spiritualist"
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				is_robot_pop = no
				NOR = {
					pop_has_ethic = "ethic_materialist"
					pop_has_ethic = "ethic_fanatic_materialist"					
				}
			}			
			modifier = {
				add = -0.05
				is_robot_pop = no
				pop_has_ethic = "ethic_fanatic_spiritualist"
			}
			modifier = {
				add = 0.3
				is_robot_pop = yes
			}
		}
	}
	
	option = {
		name = "leadership_allow_all"
		
		policy_flags = {
			leadership_allow_all
		}
		modifier = {}
		
		potential = {
			has_technology = tech_xeno_integration
			has_technology = tech_synthetic_leaders
		}
		
		valid = {
			NOT = {
				has_ethic = "ethic_fanatic_xenophobe"
			}
		}
		
		AI_weight = {
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_spiritualist"
					has_ethic = "ethic_fanatic_spiritualist"
				}
			}
			modifier = {
				factor = 4
				OR = {
					has_ethic = "ethic_xenophile"
					has_ethic = "ethic_fanatic_xenophile"
				}
				OR = {
					has_ethic = "ethic_materialist"
					has_ethic = "ethic_fanatic_materialist"
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_xenophobe"
				owner = {
					is_same_species = ROOT
				}
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_xenophobe"
				owner = {
					is_same_species = ROOT
				}
			}
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_spiritualist"
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_spiritualist"
			}
		}
	}
}

leader_enhancement = {

	potential = {
		has_technology = tech_selected_lineages
	}
	
	option = {
		name = "leader_enhancement_natural_selection"
		
		policy_flags = {
			leader_enhancement_natural_selection
		}
		
		on_enabled = {
			# custom_tooltip = "policy_allow_slavery_effect_disable"
		}
		
		modifier = {}
		
	}
	
	option = {
		name = "leader_enhancement_selected_lineages"
		
		policy_flags = {
			leader_enhancement_selected_lineages
		}
		modifier = {
			leader_skill_levels = 1
			leader_age = 25
			leader_influence_cost = 0.25
		}
		
		AI_weight = {
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_collectivist"
					has_ethic = "ethic_fanatic_collectivist"
				}
			}
			modifier = {
				factor = 2
				OR = {
					has_ethic = "ethic_individualist"
					has_ethic = "ethic_fanatic_individualist"
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_collectivist"
			}
			modifier = {
				add = -0.10
				pop_has_ethic = "ethic_fanatic_collectivist"
			}
		}
		
		prerequisites = { tech_selected_lineages }
	}
	
	option = {
		name = "leader_enhancement_capacity_boosters"
		
		policy_flags = {
			leader_enhancement_capacity_boosters
		}
		modifier = {
			leader_skill_levels = 2
			leader_age = 50
			leader_influence_cost = 0.50
		}
		
		prerequisites = { tech_capacity_boosters }
		
		AI_weight = {
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_collectivist"
					has_ethic = "ethic_fanatic_collectivist"
					has_ethic = "ethic_spiritualist"
					has_ethic = "ethic_fanatic_spiritualist"
				}
			}
			modifier = {
				factor = 2
				OR = {
					has_ethic = "ethic_individualist"
					has_ethic = "ethic_fanatic_individualist"
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_collectivist"
			}
			modifier = {
				add = -0.10
				pop_has_ethic = "ethic_fanatic_collectivist"
			}
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_spiritualist"
			}
			modifier = {
				add = -0.10
				pop_has_ethic = "ethic_fanatic_spiritualist"
			}
		}
	}
}

first_contact_protocol = {

	potential = {
		always = yes
	}
	
	option = {
		name = "first_contact_attack_not_allowed"
		
		policy_flags = {
			first_contact_attack_not_allowed
		}
		
		on_enabled = {
			# custom_tooltip = "policy_allow_slavery_effect_disable"
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.025
				pop_has_ethic = "ethic_xenophobe"
				owner = {
					is_same_species = ROOT
				}
				NOR = {
					has_ethic = "ethic_pacifist"
					has_ethic = "ethic_fanatic_pacifist"
				}
			}
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_fanatic_xenophobe"
				owner = {
					is_same_species = ROOT
				}
				NOR = {
					has_ethic = "ethic_pacifist"
					has_ethic = "ethic_fanatic_pacifist"
				}
			}
			modifier = {
				add = -0.025
				pop_has_ethic = "ethic_militarist"
				NOR = {
					has_ethic = "ethic_xenophile"
					has_ethic = "ethic_fanatic_xenophile"
				}
			}
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_fanatic_militarist"
				NOR = {
					has_ethic = "ethic_xenophile"
					has_ethic = "ethic_fanatic_xenophile"
				}					
			}
		}
	}
	
	option = {
		name = "first_contact_attack_allowed"
		
		policy_flags = {
			first_contact_attack_allowed
		}
		modifier = {}
		
		valid = {
			OR = {
				has_ethic = ethic_xenophobe
				has_ethic = ethic_fanatic_xenophobe
				has_ethic = ethic_militarist
				has_ethic = ethic_fanatic_militarist
				NOR = {
					has_ethic = ethic_fanatic_xenophile
					has_ethic = ethic_fanatic_pacifist
				}
			}
		}
		
				
		AI_weight = {
			modifier = {
				factor = 2
				OR = {
					has_ethic = "ethic_militarist"
					has_ethic = "ethic_fanatic_militarist"
				}
			}
			modifier = {
				factor = 2
				OR = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.025
				pop_has_ethic = "ethic_xenophile"
				NOR = {
					pop_has_ethic = "ethic_militarist"
					pop_has_ethic = "ethic_fanatic_militarist"
				}
			}
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_fanatic_xenophile"
				NOR = {
					pop_has_ethic = "ethic_militarist"
					pop_has_ethic = "ethic_fanatic_militarist"
				}
			}
			modifier = {
				add = -0.025
				pop_has_ethic = "ethic_pacifist"
				NOR = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_fanatic_pacifist"
				NOR = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}
		}
	}
}

artificial_intelligence_policy = {

	potential = {
		has_technology = tech_robotic_workers
	}
	
	option = {
		name = "ai_outlawed"

		potential = { NOT = { is_country_type = ai_empire } }

		valid = {
			custom_tooltip = {
				text = ai_accord_servitude_disallowed
				NOT = { has_country_flag = ai_accord }
			}
		}
		
		policy_flags = {
			ai_outlawed
		}
		
		on_enabled = {
			custom_tooltip = "ALL_ROBOTS_DISASSEMBLED"
		}
		AI_weight = {
			modifier = {
				factor = 0
				OR = {
					has_ai_personality_behaviour = robot_exploiter
					has_ai_personality_behaviour = robot_liberator
					has_ethic = "ethic_materialist"
					has_ethic = "ethic_fanatic_materialist"
				}
			}		
			modifier = {
				factor = 2
				OR = {
					has_ethic = "ethic_spiritualist"
					has_ethic = "ethic_fanatic_spiritualist"
				}
			}
			modifier = {
				factor = 0
				is_country_type = ai_empire
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_materialist"
				NOR = {
					pop_has_ethic = "ethic_xenophobe"
					pop_has_ethic = "ethic_fanatic_xenophobe"
				}
			}
			modifier = {
				add = -0.1
				pop_has_ethic = "ethic_fanatic_materialist"
				NOR = {
					pop_has_ethic = "ethic_xenophobe"
					pop_has_ethic = "ethic_fanatic_xenophobe"
				}
			}
		}
	}
	
	option = {
		name = "ai_servitude"

		potential = { NOT = { is_country_type = ai_empire } }

		valid = {
			custom_tooltip = {
				text = ai_accord_servitude_disallowed
				NOT = { has_country_flag = ai_accord }
			}
		}
		
		policy_flags = {
			ai_servitude
		}
		
		AI_weight = {
			modifier = {
				factor = 0
				has_valid_ai_personality = yes
				NOR = {
					has_ai_personality_behaviour = robot_exploiter
					has_ai_personality_behaviour = robot_liberator
					has_ethic = "ethic_materialist"
					has_ethic = "ethic_fanatic_materialist"					
				}
			}	
			modifier = {
				factor = 2
				has_valid_ai_personality = yes
				has_ai_personality_behaviour = robot_exploiter
			}				
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_spiritualist"
					has_ethic = "ethic_fanatic_spiritualist"
				}
			}
			modifier = {
				factor = 0
				is_country_type = ai_empire
			}
		}
		pop_happiness = {
			base = 0
		        modifier = {
				add = 0.05
				pop_has_ethic = "ethic_materialist"
			}
                        modifier = {
				add = 0.10
				pop_has_ethic = "ethic_fanatic_materialist"
			}
			modifier = {
				add = -0.05
				pop_has_ethic = "ethic_spiritualist"
			}
			modifier = {
				add = -0.10
				pop_has_ethic = "ethic_fanatic_spiritualist"
			}
			modifier = {
				add = -0.25
				is_robot_pop = yes
			}
		}
	}
	
	option = {
		name = "ai_full_rights"
		
		prerequisites = {
			"tech_synthetic_workers"
		}

		valid = {
			custom_tooltip = {
				text = ai_perfect_servants_rights_disallowed
				NOT = { has_country_flag = ai_perfect_servants }
			}
		}
		
		policy_flags = {
			ai_full_rights
		}
		
		modifier = {}
				
		AI_weight = {
			modifier = {
				factor = 0
				has_valid_ai_personality = yes
				NOT = { has_ai_personality_behaviour = robot_liberator }
			}	
			modifier = {
				factor = 2
				has_valid_ai_personality = yes
				has_ai_personality_behaviour = robot_liberator
			}	
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_spiritualist"
					has_ethic = "ethic_fanatic_spiritualist"
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_ethic = "ethic_xenophobe"
					has_ethic = "ethic_fanatic_xenophobe"
				}
			}
			modifier = {
				factor = 10
				is_country_type = ai_empire
			}
		}
		
		pop_happiness = {
			base = 0
			modifier = {
				add = -0.05
				is_robot_pop = no
				NOR = {
					owner = { has_country_flag = ai_accord }
					pop_has_ethic = "ethic_spiritualist"
					pop_has_ethic = "ethic_fanatic_spiritualist"
					pop_has_ethic = "ethic_xenophobe"
					pop_has_ethic = "ethic_fanatic_xenophobe"
					pop_has_ethic = "ethic_materialist"
					pop_has_ethic = "ethic_fanatic_materialist"					
				}
			}	
                        modifier = {
				add = 0.3
				is_robot_pop = yes			
			}
			modifier = {
				add = 0.2
				is_robot_pop = no
				pop_has_ethic = "ethic_materialist"
			}
			modifier = {
				add = 0.3
				is_robot_pop = no
				pop_has_ethic = "ethic_fanatic_materialist"
			}					
			modifier = {
				add = -0.1
				is_robot_pop = no
				owner = { NOT = { has_country_flag = ai_accord } }
				pop_has_ethic = "ethic_spiritualist"
			}
			modifier = {
				add = -0.2
				is_robot_pop = no
				owner = { NOT = { has_country_flag = ai_accord } }
				pop_has_ethic = "ethic_fanatic_spiritualist"
			}
			modifier = {
				add = -0.05
				is_robot_pop = no
				owner = { NOT = { has_country_flag = ai_accord } }
				pop_has_ethic = "ethic_xenophobe"
			}
			modifier = {
				add = -0.1
				is_robot_pop = no
				owner = { NOT = { has_country_flag = ai_accord } }
				pop_has_ethic = "ethic_fanatic_xenophobe"
			}
		}
	}
}

evolution = {

	potential = {
		has_technology = tech_synthetic_workers
                OR = {
			has_ethic = "ethic_materialist"
			has_ethic = "ethic_fanatic_materialist"
		}
        }
	option = {
		name = "status_quo"

		policy_flags = {
			status_quo
		}

	        potential = {
		        always = yes
                        NOT = {	
                           has_policy_flag = evolution_allow
                        }
                }

                AI_weight = {
			modifier = {
				factor = 2
			}
                }
                pop_happiness = {
			base = 0
                }
        }

	option = {
		name = "evolution_allow"

		policy_flags = {
			evolution_allow
		}

	        valid = {
                        NOT = {	
			   has_policy_flag = ai_outlawed
			   has_policy_flag = ai_servitude
			}
                }

                AI_weight = {
			modifier = {
				factor = 0
			}
		}  

                modify_species = {
			    species = ROOT
			    add_trait = trait_mechanical
		}

                modify_species = {
		 	    species = ROOT
			    add_trait = trait_robotic_3           
                }

                pop_happiness = {
			base = 0.2
                }
        }
}