# If you add religions, and use those tags, do not change them without changing everywhere they are used.

# Uses all 'modifiers' possible thats exported as a Modifier.

christian = {
	defender_of_faith = yes
	can_form_personal_unions = yes
	
	center_of_religion = 118 # Rome

	# Flag emblem values - Used for Dynamic Setup of Random Nations.
	# Emblem texture: game/gfx/interface/client_state_symbols_large.dds
	# Can be overridden per religion.
	flags_with_emblem_percentage = 33 # default == 0
	flag_emblem_index_range = { 1 57 }

	chalcedonism = {
		color = { 200 160 0 }
		icon = 38
		allowed_conversion = {
			arianism
			coptic
			nestorian
		}
		country = {
			stability_cost_modifier = 0.1
			tolerance_own = -1
		}

		country_as_secondary = {
			diplomatic_reputation = 1
			stability_cost_modifier = -0.1
		}
		
		on_convert = {
			change_religion = chalcedonism
			add_stability = -3
		}
		
		heretic = { BOGOMILIST WALDENSIAN FRATICELLI HUSSITE LOLLARD SOCINIAN }
		
		holy_sites = { 151 118 358 2313 379 }
		
		blessings = {
			legitimize_government
			encourage_warriors_of_the_faith
			send_monks_to_establish_monasteries
			christian_law
			one_true_faith
		}
	}
	
	catholic = {
		color = { 204 204 0 }
		icon = 1
		allowed_conversion = {
			reformed
			protestant
		}
		country = {
			tolerance_own = 1
			global_heathen_missionary_strength = 0.01
		}
		
		country_as_secondary = {
			diplomatic_reputation = 1
			advisor_pool = 1
		}
		
		hre_religion = yes
		
		on_convert = {
			change_religion = catholic
			add_prestige = -100
			
			remove_country_modifier = the_test_act
			remove_country_modifier = superintendent_office
			remove_country_modifier = the_popery_act
			
			add_country_modifier = {
				name = "conversion_zeal"
				duration = 3650
			}			
		
		}
		
		heretic = { BOGOMILIST WALDENSIAN FRATICELLI LOLLARD SOCINIAN }
		
		papacy = {
			papal_tag = PAP
			election_cost = 5
			seat_of_papacy = 118 # rome
			
			
			#Council of Trent Positions
			harsh = {
				relation_with_heretics = -10
				global_religious_conversion_resistance = 0.25
				global_institution_spread = -0.25
				global_missionary_strength = 0.02
			}
			neutral = {
				global_religious_conversion_resistance = -0.33
			}
			concilatory = {
				relation_with_heretics = 5
				global_religious_conversion_resistance = 0.25
				global_heretic_missionary_strength = -0.05
				improve_relation_modifier = 0.25
			}
			
			#Council of Trent Concessions
			concessions = {
				first_concession = {
					harsh = {
						relation_with_heretics = -10
						global_heretic_missionary_strength  = 0.02
					}	
					concilatory = {
						relation_with_heretics = 5
						tolerance_heretic = 2
					}
				}
				second_concession = {
					harsh = {
						relation_with_heretics = -10
						institution_spread_from_true_faith = 0.30
					}	
					concilatory = {
						relation_with_heretics = 5
						global_institution_spread = 0.10
					}
				}
				third_concession = {
					harsh = {
						relation_with_heretics = -10
						manpower_in_true_faith_provinces  = 0.1
					}	
					concilatory = {
						relation_with_heretics = 5
						global_manpower_modifier = 0.05
					}
				}
				fourth_concession = {
					harsh = {
						relation_with_heretics = -10
						warscore_cost_vs_other_religion  = -0.10
					}	
					concilatory = {
						relation_with_heretics = 5
						curia_powers_cost = -0.10
					}
				}
			}
			


			
			
			
			
			# Papal Actions below!
			
			levy_church_tax = {
				cost = 50
				potential = {
					NOT = { tag = PAP }
				}
				allow = {
					NOT = { war_with = PAP }
					NOT = { has_country_modifier = papal_sanction_for_church_taxes }
				}
				effect = {
					add_country_modifier = {
						name = "papal_sanction_for_church_taxes"
						duration = 7300
					}
				}
				ai_will_do = {
					factor = 1
				}				
			}			
			bless_monarch = {
				cost = 50
				potential = {
					NOT = { tag = PAP }
				}
				allow = {
					NOT = { war_with = PAP }
					NOT = { has_country_modifier = papal_blessing }
				}
				effect = {
					add_country_modifier = {
						name = "papal_blessing"
						duration = 7300
					}
				}
				ai_will_do = {
					factor = 1
				}
			}
			indulgence_for_sins = {
				cost = 50
				potential = {
					NOT = { tag = PAP }
				}
				allow = {
					NOT = { war_with = PAP }
					NOT = { has_country_modifier = papal_indulgence }
				}
				effect = {
					add_country_modifier = {
						name = "papal_indulgence"
						duration = 7300
					}
				}
				ai_will_do = {
					factor = 1
				}
			}	
			local_saint = {
				cost = 100
				potential = {
					NOT = { tag = PAP }
				}
				allow = {
					NOT = { war_with = PAP }
					NOT = { stability = 3 }
				}
				effect = {
					add_stability = 1
				}
				ai_will_do = {
					factor = 1
					modifier = {
						factor = 2
						NOT = { stability = 0 }
					}
				}
			}
			forgiveness_for_usury = {
				cost = 50
				potential = {
					NOT = { tag = PAP }
				}
				allow = {
					NOT = { war_with = PAP }
					NOT = { has_country_modifier = usury_forgiven }
				}
				effect = {
					add_country_modifier = {
						name = "usury_forgiven"
						duration = 7300
					}
				}
				ai_will_do = {
					factor = 1
					modifier = {
						factor = 0
						NOT = { num_of_loans = 1 }
					}
				}
			}			
			proclaim_holy_war = {
				cost = 50
				potential = {
					NOT = { tag = PAP }
				}
				allow = {
					is_at_war = yes
					NOT = { war_with = PAP }
					NOT = { has_country_modifier = papal_sanction_for_holy_war }
				}
				effect = {
					add_country_modifier = {
						name = "papal_sanction_for_holy_war"
						duration = 7300
					}
				}
				ai_will_do = {
					factor = 1
					modifier = {
						factor = 0
						manpower_percentage = 0.5
					}
				}
			}
			send_papal_legate = {
				cost = 50
				potential = {
					NOT = { tag = PAP }
					is_papal_controller = no
				}
				allow = {
					NOT = { war_with = PAP }
					NOT = { has_country_modifier = papal_legate }
				}
				effect = {
					add_country_modifier = {
						name = "papal_legate"
						duration = 7300
					}
				}
				ai_will_do = {
					factor = 1
				}
			}	
			sanction_commercial_monopoly = {
				cost = 50
				potential = {
					NOT = { tag = PAP }
				}
				allow = {
					NOT = { war_with = PAP }
					NOT = { mercantilism = 100 }
				}
				effect = {
					add_mercantilism = 1
				}
				ai_will_do = {
					factor = 1
					modifier = {
						factor = 0
						NOT = { has_idea_group = trade_ideas }
					}
				}
			}
			investigate_heresy = {
				curia_treasury_cost = 500
				potential = {
					has_dlc = "Emperor"
					is_papal_controller = yes
					tag = PAP
				}
				allow = {
					is_papal_controller = yes
					reform_desire = 0.05
				}
				effect = {
					add_reform_desire = -0.05
					add_reform_desire_scale = 0.5
				}
				ai_will_do = {
					factor = 0
				}
			}
		}

		date = 867.1.1
	}
	
	anglican = {
		color = { 135 77 255 }
		icon = 50
		allow_female_defenders_of_the_faith = yes

		allowed_center_conversion = {
			catholic
		}
		country = {
			development_cost = -0.1
			technology_cost = -0.05
		}
		
		country_as_secondary = {
			idea_cost = -0.1
		}
		
		uses_anglican_power = yes				# Uses church power/aspect mechanics
		
		aspects = {
			divorce_consort_aspect
			gain_consort_aspect
			dissolve_monasteries_aspect
			monopoly_aspect
			stability_aspect
			innovativeness_aspect
			expel_heretics_aspect
			diplomats_of_the_reformation_aspect
			icons_of_the_church_aspect
			spread_the_book_of_common_prayer
		}
		aspects_name = ANGLICAN_ASPECTS
		
		heretic = { PENTECOSTAL PURITAN CONGREGATIONALIST }
		
		date = 1534.11.3 # act of supremacy
	}
	
	cathar = {
		color = { 90 90 240 }
		icon = 57
		
		allowed_center_conversion = {
			catholic
		}
		country = {
			global_heretic_missionary_strength = 0.02
			female_advisor_chance = 0.4
		}
		country_as_secondary = {
			global_missionary_strength = 0.02
			female_advisor_chance = 0.4
		}

		uses_church_power = yes				# Uses church power/aspect mechanics
		aspects = {
			cathar_aspect_endura
			cathar_aspect_cathar_hierarchy
			cathar_aspect_pacifism
			cathar_aspect_equality_of_men_and_women
			cathar_aspect_fortress_churches
			cathar_aspect_generous_donations
			cathar_aspect_allowed_interest
			cathar_aspect_consolamentum
			cathar_aspect_perfecti
			cathar_aspect_support_of_the_nobility
			cathar_aspect_ascetic_lifestyle
			cathar_aspect_collective_families
		}
		aspects_name = PROTESTANT_ASPECTS

		heretic = { BOGOMILIST WALDENSIAN FRATICELLI LOLLARD SOCINIAN }
		
		date = 1143.1.1
	}
	
	hussite = {
		color = { 244 55 9 }
		icon = 53

		allowed_center_conversion = {
			catholic
		}
		country = {
			shock_damage_received = -0.05
			global_heretic_missionary_strength = 0.02
		}
		
		country_as_secondary = {
			shock_damage_received = -0.025
		}
		
		uses_hussite_power = yes				# Uses church power/aspect mechanics
		
		aspects = {
			clerical_poverty_aspect
			bread_and_wine_aspect
			sola_scriptura_aspect
			adamite_services_aspect
			pacifism_aspect
			punishment_of_sins_aspect
			regular_defenestrations_aspect
			taborite_resurgence_aspect
			orphan_hetmans_aspect
			freedom_to_preach_aspect
			rekindle_the_hussite_wars_aspect
		}
		aspects_name = PROTESTANT_ASPECTS
		
		heretic = { TABORITE UTRAQUIST ORPHAN }
		
		date = 1415.7.6
	}
	
	protestant = {
		color = { 0 0 178 }
		icon = 2

		allowed_conversion = {
			reformed
			catholic
		}
		allowed_center_conversion = {
			catholic
			chalcedonism
		}
		country = {
			global_tax_modifier = 0.1
			improve_relation_modifier = 0.15
			church_loyalty_modifier = 0.1
		}
		
		country_as_secondary = {
			idea_cost = -0.1
		}
		
		uses_church_power = yes				# Uses church power/aspect mechanics
		aspects = {
			organised_through_bishops_aspect
			priests_may_marry_aspect
			adult_baptism_aspect
			holy_sacraments_aspect
			saints_accept_prayers_aspect
			icons_images_aspect
			legalised_divorces_aspect
			heretics_deported_aspect
			parish_registers_aspect
			individual_creeds_aspect
			allow_usury_aspect
			translated_bibles_aspect
			justified_religious_war_aspect
			war_preaches_aspect
			head_of_the_church_aspect
			anglican_aspect
		}
		aspects_name = PROTESTANT_ASPECTS
		
		hre_heretic_religion = yes
		
		will_get_center = { #Refered to even for initial CoR Spawn
			any_owned_province = {
				can_have_center_of_reformation_trigger = {
					RELIGION = protestant
				}
			}
		}

		on_convert = {
			change_religion = protestant
			add_prestige = -100
			remove_country_modifier = counter_reformation
			remove_country_modifier = the_statue_in_restraint_of_appeals
			remove_country_modifier = revocation_of_restraint_of_appeals
			remove_country_modifier = bavarian_jesuits
			remove_country_modifier = the_societas_jesu
			remove_country_modifier = the_declaration_of_indulgence
			remove_country_modifier = de_heretico_comburendo
			remove_country_modifier = the_conventicle_act
	
			if = {
				limit = {
					has_country_flag = reformation_money
					NOT = {
						calc_true_if = {
							all_province = {
								religion = protestant
								is_reformation_center = yes
							}
							amount = 3
						}
					}
				}
				hidden_effect = {
					random_owned_province = {
						limit = {
							can_have_center_of_reformation_trigger = {
								RELIGION = protestant
							}
						}
						change_religion = protestant
						add_reform_center = protestant
					}
				}
				custom_tooltip = CENTER_OF_REFORMATION_POSSIBLE
			}
			if = {
				limit = {
					NOT = { has_country_flag = reformation_money }
					NOT = {
						calc_true_if = {
							all_province = {
								religion = protestant
								is_reformation_center = yes
							}
							amount = 3
						}
					}
				}
				add_years_of_income = 1.0
				hidden_effect = {
					random_owned_province = {
						limit = {
							can_have_center_of_reformation_trigger = {
								RELIGION = protestant
							}
						}
						change_religion = protestant
						add_reform_center = protestant
					}
				}
				custom_tooltip = CENTER_OF_REFORMATION_POSSIBLE
			}
			
			add_country_modifier = {
				name = "conversion_zeal"
				duration = 3650
			}			
			set_country_flag = reformation_money
			every_known_country = {
				limit = {
					reverse_has_opinion_modifier = {
						who = ROOT
						modifier = opinion_demote_pope
					}
				}
				reverse_remove_opinion = {
					who = ROOT
					modifier = opinion_demote_pope
				}
			}
		}
		
		heretic = { PENTECOSTAL PURITAN CONGREGATIONALIST }
		
		date = 1517.10.31
	}

	reformed = {
		color = { 76 76 229 }
		icon = 3
		allowed_conversion = {
			protestant
			catholic
		}
		allowed_center_conversion = {
			catholic
			chalcedonism
		}
		country = {
			tolerance_heretic = 2
			advisor_pool = 1
		}
		
		country_as_secondary = {
			global_unrest = -1
			advisor_cost = -0.1
		}

		will_get_center = { #Refered to even for initial CoR Spawn
			any_owned_province = {
				can_have_center_of_reformation_trigger = {
					RELIGION = reformed
				}
			}
		}
		
		on_convert = {
			change_religion = reformed
			add_prestige = -100
			remove_country_modifier = counter_reformation
			remove_country_modifier = the_statue_in_restraint_of_appeals
			remove_country_modifier = revocation_of_restraint_of_appeals
			remove_country_modifier = bavarian_jesuits
			remove_country_modifier = the_societas_jesu
			remove_country_modifier = the_declaration_of_indulgence
			remove_country_modifier = de_heretico_comburendo
			remove_country_modifier = the_conventicle_act
			
			if = {
				limit = {
					has_country_flag = reformation_money
					NOT = {
						calc_true_if = {
							all_province = {
								religion = reformed
								is_reformation_center = yes
							}
							amount = 3
						}
					}
				}
				hidden_effect = {
					random_owned_province = {
						limit = {
							can_have_center_of_reformation_trigger = {
								RELIGION = reformed
							}
						}
						change_religion = reformed
						add_reform_center = reformed
					}
				}
				custom_tooltip = CENTER_OF_REFORMATION_POSSIBLE
			}
			if = {
				limit = {
					NOT = { has_country_flag = reformation_money }
					NOT = {
						calc_true_if = {
							all_province = {
								religion = reformed
								is_reformation_center = yes
							}
							amount = 3
						}
					}
				}
				add_years_of_income = 1.0
				hidden_effect = {
					random_owned_province = {
						limit = {
							can_have_center_of_reformation_trigger = {
								RELIGION = reformed
							}
						}
						change_religion = reformed
						add_reform_center = reformed
					}
				}
				custom_tooltip = CENTER_OF_REFORMATION_POSSIBLE
			}
			add_country_modifier = {
				name = "conversion_zeal"
				duration = 3650
			}
			set_country_flag = "reformation_money"
			every_known_country = {
				limit = {
					reverse_has_opinion_modifier = {
						who = ROOT
						modifier = opinion_demote_pope
					}
				}
				reverse_remove_opinion = {
					who = ROOT
					modifier = opinion_demote_pope
				}
			}
		}
		
		heretic = { METHODIST BAPTIST QUAKER }
		
		date = 1536.5.1
		
		fervor = yes
	}

	orthodox = {
		color = { 178 127 0 }
		icon = 4
		country = {
			stability_cost_modifier = -0.1
			tolerance_own = 1
		}
		country_as_secondary = {
			global_colonial_growth = 10
			tolerance_own = 1
		}
		province = {
			local_missionary_strength = -0.01
		}
		
		
		heretic = { OLD_BELIEVER MOLOKAN DUKHOBOR KHLYST SKOPTSY ICONOCLAST }
		
		has_patriarchs = yes		# Uses patriarch authority
		misguided_heretic = yes		# Other christians hate them less
		
		orthodox_icons = {
			# If no icon has ai_will_do above 1 - <current patriarch authority> , the AI will not enact it. (60% PA = 0.6 -> ai_will_do has to be at least 0.4)

			icon_michael = {
				discipline = 0.05
				manpower_recovery_speed = 0.1
				
				allow = {
					always = yes
				}

				visible = {
					always = yes
				}

				ai_will_do = {
					factor = 0.05
					modifier = {
						factor = 0
						is_at_war = no
					}
					modifier = {
						factor = 3
						is_in_important_war = yes
					}
				}
			}

			icon_eleusa = {
				global_unrest = -3
				harsh_treatment_cost = -0.25
				
				allow = {
					always = yes
				}

				visible = {
					always = yes
				}
				
				ai_will_do = {
					factor = 0.02
					modifier = {
						factor = 0
						NOT = {
							calc_true_if = {
								all_owned_province = {
									unrest = 1
								}
								amount = 2
							}
						}
					}
					modifier = {
						factor = 3
						calc_true_if = {
							all_owned_province = {
								unrest = 1
							}
							amount = 5
						}
					}
				}
			}

			icon_pancreator = {
				development_cost = -0.10
				build_cost = -0.1
				
				allow = {
					always = yes
				}

				visible = {
					always = yes
				}
				
				ai_will_do = {
					factor = 0
				}
			}
	
			icon_nicholas = {
				improve_relation_modifier = 0.25
				ae_impact = -0.1
				
				visible = {
					always = yes
				}
				
				allow = {
					always = yes
				}
				ai_will_do = {
					factor = 0.01
				}
			}

			icon_climacus = {
				global_institution_spread = 0.25
				embracement_cost = -0.2

				visible = {
					always = yes
				}

				allow = {
					always = yes
				}
				ai_will_do = {
					factor = 0.02
					modifier = {
						factor = 0
						NOT = {
							calc_true_if = {
								all_owned_province = {
									current_institution = 1
									NOT = { current_institution = 95 }
								}
								amount = 1
							}
						}
					}
					modifier = {
						factor = 3
						calc_true_if = {
							all_owned_province = {
								current_institution = 1
								NOT = { current_institution = 95 }
							}
							amount = 5
						}
					}
				}
			}
			
			#New added in mod
			icon_olga = {
				global_missionary_strength = 0.02
				harsh_treatment_cost = -0.25

				visible = {
					culture_group = east_slavic
					OR = {
						started_in = 1547.1.1
						has_country_flag = saint_olga_of_kiev_icon_enabled_flag
					}
				}

				allow = {
					culture_group = east_slavic
					OR = {
						started_in = 1547.1.1
						has_country_flag = saint_olga_of_kiev_icon_enabled_flag
					}
				}
				ai_will_do = {
					factor = 0.01
					modifier = {
						factor = 0
						NOT = {
							calc_true_if = {
								all_owned_province = {
									NOT = { religion = orthodox }
								}
								amount = 1
							}
						}
					}
					modifier = {
						factor = 3
						calc_true_if = {
							all_owned_province = {
								NOT = { religion = orthodox }
							}
							amount = 10
						}
					}
				}
			}
		}

		date = 867.1.1
	}
	
	coptic = {
	
		flags_with_emblem_percentage = 20
		flag_emblem_index_range = { 1 4 }

		color = { 178 120 120 }
		icon = 5
		allowed_conversion = {
			chalcedonism
			nestorian
			arianism
		}
		country = {
			defensiveness = 0.1
			tolerance_own = 1
		}
		country_as_secondary = {
			siege_ability = 0.1
			defensiveness = 0.1
		}
		province = {
			local_missionary_strength = -0.02
		}
		allowed_center_conversion = {
			orthodox
			sunni
			shiite
			ibadi
		}
		
		heretic = { ZAMIKAELITES STEPHANITES EUSTATHIANS }
		
		misguided_heretic = yes
		
		holy_sites = { 358 1227 2313 1234 419 }
		
		blessings = {
			legitimize_government
			encourage_warriors_of_the_faith
			send_monks_to_establish_monasteries
			promote_territorial_rights
			will_of_the_martyrs
		}

		date = 451.11.1
	}

	nestorian = {
		color = { 160 160 0 }
		icon = 6
		allowed_conversion = {
			chalcedonism
			arianism
			coptic
		}
		country = {
			stability_cost_modifier = -0.1
			tolerance_own = 1
		}
		country_as_secondary = {
			tolerance_heathen = 2
			siege_ability = 0.1
		}
		on_convert = {
			change_religion = nestorian
			add_stability = -3
		}

		heretic = { ZAMIKAELITES STEPHANITES EUSTATHIANS }

		misguided_heretic = yes		# Other christians hate them less (?)
		
		holy_sites = { 379 410 2308 445 739 }
		
		blessings = {
			recruit_from_the_faithful
			missions_from_the_orient
			unity_through_faith
			measured_expansion
			promote_religious_education
		}

		date = 431.7.1
	}

	arianism = {
		color = { 120 120 0 }
		icon = 7
		allowed_conversion = {
			chalcedonism
			nestorian
			coptic
		}
		country = {
			global_tax_modifier = 0.1
			stability_cost_modifier = -0.1
		}
		country_as_secondary = {
			global_tax_modifier = 0.1
			defensiveness = 0.1
		}
		on_convert = {
			change_religion = arianism
			add_stability = -3
		}
		
		heretic = { BOGOMILIST WALDENSIAN HUSSITE LOLLARD SOCINIAN }
		
		has_patriarchs = yes		# Uses patriarch authority

		date = 325.1.1
		
		orthodox_icons = {
			# If no icon has ai_will_do above 1 - <current patriarch authority> , the AI will not enact it. (60% PA = 0.6 -> ai_will_do has to be at least 0.4)

			icon_michael_arian = {
				discipline = 0.05
				manpower_recovery_speed = 0.1
				
				allow = {
					always = yes
				}
				ai_will_do = {
					factor = 1
					modifier = {
						factor = 0
						is_at_war = no
					}
					modifier = {
						factor = 3
						is_in_important_war = yes
					}
				}
			}

			icon_eleusa_arian = {
				global_unrest = -3
				harsh_treatment_cost = -0.25
				
				allow = {
					always = yes
				}
				ai_will_do = {
					factor = 1
					modifier = {
						factor = 0
						NOT = {
							calc_true_if = {
								all_owned_province = {
									unrest = 1
								}
								amount = 2
							}
						}
					}
					modifier = {
						factor = 3
						calc_true_if = {
							all_owned_province = {
								unrest = 1
							}
							amount = 5
						}
					}
				}
			}

			icon_pancreator_arian = {
				icon = 1
				
				development_cost = -0.10
				build_cost = -0.1
				
				allow = {
					always = yes
				}
				ai_will_do = {
					factor = 0
				}
			}

			icon_acacius = {
				global_institution_spread = 0.25
				technology_cost = -0.05
				
				allow = {
					always = yes
				}
				ai_will_do = {
					factor = 0.8
					modifier = {
						factor = 0
						NOT = {
							calc_true_if = {
								all_owned_province = {
									current_institution = 1
									NOT = { current_institution = 95 }
								}
								amount = 1
							}
						}
					}
					modifier = {
						factor = 3
						calc_true_if = {
							all_owned_province = {
								current_institution = 1
								NOT = { current_institution = 95 }
							}
							amount = 5
						}
					}
				}
			}
			
			icon_arius = {
				tolerance_own = 2
				global_missionary_strength = 0.02
				allow = {
					always = yes
				}
				ai_will_do = {
					factor = 0.5
				}
			}
		}
	}
	
	mormon = {
		color = { 175 198 235 }
		icon = 58
		allowed_conversion = {
			catholic
			protestant
			reformed
		}
		country = {
			stability_cost_modifier = -0.1
			missionaries = 1
		}
		country_as_secondary = {
			stability_cost_modifier = -0.2
			missionaries = 1
		}
		province = {
			local_missionary_strength = -0.03
		}
		on_convert = {
			change_religion = mormon
			add_stability = -3
		}

		heretic = { FUNDAMENTALIST LIBERAL }
		fervor = yes
		date = 1830.3.1
	}
	
	reformed_chalcedonism = {
		color = { 220 180 70 }
		icon = 59
		allowed_conversion = {
		}
		country = {
			tolerance_own = 1
			warscore_cost_vs_other_religion = -0.1
			reform_progress_growth = 0.1
		}

		country_as_secondary = {
			tolerance_heathen = 1
			reform_progress_growth = 0.05
		}

		on_convert = {
			change_religion = reformed_chalcedonism
		}

		uses_church_power = yes
		aspects = {
			reformed_chalcedonism_aspect_host_council_adm
			reformed_chalcedonism_aspect_host_council_dip
			reformed_chalcedonism_aspect_host_council_mil
			reformed_chalcedonism_aspect_improve_relations_with_brothers_in_faith
			reformed_chalcedonism_aspect_become_defender_of_faith
		}
		aspects_name = REFORMED_CHALCEDONIAN_ASPECTS

		heretic = { BOGOMILIST WALDENSIAN FRATICELLI HUSSITE LOLLARD SOCINIAN }
	}

	bogomilism = {
		color = { 170 0 0 }
		icon = 61
		allowed_conversion = {
		}
		country = {
			tolerance_own = 1
			advisor_cost = -0.1
			church_influence_modifier = -0.1
		}
		country_as_secondary = {
			yearly_corruption = -0.1
		}
		province = {
			local_missionary_strength = -0.02
		}

		on_convert = {
			change_religion = bogomilism
			set_bogomilism_strength_of_faith_value = { value = 0 }
		}

		heretic = { WALDENSIAN FRATICELLI HUSSITE LOLLARD SOCINIAN }

		date = 940.1.1
	}

	waldensian = {
		color = { 215 255 90 }
		icon = 62
		allowed_conversion = {
			catholic
			hussite
		}
		country = {
			tolerance_own = 1
			missionary_maintenance_cost = -0.25
		}
		country_as_secondary = {
			state_maintenance_modifier = -0.1
		}
		province = {
			local_missionary_strength = -0.01
		}

		on_convert = {
			change_religion = waldensian
			if = {
				limit = {
					NOT = { has_country_modifier = et_waldensian_apostolic_poverty_donations_focus_modifier }
					NOT = { has_country_modifier = et_waldensian_apostolic_poverty_work_communes_focus_modifier }
					NOT = { has_country_modifier = et_waldensian_apostolic_poverty_no_focus_modifier }
				}
				add_country_modifier = {
					name = et_waldensian_apostolic_poverty_no_focus_modifier
					duration = -1
				}
			}
		}

		heretic = { BOGOMILIST FRATICELLI LOLLARD SOCINIAN }

		date = 1173.1.1
	}

	lollard = {
		color = { 215 70 235 }
		icon = 63
		allowed_conversion = {
			catholic
			anglican
			protestant
			reformed
		}
		allowed_center_conversion = {
			catholic
		}
		country = {
			culture_conversion_time = -0.1
			diplomatic_reputation = 1
		}
		country_as_secondary = {
			culture_conversion_time = -0.1
		}
		province = {
			local_missionary_strength = -0.01
		}

		will_get_center = { #Refered to even for initial CoR Spawn
			has_friendly_reformation_center = no
			any_owned_province = {
				can_have_center_of_reformation_trigger = {
					RELIGION = lollard
				}
			}
		}

		on_convert = {
			change_religion = lollard
			if = {
				limit = {
					has_country_modifier = eng_opposes_lollards
				}
				remove_country_modifier = eng_opposes_lollards
			}
			if = {
				limit = {
					has_country_modifier = eng_tolerates_lollards
				}
				remove_country_modifier = eng_tolerates_lollards
			}
			if = {
				limit = {
					any_owned_province = {
						has_province_modifier = lollards
					}
				}
				every_owned_province = {
					limit = {
						has_province_modifier = lollards
					}
					remove_province_modifier = lollards
				}
			}

			if = {
				limit = {
					has_friendly_reformation_center = no
					any_owned_province = {
						can_have_center_of_reformation_trigger = {
							RELIGION = lollard
						}
					}
					NOT = {
						calc_true_if = {
							all_province = {
								religion = lollard
								is_reformation_center = yes
							}
							amount = 3
						}
					}
				}
				hidden_effect = {
					random_owned_province = {
						limit = {
							can_have_center_of_reformation_trigger = {
								RELIGION = lollard
							}
						}
						change_religion = lollard
						add_reform_center = lollard
					}
				}
				custom_tooltip = CENTER_OF_REFORMATION_POSSIBLE
			}
		}

		fervor = yes

		heretic = { BOGOMILIST FRATICELLI WALDENSIAN SOCINIAN }

		date = 1377.1.1
	}
	
	#New added in MMETR
	montanism = {
		color = { 255 86 89 }
		icon = 77
		allowed_conversion = {
			chalcedonism
		}
		country = {
			tolerance_own = 2
			missionaries = 1
			female_advisor_chance = 0.25
		}
		country_as_secondary = {
			tolerance_own = 2
			missionaries = 1
			female_advisor_chance = 0.2
		}
		province = {
			local_missionary_strength = 0.01
		}

		on_convert = {
			change_religion = montanism
			add_prestige = -30
		}

		heretic = { BOGOMILIST WALDENSIAN FRATICELLI HUSSITE LOLLARD SOCINIAN }

		date = 135.1.1	#Montanus, Maximilia and Prisca begin prophesying
	}
	
	paulician = {
		color = { 127 0 76 }
		icon = 78
		country = {
            stability_cost_modifier = -0.2
			tolerance_heathen = 2
		}
		country_as_secondary = {
			global_regiment_cost = -0.1
			merc_maintenance_modifier = -0.1
			cb_on_religious_enemies = yes		#can launch Crusades, as they did historically from their state in Tephrike
		}
		province = {
			local_missionary_strength = -0.01
		}
		
		heretic = { OLD_BELIEVER MOLOKAN DUKHOBOR KHLYST SKOPTSY }
		
		has_patriarchs = yes        # Uses patriarch authority
	}
	
	donatist = {
		color = { 69 130 183 }
		icon = 79
		country = {
            tolerance_own = 2
            defensiveness = 0.1
		}
		country_as_secondary = {
			stability_cost_modifier = -0.1
			defensiveness = 0.1
		}
		province = {
			local_missionary_strength = -0.01
		}
		
		heretic = { OLD_BELIEVER MOLOKAN DUKHOBOR KHLYST SKOPTSY }
		
		has_patriarchs = yes        # Uses patriarch authority
	}
	
	iconoclast = {
		color = { 117 0 52 }
		icon = 80
		country = {
            tolerance_own = 4
            global_tax_modifier = 0.1
			tolerance_heretic = -2
		}
		country_as_secondary = {
			raze_power_gain = 0.2
            global_missionary_strength = 0.01
		}
		province = {
			local_missionary_strength = -0.01
		}
		
		heretic = { OLD_BELIEVER MOLOKAN DUKHOBOR KHLYST SKOPTSY }
		
		has_patriarchs = yes        # Uses patriarch authority
        misguided_heretic = yes        # Other christians hate them less
	}
	
	
	harmonized_modifier = harmonized_christian
	
	crusade_name = CRUSADE
}

