namespace = CIML

character_event = {
	id = CIML.311
	title = EVTNAMECIML.311
	desc = EVTDESCCIML.311

	picture = GFX_evt_child_reading
	
	only_playable = yes
	min_age = 9
	max_age = 14
	only_capable = yes
	
	trigger = {
		prisoner = no
		in_seclusion = no
		OR = {
			religion = catholic
			religion = fraticelli
			religion = chaldean
			religion = adoptionist
		}
		NOT = {
			has_character_modifier = first_communion
		}
		NOT = {
			has_character_modifier = confirmation_sacrament
		}
	}
	
	mean_time_to_happen = {	months = 6 }
	
	option = {
		name = EVTOPTACIML.311
		change_learning = 1
		piety = 10
	}

	option = {
		name = EVTOPTBCIML.311
		piety = 5
		random = { 
			chance = 50  
			change_diplomacy = 1
		}
	}

	option = {
		name = EVTOPTCCIML.311
		random = { 
			chance = 20  
			change_martial = 1
		}
	}

	after = {
		character_event = { id = CIML.312 days = 20 }
		add_character_modifier = { 
			name = first_communion
			years = 7 
		}
	}
}

character_event = {
	id = CIML.312
	title = EVTNAMECIML.312
	desc = EVTDESCCIML.312

	picture = GFX_evt_child_reading
	
	is_triggered_only = yes

	option = {
		name = EVTOPTACIML.312
		piety = 5
		if = { 
			limit = { 
				has_secret_religion = yes
			} 
			random = { 
				chance = 20  
				clear_secret_religion = yes
			}
		}
	}

	option = {
		name = EVTOPTBCIML.312
		prestige = 5
		}

	after = {
    character_event = { id = CIML.313 days = 20 }
	}
}

character_event = {
	id = CIML.313
	title = EVTNAMECIML.313
	desc = EVTDESCCIML.313

	picture = GFX_evt_pope
	
	is_triggered_only = yes

	option = {
		name = EVTOPTACIML.313
		piety = 10
	}

	option = {
		name = EVTOPTBCIML.313
		piety = 5
		prestige = 5
		}

	option = {
		name = EVTOPTCCIML.313
		piety = -5
		prestige = 10
	}

	after = {
    
	}
}

# Confirmation men

character_event = {
	id = CIML.321
	title = EVTNAMECIML.321
	desc = EVTDESCCIML.321

	picture = GFX_evt_stone_church
	
	only_playable = yes
	min_age = 14
	max_age = 17
	only_capable = yes
	only_men = yes
	
	trigger = {
		prisoner = no
		in_seclusion = no
		OR = {
			religion = catholic
			religion = fraticelli
			trait = utraquist
			religion = adoptionist
		}
		NOT = {
			has_character_modifier = confirmation_sacrament
		}
	}
	
	mean_time_to_happen = {	months = 6 }
	
	option = {
		name = EVTOPTACIML.321
		piety = 15
		random = { 
			chance = 20  
			change_learning = 1
		}
	}

	option = {
		name = EVTOPTBCIML.321
		piety = 5
		random = { 
			chance = 40  
			change_learning = 1
		}
	}

	option = {
		name = EVTOPTCCIML.321
		random = { 
			chance = 10  
			change_intrigue = 1
		}
	}
	
	option = {
		name = EVTOPTDCIML.321
		tooltip_info = learning
		trigger = {
				learning = 6
		}
		prestige = 50
		random = { 
			chance = 20  
			change_learning = 1
		}
	}

	after = {
		character_event = { id = CIML.322 days = 20 }
		add_character_modifier = { 
			name = confirmation_sacrament
			years = 5 
		}
	}
}

