# The entry should be named in the same way that the elective succession law is named to define it's voter's logic.
# Root scope - Voter, the character voting in the election
# From scope - Candidate, Character considered for the title
# FromFrom scope - The title the nomination is for
# FromFromFrom scope - The title owner's candidate
# The voter will vote for the top score candidate calculated from this script.

dynastic_elective = {

	elector_vote_strength = {
		days = 1
		additive_modifier = {
			FROMFROM = {
				has_law = cognatic_succession
			}
			ROOT = { is_female = no }
			value = 1 # An Elector which is not a female is worth an addtional 1 votes due to male preference
		}
		additive_modifier = {
			FROMFROM = {
				has_law = enatic_cognatic_succession
			}
			ROOT = { is_female = yes }
			value = 1 # An Elector which is indeed a female is worth an addtional 1 votes due to female preference
		}
	}
	candidate_vote_score = {
		days = 0
		##### FAMILY RELATIONS #####
		additive_modifier = {
			value = 30
			localisation_key = tooltip_my_child
			FROM = { is_child_of = ROOT }
			FROM = { is_female = no }
			FROM = {
				NOT = { character = ROOT }
			}
		}
		additive_modifier = {
			value = 30
			localisation_key = tooltip_my_parent
			FROM = { is_parent_of = ROOT }
			FROM = { is_female = no }
			FROM = {
				NOT = { character = ROOT }
			}
		}
		additive_modifier = {
			value = 30
			localisation_key = tooltip_my_sibling
			FROM = { sibling = ROOT }
			FROM = { is_female = no }
			FROM = {
				NOT = { character = ROOT }
			}
		}
		additive_modifier = {
			value = 10
			localisation_key = tooltip_my_aunt_uncle
			FROM = { is_aunt_uncle_of = ROOT }
			FROM = { is_female = no }
			FROM = {
				NOT = { character = ROOT }
			}
		}
		additive_modifier = {
			value = 10
			localisation_key = tooltip_my_niece_nephew
			FROM = { is_nibling_of = ROOT }
			FROM = { is_female = no }
			FROM = {
				NOT = { character = ROOT }
			}
		}
		additive_modifier = {
			value = 20
			localisation_key = tooltip_my_grandchild
			FROM = { is_grandchild_of = ROOT }
			FROM = { is_female = no }
			FROM = {
				NOT = { character = ROOT }
			}
		}
		additive_modifier = {
			value = 20
			localisation_key = tooltip_my_granparent
			FROM = { is_grandparent_of = ROOT }
			FROM = { is_female = no }
			FROM = {
				NOT = { character = ROOT }
			}
		}
		additive_modifier = {
			value = 30
			localisation_key = tooltip_my_child_female
			FROM = { is_child_of = ROOT }
			FROM = { is_female = yes }
			FROM = {
				NOT = { character = ROOT }
			}
		}
		additive_modifier = {
			value = 30
			localisation_key = tooltip_my_parent_female
			FROM = { is_parent_of = ROOT }
			FROM = { is_female = yes }
			FROM = {
				NOT = { character = ROOT }
			}
		}
		additive_modifier = {
			value = 30
			localisation_key = tooltip_my_sibling_female
			FROM = { sibling = ROOT }
			FROM = { is_female = yes }
			FROM = {
				NOT = { character = ROOT }
			}
		}
		additive_modifier = {
			value = 10
			localisation_key = tooltip_my_aunt_uncle_female
			FROM = { is_aunt_uncle_of = ROOT }
			FROM = { is_female = yes }
			FROM = {
				NOT = { character = ROOT }
			}
		}
		additive_modifier = {
			value = 10
			localisation_key = tooltip_my_niece_nephew_female
			FROM = { is_nibling_of = ROOT }
			FROM = { is_female = yes }
			FROM = {
				NOT = { character = ROOT }
			}
		}
		additive_modifier = {
			value = 20
			localisation_key = tooltip_my_grandchild_female
			FROM = { is_grandchild_of = ROOT }
			FROM = { is_female = yes }
			FROM = {
				NOT = { character = ROOT }
			}
		}
		additive_modifier = {
			value = 20
			localisation_key = tooltip_my_granparent_female
			FROM = { is_grandparent_of = ROOT }
			FROM = { is_female = yes }
			FROM = {
				NOT = { character = ROOT }
			}
		}
		##### Culture and Religion #####
		additive_modifier = {
			value = -20
			localisation_key = tooltip_feudal_elector_vote_stranger
			FROMFROM = { holder_scope = { culture = ROOT } } #Only a concern if Elector and current ruler share culture.
			NOT = { culture = FROM }
		}
		additive_modifier = {
			value = -40
			localisation_key = tooltip_feudal_elector_vote_foreigner
			FROMFROM = { holder_scope = { culture = ROOT } } #Only a concern if Elector and current ruler share culture.
			NOT = { culture_group = FROM }
		}
		additive_modifier = { #Praised for being baptized by Bishop
			value = 10
			localisation_key = tooltip_feudal_elector_vote_baptized_by_bishop
			NOT = { character = FROM } #Do not judge yourself.
			religion_group = christian
			FROM = { 
				trait = baptized_by_bishop
			}
		}
		additive_modifier = { #Praised for being baptized by Pope
			value = 20
			localisation_key = tooltip_feudal_elector_vote_baptized_by_pope
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				religion = catholic 
				religion = fraticelli
			} 
			religion = FROM
			FROM = { 
				trait = baptized_by_pope
			}
		}
		additive_modifier = { #Praised for being baptized by Patriarch
			value = 20
			localisation_key = tooltip_feudal_elector_vote_baptized_by_patriarch
			NOT = { character = FROM } #Do not judge yourself.
			religion = orthodox
			religion = FROM
			FROM = { 
				trait = baptized_by_patriarch
			}
		}
		additive_modifier = { #Praised for being Genius
			value = 50
			localisation_key = tooltip_dynastic_genius
			NOT = { character = FROM } #Do not judge yourself.
			FROM = { 
				trait = genius
			}
		}
		additive_modifier = { #Praised for being Quick
			value = 25
			localisation_key = tooltip_dynastic_quick
			NOT = { character = FROM } #Do not judge yourself.
			FROM = { 
				trait = quick
			}
		}
		additive_modifier = { #Praised for being Strong
			value = 40
			localisation_key = tooltip_dynastic_strong
			NOT = { character = FROM } #Do not judge yourself.
			FROM = { 
				trait = strong
			}
		}
		additive_modifier = { #Praised for being Attractive
			value = 25
			localisation_key = tooltip_dynastic_fair
			NOT = { character = FROM } #Do not judge yourself.
			FROM = { 
				trait = fair
			}
		}
		additive_modifier = { #Infidel
			value = -25
			localisation_key = tooltip_feudal_elector_vote_infidel
			NOT = { has_religion_feature = religion_cosmopolitan }
			NOT = { has_religion_feature = religion_dogmatic }
			NOT = { religion_group = indian_group }
			FROM = { 
				religion_group = ROOT
				NOT = { religion = ROOT } 
				NOT = { is_heresy_of = ROOT } 
			}
		}
		additive_modifier = { #Heathen
			value = -50
			localisation_key = tooltip_feudal_elector_vote_heathen
			NOT = { has_religion_feature = religion_cosmopolitan }
			NOT = { has_religion_feature = religion_dogmatic }
			NOT = { religion_group = indian_group }
			NOR = { 
				AND = {  
					trait = sympathy_christendom
					FROM = { religion_group = christian } 
				} 
				AND = {  
					trait = sympathy_islam
					FROM = { religion_group = muslim } 
				} 
				AND = {  
					trait = sympathy_pagans
					FROM = { religion_group = pagan_group } 
				} 
				AND = {  
					trait = sympathy_zoroastrianism
					FROM = { religion_group = zoroastrian_group } 
				} 
				AND = {  
					trait = sympathy_judaism
					FROM = { religion_group = jewish_group } 
				} 
				AND = {  
					trait = sympathy_indian
					FROM = { religion_group = indian_group } 
				} 
			}
			FROM = { 
				NOT = { religion_group = ROOT } 
				NOT = { is_heresy_of = ROOT } 
			}
		}
		additive_modifier = { #Heretic
			value = -50
			localisation_key = tooltip_feudal_elector_vote_heretic
			NOT = { has_religion_feature = religion_cosmopolitan }
			NOT = { has_religion_feature = religion_dogmatic }
			NOT = { religion_group = indian_group }
			FROM = { is_heresy_of = ROOT }
		}
		additive_modifier = { #Dogmatics will hardly ever pick an infidel.
			value = -100
			localisation_key = tooltip_feudal_elector_vote_heathen_dogmatic
			has_religion_feature = religion_dogmatic
			FROM = { NOT = { religion = ROOT } }
		}
		##### The Seven Virtues #####
		additive_modifier = { #Praised for being Chaste
			value = 15
			localisation_key = tooltip_feudal_elector_vote_chaste_positive
			NOT = { character = FROM } #Do not judge yourself.
			religion_group = christian
			NOT = { trait = lustful }
			FROM = { 
				trait = chaste
			}
		}
		additive_modifier = { #Shunned for being Chaste
			value = -15
			localisation_key = tooltip_feudal_elector_vote_chaste_negative
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				trait = lustful 
				AND = { 
					religion_group = pagan_group
					NOT = { religion = bon }
					NOT = { religion = bon_reformed }
					NOT = { religion = hellenic_pagan }
					NOT = { religion = hellenic_pagan_reformed }
				}
			}
			NOT = { trait = chaste }
			FROM = { 
				trait = chaste
			}
		}
		additive_modifier = { #Praised for being Temperate
			value = 15
			localisation_key = tooltip_feudal_elector_vote_temperate_positive
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				religion_group = christian 
				religion_group = muslim
				religion_group = jewish_group
				religion_group = indian_group
				religion = hellenic_pagan
				religion = hellenic_pagan_reformed
				religion = bon
				religion = bon_reformed
			}
			NOT = { trait = gluttonous }
			FROM = { 
				trait = temperate
			}
		}
		additive_modifier = { #Shunned for being Temperate
			value = -15
			localisation_key = tooltip_feudal_elector_vote_temperate_negative
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				trait = gluttonous
				AND = { 
					religion_group = pagan_group
					NOT = { religion = bon }
					NOT = { religion = bon_reformed }
					NOT = { religion = hellenic_pagan }
					NOT = { religion = hellenic_pagan_reformed }
				}
			}
			NOT = { trait = temperate }
			FROM = { 
				trait = temperate
			}
		}
		additive_modifier = { #Praised for being Charitable
			value = 15
			localisation_key = tooltip_feudal_elector_vote_charitable_positive
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				religion_group = christian 
				religion_group = muslim
			}
			NOT = { trait = greedy }
			FROM = { 
				trait = charitable
			}
		}
		additive_modifier = { #Shunned for being Charitable
			value = -15
			localisation_key = tooltip_feudal_elector_vote_charitable_negative
			NOT = { character = FROM } #Do not judge yourself.
			trait = greedy
			FROM = { 
				trait = charitable
			}
		}
		additive_modifier = { #Praised for being Diligent
			value = 15
			localisation_key = tooltip_feudal_elector_vote_diligent_positive
			NOT = { character = FROM } #Do not judge yourself.
			NOT = { trait = slothful }
			FROM = { 
				trait = diligent
			}
		}
		additive_modifier = { #Shunned for being Diligent
			value = -15
			localisation_key = tooltip_feudal_elector_vote_diligent_negative
			NOT = { character = FROM } #Do not judge yourself.
			trait = slothful
			FROM = { 
				trait = diligent
			}
		}
		additive_modifier = { #Praised for being Patient
			value = 15
			localisation_key = tooltip_feudal_elector_vote_patient_positive
			NOT = { character = FROM } #Do not judge yourself.
			NOR = { 
				trait = wroth
				this_is_warrior_culture_trigger = yes
			}
			FROM = { 
				trait = patient
			}
		}
		additive_modifier = { #Shunned for being Patient
			value = -15
			localisation_key = tooltip_feudal_elector_vote_patient_negative
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				trait = wroth
				this_is_warrior_culture_trigger = yes
			}
			FROM = { 
				trait = patient
			}
		}
		additive_modifier = { #Praised for being Kind
			value = 25
			localisation_key = tooltip_feudal_elector_vote_kind_positive
			NOT = { character = FROM } #Do not judge yourself.
			is_benevolent_trigger = yes
			FROM = { 
				is_benevolent_trigger = yes
			}
		}
		additive_modifier = { #Shunned for being Kind
			value = -25
			localisation_key = tooltip_feudal_elector_vote_kind_negative
			NOT = { character = FROM } #Do not judge yourself.
			is_evil_trigger = yes
			FROM = { 
				is_benevolent_trigger = yes
			}
		}
		additive_modifier = { #Praised for being Humble
			value = 15
			localisation_key = tooltip_feudal_elector_vote_humble_positive
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				religion_group = christian
				religion_group = muslim
				religion_group = jewish_group
				religion_group = indian_group
				religion = bon
				religion = bon_reformed
			}
			NOR = { 
				trait = proud 
				trait = envious
			}
			FROM = { 
				trait = humble
			}
		}
		additive_modifier = { #Shunned for being Humble
			value = -15
			localisation_key = tooltip_feudal_elector_vote_humble_negative
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				AND = { 
					religion_group = pagan_group
					NOT = { religion = bon }
					NOT = { religion = bon_reformed }
					NOT = { religion = hellenic_pagan }
					NOT = { religion = hellenic_pagan_reformed }
				}
				trait = proud
				trait = envious
			}
			FROM = { 
				trait = humble
			}
		}
		##### The Seven Sins #####
		additive_modifier = { #Praised for being Lustful
			value = 15
			localisation_key = tooltip_feudal_elector_vote_lustful_positive
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				AND = { 
					religion_group = pagan_group
					NOT = { religion = bon }
					NOT = { religion = bon_reformed }
					NOT = { religion = hellenic_pagan }
					NOT = { religion = hellenic_pagan_reformed }
				}
				trait = lustful
				trait = hedonist
			}
			FROM = { 
				trait = lustful
			}
		}
		additive_modifier = { #Shunned for being Lustful - Male
			value = -15
			localisation_key = tooltip_feudal_elector_vote_lustful_negative
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				religion_group = christian
				religion_group = muslim
				religion_group = jewish_group
			}
			OR = { 
				trait = arbitrary #No need for consistency
				NOR = { 
					trait = lustful
					trait = hedonist
				}
			}
			FROM = { 
				trait = lustful
			}
		}
		additive_modifier = { #Praised for being Gluttonous
			value = 15
			localisation_key = tooltip_feudal_elector_vote_gluttonous_positive
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				AND = { 
					religion_group = pagan_group
					NOT = { religion = bon }
					NOT = { religion = bon_reformed }
					NOT = { religion = hellenic_pagan }
					NOT = { religion = hellenic_pagan_reformed }
				}
				trait = gluttonous
				trait = hedonist
			}
			FROM = { 
				trait = gluttonous
			}
		}
		additive_modifier = { #Shunned for being Gluttonous
			value = -15
			localisation_key = tooltip_feudal_elector_vote_gluttonous_negative
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				religion_group = christian
				religion_group = muslim
				religion_group = jewish_group
			}
			OR = { 
				trait = arbitrary #No need for consistency
				NOR = { 
					trait = gluttonous
					trait = hedonist
				}
			}
			FROM = { 
				trait = gluttonous
			}
		}
		additive_modifier = { #Praised for being Greedy
			value = 15
			localisation_key = tooltip_feudal_elector_vote_greedy_positive
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				AND = { 
					religion_group = pagan_group
					NOT = { religion = bon }
					NOT = { religion = bon_reformed }
				}
				trait = greedy
			}
			FROM = { 
				trait = greedy
			}
		}
		additive_modifier = { #Shunned for being Greedy
			value = -15
			localisation_key = tooltip_feudal_elector_vote_greedy_negative
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				religion_group = christian
				religion_group = muslim
				religion_group = indian_group
			}
			OR = { 
				trait = arbitrary #No need for consistency
				NOT = { trait = greedy }
			}
			FROM = { 
				trait = greedy
			}
		}
		additive_modifier = { #Praised for being Slothful
			value = 15
			localisation_key = tooltip_feudal_elector_vote_slothful_positive
			NOT = { character = FROM } #Do not judge yourself.
			trait = slothful
			FROM = { 
				trait = slothful
			}
		}
		additive_modifier = { #Shunned for being Slothful
			value = -15
			localisation_key = tooltip_feudal_elector_vote_slothful_negative
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				trait = arbitrary #No need for consistency
				NOT = { trait = slothful }
			}
			FROM = { 
				trait = slothful
			}
		}
		additive_modifier = { #Praised for being Wroth
			value = 15
			localisation_key = tooltip_feudal_elector_vote_wroth_positive
			NOT = { character = FROM } #Do not judge yourself.
			this_is_warrior_culture_trigger = yes
			FROM = { 
				trait = wroth
			}
		}
		additive_modifier = { #Shunned for being Wroth
			value = -15
			localisation_key = tooltip_feudal_elector_vote_wroth_negative
			NOT = { character = FROM } #Do not judge yourself.
			this_is_warrior_culture_trigger = no
			FROM = { 
				trait = wroth
			}
		}
		additive_modifier = { #Shunned for being Evil
			value = -25
			localisation_key = tooltip_feudal_elector_vote_evil_negative
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				trait = arbitrary #No need for consistency
				NOT = { is_evil_trigger = yes }
			}
			FROM = { 
				is_evil_trigger = yes
			}
		}
		additive_modifier = { #Praised for being Proud
			value = 15
			localisation_key = tooltip_feudal_elector_vote_proud_positive
			NOT = { character = FROM } #Do not judge yourself.
			religion_group = pagan_group
			NOR = { 
				religion = bon
				religion = bon_reformed
				trait = humble
			}
			FROM = { 
				trait = proud
			}
		}
		additive_modifier = { #Shunned for being Proud
			value = -15
			localisation_key = tooltip_feudal_elector_vote_proud_negative
			NOT = { character = FROM } #Do not judge yourself.
			OR = { 
				religion_group = christian
				religion_group = muslim
				religion_group = indian_group
				religion_group = jewish_group
			}
			OR = { 
				trait = arbitrary #No need for consistency
				trait = humble
				AND = { 
					is_theocracy = yes 
					NOT = { trait = proud } 
				}
			}
			FROM = { 
				trait = proud
			}
		}
		##### Opinions #####
		additive_modifier = {
			value = -150
			localisation_key = tooltip_dynastic_rival
			NOT = { character = FROM } #But not if it's me.
			is_rival = FROM
		}
		additive_modifier = {
			value = -100
			localisation_key = tooltip_feudal_elector_vote_opinion_negative
			NOT = { character = FROM } #But not if it's me.
			NOT = { is_rival = FROM } #Special case
			NOT = {
				opinion = {
					who = FROM
					value = -75 
				}
			}
		}
		additive_modifier = {
			value = -50
			localisation_key = tooltip_feudal_elector_vote_opinion_negative
			NOT = { character = FROM } #But not if it's me.
			NOT = { is_rival = FROM } #Special case
			NOT = {
				opinion = {
					who = FROM
					value = -50  
				}
			}
			opinion = {
				who = FROM
				value = -75 
			}
		}
		additive_modifier = {
			value = -30
			localisation_key = tooltip_feudal_elector_vote_opinion_negative
			NOT = { character = FROM } #But not if it's me.
			NOT = { is_rival = FROM } #Special case
			NOT = {
				opinion = {
					who = FROM
					value = -25
				}
			}
			opinion = {
				who = FROM
				value = -50
			}
		}
		additive_modifier = {
			value = -15
			localisation_key = tooltip_feudal_elector_vote_opinion_negative
			NOT = { character = FROM } #But not if it's me.
			NOT = { is_rival = FROM } #Special case
			NOT = {
				opinion = {
					who = FROM
					value = 0
				}
			}
			opinion = {
				who = FROM
				value = -25 
			}
		}
		additive_modifier = {
			value = 15
			localisation_key = tooltip_feudal_elector_vote_opinion_positive
			NOT = { character = FROM } #But not if it's me.
			NOT = { is_rival = FROM } #Special case
			opinion = {
				who = FROM
				value = 0
			}
			NOT = {
				opinion = {
					who = FROM
					value = 25
				}
			}
		}
		additive_modifier = {
			value = 30
			localisation_key = tooltip_feudal_elector_vote_opinion_positive
			NOT = { character = FROM } #But not if it's me.
			NOT = { is_rival = FROM } #Special case
			opinion = {
				who = FROM
				value = 25
			}
			NOT = {
				opinion = {
					who = FROM
					value = 50
				}
			}
		}
		additive_modifier = {
			value = 50
			localisation_key = tooltip_feudal_elector_vote_opinion_positive
			NOT = { character = FROM } #But not if it's me.
			NOT = { is_rival = FROM } #Special case
			opinion = {
				who = FROM
				value = 50
			}
			NOT = {
				opinion = {
					who = FROM
					value = 75 
				}
			}
		}
		additive_modifier = {
			value = 70
			localisation_key = tooltip_feudal_elector_vote_opinion_positive
			NOT = { character = FROM } #But not if it's me.
			NOT = { is_rival = FROM } #Special case
			opinion = {
				who = FROM
				value = 75
			}
		}
		additive_modifier = {
			value = 100
			localisation_key = tooltip_dynastic_friend
			NOT = { character = FROM } #But not if it's me.
			is_friend = FROM
		}
		additive_modifier = {
			value = 100
			localisation_key = tooltip_dynastic_lover
			NOT = { character = FROM } #But not if it's me.
			is_lover = FROM
		}
		##### Ruler's traits ######
		#Ruler is lunatic, vote against his pick
		additive_modifier = {
			value = -10
			localisation_key = tooltip_feudal_elector_anti_vote_ruler_lunatic
			FROM = { character = ROOT_FROMFROMFROM }
			NOT = { character = FROM } #But not if it's me.
			NOR = {
				trait = lunatic #Don't care
				trait = possessed #Don't care
				trait = arbitrary #Don't care
				trait = zealous #Might be the gods speaking
			}
			FROMFROM = { 
				holder_scope = {
					trait = lunatic
				} 
			}
		}
		#Ruler is possessed, vote against his pick
		additive_modifier = {
			value = -10
			localisation_key = tooltip_feudal_elector_anti_vote_ruler_possessed
			FROM = { character = ROOT_FROMFROMFROM }
			NOT = { character = FROM } #But not if it's me.
			trait = zealous
			NOR = {
				trait = lunatic #Don't care
				trait = possessed #Don't care
				trait = arbitrary #Don't care
			}
			FROMFROM = { 
				holder_scope = {
					trait = possessed
				} 
			}
		}

		#Ruler is just, trust his pick
		additive_modifier = {
			value = 25
			localisation_key = tooltip_feudal_elector_pro_vote_ruler_just
			FROM = { character = ROOT_FROMFROMFROM }
			NOT = { character = FROM } #But not if it's me.
			NOR = {
				trait = lunatic #Don't care
				trait = possessed #Don't care
				trait = arbitrary #Don't like it
			}
			FROMFROM = { 
				holder_scope = {
					trait = just
				} 
			}
		}
		#Ruler is a Tyrant (Opinion), vote against his pick
		additive_modifier = {
			value = -25
			localisation_key = tooltip_feudal_elector_anti_vote_ruler_tyrant
			FROM = { character = ROOT_FROMFROMFROM }
			NOT = { character = FROM } #But not if it's me.
			NOR = {
				trait = lunatic #Don't care
				trait = possessed #Don't care
				trait = arbitrary #Don't care
			}
			FROMFROM = { 
				holder_scope = {
					ROOT = {
						has_opinion_modifier = {
							modifier = opinion_tyrant
							who = PREV
						} 
					} 
				} 
			}
		}
		
		#Ruler is genius, trust his pick
		additive_modifier = {
			value = 50
			localisation_key = tooltip_dynastic_genius_ruler
			FROM = { character = ROOT_FROMFROMFROM }
			NOT = { character = FROM } #But not if it's me.
			NOR = {
				trait = lunatic #Don't care
				trait = possessed #Don't care
				trait = arbitrary #Don't like it
			}
			FROMFROM = { 
				holder_scope = {
					trait = genius
				} 
			}
		}
		
		#Ruler is quick, trust his pick
		additive_modifier = {
			value = 25
			localisation_key = tooltip_dynastic_quick_ruler
			FROM = { character = ROOT_FROMFROMFROM }
			NOT = { character = FROM } #But not if it's me.
			NOR = {
				trait = lunatic #Don't care
				trait = possessed #Don't care
				trait = arbitrary #Don't like it
			}
			FROMFROM = { 
				holder_scope = {
					trait = quick
				} 
			}
		}
		##### Elector voting himself #####
		additive_modifier = {
			value = 15
			localisation_key = tooltip_feudal_elector_vote_myself
			character = FROM
			NOR = {
				trait = humble
				trait = content
				trait = craven
				trait = slothful
				trait = stressed
				trait = depressed
				trait = ambitious
			}
			NOT = { 
				FROMFROM = { 
					holder_scope = { 
						is_parent_of = ROOT
					} 
				}
			}
		}
		additive_modifier = {
			value = -25
			localisation_key = tooltip_feudal_elector_vote_not_myself
			character = FROM
			NOT = { trait = ambitious }
			OR = {
				trait = humble
				trait = content
				trait = craven
				trait = slothful
				trait = stressed
				trait = depressed
			}
		}
		additive_modifier = {
			value = 40
			localisation_key = tooltip_feudal_elector_vote_myself_heir
			character = FROM
			NOR = {
				trait = humble
				trait = content
				trait = craven
				trait = slothful
				trait = stressed
				trait = depressed
				trait = ambitious
			}
			FROMFROM = { 
				holder_scope = { 
					is_parent_of = ROOT
				} 
			}
		}
		additive_modifier = {
			value = 40
			localisation_key = tooltip_feudal_elector_vote_myself_ambitious
			character = FROM
			trait = ambitious
			is_adult = yes
		}
		additive_modifier = {
			value = 40
			localisation_key = tooltip_dynastic_ruler_close
			character = FROM
			FROMFROM = {
				holder_scope = {
					is_close_relative = FROM
				}
			}
			is_adult = yes
		}
		##### Raw Opinion bonus towards Ruler #####
		additive_modifier = { #Vassal hates ruler, therefore votes against the ruler's candidate (FROMFROMFROM)
			value = -30
			localisation_key = tooltip_feudal_elector_anti_vote_ruler_opinion_negative
			FROM = { character = ROOT_FROMFROMFROM }
			NOT = { character = FROM } #But not if it's me.
			FROMFROM = { 
				holder_scope = {
					NOT = { character = ROOT } #Of course you trust your own opinion of your candidate...
					NOT = { 
						reverse_opinion = { who = ROOT value = -75 } 
					} 
				} 
			}
		}
		additive_modifier = { #Vassal hates ruler, therefore votes against the ruler's candidate (FROMFROMFROM)
			value = -20
			localisation_key = tooltip_feudal_elector_anti_vote_ruler_opinion_negative
			FROM = { character = ROOT_FROMFROMFROM }
			NOT = { character = FROM } #But not if it's me.
			FROMFROM = { 
				holder_scope = {
					NOT = { character = ROOT } #Of course you trust your own opinion of your candidate...
					NOT = { 
						reverse_opinion = { who = ROOT value = -50 } 
					} 
					reverse_opinion = { who = ROOT value = -75 } 
				} 
			}
		}
		additive_modifier = { #Vassal hates ruler, therefore votes against the ruler's candidate (FROMFROMFROM)
			value = -10
			localisation_key = tooltip_feudal_elector_anti_vote_ruler_opinion_negative
			FROM = { character = ROOT_FROMFROMFROM }
			NOT = { character = FROM } #But not if it's me.
			FROMFROM = { 
				holder_scope = {
					NOT = { character = ROOT } #Of course you trust your own opinion of your candidate...
					NOT = { 
						reverse_opinion = { who = ROOT value = -25 } 
					} 
					reverse_opinion = { who = ROOT value = -50 } 
				} 
			}
		}
		additive_modifier = { #Vassal hates ruler, therefore votes against the ruler's candidate (FROMFROMFROM)
			value = -5
			localisation_key = tooltip_feudal_elector_anti_vote_ruler_opinion_negative
			FROM = { character = ROOT_FROMFROMFROM }
			NOT = { character = FROM } #But not if it's me.
			FROMFROM = { 
				holder_scope = {
					NOT = { character = ROOT } #Of course you trust your own opinion of your candidate...
					NOT = { 
						reverse_opinion = { who = ROOT value = 0 } 
					} 
					reverse_opinion = { who = ROOT value = -25 } 
				} 
			}
		}
		additive_modifier = { #Vassal loves ruler, therefore votes for the ruler's candidate (FROMFROMFROM)
			value = 5
			localisation_key = tooltip_feudal_elector_pro_vote_ruler_opinion_positive
			FROM = { character = ROOT_FROMFROMFROM }
			NOT = { character = FROM } #But not if it's me.
			FROMFROM = { 
				holder_scope = {
					NOT = { character = ROOT } #Of course you trust your own opinion of your candidate...
					reverse_opinion = { who = ROOT value = 0 } 
					NOT = { 
						reverse_opinion = { who = ROOT value = 25 } 
					} 
				} 
			}
		}
		additive_modifier = { #Vassal loves ruler, therefore votes for the ruler's candidate (FROMFROMFROM)
			value = 20
			localisation_key = tooltip_feudal_elector_pro_vote_ruler_opinion_positive
			FROM = { character = ROOT_FROMFROMFROM }
			NOT = { character = FROM } #But not if it's me.
			FROMFROM = { 
				holder_scope = {
					NOT = { character = ROOT } #Of course you trust your own opinion of your candidate...
					reverse_opinion = { who = ROOT value = 25 } 
					NOT = { 
						reverse_opinion = { who = ROOT value = 50 } 
					} 
				} 
			}
		}
		additive_modifier = { #Vassal loves ruler, therefore votes for the ruler's candidate (FROMFROMFROM)
			value = 40
			localisation_key = tooltip_feudal_elector_pro_vote_ruler_opinion_positive
			FROM = { character = ROOT_FROMFROMFROM }
			NOT = { character = FROM } #But not if it's me.
			FROMFROM = { 
				holder_scope = {
					NOT = { character = ROOT } #Of course you trust your own opinion of your candidate...
					reverse_opinion = { who = ROOT value = 50 } 
					NOT = { 
						reverse_opinion = { who = ROOT value = 75 } 
					} 
				} 
			}
		}
		additive_modifier = { #Vassal loves ruler, therefore votes for the ruler's candidate (FROMFROMFROM)
			value = 60
			localisation_key = tooltip_feudal_elector_pro_vote_ruler_opinion_positive
			FROM = { character = ROOT_FROMFROMFROM }
			NOT = { character = FROM } #But not if it's me.
			FROMFROM = { 
				holder_scope = {
					NOT = { character = ROOT } #Of course you trust your own opinion of your candidate...
					reverse_opinion = { who = ROOT value = 75 } 
				} 
			}
		}
	}
	elector_selection = {
		days = -5
		additive_modifier = {
			value = 10
			character = FROMFROM
		}
		additive_modifier = {
			value = 10
			FROMFROM = { 
				holder_scope = {
					dynasty = ROOT
				}
			}
		}
		additive_modifier = {
			value = -10
			is_adult = no
		}
		additive_modifier = {
			FROMFROM = {
				has_law = enatic_succession
			}
			ROOT = { is_female = no }
			value = -15
		}
		additive_modifier = {
			FROMFROM = {
				has_law = agnatic_succession
			}
			ROOT = { is_female = yes }
			value = -15
		}
	}
	candidate_trigger = {
		NOT = { character = FROM } #Not the current ruler.
		FROM = {
			NOR = {
				trait = crusader_king 
				trait = crusader_queen
			} 
		}
		dynasty = FROM
		FROM = {
			OR = { #Candidate should not be a landless Courtier that is about to inherit a Theocracy or Republic
				AND = {
					is_ruler = yes
					is_landed = yes
					is_republic = no
					is_merchant_republic = no
					is_theocracy = no
				}
				NOR = {
					any_heir_title = {
						is_republic = yes
					}
					any_heir_title = {
						is_merchant_republic = yes
					}
					any_heir_title = {
						is_theocracy = yes
					}
				}
			}
			OR = { #If the title controls the religion, candidates must be of the same religion.
				ROOT = { 
					NOT = { 
						controls_religion = yes
					}
				}
				religion = ROOT
			}
			NOR = {
				trait = cat
				trait = disinherited
				trait = horse
				trait = eunuch
				trait = bastard
				is_ascetic_trigger = yes
				is_theocracy = yes
				is_republic = yes
				is_merchant_republic = yes
			}
		}
	}
}