namespace = ALY


character_event = {
	id = ALY.9000
	
	hide_window = yes
	
	is_triggered_only = yes
	only_rulers = yes
	
	trigger = {
		is_tributary = yes
		any_demesne_title = {
			is_vice_royalty = yes
		}

	}
	
	immediate = {
		any_suzerain = {
			remove_tributary = ROOT
		}
	}
}

character_event = {
	id = ALY.1000

	only_independent = yes
	only_playable = yes
	hide_window = yes
	
	trigger = {
		is_nomadic = no
		war = no
		has_regent = no
		holy_order = no
		mercenary = no
		is_tributary = no
		NOT = {controls_religion = yes}
		primary_title = {
			temporary = no
		}
		num_of_count_titles = 1
		ai = yes
		NOT = {has_character_modifier = dipcd}
		NOT = {culture = mongol}
	}
	
	mean_time_to_happen = {
		months = 12
		modifier = {
			factor = 10
			trait = content
		}
		modifier = {
			factor = 0.5
			trait = ambitious
		}
	}
	
	immediate = {
		random_independent_ruler = {
			limit = {
				war = no
				higher_tier_than = DUKE
				is_tributary = no
				NOT = {character = ROOT}
				culture_group = ROOT
				has_regent = no
				holy_order = no
				mercenary = no
				is_nomadic = no
				is_tributary = no
				NOT = {controls_religion = yes}
				NOT = {has_non_aggression_pact_with = ROOT}
				NOT = {same_realm = ROOT}
				NOT = {has_character_modifier = dip_rec}
				NOT = {
					has_opinion_modifier = {
						modifier = diplo_challenge
						who = ROOT
					}
				}
				is_within_diplo_range = ROOT
			}
			ROOT = {
				add_character_modifier = {
					name = dipcd
					duration = 365
					hidden = yes
				}
			}
			add_character_modifier = {
				name = dip_rec
				duration = 365
				hidden = yes
			}
			opinion = {
				modifier = diplo_challenge
				who = FROM
				months = 1200
			}
			character_event = {
				id = ALY.1001
				days = 1
			}
		}
	}
}

character_event = {
	id = ALY.1001
	desc = ALY1001	
	picture = GFX_evt_throne_room
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { #Accept negotiation
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				same_realm = FROM
			}
			modifier = {
				factor = 2
				FROM = {independent = yes}
			}
		}
		name = ALY1001A
		FROM = {
			character_event = {
				id = ALY.102
				days = 1
				tooltip = negot_tooltip_accept
			}
		}
	}
	
	option = { #Decline negotiation
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2.0
				NOT= {religion = FROM}
			}
			modifier = {
				factor = 2.0
				NOT= {religion_group = FROM}
			}
			modifier = {
				factor = 2.0
				NOT= {culture = FROM}
			}
			modifier = {
				factor = 2.0
				NOT= {culture_group = FROM}
			}
			modifier = {
				factor = 0.5
				trait = gregarious #Social
			}
			modifier = {
				factor = 4
				trait = shy
			}
			modifier = {
				factor = 2
				independent = no
			}
			modifier = {
				factor = 0.75 #Odds are good
				attribute_diff = {
					character = FROM
					attribute = diplomacy
					value = 1
				}
			}
			modifier = {
				factor = 1.5 #Odds are bad
				FROM = {
					attribute_diff = {
						character = ROOT
						attribute = diplomacy
						value = 10
					}
				}
			}
		}
		name = ALY1001B
		FROM = {
			letter_event = {
				id = ALY.101
				days = 1
				tooltip = negot_tooltip_decline
			}
		}
	}
}


