############################################
# Regency and Coronation events: 5200-5299 #
#                                          #
# New set by Byakhiam        #
############################################

#Related Events already coded by Paradox  

#Lordship_Events.txt:
#id = 1093 Royal Marriage aid duty
#id = 1094 Marriage of eldest daughter duty
#id = 1095 Knighting of eldest son duty
#id = 1096 Pay Homage

####################
# Steward-related events
#######################
# Embezzlement of Finances

character_event = {
	id = 5200

	picture = "event_intrigue"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = steward }
		condition = { type = or
			condition = { type = trait value = selfish }
			condition = { type = trait value = deceitful }
		}
		condition = { type = not value = { type = trait value = honest } }
		condition = { type = ruler_csc condition = { type = or
			condition = { type = not value = { type = age value = 16 } }
			condition = { type = trait value = pneumonia }
			condition = { type = trait value = plagueinfested }
			condition = { type = trait value = maniac }
			condition = { type = trait value = schizofrenia }
		} }
	}

	mean_time_to_happen = {
		months = 300

		modifier = {
			condition = { type = ruler_csc condition = { type = atwar } }
			factor = 5.0
		}
		modifier = {
			condition = { type = trait value = selfish }
			condition = { type = trait value = deceitful }
			factor = 0.75
		}
		modifier = {
			condition = { type = trait value = indulgent }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = vengeful }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = arbitrary }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = proud }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = just }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = modest }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = temperate }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = wise }
			factor = 1.1
		}
		modifier = {
			condition = { type = not value = { type = stewardship value = 6 } }
			factor = 1.25
		}
		modifier = {
			condition = { type = stewardship value = 10 }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.66
		}
		modifier = {
			condition = { type = ruler_csc condition = { type = and
				condition = { type = age value = 6 }
				condition = { type = trait value = suspicious }
			} }
			factor = 1.5
		}
		modifier = {
			condition = { type = ruler_csc condition = { type = and
				condition = { type = age value = 12 }
				condition = { type = trait value = energetic }
			} }
			factor = 1.5
		}
	}

	action_a = {
		effect = { type = gold scale = 1.0 }
		effect = { type = add_trait value = arbitrary }
		effect = { type = trigger for = ruler value = 5280 }
	}
	action_b = {
		effect = { type = add_trait value = proud }
		effect = { type = trigger for = ruler value = 5280 }
	}
	action_c = {
		effect = { type = add_trait value = indulgent }
		effect = { type = trigger for = ruler value = 5280 }
	}
}

# Steward uses treasury money to improve the conditions of the people

province_event = {
	id = 5201

	picture = "event_town"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = not value = { type = has_province_effect value = { rich = yes } } }
		condition = { type = owner condition = { type = and
			condition = { type = or
				condition = { type = not value = { type = age value = 16 } }
				condition = { type = trait value = pneumonia }
				condition = { type = trait value = plagueinfested }
				condition = { type = trait value = maniac }
				condition = { type = trait value = schizofrenia }
			}
			condition = { type = steward_csc condition = { type = or
				condition = { type = trait value = generous }
				condition = { type = trait value = just }
			} }
		} }
	}

	mean_time_to_happen = {
		months = 400

		modifier = {
			condition = { type = capital value = yes }
			factor = 0.75
		}
		modifier = {
			condition = { type = not value = { type = same_religion } }
			factor = 2.0
		}
		modifier = {
			condition = { type = regiment_mobilized }
			factor = 0.5
		}
		modifier = {
			condition = { type = owner condition = { type = atwar } }
			factor = 4.0
		}
		modifier = {
			condition = { type = not value = { type = ruler_gold value = 0 } }
			factor = 10.0
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 0.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 0.66
		}
	}

	immidiate = {
		effect = { type = prosperity value = 1 }
		effect = { type = remove_province_effect value = looted }
		effect = { type = ruler_gold scale = -0.5 }
		effect = { type = random chance = 25
			effect = { type = remove_province_effect value = revolt }
		}
	}
}

# Steward throws a big party with your money

character_event = {
	id = 5202

	picture = "event_intrigue"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = steward }
		condition = { type = or
			condition = { type = trait value = indulgent }
			condition = { type = trait value = proud }
			condition = { type = trait value = lustful }
		}
		condition = { type = ruler_csc condition = { type = or
			condition = { type = not value = { type = age value = 16 } }
			condition = { type = trait value = pneumonia }
			condition = { type = trait value = plagueinfested }
			condition = { type = trait value = maniac }
			condition = { type = trait value = schizofrenia }
		} }
	}

	mean_time_to_happen = {
		months = 400

		modifier = {
			condition = { type = ruler_csc condition = { type = atwar } }
			factor = 5.0
		}
		modifier = {
			condition = { type = trait value = indulgent }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = proud }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = lustful }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = selfish }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = arbitrary }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = reckless }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = temperate }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = modest }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = chaste }
			factor = 1.25
		}
	}

	action_a = {
		effect = { type = trigger for = ruler value = 5281 }
		effect = { type = random chance = 50
			effect = { type = add_trait value = indulgent }
		}
		effect = { type = random chance = 50
			effect = { type = add_trait value = lustful }
		}
		effect = { type = random chance = 25
			effect = { type = fertility value = 1 }
		}
		effect = { type = random chance = 25
			effect = { type = health value = -1 }
		}
	}
	action_b = {
		effect = { type = trigger for = ruler value = 5281 }
		effect = { type = prestige value = 50 }
		effect = { type = loyalty for = marshal value = -0.1 }
		effect = { type = loyalty for = chancellor value = -0.1 }
		effect = { type = loyalty for = spymaster value = -0.1 }
		effect = { type = loyalty for = chaplain value = -0.1 }
		effect = { type = random chance = 50
			effect = { type = add_trait value = proud }
		}
	}
}

# Steward roughs up the people for more taxes