muslim = {
	defender_of_faith = yes
	
	center_of_religion = 385 # Mecca

	flags_with_emblem_percentage = 33
	flag_emblem_index_range = { 97 106 } #Including Star of David / Seal of Suleyman
	
	ai_will_propagate_through_trade = yes

	religious_schools = {
		hanafi_school = {
			potential_invite_scholar = {
				OR = {
					knows_of_scholar_country_capital_trigger = yes
					has_country_flag = can_always_invite_hanafi_school
					has_country_flag = privilege_can_always_invite_hanafi_school
				}
			}

			# THIS = Nation wanting to invite the scholar, FROM = Nation that follows that school
			can_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				if = {
					limit = {
						NOT = { religion = sunni }
					}
					NOT = { piety = -0.5 }
				}
				if = {
					limit = {
						NOT = { has_country_flag = can_always_invite_hanafi_school }
						NOT = { has_country_flag = privilege_can_always_invite_hanafi_school }
					}
					reverse_has_opinion = { who = FROM value = 150 }
					OR = {
						alliance_with = FROM
						is_subject_of = FROM
						overlord_of = FROM
					}
					hidden_progressive_opinion_for_scholar_trigger = yes
				}
				if = {
					limit = {
						ai = yes
					}
					NOT = { has_country_modifier = has_invited_scholar_recently }
				}
				NOT = { has_country_modifier = hanafi_scholar_modifier }
			}

			# THIS = Nation wanting to invite the scholar, FORM = Nation that sends scholar
			on_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				clear_religious_scholar_modifiers_effect = yes
				custom_tooltip = INVITE_SCHOLAR_COUNTRY_TEXT
				add_country_modifier = { name = hanafi_scholar_modifier duration = 7300 }
				if = {	#Ensures that the AI doesn't waste all of their ADM power on inviting scholars should they be able to invite them baseline
					limit = {
						ai = yes
					}
					add_country_modifier = { name = has_invited_scholar_recently duration = 7300 hidden = yes }
				}
			}

			# If you don't set this it will expand on_invite_scholar effect which might be super big
			invite_scholar_modifier_display = hanafi_scholar_modifier

			picture = "GFX_icon_muslim_school_hanafi"

			# religion_sub_modifier = no is possible, will hide icon in religious screen
			adm_tech_cost_modifier = -0.05
		}
		hanbali_school = {
			potential_invite_scholar = {
				OR = {
					knows_of_scholar_country_capital_trigger = yes
					has_country_flag = can_always_invite_hanbali_school
					has_country_flag = privilege_can_always_invite_hanbali_school
				}
			}

			# THIS = Nation wanting to invite the scholar, FROM = Nation that follows that school
			can_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				if = {
					limit = {
						NOT = { religion = sunni }
					}
					NOT = { piety = -0.5 }
				}
				if = {
					limit = {
						NOT = { has_country_flag = can_always_invite_hanbali_school }
						NOT = { has_country_flag = privilege_can_always_invite_hanbali_school }
					}
					reverse_has_opinion = { who = FROM value = 150 }
					OR = {
						alliance_with = FROM
						is_subject_of = FROM
						overlord_of = FROM
					}
					hidden_progressive_opinion_for_scholar_trigger = yes
				}
				if = {
					limit = {
						ai = yes
					}
					NOT = { has_country_modifier = has_invited_scholar_recently }
				}
				NOT = { has_country_modifier = hanbali_scholar_modifier }
			}

			# THIS = Nation wanting to invite the scholar, FORM = Nation that sends scholar
			on_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				clear_religious_scholar_modifiers_effect = yes
				custom_tooltip = INVITE_SCHOLAR_COUNTRY_TEXT
				add_country_modifier = { name = hanbali_scholar_modifier duration = 7300 }
				if = {	#Ensures that the AI doesn't waste all of their ADM power on inviting scholars should they be able to invite them baseline
					limit = {
						ai = yes
					}
					add_country_modifier = { name = has_invited_scholar_recently duration = 7300 hidden = yes }
				}
			}

			# If you don't set this it will expand on_invite_scholar effect which might be super big
			invite_scholar_modifier_display = hanbali_scholar_modifier

			picture = "GFX_icon_muslim_school_hanbali"

			ae_impact = -0.1
		}
		maliki_school = {
			potential_invite_scholar = {
				OR = {
					knows_of_scholar_country_capital_trigger = yes
					has_country_flag = can_always_invite_maliki_school
					has_country_flag = privilege_can_always_invite_maliki_school
				}
			}

			# THIS = Nation wanting to invite the scholar, FROM = Nation that follows that school
			can_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				if = {
					limit = {
						NOT = { religion = sunni }
					}
					NOT = { piety = -0.5 }
				}
				if = {
					limit = {
						NOT = { has_country_flag = can_always_invite_maliki_school }
						NOT = { has_country_flag = privilege_can_always_invite_maliki_school }
					}
					reverse_has_opinion = { who = FROM value = 150 }
					OR = {
						alliance_with = FROM
						is_subject_of = FROM
						overlord_of = FROM
					}
					hidden_progressive_opinion_for_scholar_trigger = yes
				}
				if = {
					limit = {
						ai = yes
					}
					NOT = { has_country_modifier = has_invited_scholar_recently }
				}
				NOT = { has_country_modifier = maliki_scholar_modifier }
			}

			# THIS = Nation wanting to invite the scholar, FORM = Nation that sends scholar
			on_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				clear_religious_scholar_modifiers_effect = yes
				custom_tooltip = INVITE_SCHOLAR_COUNTRY_TEXT
				add_country_modifier = { name = maliki_scholar_modifier duration = 7300 }
				if = {	#Ensures that the AI doesn't waste all of their ADM power on inviting scholars should they be able to invite them baseline
					limit = {
						ai = yes
					}
					add_country_modifier = { name = has_invited_scholar_recently duration = 7300 hidden = yes }
				}
			}

			# If you don't set this it will expand on_invite_scholar effect which might be super big
			invite_scholar_modifier_display = maliki_scholar_modifier

			picture = "GFX_icon_muslim_school_maliki"

			development_cost = -0.1
		}
		shafii_school = {
			potential_invite_scholar = {
				OR = {
					knows_of_scholar_country_capital_trigger = yes
					has_country_flag = can_always_invite_shafii_school
					has_country_flag = privilege_can_always_invite_shafii_school
				}
			}

			# THIS = Nation wanting to invite the scholar, FROM = Nation that follows that school
			can_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				if = {
					limit = {
						NOT = { religion = sunni }
					}
					NOT = { piety = -0.5 }
				}
				if = {
					limit = {
						NOT = { has_country_flag = can_always_invite_shafii_school }
						NOT = { has_country_flag = privilege_can_always_invite_shafii_school }
					}
					reverse_has_opinion = { who = FROM value = 150 }
					OR = {
						alliance_with = FROM
						is_subject_of = FROM
						overlord_of = FROM
					}
					hidden_progressive_opinion_for_scholar_trigger = yes
				}
				if = {
					limit = {
						ai = yes
					}
					NOT = { has_country_modifier = has_invited_scholar_recently }
				}
				NOT = { has_country_modifier = shafii_scholar_modifier }
			}

			# THIS = Nation wanting to invite the scholar, FORM = Nation that sends scholar
			on_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				clear_religious_scholar_modifiers_effect = yes
				custom_tooltip = INVITE_SCHOLAR_COUNTRY_TEXT
				add_country_modifier = { name = shafii_scholar_modifier duration = 7300 }
				if = {	#Ensures that the AI doesn't waste all of their ADM power on inviting scholars should they be able to invite them baseline
					limit = {
						ai = yes
					}
					add_country_modifier = { name = has_invited_scholar_recently duration = 7300 hidden = yes }
				}
			}

			# If you don't set this it will expand on_invite_scholar effect which might be super big
			invite_scholar_modifier_display = shafii_scholar_modifier

			picture = "GFX_icon_muslim_school_shafii"

			merchants = 1
		}
		#Shias
		ismaili_school = {
			potential_invite_scholar = {
				OR = {
					knows_of_scholar_country_capital_trigger = yes
					has_country_flag = can_always_invite_ismaili_school
					has_country_flag = privilege_can_always_invite_ismaili_school
				}
			}

			# THIS = Nation wanting to invite the scholar, FROM = Nation that follows that school
			can_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				if = {
					limit = {
						NOT = { religion = shiite }
					}
					NOT = { piety = -0.5 }
				}
				if = {
					limit = {
						NOT = { has_country_flag = can_always_invite_ismaili_school }
						NOT = { has_country_flag = privilege_can_always_invite_ismaili_school }
					}
					reverse_has_opinion = { who = FROM value = 150 }
					OR = {
						alliance_with = FROM
						is_subject_of = FROM
						overlord_of = FROM
					}
					hidden_progressive_opinion_for_scholar_trigger = yes
				}
				if = {
					limit = {
						ai = yes
					}
					NOT = { has_country_modifier = has_invited_scholar_recently }
				}
				NOT = { has_country_modifier = ismaili_scholar_modifier }
			}

			# THIS = Nation wanting to invite the scholar, FORM = Nation that sends scholar
			on_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				clear_religious_scholar_modifiers_effect = yes
				custom_tooltip = INVITE_SCHOLAR_COUNTRY_TEXT
				add_country_modifier = { name = ismaili_scholar_modifier duration = 7300 }
				if = {	#Ensures that the AI doesn't waste all of their ADM power on inviting scholars should they be able to invite them baseline
					limit = {
						ai = yes
					}
					add_country_modifier = { name = has_invited_scholar_recently duration = 7300 hidden = yes }
				}
			}
			
			# If you don't set this it will expand on_invite_scholar effect which might be super big
			invite_scholar_modifier_display = ismaili_scholar_modifier

			picture = "GFX_icon_muslim_school_ismaili"

			horde_unity = 1
			legitimacy = 1
			republican_tradition = 0.2
			devotion = 1
		}
		jafari_school = {
			potential_invite_scholar = {
				OR = {
					knows_of_scholar_country_capital_trigger = yes
					has_country_flag = can_always_invite_jafari_school
					has_country_flag = privilege_can_always_invite_jafari_school
				}
			}

			# THIS = Nation wanting to invite the scholar, FROM = Nation that follows that school
			can_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				if = {
					limit = {
						NOT = { religion = shiite }
					}
					NOT = { piety = -0.5 }
				}
				if = {
					limit = {
						NOT = { has_country_flag = can_always_invite_jafari_school }
						NOT = { has_country_flag = privilege_can_always_invite_jafari_school }
					}
					reverse_has_opinion = { who = FROM value = 150 }
					OR = {
						alliance_with = FROM
						is_subject_of = FROM
						overlord_of = FROM
					}
					hidden_progressive_opinion_for_scholar_trigger = yes
				}
				if = {
					limit = {
						ai = yes
					}
					NOT = { has_country_modifier = has_invited_scholar_recently }
				}
				NOT = { has_country_modifier = jafari_scholar_modifier }
			}

			# THIS = Nation wanting to invite the scholar, FORM = Nation that sends scholar
			on_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				clear_religious_scholar_modifiers_effect = yes
				custom_tooltip = INVITE_SCHOLAR_COUNTRY_TEXT
				add_country_modifier = { name = jafari_scholar_modifier duration = 7300 }
				if = {	#Ensures that the AI doesn't waste all of their ADM power on inviting scholars should they be able to invite them baseline
					limit = {
						ai = yes
					}
					add_country_modifier = { name = has_invited_scholar_recently duration = 7300 hidden = yes }
				}
			}
			
			# If you don't set this it will expand on_invite_scholar effect which might be super big
			invite_scholar_modifier_display = jafari_scholar_modifier

			picture = "GFX_icon_muslim_school_jafari"

			shock_damage = 0.1
		}
		zaidi_school = {
			potential_invite_scholar = {
				OR = {
					knows_of_scholar_country_capital_trigger = yes
					has_country_flag = can_always_invite_zaidi_school
					has_country_flag = privilege_can_always_invite_zaidi_school
				}
			}

			# THIS = Nation wanting to invite the scholar, FROM = Nation that follows that school
			can_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				if = {
					limit = {
						NOT = { religion = shiite }
					}
					NOT = { piety = -0.5 }
				}
				if = {
					limit = {
						NOT = { has_country_flag = can_always_invite_zaidi_school }
						NOT = { has_country_flag = privilege_can_always_invite_zaidi_school }
					}
					reverse_has_opinion = { who = FROM value = 150 }
					OR = {
						alliance_with = FROM
						is_subject_of = FROM
						overlord_of = FROM
					}
					hidden_progressive_opinion_for_scholar_trigger = yes
				}
				if = {
					limit = {
						ai = yes
					}
					NOT = { has_country_modifier = has_invited_scholar_recently }
				}
				NOT = { has_country_modifier = zaidi_scholar_modifier }
			}

			# THIS = Nation wanting to invite the scholar, FORM = Nation that sends scholar
			on_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				clear_religious_scholar_modifiers_effect = yes
				custom_tooltip = INVITE_SCHOLAR_COUNTRY_TEXT
				add_country_modifier = { name = zaidi_scholar_modifier duration = 7300 }
				if = {	#Ensures that the AI doesn't waste all of their ADM power on inviting scholars should they be able to invite them baseline
					limit = {
						ai = yes
					}
					add_country_modifier = { name = has_invited_scholar_recently duration = 7300 hidden = yes }
				}
			}
			
			# If you don't set this it will expand on_invite_scholar effect which might be super big
			invite_scholar_modifier_display = zaidi_scholar_modifier

			picture = "GFX_icon_muslim_school_zaidi"

			shock_damage_received = -0.1
		}
		ibadi_school = {
			potential_invite_scholar = {
				knows_of_scholar_country_capital_trigger = yes
			}

			# THIS = Nation wanting to invite the scholar, FROM = Nation that follows that school
			can_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				if = {
					limit = {
						NOT = { religion = ibadi }
					}
					NOT = { piety = -0.5 }
				}
				reverse_has_opinion = { who = FROM value = 150 }
				OR = {
					alliance_with = FROM
					is_subject_of = FROM
					overlord_of = FROM
				}
				hidden_progressive_opinion_for_scholar_trigger = yes
				if = {
					limit = {
						ai = yes
					}
					NOT = { has_country_modifier = has_invited_scholar_recently }
				}
				NOT = { has_country_modifier = ibadi_scholar_modifier }
			}

			# THIS = Nation wanting to invite the scholar, FORM = Nation that sends scholar
			on_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				clear_religious_scholar_modifiers_effect = yes
				custom_tooltip = INVITE_SCHOLAR_COUNTRY_TEXT
				add_country_modifier = { name = ibadi_scholar_modifier duration = 7300 }
				if = {	#Ensures that the AI doesn't waste all of their ADM power on inviting scholars should they be able to invite them baseline
					limit = {
						ai = yes
					}
					add_country_modifier = { name = has_invited_scholar_recently duration = 7300 hidden = yes }
				}
			}
			
			# If you don't set this it will expand on_invite_scholar effect which might be super big
			invite_scholar_modifier_display = ibadi_scholar_modifier

			picture = "GFX_icon_muslim_school_ibadi"

			trade_steering = 0.2
		}
		sufri_school = {
			potential_invite_scholar = {
				knows_of_scholar_country_capital_trigger = yes
			}

			# THIS = Nation wanting to invite the scholar, FROM = Nation that follows that school
			can_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				if = {
					limit = {
						NOT = { religion = ibadi }
					}
					NOT = { piety = -0.5 }
				}
				reverse_has_opinion = { who = FROM value = 150 }
				OR = {
					alliance_with = FROM
					is_subject_of = FROM
					overlord_of = FROM
				}
				hidden_progressive_opinion_for_scholar_trigger = yes
				if = {
					limit = {
						ai = yes
					}
					NOT = { has_country_modifier = has_invited_scholar_recently }
				}
				NOT = { has_country_modifier = sufri_scholar_modifier }
			}

			# THIS = Nation wanting to invite the scholar, FORM = Nation that sends scholar
			on_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				clear_religious_scholar_modifiers_effect = yes
				custom_tooltip = INVITE_SCHOLAR_COUNTRY_TEXT
				add_country_modifier = { name = sufri_scholar_modifier duration = 7300 }
				if = {	#Ensures that the AI doesn't waste all of their ADM power on inviting scholars should they be able to invite them baseline
					limit = {
						ai = yes
					}
					add_country_modifier = { name = has_invited_scholar_recently duration = 7300 hidden = yes }
				}
			}
			
			# If you don't set this it will expand on_invite_scholar effect which might be super big
			invite_scholar_modifier_display = sufri_scholar_modifier

			picture = "GFX_icon_muslim_school_sufri"

			infantry_power = 0.10
		}
		
		#Added in MMETR - Qarmatian revolutionary school
		qarmati_school = {
			potential_invite_scholar = {
				OR = {
					knows_of_scholar_country_capital_trigger = yes
					tag = QRM
				}
			}

			# THIS = Nation wanting to invite the scholar, FROM = Nation that follows that school
			can_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				if = {
					limit = {
						NOT = { religion = shiite }
					}
					NOT = { piety = -0.5 }
				}
				reverse_has_opinion = { who = FROM value = 150 }
				OR = {
					alliance_with = FROM
					is_subject_of = FROM
					overlord_of = FROM
				}
				hidden_progressive_opinion_for_scholar_trigger = yes
				if = {
					limit = {
						ai = yes
					}
					NOT = { has_country_modifier = has_invited_scholar_recently }
				}
				NOT = { has_country_modifier = qarmati_scholar_modifier }
			}

			# THIS = Nation wanting to invite the scholar, FORM = Nation that sends scholar
			on_invite_scholar = {
				if = {
					limit = {
						NOT = { has_country_flag = no_scholar_adm_cost }
					}
					adm_power_cost = 50
				}
				clear_religious_scholar_modifiers_effect = yes
				custom_tooltip = INVITE_SCHOLAR_COUNTRY_TEXT
				add_country_modifier = { name = qarmati_scholar_modifier duration = 7300 }
				if = {	#Ensures that the AI doesn't waste all of their ADM power on inviting scholars should they be able to invite them baseline
					limit = {
						ai = yes
					}
					add_country_modifier = { name = has_invited_scholar_recently duration = 7300 hidden = yes }
				}
			}
			
			# If you don't set this it will expand on_invite_scholar effect which might be super big
			invite_scholar_modifier_display = qarmati_scholar_modifier

			picture = "GFX_icon_muslim_school_qarmatian"

			#cavalry_power = 0.1
			may_perform_slave_raid_on_same_religion = yes		#limit to one bonus
			#tolerance_heretic = -2
		}
	}
	
	islam = {
		color = { 0 178 0 }
		icon = 55
		country = {
			heir_chance = 1.0
		}
		country_as_secondary = {
			heir_chance = 1.0
			advisor_cost = -0.1
		}
		province = {
			local_missionary_strength = -0.01
		}
		
		heretic = { BEKTASHI AHMADI ZIKRI YAZIDI }
	
		uses_piety = yes				# Uses piety mechanics

		date = 627.1.1
	}
	
	sunni = {
		color = { 0 153 0 }
		icon = 8
		allowed_center_conversion = {
			ibadi
			shiite
		}
		country = {
			cav_to_inf_ratio = 0.10
			heir_chance = 1.0
		}
		country_as_secondary = {
			trade_efficiency = 0.1
			heir_chance = 1.0
		}
		province = {
			local_missionary_strength = -0.01
		}
		
		heretic = { BEKTASHI AHMADI ZIKRI YAZIDI }
		
		uses_piety = yes				# Uses piety mechanics

		date = 661.7.28
	}

	shiite = {
		color = { 0 204 0 }
		icon = 9
		allowed_center_conversion = {
			sunni
			ibadi
		}
		country = {
			heir_chance = 1.0
			land_morale = 0.05
		}
		country_as_secondary = {
			land_morale = 0.05
			advisor_cost = -0.1
		}
		province = {
			local_missionary_strength = -0.02
		}
		
		heretic = { DRUZE HURUFI ZAIDI }
		
		uses_piety = yes				# Uses piety mechanics
		
		date = 661.7.28
	}
	
	ibadi = {
		color = { 0 102 0 }
		icon = 10
		allowed_center_conversion = {
			sunni
			shiite
		}
		country = {
			heir_chance = 1.0
			global_trade_goods_size_modifier = 0.1
		}
		country_as_secondary = {
			global_ship_cost = -0.1
			advisor_cost = -0.1
		}
		province = {
			local_missionary_strength = -0.01
		}
		
		heretic = { HARURI SUFRI NAJADAT AZRAQI }
		
		uses_piety = yes				# Uses piety mechanics

		date = 690.1.1
	}
	
	harmonized_modifier = harmonized_muslim
	
	crusade_name = JIHAD
}