character_event = {
	id = ALY.100
	desc = ALY100	
	picture = GFX_evt_throne_room
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { #Accept negotiation
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				same_realm = FROMFROM
			}
			modifier = {
				factor = 2
				FROMFROM = {independent = yes}
			}
		}
		name = ALY100A
		FROMFROM = {
			character_event = {
				id = ALY.102
				days = 1
				tooltip = negot_tooltip_accept
			}
		}
	}
	
	option = { #Decline negotiation
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2.0
				NOT= {religion = FROMFROM}
			}
			modifier = {
				factor = 2.0
				NOT= {religion_group = FROMFROM}
			}
			modifier = {
				factor = 2.0
				NOT= {culture = FROMFROM}
			}
			modifier = {
				factor = 2.0
				NOT= {culture_group = FROMFROM}
			}
			modifier = {
				factor = 0.5
				trait = gregarious #Social
			}
			modifier = {
				factor = 4
				trait = shy
			}
			modifier = {
				factor = 2
				independent = no
			}
			modifier = {
				factor = 0.75 #Odds are good
				attribute_diff = {
					character = FROMFROM
					attribute = diplomacy
					value = 1
				}
			}
			modifier = {
				factor = 1.5 #Odds are bad
				FROMFROM = {
					attribute_diff = {
						character = ROOT
						attribute = diplomacy
						value = 10
					}
				}
			}
		}
		name = ALY100B
		FROMFROM = {
			letter_event = {
				id = ALY.101
				days = 1
				tooltip = negot_tooltip_decline
			}
		}
	}
}


letter_event = {
	id = ALY.101
	desc = ALY101
	#picture = GFX_evt_emissary
	border = GFX_event_letter_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = ALY101A #I was rejected
	}
}