province_event = {
	id = 5203

	picture = "event_town"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = not value = { type = has_province_effect value = { revolt = yes } } }
		condition = { type = owner condition = { type = and
			condition = { type = or
				condition = { type = not value = { type = age value = 16 } }
				condition = { type = trait value = pneumonia }
				condition = { type = trait value = plagueinfested }
				condition = { type = trait value = maniac }
				condition = { type = trait value = schizofrenia }
			}
			condition = { type = steward_csc condition = { type = or
				condition = { type = trait value = arbitrary }
				condition = { type = trait value = reckless }
				condition = { type = trait value = cruel }
			} }
		} }
	}

	mean_time_to_happen = {
		months = 240

		modifier = {
			condition = { type = capital value = yes }
			factor = 1.25
		}
		modifier = {
			condition = { type = not value = { type = same_religion } }
			factor = 0.5
		}
		modifier = {
			condition = { type = not value = { type = ruler_gold value = 52 } }
			factor = 0.8
		}
		modifier = {
			condition = { type = not value = { type = ruler_gold value = 0 } }
			factor = 0.5
		}
		modifier = {
			condition = { type = owner condition = { type = atwar } }
			factor = 2.0
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.66
		}
	}

	immidiate = {
		effect = { type = ruler_gold scale = 0.25 }
		effect = { type = prosperity value = -1 }
		effect = { type = random chance = 75
			effect = { type = add_province_effect value = revolt }
		}
	}
}

# Free up to 5209

####################
# Chaplain related events
####################
# Change of religious law

character_event = {
	id = 5210

	picture = "event_religion"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = chaplain }
		condition = { type = trait value = zealous }
		condition = { type = not value = { type = trait value = heretic } }
		condition = { type = not value = { type = trait value = excommunicated } }
		condition = { type = ruler_csc condition = { type = and
			condition = { type = or
				condition = { type = not value = { type = age value = 16 } }
				condition = { type = trait value = pneumonia }
				condition = { type = trait value = plagueinfested }
				condition = { type = trait value = maniac }
				condition = { type = trait value = schizofrenia }
			}
			condition = { type = not value = { type = has_law value = { church_supremacy = yes } } }
		} }
	}

	mean_time_to_happen = {
		months = 300

		modifier = {
			condition = { type = not value = { type = intrigue value = 4 } }
			factor = 1.5
		}
		modifier = {
			condition = { type = intrigue value = 8 }
			factor = 0.66
		}
		modifier = {
			condition = { type = intrigue value = 12 }
			factor = 0.66
		}
		modifier = {
			condition = { type = not value = { type = diplomacy value = 4 } }
			factor = 1.25
		}
		modifier = {
			condition = { type = diplomacy value = 8 }
			factor = 0.8
		}
		modifier = {
			condition = { type = diplomacy value = 12 }
			factor = 0.8
		}
		modifier = {
			condition = { type = piety value = 25 }
			factor = 0.9
		}
		modifier = {
			condition = { type = piety value = 50 }
			factor = 0.9
		}
		modifier = {
			condition = { type = piety value = 52 }
			factor = 0.9
		}
		modifier = {
			condition = { type = ruler_csc condition = { type = and
				condition = { type = age value = 6 }
				condition = { type = trait value = suspicious }
			} }
			factor = 1.5
		}
		modifier = {
			condition = { type = ruler_csc condition = { type = and
				condition = { type = age value = 12 }
				condition = { type = trait value = energetic }
			} }
			factor = 1.5
		}
	}

	immidiate = {
		effect = { type = trigger for = ruler value = 5282 }
		effect = { type = piety value = 50 }
		effect = { type = prestige value = 25 }
	}
}

# Chaplain is causing problems in a province with his intolerant preaching

province_event = {
	id = 5211

	picture = "event_religion"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = or
			condition = { type = and
				condition = { type = ruler_religion value = catholic }
				condition = { type = not value = { type = religion value = catholic } }
			}
			condition = { type = and
				condition = { type = ruler_religion value = orthodox }
				condition = { type = not value = { type = religion value = orthodox } }
			}
			condition = { type = has_province_effect value = { heretic = yes } }
		}
		condition = { type = owner condition = { type = and
			condition = { type = or
				condition = { type = not value = { type = age value = 16 } }
				condition = { type = trait value = pneumonia }
				condition = { type = trait value = plagueinfested }
				condition = { type = trait value = maniac }
				condition = { type = trait value = schizofrenia }
			}
			condition = { type = chaplain_csc condition = { type = and
				condition = { type = trait value = zealous }
				condition = { type = not value = { type = trait value = heretic } }
			} }
		} }
	}

	mean_time_to_happen = {
		months = 300

		modifier = {
			condition = { type = religion value = moslem }
			factor = 0.75
		}
		modifier = {
			condition = { type = religion value = pagan }
			factor = 0.5
		}
		modifier = {
			condition = { type = capital value = yes }
			factor = 0.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 5.0
		}
		modifier = {
			condition = { type = has_improvement value = { church = yes } }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_improvement value = { templar_house = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_improvement value = { large_church = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_improvement value = { domed_church = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_improvement value = { cathedral = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_improvement value = { thieves_guild = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_improvement value = { smugglers_ring = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_improvement value = { highway_robber_band = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = owner condition = { type = atwar } }
			factor = 5.0
		}
	}

	immidiate = {
		effect = { type = peasant_loyalty value = -0.1 }
		effect = { type = burgher_loyalty value = -0.1 }
		effect = { type = random chance = 75
			effect = { type = add_province_effect value = revolt }
		}
		effect = { type = random chance = 25
			effect = { type = remove_province_effect value = heretic }
		}
		effect = { type = random chance = 10
			effect = { type = set_to_realm_religion }
		}
	}
}

# Sceptical chaplain picks up heresy

character_event = {
	id = 5212

	picture = "event_religion"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = chaplain }
		condition = { type = trait value = sceptical }
		condition = { type = not value = { type = trait value = heretic } }
		condition = { type = ruler_csc condition = { type = or
			condition = { type = not value = { type = age value = 16 } }
			condition = { type = trait value = pneumonia }
			condition = { type = trait value = plagueinfested }
			condition = { type = trait value = maniac }
			condition = { type = trait value = schizofrenia }
		} }
	}

	mean_time_to_happen = {
		months = 900

		modifier = {
			condition = { type = trait value = indulgent }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = lustful }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = selfish }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = reckless }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = proud }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = chaste }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = modest }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = wise }
			factor = 1.25
		}
		modifier = {
			condition = { type = ruler_csc condition = { type = and
				condition = { type = age value = 6 }
				condition = { type = trait value = suspicious }
			} }
			factor = 1.5
		}
		modifier = {
			condition = { type = ruler_csc condition = { type = and
				condition = { type = age value = 12 }
				condition = { type = trait value = energetic }
			} }
			factor = 1.5
		}
	}

	immidiate = {
		effect = { type = add_trait value = heretic }
		effect = { type = remove_trait value = sceptical }
	}
}

