religion_nature = {
	buttons = { nature }

	religion_peaceful = {
		picture = GFX_religion_feature_peaceful

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_pacifist
				set_pacifist = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_peace_piety
				set_peace_piety_gain = 1
			}

			custom_tooltip = {
				text = tooltip_religion_feature_no_looting
				set_allow_looting = no
			}

			custom_tooltip = {
				text = tooltip_religion_feature_no_crusade
				set_can_call_crusade = no
			}

			hidden_effect = {
				set_ai_aggression = 0.1
				set_convert_other_groups = 0
				set_convert_same_group = 0
				set_hard_to_convert = no
				set_peace_prestige_loss = no
				set_piety_loss_for_attacking_same_religion = no
				set_raised_vassal_opinion_loss = yes
			}
		}

		ai_will_do = {
			factor = 100

			# Handles feature randomization in AltStart to make unreformed pagans still have "paganish" features
			trigger = {
				has_game_started = yes
				religion_group = pagan_group
			}

			mult_modifier = {
				factor = 0.01
				FROM = {
					character = yes
					NOT = { religion = bon_pagan }
				}
			}

			mult_modifier = {
				factor = 0.25		# Pacifists should be rarer in general in Random World.
				has_game_started = no
			}
		}
	}

	religion_warlike = {
		picture = GFX_religion_feature_warlike

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_war_levies
				set_raised_vassal_opinion_loss = no
			}

			custom_tooltip = {
				text = tooltip_religion_feature_crusade
				set_can_call_crusade = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_warlike
				set_ai_aggression = 2.0
			}

			custom_tooltip = {
				text = tooltip_religion_feature_prestige_loss
				set_peace_prestige_loss = yes
			}

			hidden_effect = {
				set_allow_looting = yes
				set_convert_other_groups = 0
				set_convert_same_group = 1
				set_hard_to_convert = no
				set_pacifist = no
				set_peace_piety_gain = 0
				set_piety_loss_for_attacking_same_religion = no
			}
		}

		ai_will_do = {
			factor = 100

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					OR = {
						religion = bon_pagan
						religion = slavic_pagan
						religion = baltic_pagan
						religion = finnish_pagan
						religion = west_african_pagan
					}
				}
			}

			mult_modifier = {
				factor = 0.01
				FROM = {
					character = yes
					religion = bon_pagan
				}
			}

			mult_modifier = {
				factor = 5
				FROM = {
					character = yes
					trait = zealous
				}
			}

			mult_modifier = {
				factor = 5
				FROM = {
					character = yes
					trait = lunatic
				}
			}

			mult_modifier = {
				factor = 5
				FROM = {
					character = yes
					trait = possessed
				}
			}

			mult_modifier = {
				factor = 5
				FROM = {
					character = yes
					trait = wroth
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = craven
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = patient
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = cynical
				}
			}
		}
	}

	religion_defensive = {
		picture = GFX_religion_feature_defensive

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_defensive

				set_unit_modifier = {
					garrison_size = 0.3
					levy_size = 0.2

					key = DEF_RELIGION
				}

				set_unit_home_modifier = {
					land_morale = 0.8
					light_infantry_defensive = 0.8
					heavy_infantry_defensive = 0.8
					pikemen_defensive = 0.8
					light_cavalry_defensive = 0.8
					knights_defensive = 0.8
					archers_defensive = 0.8
					horse_archers_defensive = 0.8
					camel_cavalry_defensive = 0.8
					war_elephants_defensive = 0.8

					garrison_size = 0.4

					key = DEF_RELIGION_HOME_TERRITORY
				}
			}

			custom_tooltip = {
				text = tooltip_religion_feature_hard_conversion
				set_hard_to_convert = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_crusade
				set_can_call_crusade = yes
			}

			hidden_effect = {
				set_ai_aggression = 0.5
				set_allow_looting = yes
				set_convert_other_groups = 1
				set_convert_same_group = 1
				set_pacifist = no
				set_peace_piety_gain = 0
				set_peace_prestige_loss = no
				set_piety_loss_for_attacking_same_religion = no
				set_raised_vassal_opinion_loss = yes
			}
		}

		ai_will_do = {
			factor = 100

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					OR = {
						religion = norse_pagan
						religion = tengri_pagan
						religion = zun_pagan
						religion = hellenic_pagan
						religion = west_african_pagan
					}
				}
			}

			mult_modifier = {
				factor = 0.001
				FROM = {
					character = yes
					religion = aztec_pagan
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = zealous
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = lunatic
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = possessed
				}
			}

			mult_modifier = {
				factor = 5
				FROM = {
					character = yes
					trait = craven
				}
			}

			mult_modifier = {
				factor = 5
				FROM = {
					character = yes
					trait = patient
				}
			}

			mult_modifier = {
				factor = 5
				FROM = {
					character = yes
					trait = cynical
				}
			}
		}
	}

	religion_proselytizing = {
		picture = GFX_religion_feature_proselytizing

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_proselytizing

				set_convert_other_groups = 2
				set_convert_same_group = 2
			}

			custom_tooltip = {
				text = tooltip_religion_feature_crusade
				set_can_call_crusade = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_piety_same_religion_loss
				set_piety_loss_for_attacking_same_religion = yes
			}

			hidden_effect = {
				set_allow_looting = yes
				set_ai_aggression = 1.0
				set_hard_to_convert = no
				set_pacifist = no
				set_peace_piety_gain = 0
				set_peace_prestige_loss = no
				set_raised_vassal_opinion_loss = yes
			}
		}

		ai_will_do = {
			factor = 80

			# Handles feature randomization in AltStart to make unreformed pagans still have "paganish" features
			trigger = {
				has_game_started = yes
				religion_group = pagan_group
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					NOR = {
						religion = zun_pagan
						religion = hellenic_pagan
						religion = west_african_pagan
					}
				}
			}

			mult_modifier = {
				factor = 0.01
				FROM = {
					character = yes
					religion = bon_pagan
				}
			}

			mult_modifier = {
				factor = 5
				FROM = {
					character = yes
					trait = zealous
				}
			}

			mult_modifier = {
				factor = 5
				FROM = {
					character = yes
					trait = gregarious
				}
			}

			mult_modifier = {
				factor = 5
				FROM = {
					character = yes
					trait = socializer
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = wroth
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = possessed
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = brave
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = cynical
				}
			}
		}
	}

	religion_dogmatic = {
		picture = GFX_religion_feature_dogmatic

		trigger = {
			NOR = {
				has_selected_religion_feature = religion_syncretic
				has_selected_religion_feature = religion_feature_hellenic
				has_selected_religion_feature = religion_no_leader
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_dogmatic_1

				# Base moral authority is high
				# Handled by on_action event 670
			}

			custom_tooltip = {
				text = tooltip_religion_feature_crusade
				set_can_call_crusade = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_dogmatic_2

				# This religion does not allow marriage with infidels
				# Handled by on_action event 670
			}

			custom_tooltip = {
				text = tooltip_religion_feature_piety_same_religion_loss
				set_piety_loss_for_attacking_same_religion = yes
			}

			hidden_effect = {
				set_ai_aggression = 1.5
				set_allow_looting = yes
				set_convert_other_groups = 0
				set_convert_same_group = 2
				set_hard_to_convert = yes
				set_pacifist = no
				set_peace_piety_gain = 0
				set_peace_prestige_loss = no
				set_raised_vassal_opinion_loss = yes

				# CK2Plus
				set_flag = convert_heretics # Used for lord spiritual event 903
			}
		}

		ai_will_do = {
			factor = 50

			# Handles feature randomization in AltStart to make unreformed pagans still have "paganish" features
			trigger = {
				has_game_started = yes
				religion_group = pagan_group
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					NOR = {
						religion = zun_pagan
						religion = west_african_pagan
					}
				}
			}

			mult_modifier = {
				factor = 0.01
				FROM = {
					character = yes
					religion = bon_pagan
				}
			}

			mult_modifier = {
				factor = 5
				FROM = {
					character = yes
					trait = paranoid
				}
			}

			mult_modifier = {
				factor = 5
				FROM = {
					character = yes
					trait = cruel
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = kind
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = cynical
				}
			}

			mult_modifier = {
				factor = 0.5		# Should be rarer than regular ones
				has_game_started = no
			}
		}
	}

	religion_cosmopolitan = {
		picture = GFX_religion_feature_cosmopolitan

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_cosmopolitan_2

				# This religion can intermarry with its neighbouring faiths
				# Handled by on_action event 670
			}

			custom_tooltip = {
				text = tooltip_religion_feature_crusade

				set_can_call_crusade = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_impotent

				set_convert_other_groups = 0
				set_convert_same_group = 0
			}

			custom_tooltip = {
				text = tooltip_religion_feature_cosmopolitan_1

				# Base moral authority is low
				# Handled by on_action event 670
			}

			hidden_effect = {
				set_ai_aggression = 0.5
				set_allow_looting = yes
				set_hard_to_convert = no
				set_pacifist = no
				set_peace_piety_gain = 0
				set_peace_prestige_loss = no
				set_piety_loss_for_attacking_same_religion = no
				set_raised_vassal_opinion_loss = yes
			}
		}

		ai_will_do = {
			factor = 50

			# Handles feature randomization in AltStart to make unreformed pagans still have "paganish" features
			trigger = {
				has_game_started = yes
				religion_group = pagan_group
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					NOR = {
						religion = hellenic_pagan
						religion = west_african_pagan
						religion = slavic_pagan
					}
				}
			}

			mult_modifier = {
				factor = 2
				FROM = {
					character = yes
					religion = hellenic_pagan
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = paranoid
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = zealous
				}
			}

			mult_modifier = {
				factor = 5
				FROM = {
					character = yes
					trait = gregarious
				}
			}

			mult_modifier = {
				factor = 5
				FROM = {
					character = yes
					trait = kind
				}
			}

			mult_modifier = {
				factor = 5
				FROM = {
					character = yes
					trait = cynical
				}
			}

			mult_modifier = {
				factor = 0.5		# Should be rarer than regular ones
				has_game_started = no
			}
		}
	}
}