buddhic = {

	flags_with_emblem_percentage = 33
	flag_emblem_index_range = { 58 80 }

	buddhism = { #Theravada
		color = { 204 76 0 }
		icon = 45
		allowed_conversion = {
			vajrayana
			mahayana
		}
		country = {
			tolerance_heretic = 2
			advisor_cost = -0.1
		}
		country_as_secondary = {
			development_cost = -0.1
			diplomats = 1
		}
		on_convert = {
			add_prestige = -100
			add_stability = -1
			add_country_modifier = {
				name = "conversion_zeal"
				duration = 3650
			}
		}
		
		heretic = { ZEN }
		
		uses_karma = yes
	}
	
	vajrayana = {
		color = { 204 76 76 }
		icon = 46
		allowed_conversion = {
			mahayana
			buddhism #Theravada
		}
		country = {
			tolerance_heretic = 2
			land_morale = 0.05
		}
		country_as_secondary = {
			horde_unity = 1
			tolerance_own = 1
		}
		on_convert = {
			change_religion = vajrayana
			add_prestige = -100
			add_stability = -1
			add_country_modifier = {
				name = "conversion_zeal"
				duration = 3650
			}
		}
		
		heretic = { ZEN }
		
		uses_karma = yes

		date = 630.1.1
	}
	
	mahayana = {
		color = { 204 76 127 }
		icon = 44
		allowed_conversion = {
			vajrayana
			buddhism #Theravada
		}
		country = {
			tolerance_heretic = 2
			idea_cost = -0.05
		}
		country_as_secondary = {
			global_tax_modifier = 0.1
			tolerance_heathen = 2
		}
		on_convert = {
			add_prestige = -100
			add_stability = -1
			add_country_modifier = {
				name = "conversion_zeal"
				duration = 3650
			}
		}
		
		heretic = { ZEN }
		
		uses_karma = yes
	}
	
	#New added MMETR Early Buddhist Schools
	
	sarvastivada = {
		color = { 204 97 84 }
		icon = 11		#unused religious icon in ET, Dharmachakra to represent the school's theory of everything
		allowed_conversion = {
			vajrayana
			buddhism #Theravada
			pudgalavada
			dharmaguptaka
			mahasamghika
		}
		country = {
			tolerance_own = 1
			build_cost = -0.1
		}
		country_as_secondary = {
			build_cost = -0.1
			adm_advisor_cost = -0.1
		}
		on_convert = {
			add_prestige = -50
			add_stability = -1
			add_country_modifier = {
				name = "conversion_zeal"
				duration = 3650
			}
		}
		
		misguided_heretic = yes		# Other in religion group dislike them less
		
		heretic = { KASYAKIYA SAUTRANTIKA VAIBHASIKA }
		
		uses_karma = yes
	}
	pudgalavada = {
		color = { 240 141 220 }
		icon = 70
		allowed_conversion = {
			buddhism #Theravada
			sarvastivada
			dharmaguptaka
			mahasamghika
		}
		country = {
			tolerance_own = 2
			land_morale = 0.05
		}
		country_as_secondary = {
			tolerance_own = 1
			global_unrest = -1
		}
		on_convert = {
			add_prestige = -50
			add_stability = -1
			add_country_modifier = {
				name = "conversion_zeal"
				duration = 3650
			}
		}
		
		misguided_heretic = yes		# Other in religion group dislike them less
		
		heretic = { VATSIPUTRIYA SAMMITIYA }
		
		uses_karma = yes
	}
	dharmaguptaka = {
		color = { 150 88 121 }
		icon = 69
		allowed_conversion = {
			buddhism #Theravada
			pudgalavada
			sarvastivada
			mahasamghika
		}
		country = {
			tolerance_heretic = 1
			global_heathen_missionary_strength = 0.01
		}
		country_as_secondary = {
			global_heathen_missionary_strength = 0.01
			diplomats = 1
		}
		on_convert = {
			add_prestige = -50
			add_stability = -1
			add_country_modifier = {
				name = "conversion_zeal"
				duration = 3650
			}
		}
		
		misguided_heretic = yes		# Other in religion group dislike them less
		
		heretic = { MAHISASAKA }
		
		uses_karma = yes
	}
	mahasamghika = {
		color = { 224 24 51 }
		icon = 71
		allowed_conversion = {
			buddhism #Theravada
			mahayana
			sarvastivada
			pudgalavada
			dharmaguptaka
		}
		country = {
			tolerance_heretic = 2
			advisor_pool = 1
		}
		country_as_secondary = {
			tolerance_heathen = 1
			global_tax_modifier = 0.1
		}
		on_convert = {
			add_prestige = -50
			add_stability = -1
			add_country_modifier = {
				name = "conversion_zeal"
				duration = 3650
			}
		}
		
		misguided_heretic = yes		# Other in religion group dislike them less
		
		heretic = { GOKULIKA CAITIKA }
		
		uses_karma = yes
	}
	
	harmonized_modifier = harmonized_mahayana

	crusade_name = CRUSADE
	
}