# Heretic chaplain teaches children heresy

character_event = {
	id = 5213

	picture = "event_religion"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = age value = 6 }
		condition = { type = not value = { type = age value = 16 } }
		condition = { type = not value = { type = trait value = heretic } }
		condition = { type = chaplain_csc condition = { type = trait value = heretic } }
		condition = { type = ruler_csc condition = { type = or
			condition = { type = not value = { type = age value = 16 } }
			condition = { type = trait value = heretic }
			condition = { type = trait value = pneumonia }
			condition = { type = trait value = plagueinfested }
			condition = { type = trait value = maniac }
			condition = { type = trait value = schizofrenia }
		} }
	}

	mean_time_to_happen = {
		months = 180

		modifier = {
			condition = { type = trait value = trusting }
			factor = 0.66
		}
		modifier = {
			condition = { type = trait value = suspicious }
			factor = 1.5
		}
		modifier = {
			condition = { type = ruler }
			factor = 1.25
		}
	}

	immidiate = {
		effect = { type = add_trait value = heretic }			
	}
}

# Free up to 5219

####################
# Marshal related events
##########################
# Betrayal, count

character_event = {
	id = 5220

	picture = "event_battle"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = marshal }
		condition = { type = or 
			condition = { type = trait value = deceitful }
			condition = { type = trait value = coward }
		}
		condition = { type = ruler_csc condition = { type = and
			condition = { type = atwar }
			condition = { type = not value = { type = duchy } }
			condition = { type = not value = { type = kingdom } }
			condition = { type = or
				condition = { type = not value = { type = age value = 16 } }
				condition = { type = trait value = pneumonia }
				condition = { type = trait value = plagueinfested }
				condition = { type = trait value = maniac }
				condition = { type = trait value = schizofrenia }
			}
		} }
	}

	mean_time_to_happen = {
		months = 300

		modifier = {
			condition = { type = command }
			factor = 0.8
		}
		modifier = {
			condition = { type = combat }
			factor = 0.66
		}
		modifier = {
			condition = { type = loyalty value = 0.9 }
			factor = 1.5
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.7 } }
			factor = 0.8
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.4 } }
			factor = 0.8
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.1 } }
			factor = 0.1
		}
		modifier = {
			condition = { type = trait value = deceitful }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = coward }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = reckless }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = honest }
			factor = 1.5
		}
		modifier = {
			condition = { type = trait value = valorous }
			factor = 1.5
		}
		modifier = {
			condition = { type = ruler_csc condition = { type = not value = { type = enemy_same_religion } } }
			factor = 2.0
		}
	}

	immidiate = {
		effect = { type = trigger for = ruler value = 5284 }
		effect = { type = loyalty value = 1.0 }
		effect = { type = courtier_defect value = random_enemy }
	}
}

# Betrayal, duke

character_event = {
	id = 5221

	picture = "event_battle"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = marshal }
		condition = { type = or 
			condition = { type = trait value = deceitful }
			condition = { type = trait value = coward }
		}
		condition = { type = ruler_csc condition = { type = and
			condition = { type = atwar }
			condition = { type = duchy }
			condition = { type = not value = { type = kingdom } }
			condition = { type = or
				condition = { type = not value = { type = age value = 16 } }
				condition = { type = trait value = pneumonia }
				condition = { type = trait value = plagueinfested }
				condition = { type = trait value = maniac }
				condition = { type = trait value = schizofrenia }
			}
		} }
	}

	mean_time_to_happen = {
		months = 300

		modifier = {
			condition = { type = command }
			factor = 0.8
		}
		modifier = {
			condition = { type = combat }
			factor = 0.66
		}
		modifier = {
			condition = { type = loyalty value = 0.9 }
			factor = 1.5
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.7 } }
			factor = 0.8
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.4 } }
			factor = 0.8
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.1 } }
			factor = 0.1
		}
		modifier = {
			condition = { type = trait value = deceitful }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = coward }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = reckless }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = honest }
			factor = 1.5
		}
		modifier = {
			condition = { type = trait value = valorous }
			factor = 1.5
		}
		modifier = {
			condition = { type = ruler_csc condition = { type = not value = { type = enemy_same_religion } } }
			factor = 2.0
		}
	}

	immidiate = {
		effect = { type = trigger for = ruler value = 5285 }
		effect = { type = loyalty value = 1.0 }
		effect = { type = courtier_defect value = random_enemy }
	}
}

# Betrayal, king

character_event = {
	id = 5222

	picture = "event_battle"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = marshal }
		condition = { type = or 
			condition = { type = trait value = deceitful }
			condition = { type = trait value = coward }
		}
		condition = { type = ruler_csc condition = { type = and
			condition = { type = atwar }
			condition = { type = kingdom }
			condition = { type = or
				condition = { type = not value = { type = age value = 16 } }
				condition = { type = trait value = pneumonia }
				condition = { type = trait value = plagueinfested }
				condition = { type = trait value = maniac }
				condition = { type = trait value = schizofrenia }
			}
		} }
	}

	mean_time_to_happen = {
		months = 300

		modifier = {
			condition = { type = command }
			factor = 0.8
		}
		modifier = {
			condition = { type = combat }
			factor = 0.66
		}
		modifier = {
			condition = { type = loyalty value = 0.9 }
			factor = 1.5
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.7 } }
			factor = 0.8
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.4 } }
			factor = 0.8
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.1 } }
			factor = 0.1
		}
		modifier = {
			condition = { type = trait value = deceitful }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = coward }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = reckless }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = honest }
			factor = 1.5
		}
		modifier = {
			condition = { type = trait value = valorous }
			factor = 1.5
		}
		modifier = {
			condition = { type = ruler_csc condition = { type = not value = { type = enemy_same_religion } } }
			factor = 2.0
		}
	}

	immidiate = {
		effect = { type = trigger for = ruler value = 5286 }
		effect = { type = loyalty value = 1.0 }
		effect = { type = courtier_defect value = random_enemy }
	}
}