religion_doctrine = {
	buttons = { doctrine1 doctrine2 }

	religion_holy_family = {
		picture = GFX_religion_feature_holy_family

		trigger = {
			NOR = {
				has_selected_religion_feature = religion_feature_zun # Redundant
				has_selected_religion_feature = religion_feature_bon
				religion = zoroastrian # Random World
				religion = messalian
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_incest

				set_psc_marriage = yes
				set_bs_marriage = yes
				set_cousin_marriage = yes
				set_pc_marriage = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_holy_family
				set_divine_blood = yes
			}
		}

		ai_will_do = {
			factor = 1

			# Handles feature randomization in AltStart to make unreformed pagans still have "paganish" features
			trigger = {
				has_game_started = yes
				religion_group = pagan_group
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					NOT = { religion = zun_pagan }
				}
			}
		}
	}

	religion_harems = {
		picture = GFX_religion_feature_harems

		trigger = {
			NOR = {
				has_selected_religion_feature = religion_matriarchal # Incompatible
				has_selected_religion_feature = religion_feature_zun # Redundant
				has_selected_religion_feature = religion_feature_tengri
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_harems

				set_max_consorts = 0
				set_max_wives = 4
			}
		}
	}

	religion_meritocratic = {
		picture = GFX_religion_feature_meritocratic

		trigger = {
			NOR = {
				has_selected_religion_feature = religion_feature_hellenic # Redundant Doctrine
				has_selected_religion_feature = religion_feature_bon # Redundant Doctrine
				has_selected_religion_feature = religion_patriarchal # Incompatible
				has_selected_religion_feature = religion_matriarchal # Incompatible
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_meritocratic

				set_heir_designation = yes
			}
		}

		ai_will_do = {
			factor = 1

			# Handles feature randomization in AltStart to make unreformed pagans still have "paganish" features
			trigger = {
				has_game_started = yes
				religion_group = pagan_group
			}
		}
	}

	religion_stable = {
		picture = GFX_religion_feature_stable

		trigger = {
			NOR = {
				has_selected_religion_feature = religion_feature_slavic		# Redundant Doctrine
				has_selected_religion_feature = religion_feature_finnish	# Redundant Doctrine

				# CK2Plus
                has_selected_religion_feature = religion_feature_egyptian	# Redundant Doctrine
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_stable
				set_short_reign_opinion_year_mult = 0
			}

			custom_tooltip = {
				text = tooltip_religion_feature_meliorism
				# Decision checks for this religion feature
			}
		}

		ai_will_do = {
			factor = 1

			# Handles feature randomization in AltStart to make unreformed pagans still have "paganish" features
			trigger = {
				has_game_started = yes
				religion_group = pagan_group
			}
		}
	}

	religion_jizya = {
		picture = GFX_religion_feature_jizya

		trigger = {
			NOR = {
				has_selected_religion_feature = religion_syncretic
				has_selected_religion_feature = religion_feature_west_african
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_jizya
				set_jizya_tax = yes
			}
		}

		ai_will_do = {
			factor = 1

			# Handles feature randomization in AltStart to make unreformed pagans still have "paganish" features
			trigger = {
				has_game_started = yes
				religion_group = pagan_group
			}
		}
	}

	religion_monastic = {
		picture = GFX_religion_feature_monastic

		trigger = {
			NOT = { has_selected_religion_feature = religion_feature_west_african }
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_monastic
				set_can_retire_to_monastery = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_learning_boost

				set_character_modifier = {
					learning = 2
					key = MONASTIC_ATTR_RELIGION
				}
			}

			custom_tooltip = {
				text = tooltip_religion_feature_celibate_priests

				set_priests_can_marry = no
				set_priests_can_inherit = no
			}
		}

		ai_will_do = {
			factor = 1

			# Handles feature randomization in AltStart to make unreformed pagans still have "paganish" features
			trigger = {
				has_game_started = yes
				religion_group = pagan_group
			}
		}
	}

	religion_syncretic = { # Gives option for each ruler to pick one of the sympathy_for_traits via decision
		picture = GFX_religion_feature_syncretic

		trigger = {
			NOR = {
				has_selected_religion_feature = religion_jizya
				has_selected_religion_feature = religion_dogmatic
				has_selected_religion_feature = religion_feature_hellenic # Redundant Doctrine
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_syncretic
				# Decision checks for this religion feature
			}
		}

		ai_will_do = {
			factor = 1

			# Handles feature randomization in AltStart to make unreformed pagans still have "paganish" features
			trigger = {
				has_game_started = yes
				religion_group = pagan_group
			}

			mult_modifier = {
				factor = 0.5
				FROM = {
					character = yes
					OR = {
						religion = aztec_pagan
						religion = baltic_pagan
						religion = finnish_pagan
					}
				}
			}
		}
	}

	religion_haruspicy = { # Gives option to divinate the future before waging a war
		picture = GFX_religion_feature_haruspicy

		potential = {
			religion_openly_hellenic_or_reformed_trigger = no # Core feature of the religion itself
		}

		trigger = {
			NOT = { has_selected_religion_feature = religion_feature_celtic } # Redundant
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_haruspicy
				# Event fires when a war breaks out
			}
		}

		ai_will_do = {
			factor = 1
		}
	}

	religion_astrology = {
		picture = GFX_religion_feature_astrology

		potential = {
			religion_openly_hellenic_or_reformed_trigger = no # Core feature of the religion itself
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_astrology
				# Event and decision check for this religion feature
			}

			custom_tooltip = {
				text = tooltip_religion_feature_hermetics
				# Society checks for this religion feature
			}
		}

		ai_will_do = {
			factor = 1

			mult_modifier = {
				factor = 0.01
				FROM = {
					character = yes
					OR = { # Too Western for them
						religion = bon_pagan
						religion = tengri_pagan
						religion = finnish_pagan
					}
				}
			}
		}
	}

	religion_patriarchal = {
		picture = GFX_religion_feature_patriarchal

		trigger = {
			NOR = {
				has_selected_religion_feature = religion_matriarchal
				has_selected_religion_feature = religion_equal
				has_selected_religion_feature = religion_feature_bon
				has_selected_religion_feature = religion_meritocratic
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_patriarchal

				# Agnatic law is enforced
				# Laws are set in on_reform event 670
			}

			custom_tooltip = {
				text = tooltip_religion_feature_open_succession

				# Succession checks for this religion feature
			}

			custom_tooltip = {
				text = tooltip_religion_feature_patriarchal_negatives

				# Female characters are NOT allowed in the council
				# Job titles check for this religion feature
			}

			custom_tooltip = {
				text = tooltip_religion_feature_no_matrimarriage

				set_allows_matrilineal_marriage = no
			}

			hidden_effect = {
				set_feminist = no
				set_female_temple_holders = no
				set_male_temple_holders = yes
				set_men_can_take_consorts = yes
				set_women_can_take_consorts = no
			}
		}

		ai_will_do = {
			factor = 1

			mult_modifier = {
				factor = 0.01
				FROM = {
					character = yes
					is_female = yes
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					current_heir = { is_female = yes }
				}
			}
		}
	}

	religion_equal = {
		picture = GFX_religion_feature_equal

		trigger = {
			NOR = {
				has_selected_religion_feature = religion_matriarchal
				has_selected_religion_feature = religion_patriarchal
				has_selected_religion_feature = religion_feature_bon

				trigger_if = {
					limit = { has_game_started = yes }

					FROM = {
						character = yes
						government = merchant_republic_government
					}
				}
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_cognatic

				# Absolute cognatic law is enforced
				# Laws are set in on_reform event 670
			}

			custom_tooltip = {
				text = tooltip_religion_feature_feminist

				set_feminist = yes
			}

			hidden_effect = {
				set_allows_matrilineal_marriage = yes
				set_women_can_take_consorts = yes
				set_men_can_take_consorts = yes
				set_female_temple_holders = yes
				set_male_temple_holders = yes
			}
		}

		ai_will_do = {
			factor = 1

			mult_modifier = {
				factor = 0.01
				NOT = {
					FROM = {
						character = yes
						OR = {
							trait = just
							AND = {
								is_female = yes
								trait = ambitious
							}
						}
					}
				}
			}
		}
	}

	religion_matriarchal = {
		picture = GFX_religion_feature_matriarchal

		trigger = {
			NOR = {
				has_selected_religion_feature = religion_patriarchal
				has_selected_religion_feature = religion_equal
				has_selected_religion_feature = religion_feature_bon
				has_selected_religion_feature = religion_meritocratic

				trigger_if = {
					limit = { has_game_started = yes }

					FROM = {
						character = yes
						government = merchant_republic_government
					}
				}
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_matriarchal

				# Enatic law is enforced
				# Laws are set in on_reform event 670
				# Other gender succession laws check for this religion feature
			}

			custom_tooltip = {
				text = tooltip_religion_feature_open_succession

				# Open succession is unlocked
				# Succession checks for this religion feature
			}

			custom_tooltip = {
				text = tooltip_religion_feature_matriarchal_negatives

				# Male characters are not allowed in the council
				# Job titles check for this religion feature
			}

			hidden_effect = {
				set_allows_matrilineal_marriage = yes
				set_feminist = yes
				set_female_temple_holders = yes
				set_male_temple_holders = no
				set_men_can_take_consorts = no
				set_women_can_take_consorts = yes
			}
		}

		ai_will_do = {
			factor = 1

			mult_modifier = {
				factor = 0.001
				NOT = {
					FROM = {
						character = yes
						is_female = yes

						OR = {
							trait = lunatic
							trait = possessed
							trait = ambitious
						}
					}
				}
			}
		}
	}

	religion_ritual_sacrifice = {
		picture = GFX_religion_feature_ritual_sacrifice

		trigger = {
			NOR = {
				religion_openly_aztec_or_reformed_trigger = yes
				has_selected_religion_feature = religion_peaceful
				has_selected_religion_feature = religion_proselytizing
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_aztec_sacrifices
				# Decision checks for this religion feature
			}

			custom_tooltip = {
				text = tooltip_religion_feature_bloodthirsty_mechanics
				# Various decisions and events check for this religion feature
			}
		}

		ai_will_do = {
			factor = 1

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					NOR = {
						trait = cruel
						trait = impaler
					}
				}
			}
		}
	}

	religion_adventuring = {
		picture = GFX_religion_feature_adventuring

		trigger = {
			NOR = {
				has_selected_religion_feature = religion_peaceful
				has_selected_religion_feature = religion_feature_norse
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_adventuring
				enable_prepared_invasion = THIS
			}

			custom_tooltip = {
				text = tooltip_religion_feature_pirating
				# Requires seafaring, not compatible with peaceful nature
			}
		}

		ai_will_do = {
			factor = 1

			mult_modifier = {
				factor = 1.5
				FROM = {
					character = yes
					religion = norse_pagan
				}
			}

			mult_modifier = {
				factor = 1.5
				FROM = {
					character = yes
					religion = baltic_pagan
				}
			}
		}
	}

	religion_seafaring = {
		picture = GFX_religion_feature_seafaring

		trigger = {
			NOR = {
				has_selected_religion_feature = religion_peaceful
				has_selected_religion_feature = religion_feature_norse # Redundant
				has_selected_religion_feature = religion_feature_aztec
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_rivermovement
				set_allow_rivermovement = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_ship_maintenance
				# Part of seafaring, see below
			}

			custom_tooltip = {
				text = tooltip_religion_feature_seafaring
				set_seafaring = yes
			}

			hidden_effect = {
				if = {
					limit = { # Unlock looting for religions which do not have it already
						FROM = {
							character = yes
							NOT = { has_selected_religion_feature = religion_peaceful }

							OR = {
								religion = pagan
								religion = zun_pagan
								religion = aztec_pagan
								religion = hellenic_pagan
							}
						}
					}

					set_allow_looting = yes
				}
			}
		}

		ai_will_do = {
			factor = 1

			trigger = {
				FROM = {
					trigger_if = {
						limit = { character = yes }

						any_demesne_province = {
							is_coastal = yes
							TECH_NAVAL >= 1
							owned_by = PREV
						}
					}
				}
			}

			mult_modifier = {
				factor = 1.5
				FROM = {
					character = yes
					religion = norse_pagan
				}
			}

			mult_modifier = {
				factor = 1.5
				FROM = {
					character = yes
					religion = aztec_pagan
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					is_nomadic = yes
				}
			}
		}
	}

	religion_relentless = {
		picture = GFX_religion_feature_relentless

		trigger = {
			NOR = {
				has_selected_religion_feature = religion_peaceful
				has_selected_religion_feature = religion_defensive
				has_selected_religion_feature = religion_feature_aztec # Redundant
				has_selected_religion_feature = religion_feature_tengri
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_anti_attrition
				set_ignores_defensive_attrition = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_offensive

				set_unit_modifier = {
					light_infantry_offensive = 0.1
					heavy_infantry_offensive = 0.1
					light_cavalry_offensive = 0.1
					knights_offensive = 0.1
					pikemen_offensive = 0.1
					archers_offensive = 0.1
					horse_archers_offensive = 0.1
					camel_cavalry_offensive = 0.1
					war_elephants_offensive = 0.1

					key = RELENTLESS_RELIGION
				}
			}
		}

		ai_will_do = {
			factor = 1

			mult_modifier = {
				factor = 1.5
				FROM = {
					character = yes
					religion = aztec_pagan
				}
			}

			mult_modifier = {
				factor = 1.5
				FROM = {
					character = yes
					religion = tengri_pagan
				}
			}
		}
	}

	religion_animistic = {
		picture = GFX_religion_feature_animistic

		potential = {
			religion_openly_west_african_or_reformed_trigger = no # Redundant
		}

		trigger = {
			NOT = { has_selected_religion_feature = religion_feature_celtic } # Redundant
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_land_morale

				set_unit_modifier = {
					land_morale = 0.05
					key = ANIMISTIC_RELIGION
				}
			}

			custom_tooltip = {
				text = tooltip_religion_feature_adulthood_rite
				# Event checks for this religion feature
			}
		}

		ai_will_do = {
			factor = 1

			mult_modifier = {
				factor = 1.5
				FROM = {
					character = yes
					religion = aztec_pagan
				}
			}

			mult_modifier = {
				factor = 1.5
				FROM = {
					character = yes
					religion = tengri_pagan
				}
			}
		}
	}

	religion_beatification = {
		picture = GFX_religion_feature_beatification

		trigger = {
			NOR = {
				has_selected_religion_feature = religion_no_leader
				religion_group = christian # Random World redundancy

				# CK2Plus
                has_selected_religion_feature = religion_feature_egyptian # Redundant doctrine
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_beatification
				# Event checks for this religion feature
			}

			custom_tooltip = {
				text = tooltip_religion_feature_eldership
				# Succession law checks for this religion feature
			}
		}

		ai_will_do = {
			factor = 1

			# Handles feature randomization in AltStart to make unreformed pagans still have "paganish" features
			trigger = {
				has_game_started = yes
				religion_group = pagan_group
			}
		}
	}

	religion_feature_norse = {
		picture = GFX_religion_feature_norse

		potential = {
			has_game_started = yes
			religion = norse_pagan_reformed

			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			religion = norse_pagan_reformed

			NOR = {
				has_selected_religion_feature = religion_adventuring
				has_selected_religion_feature = religion_seafaring
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_adventuring
				enable_prepared_invasion = THIS
			}

			custom_tooltip = {
				text = tooltip_religion_feature_rivermovement
				set_allow_rivermovement = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_ship_maintenance
				# Part of seafaring, see below
			}

			custom_tooltip = {
				text = tooltip_religion_feature_seafaring
				set_seafaring = yes
			}
		}

		ai_will_do = {
			factor = 50
		}
	}

	religion_feature_tengri = {
		picture = GFX_religion_feature_tengri

		potential = {
			has_game_started = yes
			religion = tengri_pagan_reformed

			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			religion = tengri_pagan_reformed

			NOR = {
				has_selected_religion_feature = religion_relentless
				has_selected_religion_feature = religion_harems
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_anti_attrition
				set_ignores_defensive_attrition = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_offensive

				set_unit_modifier = {
					light_infantry_offensive = 0.1
					heavy_infantry_offensive = 0.1
					light_cavalry_offensive = 0.1
					knights_offensive = 0.1
					pikemen_offensive = 0.1
					archers_offensive = 0.1
					horse_archers_offensive = 0.1
					camel_cavalry_offensive = 0.1
					war_elephants_offensive = 0.1

					key = TENGRI_RELENTLESS_RELIGION
				}
			}

			custom_tooltip = {
				text = tooltip_religion_feature_harems

				set_max_consorts = 0
				set_max_wives = 4
			}
		}

		ai_will_do = {
			factor = 50
		}
	}

	religion_feature_baltic = {
		picture = GFX_religion_feature_baltic

		potential = {
			has_game_started = yes
			religion = baltic_pagan_reformed

			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			religion = baltic_pagan_reformed
			NOT = { has_selected_religion_feature = religion_meritocratic }
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_hard_conversion
				set_hard_to_convert = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_eldership
				# Succession law checks for this religion feature
			}
		}

		ai_will_do = {
			factor = 50
		}
	}

	religion_feature_slavic = {
		picture = GFX_religion_feature_slavic

		potential = {
			has_game_started = yes
			religion = slavic_pagan_reformed

			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			religion = slavic_pagan_reformed
			NOT = { has_selected_religion_feature = religion_stable }
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_rivermovement
				set_allow_rivermovement = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_stable
				set_short_reign_opinion_year_mult = 0
			}

			custom_tooltip = {
				text = tooltip_religion_feature_meliorism
				# Decision checks for this religion feature
			}
		}

		ai_will_do = {
			factor = 50
		}
	}

	religion_feature_finnish = {
		picture = GFX_religion_feature_finnish

		potential = {
			has_game_started = yes
			religion = finnish_pagan_reformed

			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			religion = finnish_pagan_reformed
			NOT = { has_selected_religion_feature = religion_stable }
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_hard_conversion
				set_hard_to_convert = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_stable
				set_short_reign_opinion_year_mult = 0
			}

			custom_tooltip = {
				text = tooltip_religion_feature_meliorism
				# Decision checks for this religion feature
			}
		}

		ai_will_do = {
			factor = 50
		}
	}

	religion_feature_west_african = {
		picture = GFX_religion_feature_west_african

		potential = {
			has_game_started = yes
			religion = west_african_pagan_reformed

			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			religion = west_african_pagan_reformed

			NOR = {
				has_selected_religion_feature = religion_monastic
				has_selected_religion_feature = religion_jizya
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_monastic

				set_can_retire_to_monastery = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_jizya

				set_jizya_tax = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_eldership

				# Succession law checks for this religion feature
			}

			hidden_effect = {
				set_priests_can_marry = no
				set_priests_can_inherit = no
			}
		}

		ai_will_do = {
			factor = 50
		}
	}

	religion_feature_zun = {
		picture = GFX_religion_feature_zun

		potential = {
			has_game_started = yes
			religion = zun_pagan_reformed

			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			religion = zun_pagan_reformed

			NOR = {
				has_selected_religion_feature = religion_harems
				has_selected_religion_feature = religion_holy_family
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_harems

				set_max_consorts = 0
				set_max_wives = 4
			}

			custom_tooltip = {
				text = tooltip_religion_feature_incest

				set_pc_marriage = yes
				set_bs_marriage = yes
				set_psc_marriage = yes
				set_cousin_marriage = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_holy_family
				set_divine_blood = yes
			}
		}

		ai_will_do = {
			factor = 50
		}
	}

	religion_feature_bon = {
		picture = GFX_religion_feature_bon

		potential = {
			always = no # Plus Disabled
			has_game_started = yes
			religion = bon_pagan_reformed

			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			religion = bon_pagan_reformed

			NOR = {
				has_selected_religion_feature = religion_holy_family
				has_selected_religion_feature = religion_meritocratic
				has_selected_religion_feature = religion_equal
				has_selected_religion_feature = religion_matriarchal
				has_selected_religion_feature = religion_patriarchal
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_no_incest

				set_pc_marriage = no
				set_bs_marriage = no
				set_psc_marriage = no
				set_cousin_marriage = no
			}

			custom_tooltip = {
				text = tooltip_religion_feature_meritocratic
				set_heir_designation = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_feminist
				set_feminist = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_cognatic
				set_allows_matrilineal_marriage = yes
			}
		}

		ai_will_do = {
			factor = 50
		}
	}

	religion_feature_aztec = {
		picture = GFX_religion_feature_aztec

		potential = {
			always = no # Plus Disabled
			has_game_started = yes
			religion = aztec_pagan_reformed

			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			religion = aztec_pagan_reformed

			NOR = {
				has_selected_religion_feature = religion_seafaring 			# Redundant
				has_selected_religion_feature = religion_ritual_sacrifice	# Redundant
				has_selected_religion_feature = religion_relentless 		# Redundant
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_aztec_sacrifices
				# Decision checks for this religion feature
			}

			custom_tooltip = {
				text = tooltip_religion_feature_bloodthirsty_mechanics
				# Various decisions and events check for this religion feature
			}

			custom_tooltip = {
				text = tooltip_religion_feature_anti_attrition
				set_ignores_defensive_attrition = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_offensive

				set_unit_modifier = {
					light_infantry_offensive = 0.1
					heavy_infantry_offensive = 0.1
					light_cavalry_offensive = 0.1
					knights_offensive = 0.1
					pikemen_offensive = 0.1
					archers_offensive = 0.1
					horse_archers_offensive = 0.1
					camel_cavalry_offensive = 0.1
					war_elephants_offensive = 0.1

					key = AZTEC_RELENTLESS_RELIGION
				}
			}

			custom_tooltip = {
				text = tooltip_religion_feature_rivermovement
				set_allow_rivermovement = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_ship_maintenance
				set_seafaring = yes
			}
		}

		ai_will_do = {
			factor = 50
		}
	}

	religion_feature_hellenic = {
		picture = GFX_religion_feature_hellenic

		potential = {
			always = no # Plus Disabled
			has_game_started = yes
			religion = hellenic_pagan_reformed

			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			religion = hellenic_pagan_reformed

			NOR = {
				has_selected_religion_feature = religion_syncretic
				has_selected_religion_feature = religion_dogmatic
				has_selected_religion_feature = religion_meritocratic
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_syncretic
				# Decision checks for this religion feature
			}

			custom_tooltip = {
				text = tooltip_religion_feature_meritocratic
				set_heir_designation = yes
			}

			custom_tooltip = {
				text = tooltip_religion_feature_war_levies
				set_raised_vassal_opinion_loss = no
			}
		}

		ai_will_do = {
			factor = 50
		}
	}

	religion_feature_pyramids = {
		picture = GFX_religion_feature_pyramids

		potential = {
			has_game_started = yes

			NOR = {
				religion = aztec_pagan
				religion = egyptian_pagan
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_pyramids
				# Wonder checks for this religion feature
			}
		}
	}

	# CK2Plus
	religion_feature_celtic = {
		picture = GFX_religion_feature_celtic

		potential = {
			religion = celtic_pagan_reformed
			has_game_started = yes

			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			religion = celtic_pagan_reformed

			NOR = {
				has_selected_religion_feature = religion_haruspicy
				has_selected_religion_feature = religion_animistic
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_land_morale

				set_unit_modifier = {
					land_morale = 0.05
					key = ANIMISTIC_RELIGION
				}
			}

			custom_tooltip = { text = tooltip_religion_feature_adulthood_rite }
			custom_tooltip = { text = tooltip_religion_feature_haruspicy }
		}

		ai_will_do = {
			factor = 50
		}
	}

	religion_feature_egyptian = {
		picture = GFX_religion_feature_egyptian

		potential = {
			religion = egyptian_pagan_reformed
			has_game_started = yes

			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			religion = egyptian_pagan_reformed

			NOR = {
				has_selected_religion_feature = religion_no_leader
				has_selected_religion_feature = religion_beatification
				has_selected_religion_feature = religion_stable
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_beatification
				# Event checks for this religion feature
			}

			custom_tooltip = {
				text = tooltip_religion_feature_stable
				set_short_reign_opinion_year_mult = 0
			}

			custom_tooltip = {
				text = tooltip_religion_feature_meliorism
				# Decision checks for this religion feature
			}
		}

		ai_will_do = {
			factor = 50
		}
	}
}

