############################
#Enatic Vassalize All Events
#Modified for 1.102 by lockeslylcrit
############################

namespace = vassalize_enatic
character_event = {
	id = vassalize_enatic.250001
	desc = vassalize_enatic.250001.desc
	picture = "GFX_evt_council"
	
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						NOT = { tier = count }
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									is_feudal = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_republic = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
								AND = {
									is_feudal = no
									is_theocracy = yes
									tier = baron
									NOT = { tier = count }
									is_capital = no
								}
							}
						}
						grant_title = PREVPREV
					}
				}
			}
		}
########## Start of Counties ##########
		if = {
			limit = {
				any_demesne_province = {
					NOT = { has_province_flag = keep_it }
				}
				any_demesne_province = {
					has_province_flag = keep_it
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_province = {
						limit = {
							NOT = {	has_province_flag = keep_it }
						}
						county = {
							grant_title = PREVPREVPREV
						}
					}
				}
			}
		}
		if = {
			limit = {
				any_demesne_province = {
					NOT = { has_province_flag = keep_it }
				}
				any_demesne_province = {
					has_province_flag = keep_it
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_province = {
						limit = {
							NOT = {	has_province_flag = keep_it }
						}
						county = {
							grant_title = PREVPREVPREV
						}
					}
				}
			}
		}
		if = {
			limit = {
				any_demesne_province = {
					NOT = { has_province_flag = keep_it }
				}
				any_demesne_province = {
					has_province_flag = keep_it
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_province = {
						limit = {
							NOT = {	has_province_flag = keep_it }
						}
						county = {
							grant_title = PREVPREVPREV
						}
					}
				}
			}
		}
		if = {
			limit = {
				any_demesne_province = {
					NOT = { has_province_flag = keep_it }
				}
				any_demesne_province = {
					has_province_flag = keep_it
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_province = {
						limit = {
							NOT = {	has_province_flag = keep_it }
						}
						county = {
							grant_title = PREVPREVPREV
						}
					}
				}
			}
		}
		if = {
			limit = {
				any_demesne_province = {
					NOT = { has_province_flag = keep_it }
				}
				any_demesne_province = {
					has_province_flag = keep_it
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_province = {
						limit = {
							NOT = {	has_province_flag = keep_it }
						}
						county = {
							grant_title = PREVPREVPREV
						}
					}
				}
			}
		}
		if = {
			limit = {
				any_demesne_province = {
					NOT = { has_province_flag = keep_it }
				}
				any_demesne_province = {
					has_province_flag = keep_it
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_province = {
						limit = {
							NOT = {	has_province_flag = keep_it }
						}
						county = {
							grant_title = PREVPREVPREV
						}
					}
				}
			}
		}
		if = {
			limit = {
				any_demesne_province = {
					NOT = { has_province_flag = keep_it }
				}
				any_demesne_province = {
					has_province_flag = keep_it
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_province = {
						limit = {
							NOT = {	has_province_flag = keep_it }
						}
						county = {
							grant_title = PREVPREVPREV
						}
					}
				}
			}
		}
		if = {
			limit = {
				any_demesne_province = {
					NOT = { has_province_flag = keep_it }
				}
				any_demesne_province = {
					has_province_flag = keep_it
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_province = {
						limit = {
							NOT = {	has_province_flag = keep_it }
						}
						county = {
							grant_title = PREVPREVPREV
						}
					}
				}
			}
		}
		if = {
			limit = {
				any_demesne_province = {
					NOT = { has_province_flag = keep_it }
				}
				any_demesne_province = {
					has_province_flag = keep_it
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_province = {
						limit = {
							NOT = {	has_province_flag = keep_it }
						}
						county = {
							grant_title = PREVPREVPREV
						}
					}
				}
			}
		}
		if = {
			limit = {
				any_demesne_province = {
					NOT = { has_province_flag = keep_it }
				}
				any_demesne_province = {
					has_province_flag = keep_it
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_republic = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = no
						is_theocracy = yes
						tier = baron
						is_capital = no
					}
				}
				NOT = {
					any_demesne_title = {
						is_feudal = yes
						tier = baron
						is_capital = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = random
				female = yes
				religion = ROOT
				culture = ROOT
			}
			new_character = {
				set_defacto_liege = ROOT 
				remove_trait = ambitious
				liege = {
					random_demesne_province = {
						limit = {
							NOT = {	has_province_flag = keep_it }
						}
						county = {
							grant_title = PREVPREVPREV
						}
					}
				}
			}
		}
	}
	option = {
		name = vassalize_enatic.250001.opta
	}
}