# Free up to 5229

######################
# Chancellor related events
######################
# Untrustworthy chancellor makes peace with enemy for his own benefit

character_event = {
	id = 5230

	picture = "event_intrigue"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = chancellor }
		condition = { type = not value = { type = trait value = honest } }
		condition = { type = ruler_csc condition = { type = and
			condition = { type = atwar }
			condition = { type = or
				condition = { type = not value = { type = age value = 16 } }
				condition = { type = trait value = pneumonia }
				condition = { type = trait value = plagueinfested }
				condition = { type = trait value = maniac }
				condition = { type = trait value = schizofrenia }
			}
		} }
	}

	mean_time_to_happen = {
		months = 600

		modifier = {
			condition = { type = command }
			factor = 0.75
		}
		modifier = {
			condition = { type = trait value = deceitful }
			factor = 0.66
		}
		modifier = {
			condition = { type = trait value = coward }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = reckless }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = selfish }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = vengeful }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = valorous }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = just }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = lazy }
			factor = 1.25
		}
		modifier = {
			condition = { type = loyalty value = 0.9 }
			factor = 1.5
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.7 } }
			factor = 0.8
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.4 } }
			factor = 0.8
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.1 } }
			factor = 0.1
		}
		modifier = {
			condition = { type = ruler_csc condition = { type = not value = { type = enemy_same_religion } } }
			factor = 2.0
		}
	}

	immidiate = {
		effect = { type = trigger for = ruler value = 5283 }
		effect = { type = gold value = 50 }
		effect = { type = loyalty value = -0.3 }
	}
}

# Free up to 5239

#####################
# Spymaster related events
#####################
# Untrustworthy spymaster does away with weak ruler

character_event = {
	id = 5240

	picture = "event_death"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = spymaster }
		condition = { type = not value = { type = trait value = honest } }
		condition = { type = ruler_csc condition = { type = and
			condition = { type = or
				condition = { type = not value = { type = age value = 16 } }
				condition = { type = trait value = pneumonia }
				condition = { type = trait value = plagueinfested }
				condition = { type = trait value = maniac }
				condition = { type = trait value = schizofrenia }
			}
			condition = { type = not value = { type = mother condition = { type = spymaster } } }
			condition = { type = not value = { type = spouse condition = { type = spymaster } } }
			condition = { type = not value = { type = father condition = { type = spymaster } } }
		} }
	}

	mean_time_to_happen = {
		months = 1200

		modifier = {
			condition = { type = ruler_csc condition = { type = atwar } }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = deceitful }
			factor = 0.66
		}
		modifier = {
			condition = { type = trait value = selfish }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = vengeful }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = cruel }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = arbitrary }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = proud }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = indulgent }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = just }
			factor = 1.5
		}
		modifier = {
			condition = { type = trait value = temperate }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = coward }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = lazy }
			factor = 1.25
		}
		modifier = {
			condition = { type = not value = { type = intrigue value = 7 } }
			factor = 1.5
		}
		modifier = {
			condition = { type = intrigue value = 12 }
			factor = 0.8
		}
		modifier = {
			condition = { type = intrigue value = 15 }
			factor = 0.8
		}
		modifier = {
			condition = { type = loyalty value = 0.8 }
			factor = 2.0
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.5 } }
			factor = 0.75
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.3 } }
			factor = 0.75
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.1 } }
			factor = 0.5
		}
		modifier = {
			condition = { type = ruler_csc condition = { type = and
				condition = { type = age value = 6 }
				condition = { type = trait value = suspicious }
			} }
			factor = 1.5
		}
		modifier = {
			condition = { type = ruler_csc condition = { type = age value = 12 } }
			factor = 1.5
		}
		modifier = {
			condition = { type = ruler_csc condition = { type = trait value = illness } }
			factor = 0.8
		}
		modifier = {
			condition = { type = ruler_csc condition = { type = or
				condition = { type = trait value = pneumonia }
				condition = { type = trait value = plagueinfested }
			} }
			factor = 0.66
		}
	}

	immidiate = {
		effect = { type = death value = ruler }
		effect = { type = loyalty value = -0.5 }
		effect = { type = add_trait value = deceitful }
		effect = { type = random chance = 25
			effect = { type = death }
		}
	}
}

# Free up to 5249

##################
# Vassal related events
##################

# Vassal demands establishing feudal contract

character_event = {
	id = 5251

	picture = "event_claim"

	trigger = {
		condition = { type = is_vassal }
		condition = { type = age value = 16 }
		condition = { type = not value = { type = trait value = generous } }
		condition = { type = not value = { type = atwar } }
		condition = { type = liege condition = { type = and
			condition = { type = not value = { type = ai } }
			condition = { type = not value = { type = atwar } }
			condition = { type = not value = { type = has_law value = { feudal_contract_law = yes } } }
			condition = { type = or
				condition = { type = not value = { type = age value = 16 } }
				condition = { type = trait value = pneumonia }
				condition = { type = trait value = plagueinfested }
				condition = { type = trait value = maniac }
				condition = { type = trait value = schizofrenia }
			}
		} }
	}

	mean_time_to_happen = {
		months = 600

		modifier = {
			condition = { type = primary_heir }
			factor = 0.66
		}
		modifier = {
			condition = { type = duchy }
			factor = 0.66
		}
		modifier = {
			condition = { type = has_vassal }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = loyalty value = 0.8 }
			factor = 1.25
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.6 } }
			factor = 0.8
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.4 } }
			factor = 0.8
		}
		modifier = {
			condition = { type = not value = { type = loyalty value = 0.1 } }
			factor = 10.0
		}
		modifier = {
			condition = { type = trait value = selfish }
			factor = 0.66
		}
		modifier = {
			condition = { type = trait value = proud }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = energetic }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = reckless }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = deceitful }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = arbitrary }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = lazy }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = coward }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = modest }
			factor = 1.25
		}
		modifier = {
			condition = { type = stewardship value = 10 }
			factor = 0.8
		}
		modifier = {
			condition = { type = stewardship value = 14 }
			factor = 0.8
		}
		modifier = {
			condition = { type = prestige value = 50 }
			factor = 0.8
		}
		modifier = {
			condition = { type = prestige value = 100 }
			factor = 0.8
		}
		modifier = {
			condition = { type = prestige value = 250 }
			factor = 0.8
		}
		modifier = {
			condition = { type = prestige value = 500 }
			factor = 0.8
		}
		modifier = {
			condition = { type = liege condition = { type = steward_csc condition = { type = stewardship value = 12 } } }
			factor = 1.5
		}
	}

	immidiate = {
		effect = { type = trigger for = liege value = 5288 }
		effect = { type = loyalty value = -0.2 }
		effect = { type = prestige value = 50 }
		effect = { type = random chance = 50
			effect = { type = add_trait value = proud }
		}
	}
}

