
namespace = GoPagan

#reserved: GoPagan.100 to Plus.199

#######################################
# REVERSION TO PAGAN RELIGIONS
# Written by Rylock
#######################################

### EVENT CHAIN TO TRIGGER CONVERSION EVENTS

# Ruler following Scholarship focus gets opportunity to pursue ancient knowledge
character_event = {
	id = GoPagan.125
	title = EVTNAME_GoPagan_125
	desc = EVTDESC_GoPagan_125
	picture = GFX_evt_library
	border = GFX_event_normal_frame_religion

	has_dlc = "Way of Life"	
	only_playable = yes
	min_age = 16
	capable_only = yes
	prisoner = no
	war = no
	
	trigger = {
		has_focus = focus_scholarship
		is_ill = no
		in_command_trigger = no
		controls_religion = no
		is_heretic = no
		NOR = {
			rightful_religious_head = ROOT
			trait = zealous
			trait = imbecile
			religion = zoroastrian
			religion = manichean
			is_pagan_religion = yes
			culture_group = mesoamerican
			culture_group = indo_aryan_group
			culture_group = dravidian_group
			capital_holding = { holding_type = temple }
			has_character_modifier = voice_of_jesus
			has_character_modifier = voice_of_satan
			has_character_flag = seeks_pagan_knowledge
			has_character_flag = refused_pagan_knowledge
		}
		is_not_busy_trigger = yes
	}
	
	mean_time_to_happen = {
		months = 36
		modifier = {
			factor = 3
			ai = yes
		}
		modifier = {
			factor = 0.8
			NOT = { religion_authority = 0.3 }
		}
		modifier = {
			factor = 0.8
			NOT = { religion_authority = 0.2 }
		}
		modifier = {
			factor = 0.8
			NOT = { religion_authority = 0.1 }
		}
		modifier = {
			factor = 1.2
			religion_authority = 0.7
		}
		modifier = {
			factor = 1.2
			religion_authority = 0.8
		}
		modifier = {
			factor = 1.2
			religion_authority = 0.9
		}
		modifier = {
			factor = 0.5
			trait = cynical
		}
		modifier = {
			factor = 0.5
			trait = sympathy_pagans
		}
		modifier = {
			factor = 0.5
			OR = {
				trait = mystic
				trait = scholar
				trait = theologian
			}
		}
		modifier = {
			factor = 2
			OR = {
				trait = slow
				trait = dull
				trait = depressed
				trait = stressed
			}
		}
		modifier = {
			factor = 1.5
			trait = content
		}
		modifier = {
			factor = 1.5
			trait = slothful
		}
	}
	
	option = {
		name = EVTOPTA_GoPagan_125 # Pursue it
		set_character_flag = seeks_pagan_knowledge
		piety = -25
		custom_tooltip = { text = PURSUE_PAGAN_KNOWLEDGE }
		hidden_tooltip = { change_variable = { which = "lifestyle_learning" value = 1 } }
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				religion = jewish
			}
			modifier = {
				factor = 0.5
				OR = {
					culture = bedouin_arabic
					culture = maghreb_arabic
					culture = levantine_arabic
					culture = andalusian_arabic
					culture = sicilian_arabic
				}
			}
			modifier = {
				factor = 2
				trait = cynical
			}
			modifier = {
				factor = 3
				trait = mystic
			}
			modifier = {
				factor = 1.5
				OR = {
					trait = scholar
					trait = theologian
				}
			}
			modifier = {
				factor = 2
				trait = sympathy_pagans
			}
			modifier = {
				factor = 1.5
				NOT = { religion_authority = 0.3 }
			}
			modifier = {
				factor = 1.5
				NOT = { religion_authority = 0.2 }
			}
			modifier = {
				factor = 1.5
				NOT = { religion_authority = 0.1 }
			}
			modifier = {
				factor = 0.8
				religion_authority = 0.6
			}
			modifier = {
				factor = 0.8
				religion_authority = 0.7
			}
			modifier = {
				factor = 0.8
				religion_authority = 0.8
			}
			modifier = {
				factor = 0.8
				religion_authority = 0.9
			}
		}
	}
	option = {
		name = EVTOPTB_GoPagan_125 # This doesn't interest me
		set_character_flag = refused_pagan_knowledge
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.1
				OR = {
					trait = lunatic
					trait = possessed
				}
			}
			modifier = {
				factor = 0.5
				OR = {
					trait = cynical
					trait = mystic
					trait = scholar
					trait = theologian
				}
			}
		}
	}
}

# A ruler pursuing ancient knowledge has a mystic show up
character_event = {
	id = GoPagan.126
	title = EVTNAME_GoPagan_125
	desc = EVTDESC_GoPagan_126
	picture = GFX_evt_heretic
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	min_age = 16
	capable_only = yes
	prisoner = no
	has_character_flag = seeks_pagan_knowledge
	war = no

	trigger = {
		OR = {
			has_focus = focus_scholarship
			NOT = { has_dlc = "Way of Life" }
		}
		in_command_trigger = no
		controls_religion = no
		is_heretic = no
		NOR = {
			rightful_religious_head = ROOT
			any_courtier = { has_opinion_modifier = { who = ROOT modifier = opinion_pagan_advisor } }
			religion = zoroastrian
			religion = manichean
			is_pagan_religion = yes
			culture_group = mesoamerican
			culture_group = indo_aryan_group
			culture_group = dravidian_group
			capital_holding = { holding_type = temple }
			has_character_flag = refused_pagan_knowledge
		}
		is_not_busy_trigger = yes
		OR = {
			NOT = { has_character_flag = received_pagan_mystic }
			had_character_flag = { flag = received_pagan_mystic days = 3650 }
		}
	}

	mean_time_to_happen = {
		months = 36
		modifier = {
			factor = 2
			trait = zealous
		}
		modifier = {
			factor = 0.5
			trait = cynical
		}
		modifier = {
			factor = 0.5
			OR = {
				trait = mystic
				trait = scholar
				trait = theologian
			}
		}
	}

	option = {
		name = EVTOPTA_GoPagan_126 # Let him stay
		trigger = {
			NOR = {
				trait = zealous
				has_character_modifier = voice_of_jesus
				has_character_modifier = voice_of_satan
			}
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2
				trait = cynical
			}
			modifier = {
				factor = 3
				trait = mystic
			}
			modifier = {
				factor = 1.5
				OR = {
					trait = scholar
					trait = theologian
				}
			}
			modifier = {
				factor = 2
				trait = sympathy_pagans
			}
		}
		
		set_character_flag = received_pagan_mystic
		create_random_priest = {
			random_traits = yes
			dynasty = NONE
			culture = ROOT
			religion = ROOT
			female = no
			health = 8
			age = 50
		}
		new_character = {
			add_trait = mystic
			if = {
				limit = { trait = cynical }
				remove_trait = cynical
			}
			if = {
				limit = { trait = zealous }
				remove_trait = zealous
			}
			if = {
				limit = {
					celtic_pagan_culture_trigger = yes
				}
				religion = celtic_pagan
			}
			if = {
				limit = {
					norse_pagan_culture_trigger = yes
				}
				religion = norse_pagan
			}
			if = {
				limit = {
					german_pagan_culture_trigger = yes
				}
				religion = german_pagan
			}
			if = {
				limit = { finnish_pagan_culture_trigger = yes }
				religion = finnish_pagan
			}
			if = {
				limit = { baltic_pagan_culture_trigger = yes }
				religion = baltic_pagan
			}
			if = {
				limit = {
					tengri_pagan_culture_trigger = yes
				}
				religion = tengri_pagan
			}
			if = {
				limit = {
					slavic_pagan_culture_trigger = yes
				}
				religion = slavic_pagan
			}
			if = {
				limit = { west_african_culture_trigger = yes }
				religion = west_african_pagan
			}
			if = {
				limit = {
					egyptian_pagan_culture_trigger = yes
				}
				religion = egyptian_pagan
			}
			if = {
				limit = {
					roman_pagan_culture_trigger = yes
				}
				religion = roman_pagan
			}
			if = {
				limit = {
					hellenic_pagan_culture_trigger = yes
				}
				religion = hellenic_pagan
			}
			if = {
				limit = {
					zoroastrian_culture_trigger = yes
				}
				religion = zoroastrian
			}
			if = {
				limit = {
					jewish_pagan_culture_trigger = yes
					ROOT = { religion_group = jewish_group }
				}
				religion = jewish_pagan
			}
			if = {
				limit = {
					jewish_pagan_culture_trigger = yes
					ROOT = { NOT = { religion_group = jewish_group } }
				}
				religion = jewish
			}
			if = {
				limit = { zun_pagan_culture_trigger = yes }
				religion = zun_pagan
			}
			if = {
				limit = {
					berber_pagan_culture_trigger = yes
				}
				religion = berber_pagan
			}
			if = {
				limit = {
					arab_pagan_culture_trigger = yes
				}
				religion = arab_pagan
			}
			opinion = { who = ROOT modifier = opinion_pagan_advisor years = 100 }
			reverse_opinion = { who = ROOT modifier = opinion_pagan_advisor years = 100 }
		}
		piety = -50
		if = {
			limit = {
				zoroastrian_culture_trigger = yes
				NOT = { trait = sympathy_zoroastrianism }
			}
			add_trait = sympathy_zoroastrianism
		}
		if = {
			limit = {
				culture_group = israelite
				jewish_pagan_culture_trigger = yes
				NOT = { trait = sympathy_judaism }
			}
			add_trait = sympathy_judaism
		}
		if = {
			limit = {
				culture_group = israelite
				jewish_pagan_culture_trigger = yes
				NOT = { trait = sympathy_judaism }
			}
			add_trait = sympathy_pagans
		}
		if = {
			limit = {
				NOR = {
					zoroastrian_culture_trigger = yes
					jewish_pagan_culture_trigger = yes
					trait = sympathy_pagans
				}
			}
			add_trait = sympathy_pagans
		}
		random = {
			chance = 50
			change_learning = 1
		}
	}
	option = {
		name = EVTOPTB_GoPagan_126 # Send him away
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				OR = {
					trait = sympathy_pagans
					trait = sympathy_judaism
					trait = sympathy_zoroastrianism
				}
			}
		}
		clr_character_flag = seeks_pagan_knowledge
		set_character_flag = refused_pagan_knowledge
		piety = 25
		if = {
			limit = {
				NOT = { trait = cynical }
				NOT = { trait = zealous }
			}
			random = {
				chance = 25
				add_trait = zealous
			}
		}
		if = {
			limit = { trait = cynical }
			random = {
				chance = 50
				remove_trait = cynical
			}
		}
	}
}

# A ruler pursuing ancient knowledge is approached by the mystic
character_event = {
	id = GoPagan.127
	title = EVTNAME_GoPagan_125
	desc = EVTDESC_GoPagan_127
	picture = GFX_evt_heretic
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	min_age = 16
	capable_only = yes
	prisoner = no
	has_character_flag = seeks_pagan_knowledge
	war = no

	trigger = {
		OR = {
			has_focus = focus_scholarship
			NOT = { has_dlc = "Way of Life" }
		}
		in_command_trigger = no
		controls_religion = no
		is_heretic = no
		any_opinion_modifier_target = {
			is_alive = yes
			trait = mystic
			has_opinion_modifier = { who = ROOT modifier = opinion_pagan_advisor }
			prisoner = no
			is_adult = yes
			same_realm = ROOT
			NOT = { trait = incapable }
			OR = {
				is_pagan_religion = yes
				AND = {
					ROOT = {
						zoroastrian_culture_trigger = yes
					}
					religion = zoroastrian
				}
				AND = {
					ROOT = { jewish_pagan_culture_trigger = yes }
					religion = jewish
				}
			}
		}
		NOR = {
			rightful_religious_head = ROOT
			trait = zealous
			religion = zoroastrian
			religion = manichean
			is_pagan_religion = yes
			culture_group = mesoamerican
			culture_group = indo_aryan_group
			culture_group = dravidian_group
			capital_holding = { holding_type = temple }
			has_character_modifier = voice_of_jesus
			has_character_modifier = voice_of_satan
			has_character_flag = refused_pagan_knowledge
			has_character_flag = may_go_pagan
		}
		is_not_busy_trigger = yes
	}
	
	mean_time_to_happen = {
		months = 24
		modifier = {
			factor = 0.5
			trait = cynical
		}
		modifier = {
			factor = 0.5
			OR = {
				trait = mystic
				trait = scholar
				trait = theologian
			}
		}
	}
	
	immediate = {
		random_opinion_modifier_target = {
			limit = {
				trait = mystic
				has_opinion_modifier = { who = ROOT modifier = opinion_pagan_advisor }
				prisoner = no
				is_adult = yes
				same_realm = ROOT
				NOT = { trait = incapable }
				OR = {
					is_pagan_religion = yes
					AND = {
						ROOT = {
							zoroastrian_culture_trigger = yes
						}
						religion = zoroastrian
					}
					AND = {
						ROOT = { jewish_pagan_culture_trigger = yes  }
						religion = jewish
					}
				}
			}
			save_event_target_as = target_pagan_advisor
		}
	}
	
	option = {
		name = EVTOPTA_GoPagan_127 # Tell me more...
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				trait = cynical
			}
			modifier = {
				factor = 3
				trait = mystic
			}
			modifier = {
				factor = 1.5
				OR = {
					trait = scholar
					trait = theologian
				}
			}
			modifier = {
				factor = 2
				trait = sympathy_pagans
			}
			modifier = {
				factor = 1.5
				NOT = { religion_authority = 0.3 }
			}
			modifier = {
				factor = 1.5
				NOT = { religion_authority = 0.2 }
			}
			modifier = {
				factor = 1.5
				NOT = { religion_authority = 0.1 }
			}
			modifier = {
				factor = 0.8
				religion_authority = 0.6
			}
			modifier = {
				factor = 0.8
				religion_authority = 0.7
			}
			modifier = {
				factor = 0.8
				religion_authority = 0.8
			}
			modifier = {
				factor = 0.8
				religion_authority = 0.9
			}
		}
		set_character_flag = may_go_pagan
		piety = -50
		if = {
			limit = {
				zoroastrian_culture_trigger = yes
				NOT = { trait = sympathy_zoroastrianism }
			}
			add_trait = sympathy_zoroastrianism
		}
		if = {
			limit = {
				jewish_pagan_culture_trigger = yes 
				NOT = { religion_group = jewish_group }
				NOT = { trait = sympathy_judaism }
			}
			add_trait = sympathy_judaism
		}
		if = {
			limit = {
				jewish_pagan_culture_trigger = yes 
				religion_group = jewish_group
				NOT = { trait = sympathy_pagans }
			}
			add_trait = sympathy_pagans
		}
		if = {
			limit = {
				NOR = {
					zoroastrian_culture_trigger = yes
					jewish_pagan_culture_trigger = yes 
					trait = sympathy_pagans
				}
			}
			add_trait = sympathy_pagans
		}
		if = {
			limit = {
				NOT = { lifestyle_traits = 1 }
			}
			add_trait = mystic
		}
		change_learning = 1
	}
	option = {
		name = EVTOPTB_GoPagan_127 # Enough! This has gone too far!
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.1
				OR = {
					trait = lunatic
					trait = possessed
				}
			}
			modifier = {
				factor = 0.5
				OR = {
					trait = cynical
					trait = mystic
					trait = scholar
					trait = theologian
				}
			}
		}
		clr_character_flag = may_go_pagan
		clr_character_flag = seeks_pagan_knowledge
		set_character_flag = refused_pagan_knowledge
		piety = 25
		if = {
			limit = {
				NOT = { trait = cynical }
				NOT = { trait = zealous }
			}
			random = {
				chance = 25
				add_trait = zealous
			}
		}
		if = {
			limit = { trait = cynical }
			random = {
				chance = 50
				remove_trait = cynical
			}
		}
		if = {
			limit = {
				zoroastrian_culture_trigger = yes
				trait = sympathy_zoroastrianism
			}
			remove_trait = sympathy_zoroastrianism
		}
		if = {
			limit = {
				jewish_pagan_culture_trigger = yes
				trait = sympathy_judaism
			}
			remove_trait = sympathy_judaism
		}
		if = {
			limit = {
				jewish_pagan_culture_trigger = yes
				trait = sympathy_pagans
			}
			remove_trait = sympathy_pagans
		}
		if = {
			limit = {
				NOR = {
					zoroastrian_culture_trigger = yes
					jewish_pagan_culture_trigger = yes 
				}
				trait = sympathy_pagans
			}
			remove_trait = sympathy_pagans
		}
		event_target:target_pagan_advisor = {
			remove_opinion = { who = ROOT modifier = opinion_pagan_advisor }
			reverse_remove_opinion = { who = ROOT modifier = opinion_pagan_advisor }
			opinion = { who = ROOT modifier = opinion_very_disappointed years = 5 }
			reverse_opinion = { who = ROOT modifier = tried_to_convert_me years = 20 }
			if = {
				limit = { is_ruler = no }
				banish = yes
			}
		}
	}
}