character_event = {
	id = CIML.322
	title = EVTNAMECIML.322
	desc = EVTDESCCIML.322

	picture = GFX_evt_relic_box
	
	is_triggered_only = yes

	option = {
		name = EVTOPTACIML.322
		random = { 
			chance = 50  
			change_martial = 1
		}
	}

	option = {
		name = EVTOPTBCIML.322
		random = { 
			chance = 50  
			change_diplomacy = 1
		}
	}
	
	option = {
		name = EVTOPTCCIML.322
		random = { 
			chance = 50  
			change_stewardship = 1
		}
	}
	
	option = {
		name = EVTOPTDCIML.322
		change_learning = 1
	}

	after = {
    character_event = { id = CIML.323 days = 20 }
	}
}

character_event = {
	id = CIML.323
	title = EVTNAMECIML.323
	desc = EVTDESCCIML.323

	picture = GFX_evt_pope
	
	is_triggered_only = yes

	option = {
		name = EVTOPTACIML.323
		piety = 10
	}

	after = {
	}
}

# Confirmation women

character_event = {
	id = CIML.331
	title = EVTNAMECIML.331
	desc = EVTDESCCIML.331

	picture = GFX_evt_woman_praying_hf
	
	only_playable = yes
	min_age = 14
	max_age = 17
	only_capable = yes
	only_women = yes
	
	trigger = {
		prisoner = no
		in_seclusion = no
		OR = {
			religion = catholic
			religion = fraticelli
			trait = utraquist
			religion = adoptionist
		}
		NOT = {
			has_character_modifier = confirmation_sacrament
		}
	}
	
	mean_time_to_happen = {	months = 6 }
	
	option = {
		name = EVTOPTACIML.331
				piety = 15
		random = { 
			chance = 20  
			change_learning = 1
		}
	}

	option = {
		name = EVTOPTBCIML.331
		piety = 5
		random = { 
			chance = 40  
			change_learning = 1
		}
	}

	option = {
		name = EVTOPTCCIML.331
		random = { 
			chance = 10  
			change_intrigue = 1
		}
	}
	
	option = {
		name = EVTOPTDCIML.331
		tooltip_info = learning
		trigger = {
				learning = 6
		}
		prestige = 50
		random = { 
			chance = 20  
			change_learning = 1
		}
	}

	after = {
		character_event = { id = CIML.332 days = 20 }
		add_character_modifier = { 
			name = confirmation_sacrament
			years = 5 
		}
	}
}

character_event = {
	id = CIML.332
	title = EVTNAMECIML.332
	desc = EVTDESCCIML.332

	picture = GFX_evt_virgin_mary_icon
	
	is_triggered_only = yes

	option = {
		name = EVTOPTACIML.332
		random = { 
			chance = 50  
			change_martial = 1
		}
	}

	option = {
		name = EVTOPTBCIML.332
		random = { 
			chance = 50  
			change_diplomacy = 1
		}
	}
	
	option = {
		name = EVTOPTCCIML.332
		random = { 
			chance = 50  
			change_stewardship = 1
		}
	}
	
	option = {
		name = EVTOPTDCIML.332
		change_learning = 1
	}

	after = {
    character_event = { id = CIML.333 days = 20 }
	}
}

character_event = {
	id = CIML.333
	title = EVTNAMECIML.333
	desc = EVTDESCCIML.333

	picture = GFX_evt_pope
	
	is_triggered_only = yes

	option = {
		name = EVTOPTACIML.333
		piety = 10
	}

	after = {
	}
}