# Vassal breaks your trust while you war
#
#character_event = {
#	id = 5252
#
#	picture = "event_claim"
#
#	trigger = {
#		condition = { type = is_vassal }
#		condition = { type = age value = 16 }
#		condition = { type = not value = { type = trait value = honest } }
#		condition = { type = not value = { type = atwar } }
#		condition = { type = or
#			condition = { type = not value = { type = primary_heir } }
#			condition = { type = and
#				condition = { type = trait value = deceitful }
#				condition = { type = or
#					condition = { type = trait value = proud }
#					condition = { type = trait value = selfish }
#				}
#			}
#		}
#		condition = { type = liege condition = { type = and
#			condition = { type = not value = { type = ai } }
#			condition = { type = atwar }
#			condition = { type = or
#				condition = { type = not value = { type = age value = 16 } }
#				condition = { type = trait value = pneumonia }
#				condition = { type = trait value = plagueinfested }
#				condition = { type = trait value = maniac }
#				condition = { type = trait value = schizofrenia }
#			}
#		} }
#	}
#
#	mean_time_to_happen = {
#		months = 600
#
#		modifier = {
#			condition = { type = trait value = deceitful }
#			factor = 0.66
#		}
#		modifier = {
#			condition = { type = trait value = vengeful }
#			factor = 0.66
#		}
#		modifier = {
#			condition = { type = trait value = proud }
#			factor = 0.8
#		}
#		modifier = {
#			condition = { type = trait value = valorous }
#			factor = 0.8
#		}
#		modifier = {
#			condition = { type = trait value = reckless }
#			factor = 0.8
#		}
#		modifier = {
#			condition = { type = trait value = energetic }
#			factor = 0.8
#		}
#		modifier = {
#			condition = { type = trait value = selfish }
#			factor = 0.8
#		}
#		modifier = {
#			condition = { type = trait value = forgiving }
#			factor = 1.25
#		}
#		modifier = {
#			condition = { type = trait value = modest }
#			factor = 1.25
#		}
#		modifier = {
#			condition = { type = trait value = coward }
#			factor = 1.25
#		}
#		modifier = {
#			condition = { type = trait value = lazy }
#			factor = 1.25
#		}
#		modifier = {
#			condition = { type = trait value = wise }
#			factor = 1.25
#		}
#		modifier = {
#			condition = { type = trait value = depression }
#			factor = 2.0
#		}
#		modifier = {
#			condition = { type = trait value = pneumonia }
#			factor = 2.0
#		}
#		modifier = {
#			condition = { type = trait value = plagueinfested }
#			factor = 2.0
#		}
#		modifier = {
#			condition = { type = trait value = maniac }
#			factor = 0.5
#		}
#		modifier = {
#			condition = { type = trait value = schizofrenia }
#			factor = 0.5
#		}
#		modifier = {
#			condition = { type = not value = { type = prestige value = 0 } }
#			factor = 1.5
#		}
#		modifier = {
#			condition = { type = prestige value = 100 }
#			factor = 0.9
#		}
#		modifier = {
#			condition = { type = prestige value = 250 }
#			factor = 0.9
#		}
#		modifier = {
#			condition = { type = prestige value = 500 }
#			factor = 0.9
#		}
#		modifier = {
#			condition = { type = prestige value = 1000 }
#			factor = 0.9
#		}
#		modifier = {
#			condition = { type = not value = { type = gold value = 0 } }
#			factor = 1.5
#		}
#		modifier = {
#			condition = { type = gold value = 100 }
#			factor = 0.9
#		}
#		modifier = {
#			condition = { type = gold value = 250 }
#			factor = 0.9
#		}
#		modifier = {
#			condition = { type = gold value = 500 }
#			factor = 0.9
#		}
#		modifier = {
#			condition = { type = gold value = 1000 }
#			factor = 0.9
#		}
#		modifier = {
#			condition = { type = martial value = 10 }
#			factor = 0.8
#		}
#		modifier = {
#			condition = { type = stewardship value = 10 }
#			factor = 0.8
#		}
#		modifier = {
#			condition = { type = not value = { type = loyalty value = 0.2 } }
#			factor = 0.1
#		}
#		modifier = {
#			condition = { type = not value = { type = loyalty value = 0.4 } }
#			factor = 0.9
#		}
#		modifier = {
#			condition = { type = not value = { type = loyalty value = 0.6 } }
#			factor = 0.9
#		}
#		modifier = {
#			condition = { type = loyalty value = 0.8 }
#			factor = 1.5
#		}
#		modifier = {
#			condition = { type = liege condition = { type = not value = { type = martial value = 6 } } }
#			factor = 0.8
#		}
#		modifier = {
#			condition = { type = liege condition = { type = martial value = 10 } }
#			factor = 1.5
#		}
#		modifier = {
#			condition = { type = liege condition = { type = martial value = 13 } }
#			factor = 1.5
#		}
#		modifier = {
#			condition = { type = liege condition = { type = not value = { type = enemy_same_religion } } }
#			factor = 2.0
#		}
#		modifier = {
#			condition = { type = liege condition = { type = on_crusade } }
#			factor = 2.5
#		}
#	}
#
#	action_a = {
#		ai_chance = 40
#			modifier = { condition = { type = trait value = coward } factor = 0.66 }
#			modifier = { condition = { type = trait value = valorous } factor = 1.5 }
#			modifier = { condition = { type = trait value = wise } factor = 0.66 }
#			modifier = { condition = { type = trait value = reckless } factor = 1.5 }
#			modifier = { condition = { type = trait value = lazy } factor = 0.66 }
#			modifier = { condition = { type = trait value = energetic } factor = 1.5 }
#			modifier = { condition = { type = trait value = vengeful } factor = 1.5 }
#		effect = { type = trigger for = liege value = 5289 }
#		effect = { type = add_title_claim value = liege }
#		effect = { type = prestige value = -25 }
#		effect = { type = declare_war value = liege }
#		effect = { type = random chance = 50
#			effect = { type = add_trait value = deceitful }
#		}
#		effect = { type = random chance = 25
#			effect = { type = add_trait value = valorous }
#		}
#		effect = { type = random chance = 25
#			effect = { type = add_trait value = proud }
#		}
#	}
#	action_b = {
#		ai_chance = 40
#			modifier = { condition = { type = trait value = deceitful } factor = 1.5 }
#			modifier = { condition = { type = trait value = valorous } factor = 0.66 }
#			modifier = { condition = { type = trait value = coward } factor = 1.5 }
#			modifier = { condition = { type = trait value = wise } factor = 1.5 }
#			modifier = { condition = { type = trait value = reckless } factor = 0.66 }
#			modifier = { condition = { type = trait value = vengeful } factor = 0.66 }
#		effect = { type = trigger for = liege value = 5290 }
#		effect = { type = prestige value = -25 }
#		effect = { type = loyalty value = 1.0 }
#		effect = { type = independence }
#		effect = { type = random chance = 50
#			effect = { type = add_trait value = deceitful }
#		}
#		effect = { type = random chance = 25
#			effect = { type = add_trait value = coward }
#		}
#		effect = { type = random chance = 25
#			effect = { type = add_trait value = selfish }
#		}
#	}
#	action_c = {
#		ai_chance = 20
#			modifier = { condition = { type = trait value = coward } factor = 1.5 }
#			modifier = { condition = { type = trait value = lazy } factor = 1.5 }
#			modifier = { condition = { type = trait value = forgiving } factor = 1.5 }
#			modifier = { condition = { type = trait value = modest } factor = 1.5 }
#		effect = { type = loyalty value = 0.25 }
#		effect = { type = random chance = 50
#			effect = { type = add_trait value = honest }
#		}
#		effect = { type = random chance = 25
#			effect = { type = add_trait value = modest }
#		}
#	}
#}