# A non-cynical ruler is appealed to by a religious leader
character_event = {
	id = GoPagan.128
	title = EVTNAME_GoPagan_125
	desc = EVTDESC_GoPagan_128
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	min_age = 16
	capable_only = yes
	prisoner = no
	has_character_flag = seeks_pagan_knowledge
	war = no
	
	trigger = {
		OR = {
			has_focus = focus_scholarship
			NOT = { has_dlc = "Way of Life" }
		}
		in_command_trigger = no
		controls_religion = no
		is_heretic = no
		OR = {
			AND = {
				OR = {
					zoroastrian_culture_trigger = yes
				}
				trait = sympathy_zoroastrianism
			}
			AND = {
				jewish_pagan_culture_trigger = yes
				OR = {
					trait = sympathy_judaism
					trait = sympathy_pagans
				}
			}
			AND = {
				NOR = {
					zoroastrian_culture_trigger = yes
					jewish_pagan_culture_trigger = yes
				}
				trait = sympathy_pagans
			}
		}
		OR = {
			top_liege = {
				ai = yes
				religion = ROOT
				is_adult = yes
				prisoner = no
				NOT = { trait = incapable }
				NOT = { character = ROOT }
				capital_holding = { holding_type = temple }
			}
			top_liege = {
				any_realm_character = {
					ai = yes
					religion = ROOT
					is_ruler = yes
					is_adult = yes
					prisoner = no
					NOT = { trait = incapable }
					NOT = { character = ROOT }
					capital_holding = { holding_type = temple }
				}
			}
		}		
		NOR = {
			rightful_religious_head = ROOT
			trait = cynical
			religion = zoroastrian
			religion = manichean
			is_pagan_religion = yes
			culture_group = mesoamerican
			culture_group = indo_aryan_group
			culture_group = dravidian_group
			capital_holding = { holding_type = temple }
			has_character_flag = refused_pagan_knowledge
		}
		is_not_busy_trigger = yes
	}
	
	mean_time_to_happen = {
		months = 12
	}
	
	immediate = {
		# liege first
		if = {
			limit = {
				liege = {
					ai = yes
					religion = ROOT
					is_adult = yes
					prisoner = no
					NOT = { trait = incapable }
					NOT = { character = ROOT }
					capital_holding = { holding_type = temple }
				}
			}
			liege = { save_event_target_as = target_concerned_priest }
			break = yes
		}
		# then top liege
		if = {
			limit = {
				top_liege = {
					ai = yes
					religion = ROOT
					is_adult = yes
					prisoner = no
					NOT = { trait = incapable }
					NOT = { character = ROOT }
					capital_holding = { holding_type = temple }
				}
			}
			top_liege = { save_event_target_as = target_concerned_priest }
			break = yes
		}
		# then any realm priest of count rank or higher
		if = {
			limit = {
				top_liege = {
					any_realm_character = {
						ai = yes
						religion = ROOT
						is_ruler = yes
						higher_tier_than = BARON
						is_adult = yes
						prisoner = no
						NOT = { trait = incapable }
						NOT = { character = ROOT }
						capital_holding = { holding_type = temple }
					}
				}
			}
			top_liege = {
				random_realm_character = {
					limit = {
						ai = yes
						religion = ROOT
						is_ruler = yes
						higher_tier_than = BARON
						is_adult = yes
						prisoner = no
						NOT = { trait = incapable }
						NOT = { character = ROOT }
						capital_holding = { holding_type = temple }
					}
					save_event_target_as = target_concerned_priest
					break = yes
				}
			}
		}
		# then any priest who is a vassal
		if = {
			limit = {
				top_liege = {
					any_realm_character = {
						ai = yes
						religion = ROOT
						is_ruler = yes
						vassal_of = ROOT
						is_adult = yes
						prisoner = no
						NOT = { trait = incapable }
						NOT = { character = ROOT }
						capital_holding = { holding_type = temple }
					}
				}
			}
			top_liege = {
				random_realm_character = {
					limit = {
						ai = yes
						religion = ROOT
						is_ruler = yes
						vassal_of = ROOT
						is_adult = yes
						prisoner = no
						NOT = { trait = incapable }
						NOT = { character = ROOT }
						capital_holding = { holding_type = temple }
					}
					save_event_target_as = target_concerned_priest
					break = yes
				}
			}
		}
		# then any priest
		if = {
			limit = {
				top_liege = {
					any_realm_character = {
						ai = yes
						religion = ROOT
						is_ruler = yes
						is_adult = yes
						prisoner = no
						NOT = { trait = incapable }
						NOT = { character = ROOT }
						capital_holding = { holding_type = temple }
					}
				}
			}
			top_liege = {
				random_realm_character = {
					limit = {
						ai = yes
						religion = ROOT
						is_ruler = yes
						is_adult = yes
						prisoner = no
						NOT = { trait = incapable }
						NOT = { character = ROOT }
						capital_holding = { holding_type = temple }
					}
					save_event_target_as = target_concerned_priest
					break = yes
				}
			}
		}
	}
	
	option = {
		name = EVTOPTA_GoPagan_128 # I am not one of your faithful
		trigger = {
			NOR = {
				trait = zealous
				has_character_modifier = voice_of_jesus
				has_character_modifier = voice_of_satan
			}
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.8
				opinion = { who = event_target:target_concerned_priest value = 25 }
			}
			modifier = {
				factor = 0.8
				opinion = { who = event_target:target_concerned_priest value = 50 }
			}
			modifier = {
				factor = 0.8
				opinion = { who = event_target:target_concerned_priest value = 75 }
			}
			modifier = {
				factor = 3
				trait = mystic
			}
			modifier = {
				factor = 1.5
				OR = {
					trait = scholar
					trait = theologian
				}
			}
			modifier = {
				factor = 1.5
				NOT = { religion_authority = 0.3 }
			}
			modifier = {
				factor = 1.5
				NOT = { religion_authority = 0.2 }
			}
			modifier = {
				factor = 1.5
				NOT = { religion_authority = 0.1 }
			}
			modifier = {
				factor = 0.8
				religion_authority = 0.6
			}
			modifier = {
				factor = 0.8
				religion_authority = 0.7
			}
			modifier = {
				factor = 0.8
				religion_authority = 0.8
			}
			modifier = {
				factor = 0.8
				religion_authority = 0.9
			}
		}
		prestige = -50
		add_trait = cynical
		reverse_opinion = { who = event_target:target_concerned_priest modifier = opinion_very_disappointed years = 5 }
		add_character_modifier = {
			name = strange_ideas
			duration = 1095
		}
	}
	option = {
		name = EVTOPTB_GoPagan_128 # Perhaps you are right
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2
				trait = craven
			}
			modifier = {
				factor = 2
				trait = content
			}
			modifier = {
				factor = 1.5
				trait = humble
			}
			modifier = {
				factor = 0.8
				NOT = { opinion = { who = event_target:target_concerned_priest value = 0 } }
			}
			modifier = {
				factor = 0.8
				NOT = { opinion = { who = event_target:target_concerned_priest value = -25 } }
			}
			modifier = {
				factor = 0.8
				NOT = { opinion = { who = event_target:target_concerned_priest value = -50 } }
			}
			modifier = {
				factor = 0.1
				OR = {
					trait = lunatic
					trait = possessed
				}
			}
		}
		clr_character_flag = may_go_pagan
		clr_character_flag = seeks_pagan_knowledge
		set_character_flag = refused_pagan_knowledge
		piety = 25
		if = {
			limit = {
				zoroastrian_culture_trigger = yes
				trait = sympathy_zoroastrianism
			}
			remove_trait = sympathy_zoroastrianism
		}
		if = {
			limit = {
				jewish_pagan_culture_trigger = yes
				trait = sympathy_judaism
			}
			remove_trait = sympathy_judaism
		}
		if = {
			limit = {
				jewish_pagan_culture_trigger = yes
				trait = sympathy_pagans
			}
			remove_trait = sympathy_pagans
		}
		if = {
			limit = {
				NOR = {
					zoroastrian_culture_trigger = yes
					jewish_pagan_culture_trigger = yes
				}
				trait = sympathy_pagans
			}
			remove_trait = sympathy_pagans
		}
		reverse_opinion = { who = event_target:target_concerned_priest modifier = opinion_pleased years = 5 }
		random_opinion_modifier_target = {
			limit = { has_opinion_modifier = { who = ROOT modifier = opinion_pagan_advisor } }
			remove_opinion = { who = ROOT modifier = opinion_pagan_advisor }
			reverse_remove_opinion = { who = ROOT modifier = opinion_pagan_advisor }
			opinion = { who = ROOT modifier = opinion_very_disappointed years = 5 }
			reverse_opinion = { who = ROOT modifier = tried_to_convert_me years = 20 }
			if = {
				limit = { is_ruler = no }
				banish = yes
			}
		}
	}
}

### CONVERSION EVENTS