character_event = {
	id = ALY.102
	desc = ALY102	
	picture = GFX_evt_rival_rulers
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = { #Aggressive Diplomacy: Tribute or Friend or Rivals or Negative Opinions; HoL DLC Required for Tributes
		ai_chance = {
			factor = 30
			modifier = {
				factor = 2
				diplomacy = 12
			}
			modifier = {
				factor = 0.5
				trait = shy
			}
		}
		random_list = {
			20 = { #Tribute
				modifier = {
					factor = 0
					same_realm = FROM
				}
				modifier = {
					factor = 0
					NOT = {
						FROM = {
							tier = ROOT
						}
					}
				}
				modifier = {
					factor = 0
					OR = {
						NOT = {has_dlc = "Horse Lords"}
						is_tributary = yes
						FROM = {is_tributary = yes}
						# lower_tier_than = FROM
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 1
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 2
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 3
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 4
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 5
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 6
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 7
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 8
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 9
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 10
					}
				}
				modifier = {
					factor = 1.4
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 12
					}
				}
				modifier = {
					factor = 1.4
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 14
					}
				}
				modifier = {
					factor = 1.4
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 16
					}
				}
				modifier = {
					factor = 1.4
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 18
					}
				}
				modifier = {
					factor = 1.4
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 20
					}
				}
				FROM = {character_event = {id = ALY.111 days = 1 tooltip = negot_gain_tribute}}
			}
			
			20 = { #Become Tribute
				modifier = {
					factor = 0
					same_realm = FROM
				}
				modifier = {
					factor = 0
					NOT = {
						FROM = {
							tier = ROOT
						}
					}
				}
				modifier = {
					factor = 0
					OR = {
						NOT = {has_dlc = "Horse Lords"}
						is_tributary = yes
						FROM = {is_tributary = yes}
						# higher_tier_than = FROM
					}
				}
				modifier = {
					factor = 1.3
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = diplomacy
							value = 1
						}
					}
				}
				modifier = {
					factor = 1.3
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = diplomacy
							value = 2
						}
					}
				}
				modifier = {
					factor = 1.3
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = diplomacy
							value = 3
						}
					}
				}
				modifier = {
					factor = 1.3
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = diplomacy
							value = 4
						}
					}
				}
				modifier = {
					factor = 1.3
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = diplomacy
							value = 5
						}
					}
				}
				modifier = {
					factor = 1.3
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = diplomacy
							value = 6
						}
					}
				}
				modifier = {
					factor = 1.3
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = diplomacy
							value = 7
						}
					}
				}
				modifier = {
					factor = 1.3
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = diplomacy
							value = 8
						}
					}
				}
				modifier = {
					factor = 1.3
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = diplomacy
							value = 9
						}
					}
				}
				modifier = {
					factor = 1.3
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = diplomacy
							value = 10
						}
					}
				}
				modifier = {
					factor = 1.4
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = diplomacy
							value = 12
						}
					}
				}
				modifier = {
					factor = 1.4
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = diplomacy
							value = 14
						}
					}
				}
				modifier = {
					factor = 1.4
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = diplomacy
							value = 16
						}
					}
				}
				modifier = {
					factor = 1.4
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = diplomacy
							value = 18
						}
					}
				}
				modifier = {
					factor = 1.4
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = diplomacy
							value = 20
						}
					}
				}
				FROM = {character_event = {id = ALY.116 days = 1 tooltip = negot_lose_tribute}}
			}
			10 = {
				modifier = {
					factor = 2.0
					trait = patient
				}
				modifier = {
					factor = 2.0
					trait = kind
				}
				modifier = {
					factor = 2.0
					trait = gregarious
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 1
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 2
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 3
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 4
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 5
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 6
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 7
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 8
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 9
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 10
					}
				}
				modifier = {
					factor = 1.4
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 12
					}
				}
				modifier = {
					factor = 1.4
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 14
					}
				}
				modifier = {
					factor = 1.4
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 16
					}
				}
				modifier = {
					factor = 1.4
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 18
					}
				}
				modifier = {
					factor = 1.4
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 20
					}
				}
				modifier = {
					factor = 3
					opinion = {
						value = 50
						who = FROM
					}
					reverse_opinion = {
						value = 50
						who = FROM
					}
				}
				FROM = {character_event = {id = ALY.112 days = 1 tooltip = negot_friends}}
			}
			25 = {
				modifier = {
					factor = 2.0
					trait = wroth
				}
				modifier = {
					factor = 2.0
					trait = proud
				}
				FROM = {character_event = {id = ALY.113 days = 1 tooltip = negot_rivals}}
			}
			25 = {
				FROM = {character_event = {id = ALY.114 days = 1 tooltip = negot_negative}}
			}
		}
		name = ALY102A
	}
	
	option = { #Kind Approach: Friend or Positive Opinions or Native Opinion
		ai_chance = {
			factor = 30
			modifier = {
				factor = 2.5
				trait = gregarious
			}
			modifier = {
				factor = 2.5
				trait = kind
			}
		}
		random_list = {
			10 = { #Friend
				modifier = {
					factor = 3
					opinion = {
						value = 50
						who = FROM
					}
					reverse_opinion = {
						value = 50
						who = FROM
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 1
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 2
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 3
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 4
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 5
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 6
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 7
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 8
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 9
					}
				}
				modifier = {
					factor = 1.3
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 10
					}
				}
				modifier = {
					factor = 1.4
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 12
					}
				}
				modifier = {
					factor = 1.4
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 14
					}
				}
				modifier = {
					factor = 1.4
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 16
					}
				}
				modifier = {
					factor = 1.4
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 18
					}
				}
				modifier = {
					factor = 1.4
					attribute_diff = {
						character = FROM
						attribute = diplomacy
						value = 20
					}
				}
				FROM = {character_event = {id = ALY.112 days = 1 tooltip = negot_friends}}
			}
			
			
			80 = { #Positive Feedback
				modifier = {
					factor = 2.0
					trait = patient
				}
				modifier = {
					factor = 2.0
					trait = kind
				}
				modifier = {
					factor = 2.0
					trait = gregarious
				}
				FROM = {character_event = {id = ALY.115 days = 1 tooltip = negot_good_op}}
			}
			
			10 = { #Negative Feedback
				modifier = {
					factor = 2.0
					trait = patient
				}
				modifier = {
					factor = 2.0
					trait = kind
				}
				modifier = {
					factor = 2.0
					trait = gregarious
				}
				FROM = {character_event = {id = ALY.114 days = 1 tooltip = negot_negative}}
			}
		}
		name = ALY102B
	}
	
	option = { #Present
		trigger = {
			wealth = 100
		}
		tooltip_info = stewardship
		ai_chance = {
			factor = 30
			modifier = {
				factor = 2.5
				trait = deceitful
			}
			modifier = {
				factor = 10
				trait = charitable
			}
		}
		wealth = -100
		random_list = {
			20 = { #Friends
				modifier = {
					factor = 3
					opinion = {
						value = 50
						who = FROM
					}
					reverse_opinion = {
						value = 50
						who = FROM
					}
				}
				modifier = {
					factor = 2.0
					FROM = {trait = greedy}
				}
				modifier = {
					factor = 2.0
					FROM = {trait = trusting}
				}
				modifier = {
					factor = 1.5
					stewardship = 6
				}
				modifier = {
					factor = 1.5
					stewardship = 8
				}
				modifier = {
					factor = 1.5
					stewardship = 12
				}
				modifier = {
					factor = 1.5
					stewardship = 15
				}
				modifier = {
					factor = 1.5
					stewardship = 18
				}
				modifier = {
					factor = 1.5
					stewardship = 20
				}
				modifier = {
					factor = 1.5
					stewardship = 22
				}
				FROM = {character_event = {id = ALY.112 days = 1 tooltip = negot_friends}}
			}

			30 = { #Positive Feedback
				FROM = {character_event = {id = ALY.115 days = 1 tooltip = negot_good_op}}
			}
			
			50 = { #Negative Feedback
				modifier = {
					factor = 2.0
					trait = patient
				}
				modifier = {
					factor = 2.0
					trait = kind
				}
				modifier = {
					factor = 2.0
					trait = gregarious
				}
				FROM = {character_event = {id = ALY.114 days = 1 tooltip = negot_negative}}
			}
		}
		name = ALY102C
	}
}