# Free up to 5259

############
# Other events
############

# Relative wants position
# Steward

character_event = {
	id = 5260

	picture = "event_intrigue"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = age value = 16 }
		condition = { type = not value = { type = ruler } }
		condition = { type = not value = { type = marshal } }
		condition = { type = not value = { type = steward } }
		condition = { type = not value = { type = chancellor } }
		condition = { type = not value = { type = spymaster } }
		condition = { type = not value = { type = chaplain } }
		condition = { type = not value = { type = trait value = bastard } }
		condition = { type = or
			condition = { type = trait value = hole_in_the_pocket }
			condition = { type = trait value = proven_accountant }
			condition = { type = trait value = fortune_builder }
			condition = { type = trait value = midas_touched }
		}
		condition = { type = not value = { type = trait value = modest } }
		condition = { type = ruler_csc condition = { type = or
			condition = { type = not value = { type = age value = 16 } }
			condition = { type = trait value = pneumonia }
			condition = { type = trait value = plagueinfested }
			condition = { type = trait value = maniac }
			condition = { type = trait value = schizofrenia }
		} }
		condition = { type = or
			condition = { type = ruler_child }
			condition = { type = any_child condition = { type = and
				condition = { type = ruler }
				condition = { type = not value = { type = ai } }
			} }
			condition = { type = father condition = { type = any_child condition = { type = and
				condition = { type = ruler }
				condition = { type = not value = { type = ai } }
			} } }
		}
	}

	mean_time_to_happen = {
		months = 300

		modifier = {
			condition = { type = stewardship value = 7 }
			factor = 0.8
		}
		modifier = {
			condition = { type = stewardship value = 10 }
			factor = 0.8
		}
		modifier = {
			condition = { type = stewardship value = 13 }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = proud }
			factor = 0.66
		}
		modifier = {
			condition = { type = trait value = selfish }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = energetic }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = deceitful }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = lazy }
			factor = 1.5
		}
		modifier = {
			condition = { type = prestige value = 25 }
			factor = 0.9
		}
		modifier = {
			condition = { type = prestige value = 50 }
			factor = 0.9
		}
		modifier = {
			condition = { type = prestige value = 100 }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = illness }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = stress_symptom }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = depression }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = schizofrenia }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = maniac }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = plagueinfested }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = pneumonia }
			factor = 2.0
		}
	}

	action_a = {
		effect = { type = loyalty for = steward value = -0.3 }
		effect = { type = random chance = 25
			effect = { type = add_trait value = proud }
		}
		effect = { type = random chance = 25
			effect = { type = add_trait for = steward value = vengeful }
		}
		effect = { type = steward }
	}
}

# Spymaster