# Main conversion event
character_event = {
	id = GoPagan.100
	title = EVTNAME_GoPagan_100
	desc = EVTDESC_GoPagan_100
	picture = GFX_evt_book_carolingian_script
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
		
	option = {
		name = EVTOPTA_GoPagan_100 #Zoroaster will lead us to enlightenment!
		trigger = {
			zoroastrian_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = zoroastrian
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTN_GoPagan_100 #We will follow the teachings of Mani
		trigger = {
			OR = {
				culture_group = iranian
				culture = pecheneg
				culture = karluk
				culture = kirghiz
				culture = mongol
			}
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = manichean
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTB_GoPagan_100 #It's time to visit the elder druids
		trigger = {
			celtic_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			religion = celtic_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			religion = celtic_pagan_reformed
		}
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTC_GoPagan_100 #To the gods of old!
		trigger = {
			tengri_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			religion = tengri_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			religion = tengri_pagan_reformed
		}
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTC_GoPagan_100 #To the gods of old!
		trigger = {
			baltic_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			religion = baltic_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			religion = baltic_pagan_reformed
		}
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTC_GoPagan_100 #To the gods of old!
		trigger = {
			slavic_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			religion = slavic_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			religion = slavic_pagan_reformed
		}
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTC_GoPagan_100 #To the gods of old!
		trigger = {
			west_african_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			religion = west_african_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			religion = west_african_pagan_reformed
		}
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTC_GoPagan_100 #To the gods of old!
		trigger = {
			berber_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = berber_pagan
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTC_GoPagan_100 #To the gods of old!
		trigger = {
			arab_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = arab_pagan
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTC_GoPagan_100 #To the gods of old!
		trigger = {
			egyptian_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = egyptian_pagan
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTC_GoPagan_100 #To the gods of old!
		trigger = {
			zun_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			religion = zun_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			religion = zun_pagan_reformed
		}
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTC_GoPagan_100 #To the gods of old!
		trigger = {
			finnish_pagan_culture_trigger = yes
			NOT = { religion = finnish_pagan}
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			religion = finnish_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			religion = finnish_pagan_reformed
		}
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTD_GoPagan_100 #Valhalla awaits!
		trigger = {
			norse_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			religion = norse_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			religion = norse_pagan_reformed
		}
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTE_GoPagan_100 #To the gods of old!
		trigger = {
			german_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			religion = german_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			religion = german_pagan_reformed
		}
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTL_GoPagan_100 #God will not lead us astray
		trigger = {
			jewish_pagan_culture_trigger = yes
			NOT = { religion_group = jewish_group }
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = jewish
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTC_GoPagan_100 #To the gods of old!
		trigger = {
			OR = {
				jewish_pagan_culture_trigger = yes
				religion_group = jewish_group
			}
		}
		ai_chance = { factor = 10 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = jewish_pagan
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTM_GoPagan_100 #Let us look to the pantheon for guidance
		trigger = {
			roman_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = roman_pagan
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTM_GoPagan_100 #Let us look to the pantheon for guidance
		trigger = {
			hellenic_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = hellenic_pagan
		hidden_tooltip = {
			any_courtier = {
				limit = {
					is_ruler = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
				religion = ROOT
			}
		}
		if = {
			limit = { higher_tier_than = BARON }
			hidden_tooltip = { religion_authority = { modifier = ruler_converted_to } }
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #Zoroaster will lead us to enlightenment!
		trigger = {
			zoroastrian_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -250
		set_secret_religion = zoroastrian
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #We will follow the teachings of Mani
		trigger = {
			OR = {
				culture_group = iranian
				culture = pecheneg
				culture = karluk
				culture = kirghiz
				culture = mongol
			}
		}
		ai_chance = { factor = 100 }
		piety = -250
		set_secret_religion = manichean
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #It's time to visit the elder druids
		trigger = {
			celtic_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -250
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			set_secret_religion = celtic_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			set_secret_religion = celtic_pagan_reformed
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #To the gods of old!
		trigger = {
			tengri_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -250
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			set_secret_religion = tengri_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			set_secret_religion = tengri_pagan_reformed
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #To the gods of old!
		trigger = {
			baltic_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -250
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			set_secret_religion = baltic_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			set_secret_religion = baltic_pagan_reformed
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #To the gods of old!
		trigger = {
			slavic_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -250
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			set_secret_religion = slavic_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			set_secret_religion = slavic_pagan_reformed
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #To the gods of old!
		trigger = {
			west_african_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -250
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			set_secret_religion = west_african_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			set_secret_religion = west_african_pagan_reformed
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #To the gods of old!
		trigger = {
			berber_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -250
		set_secret_religion = berber_pagan
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #To the gods of old!
		trigger = {
			arab_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -250
		set_secret_religion = arab_pagan
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #To the gods of old!
		trigger = {
			egyptian_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -250
		set_secret_religion = egyptian_pagan
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #To the gods of old!
		trigger = {
			zun_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -250
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			set_secret_religion = zun_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			set_secret_religion = zun_pagan_reformed
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #To the gods of old!
		trigger = {
			finnish_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -250
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			set_secret_religion = finnish_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			set_secret_religion = finnish_pagan_reformed
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #Valhalla awaits!
		trigger = {
			norse_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -250
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			set_secret_religion = norse_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			set_secret_religion = norse_pagan_reformed
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #To the gods of old!
		trigger = {
			german_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -250
		if = {
			limit = {
				NOT = {
					has_game_rule = {
						name = pagan_reformation
						value = start_reformed
					}
				}
			}
			set_secret_religion = german_pagan
		}
		if = {
			limit = {
				has_game_rule = {
					name = pagan_reformation
					value = start_reformed
				}
			}
			set_secret_religion = german_pagan_reformed
		}
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #God will not lead us astray
		trigger = {
			jewish_pagan_culture_trigger = yes
			NOT = { religion_group = jewish_group }
		}
		ai_chance = { factor = 100 }
		piety = -250
		set_secret_religion = jewish
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #To the gods of old!
		trigger = {
			OR = {
				jewish_pagan_culture_trigger = yes
				religion_group = jewish_group
			}
		}
		ai_chance = { factor = 10 }
		piety = -250
		set_secret_religion = jewish_pagan
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #Let us look to the pantheon for guidance
		trigger = {
			roman_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -250
		set_secret_religion = roman_pagan
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTX_GoPagan_100 #Let us look to the pantheon for guidance
		trigger = {
			hellenic_pagan_culture_trigger = yes
		}
		ai_chance = { factor = 100 }
		piety = -250
		set_secret_religion = hellenic_pagan
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		if = {
			limit = { has_character_modifier = strange_ideas }
			remove_character_modifier = strange_ideas
		}
	}
	option = {
		name = EVTOPTZ_GoPagan_100 #Maybe Not
		ai_chance = { factor = 0 }
	}
}

#AI allowed to use the decision
character_event = {
	id = GoPagan.120
	
	hide_window = yes
	
	min_age = 16
	capable_only = yes
	prisoner = no
	ai = yes
	war = no
	is_sick = no

	trigger = {
		OR = {
			NOT = { religion_authority = 0.20 }
			AND = {
				NOT = { religion_authority = 0.40 }
				trait = lunatic
			}
		}
		#is_ill = no
		in_command_trigger = no
		controls_religion = no
		is_heretic = no
		health = 4
		OR = {
			is_female = no
			is_ruler = yes
			is_married = no
			is_married_matrilineally = yes
			spouse = { NOT = { religion = ROOT } }
		}	
		OR = {
			is_ruler = no
			NOT = { capital_holding = { holding_type = temple } }
		}
		NOR = {
			rightful_religious_head = ROOT
			piety = 500
			trait = zealous
			trait = crusader
			trait = mujahid
			trait = holy_crusader
			trait = holy_warrior
			religion = jewish
			religion_group = zoroastrian_group
			is_pagan_religion = yes
			culture_group = mesoamerican
			culture_group = indo_aryan_group
			culture_group = dravidian_group
			culture = bedouin_arabic
			culture = maghreb_arabic
			culture = levantine_arabic
			culture = andalusian_arabic
			culture = sicilian_arabic
			has_character_modifier = voice_of_jesus
			has_character_modifier = voice_of_satan
			has_character_flag = refused_pagan_knowledge
			has_character_flag = gone_pagan
		}
	}
	
	mean_time_to_happen = {
		months = 200
		modifier = {
			factor = 0.25
			trait = lunatic
		}
		modifier = {
			factor = 0.25
			trait = cynical
		}
		modifier = {
			factor = 0.25
			has_character_modifier = defied_church
		}
		modifier = {
			factor = 0.75
			NOT = { religion_authority = 0.15 }
		}
		modifier = {
			factor = 0.5
			NOT = { religion_authority = 0.10 }
		}
		modifier = {
			factor = 0.5
			OR = {
				trait = mystic
				trait = scholar
				trait = theologian
			}
		}
		modifier = {
			factor = 0.5
			location = { is_pagan_religion = yes }
		}
		modifier = {
			factor = 0.5
			independent = no
			liege = { is_pagan_religion = yes }
		}
		modifier = {
			factor = 0.5
			OR = {
				trait = sympathy_pagans
				trait = sympathy_zoroastrianism
				trait = sympathy_judaism
			}
		}
		modifier = {
			factor = 0.75
			NOT = { learning = 5 }
		}
		modifier = {
			factor = 0.75
			NOT = { learning = 2 }
		}
		modifier = {
			factor = 1.5
			piety = 100
		}
		modifier = {
			factor = 1.5
			piety = 200
		}
		modifier = {
			factor = 1.5
			piety = 300
		}
		modifier = {
			factor = 1.5
			piety = 400
		}
		modifier = {
			factor = 3
			trait = slothful
		}
		modifier = {
			factor = 3
			trait = content
		}
		modifier = {
			factor = 3
			trait = craven
		}
		modifier = {
			factor = 3
			trait = patient
		}
		modifier = {
			factor = 3
			learning = 10
		}
		modifier = {
			factor = 3
			learning = 15
		}
		modifier = {
			factor = 5
			OR = {
				trait = pilgrim
				trait = hajjaj
			}
		}
		modifier = {
			factor = 5
			independent = no
			liege = { religion = ROOT }
		}		
	}
	
	immediate = {
		if = {
			limit = {
				NOT = { trait = cynical }
			}
			add_trait = cynical
			break = yes
		}
		if = {
			limit = {
				NOR = {
					trait = sympathy_zoroastrianism
					trait = sympathy_judaism
					trait = sympathy_pagans
				}
			}
			if = {
				limit = {
					zoroastrian_culture_trigger = yes
					NOT = { trait = sympathy_zoroastrianism }
				}
				add_trait = sympathy_zoroastrianism
			}
			if = {
				limit = {
					jewish_pagan_culture_trigger = yes
					NOT = { trait = sympathy_judaism }
				}
				add_trait = sympathy_judaism
			}
			if = {
				limit = {
					NOR = {
						zoroastrian_culture_trigger = yes
						jewish_pagan_culture_trigger = yes
						trait = sympathy_pagans
					}
				}
				add_trait = sympathy_pagans
			}
			break = yes
		}
	}
}

#######################################
# DEMAND CONVERSION EVENTS
# Written by Rylock
#######################################

# Ruler considers approach to conversion
character_event = {
	id = GoPagan.130
	desc = EVTDESC_GoPagan_130
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_GoPagan_130 # Convince him
		trigger = { FROM = { prisoner = no } }
		ai_chance = {
			factor = 100
			modifier = {
				factor = 1.5
				trait = kind
			}
			modifier = {
				factor = 1.5
				trait = patient
			}
			modifier = {
				factor = 1.5
				trait = gregarious
			}
			modifier = {
				factor = 1.25
				trait = charitable
			}
			modifier = {
				factor = 0.75
				trait = shy
			}
			modifier = {
				factor = 0.75
				trait = slothful
			}
			modifier = {
				factor = 0.5
				NOT = { diplomacy = 8 }
			}
			modifier = {
				factor = 2.0
				OR = {
					diplomacy = 15
					trait = socializer
					trait = poet
				}
			}
		}
		FROM = {
			character_event = { id = GoPagan.131 tooltip = CONVINCE_CONVERSION }
			custom_tooltip = { text = CONVERSION_START }
			custom_tooltip = { text = CONVERSION_BASE_DIPLOMACY }
			if = {
				limit = {
					OR = {
						AND = {
							trait = sympathy_christendom
							ROOT = { religion_group = christian }
						}
						AND = {
							trait = sympathy_islam
							ROOT = { religion_group = muslim }
						}
						AND = {
							trait = sympathy_pagans
							ROOT = { is_pagan_religion = yes }
						}
						AND = {
							trait = sympathy_zoroastrianism
							ROOT = { religion_group = zoroastrian_group }
						}
						AND = {
							trait = sympathy_judaism
							ROOT = { religion_group = jewish_group }
						}
						AND = {
							trait = sympathy_indian
							ROOT = { religion_group = indian_group }
						}
					}
				}
				custom_tooltip = { text = CONVERSION_SYMPATHY }
			}
			if = {
				limit = {
					culture_group = east_slavic
					is_pagan_religion = yes
					ROOT = {
						OR = {
							religion = chalcedonian
							religion = orthodox
							religion = bogomilist
							religion = monothelite
							religion = iconoclast
						}
						is_heretic = no
					}
				}
				custom_tooltip = { text = CONVERSION_CULTURE_GOOD_3 }
			}
			if = {
				limit = {
					culture_group = north_germanic
					is_pagan_religion = yes
					ROOT = {
						OR = {
							religion = chalcedonian
							religion = catholic
							religion = cathar
							religion = fraticelli
							religion = waldensian
							religion = lollard
							religion = adoptionist
						}
						is_heretic = no
					}
				}
				custom_tooltip = { text = CONVERSION_CULTURE_GOOD_3 }
			}
			if = {
				limit = {
					culture_group = baltic
					is_pagan_religion = yes
				}
				custom_tooltip = { text = CONVERSION_CULTURE_BAD_4 }
			}
			if = {
				limit = {
					OR = {
						culture_group = north_germanic
						culture_group = east_slavic
					}
					is_pagan_religion = yes
					ROOT = { religion_group = muslim }
				}
				custom_tooltip = { text = CONVERSION_CULTURE_BAD_4 }
			}
			if = {
				limit = {
					is_pagan_religion = yes
					is_reformed_pagan_religion = no
					ROOT = { is_pagan_religion = no }
				}
				custom_tooltip = { text = CONVERSION_RELIGION_GOOD_2 }
			}
			if = {
				limit = {
					religion_group = jewish_group
					ROOT = { NOT = { religion_group = jewish_group } }
				}
				custom_tooltip = { text = CONVERSION_RELIGION_BAD_4 }
			}
			if = {
				limit = {
					OR = {
						is_heresy_of = ROOT
						is_parent_religion = ROOT
					}
				}
				custom_tooltip = { text = CONVERSION_RELIGION_BAD_4 }
			}
			if = {
				limit = {
					religion_group = muslim
					ROOT = { religion_group = muslim }
					NOR = {
						is_heresy_of = ROOT
						is_parent_religion = ROOT
					}
				}
				custom_tooltip = { text = CONVERSION_RELIGION_BAD_3 }
			}
			if = {
				limit = {
					is_pagan_religion = yes
					ROOT = { is_pagan_religion = yes }
					NOR = {
						is_heresy_of = ROOT
						is_parent_religion = ROOT
					}
				}
				custom_tooltip = { text = CONVERSION_RELIGION_BAD_3 }
			}
			if = {
				limit = {
					religion_group = ROOT
					NOR = {
						is_heresy_of = ROOT
						is_parent_religion = ROOT
						is_pagan_religion = yes
						religion_group = muslim
					}
				}
				custom_tooltip = { text = CONVERSION_RELIGION_GOOD_1 }
			}
			if = {
				limit = {
					NOT = { opinion = { who = ROOT value = 0 } }
				}
				custom_tooltip = { text = CONVERSION_OPINION_BAD_4 }
			}
			if = {
				limit = {
					opinion = { who = ROOT value = 0 }
					NOT = { opinion = { who = ROOT value = 25 } }
				}
				custom_tooltip = { text = CONVERSION_OPINION_BAD_3 }
			}
			if = {
				limit = {
					opinion = { who = ROOT value = 25 }
					NOT = { opinion = { who = ROOT value = 50 } }
				}
				custom_tooltip = { text = CONVERSION_OPINION_GOOD_1 }
			}
			if = {
				limit = {
					opinion = { who = ROOT value = 50 }
					NOT = { opinion = { who = ROOT value = 75 } }
				}
				custom_tooltip = { text = CONVERSION_OPINION_GOOD_2 }
			}
			if = {
				limit = {
					opinion = { who = ROOT value = 75 }
				}
				custom_tooltip = { text = CONVERSION_OPINION_GOOD_3 }
			}
			if = {
				limit = {
					OR = {
						AND = {
							is_ruler = no
							OR = {
								is_married = ROOT
								any_spouse = { is_father = ROOT }
								any_spouse = { is_mother = ROOT }
								any_spouse = { is_child_of = ROOT }
							}
						}
						OR = {
							is_close_relative = ROOT
							is_lover = ROOT
						}
					}
					OR = {
						NOT = {
							AND = {
								is_ruler = no
								OR = {
									is_married = ROOT
									any_spouse = { is_father = ROOT }
									any_spouse = { is_mother = ROOT }
									any_spouse = { is_child_of = ROOT }
								}
							}
						}
						NOR = {
							is_close_relative = ROOT
							is_lover = ROOT
						}
					}
				}
				custom_tooltip = { text = CONVERSION_RELATION_GOOD_2 }
			}
			if = {
				limit = {
					is_ruler = no
					OR = {
						is_married = ROOT
						any_spouse = { is_father = ROOT }
						any_spouse = { is_mother = ROOT }
						any_spouse = { is_child_of = ROOT }
					}
					OR = {
						is_close_relative = ROOT
						is_lover = ROOT
					}
				}
				custom_tooltip = { text = CONVERSION_RELATION_GOOD_3 }
			}
			if = {
				limit = { trait = cynical }
				custom_tooltip = { text = CONVERSION_CYNICAL_GOOD_3 }
			}
			if = {
				limit = {
					is_heretic = no
					NOT = { religion_authority = 0.1 }
				}
				custom_tooltip = { text = CONVERSION_RA_GOOD_3 }
			}
			if = {
				limit = {
					is_heretic = no
					religion_authority = 0.1
					NOT = { religion_authority = 0.25 }
				}
				custom_tooltip = { text = CONVERSION_RA_GOOD_2 }
			}
			if = {
				limit = {
					is_heretic = no
					religion_authority = 0.25
					NOT = { religion_authority = 0.4 }
				}
				custom_tooltip = { text = CONVERSION_RA_GOOD_1 }
			}
			if = {
				limit = {
					is_heretic = no
					religion_authority = 0.6
					NOT = { religion_authority = 0.75 }
				}
				custom_tooltip = { text = CONVERSION_RA_BAD_1 }
			}
			if = {
				limit = {
					is_heretic = no
					religion_authority = 0.75
					NOT = { religion_authority = 0.9 }
				}
				custom_tooltip = { text = CONVERSION_RA_BAD_2 }
			}
			if = {
				limit = {
					is_heretic = no
					religion_authority = 0.9
				}
				custom_tooltip = { text = CONVERSION_RA_BAD_3 }
			}
			if = {
				limit = {
					ROOT = { diplomacy = 12 }
					ROOT = { NOT = { diplomacy = 16 } }
				}
				custom_tooltip = { text = CONVERSION_DIPLOMACY_GOOD_1 }
			}
			if = {
				limit = {
					ROOT = { diplomacy = 16 }
				}
				custom_tooltip = { text = CONVERSION_DIPLOMACY_GOOD_2 }
			}
		}

	}
	option = {
		name = EVTOPTB_GoPagan_130 # Engage him in religious debate
		trigger = {
			FROM = { prisoner = no }
			learning = 8
		}
		tooltip_info = learning
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2
				is_priest = yes
			}
			modifier = {
				factor = 1.2
				learning = 10
			}
			modifier = {
				factor = 1.2
				learning = 12
			}
			modifier = {
				factor = 1.2
				learning = 14
			}
			modifier = {
				factor = 1.2
				learning = 16
			}
			modifier = {
				factor = 1.2
				learning = 18
			}
			modifier = {
				factor = 1.2
				learning = 20
			}
			modifier = {
				factor = 1.5
				trait = zealous
			}
			modifier = {
				factor = 0.75
				trait = slothful
			}
			modifier = {
				factor = 2.0
				OR = {
					trait = scholar
					trait = theologian
					trait = faqih
				}
			}
		}
		FROM = {
			character_event = { id = GoPagan.135 tooltip = DEBATE_CONVERSION }
			custom_tooltip = { text = CONVERSION_START }
			custom_tooltip = { text = CONVERSION_BASE_DEBATE }
			if = {
				limit = {
					OR = {
						AND = {
							trait = sympathy_christendom
							ROOT = { religion_group = christian }
						}
						AND = {
							trait = sympathy_islam
							ROOT = { religion_group = muslim }
						}
						AND = {
							trait = sympathy_pagans
							ROOT = { is_pagan_religion = yes }
						}
						AND = {
							trait = sympathy_zoroastrianism
							ROOT = { religion_group = zoroastrian_group }
						}
						AND = {
							trait = sympathy_judaism
							ROOT = { religion_group = jewish_group }
						}
						AND = {
							trait = sympathy_indian
							ROOT = { religion_group = indian_group }
						}
					}
				}
				custom_tooltip = { text = CONVERSION_SYMPATHY }
			}
			if = {
				limit = {
					culture_group = east_slavic
					is_pagan_religion = yes
					ROOT = {
						OR = {
							religion = chalcedonian
							religion = orthodox
							religion = bogomilist
							religion = monothelite
							religion = iconoclast
						}
						is_heretic = no
					}
				}
				custom_tooltip = { text = CONVERSION_CULTURE_GOOD_2 }
			}
			if = {
				limit = {
					culture_group = north_germanic
					is_pagan_religion = yes
					ROOT = {
						OR = {
							religion = chalcedonian
							religion = catholic
							religion = cathar
							religion = fraticelli
							religion = waldensian
							religion = lollard
							religion = adoptionist
						}
						is_heretic = no
					}
				}
				custom_tooltip = { text = CONVERSION_CULTURE_GOOD_2 }
			}
			if = {
				limit = {
					culture_group = baltic
					is_pagan_religion = yes
				}
				custom_tooltip = { text = CONVERSION_CULTURE_BAD_3 }
			}
			if = {
				limit = {
					OR = {
						culture_group = north_germanic
						culture_group = east_slavic
					}
					is_pagan_religion = yes
					ROOT = { religion_group = muslim }
				}
				custom_tooltip = { text = CONVERSION_CULTURE_BAD_3 }
			}
			if = {
				limit = {
					is_pagan_religion = yes
					is_reformed_pagan_religion = no
					ROOT = { is_pagan_religion = no }
				}
				custom_tooltip = { text = CONVERSION_RELIGION_GOOD_1 }
			}
			if = {
				limit = {
					religion_group = jewish_group
					ROOT = { NOT = { religion_group = jewish_group } }
				}
				custom_tooltip = { text = CONVERSION_RELIGION_BAD_3 }
			}
			if = {
				limit = {
					OR = {
						is_heresy_of = ROOT
						is_parent_religion = ROOT
					}
				}
				custom_tooltip = { text = CONVERSION_RELIGION_BAD_2 }
			}
			if = {
				limit = {
					religion_group = muslim
					ROOT = { religion_group = muslim }
					NOR = {
						is_heresy_of = ROOT
						is_parent_religion = ROOT
					}
				}
				custom_tooltip = { text = CONVERSION_RELIGION_BAD_2 }
			}
			if = {
				limit = {
					is_pagan_religion = yes
					ROOT = { is_pagan_religion = yes }
					NOR = {
						is_heresy_of = ROOT
						is_parent_religion = ROOT
					}
				}
				custom_tooltip = { text = CONVERSION_RELIGION_BAD_2 }
			}
			if = {
				limit = {
					religion_group = ROOT
					NOR = {
						is_heresy_of = ROOT
						is_parent_religion = ROOT
						is_pagan_religion = yes
						religion_group = muslim
					}
				}
				custom_tooltip = { text = CONVERSION_RELIGION_GOOD_2 }
			}
			if = {
				limit = {
					NOT = { opinion = { who = ROOT value = -25 } }
				}
				custom_tooltip = { text = CONVERSION_OPINION_BAD_4 }
			}
			if = {
				limit = {
					opinion = { who = ROOT value = -25 }
					NOT = { opinion = { who = ROOT value = 0 } }
				}
				custom_tooltip = { text = CONVERSION_OPINION_BAD_3 }
			}
			if = {
				limit = {
					opinion = { who = ROOT value = 25 }
					NOT = { opinion = { who = ROOT value = 50 } }
				}
				custom_tooltip = { text = CONVERSION_OPINION_GOOD_1 }
			}
			if = {
				limit = {
					opinion = { who = ROOT value = 50 }
					NOT = { opinion = { who = ROOT value = 75 } }
				}
				custom_tooltip = { text = CONVERSION_OPINION_GOOD_2 }
			}
			if = {
				limit = {
					opinion = { who = ROOT value = 75 }
				}
				custom_tooltip = { text = CONVERSION_OPINION_GOOD_3 }
			}
			if = {
				limit = { trait = cynical }
				custom_tooltip = { text = CONVERSION_CYNICAL_GOOD_3 }
			}
			if = {
				limit = {
					is_heretic = no
					NOT = { religion_authority = 0.1 }
				}
				custom_tooltip = { text = CONVERSION_RA_GOOD_3 }
			}
			if = {
				limit = {
					is_heretic = no
					religion_authority = 0.1
					NOT = { religion_authority = 0.25 }
				}
				custom_tooltip = { text = CONVERSION_RA_GOOD_2 }
			}
			if = {
				limit = {
					is_heretic = no
					religion_authority = 0.25
					NOT = { religion_authority = 0.4 }
				}
				custom_tooltip = { text = CONVERSION_RA_GOOD_1 }
			}
			if = {
				limit = {
					is_heretic = no
					religion_authority = 0.6
					NOT = { religion_authority = 0.75 }
				}
				custom_tooltip = { text = CONVERSION_RA_BAD_1 }
			}
			if = {
				limit = {
					is_heretic = no
					religion_authority = 0.75
					NOT = { religion_authority = 0.9 }
				}
				custom_tooltip = { text = CONVERSION_RA_BAD_2 }
			}
			if = {
				limit = {
					is_heretic = no
					religion_authority = 0.9
				}
				custom_tooltip = { text = CONVERSION_RA_BAD_3 }
			}
			if = {
				limit = {
					ROOT = { attribute_diff = { character = FROM attribute = learning value = 1 } }
					NOT = { ROOT = { attribute_diff = { character = FROM attribute = learning value = 5 } } }
				}
				custom_tooltip = { text = CONVERSION_LEARNING_GOOD_1 }
			}
			if = {
				limit = {
					ROOT = { attribute_diff = { character = FROM attribute = learning value = 5 } }
					NOT = { ROOT = { attribute_diff = { character = FROM attribute = learning value = 9 } } }
				}
				custom_tooltip = { text = CONVERSION_LEARNING_GOOD_2 }
			}
			if = {
				limit = {
					ROOT = { attribute_diff = { character = FROM attribute = learning value = 9 } }
				}
				custom_tooltip = { text = CONVERSION_LEARNING_GOOD_3 }
			}
			if = {
				limit = {
					attribute_diff = { character = ROOT attribute = learning value = 1 }
					NOT = { attribute_diff = { character = ROOT attribute = learning value = 5 } }
				}
				custom_tooltip = { text = CONVERSION_LEARNING_BAD_1 }
			}
			if = {
				limit = {
					attribute_diff = { character = ROOT attribute = learning value = 5 }
					NOT = { attribute_diff = { character = ROOT attribute = learning value = 9 } }
				}
				custom_tooltip = { text = CONVERSION_LEARNING_BAD_2 }
			}
			if = {
				limit = {
					attribute_diff = { character = ROOT attribute = learning value = 9 }
				}
				custom_tooltip = { text = CONVERSION_LEARNING_BAD_3 }
			}
			if = {
				limit = {
					ROOT = { NOT = { trait = zealous } }
					reverse_opinion = { who = ROOT value = 0 }
					attribute_diff = { character = ROOT attribute = learning value = 1 }
					NOR = {
						religion_group = ROOT
						AND = {
							ROOT = { trait = sympathy_christendom }
							religion_group = christian
						}
						AND = {
							ROOT = { trait = sympathy_islam }
							religion_group = muslim
						}
						AND = {
							ROOT = { trait = sympathy_pagans }
							is_pagan_religion = yes
						}
						AND = {
							ROOT = { trait = sympathy_zoroastrianism }
							religion_group = zoroastrian_group
						}
						AND = {
							ROOT = { trait = sympathy_judaism }
							religion_group = jewish_group
						}
						AND = {
							ROOT = { trait = sympathy_indian }
							religion_group = indian_group
						}
					}
				}
				custom_tooltip = { text = CONVERSION_CHANCE_SYMP }
			}
		}
	}
	option = {
		name = EVTOPTC_GoPagan_130 # Threaten him
		trigger = {
			FROM = { prisoner = no }
			OR = {
				AND = {
					is_tribal = no
					crownlaw_title = {
						OR = {
							has_law = crown_authority_2
							has_law = crown_authority_3
							has_law = crown_authority_4
						}
					}
				}
				AND = {
					is_tribal = yes
					primary_title = {
						OR = {
							has_law = tribal_organization_2
							has_law = tribal_organization_3
							has_law = tribal_organization_4
						}
					}
				}
			}
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				OR = {
					is_friend = FROM
					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 = 0
				OR = {
					trait = kind
					trait = just
					trait = humble
				}
			}
			modifier = {
				factor = 0
				NOR = {
					trait = wroth
					trait = proud
					trait = cruel
					trait = arbitrary
					trait = zealous
					trait = impaler
				}
			}
			modifier = {
				factor = 0.5
				is_close_relative = FROM
			}
			modifier = {
				factor = 2
				trait = wroth
			}
			modifier = {
				factor = 2
				trait = cruel
			}
			modifier = {
				factor = 2
				trait = impaler
			}
			modifier = {
				factor = 1.5
				trait = proud
			}
			modifier = {
				factor = 1.5
				trait = arbitrary
			}
			modifier = {
				factor = 1.5
				trait = paranoid
			}
			modifier = {
				factor = 0.5
				trait = patient
			}
			modifier = {
				factor = 0.5
				trait = charitable
			}
			modifier = {
				factor = 0.5
				reverse_opinion = { who = FROM value = 50 }
			}
			modifier = {
				factor = 0.5
				reverse_opinion = { who = FROM value = 75 }
			}
			modifier = {
				factor = 1.5
				NOT = { reverse_opinion = { who = FROM value = 25 } }
			}
			modifier = {
				factor = 1.5
				NOT = { reverse_opinion = { who = FROM value = 0 } }
			}
			modifier = {
				factor = 0.8
				OR = {
					trait = tyrant1
					trait = tyrant2
					trait = tyrant3
				}
			}
			modifier = {
				factor = 0.8
				OR = {
					trait = tyrant4
					trait = tyrant5
					trait = tyrant6
				}
			}
			modifier = {
				factor = 0.8
				OR = {
					trait = tyrant7
					trait = tyrant8
					trait = tyrant9
				}
			}
			modifier = {
				factor = 0.5
				OR = {
					trait = tyrant10
					trait = tyrant11
					trait = tyrant12
				}
			}
			modifier = {
				factor = 0.5
				OR = {
					trait = tyrant13
					trait = tyrant14
					trait = tyrant15
				}
			}
			modifier = {
				factor = 0
				OR = {
					trait = tyrant16
					trait = tyrant17
					trait = tyrant18
					trait = tyrant19
				}
			}
		}
		tyrant_plus_1_effect = yes
		FROM = {
			character_event = { id = GoPagan.143 tooltip = THREATEN_CONVERSION }
			custom_tooltip = { text = CONVERSION_START }
			custom_tooltip = { text = CONVERSION_BASE_THREAT }
			if = {
				limit = {
					OR = {
						AND = {
							trait = sympathy_christendom
							ROOT = { religion_group = christian }
						}
						AND = {
							trait = sympathy_islam
							ROOT = { religion_group = muslim }
						}
						AND = {
							trait = sympathy_pagans
							ROOT = { is_pagan_religion = yes }
						}
						AND = {
							trait = sympathy_zoroastrianism
							ROOT = { religion_group = zoroastrian_group }
						}
						AND = {
							trait = sympathy_judaism
							ROOT = { religion_group = jewish_group }
						}
						AND = {
							trait = sympathy_indian
							ROOT = { religion_group = indian_group }
						}
					}
				}
				custom_tooltip = { text = CONVERSION_SYMPATHY }
			}
			if = {
				limit = {
					religion_group = jewish_group
					ROOT = { NOT = { religion_group = jewish_group } }
				}
				custom_tooltip = { text = CONVERSION_RELIGION_BAD_4 }
			}
			if = {
				limit = {
					OR = {
						is_heresy_of = ROOT
						is_parent_religion = ROOT
					}
				}
				custom_tooltip = { text = CONVERSION_RELIGION_BAD_2 }
			}
			if = {
				limit = {
					is_ruler = yes
				}
				custom_tooltip = { text = CONVERSION_RULER_BAD_2 }
			}
			if = {
				limit = {
					is_priest = yes
				}
				custom_tooltip = { text = CONVERSION_PRIEST_BAD_2 }
			}
			if = {
				limit = { trait = cynical }
				custom_tooltip = { text = CONVERSION_CYNICAL_GOOD_3 }
			}
			if = {
				limit = { trait = craven }
				custom_tooltip = { text = CONVERSION_CRAVEN_GOOD_3 }
			}
			if = {
				limit = { trait = brave }
				custom_tooltip = { text = CONVERSION_BRAVE_BAD_3 }
			}
			if = {
				limit = { trait = humble }
				custom_tooltip = { text = CONVERSION_HUMBLE_GOOD_1 }
			}
			if = {
				limit = { trait = content }
				custom_tooltip = { text = CONVERSION_CONTENT_GOOD_1 }
			}
			if = {
				limit = { trait = proud }
				custom_tooltip = { text = CONVERSION_PROUD_BAD_1 }
			}
			if = {
				limit = { trait = wroth }
				custom_tooltip = { text = CONVERSION_WROTH_BAD_1 }
			}
			if = {
				limit = {
					NOT = { opinion = { who = ROOT value = -75 } }
				}
				custom_tooltip = { text = CONVERSION_OPINION_BAD_4 }
			}
			if = {
				limit = {
					opinion = { who = ROOT value = -75 }
					NOT = { opinion = { who = ROOT value = -50 } }
				}
				custom_tooltip = { text = CONVERSION_OPINION_BAD_3 }
			}
			if = {
				limit = {
					opinion = { who = ROOT value = -50 }
					NOT = { opinion = { who = ROOT value = -25 } }
				}
				custom_tooltip = { text = CONVERSION_OPINION_BAD_2 }
			}
			if = {
				limit = {
					opinion = { who = ROOT value = -25 }
					NOT = { opinion = { who = ROOT value = 0 } }
				}
				custom_tooltip = { text = CONVERSION_OPINION_BAD_1 }
			}
			if = {
				limit = {
					opinion = { who = ROOT value = 0 }
					NOT = { opinion = { who = ROOT value = 25 } }
				}
				custom_tooltip = { text = CONVERSION_OPINION_GOOD_1 }
			}
			if = {
				limit = {
					opinion = { who = ROOT value = 25 }
				}
				custom_tooltip = { text = CONVERSION_OPINION_GOOD_2 }
			}
			if = {
				limit = {
					ROOT = {
						OR = {
							AND = {
								is_tribal = no
								crownlaw_title = { has_law = crown_authority_3 }
							}
							AND = {
								is_tribal = yes
								primary_title = { has_law = tribal_organization_3 }
							}
						}
					}
				}
				custom_tooltip = { text = CONVERSION_AUTHORITY_GOOD_1 }
			}
			if = {
				limit = {
					ROOT = {
						OR = {
							AND = {
								is_tribal = no
								crownlaw_title = { has_law = crown_authority_4 }
							}
							AND = {
								is_tribal = yes
								primary_title = { has_law = tribal_organization_4 }
							}
						}
					}
				}
				custom_tooltip = { text = CONVERSION_AUTHORITY_GOOD_2 }
			}
			custom_tooltip = { text = IMPRISON_IF_REFUSE }
		}
	}
	option = {
		name = EVTOPTD_GoPagan_130 # He may go free if he agrees
		trigger = {
			FROM = {
				prisoner = yes
				host = { character = ROOT }
			}
		}
		ai_chance = {
			factor = 100
		}
		FROM = {
			tooltip = {
				religion = ROOT
				prisoner = no
			}
			hidden_tooltip = {
				character_event = { id = GoPagan.146 }
			}
		}
	}
	option = {
		name = EVTOPTE_GoPagan_130 # Forget it
		ai_chance = {
			factor = 0
		}
		if = {
			limit = { FROM = { is_ruler = no } }
			piety = 10
		}
		if = {
			limit = { FROM = { is_ruler = yes } }
			piety = 50
		}
		FROM = { clr_character_flag = considering_conversion }
	}
}

# Ruler attempts to convince courtier/vassal to convert
character_event = {
	id = GoPagan.131
	desc = EVTDESC_GoPagan_131
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	immediate = {
		clr_character_flag = considering_conversion
	}

	option = {
		name = EVTOPTA_GoPagan_131 # Accept
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				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
				culture_group = east_slavic
				is_pagan_religion = yes
				FROM = {
					OR = {
						religion = chalcedonian
						religion = orthodox
						religion = bogomilist
						religion = monothelite
						religion = iconoclast
					}
					is_heretic = no
				}
			}
			modifier = {
				factor = 2
				culture_group = north_germanic
				is_pagan_religion = yes
				FROM = {
					OR = {
						religion = chalcedonian
 						religion = catholic
						religion = cathar
						religion = fraticelli
						religion = waldensian
						religion = lollard
						religion = adoptionist
 					}
					is_heretic = no
				}
			}
			modifier = {
				factor = 0
				is_female = no
				father = { trait = shiite_claimant }
				any_sibling = { trait = shiite_claimant }
			}
			modifier = {
				factor = 0.1
				culture_group = baltic
				is_pagan_religion = yes
			}
			modifier = {
				factor = 0.1
				OR = {
					culture_group = north_germanic
					culture_group = east_slavic
				}
				is_pagan_religion = yes
				FROM = { religion_group = muslim }
			}
			modifier = {
				factor = 1.5
				is_pagan_religion = yes
				is_reformed_pagan_religion = no
				FROM = { is_pagan_religion = no }
			}
			modifier = {
				factor = 0.75
				location = { NOT = { religion = FROM } }
			}
			modifier = {
				factor = 0.1
				religion_group = jewish_group
				FROM = { NOT = { religion_group = jewish_group } }
			}
			modifier = {
				factor = 0
				NOT = { opinion = { who = FROM value = 0 } }
			}
			modifier = {
				factor = 0.5
				NOT = { opinion = { who = FROM value = 25 } }
			}
			modifier = {
				factor = 1.25
				opinion = { who = FROM value = 25 }
			}
			modifier = {
				factor = 1.5
				opinion = { who = FROM value = 50 }
			}
			modifier = {
				factor = 1.5
				opinion = { who = FROM value = 75 }
			}
			modifier = {
				factor = 1.5
				is_ruler = no
				OR = {
					is_married = FROM
					any_spouse = { is_father = FROM }
					any_spouse = { is_mother = FROM }
					any_spouse = { is_child_of = FROM }
				}
			}
			modifier = {
				factor = 1.5
				OR = {
					is_close_relative = FROM
					is_lover = FROM
				}
			}
			modifier = {
				factor = 2.0
				trait = cynical
			}
			modifier = {
				factor = 2.0
				trait = excommunicated
			}
			modifier = {
				factor = 0.1
				OR = {
					is_heresy_of = FROM
					is_parent_religion = FROM
				}
			}
			modifier = {
				factor = 1.5
				religion_group = FROM
				NOR = {
					is_heresy_of = FROM
					is_parent_religion = FROM
					is_pagan_religion = yes
					religion_group = muslim
				}
			}
			modifier = {
				factor = 0.25
				religion_group = muslim
				FROM = { religion_group = muslim }
				NOR = {
					is_heresy_of = FROM
					is_parent_religion = FROM
				}
			}
			modifier = {
				factor = 0.25
				is_pagan_religion = yes
				FROM = { is_pagan_religion = yes }
				NOR = {
					is_heresy_of = FROM
					is_parent_religion = FROM
				}
			}
			modifier = {
				factor = 0.5
				is_pagan_religion = no
				FROM = { is_pagan_religion = yes }
			}
			modifier = {
				factor = 1.25
				is_heretic = no
				NOT = { religion_authority = 0.4 }
			}
			modifier = {
				factor = 1.25
				is_heretic = no
				NOT = { religion_authority = 0.3 }
			}
			modifier = {
				factor = 1.25
				is_heretic = no
				NOT = { religion_authority = 0.2 }
			}
			modifier = {
				factor = 1.25
				is_heretic = no
				NOT = { religion_authority = 0.1 }
			}
		}
		if = {
			limit = {
				trait = sympathy_christendom
				FROM = { religion_group = christian }
			}
			remove_trait = sympathy_christendom
		}
		if = {
			limit = {
				trait = sympathy_islam
				FROM = { religion_group = muslim }
			}
			remove_trait = sympathy_islam
		}
		if = {
			limit = {
				trait = sympathy_pagans
				FROM = { is_pagan_religion = yes }
			}
			remove_trait = sympathy_pagans
		}
		if = {
			limit = {
				trait = sympathy_zoroastrianism
				FROM = { religion_group = zoroastrian_group }
			}
			remove_trait = sympathy_zoroastrianism
		}
		if = {
			limit = {
				trait = sympathy_judaism
				FROM = { religion_group = jewish_group }
			}
			remove_trait = sympathy_judaism
		}
		if = {
			limit = {
				trait = sympathy_indian
				FROM = { religion_group = indian_group }
			}
			remove_trait = sympathy_indian
		}
		if = {
			limit = { religion_group = christian }
			random = {
				chance = 50
				add_trait = sympathy_christendom
			}
		}
		if = {
			limit = { religion_group = muslim }
			random = {
				chance = 50
				add_trait = sympathy_islam
			}
		}
		if = {
			limit = { is_pagan_religion = yes }
			random = {
				chance = 50
				add_trait = sympathy_pagans
			}
		}
		if = {
			limit = { religion_group = zoroastrian_group }
			random = {
				chance = 50
				add_trait = sympathy_zoroastrianism
			}
		}
		if = {
			limit = { religion_group = jewish_group }
			random = {
				chance = 50
				add_trait = sympathy_judaism
			}
		}
		if = {
			limit = { religion_group = indian_group }
			random = {
				chance = 50
				add_trait = sympathy_indian
			}
		}
		if = {
			limit = {
				has_secret_religion = yes
			}
			clear_secret_religion = yes
		}
		religion = FROM
		if = {
			limit = {
				NOR = {
					trait = cynical
					trait = sympathy_christendom
					trait = sympathy_islam
					trait = sympathy_pagans
					trait = sympathy_zoroastrianism
					trait = sympathy_judaism
					trait = sympathy_indian
				}
			}
			random = {
				chance = 25
				add_trait = zealous
				hidden_tooltip = { character_event = { id = 38269 } } #notification
			}
		}	
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		reverse_opinion = { who = FROM modifier = agreed_to_convert years = 20 }
		hidden_tooltip = { 
			if = {
				limit = { religion_group = indian_group }
				set_character_flag = india_converted
				character_event = { id = RoI.30122 }
			}
			if = {
				limit = { is_ruler = yes }
				any_courtier = {
					limit = {
						is_adult = no
						is_ruler = no
						dynasty = ROOT
					}
					religion = ROOT
				}
			}
			FROM = { character_event = { id = GoPagan.132 } }
		}
	}
	option = {
		name = EVTOPTB_GoPagan_131 # He makes some sense
		trigger = {
			is_heretic = no
			NOR = {
				religion_group = FROM
				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 }
				}
			}
		}
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				has_secret_religion = yes
				secret_religion = { target = FROM target_type = public }
			}
			modifier = {
				factor = 1.25
				location = { religion = FROM }
			}
			modifier = {
				factor = 3
				culture_group = east_slavic
				is_pagan_religion = yes
				FROM = {
					OR = {
						religion = chalcedonian
						religion = orthodox
						religion = bogomilist
						religion = monothelite
						religion = iconoclast
					}
					is_heretic = no
				}
			}
			modifier = {
				factor = 3
				culture_group = north_germanic
				is_pagan_religion = yes
				FROM = {
					OR = {
						religion = chalcedonian
 						religion = catholic
						religion = cathar
						religion = fraticelli
						religion = waldensian
						religion = lollard
						religion = adoptionist
 					}
					is_heretic = no
				}
			}
			modifier = {
				factor = 0
				is_female = no
				father = { trait = shiite_claimant }
				any_sibling = { trait = shiite_claimant }
			}
			modifier = {
				factor = 0.25
				culture_group = baltic
				is_pagan_religion = yes
			}
			modifier = {
				factor = 0.25
				OR = {
					culture_group = north_germanic
					culture_group = east_slavic
				}
				is_pagan_religion = yes
				FROM = { religion_group = muslim }
			}
			modifier = {
				factor = 2.0
				is_pagan_religion = yes
				is_reformed_pagan_religion = no
				FROM = { is_pagan_religion = no }
			}
			modifier = {
				factor = 0.25
				religion_group = jewish_group
				FROM = { NOT = { religion_group = jewish_group } }
			}
			modifier = {
				factor = 0
				NOT = { opinion = { who = FROM value = -25 } }
			}
			modifier = {
				factor = 0.25
				NOT = { opinion = { who = FROM value = 0 } }
			}
			modifier = {
				factor = 0.75
				NOT = { opinion = { who = FROM value = 25 } }
			}
			modifier = {
				factor = 1.25
				opinion = { who = FROM value = 25 }
			}
			modifier = {
				factor = 1.5
				opinion = { who = FROM value = 50 }
			}
			modifier = {
				factor = 1.5
				opinion = { who = FROM value = 75 }
			}
			modifier = {
				factor = 2.0
				trait = cynical
			}
			modifier = {
				factor = 2.0
				trait = excommunicated
			}
			modifier = {
				factor = 1.25
				NOT = { religion_authority = 0.4 }
			}
			modifier = {
				factor = 1.25
				NOT = { religion_authority = 0.3 }
			}
			modifier = {
				factor = 1.25
				NOT = { religion_authority = 0.2 }
			}
			modifier = {
				factor = 1.25
				NOT = { religion_authority = 0.1 }
			}
		}
		if = {
			limit = { FROM = { religion_group = christian } }
			add_trait = sympathy_christendom
		}
		if = {
			limit = { FROM = { religion_group = muslim } }
			add_trait = sympathy_islam
		}
		if = {
			limit = { FROM = { is_pagan_religion = yes } }
			add_trait = sympathy_pagans
		}
		if = {
			limit = { FROM = { religion_group = zoroastrian_group } }
			add_trait = sympathy_zoroastrianism
		}
		if = {
			limit = { FROM = { religion_group = jewish_group } }
			add_trait = sympathy_judaism
		}
		if = {
			limit = { FROM = { religion_group = indian_group } }
			add_trait = sympathy_indian
		}
		if = {
			limit = { NOT = { trait = cynical } }
			random = {
				chance = 50
				add_trait = cynical
				hidden_tooltip = { character_event = { id = 38258 } } #notify
			}
		}
		reverse_opinion = { who = FROM modifier = opinion_mutual_respect multiplier = 2 years = 10 }
		hidden_tooltip = {
			FROM = { character_event = { id = GoPagan.133 } }
		}
	}
	option = {
		name = EVTOPTC_GoPagan_131 # Refuse
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				has_secret_religion = yes
				secret_religion = { target = FROM target_type = public }
			}
			modifier = {
				factor = 0.5
				OR = {
					location = { religion = FROM }
					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 = 1.25
				is_heretic = no
				religion_authority = 0.6
			}
			modifier = {
				factor = 1.5
				is_heretic = no
				religion_authority = 0.7
			}
			modifier = {
				factor = 1.5
				is_heretic = no
				religion_authority = 0.8
			}
			modifier = {
				factor = 1.5
				is_heretic = no
				religion_authority = 0.9
			}
			modifier = {
				factor = 0.9
				FROM = { diplomacy = 12 }
			}
			modifier = {
				factor = 0.9
				FROM = { diplomacy = 14 }
			}
			modifier = {
				factor = 0.8
				FROM = { diplomacy = 16 }
			}
			modifier = {
				factor = 0.8
				FROM = { diplomacy = 18 }
			}
			modifier = {
				factor = 0.8
				FROM = { diplomacy = 20 }
			}
			modifier = {
				factor = 1.25
				is_pagan_religion = no
				FROM = { is_pagan_religion = yes }
			}
		}
		reverse_opinion = { who = FROM modifier = opinion_failed_conversion years = 10 }
		hidden_tooltip = {
			FROM = { character_event = { id = GoPagan.134 } }
		}
	}
}

# Ruler informed that conversion has been accepted
character_event = {
	id = GoPagan.132
	desc = EVTDESC_GoPagan_132
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = EXCELLENT
		reverse_opinion = { who = FROM modifier = converted_me years = 20 }
	}
}

# Ruler informed that conversion failed, but target is now sympathetic
character_event = {
	id = GoPagan.133
	desc = EVTDESC_GoPagan_133
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_GoPagan_133
		reverse_opinion = { who = FROM modifier = opinion_mutual_respect multiplier = 2 years = 10 }
	}
}

# Ruler informed that conversion was refused
character_event = {
	id = GoPagan.134
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_religion
	
	desc = {
		trigger = {
			FROM = {
				NOT = { has_character_flag = refused_debate }
				NOT = { has_character_flag = debate_failed }
			}
		}
		text = EVTDESC_GoPagan_134A
	}
	desc = {
		trigger = { FROM = { has_character_flag = refused_debate } }
		text = EVTDESC_GoPagan_134B
	}
	desc = {
		trigger = { FROM = { has_character_flag = debate_failed } }
		text = EVTDESC_GoPagan_134C
	}
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_GoPagan_134 # Accept his decision
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2
				trait = patient
			}
			modifier = {
				factor = 2
				trait = just
			}
			modifier = {
				factor = 0.5
				trait = cruel
			}
			modifier = {
				factor = 0.5
				trait = arbitrary
			}
		}
		reverse_opinion = { who = FROM modifier = tried_to_convert_me years = 10 }
		if = {
			limit = { FROM = { has_character_flag = refused_debate } }
			FROM = { clr_character_flag = refused_debate }
		}
		if = {
			limit = { FROM = { has_character_flag = debate_failed } }
			FROM = { clr_character_flag = debate_failed }
		}
		if = {
			limit = { FROM = { is_ruler = no } }
			piety = 5
		}
		if = {
			limit = { FROM = { is_ruler = yes } }
			piety = 25
		}
	}
	option = {
		name = EVTOPTC_GoPagan_134 # Imprison him at once!
		trigger = {
			OR = {
				AND = {
					is_tribal = no
					crownlaw_title = {
						OR = {
							has_law = crown_authority_2
							has_law = crown_authority_3
							has_law = crown_authority_4
						}
					}
				}
				AND = {
					is_tribal = yes
					primary_title = {
						OR = {
							has_law = tribal_organization_2
							has_law = tribal_organization_3
							has_law = tribal_organization_4
						}
					}
				}
			}
		}
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				OR = {
					is_friend = FROM
					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 = 0
				OR = {
					trait = kind
					trait = just
					trait = humble
				}
			}
			modifier = {
				factor = 0
				NOR = {
					trait = wroth
					trait = proud
					trait = cruel
					trait = arbitrary
					trait = zealous
					trait = impaler
				}
			}
			modifier = {
				factor = 0.5
				is_close_relative = FROM
			}
			modifier = {
				factor = 2
				trait = wroth
			}
			modifier = {
				factor = 2
				trait = cruel
			}
			modifier = {
				factor = 2
				trait = impaler
			}
			modifier = {
				factor = 1.5
				trait = proud
			}
			modifier = {
				factor = 1.5
				trait = arbitrary
			}
			modifier = {
				factor = 1.5
				trait = paranoid
			}
			modifier = {
				factor = 0.5
				trait = patient
			}
			modifier = {
				factor = 0.5
				trait = charitable
			}
			modifier = {
				factor = 0.5
				opinion = { who = FROM value = 50 }
			}
			modifier = {
				factor = 0.5
				opinion = { who = FROM value = 75 }
			}
			modifier = {
				factor = 0.5
				opinion = { who = FROM value = 0 }
			}
			modifier = {
				factor = 1.5
				NOT = { opinion = { who = FROM value = -25 } }
			}
			modifier = {
				factor = 1.5
				NOT = { opinion = { who = FROM value = -50 } }
			}
			modifier = {
				factor = 0.8
				OR = {
					trait = tyrant1
					trait = tyrant2
					trait = tyrant3
				}
			}
			modifier = {
				factor = 0.8
				OR = {
					trait = tyrant4
					trait = tyrant5
					trait = tyrant6
				}
			}
			modifier = {
				factor = 0.8
				OR = {
					trait = tyrant7
					trait = tyrant8
					trait = tyrant9
				}
			}
			modifier = {
				factor = 0.5
				OR = {
					trait = tyrant10
					trait = tyrant11
					trait = tyrant12
				}
			}
			modifier = {
				factor = 0.5
				OR = {
					trait = tyrant13
					trait = tyrant14
					trait = tyrant15
				}
			}
			modifier = {
				factor = 0
				OR = {
					trait = tyrant16
					trait = tyrant17
					trait = tyrant18
					trait = tyrant19
				}
			}
		}
		if = {
			limit = {
				trait = sympathy_christendom
				FROM = { religion_group = christian }
			}
			remove_trait = sympathy_christendom
		}
		if = {
			limit = {
				trait = sympathy_islam
				FROM = { religion_group = muslim }
			}
			remove_trait = sympathy_islam
		}
		if = {
			limit = {
				trait = sympathy_pagans
				FROM = { is_pagan_religion = yes }
			}
			remove_trait = sympathy_pagans
		}
		if = {
			limit = {
				trait = sympathy_zoroastrianism
				FROM = { religion_group = zoroastrian_group }
			}
			remove_trait = sympathy_zoroastrianism
		}
		if = {
			limit = {
				trait = sympathy_judaism
				FROM = { religion_group = jewish_group }
			}
			remove_trait = sympathy_judaism
		}
		if = {
			limit = {
				trait = sympathy_indian
				FROM = { religion_group = indian_group }
			}
			remove_trait = sympathy_indian
		}
		if = {
			limit = {
				NOT = { trait = kind }
				NOT = { trait = cruel }
			}
			random = {
				chance = 50
				add_trait = cruel
			}
		}
		if = {
			limit = { trait = kind }
			remove_trait = kind
		}
		tyrant_plus_1_effect = yes
		FROM = { character_event = { id = 39024 tooltip = ATTEMPT_IMPRISON } }
		if = {
			limit = { FROM = { has_character_flag = refused_debate } }
			FROM = { clr_character_flag = refused_debate }
		}
		if = {
			limit = { FROM = { has_character_flag = debate_failed } }
			FROM = { clr_character_flag = debate_failed }
		}
	}
}

# Ruler attempts to engage courtier/vassal in a religious debate
character_event = {
	id = GoPagan.135
	desc = EVTDESC_GoPagan_135
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	immediate = {
		clr_character_flag = considering_conversion
	}
	
	option = {
		name = EVTOPTA_GoPagan_135 # Agree
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2
				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
				culture_group = east_slavic
				is_pagan_religion = yes
				FROM = {
					OR = {
						religion = chalcedonian
						religion = orthodox
						religion = bogomilist
						religion = monothelite
						religion = iconoclast
					}
					is_heretic = no
				}
			}
			modifier = {
				factor = 2
				culture_group = north_germanic
				is_pagan_religion = yes
				FROM = {
					OR = {
						religion = chalcedonian
 						religion = catholic
						religion = cathar
						religion = fraticelli
						religion = waldensian
						religion = lollard
						religion = adoptionist
 					}
					is_heretic = no
				}
			}
			modifier = {
				factor = 0
				is_female = no
				father = { trait = shiite_claimant }
				any_sibling = { trait = shiite_claimant }
			}
			modifier = {
				factor = 0.25
				culture_group = baltic
				is_pagan_religion = yes
			}
			modifier = {
				factor = 0.25
				OR = {
					culture_group = north_germanic
					culture_group = east_slavic
				}
				is_pagan_religion = yes
				FROM = { religion_group = muslim }
			}
			modifier = {
				factor = 1.5
				is_pagan_religion = yes
				is_reformed_pagan_religion = no
				FROM = { is_pagan_religion = no }
			}
			modifier = {
				factor = 1.25
				location = { religion = FROM }
			}
			modifier = {
				factor = 0.25
				religion_group = jewish_group
				FROM = { NOT = { religion_group = jewish_group } }
			}
			modifier = {
				factor = 0
				NOT = { opinion = { who = FROM value = -25 } }
			}
			modifier = {
				factor = 0.5
				NOT = { opinion = { who = FROM value = 0 } }
			}
			modifier = {
				factor = 1.5
				opinion = { who = FROM value = 50 }
			}
			modifier = {
				factor = 1.5
				opinion = { who = FROM value = 75 }
			}
			modifier = {
				factor = 1.5
				trait = cynical
			}
			modifier = {
				factor = 0.25
				OR = {
					is_heresy_of = FROM
					is_parent_religion = FROM
				}
			}
			modifier = {
				factor = 1.5
				religion_group = FROM
				NOR = {
					is_heresy_of = FROM
					is_parent_religion = FROM
					is_pagan_religion = yes
					religion_group = muslim
				}
			}
			modifier = {
				factor = 0.5
				religion_group = muslim
				FROM = { religion_group = muslim }
				NOR = {
					is_heresy_of = FROM
					is_parent_religion = FROM
				}
			}
			modifier = {
				factor = 0.5
				is_pagan_religion = yes
				FROM = { is_pagan_religion = yes }
				NOR = {
					is_heresy_of = FROM
					is_parent_religion = FROM
				}
			}
			modifier = {
				factor = 2
				is_priest = yes
			}
			modifier = {
				factor = 0.8
				NOT = { learning = 8 }
			}
			modifier = {
				factor = 0.8
				NOT = { learning = 6 }
			}
			modifier = {
				factor = 0.8
				NOT = { learning = 4 }
			}
			modifier = {
				factor = 0.8
				NOT = { learning = 2 }
			}
			modifier = {
				factor = 1.2
				learning = 10
			}
			modifier = {
				factor = 1.2
				learning = 12
			}
			modifier = {
				factor = 1.2
				learning = 14
			}
			modifier = {
				factor = 1.2
				learning = 16
			}
			modifier = {
				factor = 1.2
				learning = 18
			}
			modifier = {
				factor = 1.2
				learning = 20
			}
			modifier = {
				factor = 1.5
				trait = zealous
			}
			modifier = {
				factor = 0.75
				trait = slothful
			}
		}
		random_list = {
			30 = {
				# Converted
				modifier = {
					factor = 50
					has_secret_religion = yes
					secret_religion = { target = FROM target_type = public }
				}
				modifier = {
					factor = 2
					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 = 1.5
					culture_group = east_slavic
					is_pagan_religion = yes
					FROM = {
						OR = {
							religion = chalcedonian
							religion = orthodox
							religion = bogomilist
							religion = monothelite
							religion = iconoclast
						}
						is_heretic = no
					}
				}
				modifier = {
					factor = 1.5
					culture_group = north_germanic
					is_pagan_religion = yes
					FROM = {
						OR = {
							religion = chalcedonian
							religion = catholic
							religion = cathar
							religion = fraticelli
							religion = waldensian
							religion = lollard
							religion = adoptionist
						}
						is_heretic = no
					}
				}
				modifier = {
					factor = 0.25
					culture_group = baltic
					is_pagan_religion = yes
				}
				modifier = {
					factor = 0.25
					OR = {
						culture_group = north_germanic
						culture_group = east_slavic
					}
					is_pagan_religion = yes
					FROM = { religion_group = muslim }
				}
				modifier = {
					factor = 1.25
					is_pagan_religion = yes
					is_reformed_pagan_religion = no
					FROM = {
						OR = {
							is_pagan_religion = no
							is_reformed_pagan_religion = yes
						}
					}
				}
				modifier = {
					factor = 0.25
					religion_group = jewish_group
					FROM = { NOT = { religion_group = jewish_group } }
				}
				modifier = {
					factor = 0
					NOT = { opinion = { who = FROM value = -25 } }
				}
				modifier = {
					factor = 0.5
					NOT = { opinion = { who = FROM value = 0 } }
				}
				modifier = {
					factor = 0.5
					NOT = { opinion = { who = FROM value = 25 } }
				}
				modifier = {
					factor = 1.25
					opinion = { who = FROM value = 25 }
				}
				modifier = {
					factor = 1.25
					opinion = { who = FROM value = 50 }
				}
				modifier = {
					factor = 1.25
					opinion = { who = FROM value = 75 }
				}
				modifier = {
					factor = 2.0
					trait = cynical
				}
				modifier = {
					factor = 0.5
					OR = {
						is_heresy_of = FROM
						is_parent_religion = FROM
					}
				}
				modifier = {
					factor = 1.5
					religion_group = FROM
					NOR = {
						is_heresy_of = FROM
						is_parent_religion = FROM
						is_pagan_religion = yes
						religion_group = muslim
					}
				}
				modifier = {
					factor = 0.5
					religion_group = muslim
					FROM = { religion_group = muslim }
					NOR = {
						is_heresy_of = FROM
						is_parent_religion = FROM
					}
				}
				modifier = {
					factor = 0.5
					is_pagan_religion = yes
					FROM = { is_pagan_religion = yes }
					NOR = {
						is_heresy_of = FROM
						is_parent_religion = FROM
					}
				}
				modifier = {
					factor = 0.5
					is_pagan_religion = no
					FROM = { is_pagan_religion = yes }
				}
				modifier = {
					factor = 1.25
					is_heretic = no
					NOT = { religion_authority = 0.4 }
				}
				modifier = {
					factor = 1.25
					is_heretic = no
					NOT = { religion_authority = 0.3 }
				}
				modifier = {
					factor = 1.25
					is_heretic = no
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.25
					is_heretic = no
					NOT = { religion_authority = 0.1 }
				}
				FROM = { custom_tooltip = { text = RELIGIOUS_DEBATE_SUCCEEDS } }
				hidden_tooltip = {
					opinion = { who = FROM modifier = converted_me years = 20 }
					FROM = { character_event = { id = GoPagan.137 } }
					character_event = { id = GoPagan.136 }
				}
			}
			30 = {
				# Sympathy
				modifier = {
					factor = 0
					OR = {
						religion_group = FROM
						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 = 1.5
					culture_group = east_slavic
					is_pagan_religion = yes
					FROM = {
						OR = {
							religion = chalcedonian
							religion = orthodox
							religion = bogomilist
							religion = monothelite
							religion = iconoclast
						}
						is_heretic = no
					}
				}
				modifier = {
					factor = 1.5
					culture_group = north_germanic
					is_pagan_religion = yes
					FROM = {
						OR = {
							religion = chalcedonian
							religion = catholic
							religion = cathar
							religion = fraticelli
							religion = waldensian
							religion = lollard
							religion = adoptionist
						}
						is_heretic = no
					}
				}
				modifier = {
					factor = 0.5
					culture_group = baltic
					is_pagan_religion = yes
				}
				modifier = {
					factor = 0.5
					OR = {
						culture_group = north_germanic
						culture_group = east_slavic
					}
					is_pagan_religion = yes
					FROM = { religion_group = muslim }
				}
				modifier = {
					factor = 1.25
					is_pagan_religion = yes
					is_reformed_pagan_religion = no
					FROM = {
						OR = {
							is_pagan_religion = no
							is_reformed_pagan_religion = yes
						}
					}
				}
				modifier = {
					factor = 0.5
					religion_group = jewish_group
					FROM = { NOT = { religion_group = jewish_group } }
				}
				modifier = {
					factor = 0
					NOT = { opinion = { who = FROM value = -50 } }
				}
				modifier = {
					factor = 0.5
					NOT = { opinion = { who = FROM value = -25 } }
				}
				modifier = {
					factor = 0.5
					NOT = { opinion = { who = FROM value = 0 } }
				}
				modifier = {
					factor = 1.25
					opinion = { who = FROM value = 25 }
				}
				modifier = {
					factor = 1.5
					opinion = { who = FROM value = 50 }
				}
				modifier = {
					factor = 1.5
					opinion = { who = FROM value = 75 }
				}
				modifier = {
					factor = 2.0
					trait = cynical
				}
				modifier = {
					factor = 0.5
					OR = {
						is_heresy_of = FROM
						is_parent_religion = FROM
					}
				}
				modifier = {
					factor = 0.5
					religion_group = muslim
					FROM = { religion_group = muslim }
				}
				modifier = {
					factor = 0.5
					is_pagan_religion = yes
					FROM = { is_pagan_religion = yes }
				}
				modifier = {
					factor = 1.25
					is_heretic = no
					NOT = { religion_authority = 0.4 }
				}
				modifier = {
					factor = 1.25
					is_heretic = no
					NOT = { religion_authority = 0.3 }
				}
				modifier = {
					factor = 1.25
					is_heretic = no
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.25
					is_heretic = no
					NOT = { religion_authority = 0.1 }
				}
				FROM = { custom_tooltip = { text = RELIGIOUS_DEBATE_SYMPATHY } }
				hidden_tooltip = {
					FROM = { character_event = { id = GoPagan.139 } }
					character_event = { id = GoPagan.138 }
				}
			}
			10 = {
				modifier = {
					factor = 0
					FROM = { trait = zealous }
				}
				modifier = {
					factor = 1.5
					FROM = { trait = cynical }
				}
				modifier = {
					factor = 0
					OR = {
						religion_group = FROM
						AND = {
							FROM = { trait = sympathy_christendom }
							religion_group = christian
						}
						AND = {
							FROM = { trait = sympathy_islam }
							religion_group = muslim
						}
						AND = {
							FROM = { trait = sympathy_pagans }
							is_pagan_religion = yes
						}
						AND = {
							FROM = { trait = sympathy_zoroastrianism }
							religion_group = zoroastrian_group
						}
						AND = {
							FROM = { trait = sympathy_judaism }
							religion_group = jewish_group
						}
						AND = {
							FROM = { trait = sympathy_indian }
							religion_group = indian_group
						}
					}
				}
				modifier = {
					factor = 0
					NOT = { attribute_diff = { character = FROM attribute = learning value = 1 } }
				}
				modifier = {
					factor = 1.2
					attribute_diff = { character = FROM attribute = learning value = 3 }
				}
				modifier = {
					factor = 1.2
					attribute_diff = { character = FROM attribute = learning value = 5 }
				}
				modifier = {
					factor = 1.2
					attribute_diff = { character = FROM attribute = learning value = 7 }
				}
				modifier = {
					factor = 1.2
					attribute_diff = { character = FROM attribute = learning value = 9 }
				}
				modifier = {
					factor = 1.5
					is_priest = yes
					FROM = { is_priest = no }
				}
				modifier = {
					factor = 0.5
					is_priest = no
					FROM = { is_priest = yes }
				}
				modifier = {
					factor = 1.2
					reverse_opinion = { who = FROM value = 50 }
				}
				modifier = {
					factor = 1.2
					reverse_opinion = { who = FROM value = 75 }
				}
				modifier = {
					factor = 0.5
					NOT = { reverse_opinion = { who = FROM value = 25 } }
				}
				modifier = {
					factor = 0
					NOT = { reverse_opinion = { who = FROM value = 0 } }
				}
				# Liege gets Sympathy
				FROM = { custom_tooltip = { text = RELIGIOUS_DEBATE_LIEGE_SYMPATHY } }
				hidden_tooltip = {
					FROM = { character_event = { id = GoPagan.141 } }
					character_event = { id = GoPagan.140 }
				}
			}
			100 = {
				# Fails
				modifier = {
					factor = 1.2
					attribute_diff = { character = FROM attribute = learning value = 1 }
				}
				modifier = {
					factor = 1.2
					attribute_diff = { character = FROM attribute = learning value = 3 }
				}
				modifier = {
					factor = 1.2
					attribute_diff = { character = FROM attribute = learning value = 5 }
				}
				modifier = {
					factor = 1.2
					attribute_diff = { character = FROM attribute = learning value = 7 }
				}
				modifier = {
					factor = 1.2
					attribute_diff = { character = FROM attribute = learning value = 9 }
				}
				modifier = {
					factor = 0.9
					FROM = { attribute_diff = { character = ROOT attribute = learning value = 1 } }
				}
				modifier = {
					factor = 0.9
					FROM = { attribute_diff = { character = ROOT attribute = learning value = 3 } }
				}
				modifier = {
					factor = 0.8
					FROM = { attribute_diff = { character = ROOT attribute = learning value = 5 } }
				}
				modifier = {
					factor = 0.8
					FROM = { attribute_diff = { character = ROOT attribute = learning value = 7 } }
				}
				modifier = {
					factor = 0.8
					FROM = { attribute_diff = { character = ROOT attribute = learning value = 9 } }
				}
				modifier = {
					factor = 1.5
					NOT = { opinion = { who = FROM value = 0 } }
				}
				modifier = {
					factor = 1.5
					NOT = { opinion = { who = FROM value = -25 } }
				}
				modifier = {
					factor = 2.0
					NOT = { opinion = { who = FROM value = -50 } }
				}
				modifier = {
					factor = 1.25
					is_heretic = no
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.25
					is_heretic = no
					religion_authority = 0.7
				}
				modifier = {
					factor = 1.5
					is_heretic = no
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.5
					is_heretic = no
					religion_authority = 0.9
				}
				modifier = {
					factor = 1.25
					is_pagan_religion = no
					FROM = { is_pagan_religion = yes }
				}
				FROM = { custom_tooltip = { text = RELIGIOUS_DEBATE_FAILS } }
				hidden_tooltip = {
					set_character_flag = debate_failed
					FROM = { character_event = { id = GoPagan.134 } }
					character_event = { id = GoPagan.142 }
				}
			}
		}
	}
	option = {
		name = EVTOPTB_GoPagan_135 # Refuse
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.5
				OR = {
					location = { religion = FROM }
					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 = 0.25
				OR = {
					trait = scholar
					trait = theologian
					trait = faqih
				}
			}
			modifier = {
				factor = 0
				has_secret_religion = yes
				secret_religion = { target = FROM target_type = public }
			}
		}
		set_character_flag = refused_debate
		reverse_opinion = { who = FROM modifier = opinion_failed_conversion years = 10 }
		hidden_tooltip = {
			FROM = { character_event = { id = GoPagan.134 } }
		}
	}
}

# Target converted via religious debate
character_event = {
	id = GoPagan.136
	desc = EVTDESC_GoPagan_136
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_GoPagan_136
		if = {
			limit = {
				trait = sympathy_christendom
				FROMFROM = { religion_group = christian }
			}
			remove_trait = sympathy_christendom
		}
		if = {
			limit = {
				trait = sympathy_islam
				FROMFROM = { religion_group = muslim }
			}
			remove_trait = sympathy_islam
		}
		if = {
			limit = {
				trait = sympathy_pagans
				FROMFROM = { is_pagan_religion = yes }
			}
			remove_trait = sympathy_pagans
		}
		if = {
			limit = {
				trait = sympathy_zoroastrianism
				FROMFROM = { religion_group = zoroastrian_group }
			}
			remove_trait = sympathy_zoroastrianism
		}
		if = {
			limit = {
				trait = sympathy_judaism
				FROMFROM = { religion_group = jewish_group }
			}
			remove_trait = sympathy_judaism
		}
		if = {
			limit = {
				trait = sympathy_indian
				FROMFROM = { religion_group = indian_group }
			}
			remove_trait = sympathy_indian
		}
		if = {
			limit = { religion_group = christian }
			random = {
				chance = 50
				add_trait = sympathy_christendom
			}
		}
		if = {
			limit = { religion_group = muslim }
			random = {
				chance = 50
				add_trait = sympathy_islam
			}
		}
		if = {
			limit = { is_pagan_religion = yes }
			random = {
				chance = 50
				add_trait = sympathy_pagans
			}
		}
		if = {
			limit = { religion_group = zoroastrian_group }
			random = {
				chance = 50
				add_trait = sympathy_zoroastrianism
			}
		}
		if = {
			limit = { religion_group = jewish_group }
			random = {
				chance = 50
				add_trait = sympathy_judaism
			}
		}
		if = {
			limit = { religion_group = indian_group }
			random = {
				chance = 50
				add_trait = sympathy_indian
			}
		}
		if = {
			limit = {
				has_secret_religion = yes
			}
			clear_secret_religion = yes
		}
		religion = FROMFROM
		add_character_modifier = { name = recently_converted duration = 730}
		if = {
			limit = {
				NOR = {
					trait = cynical
					trait = sympathy_christendom
					trait = sympathy_islam
					trait = sympathy_pagans
					trait = sympathy_zoroastrianism
					trait = sympathy_judaism
					trait = sympathy_indian
				}
			}
			random = {
				chance = 25
				add_trait = zealous
				hidden_tooltip = { character_event = { id = 38269 } } #notification
			}
		}	
		if = {
			limit = { trait = cynical }
			remove_trait = cynical
		}
		reverse_opinion = { who = FROMFROM modifier = agreed_to_convert years = 20 }
		hidden_tooltip = { 
			if = {
				limit = { religion_group = indian_group }
				set_character_flag = india_converted
				character_event = { id = RoI.30122 }
			}
			if = {
				limit = { is_ruler = yes }
				any_courtier = {
					limit = {
						is_adult = no
						is_ruler = no
						dynasty = ROOT
					}
					religion = ROOT
				}
			}
		}
	}
}

# Ruler informed that religious debate was successful
character_event = {
	id = GoPagan.137
	desc = EVTDESC_GoPagan_137
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_GoPagan_137
		reverse_opinion = { who = FROM modifier = converted_me years = 20 }
	}
}

# Target made sympathetic due to religious debate
character_event = {
	id = GoPagan.138
	desc = EVTDESC_GoPagan_138
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_GoPagan_138
		if = {
			limit = { FROMFROM = { religion_group = christian } }
			add_trait = sympathy_christendom
		}
		if = {
			limit = { FROMFROM = { religion_group = muslim } }
			add_trait = sympathy_islam
		}
		if = {
			limit = { FROMFROM = { is_pagan_religion = yes } }
			add_trait = sympathy_pagans
		}
		if = {
			limit = { FROMFROM = { religion_group = zoroastrian_group } }
			add_trait = sympathy_zoroastrianism
		}
		if = {
			limit = { FROMFROM = { religion_group = jewish_group } }
			add_trait = sympathy_judaism
		}
		if = {
			limit = { FROMFROM = { religion_group = indian_group } }
			add_trait = sympathy_indian
		}
		if = {
			limit = { NOT = { trait = cynical } }
			random = {
				chance = 50
				add_trait = cynical
				hidden_tooltip = { character_event = { id = 38258 } } #notify
			}
		}
		reverse_opinion = { who = FROMFROM modifier = opinion_mutual_respect multiplier = 2 years = 10 }
	}
}

# Ruler informed that religious debate made target sympathetic
character_event = {
	id = GoPagan.139
	desc = EVTDESC_GoPagan_139
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_GoPagan_139
		reverse_opinion = { who = FROM modifier = opinion_mutual_respect multiplier = 2 years = 10 }
	}
}

# Target informed that ruler made sympathetic due to debate
character_event = {
	id = GoPagan.140
	desc = EVTDESC_GoPagan_140
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_GoPagan_136
		reverse_opinion = { who = FROMFROM modifier = opinion_mutual_respect years = 10 }
	}
}

# Ruler informed that religious debate made them sympathetic
character_event = {
	id = GoPagan.141
	desc = EVTDESC_GoPagan_141
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_GoPagan_141
		piety = -100
		if = {
			limit = { FROM = { religion_group = christian } }
			add_trait = sympathy_christendom
		}
		if = {
			limit = { FROM = { religion_group = muslim } }
			add_trait = sympathy_islam
		}
		if = {
			limit = { FROM = { is_pagan_religion = yes } }
			add_trait = sympathy_pagans
		}
		if = {
			limit = { FROM = { religion_group = zoroastrian_group } }
			add_trait = sympathy_zoroastrianism
		}
		if = {
			limit = { FROM = { religion_group = jewish_group } }
			add_trait = sympathy_judaism
		}
		if = {
			limit = { FROM = { religion_group = indian_group } }
			add_trait = sympathy_indian
		}
		if = {
			limit = { NOT = { trait = cynical } }
			random = {
				chance = 50
				add_trait = cynical
				hidden_tooltip = { character_event = { id = 38258 } } #notify
			}
		}
		reverse_opinion = { who = FROM modifier = opinion_mutual_respect years = 10 }
	}
}

# Target informed that religious debate failed
character_event = {
	id = GoPagan.142
	desc = EVTDESC_GoPagan_142
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_GoPagan_142
		reverse_opinion = { who = FROMFROM modifier = opinion_failed_conversion years = 10 }
	}
}

