targetted_decisions = {
	
	convert_to_liege_religion = {
		only_playable = yes
		
		filter = self
		ai_target_filter = self
		ai = no
		
		potential = {
			NOT = { culture = wilderness }
			is_playable = yes
			liege = {
				NOT = { character = ROOT }
				NOT = { religion = ROOT }
				religion_group = ROOT
			}
			controls_religion = no
			# only those with same race as liege or halves
			OR = {
				AND = { 
					OR = { 
						trait = elf_race
						trait = halfelf_race
					}
					liege = { trait = elf_race }
				}
				AND = { 
					OR = { 
						trait = dwarf_race
						trait = halfdwarf_race
					}
					liege = { trait = dwarf_race }
				}
				AND = { 
					OR = { 
						trait = halfling_race
						trait = halfhalfling_race
					}
					liege = { trait = halfling_race }
				}
				AND = { 
					OR = { 
						trait = gnome_race
						trait = halfgnome_race
					}
				}
				AND = { 
					trait = dryad_race
					liege = { trait = dryad_race }
				}
				AND = { 
					OR = { 
						trait = human_race 
						trait = halfelf_race 
						trait = halfdwarf_race 
						trait = halfhalfling_race 
						trait = halfgnome_race
					}
					liege = { trait = human_race }
				}
			}
		}
		allow = {
			NOT = { trait = zealous }
		}
		effect = {
			prestige = -500
			if = {
				limit = { higher_tier_than = BARON }
				religion_authority = {
					modifier = ruler_converted_from
				}
			}
			liege = {
				reverse_religion = ROOT
			}
			if = {
				limit = { higher_tier_than = BARON }
				hidden_tooltip = {
					religion_authority = {
						modifier = ruler_converted_to
					}
				}
			}
			piety = -200
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.0001
			}
		}
	}
	
	convert_to_liege_religion_on_liege = {
		only_playable = yes
		
		filter = liege
		ai_target_filter = liege
		ai_check_interval = 60
		
		from_potential = {
			ai = no
			is_playable = yes
			controls_religion = no
		}
		potential = {
			NOT = { character = FROM }
			NOT = { religion = FROM }
			religion_group = FROM
		}
		
		allow = {
			FROM = { NOT = { trait = zealous } }
		}
		
		effect = {
			FROM = {
				prestige = -500
				piety = 250
				if = {
					limit = { higher_tier_than = BARON }
					religion_authority = {
						modifier = ruler_converted_from
					}
				}
				religion = ROOT
				if = {
					limit = { higher_tier_than = BARON }
					hidden_tooltip = {
						religion_authority = {
							modifier = ruler_converted_to
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
	
	convert_to_liege_culture_on_liege = {
		only_playable = yes
		
		filter = liege
		ai_target_filter = liege
		ai_check_interval = 60
		
		from_potential = {
			is_playable = yes
		}
		
		potential = {
			NOT = { character = FROM }
			NOT = { culture = FROM }
		}
		allow = {
			FROM = { prestige = 200 }
		}
		effect = {
			FROM = {
				prestige = -200
				culture = ROOT
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
	
	convert_to_liege_culture = {
		only_playable = yes
		
		filter = self
		ai_target_filter = self
		ai_check_interval = 60
		
		potential = {
			NOT = { culture = wilderness }
			is_playable = yes
			liege = {
				NOT = { character = ROOT }
				NOT = { culture = ROOT }
			}
			# only those with same race as liege or halves
			OR = {
				AND = { 
					OR = { 
						trait = elf_race
						trait = halfelf_race
					}
					liege = { trait = elf_race }
				}
				AND = { 
					OR = { 
						trait = dwarf_race
						trait = halfdwarf_race
					}
					liege = { trait = dwarf_race }
				}
				AND = { 
					OR = {
						trait = halfling_race
						trait = halfhalfling_race
					}
					liege = { trait = halfling_race }
				}
				AND = { 
					OR = {
						trait = gnome_race
						trait = halfgnome_race
					}
					liege = { trait = gnome_race }
				}
				AND = { 
					trait = dryad_race
					liege = { trait = dryad_race }
				}
				AND = { 
					OR = { 
						trait = human_race 
						trait = halfelf_race 
						trait = halfdwarf_race
						trait = halfgnome_race
						trait = halfhalfling_race
					}
					liege = { trait = human_race }
				}
			}
		}
		allow = {
			prestige = 200
		}
		effect = {
			prestige = -200
			liege = {
				reverse_culture = ROOT
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.01
			}
			modifier = {
				factor = 0
				primary_title = {
					is_conquered = yes
					conquest_culture = ROOT
				}
			}
			modifier = {
				factor = 0
				any_vassal = {
					culture = ROOT
					OR = {
						tier = duke
						tier = king
						AND = {
							tier = count
							ROOT = { tier = duke }
						}
					}
				}
			}
		}
	}
	
	convert_to_local_culture = { 
		only_playable = yes
		ai_check_interval = 24
		
		filter = self
		ai_target_filter = self
		
		potential = {
			NOT = { culture = wilderness }
			is_playable = yes
			is_nomadic = no
			capital_scope = {
				NOT = { culture = ROOT }
			}
			OR = {
				independent = yes
				liege = {
					NOT = { culture = ROOT }
				}
			}
			holy_order = no
			mercenary = no
			has_dlc = "Rajas of India"
			# only humans with human culture capital and halves with either human or their race culture capital
			OR = {
				AND = {
					trait = human_race
					capital_scope = {
						OR = {
							culture_group = northern_group
							culture_group = southern_group
							culture_group = nilfgaardian_group
							culture_group = eastern_group
						}
					}
				}
				AND = {
					trait = halfelf_race
					capital_scope = {
						OR = {
							culture = aen_seidhe
							culture_group = northern_group
							culture_group = southern_group
							culture_group = nilfgaardian_group
							culture_group = eastern_group
						}
					}
				}
				AND = {
					trait = halfdwarf_race
					capital_scope = {
						OR = {
							culture = dwarven
							culture_group = northern_group
							culture_group = southern_group
							culture_group = nilfgaardian_group
							culture_group = eastern_group
						}
					}
				}
				AND = {
					trait = halfhalfling_race
					capital_scope = {
						OR = {
							culture = halfling
							culture_group = northern_group
							culture_group = southern_group
							culture_group = nilfgaardian_group
							culture_group = eastern_group
						}
					}
				}
				AND = {
					trait = halfgnome_race
					capital_scope = {
						OR = {
							culture = gnomish
							culture_group = northern_group
							culture_group = southern_group
							culture_group = nilfgaardian_group
							culture_group = eastern_group
						}
					}
				}
			}
		}
		allow = {
			prestige = 500
		}
		effect = {
			prestige = -500
			capital_scope = {
				reverse_culture = ROOT
			}
			hidden_tooltip = {
				any_child = {
					limit = {
						is_ruler = no
						liege = { character = ROOT }
					}
					culture = ROOT
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.25
			}
			modifier = {
				factor = 0
				primary_title = {
					is_conquered = yes
					conquest_culture = ROOT
				}
			}
			modifier = {
				factor = 0
				any_vassal = {
					culture = ROOT
					OR = {
						tier = duke
						tier = king
						AND = {
							tier = count
							ROOT = { tier = duke }
						}
					}
				}
			}
		}
	}
	
	convert_to_local_religion = {
		only_playable = yes
		
		filter = self
		ai_target_filter = self
		ai = no
		
		potential = {
			NOT = { culture = wilderness }
			is_playable = yes
			is_nomadic = no
			capital_scope = {
				NOT = { religion = ROOT }
			}
			OR = {
				independent = yes
				liege = {
					NOT = { religion = ROOT }
				}
			}
			
			controls_religion = no
			holy_order = no
			has_dlc = "Rajas of India"
			# only humans with human religion capital and halves with either human or their race religion capital
			OR = {
				AND = {
					trait = human_race
					capital_scope = {
						OR = {
							religion_group = northern_religions
							religion_group = southern_religions
							religion_group = eastern_religions
						}
					}
				}
				AND = {
					trait = halfelf_race
					capital_scope = {
						OR = {
							religion = dana_meadbh
							religion_group = northern_religions
							religion_group = southern_religions
							religion_group = eastern_religions
						}
					}
				}
				AND = {
					trait = halfdwarf_race
					capital_scope = {
						OR = {
							religion = dwarven_religion
							religion_group = northern_religions
							religion_group = southern_religions
							religion_group = eastern_religions
						}
					}
				}
				AND = {
					trait = halfgnome_race
					capital_scope = {
						OR = {
							religion = gnomish_religion
							religion_group = northern_religions
							religion_group = southern_religions
							religion_group = eastern_religions
						}
					}
				}
				AND = {
					trait = halfhalfling_race
					capital_scope = {
						OR = {
							religion = halfling_religion
							religion_group = northern_religions
							religion_group = southern_religions
							religion_group = eastern_religions
						}
					}
				}
			}
		}
		allow = {
			NOT = { trait = zealous }
			capital_scope = { ROOTs_religion_is_playable_trigger = yes }
			OR = {
				AND = {
					prestige = 500
					capital_scope = {
						true_religion_group = ROOT
					}
				}
				AND = {
					prestige = 1000
					capital_scope = {
						NOT = { true_religion_group = ROOT }
					}
				}
			}
		}
		effect = {
			if = {
				limit = {
					capital_scope = {
						NOT = { true_religion_group = ROOT }
					}
				}
				prestige = -1000
			}
			if = {
				limit = {
					capital_scope = {
						true_religion_group = ROOT
					}
				}
				prestige = -500
			}
			piety = 250
			religion_authority = {
				modifier = ruler_converted_from
			}
			
			# Sympathy traits
			
			capital_scope = {
				reverse_religion = ROOT
			}
			custom_tooltip = { text = local_religion_conversion_tooltip }
			hidden_tooltip = {
				capital_scope = {
					reverse_religion = ROOT
				}
			}
			hidden_tooltip = {
				religion_authority = {
					modifier = ruler_converted_to
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.0001
			}
			
			modifier = {
				factor = 0
				capital_scope = {
					religion = druidic # Only via special events
				}
			}
		}
	}
	
	convert_to_parent_religion = {
		only_playable = yes
		
		filter = self
		ai_target_filter = self
		ai = no
		
		potential = {
			is_playable = yes
			independent = yes
			controls_religion = no
			is_heretic = yes
		}
		allow = {
			NOT = { trait = zealous }
		}
		effect = {
			prestige = -500
			piety = 250
			if = {
				limit = { higher_tier_than = BARON }
				religion_authority = {
					modifier = ruler_converted_from
				}
			}
			
			abandon_heresy = yes
			
			if = {
				limit = { higher_tier_than = BARON }
				hidden_tooltip = {
					religion_authority = {
						modifier = ruler_converted_to
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}

	# Carolingian renaissance - Old Frankish conversion to French
	
			
			
	
	# Pictish character may convert to Scottish
			
			
	
	# Arabic or Visigothic character may convert to Andalusian

	# Visigothic character may convert to Castillan
			
			

	# Visigothic character may convert to catalan
			
			

	# Suebi or Visigothic character may convert to Portuguese
			
			
	
	# Old Frankish or Old Saxon character may convert to dutch
			
			
	
	# Lombard character may convert to italian
			

			
	
	# Visigothic character may convert to occitan
			
			

	# East Slavic character may convert to Russian
			
			

	# Byzantine Emperor may renounce Iconoclasm
	
	convert_to_spouse_religion= {
		only_playable = yes
		filter = home_court
		ai_target_filter = home_court
		ai_check_interval = 60
	
		from_potential = {
			ai = no
			is_playable = yes
			religion_group = pagan_group
			controls_religion = no
		}
		
		potential = {
			OR = {
				spouse = {
					character = FROM
				}
				consort = {
					character = FROM
				}
			}
			is_alive = yes
		}
		
		allow = {
			FROM = { NOT = { trait = zealous } }
		}
		
		effect = {
			FROM = {
				prestige = -500
				religion_authority = {
					modifier = ruler_converted_from
				}
			
				if = {
					limit = {
						trait = cynical
					}
					random = {
						chance = 60
						add_trait = sympathy_pagans
					}
				}
				if = {
					limit = {
						NOT = { trait = cynical }
					}
					random = {
						chance = 50
						add_trait = sympathy_pagans
					}
				}		
			
				religion = ROOT
				
				hidden_tooltip = {
					religion_authority = {
						modifier = ruler_converted_to
					}
				}
				piety = 200
			}
		}
		
		revoke_allowed = {
			always = no
		}
		
		ai_will_do = {
			factor = 0
		}
	}
}	

decisions = {
	
	# Weak or unreformed religions are allowed to convert to the attacker's religion when under Holy War
	# convert_to_attacker_religion = {
		
	#}
	
	# Byzantine Emperor may renounce Iconoclasm
	# renounce_iconoclasm = {
		
	#}
}
