
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
			religion_group = pagan_group
			culture_group = mesoamerican
			culture_group = indo_aryan_group
			culture_group = dravidian_group
			capital_holding = { holding_type = temple }
			has_character_modifier = do_not_disturb
			has_character_modifier = voice_of_jesus
			has_character_modifier = voice_of_satan
			has_character_flag = seeks_pagan_knowledge
			has_character_flag = refused_pagan_knowledge
		}
	}
	
	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
			religion_group = pagan_group
			culture_group = mesoamerican
			culture_group = indo_aryan_group
			culture_group = dravidian_group
			capital_holding = { holding_type = temple }
			has_character_modifier = do_not_disturb
			has_character_flag = refused_pagan_knowledge
		}
		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 = {
					OR = {
						culture_group = celtic
						culture_group = iberian
						culture = frankish
						culture = occitan
						culture = basque
					}
				}
				religion = celtic_pagan
			}
			if = {
				limit = {
					OR = {
						culture_group = north_germanic
						culture = norman
						culture = english
						culture = scots
						culture = teutonic
					}
				}
				religion = norse_pagan
			}
			if = {
				limit = {
					OR = {
						culture_group = central_germanic
						culture_group = franco_germanic
						culture_group = east_germanic
						culture = saxon
						culture = old_saxon
						culture = frisian
					}
				}
				religion = german_pagan
			}
			if = {
				limit = { culture_group = finno_ugric }
				religion = finnish_pagan
			}
			if = {
				limit = { culture_group = baltic }
				religion = baltic_pagan
			}
			if = {
				limit = {
					OR = {
						culture_group = altaic
						culture_group = magyar
					}
				}
				religion = tengri_pagan
			}
			if = {
				limit = {
					OR = {
						culture_group = east_slavic
						culture_group = west_slavic
						culture_group = south_slavic
					}
				}
				religion = slavic_pagan
			}
			if = {
				limit = { culture_group = west_african }
				religion = west_african_pagan
			}
			if = {
				limit = {
					OR = {
						culture = egyptian_arabic
						culture = coptic
					}
				}
				religion = egyptian_pagan
			}
			if = {
				limit = {
					OR = {
						culture = roman
						culture = italian
						culture = lombard
						culture = sicilian
						culture = sicilian_greek
						culture_group = byzantine
						culture_group = crusader_group
					}
				}
				religion = hellenic_pagan
			}
			if = {
				limit = {
					OR = {
						culture = persian
						culture = kurdish
						culture = baloch
						culture = sogdian
						culture = tocharian
					}
				}
				religion = zoroastrian
			}
			if = {
				limit = {
					culture_group = israelite
					ROOT = { religion_group = jewish_group }
				}
				religion = jewish_pagan
			}
			if = {
				limit = {
					culture_group = israelite
					ROOT = { NOT = { religion_group = jewish_group } }
				}
				religion = jewish
			}
			if = {
				limit = { culture = afghan }
				religion = zun_pagan
			}
			if = {
				limit = {
					OR = {
						culture = maghreb_arabic
						culture = andalusian_arabic
						culture = sicilian_arabic
					}
				}
				religion = berber_pagan
			}
			if = {
				limit = {
					OR = {
						culture = bedouin_arabic
						culture = levantine_arabic
					}
				}
				religion = arab_pagan
			}
			if = {
				limit = { culture_group = east_african }
				religion = pagan
			}
			opinion = { who = ROOT modifier = opinion_pagan_advisor years = 100 }
			reverse_opinion = { who = ROOT modifier = opinion_pagan_advisor years = 100 }
		}
		piety = -50
		if = {
			limit = {
				OR = {
					culture = persian
					culture = kurdish
					culture = baloch
					culture = sogdian
					culture = tocharian
				}
				NOT = { trait = sympathy_zoroastrianism }
			}
			add_trait = sympathy_zoroastrianism
		}
		if = {
			limit = {
				culture_group = israelite
				ROOT = { NOT = { religion_group = jewish_group } }
				NOT = { trait = sympathy_judaism }
			}
			add_trait = sympathy_judaism
		}
		if = {
			limit = {
				culture_group = israelite
				ROOT = { religion_group = jewish_group }
				NOT = { trait = sympathy_judaism }
			}
			add_trait = sympathy_pagans
		}
		if = {
			limit = {
				NOR = {
					culture = persian
					culture = kurdish
					culture = baloch
					culture = sogdian
					culture = tocharian
					culture_group = israelite
					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 = {
				religion_group = pagan_group
				AND = {
					ROOT = {
						OR = {
							culture = persian
							culture = kurdish
							culture = baloch
							culture = sogdian
							culture = tocharian
						}
					}
					religion = zoroastrian
				}
				AND = {
					ROOT = { culture_group = israelite }
					religion = jewish
				}
			}
		}
		NOR = {
			rightful_religious_head = ROOT
			trait = zealous
			religion = zoroastrian
			religion = manichean
			religion_group = pagan_group
			culture_group = mesoamerican
			culture_group = indo_aryan_group
			culture_group = dravidian_group
			capital_holding = { holding_type = temple }
			has_character_modifier = do_not_disturb
			has_character_modifier = voice_of_jesus
			has_character_modifier = voice_of_satan
			has_character_flag = refused_pagan_knowledge
		}
	}
	
	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 = {
					religion_group = pagan_group
					AND = {
						ROOT = {
							OR = {
								culture = persian
								culture = kurdish
								culture = baloch
								culture = sogdian
								culture = tocharian
							}
						}
						religion = zoroastrian
					}
					AND = {
						ROOT = { culture_group = israelite }
						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 = {
				OR = {
					culture = persian
					culture = kurdish
					culture = baloch
					culture = sogdian
					culture = tocharian
				}
				NOT = { trait = sympathy_zoroastrianism }
			}
			add_trait = sympathy_zoroastrianism
		}
		if = {
			limit = {
				culture_group = israelite
				NOT = { religion_group = jewish_group }
				NOT = { trait = sympathy_judaism }
			}
			add_trait = sympathy_judaism
		}
		if = {
			limit = {
				culture_group = israelite
				religion_group = jewish_group
				NOT = { trait = sympathy_pagans }
			}
			add_trait = sympathy_pagans
		}
		if = {
			limit = {
				NOR = {
					culture = persian
					culture = kurdish
					culture = baloch
					culture = sogdian
					culture = tocharian
					culture_group = israelite
					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 = {
				OR = {
					culture = persian
					culture = kurdish
					culture = baloch
					culture = sogdian
					culture = tocharian
				}
				trait = sympathy_zoroastrianism
			}
			remove_trait = sympathy_zoroastrianism
		}
		if = {
			limit = {
				culture_group = israelite
				trait = sympathy_judaism
			}
			remove_trait = sympathy_judaism
		}
		if = {
			limit = {
				culture_group = israelite
				trait = sympathy_pagans
			}
			remove_trait = sympathy_pagans
		}
		if = {
			limit = {
				NOR = {
					culture = persian
					culture = kurdish
					culture = baloch
					culture = sogdian
					culture = tocharian
					culture_group = israelite
				}
				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 = {
					culture = persian
					culture = kurdish
					culture = baloch
					culture = sogdian
					culture = tocharian
				}
				trait = sympathy_zoroastrianism
			}
			AND = {
				culture_group = israelite
				OR = {
					trait = sympathy_judaism
					trait = sympathy_pagans
				}
			}
			AND = {
				NOR = {
					culture = persian
					culture = kurdish
					culture = baloch
					culture = sogdian
					culture = tocharian
					culture_group = israelite
				}
				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
			religion_group = pagan_group
			culture_group = mesoamerican
			culture_group = indo_aryan_group
			culture_group = dravidian_group
			capital_holding = { holding_type = temple }
			has_character_modifier = do_not_disturb
			has_character_flag = refused_pagan_knowledge
		}
	}
	
	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 = {
				OR = {
					culture = persian
					culture = kurdish
					culture = baloch
					culture = sogdian
					culture = tocharian
				}
				trait = sympathy_zoroastrianism
			}
			remove_trait = sympathy_zoroastrianism
		}
		if = {
			limit = {
				culture_group = israelite
				trait = sympathy_judaism
			}
			remove_trait = sympathy_judaism
		}
		if = {
			limit = {
				culture_group = israelite
				trait = sympathy_pagans
			}
			remove_trait = sympathy_pagans
		}
		if = {
			limit = {
				NOR = {
					culture = persian
					culture = kurdish
					culture = baloch
					culture = sogdian
					culture = tocharian
					culture_group = israelite
				}
				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 = {
			OR = {
				culture = persian
				culture = kurdish
				culture = baloch
				culture = sogdian
				culture = tocharian
			}
		}
		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 = {
			OR = {
				culture_group = celtic
				culture_group = iberian
				culture = frankish
				culture = occitan
				culture = basque
			}
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = celtic_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 = {
			OR = {
				culture_group = altaic
				culture_group = magyar
			}
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = tengri_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 = {
			OR = {
				 culture_group = baltic
				 culture = ugricbaltic
			}
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = baltic_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 = {
			OR = {
				culture_group = east_slavic
				culture_group = west_slavic
				culture_group = south_slavic
			}
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = slavic_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 = {
			culture_group = west_african
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = west_african_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 = {
			OR = {
				culture = maghreb_arabic
				culture = andalusian_arabic
				culture = sicilian_arabic
			}
		}
		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 = {
			OR = {
				culture = bedouin_arabic
				culture = levantine_arabic
			}
		}
		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 = {
			culture_group = east_african
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = 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 = {
			OR = {
				culture = egyptian_arabic
				culture = coptic
			}
		}
		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 = {
			culture = afghan
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = zun_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 = {
			culture_group = finno_ugric
			NOT = { religion = finnish_pagan}
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = finnish_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 = EVTOPTD_GoPagan_100 #Valhalla awaits!
		trigger = {
			OR = {
				culture_group = north_germanic
				culture = norman
				culture = english
				culture = scots
				culture = teutonic
			}
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = norse_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 = EVTOPTE_GoPagan_100 #To the gods of old!
		trigger = {
			OR = {
				culture_group = central_germanic
				culture_group = franco_germanic
				culture_group = east_germanic
				culture = saxon
				culture = old_saxon
				culture = frisian
			}
		}
		ai_chance = { factor = 100 }
		piety = -100
		if = {
			limit = { higher_tier_than = BARON }
			religion_authority = { modifier = ruler_converted_from }
		}
		religion = german_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 = EVTOPTL_GoPagan_100 #God will not lead us astray
		trigger = {
			culture_group = israelite
			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 = {
				culture_group = israelite
				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 = {
			OR = {
				culture = roman
				culture = italian
				culture = lombard
				culture = sicilian
				culture = sicilian_greek
				culture_group = byzantine
				culture_group = crusader_group
			}
		}
		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 = 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
			religion_group = pagan_group
			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 = { religion_group = pagan_group }
		}
		modifier = {
			factor = 0.5
			independent = no
			liege = { religion_group = pagan_group }
		}
		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 = {
					OR = {
						culture = persian
						culture = kurdish
						culture = baloch
						culture = sogdian
						culture = tocharian
					}
					NOT = { trait = sympathy_zoroastrianism }
				}
				add_trait = sympathy_zoroastrianism
			}
			if = {
				limit = {
					culture_group = israelite
					NOT = { trait = sympathy_judaism }
				}
				add_trait = sympathy_judaism
			}
			if = {
				limit = {
					NOR = {
						culture = persian
						culture = kurdish
						culture = baloch
						culture = sogdian
						culture = tocharian
						culture_group = israelite
						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 = { religion_group = pagan_group }
						}
						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
					religion_group = pagan_group
					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
					religion_group = pagan_group
					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
					religion_group = pagan_group
				}
				custom_tooltip = { text = CONVERSION_CULTURE_BAD_4 }
			}
			if = {
				limit = {
					OR = {
						culture_group = north_germanic
						culture_group = east_slavic
					}
					religion_group = pagan_group
					ROOT = { religion_group = muslim }
				}
				custom_tooltip = { text = CONVERSION_CULTURE_BAD_4 }
			}
			if = {
				limit = {
					religion_group = pagan_group
					is_reformed_religion = no
					ROOT = { NOT = { religion_group = pagan_group } }
				}
				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 = {
					religion_group = pagan_group
					ROOT = { religion_group = pagan_group }
					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
						religion_group = pagan_group
						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 = { religion_group = pagan_group }
						}
						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
					religion_group = pagan_group
					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
					religion_group = pagan_group
					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
					religion_group = pagan_group
				}
				custom_tooltip = { text = CONVERSION_CULTURE_BAD_3 }
			}
			if = {
				limit = {
					OR = {
						culture_group = north_germanic
						culture_group = east_slavic
					}
					religion_group = pagan_group
					ROOT = { religion_group = muslim }
				}
				custom_tooltip = { text = CONVERSION_CULTURE_BAD_3 }
			}
			if = {
				limit = {
					religion_group = pagan_group
					is_reformed_religion = no
					ROOT = { NOT = { religion_group = pagan_group } }
				}
				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 = {
					religion_group = pagan_group
					ROOT = { religion_group = pagan_group }
					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
						religion_group = pagan_group
						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 }
							religion_group = pagan_group
						}
						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 = { religion_group = pagan_group }
					}
					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 = { religion_group = pagan_group }
						}
						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 = { religion_group = pagan_group }
					}
					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
				religion_group = pagan_group
				FROM = {
					OR = {
						religion = chalcedonian
						religion = orthodox
						religion = bogomilist
						religion = monothelite
						religion = iconoclast
					}
					is_heretic = no
				}
			}
			modifier = {
				factor = 2
				culture_group = north_germanic
				religion_group = pagan_group
				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
				religion_group = pagan_group
			}
			modifier = {
				factor = 0.1
				OR = {
					culture_group = north_germanic
					culture_group = east_slavic
				}
				religion_group = pagan_group
				FROM = { religion_group = muslim }
			}
			modifier = {
				factor = 1.5
				religion_group = pagan_group
				is_reformed_religion = no
				FROM = { NOT = { religion_group = pagan_group } }
			}
			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 = 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
					religion_group = pagan_group
					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
				religion_group = pagan_group
				FROM = { religion_group = pagan_group }
				NOR = {
					is_heresy_of = FROM
					is_parent_religion = FROM
				}
			}
			modifier = {
				factor = 0.5
				NOT = { religion_group = pagan_group }
				FROM = { religion_group = pagan_group }
			}
			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 = { 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 }
			random = {
				chance = 50
				add_trait = sympathy_christendom
			}
		}
		if = {
			limit = { religion_group = muslim }
			random = {
				chance = 50
				add_trait = sympathy_islam
			}
		}
		if = {
			limit = { religion_group = pagan_group }
			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
			}
		}
		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 = { religion_group = pagan_group }
				}
				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 = 1.25
				location = { religion = FROM }
			}
			modifier = {
				factor = 3
				culture_group = east_slavic
				religion_group = pagan_group
				FROM = {
					OR = {
						religion = chalcedonian
						religion = orthodox
						religion = bogomilist
						religion = monothelite
						religion = iconoclast
					}
					is_heretic = no
				}
			}
			modifier = {
				factor = 3
				culture_group = north_germanic
				religion_group = pagan_group
				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
				religion_group = pagan_group
			}
			modifier = {
				factor = 0.25
				OR = {
					culture_group = north_germanic
					culture_group = east_slavic
				}
				religion_group = pagan_group
				FROM = { religion_group = muslim }
			}
			modifier = {
				factor = 2.0
				religion_group = pagan_group
				is_reformed_religion = no
				FROM = { NOT = { religion_group = pagan_group } }
			}
			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 = 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 = { religion_group = pagan_group } }
			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.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 = { religion_group = pagan_group }
					}
					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
				NOT = { religion_group = pagan_group }
				FROM = { religion_group = pagan_group }
			}
		}
		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 = { religion_group = pagan_group }
					}
					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 = { 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 = {
				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 = { religion_group = pagan_group }
					}
					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
				religion_group = pagan_group
				FROM = {
					OR = {
						religion = chalcedonian
						religion = orthodox
						religion = bogomilist
						religion = monothelite
						religion = iconoclast
					}
					is_heretic = no
				}
			}
			modifier = {
				factor = 2
				culture_group = north_germanic
				religion_group = pagan_group
				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
				religion_group = pagan_group
			}
			modifier = {
				factor = 0.25
				OR = {
					culture_group = north_germanic
					culture_group = east_slavic
				}
				religion_group = pagan_group
				FROM = { religion_group = muslim }
			}
			modifier = {
				factor = 1.5
				religion_group = pagan_group
				is_reformed_religion = no
				FROM = { NOT = { religion_group = pagan_group } }
			}
			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
					religion_group = pagan_group
					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
				religion_group = pagan_group
				FROM = { religion_group = pagan_group }
				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 = 2
					OR = {
						AND = {
							trait = sympathy_christendom
							FROM = { religion_group = christian }
						}
						AND = {
							trait = sympathy_islam
							FROM = { religion_group = muslim }
						}
						AND = {
							trait = sympathy_pagans
							FROM = { religion_group = pagan_group }
						}
						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
					religion_group = pagan_group
					FROM = {
						OR = {
							religion = chalcedonian
							religion = orthodox
							religion = bogomilist
							religion = monothelite
							religion = iconoclast
						}
						is_heretic = no
					}
				}
				modifier = {
					factor = 1.5
					culture_group = north_germanic
					religion_group = pagan_group
					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
					religion_group = pagan_group
				}
				modifier = {
					factor = 0.25
					OR = {
						culture_group = north_germanic
						culture_group = east_slavic
					}
					religion_group = pagan_group
					FROM = { religion_group = muslim }
				}
				modifier = {
					factor = 1.25
					religion_group = pagan_group
					is_reformed_religion = no
					FROM = {
						OR = {
							NOT = { religion_group = pagan_group }
							is_reformed_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
						religion_group = pagan_group
						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
					religion_group = pagan_group
					FROM = { religion_group = pagan_group }
					NOR = {
						is_heresy_of = FROM
						is_parent_religion = FROM
					}
				}
				modifier = {
					factor = 0.5
					NOT = { religion_group = pagan_group }
					FROM = { religion_group = pagan_group }
				}
				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 = { religion_group = pagan_group }
						}
						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
					religion_group = pagan_group
					FROM = {
						OR = {
							religion = chalcedonian
							religion = orthodox
							religion = bogomilist
							religion = monothelite
							religion = iconoclast
						}
						is_heretic = no
					}
				}
				modifier = {
					factor = 1.5
					culture_group = north_germanic
					religion_group = pagan_group
					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
					religion_group = pagan_group
				}
				modifier = {
					factor = 0.5
					OR = {
						culture_group = north_germanic
						culture_group = east_slavic
					}
					religion_group = pagan_group
					FROM = { religion_group = muslim }
				}
				modifier = {
					factor = 1.25
					religion_group = pagan_group
					is_reformed_religion = no
					FROM = {
						OR = {
							NOT = { religion_group = pagan_group }
							is_reformed_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
					religion_group = pagan_group
					FROM = { religion_group = pagan_group }
				}
				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 }
							religion_group = pagan_group
						}
						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
					NOT = { religion_group = pagan_group }
					FROM = { religion_group = pagan_group }
				}
				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 = { religion_group = pagan_group }
					}
					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
				}
			}
		}
		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 = { religion_group = pagan_group }
			}
			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 = { religion_group = pagan_group }
			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
			}
		}
		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 = { religion_group = pagan_group } }
			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 = { religion_group = pagan_group } }
			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 = { religion_group = pagan_group }
					}
					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 = { 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 = { religion_group = pagan_group }
			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
			}
		}
		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 = 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
				NOT = { religion_group = pagan_group }
				FROM = { religion_group = pagan_group }
			}
			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 = { 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 = {
				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 = { 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 = { religion_group = pagan_group }
			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
		}
		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 }
			}
		}
	}
}

### 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 = hellenic_pagan }
	}
	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 = hellenic_pagan }
	}
	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 = hellenic_pagan }
	}
	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
	}
}