character_event = {
	id = 5261

	picture = "event_intrigue"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = age value = 16 }
		condition = { type = not value = { type = ruler } }
		condition = { type = not value = { type = marshal } }
		condition = { type = not value = { type = steward } }
		condition = { type = not value = { type = chancellor } }
		condition = { type = not value = { type = spymaster } }
		condition = { type = not value = { type = chaplain } }
		condition = { type = not value = { type = trait value = bastard } }
		condition = { type = or
			condition = { type = trait value = naive_wirepuller }
			condition = { type = trait value = flamboyant_schemer }
			condition = { type = trait value = intricate_webweaver }
			condition = { type = trait value = illusive_shadow }
		}
		condition = { type = not value = { type = trait value = modest } }
		condition = { type = ruler_csc condition = { type = or
			condition = { type = not value = { type = age value = 16 } }
			condition = { type = trait value = pneumonia }
			condition = { type = trait value = plagueinfested }
			condition = { type = trait value = maniac }
			condition = { type = trait value = schizofrenia }
		} }
		condition = { type = or
			condition = { type = ruler_child }
			condition = { type = any_child condition = { type = and
				condition = { type = ruler }
				condition = { type = not value = { type = ai } }
			} }
			condition = { type = father condition = { type = any_child condition = { type = and
				condition = { type = ruler }
				condition = { type = not value = { type = ai } }
			} } }
		}
	}

	mean_time_to_happen = {
		months = 300

		modifier = {
			condition = { type = intrigue value = 7 }
			factor = 0.8
		}
		modifier = {
			condition = { type = intrigue value = 10 }
			factor = 0.8
		}
		modifier = {
			condition = { type = intrigue value = 13 }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = proud }
			factor = 0.66
		}
		modifier = {
			condition = { type = trait value = selfish }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = energetic }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = deceitful }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = lazy }
			factor = 1.5
		}
		modifier = {
			condition = { type = prestige value = 25 }
			factor = 0.9
		}
		modifier = {
			condition = { type = prestige value = 50 }
			factor = 0.9
		}
		modifier = {
			condition = { type = prestige value = 100 }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = illness }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = stress_symptom }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = depression }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = schizofrenia }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = maniac }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = plagueinfested }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = pneumonia }
			factor = 2.0
		}
	}

	action_a = {
		effect = { type = loyalty for = spymaster value = -0.3 }
		effect = { type = random chance = 25
			effect = { type = add_trait value = proud }
		}
		effect = { type = random chance = 25
			effect = { type = add_trait for = spymaster value = vengeful }
		}
		effect = { type = spymaster }
	}
}

# Chancellor

character_event = {
	id = 5262

	picture = "event_intrigue"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = age value = 16 }
		condition = { type = not value = { type = ruler } }
		condition = { type = not value = { type = marshal } }
		condition = { type = not value = { type = steward } }
		condition = { type = not value = { type = chancellor } }
		condition = { type = not value = { type = spymaster } }
		condition = { type = not value = { type = chaplain } }
		condition = { type = not value = { type = trait value = bastard } }
		condition = { type = or
			condition = { type = trait value = amateurish_pettifogger }
			condition = { type = trait value = proven_dealbreaker }
			condition = { type = trait value = charismatic_negotiator }
			condition = { type = trait value = grey_eminence }
		}
		condition = { type = not value = { type = trait value = modest } }
		condition = { type = ruler_csc condition = { type = or
			condition = { type = not value = { type = age value = 16 } }
			condition = { type = trait value = pneumonia }
			condition = { type = trait value = plagueinfested }
			condition = { type = trait value = maniac }
			condition = { type = trait value = schizofrenia }
		} }
		condition = { type = or
			condition = { type = ruler_child }
			condition = { type = any_child condition = { type = and
				condition = { type = ruler }
				condition = { type = not value = { type = ai } }
			} }
			condition = { type = father condition = { type = any_child condition = { type = and
				condition = { type = ruler }
				condition = { type = not value = { type = ai } }
			} } }
		}
	}

	mean_time_to_happen = {
		months = 300

		modifier = {
			condition = { type = diplomacy value = 7 }
			factor = 0.8
		}
		modifier = {
			condition = { type = diplomacy value = 10 }
			factor = 0.8
		}
		modifier = {
			condition = { type = diplomacy value = 13 }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = proud }
			factor = 0.66
		}
		modifier = {
			condition = { type = trait value = selfish }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = energetic }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = deceitful }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = lazy }
			factor = 1.5
		}
		modifier = {
			condition = { type = prestige value = 25 }
			factor = 0.9
		}
		modifier = {
			condition = { type = prestige value = 50 }
			factor = 0.9
		}
		modifier = {
			condition = { type = prestige value = 100 }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = illness }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = stress_symptom }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = depression }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = schizofrenia }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = maniac }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = plagueinfested }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = pneumonia }
			factor = 2.0
		}
	}

	action_a = {
		effect = { type = loyalty for = chancellor value = -0.3 }
		effect = { type = random chance = 25
			effect = { type = add_trait value = proud }
		}
		effect = { type = random chance = 25
			effect = { type = add_trait for = chancellor value = vengeful }
		}
		effect = { type = chancellor }
	}
}

# Marshal

character_event = {
	id = 5263

	picture = "event_intrigue"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = gender value = male }
		condition = { type = age value = 16 }
		condition = { type = not value = { type = ruler } }
		condition = { type = not value = { type = marshal } }
		condition = { type = not value = { type = steward } }
		condition = { type = not value = { type = chancellor } }
		condition = { type = not value = { type = spymaster } }
		condition = { type = not value = { type = chaplain } }
		condition = { type = not value = { type = trait value = bastard } }
		condition = { type = or
			condition = { type = trait value = misguided_warrior }
			condition = { type = trait value = tough_soldier }
			condition = { type = trait value = knowledged_tactician }
			condition = { type = trait value = brilliant_strategist }
		}
		condition = { type = not value = { type = trait value = modest } }
		condition = { type = ruler_csc condition = { type = or
			condition = { type = not value = { type = age value = 16 } }
			condition = { type = trait value = pneumonia }
			condition = { type = trait value = plagueinfested }
			condition = { type = trait value = maniac }
			condition = { type = trait value = schizofrenia }
		} }
		condition = { type = or
			condition = { type = ruler_child }
			condition = { type = any_child condition = { type = and
				condition = { type = ruler }
				condition = { type = not value = { type = ai } }
			} }
			condition = { type = father condition = { type = any_child condition = { type = and
				condition = { type = ruler }
				condition = { type = not value = { type = ai } }
			} } }
		}
	}

	mean_time_to_happen = {
		months = 300

		modifier = {
			condition = { type = martial value = 7 }
			factor = 0.8
		}
		modifier = {
			condition = { type = martial value = 10 }
			factor = 0.8
		}
		modifier = {
			condition = { type = martial value = 13 }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = proud }
			factor = 0.66
		}
		modifier = {
			condition = { type = trait value = selfish }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = energetic }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = deceitful }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = lazy }
			factor = 1.5
		}
		modifier = {
			condition = { type = prestige value = 25 }
			factor = 0.9
		}
		modifier = {
			condition = { type = prestige value = 50 }
			factor = 0.9
		}
		modifier = {
			condition = { type = prestige value = 100 }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = illness }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = stress_symptom }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = depression }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = schizofrenia }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = maniac }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = plagueinfested }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = pneumonia }
			factor = 2.0
		}
	}

	action_a = {
		effect = { type = loyalty for = marshal value = -0.3 }
		effect = { type = random chance = 25
			effect = { type = add_trait value = proud }
		}
		effect = { type = random chance = 25
			effect = { type = add_trait for = marshal value = vengeful }
		}
		effect = { type = marshal }
	}
}