# Ruler threatens the target unless he converts
character_event = {
	id = GoPagan.143
	desc = EVTDESC_GoPagan_143
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	immediate = {
		clr_character_flag = considering_conversion
	}
	
	option = {
		name = EVTOPTA_GoPagan_143 # Agree
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2
				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 = 1.25
				location = { religion = FROM }
			}
			modifier = {
				factor = 0
				is_female = no
				father = { trait = shiite_claimant }
				any_sibling = { trait = shiite_claimant }
			}
			modifier = {
				factor = 0.1
				religion_group = jewish_group
				FROM = { NOT = { religion_group = jewish_group } }
			}
			modifier = {
				factor = 0.5
				OR = {
					is_heresy_of = FROM
					is_parent_religion = FROM
				}
			}
			modifier = {
				factor = 0.5
				trait = brave
			}
			modifier = {
				factor = 0.75
				trait = proud
			}
			modifier = {
				factor = 0.75
				trait = wroth
			}
			modifier = {
				factor = 2.0
				trait = craven
			}
			modifier = {
				factor = 2.0
				trait = cynical
			}
			modifier = {
				factor = 1.25
				NOT = { opinion = { who = FROM value = 25 } }
			}
			modifier = {
				factor = 1.25
				NOT = { opinion = { who = FROM value = 0 } }
			}
			modifier = {
				factor = 0.5
				NOT = { opinion = { who = FROM value = -25 } }
			}
			modifier = {
				factor = 0.25
				NOT = { opinion = { who = FROM value = -50 } }
			}
			modifier = {
				factor = 0
				NOT = { opinion = { who = FROM value = -75 } }
			}
		}
		if = {
			limit = {
				trait = sympathy_christendom
				FROM = { religion_group = christian }
			}
			remove_trait = sympathy_christendom
		}
		if = {
			limit = {
				trait = sympathy_islam
				FROM = { religion_group = muslim }
			}
			remove_trait = sympathy_islam
		}
		if = {
			limit = {
				trait = sympathy_pagans
				FROM = { is_pagan_religion = yes }
			}
			remove_trait = sympathy_pagans
		}
		if = {
			limit = {
				trait = sympathy_zoroastrianism
				FROM = { religion_group = zoroastrian_group }
			}
			remove_trait = sympathy_zoroastrianism
		}
		if = {
			limit = {
				trait = sympathy_judaism
				FROM = { religion_group = jewish_group }
			}
			remove_trait = sympathy_judaism
		}
		if = {
			limit = {
				trait = sympathy_indian
				FROM = { religion_group = indian_group }
			}
			remove_trait = sympathy_indian
		}
		if = {
			limit = { religion_group = christian }
			add_trait = sympathy_christendom
		}
		if = {
			limit = { religion_group = muslim }
			add_trait = sympathy_islam
		}
		if = {
			limit = { is_pagan_religion = yes }
			add_trait = sympathy_pagans
		}
		if = {
			limit = { religion_group = zoroastrian_group }
			add_trait = sympathy_zoroastrianism
		}
		if = {
			limit = { religion_group = jewish_group }
			add_trait = sympathy_judaism
		}
		if = {
			limit = { religion_group = indian_group }
			add_trait = sympathy_indian
		}
		if = {
			limit = {
				NOT = { trait = cynical }
				OR = {
					is_heresy_of = FROM
					is_parent_religion = FROM
				}
			}
			add_trait = cynical
		}
		if = {
			limit = {
				NOR = {
					trait = cynical
					is_heresy_of = FROM
					is_parent_religion = FROM
				}
			}
			random = {
				chance = 50
				add_trait = cynical
			}
		}
		if = {
			limit = { has_secret_religion = yes}
			clear_secret_religion = yes
		}
		religion = FROM
		add_character_modifier = { name = recently_converted duration = 730}
		reverse_opinion = { who = FROM modifier = DEMAND_RELIGIOUS_CONVERSION_INTERACTION_ON_ACCEPT years = 10 }
		hidden_tooltip = { 
			if = {
				limit = { religion_group = indian_group }
				set_character_flag = india_converted
				character_event = { id = RoI.30122 }
			}
			FROM = { character_event = { id = GoPagan.144 } }
		}
	}
	option = {
		name = EVTOPTB_GoPagan_143 # Refuse
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				has_secret_religion = yes
				secret_religion = { target = FROM target_type = public }
			}
			modifier = {
				factor = 1.5
				is_ruler = yes
			}
			modifier = {
				factor = 1.5
				is_priest = yes
			}
			modifier = {
				factor = 2.0
				trait = brave
			}
			modifier = {
				factor = 0.75
				trait = humble
			}
			modifier = {
				factor = 0.75
				trait = content
			}
			modifier = {
				factor = 0.5
				trait = craven
			}
			modifier = {
				factor = 0.5
				trait = cynical
			}
			modifier = {
				factor = 1.5
				NOT = { opinion = { who = FROM value = 0 } }
			}
			modifier = {
				factor = 1.5
				NOT = { opinion = { who = FROM value = -25 } }
			}
			modifier = {
				factor = 2.0
				is_pagan_religion = no
				FROM = { is_pagan_religion = yes }
			}
			modifier = {
				factor = 0.75
				FROM = {
					OR = {
						AND = {
							is_tribal = no
							crownlaw_title = { has_law = crown_authority_3 }
						}
						AND = {
							is_tribal = yes
							primary_title = { has_law = tribal_organization_3 }
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				FROM = {
					OR = {
						AND = {
							is_tribal = no
							crownlaw_title = { has_law = crown_authority_4 }
						}
						AND = {
							is_tribal = yes
							primary_title = { has_law = tribal_organization_4 }
						}
					}
				}
			}
		}
		reverse_opinion = { who = FROM modifier = opinion_failed_conversion multiplier = 2 years = 10 }
		hidden_tooltip = {
			FROM = { character_event = { id = GoPagan.145 } }
		}
	}
}

