decisions = {
	
	z_FranceIsSonOfCatholic = {
		ai = no
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 8
		potential = {			
			NOT = { has_global_flag = FranceIsSonOfCatholic_flag }			
		}
		allow = {
			#religion_group = christian
			OR = {
				has_landed_title = k_france
				#has_landed_title = e_france
				AND = {
					culture = frankish
					higher_real_tier_than = duke
					k_france = { has_holder = no }
				}				
			}			
		}
		effect = {
			set_global_flag = FranceIsSonOfCatholic_flag
			religion = frtholic_OLD
			add_artifact = Sword_Joyeuse
			activate_title = { title = k_french_religions_head status = yes }
			primary_title = {
				show_scope_change = no
				k_french_religions_head = {
					show_scope_change = no
					grant_title = ROOT
					copy_title_laws = PREV
					copy_title_history = PREV
			  }
			}			
			hidden_tooltip = {
				any_title = {
				show_scope_change = no
				limit = {
						real_tier = duke			
						de_jure_liege = k_france						
				}
				de_jure_liege = k_french_religions_head
			  }
			}
			k_france = {
				activate_title = { title = THIS status = no }
				destroy_landed_title = THIS
			}			
			hidden_tooltip = {
				if = {
					limit = {
						has_game_started = yes
					}
				frtholic_OLD = {
				c_ile_de_france = { set_holy_site  = frtholic_OLD }
				c_orleans = { set_holy_site  = frtholic_OLD }
				c_sens = { set_holy_site  = frtholic_OLD }
				c_senlis = { set_holy_site  = frtholic_OLD }
				b_reims = { set_holy_site  = frtholic_OLD }
				#add_god_name = THE_FRENCH_KING_NAME
			}
			  frtholic = {
				c_ile_de_france = { set_holy_site  = frtholic }
				c_orleans = { set_holy_site  = frtholic }
				c_sens = { set_holy_site  = frtholic }
				c_senlis = { set_holy_site  = frtholic }
				b_reims = { set_holy_site  = frtholic }
			  }
				}			
			}
			hidden_tooltip = {
				catholic = {
					add_intermarry = frtholic
					add_intermarry = frtholic_OLD
				}
				orthodox = {
					add_intermarry = frtholic
					add_intermarry = frtholic_OLD
				}
				miaphysite = {
					add_intermarry = frtholic
					add_intermarry = frtholic_OLD
				}
				nestorian = {
					add_intermarry = frtholic
					add_intermarry = frtholic_OLD
				}
				cathar = {
					add_intermarry = frtholic
					add_intermarry = frtholic_OLD
				}
				fraticelli = {
					add_intermarry = frtholic
					add_intermarry = frtholic_OLD
				}
				waldensian = {
					add_intermarry = frtholic
					add_intermarry = frtholic_OLD
				}
				lollard = {
					add_intermarry = frtholic
					add_intermarry = frtholic_OLD
				}
				monophysite = {
					add_intermarry = frtholic
					add_intermarry = frtholic_OLD
				}
				bogomilist = {
					add_intermarry = frtholic
					add_intermarry = frtholic_OLD
				}
				monothelite = {
					add_intermarry = frtholic
					add_intermarry = frtholic_OLD
				}
				iconoclast = {
					add_intermarry = frtholic
					add_intermarry = frtholic_OLD
				}
				paulician = {
					add_intermarry = frtholic
					add_intermarry = frtholic_OLD
				}
				messalian = {
					add_intermarry = frtholic
					add_intermarry = frtholic_OLD
				}				
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
	
	z_MyChevalier = {
		ai = no
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 8
		potential = {			
			NOT = { has_global_flag = MyChevalier_flag }			
		}
		allow = {
			OR = {
				#religion = catholic
				religion = frtholic
				religion = frtholic_OLD
			}	
			has_landed_title = k_french_religions_head
			OR = {
				has_law = law_voting_power_0
				has_landed_title = e_france
			}						
		}
		effect = {
			set_global_flag = MyChevalier_flag			
			activate_title = { title = d_france_gendarmes status = yes }
			#d_france_gendarmes = { show_scope_change = no grant_title = ROOT }
			#activate_title = { title = d_france_swiss_guard status = yes }
			#activate_title = { title = d_france_musketeer status = yes }			
			#activate_title = { title = d_france_foreign_legion status = yes }		
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = ROOT
						culture = ROOT
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_france_gendarmes = {
						grant_title = PREV
						de_jure_liege = k_french_religions_head
					}
					set_defacto_liege = ROOT
				}
			}							
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
	
	z_IamFranceKing = {
		ai = no
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 8
		potential = {
			NOT = { has_global_flag = IamFranceKing_flag }
			#e_french_religions_head = { is_active = no }			
		}
		allow = {
			OR = {
				#religion = catholic
				religion = frtholic
				religion = frtholic_OLD
			}	
			has_landed_title = k_french_religions_head			
			has_law = law_voting_power_0
			OR = {
				has_landed_title = e_france
				has_law = ze_administration_laws_1
				has_law = ze_administration_laws_2
			}
		}
		effect = {
			set_global_flag = IamFranceKing_flag		
			activate_title = { title = e_french_religions_head status = yes }
			primary_title = {
				show_scope_change = no
				e_french_religions_head = {
					show_scope_change = no
					grant_title = ROOT
					copy_title_laws = k_french_religions_head
					copy_title_history = k_french_religions_head
					#add_law = { law = succ_franceabsoluteimperial cooldown = no opinion_effect = no }
			  }
			}			
			k_french_religions_head = {
				show_scope_change = no
				de_jure_liege = e_french_religions_head
				#add_law = { law = succ_franceabsoluteimperial cooldown = no opinion_effect = no }
			}
			#set_government_type = france_absolute_imperial_government
			custom_tooltip = {
				text = tooltip_AllFranceIWant
			hidden_tooltip = {
				any_title = {
				show_scope_change = no
				limit = {
						real_tier = duke						
						holy_order = no
						mercenary = no
						OR = {
							region = world_europe_west_francia
							de_jure_liege = k_lotharingia
							de_jure_liege = k_burgundy
							title = d_corsica
						}						
				}
				de_jure_liege = k_french_religions_head
			  }
			}	
			}					
			any_demesne_title = {
				show_scope_change = no
				limit = { 
					tier = KING					
				}
				de_jure_liege = e_french_religions_head
			}
			any_demesne_title = {
				show_scope_change = no
					if = {
						limit = { 
							tier = EMPEROR							
						}
						any_direct_de_jure_vassal_title = {
							de_jure_liege = e_french_religions_head
						}
					}
			}
			any_demesne_title = {
				show_scope_change = no
				limit = {					
					OR = {
						tier = KING
						AND = {
							tier = EMPEROR							
						}
					}
					NOT = { title = k_french_religions_head }
					NOT = {	title = e_french_religions_head }
				}
				activate_title = { title = THIS status = no }
				destroy_landed_title = THIS
			}			
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
	
	z_FoundFrenchChurch = {
		ai = no
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 8
		potential = {			
			NOT = { has_global_flag = FoundFrenchChurch_flag }					
		}
		allow = {			
			has_landed_title = k_french_religions_head
			has_landed_title = e_french_religions_head
			religion = frtholic
			has_religion_feature = religion_FrtholicLeadership
			custom_tooltip = {
				text = z_IamFranceKing
				has_global_flag = IamFranceKing_flag				
			}
			OR = {
				AND = {
					k_papacy = { has_holder = no }
					c_roma = { owner = { character = ROOT } }
				}				
				k_papal_state = {
					owner = {
						OR = {
							liege = { character = ROOT }
							AND = {
								host = { character = ROOT }
								prisoner = yes								
							}
						}						
					}
				}				
			}	
		}
		effect = {
			set_global_flag = FoundFrenchChurch_flag
			add_artifact = crown_frtholic
			k_french_religions_head = { add_law = { law = succ_franceabsoluteimperial cooldown = no opinion_effect = no } }
			e_french_religions_head = {				
				add_law = { law = succ_franceabsoluteimperial cooldown = no opinion_effect = no } 
			}
			add_law = { law = autocratic_falv_4 cooldown = no opinion_effect = no }
			set_government_type = france_absolute_imperial_government
			frtholic = {
				set_can_call_crusade = yes
				set_religion_head = d_frtholic_head
				set_parent_religion = { religion = frtholic parent = catholic }		
			}			
			activate_title = { title = d_frtholic_head status = yes }			
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = ROOT
						culture = ROOT
						dynasty = NONE
						female = no
						age = 36
						trait = master_of_flame
				}				
				new_character = {		
					d_frtholic_head = {
						grant_title = PREV
						de_jure_liege = k_french_religions_head
					}
					set_defacto_liege = ROOT
					religion_authority = { modifier = francereligionstart_authority years = 100 }
				}
			}
			custom_tooltip = {
				text = tooltip_religionchangefrtholic
				any_realm_province = {
				limit = { religion = catholic }
				religion = frtholic
			  }			
			}
			custom_tooltip = {
				text = tooltip_christiancrusadesunlocked
			hidden_tooltip = {
			set_global_flag = christian_crusades_unlocked
			activate_title = { title = d_knights_templar status = yes }			
			activate_title = { title = d_knights_hospitaler status = yes }			
			activate_title = { title = d_teutonic_order status = yes }	
			activate_title = { title = d_knights_calatrava status = yes }			
			activate_title = { title = d_knights_santiago status = yes }					
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = catholic
						#culture = ROOT
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_knights_templar = {
						grant_title = PREV						
					}					
				}
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = catholic
						#culture = ROOT
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_knights_hospitaler = {
						grant_title = PREV						
					}					
				}
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = catholic
						#culture = ROOT
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_teutonic_order = {
						grant_title = PREV						
					}					
				}
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = catholic
						#culture = ROOT
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_knights_calatrava = {
						grant_title = PREV						
					}					
				}
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = catholic
						#culture = ROOT
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_knights_santiago = {
						grant_title = PREV						
					}					
				}
			}
			}				
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}	
	
	z_France_SchismCatholic = {
		ai = no
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 8		
		potential = {			
			NOT = { has_global_flag = France_SchismCatholic_flag }
			#NOT = { has_global_flag = Common_SchismCatholic_flag }
			NOT = { has_global_flag = schism_mended }					
		}
		allow = {
			has_landed_title = k_french_religions_head
			has_landed_title = e_french_religions_head
			religion = frtholic
			has_religion_feature = religion_FrtholicLeadership			
			custom_tooltip = {
				text = z_IamFranceKing
				has_global_flag = IamFranceKing_flag				
			}
			custom_tooltip = {
				text = z_FoundFrenchChurch
				has_global_flag = FoundFrenchChurch_flag				
			}			
			OR = {
				AND = {
					realm_size = 180
					OR = {
						e_hre = { has_holder = no }
						k_papacy = { has_holder = no }
					}					
				}				
				catholic = {
					is_heretic = yes
				}				
			}
			k_catholic_head = { has_holder = no }
		}
		effect = {
			set_global_flag = France_SchismCatholic_flag						
			religion_authority = { modifier = francereligionSchism_authority years = 100 }
			#set_parent_religion = { religion = catholic parent = frtholic }
			frtholic = { 					
				set_autocephaly = no
				#set_can_call_crusade = yes
				set_religion_head = k_french_religions_head
				set_high_god_name = THE_FRENCH_KING_NAME
			}
			d_frtholic_head = {
				activate_title = { title = THIS status = no }
				destroy_landed_title = THIS
			}
			catholic = {
				set_religion_head = none
				set_can_have_antipopes = no
				set_autocephaly = yes
				hidden_tooltip = {
					k_papal_state = { owner = { religion_authority = { modifier = francereligionSchismCatholic_authority years = 100 } } } 
				}				
			}
			if = {
				limit = { is_female = yes }
        create_bloodline = { type = frtholicfrancefound inheritance = matrilineal }
      }
      else = {
        create_bloodline = { type = frtholicfrancefound }
      }
			orthodox = { 
				set_can_call_crusade = yes
				set_autocephaly = no
			}			
			custom_tooltip = {
			text = tooltip_EasternOrthodoxUnion
			set_parent_religion = { religion = miaphysite parent = orthodox }
			set_parent_religion = { religion = monophysite parent = orthodox }
			set_parent_religion = { religion = nestorian parent = orthodox }
			set_parent_religion = { religion = messalian parent = orthodox }					
			activate_title = { title = d_holy_sepulchre status = yes }
			activate_title = { title = d_saint_anthony status = yes }
			activate_title = { title = d_saint_addai status = yes }
			hidden_tooltip = {
			d_holy_sepulchre = {
				religion = orthodox
				holder_scope = {
					religion = orthodox
				}
			}
			d_saint_anthony = {
				religion = orthodox
				holder_scope = {
					religion = orthodox
				}
			}
			d_saint_addai = {
				religion = orthodox
				holder_scope = {
					religion = orthodox
				}
			}						
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = orthodox
						culture = greek
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_holy_sepulchre = {
						grant_title = PREV						
					}					
				}
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = orthodox
						culture = greek
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_saint_anthony = {
						grant_title = PREV						
					}					
				}
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = orthodox
						culture = greek
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_saint_addai = {
						grant_title = PREV						
					}					
				}
			}			
			if = {
				limit = { 
					e_byzantium = { has_holder = no } 
					e_roman_empire = { has_holder = no }					
					k_orthodox = { has_holder = yes }
				}				
				k_orthodox = { owner = { character_event	= { id = FRC.2 } } }					
			}
			else_if = {
				limit = {
					e_byzantium = {
						owner = {
							ai = yes
						}
					}
				}
				e_byzantium = {
					owner = {
						character_event	= { id = FRC.1 }
					}
				}
			}
			else_if = {
				limit = {
					e_roman_empire = {
						owner = {
							ai = yes
						}
					}
				}
				e_roman_empire = {
					owner = {
						character_event	= { id = FRC.1 }
					}
				}
			}				
			}				
			custom_tooltip = {
			text = tooltip_Ihavecatholicholyorder
			hidden_tooltip = {
			d_knights_templar = {
				religion = frtholic
				holder_scope = {
					religion = frtholic
				}
			}
			d_knights_hospitaler = {
				religion = frtholic
				holder_scope = {
					religion = frtholic
				}
			}
			d_teutonic_order = {
				religion = frtholic
				holder_scope = {
					religion = frtholic
				}
			}
			d_knights_calatrava = {
				religion = frtholic
				holder_scope = {
					religion = frtholic
				}
			}
			d_knights_santiago = {
				religion = frtholic
				holder_scope = {
					religion = frtholic
				}
			}				
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = ROOT
						culture = frankish
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_knights_templar = {
						grant_title = PREV
						de_jure_liege = k_french_religions_head
					}
					set_defacto_liege = ROOT
				}
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = ROOT
						culture = frankish
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_knights_hospitaler = {
						grant_title = PREV
						de_jure_liege = k_french_religions_head
					}
					set_defacto_liege = ROOT
				}
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = ROOT
						culture = frankish
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_teutonic_order = {
						grant_title = PREV
						de_jure_liege = k_french_religions_head
					}
					set_defacto_liege = ROOT
				}
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = ROOT
						culture = frankish
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_knights_calatrava = {
						grant_title = PREV
						de_jure_liege = k_french_religions_head
					}
					set_defacto_liege = ROOT
				}
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = ROOT
						culture = frankish
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_knights_santiago = {
						grant_title = PREV
						de_jure_liege = k_french_religions_head
					}
					set_defacto_liege = ROOT
				}
			}			
			}	       
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
	
	z_Common_SchismCatholic = {
		#ai = no
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 8	
		potential = {
			#NOT = { has_global_flag = France_SchismCatholic_flag }
			NOT = { has_global_flag = Common_SchismCatholic_flag }
			NOT = { has_global_flag = schism_mended }					
		}
		allow = {
			religion = catholic
			has_landed_title = e_hre
			k_papal_state = { owner = { controls_religion = yes } }
			OR = {
				AND = {
				c_roma = { owner = { character = ROOT } }
				k_papacy = { has_holder = no }
				k_papal_state = {
					owner = {						
						liege = { character = ROOT }						
						host = { character = ROOT }
						prisoner = yes
					}
				}				
			  }
			  AND = {
			  	#ai = yes
			  	custom_tooltip = {
			  		text = tooltip_Iamcharlemagnehavecoronation
			  		has_character_flag = charlemagne_coronation
			  	}			  	
			  }
			}			
		}
		effect = {
			set_global_flag = Common_SchismCatholic_flag
			add_artifact = crown_frtholic_hre	
			activate_title = { title = k_catholic_head status = yes }	
			k_catholic_head = {
				show_scope_change = no
				grant_title = ROOT
				copy_title_laws = e_hre				
				add_law = { law = succ_franceabsoluteimperial cooldown = no opinion_effect = no }				 
			}
			e_hre = {				
				add_law = { law = succ_franceabsoluteimperial cooldown = no opinion_effect = no }
			}
			add_law = { law = autocratic_falv_4 cooldown = no opinion_effect = no }
			set_government_type = france_absolute_imperial_government
			catholic = {
				#set_high_god_name = e_hre				
				#set_autocephaly = no
				set_can_have_antipopes = no
				set_religion_head = k_catholic_head
			}
			d_papal_guards = {
				owner = { set_defacto_liege = ROOT }
				de_jure_liege = k_catholic_head				
			}
			custom_tooltip = {
				text = tooltip_Ihavecatholicholyorder
			}
			custom_tooltip = {
				text = tooltip_christiancrusadesunlocked
			set_global_flag = christian_crusades_unlocked
			activate_title = { title = d_knights_templar status = yes }			
			activate_title = { title = d_knights_hospitaler status = yes }			
			activate_title = { title = d_teutonic_order status = yes }	
			activate_title = { title = d_knights_calatrava status = yes }			
			activate_title = { title = d_knights_santiago status = yes }			
			}			
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = ROOT
						culture = ROOT
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_knights_templar = {
						grant_title = PREV
						de_jure_liege = k_catholic_head
					}
					set_defacto_liege = ROOT
				}
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = ROOT
						culture = ROOT
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_knights_hospitaler = {
						grant_title = PREV
						de_jure_liege = k_catholic_head
					}
					set_defacto_liege = ROOT
				}
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = ROOT
						culture = ROOT
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_teutonic_order = {
						grant_title = PREV
						de_jure_liege = k_catholic_head
					}
					set_defacto_liege = ROOT
				}
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = ROOT
						culture = ROOT
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_knights_calatrava = {
						grant_title = PREV
						de_jure_liege = k_catholic_head
					}
					set_defacto_liege = ROOT
				}
			}
			hidden_tooltip = {
				create_character = {
						random_traits = yes
						religion = ROOT
						culture = ROOT
						dynasty = NONE
						female = no
						age = 36
						trait = skilled_tactician
				}				
				new_character = {					
					d_knights_santiago = {
						grant_title = PREV
						de_jure_liege = k_catholic_head
					}
					set_defacto_liege = ROOT
				}
			}
			if = {
				limit = { is_female = yes }
        create_bloodline = { type = frtholichrefound inheritance = matrilineal }
      }
      else = {
        create_bloodline = { type = frtholichrefound }
      }
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
		}
	}	
	
}