# Bedtime story
character_event = {
	id = CIML.700
	title = EVTNAMECIML.700
	desc = EVTDESCCIML.700

	picture = GFX_evt_moonlit_mountains_hf
	
	only_playable = yes
	only_capable = yes
	
	trigger = {
		religion_group = christian
		prisoner = no
		in_seclusion = no
		learning = 8
		has_children = yes
		any_child = {
			AND = {
				age = 5
				NOT = {
					age = 13
				}
			}
		}
		NOR = {
			religion = bogomilist
			religion = paulician
			religion = messalian
			religion = mandean
			religion = cathar
			trait = possessed
			trait = dull
			trait = lunatic
			trait = slothful
			trait = cruel
			trait = cynical
			trait = travelling
			society_is_devil_worshiper = yes
		}
		NOT = {
			has_character_flag = ciml_bedtime_story
		}
	}
	
	mean_time_to_happen = {	months = 60 }

	option = {
		name = EVTOPTACIML.700
		random_child = {
			limit = {
				age = 5
				NOT = {
					age = 13
				}
			}
			random = { 
				chance = 5
				change_learning = 1
				change_diplomacy = 1
			}
			opinion = {
				who = ROOT
				modifier = opinion_family_love
			}
		}
	}
	
	option = {
		name = EVTOPTBCIML.700
		random_child = {
			limit = {
				age = 5
				NOT = {
					age = 13
				}
			}
			random = { 
				chance = 5
				change_learning = 1
				change_martial = 1
			}
			opinion = {
				who = ROOT
				modifier = opinion_family_love
			}
		}
	}
	
	option = {
		name = EVTOPTCCIML.700
		random_child = {
			limit = {
				age = 5
				NOT = {
					age = 13
				}
			}
			random = { 
				chance = 5
				change_learning = 1
				change_intrigue = 1
			}
			opinion = {
				who = ROOT
				modifier = opinion_family_love
			}
		}
	}
	
	option = {
		name = EVTOPTDCIML.700
		random_child = {
			limit = {
				age = 5
				NOT = {
					age = 13
				}
			}
			random = { 
				chance = 5
				change_learning = 1
				change_stewardship = 1
			}
			opinion = {
				who = ROOT
				modifier = opinion_family_love
			}
		}
	}

	after = {
		set_character_flag = ciml_bedtime_story
	}
}

# Crazy bedtime story
character_event = {
	id = CIML.780
	title = EVTNAMECIML.780
	desc = EVTDESCCIML.780

	picture = GFX_evt_moonlit_mountains_hf
	
	only_playable = yes
	only_capable = yes
	
	trigger = {
		religion_group = christian
		trait = lunatic
		prisoner = no
		in_seclusion = no
		learning = 8
		has_children = yes
		any_child = {
			AND = {
				age = 5
				NOT = {
					age = 13
				}
			}
		}
		NOR = {
			religion = bogomilist
			religion = paulician
			religion = messalian
			religion = mandean
			religion = cathar
			trait = possessed
			trait = dull
			trait = slothful
			trait = cruel
			trait = cynical
			trait = travelling
			society_is_devil_worshiper = yes
		}
		NOT = {
			has_character_flag = ciml_bedtime_story
		}
	}
	
	mean_time_to_happen = {	months = 60 }

	option = {
		name = EVTOPTACIML.780
		tooltip_info = lunatic
		random_child = {
			limit = {
				age = 5
				NOT = {
					age = 13
				}
			}
			random = { 
				chance = 10
				change_intrigue = 1
			}
			opinion = {
				who = ROOT
				modifier = opinion_family_love
			}
		}
	}

	after = {
		set_character_flag = ciml_bedtime_story
	}
}

### Chaldean confirmation below
# Confirmation chaldean men

character_event = {
	id = CIML.711
	title = EVTNAMECIML.711
	desc = EVTDESCCIML.711

	picture = GFX_evt_stone_church
	
	only_playable = yes
	min_age = 14
	max_age = 17
	only_capable = yes
	only_men = yes
	
	trigger = {
		prisoner = no
		in_seclusion = no
		OR = {
			religion = chaldean
		}
		NOT = {
			has_character_modifier = confirmation_sacrament
		}
	}
	
	mean_time_to_happen = {	months = 6 }
	
	option = {
		name = EVTOPTACIML.711
		piety = 15
		random = { 
			chance = 20  
			change_learning = 1
		}
	}

	option = {
		name = EVTOPTBCIML.711
		piety = 5
		random = { 
			chance = 40  
			change_learning = 1
		}
	}

	option = {
		name = EVTOPTCCIML.711
		random = { 
			chance = 10  
			change_intrigue = 1
		}
	}
	
	option = {
		name = EVTOPTDCIML.711
		tooltip_info = learning
		trigger = {
				learning = 6
		}
		prestige = 50
		random = { 
			chance = 20  
			change_learning = 1
		}
	}

	after = {
		character_event = { id = CIML.712 days = 20 }
		add_character_modifier = { 
			name = confirmation_sacrament
			years = 5 
		}
	}
}