religion_leadership = {
	buttons = { leadership }

	religion_temporal_head = {
		picture = GFX_religion_feature_temporal_head

		potential = {
			has_game_started = yes
		}

		trigger = {
			FROM = {
				character = yes
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_temporal_head
				make_reformer_head_of_religion = yes
			}

			hidden_effect = {
				set_can_excommunicate = no
				set_can_grant_divorce = no
				set_can_grant_claim = no
			}
		}

		ai_will_do = {
			factor = 50

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes

					NOR = {
						religion = norse_pagan
						religion = aztec_pagan
					}
				}
			}
		}
	}

	religion_theocratic_head = {
		picture = GFX_religion_feature_theocratic_head

		potential = {
			has_game_started = yes
		}

		effect = {
			custom_tooltip = { text = tooltip_religion_feature_theocratic_head }

			hidden_effect = {
				set_can_excommunicate = yes
				set_can_grant_divorce = yes
				set_can_grant_invasion_cb = yes
				set_can_grant_claim = yes
			}
		}

		ai_will_do = {
			factor = 50

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes

					NOR = {
						religion = tengri_pagan
						religion = zun_pagan
                        religion = celtic_pagan
					}
				}
			}
		}
	}

	religion_autocephaly = {
		picture = GFX_religion_feature_autocephaly

		potential = {
			has_game_started = yes
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_autocephaly
				set_autocephaly = yes
			}

			hidden_effect = {
				set_can_excommunicate = yes
				set_can_grant_divorce = yes
				set_can_grant_invasion_cb = yes
				set_can_grant_claim = yes
			}
		}

		ai_will_do = {
			factor = 50

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes

					NOR = {
						religion = finnish_pagan
						religion = slavic_pagan
						religion = baltic_pagan
						religion = hellenic_pagan
					}
				}
			}
		}
	}

	religion_no_leader = {
		picture = GFX_religion_feature_no_leader

		potential = {
			has_game_started = yes
		}

		trigger = {
			NOR = {
				has_selected_religion_feature = religion_dogmatic
				has_selected_religion_feature = religion_beatification
                has_selected_religion_feature = religion_feature_egyptian
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_religion_feature_branches
				set_religious_branch = pagan_reformation
			}

			custom_tooltip = {
				text = tooltip_religion_feature_dynamic

				if = {
					limit = {
						has_selected_religion_feature = religion_monastic

						FROM = {
							character = yes
						}
					}

					if = {
						limit = {
							FROM = {
								OR = {
									religion = norse_pagan
									religion = tengri_pagan
								}
							}
						}

						set_character_modifier = {
							martial = 2
							learning = 2
							key = MONASTIC_AUTONOMOUS_ATTR_RELIGION
						}
					}
					else_if = {
						limit = {
							FROM = {
								OR = {
									religion = baltic_pagan
									religion = slavic_pagan
								}
							}
						}

						set_character_modifier = {
							diplomacy = 2
							learning = 2
							key = MONASTIC_AUTONOMOUS_ATTR_RELIGION
						}
					}
					else_if = {
						limit = {
							FROM = {
								religion = finnish_pagan
							}
						}

						set_character_modifier = {
							intrigue = 2
							learning = 2
							key = MONASTIC_AUTONOMOUS_ATTR_RELIGION
						}
					}
					else_if = {
						limit = {
							FROM = {
								OR = {
									religion = west_african_pagan
									religion = zun_pagan
								}
							}
						}

						set_character_modifier = {
							stewardship = 2
							learning = 2
							key = MONASTIC_AUTONOMOUS_ATTR_RELIGION
						}
					}
					else_if = {
						limit = {
							FROM = {
								OR = {
									religion = hellenic_pagan
									religion = bon_pagan
								}
							}
						}

						set_character_modifier = {
							learning = 4
							key = MONASTIC_AUTONOMOUS_ATTR_RELIGION
						}
					}
				}
				else = {
					if = {
						limit = {
							FROM = {
								character = yes

								OR = {
									religion = norse_pagan
									religion = tengri_pagan
								}
							}
						}

						set_character_modifier = {
							martial = 2
							key = AUTONOMOUS_ATTR_RELIGION
						}
					}

					else_if = {
						limit = {
							FROM = {
								character = yes

								OR = {
									religion = baltic_pagan
									religion = slavic_pagan
								}
							}
						}

						set_character_modifier = {
							diplomacy = 2
							key = AUTONOMOUS_ATTR_RELIGION
						}
					}

					else_if = {
						limit = {
							FROM = {
								character = yes
								religion = finnish_pagan
							}
						}

						set_character_modifier = {
							intrigue = 2
							key = AUTONOMOUS_ATTR_RELIGION
						}
					}

					else_if = {
						limit = {
							FROM = {
								character = yes

								OR = {
									religion = west_african_pagan
									religion = zun_pagan
								}
							}
						}

						set_character_modifier = {
							stewardship = 2
							key = AUTONOMOUS_ATTR_RELIGION
						}
					}

					else_if = {
						limit = {
							FROM = {
								character = yes
								OR = {
									religion = hellenic_pagan
									religion = bon_pagan
								}
							}
						}

						set_character_modifier = {
							learning = 2
							key = AUTONOMOUS_ATTR_RELIGION
						}
					}
				}
			}

			custom_tooltip = {
				text = tooltip_religion_feature_no_leader

				set_no_head_of_religion = yes
				set_religion_head = none
			}

			custom_tooltip = {
				text = tooltip_religion_feature_no_crusade
				set_can_call_crusade = no
			}
		}

		ai_will_do = {
			factor = 50

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					NOR = {
						religion = bon_pagan
						religion = west_african_pagan
					}
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					religion = zun_pagan
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					religion = norse_pagan
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = zealous
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = lunatic
				}
			}

			mult_modifier = {
				factor = 0.1
				FROM = {
					character = yes
					trait = possessed
				}
			}

			mult_modifier = {
				factor = 5
				FROM = {
					character = yes
					trait = cynical
				}
			}
		}
	}

	# This purely exists not to mess with the head structures in Shattered World, as that causes very weird results
	religion_leader_unchanged = {
		picture = GFX_religion_feature_default
		potential = {
			has_game_started = no
		}

		effect = {
			custom_tooltip = { text = tooltip_religion_feature_default_head_dynamic }

			custom_tooltip = {
				text = tooltip_religion_feature_default_autocephaly_dynamic

				if = {
					limit = {
						OR = {
							religion = orthodox
							religion = monothelite
							religion = iconoclast
							religion = paulician
							religion = miaphysite
							religion = monophysite
						}
					}

					set_autocephaly = yes
				}
			}

			custom_tooltip = {
				text = tooltip_religion_feature_default_excommunication_dynamic

				if = {
					limit = { religion_group = christian }
					set_can_excommunicate = yes
				}
			}

			custom_tooltip = {
				text = tooltip_religion_feature_default_divorce_dynamic

				if = {
					limit = {
						OR = {
							religion_group = christian
							religion_group = zoroastrian_group
							religion_group = jewish_group
							religion_group = indian_group
                           	religion = celtic_pagan_reformed
						}

						NOR = {
							religion = cathar
							religion = waldensian
							religion = lollard
							religion = bogomilist
							religion = messalian
						}
					}

					set_can_grant_divorce = yes
				}
			}

			custom_tooltip = {
				text = tooltip_religion_feature_default_invasion_dynamic

				if = {
					limit = {
						OR = {
							religion = catholic
							religion = fraticelli
							religion = orthodox
							religion = miaphysite
							religion = monophysite
							religion = monothelite
							religion = iconoclast
							religion = paulician
							religion = nestorian
							religion_group = zoroastrian_group
							religion_group = jewish_group
						}
					}

					set_can_grant_invasion_cb = yes
				}
			}

			custom_tooltip = {
				text = tooltip_religion_feature_default_claim_dynamic

				if = {
					limit = {
						OR = {
							religion = catholic
							religion = fraticelli
						}
					}

					set_can_grant_claim = yes
				}
			}

			hidden_effect = {
				if = {
					limit = {
						religion = taoist

						NOT = {
							has_alternate_start_parameter = {
								key = religion_names
								value = random
							}
						}
					}

					set_character_modifier = {
						stewardship = 2
					}
				}

				if = {
					limit = {
						religion = buddhist

						NOT = {
							has_alternate_start_parameter = {
								key = religion_names
								value = random
							}
						}
					}
					set_character_modifier = {
						learning = 4
					}
				}

				if = {
					limit = {
						religion = taoist

						has_alternate_start_parameter = {
							key = religion_names
							value = random
						}
					}

					random_list = {
						10 = {
							set_character_modifier = {
								diplomacy = 2
							}
						}

						10 = {
							set_character_modifier = {
								martial = 2
							}
						}

						10 = {
							set_character_modifier = {
								intrigue = 2
							}
						}

						10 = {
							set_character_modifier = {
								stewardship = 2
							}
						}

						10 = {
							set_character_modifier = {
								learning = 4
							}
						}
					}
				}

				if = {
					limit = {
						religion = buddhist

						has_alternate_start_parameter = {
							key = religion_names
							value = random
						}
					}

					random_list = {
						10 = {
							set_character_modifier = {
								diplomacy = 2
							}
						}

						10 = {
							set_character_modifier = {
								martial = 2
							}
						}

						10 = {
							set_character_modifier = {
								intrigue = 2
							}
						}

						10 = {
							set_character_modifier = {
								stewardship = 2
							}
						}

						10 = {
							set_character_modifier = {
								learning = 4
							}
						}
					}
				}
			}
		}
	}
}