# Ruler informed that the threat worked
character_event = {
	id = GoPagan.144
	desc = EVTDESC_GoPagan_144
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = EXCELLENT
		reverse_opinion = { who = FROM modifier = opinion_demanded_conversion years = 20 }
	}
}

# Ruler informed that the threat failed
character_event = {
	id = GoPagan.145
	desc = EVTDESC_GoPagan_145
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_GoPagan_145 # Let it slide
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				trait = patient
			}
			modifier = {
				factor = 2
				trait = just
			}
			modifier = {
				factor = 0.5
				trait = cruel
			}
			modifier = {
				factor = 0.5
				trait = arbitrary
			}
		}
		if = {
			limit = { FROM = { is_ruler = no } }
			piety = 5
		}
		if = {
			limit = { FROM = { is_ruler = yes } }
			piety = 25
		}
		prestige = -50
		reverse_opinion = { who = FROM modifier = opinion_demanded_conversion years = 5 }
		tyrant_plus_1_effect = yes
	}
	option = {
		name = EVTOPTC_GoPagan_145 # Imprison him at once!
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.5
				OR = {
					trait = kind
					trait = just
					trait = humble
				}
			}
			modifier = {
				factor = 0.5
				NOR = {
					trait = wroth
					trait = proud
					trait = cruel
					trait = arbitrary
					trait = zealous
					trait = impaler
				}
			}
			modifier = {
				factor = 0.5
				is_close_relative = FROM
			}
			modifier = {
				factor = 2
				trait = wroth
			}
			modifier = {
				factor = 2
				trait = cruel
			}
			modifier = {
				factor = 2
				trait = impaler
			}
			modifier = {
				factor = 1.5
				trait = proud
			}
			modifier = {
				factor = 1.5
				trait = arbitrary
			}
			modifier = {
				factor = 1.5
				trait = paranoid
			}
			modifier = {
				factor = 0.5
				trait = patient
			}
			modifier = {
				factor = 0.5
				trait = charitable
			}
			modifier = {
				factor = 0.5
				opinion = { who = FROM value = 25 }
			}
			modifier = {
				factor = 0.5
				opinion = { who = FROM value = 50 }
			}
			modifier = {
				factor = 0.5
				opinion = { who = FROM value = 75 }
			}
			modifier = {
				factor = 1.5
				NOT = { opinion = { who = FROM value = 25 } }
			}
			modifier = {
				factor = 1.5
				NOT = { opinion = { who = FROM value = 0 } }
			}
			modifier = {
				factor = 1.5
				NOT = { opinion = { who = FROM value = -25 } }
			}
		}
		if = {
			limit = {
				trait = sympathy_christendom
				FROM = { religion_group = christian }
			}
			remove_trait = sympathy_christendom
		}
		if = {
			limit = {
				trait = sympathy_islam
				FROM = { religion_group = muslim }
			}
			remove_trait = sympathy_islam
		}
		if = {
			limit = {
				trait = sympathy_pagans
				FROM = { is_pagan_religion = yes }
			}
			remove_trait = sympathy_pagans
		}
		if = {
			limit = {
				trait = sympathy_zoroastrianism
				FROM = { religion_group = zoroastrian_group }
			}
			remove_trait = sympathy_zoroastrianism
		}
		if = {
			limit = {
				trait = sympathy_judaism
				FROM = { religion_group = jewish_group }
			}
			remove_trait = sympathy_judaism
		}
		if = {
			limit = {
				trait = sympathy_indian
				FROM = { religion_group = indian_group }
			}
			remove_trait = sympathy_indian
		}
		if = {
			limit = {
				NOT = { trait = kind }
				NOT = { trait = cruel }
			}
			random = {
				chance = 50
				add_trait = cruel
			}
		}
		if = {
			limit = { trait = kind }
			remove_trait = kind
		}
		FROM = { character_event = { id = 39024 tooltip = ATTEMPT_IMPRISON } }
	}
}