dharmic = {

	flags_with_emblem_percentage = 33
	flag_emblem_index_range = { 61 82 } #Many shared with Eastern
	
	#New MMETR Jain schools
	religious_schools = {
		svetambara_school = {
			potential_invite_scholar = {
				religion = jainism
			}

			# THIS = Nation wanting to invite the scholar, FROM = Nation that follows that school
			can_invite_scholar = {
				religion = jainism
				OR = {
					AND = {
						reverse_has_opinion = { who = FROM value = 150 }
						OR = {
							alliance_with = FROM
							is_subject_of = FROM
							overlord_of = FROM
						}
					}
					AND = {
						karma = 10	#must have positive karma
						any_owned_province = {
							religion = jainism
							is_core = THIS
							OR = {
								region = bengal_region
								region = hindusthan_region
								area = marwar_area
								area = mewar_area
								area = malwa_area
								area = jangladesh_area
								area = jaipur_area
								area = ahmednagar_area
								area = saurashtra_area
							}
						}
					}
				}
			}

			# THIS = Nation wanting to invite the scholar, FORM = Nation that sends scholar
			on_invite_scholar = {
				adm_power_cost = 50
				clear_religious_scholar_modifiers_effect = yes
				custom_tooltip = INVITE_SCHOLAR_COUNTRY_TEXT
				add_country_modifier = { name = svetambara_scholar_modifier duration = 7300 }
				if = {	#Ensures that the AI doesn't waste all of their ADM power on inviting scholars should they be able to invite them baseline
					limit = {
						ai = yes
					}
					add_country_modifier = { name = has_invited_scholar_recently duration = 7300 hidden = yes }
				}
			}

			# If you don't set this it will expand on_invite_scholar effect which might be super big
			invite_scholar_modifier_display = svetambara_scholar_modifier

			picture = "GFX_icon_jainism_school_svetambara"

			# religion_sub_modifier = no is possible, will hide icon in religious screen
			diplomatic_reputation = 1
			female_advisor_chance = 0.25
		}
		digambara_school = {
			potential_invite_scholar = {
				religion = jainism
			}

			# THIS = Nation wanting to invite the scholar, FROM = Nation that follows that school
			can_invite_scholar = {
				religion = jainism
				OR = {
					AND = {
						reverse_has_opinion = { who = FROM value = 150 }
						OR = {
							alliance_with = FROM
							is_subject_of = FROM
							overlord_of = FROM
						}
					}
					AND = {
						karma = 10	#must have positive karma
						any_owned_province = {
							religion = jainism
							is_core = THIS
							OR = {
								area = desh_area
								area = maidan_area
								area = ahmednagar_area
								area = saurashtra_area
								area = tapti_area
								area = patan_area
								area = ahmedabad_area
								area = khandesh_area
								area = sindh_area
								area = northern_sindh_area
							}
						}
					}
				}
			}

			# THIS = Nation wanting to invite the scholar, FORM = Nation that sends scholar
			on_invite_scholar = {
				adm_power_cost = 50
				clear_religious_scholar_modifiers_effect = yes
				custom_tooltip = INVITE_SCHOLAR_COUNTRY_TEXT
				add_country_modifier = { name = digambara_scholar_modifier duration = 7300 }
				if = {	#Ensures that the AI doesn't waste all of their ADM power on inviting scholars should they be able to invite them baseline
					limit = {
						ai = yes
					}
					add_country_modifier = { name = has_invited_scholar_recently duration = 7300 hidden = yes }
				}
			}

			# If you don't set this it will expand on_invite_scholar effect which might be super big
			invite_scholar_modifier_display = digambara_scholar_modifier

			picture = "GFX_icon_jainism_school_digambara"

			# religion_sub_modifier = no is possible, will hide icon in religious screen
			ae_impact = -0.1
		}
		yapaniya_school = {
			potential_invite_scholar = {
				religion = jainism
			}

			# THIS = Nation wanting to invite the scholar, FROM = Nation that follows that school
			can_invite_scholar = {
				religion = jainism
				OR = {
					AND = {
						reverse_has_opinion = { who = FROM value = 150 }
						OR = {
							alliance_with = FROM
							is_subject_of = FROM
							overlord_of = FROM
						}
					}
					AND = {
						karma = 10	#must have positive karma
						any_owned_province = {
							religion = jainism
							is_core = THIS
							OR = {
								area = mysore_area
								area = raichur_doab_area
								area = kanara_area
								area = rayalaseema_area
								area = malabar_area
								region = coromandel_region
							}
						}
					}
				}
			}

			# THIS = Nation wanting to invite the scholar, FORM = Nation that sends scholar
			on_invite_scholar = {
				adm_power_cost = 50
				if = {
					limit = {
						NOT = {
							reverse_has_opinion = { who = FROM value = 150 }
							OR = {
								alliance_with = FROM
								is_subject_of = FROM
								overlord_of = FROM
							}
						}
					}
				}
				clear_religious_scholar_modifiers_effect = yes
				custom_tooltip = INVITE_SCHOLAR_COUNTRY_TEXT
				add_country_modifier = { name = yapaniya_scholar_modifier duration = 7300 }
				if = {	#Ensures that the AI doesn't waste all of their ADM power on inviting scholars should they be able to invite them baseline
					limit = {
						ai = yes
					}
					add_country_modifier = { name = has_invited_scholar_recently duration = 7300 hidden = yes }
				}
			}

			# If you don't set this it will expand on_invite_scholar effect which might be super big
			invite_scholar_modifier_display = yapaniya_scholar_modifier

			picture = "GFX_icon_jainism_school_yapaniya"

			# religion_sub_modifier = no is possible, will hide icon in religious screen
			tolerance_heathen = 2
			female_advisor_chance = 0.25
		}
	}
	
	hinduism = {
		color = { 0 204 204 }
		icon = 12
		allowed_conversion = {
			sikhism
			jainism
		}
		country = {
			tolerance_heathen = 1
			tolerance_own = 1
			brahmins_hindu_influence_modifier = 0.2
		}
		country_as_secondary = {
			tolerance_heretic = 1
			tolerance_heathen = 2
		}
		
		personal_deity = yes
		
		on_convert = {
			change_religion = hinduism
			add_prestige = -100
			
			add_country_modifier = {
				name = "conversion_zeal"
				duration = 3650
			}
		}
		
		heretic = { BHAKTI }
	}

	sikhism = {
		color = { 0 153 153 }
		icon = 13
		allowed_conversion = {
			hinduism
			sunni
			shiite
			jainism
		}
		country = {
			mil_tech_cost_modifier = -0.1
			land_morale = 0.1
		}
		country_as_secondary = {
			land_morale = 0.05
			global_unrest = -1
		}
		province = {
			local_missionary_strength = -0.01
		}
		
		on_convert = {
			change_religion = sikhism
			add_prestige = -100
			
			add_country_modifier = {
				name = "conversion_zeal"
				duration = 3650
			}
		}

		heretic = { MASANDIS }

		date = 1499.01.01

		gurus = {
			guru_nanak = {
				trigger = {
					NOT = { has_global_flag = guru_event_happening }
				}
				chance = {
					factor = 1000
				}
				modifier = {
					country_admin_power = 1
				}
				teachings = {
					share_and_consume = {
						type = ADM
						cost = 50

						global_unrest = -1
					}
					work_honestly = {
						type = DIP
						cost = 50

						production_efficiency = 0.05
					}
					recite_his_name = {
						type = MIL
						cost = 50

						global_regiment_cost = -0.025
					}
				}
			}
			guru_angad = {
				trigger = {
					is_year = 1539
					is_month = 9
					NOT = { has_global_flag = guru_event_happening }
				}
				chance = {
					factor = 5
					modifier = {
						factor = 1.5
						is_year = 1540
					}
					modifier = {
						factor = 1.5
						is_year = 1541
					}
					modifier = {
						factor = 1.5
						is_year = 1542
					}
					modifier = {
						factor = 2
						is_year = 1543
					}
					modifier = {
						factor = 2
						is_year = 1544
					}
				}
				modifier = {
					country_military_power = 1
				}
				teachings = {
					gurmukhi_script_teaching = {
						type = ADM
						cost = 50

						technology_cost = -0.025
					}
					temple_langar = {
						type = DIP
						cost = 50

						church_loyalty_modifier = 0.05
					}
					wrestling_akhara = {
						type = MIL
						cost = 50

						yearly_army_professionalism = 0.005
					}
				}
			}
			guru_amar_das = {
				trigger = {
					is_year = 1552
					is_month = 3
					NOT = { has_global_flag = guru_event_happening }
				}
				chance = {
					factor = 5
					modifier = {
						factor = 1.5
						is_year = 1553
					}
					modifier = {
						factor = 1.5
						is_year = 1554
					}
					modifier = {
						factor = 1.5
						is_year = 1555
					}
					modifier = {
						factor = 2
						is_year = 1556
					}
					modifier = {
						factor = 2
						is_year = 1557
					}
				}
				modifier = {
					country_diplomatic_power = 1
				}
				teachings = {
					dasvandh_collection = {
						type = ADM
						cost = 50

						global_tax_modifier = 0.05
					}
					anand_karaj = {
						type = DIP
						cost = 50

						diplomatic_reputation = 1
					}
					sanghat_equality = {
						type = MIL
						cost = 50

						nobles_loyalty_modifier = 0.05
						rajput_exclusive_loyalty_modifier = 0.05
						maratha_exclusive_loyalty_modifier = 0.05
					}
				}
			}
			guru_ram_das = {
				trigger = {
					is_year = 1574
					is_month = 9
					NOT = { has_global_flag = guru_event_happening }
				}
				chance = {
					factor = 5
					modifier = {
						factor = 1.5
						is_year = 1575
					}
					modifier = {
						factor = 1.5
						is_year = 1576
					}
					modifier = {
						factor = 1.5
						is_year = 1577
					}
					modifier = {
						factor = 2
						is_year = 1578
					}
					modifier = {
						factor = 2
						is_year = 1579
					}
				}
				modifier = {
					country_admin_power = 1
				}
				teachings = {
					legitimize_inheritance = {
						type = ADM
						cost = 50

						legitimacy = 0.25
						republican_tradition = 0.1
						devotion = 0.25
						horde_unity = 0.25
						meritocracy = 0.1
					}
					scripture_hymns = {
						type = DIP
						cost = 50

						prestige = 0.5
					}
					masand_system = {
						type = MIL
						cost = 50

						global_manpower_modifier = 0.1
					}
				}
			}
			guru_arjan = {
				trigger = {
					is_year = 1581
					is_month = 9
					NOT = { has_global_flag = guru_event_happening }
				}
				chance = {
					factor = 5
					modifier = {
						factor = 1.5
						is_year = 1582
					}
					modifier = {
						factor = 1.5
						is_year = 1583
					}
					modifier = {
						factor = 1.5
						is_year = 1584
					}
					modifier = {
						factor = 2
						is_year = 1585
					}
					modifier = {
						factor = 2
						is_year = 1586
					}
				}
				modifier = {
					country_diplomatic_power = 1
				}
				teachings = {
					adi_granth = {
						type = ADM
						cost = 50

						global_institution_spread = 0.1
					}
					the_abode_of_god = {
						type = DIP
						cost = 50

						religious_unity = 0.1
					}
					martyrdom = {
						type = MIL
						cost = 50

						land_morale = 0.05
					}
				}
			}
			guru_hargobind = {
				trigger = {
					is_year = 1606
					is_month = 6
					NOT = { has_global_flag = guru_event_happening }
				}
				chance = {
					factor = 5
					modifier = {
						factor = 1.5
						is_year = 1607
					}
					modifier = {
						factor = 1.5
						is_year = 1608
					}
					modifier = {
						factor = 1.5
						is_year = 1609
					}
					modifier = {
						factor = 2
						is_year = 1610
					}
					modifier = {
						factor = 2
						is_year = 1611
					}
				}
				modifier = {
					country_military_power = 1
				}
				teachings = {
					throne_of_the_timeless_one = {
						type = ADM
						cost = 50

						legitimacy = 0.25
						republican_tradition = 0.1
						devotion = 0.25
						horde_unity = 0.25
						meritocracy = 0.1
					}
					protection_of_the_poor = {
						type = DIP
						cost = 50

						war_exhaustion = -0.025
					}
					miri_and_piri = {
						type = MIL
						cost = 50

						discipline = 0.025
					}
				}
			}
			guru_har_rai = {
				trigger = {
					is_year = 1644
					is_month = 3
					NOT = { has_global_flag = guru_event_happening }
				}
				chance = {
					factor = 5
					modifier = {
						factor = 1.5
						is_year = 1645
					}
					modifier = {
						factor = 1.5
						is_year = 1646
					}
					modifier = {
						factor = 1.5
						is_year = 1647
					}
					modifier = {
						factor = 2
						is_year = 1648
					}
					modifier = {
						factor = 2
						is_year = 1649
					}
				}
				modifier = {
					country_diplomatic_power = 1
				}
				teachings = {
					impartial_manjis = {
						type = ADM
						cost = 50

						yearly_corruption = -0.05
					}
					the_fragrance_of_a_flower = {
						type = DIP
						cost = 50

						improve_relation_modifier = 0.1
					}
					one_guru = {
						type = MIL
						cost = 50

						nobles_loyalty_modifier = 0.05
						rajput_exclusive_loyalty_modifier = 0.05
						maratha_exclusive_loyalty_modifier = 0.05
					}
				}
			}
			guru_har_krishan = {
				trigger = {
					is_year = 1661
					is_month = 3
					NOT = { has_global_flag = guru_event_happening }
				}
				chance = {
					factor = 5
					modifier = {
						factor = 1.5
						is_year = 1662
					}
					modifier = {
						factor = 1.5
						is_year = 1663
					}
					modifier = {
						factor = 1.5
						is_year = 1664
					}
					modifier = {
						factor = 2
						is_year = 1665
					}
					modifier = {
						factor = 2
						is_year = 1666
					}
				}
				modifier = {
					country_diplomatic_power = 1
				}
				teachings = {
					treat_the_sick = {
						type = ADM
						cost = 50

						monarch_admin_power = 1
					}
					illiterate_recites_saloks = {
						type = DIP
						cost = 50

						monarch_diplomatic_power = 1
					}
					young_humility = {
						type = MIL
						cost = 50

						monarch_military_power = 1
					}
				}
			}
			guru_tegh_bahadur = {
				trigger = {
					is_year = 1665
					is_month = 3
					NOT = { has_global_flag = guru_event_happening }
				}
				chance = {
					factor = 5
					modifier = {
						factor = 1.5
						is_year = 1666
					}
					modifier = {
						factor = 1.5
						is_year = 1667
					}
					modifier = {
						factor = 1.5
						is_year = 1668
					}
					modifier = {
						factor = 2
						is_year = 1669
					}
					modifier = {
						factor = 2
						is_year = 1670
					}
				}
				modifier = {
					country_admin_power = 1
				}
				teachings = {
					the_word_of_sikh = {
						type = ADM
						cost = 50

						missionaries = 1
					}
					all_kings_must_pass = {
						type = DIP
						cost = 50

						tolerance_heretic = 2
					}
					resist_persecution = {
						type = MIL
						cost = 50

						hostile_attrition = 1
					}
				}
			}
			guru_gobind_singh = {
				trigger = {
					is_year = 1675
					is_month = 3
					NOT = { has_global_flag = guru_event_happening }
				}
				chance = {
					factor = 5
					modifier = {
						factor = 1.5
						is_year = 1676
					}
					modifier = {
						factor = 1.5
						is_year = 1677
					}
					modifier = {
						factor = 1.5
						is_year = 1678
					}
					modifier = {
						factor = 2
						is_year = 1679
					}
					modifier = {
						factor = 2
						is_year = 1680
					}
				}
				modifier = {
					country_admin_power = 1
				}
				teachings = {
					pluralism = {
						type = ADM
						cost = 50

						advisor_cost = -0.1
					}
					dharam_yudh = {
						type = DIP
						cost = 50

						war_taxes_cost_modifier = -0.5
					}
					the_khalsa_sikh = {
						type = MIL
						cost = 50

						yearly_army_professionalism = 0.005
					}
				}
			}
			guru_granth_sahib = {
				trigger = {
					is_year = 1708
					is_month = 3
					NOT = { has_global_flag = guru_event_happening }
				}
				chance = {
					factor = 5
					modifier = {
						factor = 1.5
						is_year = 1709
					}
					modifier = {
						factor = 1.5
						is_year = 1710
					}
					modifier = {
						factor = 1.5
						is_year = 1711
					}
					modifier = {
						factor = 2
						is_year = 1712
					}
					modifier = {
						factor = 2
						is_year = 1713
					}
				}
				modifier = {
					state_maintenance_modifier = -0.5
					drill_decay_modifier = -0.25
				}
				teachings = {
					eternally_living_guru = {
						type = ADM
						cost = 50

						development_cost = -0.1
					}
					divine_justice = {
						type = DIP
						cost = 50

						trade_efficiency = 0.1
					}
					the_unchanging_writing = {
						type = MIL
						cost = 50

						drill_gain_modifier = 0.5
					}
				}
			}
		}
	}

	jainism = {
		color = { 150 230 230 }
		icon = 14
		allowed_conversion = {
			hinduism
			sikhism
		}
		country = {
			global_tax_modifier = 0.05
			tolerance_heretic = 3
		}
		country_as_secondary = {
			tolerance_heathen = 2
			global_unrest = -1
		}
		on_convert = {
			change_religion = jainism
			add_prestige = -100

			add_country_modifier = {
				name = "conversion_zeal"
				duration = 3650
			}
		}
		
		uses_karma = yes		#New added in mod
		
		#Jain schools are located above at the start of the religious group
		
		heretic = { BHAKTI }
	}

	zunism = {
		color = { 200 200 150 }
		icon = 41
		province = {
			local_missionary_strength = 0.02
		}
		country = {
			land_morale = 0.10
			defensiveness = 0.2
		}
		country_as_secondary = {
			land_morale = 0.05
			defensiveness = 0.2
		}

		heretic = { BHAKTI }
		
		holy_sites = { 4326 2229 451 506 1947 }
		
		blessings = {
			zun_silk_road
			stable_under_time
			praise_the_sun
			bringer_of_justice_and_fury
			zun_graveyard_empires
		}
	}
	
	sanamahism = {
		color = { 160 90 180 }
		icon = 49
		province = {
			local_missionary_strength = 0.01
		}
		country = {
			defensiveness = 0.2
			tolerance_heretic = 2
		}
		country_as_secondary = {
			tolerance_heretic = 1
			defensiveness = 0.2
		}
		
		personal_deity = yes

		heretic = { BHAKTI }
	}
	
	harmonized_modifier = harmonized_dharmic

	crusade_name = CRUSADE
}

