decisions = {
	convert_to_capital_religion = {
		only_playable = yes
		potential = {
			is_playable = yes
			controls_religion = no
			NOT = { rightful_religious_head = ROOT }
			is_nomadic = no
			mercenary = no
			capital_scope = {
				NOT = { religion = ROOT }
				religion_group = ROOT
				NOT = {
					ROOT = {
						liege = {
							religion = PREVPREV
						}
					}
				}
			}
			NOT = { has_character_flag = converted_religion }
			NAND = {
				has_dlc = "Charlemagne"
				has_landed_title = e_byzantium  # May instead renounce iconoclasm
				has_landed_title = c_byzantion
				religion = iconoclast
				capital_scope = { religion = chalcedonian }
			}
		}
		allow = {
			NOT = { trait = zealous }
		}
		effect = {
			piety = -100
			if = {
				limit = {
					religion_group = christian
					NOT = { trait = sympathy_christendom }
					capital_scope = {
						NOT = { religion_group = ROOT }
					}
				}
				random = {
					chance = 60
					add_trait = sympathy_christendom
				}
			}
			if = {
				limit = {
					religion_group = muslim
					NOT = { trait = sympathy_islam }
					capital_scope = {
						NOT = { religion_group = ROOT }
					}
				}
				random = {
					chance = 60
					add_trait = sympathy_islam
				}
			}
			if = {
				limit = {
					is_pagan_religion = yes
					NOT = { trait = sympathy_pagans }
					capital_scope = {
						NOT = { religion_group = ROOT }
					}
				}
				random = {
					chance = 60
					add_trait = sympathy_pagans
				}
			}
			if = {
				limit = {
					religion_group = zoroastrian_group
					NOT = { trait = sympathy_zoroastrianism }
					capital_scope = {
						NOT = { religion_group = ROOT }
					}
				}
				random = {
					chance = 60
					add_trait = sympathy_zoroastrianism
				}
			}
			if = {
				limit = {
					religion_group = jewish_group
					NOT = { trait = sympathy_judaism }
					capital_scope = {
						NOT = { religion_group = ROOT }
					}
				}
				random = {
					chance = 60
					add_trait = sympathy_judaism
				}
			}
			if = {
				limit = { higher_tier_than = BARON }
				religion_authority = {
					modifier = ruler_converted_from
				}
			}
			capital_scope = {
				reverse_religion = ROOT
			}
			add_character_modifier = { name = recently_converted duration = 730}
			if = {
				limit = { higher_tier_than = BARON }
				hidden_tooltip = {
					religion_authority = {
						modifier = ruler_converted_to
					}
				}
			}
			hidden_tooltip = {
				any_courtier = {
					limit = {
						is_adult = no
						is_ruler = no
						dynasty = ROOT
					}
					religion = ROOT
				}
			}
			set_character_flag = converted_religion
		}
		ai_will_do = {
			factor = 0
		}
	}

	convert_to_capital_culture = {
		potential = {
			ai = no
			is_nomadic = no
			mercenary = no
			capital_scope = {
				NOT = { culture = ROOT }
				NOT = {
					ROOT = {
						liege = {
							culture = PREVPREV
						}
					}
				}
			}
			OR = {
				NOT = { culture = norse }
				capital_scope = {
					NOT = {
						culture = swedish
						culture = norwegian
						culture = danish
						culture = icelandic
						culture = norman
					}
				}
			}
			NOT = { has_character_flag = converted_culture }
		}
		allow = {
			prestige = 100
		}
		effect = {
			prestige = -100
			capital_scope = {
				reverse_culture = ROOT
			}
			hidden_tooltip = {
				any_courtier = {
					limit = {
						is_ruler = no
						dynasty = ROOT
					}
					culture = ROOT
				}
			}
			set_character_flag = converted_culture
		}
		ai_will_do = {
			factor = 0
		}
	}
	
	convert_to_roman = {
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			NOT = { culture = roman }
			has_landed_title = e_roman_empire
		}
		allow = {
			ruled_years = 5
		}
		effect = {
			culture = roman
			any_courtier = {
				limit = {
					is_ruler = no
					dynasty = ROOT
				}
				culture = roman
			}
			capital_scope = {
				culture = roman
				add_province_modifier = {
					name = recent_culture_change
					duration = -1
				}
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 2
					culture = roman
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 4
					culture = roman
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 6
					culture = roman
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 8
					culture = roman
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 10
					culture = roman
				}
			}
		}
	}

	convert_to_icelandic = {
		only_rulers = yes
		ai_check_interval = 12
		potential = {
			culture = norse
			is_ruler = yes
			capital_scope = {
				region = custom_north_sea
			}
			any_realm_province = {
				culture = icelandic
			}
		}
		allow = {
			culture = norse
		}
		effect = {
			culture = icelandic
			any_courtier = {
				limit = {
					culture = norse
					is_ruler = no
					dynasty = ROOT
				}
				culture = icelandic
			}
		}
		ai_will_do = {
			factor = 1

			modifier = {
				factor = 0.1
				capital_scope = {
					NOT = { region = custom_north_sea }
				}
			}
			modifier = { # Do not flip if we're in a huge Norse empire
				factor = 0
				top_liege = { culture = norse }
				top_liege = { tier = emperor }
			}
			modifier = {
				factor = 0.01
				capital_scope = {
					NOT = { culture = icelandic }
				}
			}
			modifier = {
				factor = 2.0
				liege = { culture = icelandic }
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 2
					culture = icelandic
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 4
					culture = icelandic
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 6
					culture = icelandic
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 8
					culture = icelandic
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 10
					culture = icelandic
				}
			}
		}
	}

	gone_pagan_zoroastrian = {
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			OR = {
				ai = yes
				has_dlc = "The Old Gods"
			}
			zoroastrian_culture_trigger = yes
			is_adult = yes
			is_heretic = no
			controls_religion = no
			NOT = { rightful_religious_head = ROOT }
			OR = {
				is_ruler = no
				NOT = { capital_holding = { holding_type = temple } }
			}
			OR = {
				ai = yes
				has_character_flag = seeks_pagan_knowledge
			}
			NOT = {
				religion = zoroastrian
				religion = jewish
				is_pagan_religion = yes
				has_character_modifier = voice_of_jesus
				has_character_modifier = voice_of_satan
				has_character_flag = gone_pagan
			}
			is_not_busy_trigger = yes
		}
		
		allow = {
			war = no
			in_command_trigger = no
			prisoner = no
			trait = sympathy_zoroastrianism
			OR = {
				custom_tooltip = {
					text = RECEIVED_INSTRUCTION_MYSTIC
					hidden_tooltip = { has_character_flag = may_go_pagan }
				}
				any_liege = { religion = zoroastrian }
			}
			OR = {
				trait = mystic
				trait = cynical
			}
			NOT = {
				trait = zealous
				trait = incapable
			}
			has_secret_religion = no
		}
		
		effect = {
			set_character_flag = gone_pagan
			character_event = { id = GoPagan.100 tooltip = CONSIDER_RELIGION_CHANGE } 
		}
		
		ai_will_do = {
			factor = 1

			modifier = {
				factor = 0
				religion_authority = 0.5
			}
			modifier = {
				factor = 0
				NOT = {
					AND = {
						any_demesne_province = { religion_group = zoroastrian_group }
						NOT = { religion_authority = 0.20 }
					}
					NOT = { religion_authority = 0.10 }
					AND = {
						NOT = { religion_authority = 0.40 }
						trait = lunatic
					}
				}
			}
		}
	}
	
	gone_pagan_celtic_norse = {
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			OR = {
				ai = yes
				has_dlc = "The Old Gods"
			}
			OR = {
				celtic_pagan_culture_trigger = yes
				norse_pagan_culture_trigger = yes
				german_pagan_culture_trigger = yes
			}
			is_adult = yes
			is_heretic = no
			controls_religion = no
			NOT = { rightful_religious_head = ROOT }
			OR = {
				is_ruler = no
				NOT = { capital_holding = { holding_type = temple } }
			}
			OR = {
				ai = yes
				has_character_flag = seeks_pagan_knowledge
			}
			NOT = {
				religion = zoroastrian
				religion = jewish
				is_pagan_religion = yes
				has_character_modifier = voice_of_jesus
				has_character_modifier = voice_of_satan
				has_character_flag = gone_pagan
			}
			is_not_busy_trigger = yes
		}
		
		allow = {
			war = no
			in_command_trigger = no
			prisoner = no
			trait = sympathy_pagans
			OR = {
				custom_tooltip = {
					text = RECEIVED_INSTRUCTION_MYSTIC
					hidden_tooltip = { has_character_flag = may_go_pagan }
				}
				any_liege = { is_pagan_religion = yes }
			}
			OR = {
				trait = mystic
				trait = cynical
			}
			NOT = {
				trait = zealous
				trait = incapable
			}
			has_secret_religion = no
		}
		
		effect = {
			set_character_flag = gone_pagan
			character_event = { id = GoPagan.100 tooltip = CONSIDER_RELIGION_CHANGE } 
		}
		
		ai_will_do = {
			factor = 1

			modifier = {
				factor = 0
				religion_authority = 0.5
			}
			modifier = {
				factor = 0
				NOT = {
					AND = {
						any_demesne_province = {
							OR = { # Make sure only the culturally relevant religion lowers the MA cost
								AND = {
									religion = celtic_pagan
									ROOT = {
										celtic_pagan_culture_trigger = yes
									}
								}
								AND = {
									religion = norse_pagan
									ROOT = {
										norse_pagan_culture_trigger = yes
									}
								}
								AND = {
									religion = german_pagan
									ROOT = {
										german_pagan_culture_trigger = yes
									}
								}
							}
						}
						NOT = { religion_authority = 0.20 }
					}
					NOT = { religion_authority = 0.10 }
					AND = {
						NOT = { religion_authority = 0.40 }
						trait = lunatic
					}
				}
			}
		}
	}
	
	gone_pagan_baltic_finnic = {
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			OR = {
				ai = yes
				has_dlc = "The Old Gods"
			}
			OR = {
				 baltic_pagan_culture_trigger = yes
				 finnish_pagan_culture_trigger = yes
			}
			is_adult = yes
			is_heretic = no
			controls_religion = no
			NOT = { rightful_religious_head = ROOT }
			OR = {
				is_ruler = no
				NOT = { capital_holding = { holding_type = temple } }
			}
			OR = {
				ai = yes
				has_character_flag = seeks_pagan_knowledge
			}
			NOT = {
				religion = zoroastrian
				religion = jewish
				is_pagan_religion = yes
				has_character_modifier = voice_of_jesus
				has_character_modifier = voice_of_satan
				has_character_flag = gone_pagan
			}
			is_not_busy_trigger = yes
		}
		
		allow = {
			war = no
			in_command_trigger = no
			prisoner = no
			trait = sympathy_pagans
			OR = {
				custom_tooltip = {
					text = RECEIVED_INSTRUCTION_MYSTIC
					hidden_tooltip = { has_character_flag = may_go_pagan }
				}
				any_liege = { is_pagan_religion = yes }
			}
			OR = {
				trait = mystic
				trait = cynical
			}
			NOT = {
				trait = zealous
				trait = incapable
			}
			has_secret_religion = no
		}
		
		effect = {
			set_character_flag = gone_pagan
			character_event = { id = GoPagan.100 tooltip = CONSIDER_RELIGION_CHANGE }  
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				religion_authority = 0.5
			}
			modifier = {
				factor = 0
				NOT = {
					AND = {
						any_demesne_province = {
							OR = {
								AND = {
									religion = baltic_pagan
									ROOT = {
										baltic_pagan_culture_trigger = yes
									}
								}
								AND = {
									religion = finnish_pagan
									ROOT = { finnish_pagan_culture_trigger = yes }
								}
							}
						}
						NOT = { religion_authority = 0.20 }
					}
					NOT = { religion_authority = 0.10 }
					AND = {
						NOT = { religion_authority = 0.40 }
						trait = lunatic
					}
				}
			}
		}
	}
	
	gone_pagan_tengri = {
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			OR = {
				ai = yes
				has_dlc = "The Old Gods"
			}
			tengri_pagan_culture_trigger = yes
			is_adult = yes
			is_heretic = no
			controls_religion = no
			NOT = { rightful_religious_head = ROOT }
			OR = {
				is_ruler = no
				NOT = { capital_holding = { holding_type = temple } }
			}
			OR = {
				ai = yes
				has_character_flag = seeks_pagan_knowledge
			}
			NOT = {
				religion = zoroastrian
				religion = jewish
				is_pagan_religion = yes
				has_character_modifier = voice_of_jesus
				has_character_modifier = voice_of_satan
				has_character_flag = gone_pagan
			}
			is_not_busy_trigger = yes
		}
		
		allow = {
			war = no
			in_command_trigger = no
			prisoner = no
			trait = sympathy_pagans
			OR = {
				custom_tooltip = {
					text = RECEIVED_INSTRUCTION_MYSTIC
					hidden_tooltip = { has_character_flag = may_go_pagan }
				}
				any_liege = { is_pagan_religion = yes }
			}
			OR = {
				trait = mystic
				trait = cynical
			}
			NOT = {
				trait = zealous
				trait = incapable
			}
			has_secret_religion = no
		}
		
		effect = {
			set_character_flag = gone_pagan
			character_event = { id = GoPagan.100 tooltip = CONSIDER_RELIGION_CHANGE } 
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				religion_authority = 0.5
			}
			modifier = {
				factor = 0
				NOT = {
					AND = {
						any_demesne_province = { religion = tengri_pagan }
						ROOT = {
							tengri_pagan_culture_trigger = yes
						}
						NOT = { religion_authority = 0.20 }
					}
					NOT = { religion_authority = 0.10 }
					AND = {
						NOT = { religion_authority = 0.40 }
						trait = lunatic
					}
				}
			}
		}
	}	

	gone_pagan_slavic = {
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			OR = {
				ai = yes
				has_dlc = "The Old Gods"
			}
			slavic_pagan_culture_trigger = yes
			is_adult = yes
			is_heretic = no
			controls_religion = no
			NOT = { rightful_religious_head = ROOT }
			OR = {
				is_ruler = no
				NOT = { capital_holding = { holding_type = temple } }
			}
			OR = {
				ai = yes
				has_character_flag = seeks_pagan_knowledge
			}
			NOT = {
				religion = zoroastrian
				religion = jewish
				is_pagan_religion = yes
				has_character_modifier = voice_of_jesus
				has_character_modifier = voice_of_satan
				has_character_flag = gone_pagan
			}
			is_not_busy_trigger = yes
		}
		
		allow = {
			war = no
			in_command_trigger = no
			prisoner = no
			trait = sympathy_pagans
			OR = {
				custom_tooltip = {
					text = RECEIVED_INSTRUCTION_MYSTIC
					hidden_tooltip = { has_character_flag = may_go_pagan }
				}
				any_liege = { is_pagan_religion = yes }
			}
			OR = {
				trait = mystic
				trait = cynical
			}
			NOT = {
				trait = zealous
				trait = incapable
			}
			has_secret_religion = no
		}
		
		effect = {
			set_character_flag = gone_pagan
			character_event = { id = GoPagan.100 tooltip = CONSIDER_RELIGION_CHANGE } 
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				religion_authority = 0.5
			}
			modifier = {
				factor = 0
				NOT = {
					AND = {
						any_demesne_province = { religion = slavic_pagan }
						NOT = { religion_authority = 0.20 }
					}
					NOT = { religion_authority = 0.10 }
					AND = {
						NOT = { religion_authority = 0.40 }
						trait = lunatic
					}
				}
			}
		}
	}

	gone_pagan_african = {
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			OR = {
				ai = yes
				has_dlc = "The Old Gods"
			}
			OR = {
				berber_pagan_culture_trigger = yes
				arab_pagan_culture_trigger = yes
				west_african_culture_trigger = yes
			}
			is_adult = yes
			is_heretic = no
			controls_religion = no
			NOT = { rightful_religious_head = ROOT }
			OR = {
				is_ruler = no
				NOT = { capital_holding = { holding_type = temple } }
			}
			OR = {
				ai = yes
				has_character_flag = seeks_pagan_knowledge
			}
			NOT = {
				religion = zoroastrian
				religion = jewish
				is_pagan_religion = yes
				has_character_modifier = voice_of_jesus
				has_character_modifier = voice_of_satan
				has_character_flag = gone_pagan
			}
			is_not_busy_trigger = yes
		}
		
		allow = {
			war = no
			in_command_trigger = no
			prisoner = no
			trait = sympathy_pagans
			OR = {
				custom_tooltip = {
					text = RECEIVED_INSTRUCTION_MYSTIC
					hidden_tooltip = { has_character_flag = may_go_pagan }
				}
				any_liege = { is_pagan_religion = yes }
			}
			OR = {
				trait = mystic
				trait = cynical
			}
			NOT = {
				trait = zealous
				trait = incapable
			}
			has_secret_religion = no
		}
		
		effect = {
			set_character_flag = gone_pagan
			character_event = { id = GoPagan.100 tooltip = CONSIDER_RELIGION_CHANGE }  
		}
				
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				religion_authority = 0.5
			}
			modifier = {
				factor = 0
				OR = {
					AND = {
						any_demesne_province = {
							OR = {
								AND = {	
									religion = west_african_pagan
									ROOT = { west_african_culture_trigger = yes }
								}
								AND = {
									religion = arab_pagan
									ROOT = {
										arab_pagan_culture_trigger = yes
									}
								}
								AND = {
									religion = berber_pagan
									ROOT = {
										berber_pagan_culture_trigger = yes
									}
								}
							}
						}
						NOT = { religion_authority = 0.20 }
					}
					NOT = { religion_authority = 0.10 }
					AND = {
						NOT = { religion_authority = 0.40 }
						trait = lunatic
					}
				}
			}
		}
	}

	gone_pagan_egyptian = {
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			OR = {
				ai = yes
				has_dlc = "The Old Gods"
			}
			egyptian_pagan_culture_trigger = yes
			is_adult = yes
			is_heretic = no
			controls_religion = no
			NOT = { rightful_religious_head = ROOT }
			OR = {
				is_ruler = no
				NOT = { capital_holding = { holding_type = temple } }
			}
			OR = {
				ai = yes
				has_character_flag = seeks_pagan_knowledge
			}
			NOT = {
				religion = zoroastrian
				religion = jewish
				is_pagan_religion = yes
				has_character_modifier = voice_of_jesus
				has_character_modifier = voice_of_satan
				has_character_flag = gone_pagan
			}
			is_not_busy_trigger = yes
		}
		
		allow = {
			war = no
			in_command_trigger = no
			prisoner = no
			trait = sympathy_pagans
			OR = {
				custom_tooltip = {
					text = RECEIVED_INSTRUCTION_MYSTIC
					hidden_tooltip = { has_character_flag = may_go_pagan }
				}
				any_liege = { is_pagan_religion = yes }
			}
			OR = {
				trait = mystic
				trait = cynical
			}
			NOT = {
				trait = zealous
				trait = incapable
			}
			has_secret_religion = no
		}
		
		effect = {
			set_character_flag = gone_pagan
			character_event = { id = GoPagan.100 tooltip = CONSIDER_RELIGION_CHANGE } 
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				religion_authority = 0.5
			}
			modifier = {
				factor = 0
				NOT = {
					AND = {
						any_demesne_province = { religion = egyptian_pagan }
						NOT = { religion_authority = 0.20 }
					}
					NOT = { religion_authority = 0.10 }
					AND = {
						NOT = { religion_authority = 0.40 }
						trait = lunatic
					}
				}
			}
		}
	}
	
	gone_pagan_judaic = {
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			OR = {
				ai = yes
				has_dlc = "Sons of Abraham"
			}
			jewish_pagan_culture_trigger = yes
			is_adult = yes
			is_heretic = no
			controls_religion = no
			NOT = { rightful_religious_head = ROOT }
			OR = {
				is_ruler = no
				NOT = { capital_holding = { holding_type = temple } }
			}
			OR = {
				ai = yes
				has_character_flag = seeks_pagan_knowledge
			}
			NOT = {
				religion = zoroastrian
				is_pagan_religion = yes
				has_character_modifier = voice_of_jesus
				has_character_modifier = voice_of_satan
				has_character_flag = gone_pagan
			}
			is_not_busy_trigger = yes
		}
		
		allow = {
			war = no
			in_command_trigger = no
			prisoner = no
			OR = {
				trait = sympathy_judaism
				trait = sympathy_pagans
			}
			OR = {
				custom_tooltip = {
					text = RECEIVED_INSTRUCTION_MYSTIC
					hidden_tooltip = { has_character_flag = may_go_pagan }
				}
				any_liege = { religion = jewish }
				any_liege = { religion = jewish_pagan }
			}
			OR = {
				trait = mystic
				trait = cynical
			}
			NOT = {
				trait = zealous
				trait = incapable
			}
			has_secret_religion = no
		}
		
		effect = {
			set_character_flag = gone_pagan
			character_event = { id = GoPagan.100 tooltip = CONSIDER_RELIGION_CHANGE } 
		}
		
		ai_will_do = {
			factor = 1

			modifier = {
				factor = 0
				religion_authority = 0.5
			}
			modifier = {
				factor = 0
				NOT = {
					AND = {
						any_demesne_province = {
							OR = {
								religion_group = jewish_group
								religion = jewish_pagan
							}
						}
						NOT = { religion_authority = 0.20 }
					}
					NOT = { religion_authority = 0.10 }
					AND = {
						NOT = { religion_authority = 0.40 }
						trait = lunatic
					}
				}
			}
		}
	}	
	
	gone_pagan_hellenic = {
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			OR = {
				ai = yes
				has_dlc = "The Old Gods"
			}
			OR = {
				roman_pagan_culture_trigger = yes
				hellenic_pagan_culture_trigger = yes
			}
			is_adult = yes
			is_heretic = no
			controls_religion = no
			NOT = { rightful_religious_head = ROOT }
			OR = {
				is_ruler = no
				NOT = { capital_holding = { holding_type = temple } }
			}
			OR = {
				ai = yes
				has_character_flag = seeks_pagan_knowledge
			}
			NOT = {
				religion = zoroastrian
				religion = jewish
				is_pagan_religion = yes
				has_character_modifier = voice_of_jesus
				has_character_modifier = voice_of_satan
				has_character_flag = gone_pagan
			}
			is_not_busy_trigger = yes
		}
		
		allow = {
			war = no
			in_command_trigger = no
			prisoner = no
			trait = sympathy_pagans
			OR = {
				custom_tooltip = {
					text = RECEIVED_INSTRUCTION_MYSTIC
					hidden_tooltip = { has_character_flag = may_go_pagan }
				}
				any_liege = { is_pagan_religion = yes }
			}
			OR = {
				trait = mystic
				trait = cynical
			}
			NOT = {
				trait = zealous
				trait = incapable
			}
			has_secret_religion = no
		}
		
		effect = {
			set_character_flag = gone_pagan
			character_event = { id = GoPagan.100 tooltip = CONSIDER_RELIGION_CHANGE } 
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				religion_authority = 0.5
			}
			modifier = {
				factor = 0
				NOT = {
					AND = {
						any_demesne_province = { religion_group = hellenic_pagan_group }
						NOT = { religion_authority = 0.20 }
					}
					NOT = { religion_authority = 0.10 }
					AND = {
						NOT = { religion_authority = 0.40 }
						trait = lunatic
					}
				}
			}
		}
	}

	gone_pagan_zun = {
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			OR = {
				ai = yes
				AND = {
					has_dlc = "The Old Gods"
					has_dlc = "Charlemagne"
				}
			}
			zun_pagan_culture_trigger = yes
			is_adult = yes
			is_heretic = no
			controls_religion = no
			NOT = { rightful_religious_head = ROOT }
			OR = {
				is_ruler = no
				NOT = { capital_holding = { holding_type = temple } }
			}
			OR = {
				ai = yes
				has_character_flag = seeks_pagan_knowledge
			}
			NOT = {
				religion = zoroastrian
				religion = jewish
				is_pagan_religion = yes
				has_character_modifier = voice_of_jesus
				has_character_modifier = voice_of_satan
				has_character_flag = gone_pagan
			}
			is_not_busy_trigger = yes
		}
		
		allow = {
			war = no
			in_command_trigger = no
			prisoner = no
			trait = sympathy_pagans
			OR = {
				custom_tooltip = {
					text = RECEIVED_INSTRUCTION_MYSTIC
					hidden_tooltip = { has_character_flag = may_go_pagan }
				}
				any_liege = { is_pagan_religion = yes }
			}
			OR = {
				trait = mystic
				trait = cynical
			}
			NOT = {
				trait = zealous
				trait = incapable
			}
			has_secret_religion = no
		}
		
		effect = {
			set_character_flag = gone_pagan
			character_event = { id = GoPagan.100 tooltip = CONSIDER_RELIGION_CHANGE } 
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				religion_authority = 0.5
			}
			modifier = {
				factor = 0
				NOT = {
					AND = {
						any_demesne_province = { religion = egyptian_pagan }
						NOT = { religion_authority = 0.20 }
					}
					NOT = { religion_authority = 0.10 }
					AND = {
						NOT = { religion_authority = 0.40 }
						trait = lunatic
					}
				}
			}
		}
	}
	
	# Bolghar character may convert to bulgarian
	convert_to_bulgarian = {
		only_rulers = yes
		ai_check_interval = 12
		potential = {
			is_ruler = yes
			culture = bolghar
			capital_scope = {
				OR = {
					region = world_europe_south_east
					region = custom_wallachia
				}
			}
			any_realm_province = {
				culture = bulgarian
			}
			OR = {
				year = 786
				top_liege = {
					NOT = { culture = bolghar }
				}
			}
		}
		allow = {
			culture = bolghar
			any_realm_province = {
				culture = bulgarian
			}
		}
		effect = {
			culture = bulgarian
			any_courtier = {
				limit = {
					culture = ROOT
					employer = { character = ROOT }
					dynasty = ROOT
				}
				culture = bulgarian
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				top_liege = { culture = bolghar }
			}
			modifier = {
				factor = 0.1
				capital_scope = {
					NOT = { culture = bulgarian }
				}
			}
			modifier = {
				factor = 2.0
				liege = { culture = bulgarian }
			}
			modifier = {
				factor = 2
				num_culture_realm_provs = {
					value = 2
					culture = bulgarian
				}
			}
			modifier = {
				factor = 2
				num_culture_realm_provs = {
					value = 4
					culture = bulgarian
				}
			}
			modifier = {
				factor = 2
				num_culture_realm_provs = {
					value = 6
					culture = bulgarian
				}
			}
		}
	}
	
	convert_to_imperial_german = {
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			NOT = { has_global_flag = vanilla_germans } # Player disable split Germans, no need to re-unite
			NOT = { has_global_flag = unified_german_edict_information }
			german_cultures_trigger = yes
			OR = {
				has_landed_title = e_hre
				has_landed_title = e_germany
				has_landed_title = e_roman_empire
			}
			OR = {
				has_global_flag = german_split_begun
				has_global_flag = millenium_start
			}
		}
		allow = {
			custom_tooltip = {
				text = COMPLETELY_CONTROLS_GERMANIA_REGION
				hidden_tooltip = {
					completely_controls_region = world_europe_west_germania
				}
			}
			OR = {
				AND = {
					has_landed_title = e_hre
					trait = crowned_by_pope
				}
				AND = {
					has_landed_title = e_roman_empire
					prestige = 1000
				}
				AND = {
					trait = crowned
					prestige = 1000
				}
			}
			primary_title = { has_law = crown_authority_4 }
		}
		effect = {
			set_global_flag = unified_german_edict_information
			culture = imperial_german
			any_courtier = {
				limit = {
					is_ruler = no
					dynasty = ROOT
				}
				culture = imperial_german
			}
			capital_scope = {
				culture = imperial_german
				add_province_modifier = {
					name = recent_culture_change
					duration = -1
				}
			}
			character_event = { id = Plus.3651 } #Inform player what it does
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 2
					culture = imperial_german
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 4
					culture = imperial_german
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 6
					culture = imperial_german
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 8
					culture = imperial_german
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 10
					culture = imperial_german
				}
			}
		}
	}
	
	convert_vassals_to_imperial_german = {
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			#NOT = { has_global_flag = vanilla_germans } # Player disable split Germans, no need to re-unite
			NOT = { has_character_flag = attempted_imp_german_conversion  }
			has_global_flag = unified_german_edict_information
			#german_cultures_trigger = yes
			#OR = {
			#	has_landed_title = e_hre
			#	has_landed_title = e_germany
			#	has_landed_title = e_roman_empire
			#}
			#OR = {
			#	has_global_flag = german_split_begun
			#	has_global_flag = millenium_start
			#}
		}
		allow = {
			ai = no # Not ready for usage
			#custom_tooltip = {
			#	text = COMPLETELY_CONTROLS_GERMANIA_REGION
			#	
			#	hidden_tooltip = { # Slightly round about way of checking if the region is completely controlled by ROOT
			#		any_realm_province = { region = world_europe_west_germania }
			#		NOT = {
			#			any_independent_ruler = {
			#				NOT = { character = ROOT }
			#				any_demesne_province = { region = world_europe_west_germania }
			#			}
			#		}
			#	}
			#}
			#OR = {
			#	AND = {
			#		has_landed_title = e_hre
			#		trait = crowned_by_pope
			#	}
			#	AND = {
			#		has_landed_title = e_byzantium
			#		trait = strong_basileus
			#	}
			#	AND = {
			#		trait = crowned
			#		prestige = 1000
			#	}
			#}
			#primary_title = { has_law = crown_authority_4 }
		}
		effect = {
			set_character_flag = attempted_imp_german_conversion
			character_event = { id = Plus.3652 }  # Attempt to convert vassals?
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 2
					culture = imperial_german
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 4
					culture = imperial_german
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 6
					culture = imperial_german
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 8
					culture = imperial_german
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 10
					culture = imperial_german
				}
			}
		}
	}

	convert_to_united_italian = {
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			always = yes
			NOT = { has_global_flag = vanilla_italians } # Player disable split Italians, no need to re-unite
			NOT = { has_global_flag = unified_italian_edict_information }
			is_italian_cultural_unitor_trigger = yes
			OR = {
				has_landed_title = e_italy
				has_landed_title = e_roman_empire
				has_landed_title = k_papal_state
			}
		}
		allow = {
			custom_tooltip = {
				text = COMPLETELY_CONTROLS_ITALIA_REGION
				hidden_tooltip = {
					completely_controls_region = world_europe_south_italy
				}
			}
			OR = {
				AND = {
					has_landed_title = e_italy
					trait = crowned
					prestige = 1000
				}
				AND = {
					has_landed_title = e_roman_empire
					prestige = 1000
				}
				AND = {
					has_landed_title = k_papal_state
					is_italian_cultural_unitor_trigger = yes
					piety = 1000
				}
			}
			primary_title = { has_law = crown_authority_4 }
			capital_scope = { province = 333 }
		}
		effect = {
			set_global_flag = unified_italian_edict_information
			culture = italian
			any_courtier = {
				limit = {
					is_ruler = no
					dynasty = ROOT
				}
				culture = italian
			}
			capital_scope = {
				culture = italian
				add_province_modifier = {
					name = recent_culture_change
					duration = -1
				}
			}
			character_event = { id = Plus.3660 } #Inform player what it does
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 2
					culture = italian
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 4
					culture = italian
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 6
					culture = italian
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 8
					culture = italian
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 10
					culture = italian
				}
			}
		}
	}
	
	convert_vassals_to_united_italian = {
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			#NOT = { has_global_flag = vanilla_italians } # Player disable split Italains, no need to re-unite
			NOT = { has_character_flag = attempted_italian_conversion  }
			has_global_flag = unified_italian_edict_information
		}
		allow = {
			ai = no # Not ready for usage
		}
		effect = {
			set_character_flag = attempted_italian_conversion
			character_event = { id = Plus.3661 }  # Attempt to convert vassals?
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 2
					culture = italian
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 4
					culture = italian
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 6
					culture = italian
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 8
					culture = italian
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 10
					culture = italian
				}
			}
		}
	}
	
	convert_to_judaism = {
		only_playable = yes
		potential = {
			is_playable = yes
			controls_religion = no
			NOT = { rightful_religious_head = ROOT }
			is_nomadic = no
			mercenary = no
			NOT = {
				religion_group = jewish_group
			}
			any_demesne_province = {
				any_province_holding = {
					has_building = ct_jewish_community_1
				}
			}
			NOT = { has_character_flag = converted_religion }
		}
		allow = {
			NOT = { trait = zealous }
		}
		effect = {
			piety = -100
			if = {
				limit = {
					religion_group = christian
					NOT = { trait = sympathy_christendom }
					capital_scope = {
						NOT = { religion_group = ROOT }
					}
				}
				random = {
					chance = 60
					add_trait = sympathy_christendom
				}
			}
			if = {
				limit = {
					religion_group = muslim
					NOT = { trait = sympathy_islam }
					capital_scope = {
						NOT = { religion_group = ROOT }
					}
				}
				random = {
					chance = 60
					add_trait = sympathy_islam
				}
			}
			if = {
				limit = {
					is_pagan_religion = yes
					NOT = { trait = sympathy_pagans }
					capital_scope = {
						NOT = { religion_group = ROOT }
					}
				}
				random = {
					chance = 60
					add_trait = sympathy_pagans
				}
			}
			if = {
				limit = {
					religion_group = zoroastrian_group
					NOT = { trait = sympathy_zoroastrianism }
					capital_scope = {
						NOT = { religion_group = ROOT }
					}
				}
				random = {
					chance = 60
					add_trait = sympathy_zoroastrianism
				}
			}
			if = {
				limit = { higher_tier_than = BARON }
				religion_authority = {
					modifier = ruler_converted_from
				}
			}
			religion = jewish
			add_character_modifier = { name = recently_converted duration = 730}
			if = {
				limit = { higher_tier_than = BARON }
				hidden_tooltip = {
					religion_authority = {
						modifier = ruler_converted_to
					}
				}
			}
			hidden_tooltip = {
				any_courtier = {
					limit = {
						is_adult = no
						is_ruler = no
						dynasty = ROOT
					}
					religion = ROOT
				}
			}
			set_character_flag = converted_religion
		}
		ai_will_do = {
			factor = 0
		}
	}
	
	convert_to_israelite = {
		only_playable = yes
		potential = {
			is_playable = yes
			controls_religion = no
			NOT = { rightful_religious_head = ROOT }
			is_nomadic = no
			mercenary = no
			religion_group = jewish_group
			NOT = { culture_group = israelite }
			any_demesne_province = {
				any_province_holding = {
					has_building = ct_jewish_community_1
				}
			}
			NOT = { has_character_flag = converted_culture }
		}
		allow = {
			NOT = { trait = zealous }
		}
		effect = {
			prestige = -100
			custom_tooltip = {
				text = convert_to_israelite_ctt
			}
			hidden_tooltip = {
				any_demesne_province = {
					random_province_holding = {
						limit = { has_building = ct_jewish_community_1 }
						PREV = { israel_culture_effect = yes }
					}
				}
				any_courtier = {
					limit = {
						is_ruler = no
						dynasty = ROOT
					}
					culture = ROOT
				}
			}
			set_character_flag = converted_culture
		}
		ai_will_do = {
			factor = 0
		}
	}
}
targeted_decisions = {
	attempt_conversion = {
		filter = court
		ai_target_filter = court
		ai_check_interval = 24
		from_potential = {
			ai = yes
			has_dlc = "Sons of Abraham"
			is_ruler = no
			is_adult = yes
			prisoner = no
			diplomacy = 8
			has_secret_religion = no
			NOT = {
				trait = incapable
				is_inaccessible_trigger = yes
				trait = shy
				trait = cynical
				trait = paranoid
				has_character_modifier = conversion_attempted_timer
			}
		}
		potential = {
			is_adult = yes
			prisoner = no
			mercenary = no
			holy_order = no
			controls_religion = no
			OR = {
				same_sex = FROM
				is_married = FROM
				is_lover = FROM
				is_consort = FROM
			}
			OR = {
				is_priest = no
				FROM = { is_priest = yes }
			}
			OR = {
				trait = cynical
				personal_opinion = { who = FROM value = 0 }
				AND = {
					FROM = { trait = zealous }
					personal_opinion = { who = FROM value = -25 }
				}
			}
			NOR = {
				rightful_religious_head = ROOT
				religion = FROM
				religion_authority = 0.8
				is_rival = FROM
				trait = incapable
				is_inaccessible_trigger = yes
				trait = zealous
				trait = shiite_claimant
				father = { trait = shiite_claimant }
				any_sibling = { trait = shiite_claimant }
				has_character_modifier = conversion_attempt_timer
			}
		}
		allow = {
			at_location = FROM
		}
		effect = {
			FROM = {
				add_character_modifier = {
					name = conversion_attempted_timer
					duration = 365
					hidden = yes
				}
				character_event = { id = SoA.4030 }
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.1
				always = yes
			}
			modifier = {
				factor = 0
				FROM = { has_secret_religion_trait_trigger = yes }
			}
			modifier = {
				factor = 0
				FROM = { religion_group = indian_group }
				location = {
					NOT = { region = world_india }
				}
			}
			modifier = {
				factor = 0
				FROM = { religion_group = jewish_group }
				OR = {
					has_character_modifier = expelled_jewish
					any_liege = { has_character_modifier = expelled_jewish }
				}
			}
			modifier = {
				factor = 5
				OR = {
					AND = {
						trait = sympathy_christendom
						FROM = { religion_group = christian }
					}
					AND = {
						trait = sympathy_islam
						FROM = { religion_group = muslim }
					}
					AND = {
						trait = sympathy_pagans
						FROM = { is_pagan_religion = yes }
					}
					AND = {
						trait = sympathy_zoroastrianism
						FROM = { religion_group = zoroastrian_group }
					}
					AND = {
						trait = sympathy_judaism
						FROM = { religion_group = jewish_group }
					}
					AND = {
						trait = sympathy_indian
						FROM = { religion_group = indian_group }
					}
				}
			}
			modifier = {
				factor = 2
				trait = cynical
			}
			modifier = {
				factor = 2
				trait = excommunicated
			}
			modifier = {
				factor = 5
				OR = {
					is_friend = FROM
					is_close_relative = FROM
				}
			}
			modifier = {
				factor = 2
				opinion = { who = FROM value = 25 }
			}
			modifier = {
				factor = 2
				opinion = { who = FROM value = 50 }
			}
			modifier = {
				factor = 2
				opinion = { who = FROM value = 75 }
			}
			modifier = {
				factor = 0.5
				is_ruler = yes
			}
			modifier = {
				factor = 0.75
				NOT = { religion_group = FROM }
			}
			modifier = {
				factor = 1.25
				religion_group = FROM
			}
			modifier = {
				factor = 20
				FROM = { trait = perfecti }
			}
			modifier = {
				factor = 10
				FROM = { trait = zealous }
			}
			modifier = {
				factor = 2
				FROM = { trait = theologian }
			}
			modifier = {
				factor = 1.5
				FROM = { trait = diligent }
			}
			modifier = {
				factor = 1.5
				FROM = { trait = gregarious }
			}
			modifier = {
				factor = 0.75
				FROM = { trait = patient }
			}
			modifier = {
				factor = 0.75
				FROM = { trait = humble }
			}
			modifier = {
				factor = 0.5
				FROM = { trait = craven }
			}
			modifier = {
				factor = 0.5
				FROM = { trait = slothful }
			}
			modifier = {
				factor = 2
				FROM = { is_priest = yes }
			}
			modifier = {
				factor = 2
				liege = { religion = FROM }
			}
			modifier = {
				factor = 0.5
				liege = { NOT = { religion = FROM } }
			}
			modifier = {
				factor = 2
				location = { religion = FROM }
			}
			modifier = {
				factor = 0.5
				location = { NOT = { religion = FROM } }
			}
			modifier = {
				factor = 0.5
				FROM = { NOT = { diplomacy = 10 } }
			}
			modifier = {
				factor = 0.75
				FROM = { NOT = { diplomacy = 12 } }
			}
			modifier = {
				factor = 1.2
				FROM = { diplomacy = 14 }
			}
			modifier = {
				factor = 1.2
				FROM = { diplomacy = 16 }
			}
			modifier = {
				factor = 1.2
				FROM = { diplomacy = 18 }
			}
			modifier = {
				factor = 1.2
				FROM = { diplomacy = 20 }
			}
			modifier = {
				factor = 0.5
				FROM = { NOT = { religion_authority = 0.2 } }
			}
			modifier = {
				factor = 0.5
				FROM = { NOT = { religion_authority = 0.4 } }
			}
			modifier = {
				factor = 2
				FROM = { religion_authority = 0.6 }
			}
			modifier = {
				factor = 2
				FROM = { religion_authority = 0.8 }
			}
			modifier = {
				factor = 2
				NOT = { religion_authority = 0.2 }
			}
			modifier = {
				factor = 2
				NOT = { religion_authority = 0.4 }
			}
			modifier = {
				factor = 0.75
				religion_authority = 0.6
			}
			modifier = {
				factor = 0.75
				religion_authority = 0.8
			}
		}
	}
}