# Ruler releases a prisoner if they convert
character_event = {
	id = GoPagan.146
	desc = EVTDESC_GoPagan_146
	picture = GFX_evt_into_the_dungeon
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	immediate = {
		clr_character_flag = considering_conversion
	}

	option = {
		name = EVTOPTA_GoPagan_146
		if = {
			limit = {
				trait = sympathy_christendom
				FROM = { religion_group = christian }
			}
			remove_trait = sympathy_christendom
		}
		if = {
			limit = {
				trait = sympathy_islam
				FROM = { religion_group = muslim }
			}
			remove_trait = sympathy_islam
		}
		if = {
			limit = {
				trait = sympathy_pagans
				FROM = { is_pagan_religion = yes }
			}
			remove_trait = sympathy_pagans
		}
		if = {
			limit = {
				trait = sympathy_zoroastrianism
				FROM = { religion_group = zoroastrian_group }
			}
			remove_trait = sympathy_zoroastrianism
		}
		if = {
			limit = {
				trait = sympathy_judaism
				FROM = { religion_group = jewish_group }
			}
			remove_trait = sympathy_judaism
		}
		if = {
			limit = {
				trait = sympathy_indian
				FROM = { religion_group = indian_group }
			}
			remove_trait = sympathy_indian
		}
		if = {
			limit = { religion_group = christian }
			add_trait = sympathy_christendom
		}
		if = {
			limit = { religion_group = muslim }
			add_trait = sympathy_islam
		}
		if = {
			limit = { is_pagan_religion = yes }
			add_trait = sympathy_pagans
		}
		if = {
			limit = { religion_group = zoroastrian_group }
			add_trait = sympathy_zoroastrianism
		}
		if = {
			limit = { religion_group = jewish_group }
			add_trait = sympathy_judaism
		}
		if = {
			limit = { religion_group = indian_group }
			add_trait = sympathy_indian
		}
		if = {
			limit = { NOT = { trait = cynical } }
			add_trait = cynical
		}
		if = {
			limit = { has_secret_religion = yes }
			clear_secret_religion = yes
		}
		religion = FROM
		add_character_modifier = { name = recently_converted duration = 730}
		prisoner = no
		opinion = { who = FROM modifier = opinion_demanded_conversion multiplier = 2 years = 20 }
		hidden_tooltip = { 
			if = {
				limit = { religion_group = indian_group }
				set_character_flag = india_converted
				character_event = { id = RoI.30122 }
			}
		}
	}
	
	option = {
		name = EVTOPTA_GoPagan_146
		trigger = {
			has_secret_religion = no
		}
		if = {
			limit = {
				trait = sympathy_christendom
				FROM = { religion_group = christian }
			}
			remove_trait = sympathy_christendom
		}
		if = {
			limit = {
				trait = sympathy_islam
				FROM = { religion_group = muslim }
			}
			remove_trait = sympathy_islam
		}
		if = {
			limit = {
				trait = sympathy_pagans
				FROM = { religion_group = pagan_group }
			}
			remove_trait = sympathy_pagans
		}
		if = {
			limit = {
				trait = sympathy_zoroastrianism
				FROM = { religion_group = zoroastrian_group }
			}
			remove_trait = sympathy_zoroastrianism
		}
		if = {
			limit = {
				trait = sympathy_judaism
				FROM = { religion_group = jewish_group }
			}
			remove_trait = sympathy_judaism
		}
		if = {
			limit = {
				trait = sympathy_indian
				FROM = { religion_group = indian_group }
			}
			remove_trait = sympathy_indian
		}
		if = {
			limit = { religion_group = christian }
			add_trait = sympathy_christendom
		}
		if = {
			limit = { religion_group = muslim }
			add_trait = sympathy_islam
		}
		if = {
			limit = { is_pagan_religion = yes }
			add_trait = sympathy_pagans
		}
		if = {
			limit = { religion_group = zoroastrian_group }
			add_trait = sympathy_zoroastrianism
		}
		if = {
			limit = { religion_group = jewish_group }
			add_trait = sympathy_judaism
		}
		if = {
			limit = { religion_group = indian_group }
			add_trait = sympathy_indian
		}
		if = {
			limit = { NOT = { trait = cynical } }
			add_trait = cynical
		}
		if = {
			limit = { has_secret_religion = yes }
			clear_secret_religion = yes
		}
		religion_scope = {
			save_event_target_as = my_old_religion
		}
		religion = FROM
		set_secret_religion = { target_type = public target = event_target:my_old_religion }
		clear_event_target = my_old_religion
		add_character_modifier = { name = recently_converted duration = 730}
		prisoner = no
		opinion = { who = FROM modifier = opinion_demanded_conversion multiplier = 2 years = 20 }
		hidden_tooltip = { 
			if = {
				limit = { religion_group = indian_group }
				set_character_flag = india_converted
				character_event = { id = RoI.30122 }
			}
		}
	}
}

