decisions = {
	
	feast_0 = {
		only_playable = yes
		ai_check_interval = 12
		potential = {
			is_playable = yes
			OR = {
				is_feudal = yes
				is_tribal = yes
				is_nomadic = yes
			}
			NOT = { society_member_of = ggsm_order_sacred_magdalene }
			prisoner = no
			OR = {
				religion_group = christian
				religion_group = zoroastrian_group
				religion_group = jewish_group
				has_alternate_start_parameter = { key = religion_names value = random }
			}
			NOR = {
				has_character_modifier = holding_large_feast
				has_character_modifier = large_feast_timer
				has_character_modifier = fabulous_feast
				has_character_flag = guest_feast_started
				liege = {
					has_character_modifier = holding_large_feast
				}
			}			
			num_of_vassals = 1
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			wealth = 25
			month = 10
			prestige = 100
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			wealth = -25
			add_character_modifier = {
				name = holding_large_feast
				duration = -1
			}
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			hidden_tooltip = { character_event = { id = 72999 days = 150 } } # Safety catch flag clearing
			
			hidden_tooltip = {
				character_event = { 
					id = 72109  
				}
			}
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				NOT = {
					wealth = 200
				}
			}
			modifier = {
				factor = 0
				trait = shy
			}
			modifier = {
				factor = 0
				NOT = { diplomacy = 10 }
			}	
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
		}
	}
	
	summer_fair = {
		only_playable = yes
		ai_check_interval = 3

		potential = {
			is_playable = yes
			OR = {
				religion_group = christian
				religion = mazdaki
				religion = manichean
				has_alternate_start_parameter = { key = religion_names value = random }
			}
			prisoner = no
			NOT = {
				has_character_modifier = holding_summer_fair
			}
			NOT = {
				has_character_modifier = summer_fair_timer
			}
			NOT = { society_member_of = ggsm_order_sacred_magdalene }
			num_of_vassals = 1
			OR = {
				NOT = { has_character_flag = recent_summer_fair }
				had_character_flag = {
					flag = recent_summer_fair
					days = 60
				}
			}
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			wealth = 25
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			month = 4
			NOT = {
				month = 7
			}
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			wealth = -25
			add_character_modifier = {
				name = holding_summer_fair
				duration = -1
			}
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			hidden_tooltip = {
				character_event = {
					id = 74047
					days = 60
				}
				character_event = { id = 74050  }
			}
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				NOT = {
					wealth = 200
				}
			}

			modifier = {
				factor = 0
				trait = slothful
			}	
			
			modifier = {
				factor = 0
				NOT = { stewardship = 10 }
			}
			
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}			
			
		}
	}
	
	hold_grand_hunt = {
		only_playable = yes
		ai_check_interval = 2

		potential = {
			is_playable = yes
			age = 16
            OR = {
				is_female = no
				gender_equality_trigger = yes
			}
			prisoner = no
			OR = {
				religion_group = christian
				religion_group = pagan_group	
				religion_group = zoroastrian_group
				has_alternate_start_parameter = { key = religion_names value = random }
			}
			NOT = {
				OR = {
					has_landed_title = e_mongol_empire
					has_landed_title = e_golden_horde
					has_landed_title = e_il-khanate
				}
			}
			NOT = {	has_character_modifier = holding_grand_hunt }
			OR = {
				NOT = { has_dlc = "Way of Life" }
				has_focus = focus_hunting
			}
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			month = 8
			wealth = 25
			NOT = { month = 10 }
			NOT = {	health_traits = 1 }
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			wealth = -25
			add_character_modifier = {
				name = holding_grand_hunt
				duration = -1
			}			
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			hidden_tooltip = { character_event = { id = 36999 days = 150 } } # Safety catch flag clearing
			hidden_tooltip = { 
				character_event = { id = 36090 days = 60 }
				character_event = { id = 36080  }
			}
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				NOT = { wealth = 50 }
			}
			modifier = {
				factor = 0
				NOT = { wealth = 200 }
				NOT = { has_focus = focus_hunting }
			}
			modifier = {
				factor = 0
				trait = craven
			}			
			modifier = {
				factor = 0
				NOT = {
					martial = 10
				}
			}
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
		}
	}
	
	hold_tiger_hunt = {
		only_playable = yes
		ai_check_interval = 7

		potential = {
			has_dlc = "Rajas of India"
			is_playable = yes
			age = 16
			prisoner = no
			num_of_vassals = 1
			capital_scope = {
				region = world_india
			}
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			NOT = { month = 10 }
			wealth = 25
			NOT = {	trait = incapable }
			NOT = { is_inaccessible_trigger = yes }
			prisoner = no
			NOT = { religion = jain }
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { 
					NOT = { has_character_flag = do_not_disturb } 
					NOT = { has_character_flag = holding_tiger_hunt }
					NOT = { has_character_modifier = hunt_timer }
				}
			}
		}
		effect = {
			wealth = -25
			set_character_flag = holding_tiger_hunt
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			hidden_tooltip = { 
				character_event = { id = RoI.2000 }
			}
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				NOT = { wealth = 50 }
			}
			modifier = {
				factor = 0
				NOT = { wealth = 200 }
				NOT = { has_focus = focus_hunting }
			}
			modifier = {
				factor = 0
				NOT = { martial = 10 }
				NOT = { has_focus = focus_hunting }
			}
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}				
		}
	}
	
	choose_hindu_patron_deity = {
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			has_dlc = "Rajas of India"
			is_playable = yes
			age = 16
			NOT = { trait = incapable }
			religion = hindu
			NOR = {
				has_character_modifier = patron_shiva
				has_character_modifier = patron_vishnu
				has_character_modifier = patron_brahma
				has_character_modifier = patron_kali
				has_character_modifier = patron_ganesha
				has_character_modifier = patron_ganga
			}
			NOT = { has_character_flag = selecting_patron_deity }
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			prisoner = no
		}
		effect = {
			custom_tooltip = {
				text = custom_tooltip_choose_patron_diety
			}
			character_event = { id = RoI.100 }
			set_character_flag = selecting_patron_deity
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0.1
			modifier = {
				factor = 5
				trait = zealous
			}
			modifier = {
				factor = 0.5
				trait = cynical
			}
		}
	}
	
	indian_pilgrimage = {        # For all Dharmics
		only_playable = yes
		ai_check_interval = 120
		potential = {
			has_dlc = "Mystics"
			OR = {
				NOT = { has_dlc = "Way of Life" }
				has_focus = focus_theology
				has_quest = quest_indian_monastic_order_pilgrimage
			}
			is_playable = yes
			has_dharmic_religion_trigger = yes
			NOT = { trait = indian_pilgrim }
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			war = no
			in_command = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			scaled_wealth = 0.2
			age = 16
			custom_tooltip = {
				text = health_travel_condition
				hidden_tooltip = {
					NOT = {	trait = pregnant }
					NOT = {	trait = incapable }
					NOT = {	trait = blinded }
					NOT = {	trait = has_tuberculosis }
					NOT = {	trait = has_typhoid_fever }
					NOT = {	trait = has_typhus }
					NOT = {	trait = has_bubonic_plague }
					NOT = {	trait = has_measles }
					NOT = {	trait = has_small_pox }
					NOT = {	trait = has_aztec_disease }
				}
			}
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			scaled_wealth = -0.2
			set_character_flag = activated_pilgrimage
			set_character_flag = do_not_disturb
			hidden_tooltip = {
				character_event = { 
					id = MNM.8000
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			#modifier = {
			#	factor = 100
			#	has_quest = quest_indian_monastic_order_pilgrimage
			#}
			modifier = {
				factor = 0.1             # Only a small minority ever go on a pilgrimage
			}
			modifier = {
				factor = 3
				trait = zealous
			}
			modifier = {
				factor = 0
				NOT = { wealth = 200 }
			}			
			modifier = {
				factor = 0
				NOT = { age = 30 }
			}
		}
	}
	
	catholic_pilgrimage = {        # For all Christians
		only_playable = yes
		ai_check_interval = 120
		potential = {
			has_dlc = "Sons of Abraham"
			OR = {
				NOT = { has_dlc = "Way of Life" }
				has_focus = focus_theology
				has_quest = quest_monastic_order_pilgrimage_christian
			}
			is_playable = yes
			religion_group = christian
			NOT = { trait = pilgrim }
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			war = no
			in_command = no
			conditional_tooltip = {
				trigger = { has_character_modifier = coronation_request_cooldown }
				custom_tooltip = {
					text = TT_NOT_RECENTLY_ASKED_CORONATION
					hidden_tooltip = {  
						NOT = { has_character_modifier = coronation_request_cooldown } 
					} 
				} 
			} 
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			scaled_wealth = 0.2
			age = 16
			custom_tooltip = {
				text = health_travel_condition
				hidden_tooltip = {
					NOT = {	trait = pregnant }
					NOT = {	trait = incapable }
					NOT = {	trait = blinded }
					NOT = {	trait = has_tuberculosis }
					NOT = {	trait = has_typhoid_fever }
					NOT = {	trait = has_typhus }
					NOT = {	trait = has_bubonic_plague }
					NOT = {	trait = has_measles }
					NOT = {	trait = has_small_pox }
					NOT = {	trait = has_aztec_disease }
				}
			}
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			scaled_wealth = -0.2
			set_character_flag = activated_pilgrimage
			set_character_flag = do_not_disturb
			hidden_tooltip = {
				character_event = { 
					id = SoA.5000
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0.1             # Only a small minority of Christians ever go on a pilgrimage
			}
			modifier = {
				factor = 3
				trait = zealous
			}
			modifier = {
				factor = 0
				NOT = { wealth = 200 }
			}			
			modifier = {
				factor = 0
				NOT = { age = 30 }
			}
		}
	}

	go_on_hajj = {
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			is_playable = yes
			religion_group = muslim
			NOT = { religion = qarmatian }
			NOT = { trait = hajjaj }
			NOT = { trait = on_hajj }
			NOT = {	has_character_flag = preparing_hajj }
			NOT = {	has_character_flag = ramadan }
			NOT = {	has_character_flag = activated_hajj }	
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			age = 16
			prisoner = no
			scaled_wealth = 0.2
			war = no
			in_command = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			
			NOT = { is_inaccessible_trigger = yes }
			custom_tooltip = {
				text = health_travel_condition
				hidden_tooltip = {
					NOT = {	trait = incapable }
					NOT = {	trait = blinded }
					NOT = {	trait = has_tuberculosis }
					NOT = {	trait = has_typhoid_fever }
					NOT = {	trait = has_typhus }
					NOT = {	trait = has_bubonic_plague }
					NOT = {	trait = has_measles }
					NOT = {	trait = has_small_pox }
					NOT = {	trait = has_aztec_disease }
				}
			}
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			scaled_wealth = -0.2
			hidden_tooltip = {
				letter_event = { id = 86000 }
			}
			clr_character_flag = promise_hajj
			set_character_flag = activated_hajj
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			
			if = {
				limit = {
					trait = decadent
				}
				remove_trait = decadent
			}

		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				trait = cynical
			}
			modifier = {
				factor = 0
				is_ruler = no
				trait = decadent
			}
			modifier = {
				factor = 2
				is_ruler = yes
				trait = decadent
			}
			modifier = {
				factor = 0
				NOT = { wealth = 300 }
			}
			modifier = { # Monthly randomizer for when AI takes decision (1% chance)
				factor = 0
				random = 1
			}
			modifier = {
				factor = 0
				NOT = { age = 30 }
			}
		}
	}
	
	observe_ramadan = {
		only_playable = yes
		ai_check_interval = 12
		potential = {
			ai = no
			is_playable = yes
			prisoner = no
			is_adult = yes
			religion_group = muslim
			NOT = { has_character_flag = ramadan }
			NOT = { has_character_modifier = observed_ramadan }
			NOT = { trait = on_hajj }
			NOT = { trait = incapable }
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			war = no
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			wealth = 100
			custom_tooltip = {
				text = IS_HEALTHY
				NOR = {
					is_ill = yes
					has_symptom_trigger = yes
				}
			}
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			character_event = { id = 88500 tooltip = "begin_fast" }
			set_character_flag = ramadan
			decadence = -3
			piety = 15
			wealth = -100
			add_character_modifier = {
				name = observed_ramadan
				duration = 1900
				hidden = no
			}
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
	
	settle_iceland = {
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 36
		
		potential = {
			is_alternate_start = no
			age = 16
			prisoner = no
			rebel = no
			is_landed = yes
			has_global_flag = viking_age_started
			OR = {
				culture_group = north_germanic
				religion = norse_pagan
				religion = norse_pagan_reformed
			}
			NOR = {
				has_global_flag = iceland_settled
				has_alternate_start_parameter = { key = religion_names value = random }
				has_landed_title = e_pirates
				has_landed_title = e_rebels
			}
			d_iceland = {
				any_direct_de_jure_vassal_title = {
					holder_scope = {
						independent = yes
						is_theocracy = yes
					}
				}
			}
		}
		allow = {
			prisoner = no
			war = no
			custom_tooltip = {
				text = viking_age_tt
				hidden_tooltip = {
					has_global_flag = viking_age_started
				}
			}
			prestige = 200
			wealth = 100
		}
		effect = {
			wealth = -100
			custom_tooltip = {
				text = settle_iceland_tt
			}
			if = {
				limit = {
					has_nickname = no
				}
				give_nickname = nick_the_explorer
			}
			hidden_tooltip = {
				save_event_target_as = settler_of_iceland_target
				set_global_flag = iceland_settled
				d_iceland = {
					any_direct_de_jure_vassal_title = {
						limit = {
							tier = COUNT
							holder_scope = {
								top_liege = {
									independent = yes
									is_theocracy = yes
								}
							}
						}
						holder_scope = {
							save_event_target_as = left_iceland_target
						}
						usurp_title = ROOT
						location = {
							religion = ROOT
							culture = ROOT
							capital_holding = {
								if = {
									limit = {
										holding_type = temple
									}
									convert_to = tribal
									refill_holding_levy = yes
								}
							}
							remove_province_modifier = incredibly_poor
						}
					}
					usurp_title = ROOT
				}
				narrative_event = { id = TGF.404 }
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			trigger = {
				had_global_flag = { flag = viking_age_started years = 2 }
				OR = {
					independent = yes
					any_liege = {
						ai = no
					}
				}
			}
		}
	}
	
	commission_runestone = {
		only_playable = yes
		ai_check_interval = 36
		potential = {
			has_dlc = "The Old Gods"
			is_playable = yes
			age = 16
			prisoner = no
			culture_group = north_germanic
			NOT = {	has_character_flag = commissioned_runestone }
			NOT = { year = 1150 }
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			wealth = 100
			prisoner = no
		}
		effect = {
			wealth = -100
			set_character_flag = commissioned_runestone
			hidden_tooltip = { 
				character_event = { id = TOG.500 }
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOT = { wealth = 300 }
			}
			modifier = {
				factor = 0
				NOT = { age = 30 }
			}			
		}
	}
	
	hold_nerge = {
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 2
		potential = {
			has_dlc = "The Old Gods"
			is_playable = yes
			age = 16
			is_female = no
			prisoner = no
			culture = mongol
			OR = {
				has_landed_title = e_il-khanate
				has_landed_title = e_golden_horde
				has_landed_title = e_mongol_empire
			}
			NOT = { has_character_modifier = morale_from_nerge }
			NOT = {	has_character_flag = holding_nerge }
			
			NOT = {
				has_alternate_start_parameter = { key = culture_names value = random }
			}
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			month = 8
			wealth = 50
			NOT = { month = 10 }
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			wealth = -50
			set_character_flag = holding_nerge
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			hidden_tooltip = { 
				character_event = { id = TOG.299 days = 150 }  # Safety catch flag clearing
				}
			custom_tooltip = {
				text = prepare_nerge
				hidden_tooltip = { 
					character_event = { id = TOG.100 } 
				}
			}
			if = {
				limit = {
					has_dlc = "Reapers"
					is_nomadic = no
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				NOT = {
					wealth = 300
				}
			}
			modifier = {
				factor = 0
				trait = craven
			}
			modifier = {
				factor = 0
				NOT = { martial = 10 }
			}	
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
		}
	}	
	
	hold_blot = {
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 6
		potential = {
			has_dlc = "The Old Gods"
			is_playable = yes
			age = 16
			prisoner = no
			OR = {
				religion = norse_pagan
				religion = norse_pagan_reformed
			}
			NOT = { has_character_modifier = held_blot_timer }
			NOT = {	has_character_flag = holding_blot }
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			OR = {
				NOT = { month = 2 }
				month = 10
			}
			wealth = 50
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			wealth = -50
			set_character_flag = holding_blot
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			hidden_tooltip = { 
				character_event = { id = TOG.699 days = 150 } # Safety catch flag clearing
			} 
			custom_tooltip = {
				text = prepare_blot
				hidden_tooltip = { 
					character_event = { id = TOG.600 } 
				}
			}
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				NOT = {
					wealth = 300
				}
			}
			modifier = {
				factor = 0
				trait = shy
			}
			modifier = {
				factor = 0
				NOT = { diplomacy = 10 }
			}	
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
		}
	}	

	ancestor_worship = {
		only_playable = yes
		is_high_prio = yes 
		ai_check_interval = 12

		potential = {
			has_dlc = "The Old Gods"
			is_playable = yes
			is_landed = yes
			is_adult = yes
			prisoner = no
			OR = {
				religion = finnish_pagan
				religion = finnish_pagan_reformed
				religion = west_african_pagan
				religion = west_african_pagan_reformed
				religion = baltic_pagan
				religion = baltic_pagan_reformed
				religion = slavic_pagan
				religion = slavic_pagan_reformed
				religion = tengri_pagan
				religion = tengri_pagan_reformed
				has_religion_feature = religion_beatification
			}
		}

		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			NOT = { is_inaccessible_trigger = yes }
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
			custom_tooltip = {
				text = worship_cooldown_tooltip
				hidden_tooltip = { NOT = { has_character_modifier = worshipped_ancestors_timer } }
			}
		}

		effect = {
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			custom_tooltip = {
				text = prepare_worship_ancestors
				hidden_tooltip = { 
					character_event = { id = TOG.7000 } 
					add_character_modifier = {
						name = worshipped_ancestors_timer
						years = 10
						hidden = yes
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0.1
			
			modifier = {
				factor = 0.01
				trait = cynical
			}
			modifier = {
				factor = 5
				trait = zealous
			}	
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
		}
	}

	hold_ukon_juhla = {
		only_playable = yes
		ai_check_interval = 3
		potential = {
			has_dlc = "The Old Gods"
			is_playable = yes
			is_adult = yes
			prisoner = no
			OR = {
				religion = finnish_pagan
				religion = finnish_pagan_reformed
			}
			NOT = { has_character_modifier = held_ukon_juhla_timer }
			NOT = {	has_character_flag = holding_ukon_juhla }
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			month = 4
			NOT = { month = 7 }
			wealth = 50
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			wealth = -50
			set_character_flag = holding_ukon_juhla
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			hidden_tooltip = { character_event = { id = TOG.899 days = 150 } } # Safety catch flag clearing
			custom_tooltip = {
				text = prepare_ukon_juhla
				hidden_tooltip = { 
					character_event = { id = TOG.700 } 	
				}
			}
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				NOT = {
					wealth = 300
				}
			}
			modifier = {
				factor = 0
				trait = shy
			}
			modifier = {
				factor = 0
				NOT = { diplomacy = 10 }
			}	
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
		}
	}

	pick_main_deity = {
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			has_dlc = "The Old Gods"
			is_playable = yes
			is_adult = yes
			prisoner = no
			OR = {
				religion = slavic_pagan
				religion = slavic_pagan_reformed
				religion = west_african_pagan
				religion = west_african_pagan_reformed
				religion = baltic_pagan
				religion = baltic_pagan_reformed
				religion = finnish_pagan
				religion = finnish_pagan_reformed
			}
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			piety = 25
			custom_tooltip = {
				text = pick_main_deity_timer_tooltip
				NOT = { has_character_modifier = picked_main_deity_timer }
			}
			prisoner = no
		}
		effect = {
			if = {
				limit = { has_character_modifier = follower_of_perun }
				remove_character_modifier = follower_of_perun
			}
			if = {
				limit = { has_character_modifier = follower_of_veles }
				remove_character_modifier = follower_of_veles
			}
			if = {
				limit = { has_character_modifier = follower_of_jarilo }
				remove_character_modifier = follower_of_jarilo
			}
			if = {
				limit = { has_character_modifier = follower_of_morana }
				remove_character_modifier = follower_of_morana
			}
			if = {
				limit = { has_character_modifier = follower_of_ayyur }
				remove_character_modifier = follower_of_ayyur
			}
			if = {
				limit = { has_character_modifier = follower_of_anansi }
				remove_character_modifier = follower_of_anansi
			}
			if = {
				limit = { has_character_modifier = follower_of_dan }
				remove_character_modifier = follower_of_dan
			}
			if = {
				limit = { has_character_modifier = follower_of_bida }
				remove_character_modifier = follower_of_bida
			}
			if = {
				limit = { has_character_modifier = follower_of_tsumburbura }
				remove_character_modifier = follower_of_tsumburbura
			}
			if = {
				limit = { has_character_modifier = follower_of_dongo }
				remove_character_modifier = follower_of_dongo
			}
			if = {
				limit = { has_character_modifier = follower_of_ukko }
				remove_character_modifier = follower_of_ukko
			}
			if = {
				limit = { has_character_modifier = follower_of_akka }
				remove_character_modifier = follower_of_akka
			}
			if = {
				limit = { has_character_modifier = follower_of_taipo_and_mielikki }
				remove_character_modifier = follower_of_taipo_and_mielikki
			}
			if = {
				limit = { has_character_modifier = follower_of_lempo }
				remove_character_modifier = follower_of_lempo
			}
			if = {
				limit = { has_character_modifier = follower_of_dievas }
				remove_character_modifier = follower_of_dievas
			}
			if = {
				limit = { has_character_modifier = follower_of_velnias }
				remove_character_modifier = follower_of_velnias
			}
			if = {
				limit = { has_character_modifier = follower_of_perkunas }
				remove_character_modifier = follower_of_perkunas
			}
			if = {
				limit = { has_character_modifier = follower_of_zemyna }
				remove_character_modifier = follower_of_zemyna
			}

			piety = -25

			custom_tooltip = {
				text = pick_main_deity_tooltip

				#Starts main deity events
				hidden_tooltip = {
					if = {
						limit = { has_minor_deity_trigger = no }
						character_event = { id = TOG.7100 days = 10 }
					}				
				}

				#Event for picking main deity
				trigger_switch = {
					on_trigger = religion
					slavic_pagan 				= { character_event = { id = TOG.7110 } } 
					slavic_pagan_reformed	 	= { character_event = { id = TOG.7110 } } 
					west_african_pagan			= { character_event = { id = TOG.7200 } } 
					west_african_pagan_reformed = { character_event = { id = TOG.7200 } }
					finnish_pagan				= { character_event = { id = TOG.7300 } } 
					finnish_pagan_reformed		= { character_event = { id = TOG.7300 } } 
					baltic_pagan				= { character_event = { id = TOG.7400 } } 
					baltic_pagan_reformed		= { character_event = { id = TOG.7400 } }   
				}

				add_character_modifier = {
					name = picked_main_deity_timer
					duration = 3650
					hidden = yes
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0.5
			modifier = {
				factor = 0
				has_minor_deity_trigger = yes
			}
		}
	}
	
	hold_uzgavenes = {
		only_playable = yes
		ai_check_interval = 3
		potential = {
			has_dlc = "The Old Gods"
			is_playable = yes
			is_adult = yes
			prisoner = no
			OR = {
				religion = baltic_pagan
				religion = baltic_pagan_reformed
			}
			NOT = { has_character_modifier = held_uzgavenes_timer }
			NOT = {	has_character_flag = holding_uzgavenes }
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			month = 4
			NOT = { month = 7 }
			wealth = 50
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			wealth = -50
			set_character_flag = holding_uzgavenes
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			hidden_tooltip = { character_event = { id = TOG.899 days = 150 } } # Safety catch flag clearing
			custom_tooltip = {
				text = prepare_uzgavenes
				hidden_tooltip = { 
					character_event = { id = TOG.750 } 
				}
			}
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				NOT = {
					wealth = 300
				}
			}
			modifier = {
				factor = 0
				trait = shy
			}
			modifier = {
				factor = 0
				NOT = { diplomacy = 10 }
			}	
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
		}
	}
	
	hold_jarilo = {
		only_playable = yes
		ai_check_interval = 3
		potential = {
			has_dlc = "The Old Gods"
			is_playable = yes
			is_adult = yes
			prisoner = no
			OR = {
				religion = slavic_pagan
				religion = slavic_pagan_reformed
			}
			NOT = { has_character_modifier = held_jarilo_timer }
			NOT = {	has_character_flag = holding_jarilo }
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			month = 4
			NOT = { month = 7 }
			wealth = 50
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			wealth = -50
			set_character_flag = holding_jarilo
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			hidden_tooltip = { character_event = { id = TOG.899 days = 150 } } # Safety catch flag clearing
			custom_tooltip = {
				text = prepare_jarilo
				hidden_tooltip = { 
					character_event = { id = TOG.800 } 
				}
			}
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				NOT = {
					wealth = 300
				}
			}
			modifier = {
				factor = 0
				trait = shy
			}
			modifier = {
				factor = 0
				NOT = { diplomacy = 10 }
			}	
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
		}
	}
	
	celebrate_passover = {
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 3
		potential = {
			has_dlc = "Sons of Abraham"
			is_playable = yes
			is_adult = yes
			prisoner = no
			religion_group = jewish_group
			NOT = { has_character_modifier = held_passover_timer }
			NOT = {	has_character_flag = holding_passover }
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			month = 3
			NOT = { month = 6 }
			wealth = 50
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			wealth = -50
			set_character_flag = holding_passover
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			hidden_tooltip = { character_event = { id = SoA.599 days = 150 } } # Safety catch flag clearing
			custom_tooltip = {
				text = passover_celebrations
				hidden_tooltip = { 
					character_event = { id = SoA.500 } 
				}
			}
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				NOT = {
					wealth = 300
				}
			}
			modifier = {
				factor = 0
				trait = shy
			}
			modifier = {
				factor = 0
				NOT = { diplomacy = 10 }
			}	
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
		}
	}	
	
	borrow_money_jews = {
		only_playable = yes
		ai_check_interval = 30
		potential = {
			is_playable = yes
			is_nomadic = no
			has_dlc = "Sons of Abraham"
			OR = {
				religion_group = christian
				religion_group = muslim
				religion_group = zoroastrian_group
				religion = taoist
			}
			NOT = {	religion_group = jewish_group }
			NOT = { religion = manichean }
			NOR = { 
				secret_religion = jewish
				secret_religion = karaite
				secret_religion = samaritan
			}
			NOT = { government = order_government }
		}
		
		allow = {
			OR = {
				religion_group = christian
				religion_group = muslim
				religion_group = zoroastrian_group
				religion = taoist
			}
			prisoner = no
			NOT = {
				has_character_modifier = borrowed_from_jews
				has_character_modifier = expelled_jewish
			}
			top_liege = { NOT = { has_character_modifier = expelled_jewish } }
		}
		
		effect = {
			add_character_modifier = {
				name = borrowed_from_jews
				duration = -1
				inherit = yes
			}
			wealth = 300
		}
		
		revoke_allowed = {
			always = no
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 0
				war = no
			}
			modifier = {
				factor = 0
				wealth = 200
				war = yes
			}			
			modifier = {
				factor = 0.1 # Slow it down
			}
		}
	}
	repay_money_jews = {
		only_playable = yes
		ai_check_interval = 6
		potential = {
			is_playable = yes
			NOT = { 
				has_character_modifier = expelled_jewish
			}
			has_character_modifier = borrowed_from_jews
			has_dlc = "Sons of Abraham"
		}
		
		allow = {
			conditional_tooltip = {
				trigger = {
		    		any_owned_bloodline = {
	    				has_bloodline_flag = jewish_saintly_bloodline
	    			}
	    		}
    			wealth = 300
			}
			conditional_tooltip = {
				trigger = {
					NOT = {
			    		any_owned_bloodline = {
		    				has_bloodline_flag = jewish_saintly_bloodline
		    			}
					}
				}
				wealth = 350
			}
		}
		
		effect = {
			remove_character_modifier = borrowed_from_jews
			if = {
				limit = {
		    		any_owned_bloodline = {
	    				has_bloodline_flag = jewish_saintly_bloodline
	    			}
	    		}
	    		wealth = -300
			}
			else = {
				wealth = -350
			}
		}
		
		revoke_allowed = {
			always = no
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOT = { wealth = 450 }
			}
			modifier = {
				factor = 0.5 # Slow it down
			}
		}
	}

	become_kshatriya = {
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			is_playable = yes
			is_adult = yes
			religion = hindu
			OR = {
				is_feudal = yes
				is_tribal = yes
				is_nomadic = yes
			}
			has_dlc = "Rajas of India"
			NOT = { trait = kshatriya }
		}
		
		allow = {
			OR = {
				trait = brahmin
				piety = 200
			}
			OR = {
				scaled_wealth = 6
				AND = {
					learning = 12
					scaled_wealth = 3
				}
			}
		}

		effect = {
			if = {
				limit = { learning = 12 }
				scaled_wealth = -3
			}
			if = {
				limit = { NOT = { learning = 12 } }
				scaled_wealth = -6
			}
			if = {
				limit = { NOT = { trait = brahmin } }
				piety = -200
			}
			
			prestige = 50
			add_trait = kshatriya
			any_spouse = {
				limit = {
					is_ruler = no
					liege = { character = ROOT }
					NOT = { trait = kshatriya }
				}
				add_trait = kshatriya
			}
			any_child = {
				limit = {
					is_ruler = no
					liege = { character = ROOT }
					NOT = { trait = kshatriya }
				}
				add_trait = kshatriya
			}
			hidden_tooltip = {
				top_liege = {
					any_realm_character = {
						limit = {
							religion = hindu
							is_adult = yes
							NOT = { character = ROOT }
							NOT = { trait = cynical }
						}
						opinion = {
							modifier = opinion_changed_caste
							who = ROOT
							years = 100
						}
					}
				}
			}
			if = {
				limit = {
					ai = no
				}
				chronicle = {
					entry = CHRONICLE_BECAME_KSHATRIYA
					picture = GFX_evt_emissary_indo_aryan_group
				}
			}
		}
		
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.5
			}
		}
	}
	
	become_vaishya = {
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			is_playable = yes
			is_adult = yes
			religion = hindu
			OR = {
				is_republic = yes
				is_merchant_republic = yes
			}
			has_dlc = "Rajas of India"
			NOT = { trait = vaishya }
		}
		
		allow = {
			OR = {
				trait = brahmin
				piety = 200
			}
			OR = {
				scaled_wealth = 6
				AND = {
					learning = 12
					scaled_wealth = 3
				}
			}
		}

		effect = {
			if = {
				limit = { learning = 12 }
				scaled_wealth = -3
			}
			if = {
				limit = { NOT = { learning = 12 } }
				scaled_wealth = -6
			}
			if = {
				limit = { NOT = { trait = brahmin } }
				piety = -200
			}
			
			prestige = 50
			add_trait = vaishya
			any_spouse = {
				limit = {
					is_ruler = no
					liege = { character = ROOT }
					NOT = { trait = vaishya }
				}
				add_trait = vaishya
			}
			any_child = {
				limit = {
					is_ruler = no
					liege = { character = ROOT }
					NOT = { trait = vaishya }
				}
				add_trait = vaishya
			}
			hidden_tooltip = {
				top_liege = {
					any_realm_character = {
						limit = {
							religion = hindu
							is_adult = yes
							NOT = { character = ROOT }
							NOT = { trait = cynical }
						}
						opinion = {
							modifier = opinion_changed_caste
							who = ROOT
							years = 100
						}
					}
				}
			}
			if = {
				limit = {
					ai = no
				}
				chronicle = {
					entry = CHRONICLE_BECAME_VAISHYA
					picture = GFX_evt_emissary_indo_aryan_group
				}
			}
		}
		
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.5
			}
		}
	}

	hold_diwali_feast_hindu = {
		only_playable = yes
		ai_check_interval = 4
		potential = {
			has_dlc = "Rajas of India"
			is_playable = yes
			is_adult = yes
			OR = {
				is_feudal = yes
				is_tribal = yes
				is_nomadic = yes
				is_republic = yes
			}
			prisoner = no
			religion = hindu
			NOT = { trait = incapable }
			NOT = { has_character_modifier = patron_kali }
			NOT = {
				has_character_modifier = holding_diwali_feast
			}
			NOT = {
				has_character_modifier = holding_kali_puja_feast
			}
			NOT = {
				has_character_modifier = large_feast_timer
			}
			NOT = {
				has_character_modifier = fabulous_feast
			}
			NOT = {
				has_character_flag = guest_diwali_feast_started
			}
			NOT = {
				liege = {
					has_character_modifier = holding_diwali_feast
					has_character_modifier = holding_kali_puja_feast
				}
			}
			num_of_vassals = 1
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			scaled_wealth = 0.2
			month = 9
			prestige = 100
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			scaled_wealth = -0.2
			add_character_modifier = {
				name = holding_diwali_feast
				duration = 365
			}
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			hidden_tooltip = { 
				character_event = { id = RoI.1000 } 
			}
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOT = {
					scaled_wealth = 2
				}
			}
			modifier = {
				factor = 0.5
				trait = shy
			}
			modifier = {
				factor = 0.5
				NOT = { diplomacy = 10 }
			}	
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}	
			modifier = {
				factor = 0
				NOT = { age = 30 }
			}			
		}
	}

	hold_diwali_feast_buddhist = {
		only_playable = yes
		ai_check_interval = 4
		potential = {
			has_dlc = "Rajas of India"
			is_playable = yes
			is_adult = yes
			OR = {
				is_feudal = yes
				is_tribal = yes
				is_nomadic = yes
				is_republic = yes
			}
			prisoner = no
			religion = buddhist
			NOT = { trait = incapable }
			NOT = {
				has_character_modifier = holding_diwali_feast
			}
			NOT = {
				has_character_modifier = holding_kali_puja_feast
			}
			NOT = {
				has_character_modifier = large_feast_timer
			}
			NOT = {
				has_character_modifier = fabulous_feast
			}
			NOT = {
				has_character_flag = guest_diwali_feast_started
			}
			NOT = {
				liege = {
					has_character_modifier = holding_diwali_feast
					has_character_modifier = holding_kali_puja_feast
				}
			}		
			num_of_vassals = 1
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			scaled_wealth = 0.2
			month = 9
			prestige = 100
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			scaled_wealth = -0.2
			add_character_modifier = {
				name = holding_diwali_feast
				duration = 365
			}
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			
			hidden_tooltip = { 
				character_event = { id = RoI.1000 }
			}
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				NOT = {
					scaled_wealth = 2
				}
			}
			modifier = {
				factor = 0.5
				trait = shy
			}
			modifier = {
				factor = 0.5
				NOT = { diplomacy = 10 }
			}	
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
			modifier = {
				factor = 0
				NOT = { age = 30 }
			}
		}
	}

	hold_diwali_feast_jain = {
		only_playable = yes
		ai_check_interval = 4
		potential = {
			has_dlc = "Rajas of India"
			is_playable = yes
			is_adult = yes
			OR = {
				is_feudal = yes
				is_tribal = yes
				is_nomadic = yes
				is_republic = yes
			}
			prisoner = no
			religion = jain
			NOT = { trait = incapable }
			NOT = {
				has_character_modifier = holding_diwali_feast
			}
			NOT = {
				has_character_modifier = holding_kali_puja_feast
			}
			NOT = {
				has_character_modifier = large_feast_timer
			}
			NOT = {
				has_character_modifier = fabulous_feast
			}
			NOT = {
				has_character_flag = guest_diwali_feast_started
			}
			NOT = {
				liege = {
					has_character_modifier = holding_diwali_feast
					has_character_modifier = holding_kali_puja_feast
				}
			}			
			num_of_vassals = 1
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			scaled_wealth = 0.2
			month = 9
			prestige = 100
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			scaled_wealth = -0.2
			add_character_modifier = {
				name = holding_diwali_feast
				duration = 365
			}
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			
			hidden_tooltip = { 
				character_event = { id = RoI.1000 } 
			}
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				NOT = {
					scaled_wealth = 2
				}
			}
			modifier = {
				factor = 0.5
				trait = shy
			}
			modifier = {
				factor = 0.5
				NOT = { diplomacy = 10 }
			}	
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
			modifier = {
				factor = 0
				NOT = { age = 30 }
			}
		}
	}

	hold_diwali_feast_kali_puja = {
		only_playable = yes
		ai_check_interval = 4
		potential = {
			has_dlc = "Rajas of India"
			is_playable = yes
			is_adult = yes
			OR = {
				is_feudal = yes
				is_tribal = yes
				is_nomadic = yes
				is_republic = yes
			}
			prisoner = no
			religion = hindu
			NOT = { trait = incapable }
			OR = {
				has_character_modifier = patron_kali
				capital_scope = {
					region = world_india_bengal
				}
			}
			NOT = {
				has_character_modifier = holding_diwali_feast
			}
			NOT = {
				has_character_modifier = holding_kali_puja_feast
			}
			NOT = {
				has_character_modifier = large_feast_timer
			}
			NOT = {
				has_character_modifier = fabulous_feast
			}
			NOT = {
				has_character_flag = guest_diwali_feast_started
			}
			NOT = {
				liege = {
					has_character_modifier = holding_diwali_feast
					has_character_modifier = holding_kali_puja_feast
				}
			}			
			num_of_vassals = 1
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			OR = {
				has_character_modifier = patron_kali
				capital_scope = {
					region = world_india_bengal
				}
			}
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			scaled_wealth = 0.2
			month = 9
			prestige = 100
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			scaled_wealth = -0.2
			add_character_modifier = {
				name = holding_kali_puja_feast
				duration = 365
			}
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			hidden_tooltip = { character_event = { id = RoI.1000 } }
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				NOT = {
					scaled_wealth = 2
				}
			}
			modifier = {
				factor = 0.5
				trait = shy
			}
			modifier = {
				factor = 0.5
				NOT = { diplomacy = 10 }
			}	
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
			modifier = {
				factor = 0
				NOT = { age = 30 }
			}		
		}
	}

	find_guru = {
		only_playable = yes
		ai_check_interval = 36
		potential = {
			OR = {
				has_dharmic_religion_trigger = yes
				religion = bon
				religion = bon_reformed
			}
			is_playable = yes
			is_adult = yes
			OR = {
				is_feudal = yes
				is_tribal = yes
				is_nomadic = yes
			}
			prisoner = no
			NOT = { has_character_flag = looking_for_guru }
			NOT = { has_character_flag = found_guru }
			NOT = {
				any_courtier = {
					has_minor_title = title_guru
				}
			}
		}
		allow = {
			prisoner = no
			wealth = 50
			prestige = 300
		}
		effect = {
			wealth = -50
			set_character_flag = looking_for_guru
			character_event = { id = RoI.3000 }
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				trait = cynical
			}
			modifier = {
				factor = 0
				NOT = { wealth = 200 }
			}
		}
	}
	
	hold_zun_feast = {
		only_playable = yes
		ai_check_interval = 6
		potential = {
			has_dlc = "Charlemagne"
			is_playable = yes
			is_adult = yes
			OR = {
				is_feudal = yes
				is_tribal = yes
				is_nomadic = yes
			}
			prisoner = no
			OR = {
				religion = zun_pagan
				religion = zun_pagan_reformed
			}
			NOT = { trait = incapable }
			num_of_vassals = 1
			NOT = {
				has_character_modifier = holding_zun_feast
			}
			NOT = {
				has_character_modifier = holding_diwali_feast
			}
			NOT = {
				has_character_modifier = holding_kali_puja_feast
			}
			NOT = {
				has_character_modifier = large_feast_timer
			}
			NOT = {
				has_character_modifier = fabulous_feast
			}
			NOT = {
				has_character_flag = guest_zun_feast_started
			}
			NOT = {
				liege = { has_character_modifier = holding_zun_feast }
			}
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			scaled_wealth = 0.2
			month = 3
			NOT = { month = 9 }
			prestige = 100
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			scaled_wealth = -0.2
			add_character_modifier = {
				name = holding_zun_feast
				duration = 365
			}
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			hidden_tooltip = { 
				character_event = { id = CM.4100 }
			}
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOT = {
					scaled_wealth = 2
				}
			}
			modifier = {
				factor = 0.5
				trait = shy
			}
			modifier = {
				factor = 0.5
				NOT = { diplomacy = 10 }
			}	
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}	
			modifier = {
				factor = 0
				NOT = { age = 30 }
			}			
		}
	}
	
	celebrate_bema = {
		only_playable = yes
		ai_check_interval = 2
		potential = {
			NOT = { is_inaccessible_trigger = yes }
			is_adult = yes
			prisoner = no
			religion = manichean
			NOT = { has_character_modifier = held_bema_timer }
			NOT = {	has_character_flag = holding_bema }
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			month = 1
			NOT = { month = 3 }
			wealth = 50
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			wealth = -50
			set_character_flag = holding_bema
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			hidden_tooltip = { character_event = { id = 39818 days = 150 } } # Safety catch flag clearing
			hidden_tooltip = { 
				character_event = { id = 39812 } 
			}
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				NOT = {
					wealth = 300
				}
			}
			modifier = {
				factor = 0
				trait = shy
			}
			modifier = {
				factor = 0
				NOT = { diplomacy = 10 }
			}	
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
		}
	}
	
	celebrate_jashan_e_sadah = {
		only_playable = yes
		ai_check_interval = 2
		potential = {
			OR = {
				religion = zoroastrian
				religion = khurmazta
			}
			NOR = {
				has_character_modifier = held_sadah_feast_timer
				has_character_modifier = jd_held_sadah_timer
				liege = { has_character_flag = holding_sadah_feast }
				has_character_flag = holding_sadah_feast
				has_character_flag = planning_sadah_feast
			}
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
		}
		allow = {
			war = no
			custom_tooltip = {
				text = UNOCCUPIED_DEMESNE_TITLE
				hidden_tooltip = {
					any_demesne_title = {
						NOT = { higher_tier_than = count }
						is_occupied = no
					}
				}
			}
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			wealth = 50
			prestige = 100
			has_regent = no
			month = 8
			not = { month = 10 }
		}
		effect = {
			wealth = -50
			#set_character_flag = planning_sadah_feast #Unneeded, just use the timer
			custom_tooltip = {
				text = prepare_sadah_feast
				hidden_tooltip = { 
					character_event = { id = 39820 } 
					add_character_modifier = { name = held_sadah_feast_timer hidden = yes years = 5 } 
				}
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOT = {
					wealth = 300
				}
			}
			modifier = {
				factor = 0
				trait = shy
			}
			modifier = {
				factor = 0
				NOT = { diplomacy = 10 }
			}
		}
	}
	
	# Sky burial
	sky_burial_decision = {
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 12
		potential = {
			is_playable = yes
			has_character_flag = sky_burial
			NOT = { has_character_flag = performed_sky_burial }
			OR = {
				religion_group = zoroastrian_group
				religion = bon
				religion = bon_reformed
				any_owned_bloodline = {
					has_bloodline_flag = bloodline_sky_burial
				}
				AND = {
					government = nomadic_government
					OR = {
						religion = tengri_pagan
						religion = tengri_pagan_reformed
						has_dharmic_religion_trigger = yes
					}
				}
			}
		}
		allow = {
			is_adult = yes
			in_command = no
			prisoner = no
			NOT = { trait = incapable }
			NOT = { trait = infirm }
			NOT = { is_inaccessible_trigger = yes }
			NOT = { has_character_flag = do_not_disturb }
		}
		effect = {
			custom_tooltip = { text = sky_burial_custom_tooltip }
			hidden_tooltip = {
				character_event = { id = HLF.8005 }
				clr_character_flag = sky_burial
				set_character_flag = performed_sky_burial
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.5
			}
		}
	}

	# Choose Warhorse (Nomad)
	choose_warhorse_nomad = {
		only_playable = yes
		ai_check_interval = 12
		potential = {
			is_playable = yes
			is_nomadic = yes
			NOT = { has_character_modifier = nomad_warhorse }
		}
		allow = {
			is_adult = yes
			prisoner = no
			NOT = { trait = incapable }
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
			wealth = 20
		}
		effect = {
			wealth = -20
			custom_tooltip = { text = nomad_acquires_warhorse_tooltip }
			hidden_tooltip = { long_character_event = { id = HL.6000 } } # Select and name horse
			hidden_tooltip = { character_event = { id = HL.6500 days = 3500 random = 2000 } } # Horse dies
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0.1
			modifier = {
				factor = 0
				NOT = { wealth = 200 }
			}
		}
	}
	
	destroy_artifact = {
		only_playable = yes
		ai = no
		hide_in_decisions_list = yes
		potential = {
			FROM = {
				owner = {
					character = ROOT
				}
			}
		}
		allow = {
			FROM = {
				show_scope_change = no
				is_indestructible = no 
				custom_tooltip = { text = tooltip_considering_artifact_donation NOT = { has_artifact_flag = flag_considering_donation } } 
			}
		}
		effect = {
			FROM = {
				destroy_artifact = yes
			}
		}
	}
	rename_artifact = {
		only_playable = yes
		ai = no
		hide_in_decisions_list = yes
		potential = {
			has_dlc = "Holy Fury"
			FROM = {
				owner = {
					character = ROOT
				}
			}
		}
		allow = {
		}
		effect = {
			FROM = {
				prompt_name = {
					player = ROOT
					type = RENAME_ARTIFACT_MESSAGE
				}
			}
		}
	}
	
	rename_wonder = {
		only_playable = yes
		ai = no
		hide_in_decisions_list = yes
		potential = {
			FROM = {
				wonder_owner = {
					character = ROOT
				}
			}
		}
		allow = {
		}
		effect = {
			FROM = {
				prompt_name = {
					player = ROOT
					type = RENAME_WONDER_MESSAGE
				}
			}
		}
	}
	ggsm_hold_magdalene_feast = {
		only_playable = yes
		ai_check_interval = 12

		potential = {
			is_playable = yes
			ggsm_order_member_trigger = yes
			ggsm_adult_catholic_woman_trigger = yes
			month = 10
			OR = {
				is_feudal = yes
				is_tribal = yes
				is_nomadic = yes
			}
			prisoner = no
			num_of_vassals = 1
			NOT = { has_character_flag = ggsm_magdalene_feast_in_progress }
			NOT = { has_character_flag = ggsm_magdalene_feast_cooldown }
		}

		allow = {
			war = no
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			in_command = no
			month = 10
			prestige = 100
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}

		effect = {
			export_to_variable = {
				which = ggsm_magdalene_feast_grace_cost
				value = society_currency
			}

			multiply_variable = {
				which = ggsm_magdalene_feast_grace_cost
				value = -0.10
			}

			set_character_flag = ggsm_magdalene_feast_in_progress
			set_character_flag = ggsm_magdalene_feast_cooldown
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb

			hidden_tooltip = {
				long_character_event = { id = ggsmfest.1 }
				long_character_event = { id = ggsmfest.90 days = 730 }
				long_character_event = { id = ggsmfest.92 days = 30 }
			}

			if = {
				limit = { has_dlc = "Reapers" }
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}

		revoke_allowed = { always = no }

		ai_will_do = {
			factor = 1
			modifier = { factor = 1.5 trait = gregarious }
			modifier = { factor = 1.5 trait = charitable }
			modifier = { factor = 1.5 trait = nymphomaniac }
			modifier = { factor = 1.5 trait = seductress }
			modifier = {
				factor = 1.5
				OR = {
					trait = cheap_whore
					trait = experienced_whore
					trait = exclusive_whore
				}
			}
			modifier = { factor = 1.25 society_rank >= 3 }
			modifier = { factor = 1.25 society_rank >= 4 }
			modifier = { factor = 0.5 trait = shy }
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
		}
	}

	ggsm_hold_magdalene_summer_fair = {
		only_playable = yes
		ai_check_interval = 3

		potential = {
			is_playable = yes
			ggsm_order_member_trigger = yes
			ggsm_adult_catholic_woman_trigger = yes
			month = 4
			NOT = { month = 7 }
			prisoner = no
			num_of_vassals = 1
			NOT = { has_character_flag = ggsm_magdalene_fair_in_progress }
			NOT = { has_character_flag = ggsm_magdalene_fair_cooldown }
		}

		allow = {
			war = no
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			in_command = no
			month = 4
			NOT = { month = 7 }
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}

		effect = {
			export_to_variable = {
				which = ggsm_magdalene_fair_grace_cost
				value = society_currency
			}

			multiply_variable = {
				which = ggsm_magdalene_fair_grace_cost
				value = -0.15
			}

			set_character_flag = ggsm_magdalene_fair_in_progress
			set_character_flag = ggsm_magdalene_fair_cooldown
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb

			hidden_tooltip = {
				long_character_event = { id = ggsmfest.20 }
				long_character_event = { id = ggsmfest.91 days = 730 }
				long_character_event = { id = ggsmfest.93 days = 30 }
			}

			if = {
				limit = { has_dlc = "Reapers" }
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 10 }
						}
					}
				}
			}
		}

		revoke_allowed = { always = no }

		ai_will_do = {
			factor = 1
			modifier = { factor = 1.5 trait = gregarious }
			modifier = { factor = 1.5 trait = charitable }
			modifier = { factor = 2 trait = exhibitionist }
			modifier = { factor = 1.5 trait = nymphomaniac }
			modifier = { factor = 1.5 trait = seductress }
			modifier = {
				factor = 1.5
				OR = {
					trait = cheap_whore
					trait = experienced_whore
					trait = exclusive_whore
				}
			}
			modifier = { factor = 1.25 society_rank >= 3 }
			modifier = { factor = 1.25 society_rank >= 4 }
			modifier = { factor = 0.5 trait = shy }
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
		}
	}
}