# Chaplain

character_event = {
	id = 5264

	picture = "event_intrigue"

	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = gender value = male }
		condition = { type = age value = 16 }
		condition = { type = not value = { type = ruler } }
		condition = { type = not value = { type = marshal } }
		condition = { type = not value = { type = steward } }
		condition = { type = not value = { type = chancellor } }
		condition = { type = not value = { type = spymaster } }
		condition = { type = not value = { type = chaplain } }
		condition = { type = not value = { type = trait value = bastard } }
		condition = { type = or
			condition = { type = trait value = detached_priest }
			condition = { type = trait value = martial_cleric }
			condition = { type = trait value = scholarly_theologian }
			condition = { type = trait value = mastermind_theologian }
		}
		condition = { type = not value = { type = trait value = modest } }
		condition = { type = ruler_csc condition = { type = or
			condition = { type = not value = { type = age value = 16 } }
			condition = { type = trait value = pneumonia }
			condition = { type = trait value = plagueinfested }
			condition = { type = trait value = maniac }
			condition = { type = trait value = schizofrenia }
		} }
		condition = { type = or
			condition = { type = ruler_child }
			condition = { type = any_child condition = { type = and
				condition = { type = ruler }
				condition = { type = not value = { type = ai } }
			} }
			condition = { type = father condition = { type = any_child condition = { type = and
				condition = { type = ruler }
				condition = { type = not value = { type = ai } }
			} } }
		}
	}

	mean_time_to_happen = {
		months = 300

		modifier = {
			condition = { type = trait value = proud }
			factor = 0.66
		}
		modifier = {
			condition = { type = trait value = zealous }
			factor = 0.66
		}
		modifier = {
			condition = { type = trait value = sceptical }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = selfish }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = energetic }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = deceitful }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = lazy }
			factor = 1.5
		}
		modifier = {
			condition = { type = prestige value = 25 }
			factor = 0.9
		}
		modifier = {
			condition = { type = prestige value = 50 }
			factor = 0.9
		}
		modifier = {
			condition = { type = prestige value = 100 }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = illness }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = stress_symptom }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = depression }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = schizofrenia }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = maniac }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = plagueinfested }
			factor = 2.0
		}
		modifier = {
			condition = { type = trait value = pneumonia }
			factor = 2.0
		}
	}

	action_a = {
		effect = { type = loyalty for = chaplain value = -0.3 }
		effect = { type = random chance = 25
			effect = { type = add_trait value = proud }
		}
		effect = { type = random chance = 25
			effect = { type = add_trait for = chaplain value = vengeful }
		}
		effect = { type = chaplain }
	}
}

# Free up to 5279

####################
# Reaction events for all
####################

character_event = {
	id = 5280

	picture = "event_moneycollection"

	immidiate = {
		effect = { type = gold scale = -1.0 }
	}
}

character_event = {
	id = 5281

	picture = "event_moneycollection"

	immidiate = {
		effect = { type = gold scale = -0.5 }
		effect = { type = prestige scale = 0.5 }
	}
}

character_event = {
	id = 5282

	picture = "event_religion"

	immidiate = {
		effect = { type = set_law value = church_supremacy }
		effect = { type = piety value = 25 }
	}
}

character_event = {
	id = 5283

	picture = "event_intrigue"

	immidiate = {
		effect = { type = prestige scale = -0.5 }
		effect = { type = peace }
	}
}

character_event = {
	id = 5284

	picture = "event_battle"

	immidiate = {
		effect = { type = prestige scale = -1.0 }
		effect = { type = remove_regiment }
	}
}

character_event = {
	id = 5285

	picture = "event_battle"

	immidiate = {
		effect = { type = prestige scale = -0.5 }
		effect = { type = remove_regiment }
		effect = { type = random chance = 50
			effect = { type = remove_regiment }
		}
	}
}

character_event = {
	id = 5286

	picture = "event_battle"

	immidiate = {
		effect = { type = prestige scale = -0.25 }
		effect = { type = remove_regiment }
		effect = { type = random chance = 75
			effect = { type = remove_regiment }
		}
		effect = { type = random chance = 50
			effect = { type = remove_regiment }
		}
		effect = { type = random chance = 25
			effect = { type = remove_regiment }
		}
	}
}


character_event = {
	id = 5288

	picture = "event_moneycollection"

	action_a = {
		effect = { type = set_law value = feudal_contract_law }
		effect = { type = add_trait value = trusting }
	}
	action_b = {
		effect = { type = add_trait value = suspicious }
		effect = { type = add_trait for = random_vassal value = intestinal_worm }
		effect = { type = add_trait for = worst_vassal value = intestinal_worm }
	}
}

#character_event = {
#	id = 5289
#
#	picture = "event_claim"
#
#	action_a = {
#		effect = { type = prestige scale = -0.25 }
#		effect = { type = random chance = 5
#			effect = { type = trigger for = random_vassal value = 5252 }
#		}
#	}
#}

#character_event = {
#	id = 5290
#
#	picture = "event_claim"
#
#	action_a = {
#		effect = { type = prestige scale = -0.5 }
#		effect = { type = random chance = 10
#			effect = { type = trigger for = random_vassal value = 5252 }
#		}
#	}
#}