eastern = {

	flags_with_emblem_percentage = 33
	flag_emblem_index_range = { 58 80 }

	confucianism = {
		color = { 214 229 140 }
		icon = 15
		allowed_conversion = {		#new added in MMETR
			daoism
		}
		country = {
			tolerance_heretic = 2
			adm_tech_cost_modifier = -0.1
		}
		country_as_secondary = {
			adm_tech_cost_modifier = -0.1
			stability_cost_modifier = -0.1
		}
		
		on_convert = {		#new added in MMETR
			change_religion = confucianism
			add_stability = -1
		}
		
		heretic = { TAOIST }
		uses_harmony = yes
		
		harmonized_modifier = harmonized_confucianism		#added MMETR, since can now be harmonized by daoism
	}

	shinto = {
		color = { 204 0 0 }
		icon = 16
		province = {
			local_missionary_strength = -0.01
		}
		country = {
			land_morale = 0.1
		}
		country_as_secondary = {
			discipline = 0.05
			global_unrest = -1
		}
		heretic = { SHUGENDO }
		uses_isolationism = yes
		
		harmonized_modifier = harmonized_shinto
	}

	tibetan_bon = {
		color = { 0 100 100 }
		icon = 47
		province = {
			local_missionary_strength = 0.01
			local_defensiveness = 0.1
		}
		country = {
			shock_damage_received = -0.1
			tolerance_heathen = 1
		}
		country_as_secondary = {
			horde_unity = 1
			shock_damage_received = -0.1
		}
		
		harmonized_modifier = harmonized_bon
		
		heretic = { ZEN }
		
		uses_karma = yes
	}

	muism = {
		color = { 130 130 50 }
		icon = 48
		province = {
			local_missionary_strength = 0.01
		}
		country = {
			tolerance_heretic = 2
			tolerance_heathen = 1
		}
		country_as_secondary = {
			stability_cost_modifier = -0.1
			loot_amount = 0.25
		}
		
		#New Kut aspects added in MMETR
		uses_anglican_power = yes				# Uses church power/aspect mechanics
		aspects_name = MUISM_ASPECTS
		
		aspects = {
			hwanin_kut_aspect
			dangun_kut_aspect
			munsin_kut_aspect
			yeongdeung_kut_aspect
			samsin_halmeoni_kut_aspect
			bari_gongju_kut_aspect
			naerim_kut_aspect
			sinjang_kut_aspect
			sansin_kut_aspect
			buddha_kut_aspect
			jade_emperor_aspect
			tengri_kut_aspect
			indra_kut_aspect
		}
		
		harmonized_modifier = harmonized_muism
		
		heretic = { TAOIST }
	}
	
	tengri_pagan_reformed = {
		color = { 25 76 217 }
		icon = 33
		country = {
			cav_to_inf_ratio = 0.25
			global_regiment_cost = -0.2
		}
		can_have_secondary_religion = yes
		
		country_as_secondary = {	#added MMETR, since Heptadic can now syncretize with Tengri
			cav_to_inf_ratio = 0.25
			global_regiment_cost = -0.2
		}
		
		harmonized_modifier = harmonized_tengri
		
		heretic = { OLD_TENGRI }
	}
	
	satsana_phi = {
		color = { 180 130 50 }
		icon = 54
		province = {
			local_missionary_strength = 0.01
		}
		country = {
			tolerance_heretic = 2
			tolerance_heathen = 1
		}
		country_as_secondary = {
			stability_cost_modifier = -0.1
			loot_amount = 0.25
		}
		
		ancestors = yes		#MMETR added, from Totemist mechanic
		
		harmonized_modifier = harmonized_satsana_phi
		
		heretic = { SNAKE_CLAN }
	}
	
	#New added in MMETR
	daoism = {
		color = { 196 146 36 }
		icon = 64				#since left is blank for irreligious, is 60 out of 61 as of adding this
		allowed_conversion = {
			confucianism
		}
		country = {
			tolerance_heretic = 2
			manpower_recovery_speed = 0.1
		}
		country_as_secondary = {
			stability_cost_modifier = -0.1
			manpower_recovery_speed = 0.1
		}
		
		on_convert = {		#new added in MMETR
			change_religion = daoism
			add_stability = -1
		}
		
		heretic = { TIANSHIDAO WUDOUMIDAO ZHENGYIDAO }
		
		misguided_heretic = yes		# Other in religion group dislike them less
		
		uses_harmony = yes
		
		harmonized_modifier = harmonized_daoism		#added MMETR, since can now be harmonized by confucianism
	}
	
	sasanea_yang = {
		color = { 111 153 60 }
		icon = 73
		province = {
			local_missionary_strength = 0.01
		}
		country = {
			tolerance_own = 1
			defensiveness = 0.1
		}
		country_as_secondary = {
			stability_cost_modifier = -0.1
			defensiveness = 0.1
		}
		
		ancestors = yes
		
		harmonized_modifier = harmonized_sasanea_yang
		
		heretic = { SNAKE_CLAN }
	}
	
	natic = {
		color = { 107 93 99 }
		icon = 74
		province = {
			local_missionary_strength = 0.01
		}
		country = {
			tolerance_own = 1
			tolerance_heathen = 2
		}
		country_as_secondary = {
			stability_cost_modifier = -0.1
			tolerance_heathen = 1
		}
		
		ancestors = yes
		
		harmonized_modifier = harmonized_natic
		
		heretic = { SNAKE_CLAN }
	}
	
	moism = {		#keep same name as CFBM for compatibility
		color = { 255 201 255 }
		icon = 81
		country = {
			tolerance_heretic = 1
			tolerance_heathen = 2
		}
		country_as_secondary = {
			stability_cost_modifier = -0.1
			tolerance_heretic = 1
		}
		
		harmonized_modifier = harmonized_moism
		heretic = { SNAKE_CLAN }
	}
	
	crusade_name = CRUSADE
}