### SYMPATHY EVENTS

# Character has more than one sympathy trait
character_event = {
	id = GoPagan.150
	desc = EVTDESC_GoPagan_150
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	min_age = 16
	prisoner = no
	
	trigger = {
		calc_true_if = {
			amount = 2
			trait = sympathy_christendom
			trait = sympathy_islam
			trait = sympathy_pagans
			trait = sympathy_zoroastrianism
			trait = sympathy_judaism
			trait = sympathy_indian
		}
		any_courtier = {
			is_adult = yes
			prisoner = no
			religion = ROOT
			at_location = ROOT
			trait = zealous
			NOR = {
				trait = incapable
				is_inaccessible_trigger = yes
				is_liege_of = ROOT
				is_rival = ROOT
			}
		}
		NOR = {
			trait = incapable
			is_inaccessible_trigger = yes
			has_character_flag = sympathy_challenged
		}
	}
	
	weight_multiplier = {
		days = 1
		modifier = {
			factor = 2
			location = { religion = ROOT }
		}
		modifier = {
			factor = 2
			calc_true_if = {
				amount = 3
				trait = sympathy_christendom
				trait = sympathy_islam
				trait = sympathy_pagans
				trait = sympathy_zoroastrianism
				trait = sympathy_judaism
				trait = sympathy_indian
			}
		}
	}
	
	immediate = {
		random_courtier = {
			limit = {
				is_adult = yes
				prisoner = no
				religion = ROOT
				at_location = ROOT
				trait = zealous
				NOR = {
					trait = incapable
					is_inaccessible_trigger = yes
					is_liege_of = ROOT
					is_rival = ROOT
				}
			}
			save_event_target_as = zealous_courtier
		}
	}
	
	option = {
		name = EVTOPTA_GoPagan_150 #Maybe our faith should be questioned
		trigger = { NOT = { trait = cynical } }
		ai_chance = {
			factor = 20
		}
		set_character_flag = sympathy_challenged
		add_trait = cynical
		event_target:zealous_courtier = { add_rival = ROOT }
	}
	option = {
		name = EVTOPTB_GoPagan_150 #What's so good about our faith?
		trigger = { trait = cynical }
		ai_chance = {
			factor = 80
		}
		tooltip_info = cynical
		set_character_flag = sympathy_challenged
		piety = -100
		event_target:zealous_courtier = { add_rival = ROOT }
	}
	option = {
		name = EVTOPTC_GoPagan_150 #Perhaps I am too open-minded
		ai_chance = {
			factor = 80
			modifier = {
				factor = 0.5
				trait = cynical
			}
		}
		if = {
			limit = { trait = cynical }
			random = {
				chance = 50
				remove_trait = cynical
			}
		}
		random_list = {
			50 = {
				modifier = {
					factor = 0
					NOT = { trait = sympathy_christendom }
				}
				remove_trait = sympathy_christendom
			}
			50 = {
				modifier = {
					factor = 0
					NOT = { trait = sympathy_islam }
				}
				remove_trait = sympathy_islam
			}
			50 = {
				modifier = {
					factor = 0
					NOT = { trait = sympathy_pagans }
				}
				remove_trait = sympathy_pagans
			}
			50 = {
				modifier = {
					factor = 0
					NOT = { trait = sympathy_zoroastrianism }
				}
				remove_trait = sympathy_zoroastrianism
			}
			50 = {
				modifier = {
					factor = 0
					NOT = { trait = sympathy_judaism }
				}
				remove_trait = sympathy_judaism
			}
			50 = {
				modifier = {
					factor = 0
					NOT = { trait = sympathy_indian }
				}
				remove_trait = sympathy_indian
			}
		}
	}
}