character_event = { #Inform become Tribute
	id = ALY.111
	desc = ALY111	
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = ALY111A
		tooltip = {
			FROM = {
				prestige = 25
			}
		}
		FROM = {
			make_tributary = { who = ROOT percentage = 0.1 }
		}
		
		hidden_tooltip = {
			FROM = {
				character_event = {
					id = ALY.211
				}
				random_list = {
					10 = {
						character_event = {
							id = ALY.500
							days = 5
						}
					}
					90 = {}
				}
			}
		}
	}
}

character_event = { #u become Suzerain
	id = ALY.211
	desc = ALY211	
	picture = GFX_evt_throne_room
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = ALY211A
		prestige = 25
		tooltip = {
			make_tributary = { who = FROM percentage = 0.1 }
		}
	}
}

character_event = { #Inform become Suzerain
	id = ALY.116
	desc = ALY211	
	picture = GFX_evt_throne_room
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = ALY211A
		prestige = 25
		make_tributary = { who = FROM percentage = 0.1 }
		hidden_tooltip = {
			FROM = {
				character_event = {
					id = ALY.216
				}
				
			}
			random_list = {
				10 = {
					character_event = {
						id = ALY.500
						days = 5
					}
				}
				90 = {}
			}
		}
	}
	
}

character_event = { #u've become Tribute
	id = ALY.216
	desc = ALY111	
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	
	option = {
		name = ALY111A
		tooltip = {
			FROM = {
				prestige = 25
				make_tributary = { who = ROOT percentage = 0.1 }
			}
		}

	}
}


character_event = { #Friends
	id = ALY.112
	desc = ALY112	
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = ALY112A
		piety = 50
		add_friend = FROM
		opinion = {
			modifier = in_non_aggression_pact
			who = FROM
			years = 10
		}
		reverse_opinion = {
			modifier = in_non_aggression_pact
			who = FROM
			years = 10
		}
		add_alliance = { who = FROM years = 10 }
		hidden_tooltip = {
			FROM = {
				character_event = {
					id = ALY.212
				}
				random_list = {
					10 = {
						character_event = {
							id = ALY.500
							days = 5
						}
					}
					90 = {}
				}
			}
		}
	}
}