pagan = {

	flags_with_emblem_percentage = 10
	flag_emblem_index_range = { 83 96 }

	animism = {
		color = { 127 0 0 }
		icon = 17
		province = {
			local_missionary_strength = 0.02
		}
		country = {
			tolerance_own = 1
			global_unrest = -1
		}
		country_as_secondary = {
			tolerance_own = 2
			loot_amount = 0.25
		}
		
		heretic = { SNAKE_CLAN }
	}
	
	shamanist = {
		color = { 100 60 60 }
		icon = 18
		country = {
			tolerance_heathen = 2
			diplomatic_reputation = 1
		}
		province = {
			local_missionary_strength = 0.02
		}
		country_as_secondary = {
			tolerance_own = 2
			loot_amount = 0.25
		}
		heretic = { GOAT_SKULL }
	}
	
	dreamtime = {
		icon = 56
		color = { 197 133 43 }
		country = {
			shock_damage_received = -0.05
			diplomatic_reputation = 1
		}
		country_as_secondary = {
			shock_damage = 0.1
			hostile_attrition = 2
		}
		
		fetishist_cult = yes
		heretic = { WAGYLKOOP MOORAMOORA GINGARRURNDE }
	}
	
	harmonized_modifier = harmonized_pagan
	
	crusade_name = CRUSADE
}