### NEW CARDINAL EVENTS

# Character has become a religious elector
character_event = {
	id = GoPagan.155
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion
	
	desc = {
		text = EVTDESC_GoPagan_155_manichean
		trigger = { religion = manichean }
	}
	desc = {
		text = EVTDESC_GoPagan_155_celtic
		trigger = { religion = celtic_pagan_reformed }
	}
	desc = {
		text = EVTDESC_GoPagan_155_hellenic
		trigger = { religion_group = hellenic_pagan_group }
	}
	desc = {
		text = EVTDESC_GoPagan_155_cathar
		trigger = { religion = cathar }
	}
	desc = {
		text = EVTDESC_GoPagan_155_bogomilist
		trigger = { religion = bogomilist }
	}
	
	is_triggered_only = yes
	
	option = {
		name = EXCELLENT
		hidden_tooltip = {
			if = {
				limit = {
					independent = no
					liege = {
						ai = no
						religion = ROOT
					}
				}
				liege = { character_event = { id = GoPagan.156 } }
			}
			any_playable_ruler = {
				limit = {
					ai = no
					religion = ROOT
					NOT = { is_liege_of = ROOT }
				}
				character_event = { id = GoPagan.157 }
			}
		}
	}
}

# Inform liege
character_event = {
	id = GoPagan.156
	picture = GFX_evt_bishop

	desc = {
		text = EVTDESC_GoPagan_156_manichean
		trigger = { religion = manichean }
	}
	desc = {
		text = EVTDESC_GoPagan_156_celtic
		trigger = { religion = celtic_pagan_reformed }
	}
	desc = {
		text = EVTDESC_GoPagan_156_hellenic
		trigger = { religion_group = hellenic_pagan_group }
	}
	desc = {
		text = EVTDESC_GoPagan_156_cathar
		trigger = { religion = cathar }
	}
	desc = {
		text = EVTDESC_GoPagan_156_bogomilist
		trigger = { religion = bogomilist }
	}
	
	is_triggered_only = yes
	notification = yes

	option = {
		name = OK
	}
}

# Inform everyone else
character_event = {
	id = GoPagan.157
	picture = GFX_evt_bishop

	desc = {
		text = EVTDESC_GoPagan_157_manichean
		trigger = { religion = manichean }
	}
	desc = {
		text = EVTDESC_GoPagan_157_celtic
		trigger = { religion = celtic_pagan_reformed }
	}
	desc = {
		text = EVTDESC_GoPagan_157_hellenic
		trigger = { religion_group = hellenic_pagan_group }
	}
	desc = {
		text = EVTDESC_GoPagan_157_cathar
		trigger = { religion = cathar }
	}
	desc = {
		text = EVTDESC_GoPagan_157_bogomilist
		trigger = { religion = bogomilist }
	}
	
	is_triggered_only = yes
	notification = yes

	option = {
		name = OK
	}
}