character_event = { #Friends
	id = ALY.212
	desc = ALY112	
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = ALY112A
		piety = 50
		tooltip = {
			opinion = {
				modifier = in_non_aggression_pact
				who = FROM
				years = 10
			}
			reverse_opinion = {
				modifier = in_non_aggression_pact
				who = FROM
				years = 10
			}
			add_alliance = { who = FROM years = 10 }
			add_friend = FROM
		}
	}
}


character_event = { #Rivals
	id = ALY.113
	desc = ALY113	
	picture = GFX_evt_rival_rulers
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = ALY113A
		prestige = -30
		add_rival = FROM
		hidden_tooltip = {
			FROM = {
				character_event = {
					id = ALY.213
				}
			}
		}
	}
}

character_event = { #Rivals
	id = ALY.213
	desc = ALY113	
	picture = GFX_evt_rival_rulers
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = ALY113A
		prestige = -30
		tooltip = {
			add_rival = FROM
		}
	}
}


character_event = { #Negative
	id = ALY.114
	desc = ALY114	
	picture = GFX_evt_rival_rulers
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = ALY114A
		prestige = -10
		opinion = {
			modifier = dip_arg
			who = FROM
			years = 5
		}
		reverse_opinion = {
			modifier = dip_arg
			who = FROM
			years = 5
		}
		hidden_tooltip = {
			FROM = {
				character_event = {
					id = ALY.214
				}
			}
		}
	}
}

character_event = { #Negative 2
	id = ALY.214
	desc = ALY114	
	picture = GFX_evt_rival_rulers
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = ALY114A
		prestige = -10
		tooltip = {
			opinion = {
				modifier = dip_arg
				who = FROM
				years = 5
			}
			reverse_opinion = {
				modifier = dip_arg
				who = FROM
				years = 5
			}
		}
	}
}


character_event = { #pos
	id = ALY.115
	desc = ALY115	
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = ALY115A
		prestige = 25
		opinion = {
			modifier = in_non_aggression_pact
			who = FROM
			years = 5
		}
		reverse_opinion = {
			modifier = in_non_aggression_pact
			who = FROM
			years = 5
		}
		hidden_tooltip = {
			FROM = {
				character_event = {
					id = ALY.214
				}
			}
		}
	}
}

character_event = { #pos2
	id = ALY.215
	desc = ALY115	
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = ALY115A
		prestige = 25
		tooltip = {
			opinion = {
				modifier = in_non_aggression_pact
				who = FROM
				years = 5
			}
			reverse_opinion = {
				modifier = in_non_aggression_pact
				who = FROM
				years = 5
			}
		}
	}
}


character_event = { #better diplomat
	id = ALY.500
	desc = ALY500
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = {
		name = ALY500A
		if = {
			limit = {diplomacy = 60}
			prestige = 100
		}
		if = {
			limit = {NOT = {diplomacy = 60}}
			change_diplomacy = 1
		}
		
		if = {
			limit = {
				trait = deceitful
				NOT = {trait = gregarious}
				NOT = {trait = wroth}
				has_nickname = no
			}
			
			give_nickname = nick_the_fox

		}
		
		if = {
			limit = {
				trait = gregarious
				NOT = {trait = deceitful}
				NOT = {trait = wroth}
				has_nickname = no
			}
	
			give_nickname = nick_the_butterfly
			
		}
		
		if = {
			limit = {
				trait = wroth
				NOT = {trait = deceitful}
				NOT = {trait = gregarious}
				has_nickname = no
			}

			give_nickname = nick_the_crude

		}
		
		if = {
			limit = {trait = charismatic_negotiator}
			remove_trait = charismatic_negotiator
			add_trait = grey_eminence
			break = yes
			
		}
		if = {
			limit = {trait = underhanded_rogue}
			remove_trait = underhanded_rogue
			add_trait = charismatic_negotiator
			break = yes
		}
		if = {
			limit = {trait = naive_appeaser}
			remove_trait = naive_appeaser
			add_trait = underhanded_rogue
			break = yes
		}
	}
}