character_event = {
	id = CIML.712
	title = EVTNAMECIML.712
	desc = EVTDESCCIML.712

	picture = GFX_evt_relic_box
	
	is_triggered_only = yes

	option = {
		name = EVTOPTACIML.712
		random = { 
			chance = 50  
			change_martial = 1
		}
	}

	option = {
		name = EVTOPTBCIML.712
		random = { 
			chance = 50  
			change_diplomacy = 1
		}
	}
	
	option = {
		name = EVTOPTCCIML.712
		random = { 
			chance = 50  
			change_stewardship = 1
		}
	}
	
	option = {
		name = EVTOPTDCIML.712
		change_learning = 1
	}

	after = {
    character_event = { id = CIML.713 days = 20 }
	}
}

character_event = {
	id = CIML.713
	title = EVTNAMECIML.713
	desc = EVTDESCCIML.713

	picture = GFX_evt_pope
	
	is_triggered_only = yes

	option = {
		name = EVTOPTACIML.713
		piety = 10
	}

	after = {
	}
}

# Confirmation chaldean women

character_event = {
	id = CIML.714
	title = EVTNAMECIML.714
	desc = EVTDESCCIML.714

	picture = GFX_evt_woman_praying_hf
	
	only_playable = yes
	min_age = 14
	max_age = 17
	only_capable = yes
	only_women = yes
	
	trigger = {
		prisoner = no
		in_seclusion = no
		OR = {
			religion = chaldean
		}
		NOT = {
			has_character_modifier = confirmation_sacrament
		}
	}
	
	mean_time_to_happen = {	months = 6 }
	
	option = {
		name = EVTOPTACIML.714
				piety = 15
		random = { 
			chance = 20  
			change_learning = 1
		}
	}

	option = {
		name = EVTOPTBCIML.714
		piety = 5
		random = { 
			chance = 40  
			change_learning = 1
		}
	}

	option = {
		name = EVTOPTCCIML.714
		random = { 
			chance = 10  
			change_intrigue = 1
		}
	}
	
	option = {
		name = EVTOPTDCIML.714
		tooltip_info = learning
		trigger = {
				learning = 6
		}
		prestige = 50
		random = { 
			chance = 20  
			change_learning = 1
		}
	}

	after = {
		character_event = { id = CIML.715 days = 20 }
		add_character_modifier = { 
			name = confirmation_sacrament
			years = 5 
		}
	}
}

character_event = {
	id = CIML.715
	title = EVTNAMECIML.715
	desc = EVTDESCCIML.715

	picture = GFX_evt_virgin_mary_icon
	
	is_triggered_only = yes

	option = {
		name = EVTOPTACIML.715
		random = { 
			chance = 50  
			change_martial = 1
		}
	}

	option = {
		name = EVTOPTBCIML.715
		random = { 
			chance = 50  
			change_diplomacy = 1
		}
	}
	
	option = {
		name = EVTOPTCCIML.715
		random = { 
			chance = 50  
			change_stewardship = 1
		}
	}
	
	option = {
		name = EVTOPTDCIML.715
		change_learning = 1
	}

	after = {
    character_event = { id = CIML.716 days = 20 }
	}
}

character_event = {
	id = CIML.716
	title = EVTNAMECIML.716
	desc = EVTDESCCIML.716

	picture = GFX_evt_pope
	
	is_triggered_only = yes

	option = {
		name = EVTOPTACIML.716
		piety = 10
	}

	after = {
	}
}