namespace = GFT

letter_event = {
	id = GFT.100
	desc = GFT100	
	#picture = GFX_evt_battle
	border = GFX_event_letter_frame_diplomacy
	
	is_triggered_only = yes
	

	option = {

		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.1
				trait = paranoid
			}
			modifier = {
				factor = 2.5
				trait = trusting
			}
		}
		name = GFT100A
		
		hidden_tooltip = {
			remove_character_modifier = gft3
			remove_character_modifier = gft2
			remove_character_modifier = gft1
			random_list = {
				45 = { #Something Cool
					add_character_modifier = {
						name = gft1
						days = 30
						hidden = yes
					}
				}
				50 = {#Indulging
					modifier = {
						factor = 2
						trait = lustful
					}
					modifier = {
						factor = 2
						trait = gluttonous

					}
					add_character_modifier = {
						name = gft2
						days = 30
						hidden = yes
					}
				}
				5 = {#Weird
					modifier = {
						factor = 2
						trait = arbitrary
					}
					modifier = {
						factor = 1.5
						trait = ambitious
					}
					modifier = {
						factor = 1.5
						trait = brave
					}
					add_character_modifier = {
						name = gft3
						days = 30
						hidden = yes
					}
				}
			}
			FROMFROM = {
				character_event = {
					id = GFT.101
					days = 2
				}
			}
		}
	}
	option = {
		trigger = {
			has_regent = no
		}
		ai_chance = {
			factor = 20
			modifier = {
				factor = 0
				trait = greedy
			}
			modifier = {
				factor = 2
				trait = humble
			}
		}
		reverse_opinion = {
			modifier = refused_gift
			who = FROMFROM
			months = 24
		}
		FROMFROM = {letter_event = {id = GFT.500}}
		name = GFT100B
	}
}


letter_event = {
	id = GFT.500
	desc = GFT500	
	picture = GFX_evt_throne_room
	border = GFX_event_letter_frame_diplomacy
	
	is_triggered_only = yes
	

	option = {	
		name = GFT500A
		
	}
}


character_event = {
	id = GFT.101
	desc = GFT101	
	picture = GFX_evt_jewish_market
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {#My gratitude
		ai_chance = {
			factor = 1
		}
		piety = 10
		prestige = -50
		reverse_opinion = {
			modifier = gift_gratitude
			who = FROM
			months = 48
		}
		hidden_tooltip = {
			FROM = {character_event = {id = GFT.111 days = 3}}
		}
		name = GFT101A
	}
	
	option = {#An exotic beauty
		trigger = {
			
			FROM = {
				age = 14 #Yeah early but it is great for a kid at that age!
				has_character_modifier = gft2
				has_concubinage = yes
				is_female = no
				NOT = {num_of_consorts = 3}
				NOT = {trait = chaste}
				is_landed = yes
			}
			NOT = {
				any_courtier = {
					has_opinion_modifier = {
						who = FROM
						modifier = my_lion
					}
				}
			}
			FROM = {NOT = {culture_group = iranian}}
			NOT = {culture_group = iranian}
			NOT = {trait = chaste}
			wealth = 25
		}
		ai_chance = {
			factor = 10
			modifier = {
				factor = 2
				FROM = {trait = lustful}
			}
			modifier = {
				factor = 3
				trait = deceitful
			}
		}
		
		wealth = -25
		
		hidden_tooltip = {
			FROM = {character_event = {id = GFT.112 days = 3}}
		}
		
		create_character = {
			random_traits = yes
			dynasty = none
			religion = ROOT
			culture = persian
			female = yes
			age = 16
			health = 6
			fertility = 1.0
		}
		
		hidden_tooltip = {
			
			random_list = {
				5 = {
					new_character = {
						add_trait = shy
						add_trait = trusting
					}
					#If you cared enough to look this far into the code...
					#I will tell you a secret. This is my fetish!
				}
				95 = {
				}
			}
			new_character = {
				add_trait = fair
				add_trait = lustful
				add_friend = ROOT
				random_list = {
					10 = {add_trait = dagger1}
					10 = {add_trait = dagger2}
					10 = {add_trait = dagger3}
					10 = {add_trait = dagger4}
				}
				set_character_flag = wpn
				add_character_modifier = {
					name = dgr
					duration = -1
					hidden = yes
				}
				FROM = {
					add_consort = PREV
				}
				opinion = {
					modifier = beautiful_spy
					who = ROOT
					months = 1200
				}
			}	
		}
		
		if = {
			limit = {
				FROM = {trait = lustful}
			}
			reverse_opinion = {
				modifier = gift_beauty_lust
				who = FROM
				months = 48
			}
		}
		if = {
			limit = {
				FROM = {NOT = {trait = lustful}}
			}
			reverse_opinion = {
				modifier = gift_beauty
				who = FROM
				months = 48
			}
		}
		
		name = GFT101B
		
	}
	
	
	
	option = {#A Powerful Warrior
		trigger = {
			FROM = {
				OR = {
					is_merchant_republic = yes
					higher_tier_than = BARON
				}
				has_character_modifier = gft1
				is_landed = yes
			}
			NOT = {
				any_courtier = {
					has_opinion_modifier = {
						who = FROM
						modifier = my_lord
					}
				}
			}
			wealth = 50
		}
		ai_chance = {
			factor = 5
			modifier = {
				factor = 1.5
				trait = deceitful
			}
		}
		hidden_tooltip = {
			FROM = {narrative_event = {id = GFT.113 days = 3}}
		}
		wealth = -50
		
		FROM = {
			create_character = {
				random_traits = yes
				dynasty = none
				religion = ROOT
				culture = ROOT
				female = no
				age = 27
				health = 5
				fertility = 0.5
				trait = tough_soldier
				trait = became_unlanded
			}
			hidden_tooltip = {
				new_character = {
					add_trait = brave
					add_trait = shy
					add_trait = born_lowborn
					add_friend = ROOT
					random_list = {
						10 = {add_trait = spear3}
						10 = {add_trait = axe3}
						10 = {add_trait = mace3}
						10 = {
							modifier = {
								factor = 0
								NOT = {culture = frankish}
							}
							add_trait = swordsman4
						}
						10 = {
							modifier = {
								factor = 0
								NOT = {culture = frankish}
							}
							add_trait = swordsman3
						}
					}
					set_character_flag = wpn
					opinion = {
						modifier = warrior_spy
						who = ROOT
						months = 1200
					}
				}	
			}
		}
		

	
		reverse_opinion = {
			modifier = gift_warrior
			who = FROM
			months = 48
		}
		name = GFT101C
		
	}

	
	
	option = {#Rare Jewels
		trigger = {
			wealth = 60
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.5
				trait = humble
			}
			modifier = {
				factor = 2.0
				FROM = {trait = greedy}
			}
		}
		hidden_tooltip = {
			FROM = {character_event = {id = GFT.114 days = 3}}
		}
		name = GFT101D
		wealth = -60
		tooltip = {
			FROM = {
				prestige = 50
			}
			FROM = {
				wealth = 60
			}
		}
		if = {
			limit = {
				FROM = {trait = greedy}
			}
			reverse_opinion = {
				modifier = gift_jewel_greedy
				who = FROM
				months = 48
			}
		}
		if = {
			limit = {
				FROM = {NOT = {trait = greedy}}
			}
			reverse_opinion = {
				modifier = gift_jewel
				who = FROM
				months = 48
			}
		}
		
	}
	
	option = {#A feast in your honour
		trigger = {
			FROM = {
				has_character_modifier = gft2
				has_character_modifier = fstb
			}
			NOT = {trait = temperate}
			FROM = {
				NOT = {trait = temperate}
			}
			wealth = 75
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 4
				trait = gluttonous
			}
			modifier = {
				factor = 4
				trait = gregarious
			}
			modifier = {
				factor = 4
				FROM = {trait = gluttonous}
			}
		}
		hidden_tooltip = {
			FROM = {character_event = {id = GFT.115 days = 3}}
		}
		name = GFT101E
		wealth = -75
		tooltip = {
			FROM = {
				prestige = 50
				add_character_modifier = {
					name = fstb
					duration = 730
				}
			}
		}
		if = {
			limit = {
				FROM = {
					OR = {
						trait = gluttonous
						trait = proud
					}
				}
			}
			reverse_opinion = {
				modifier = gift_feast_gluttonous
				who = FROM
				months = 48
			}
		}
		if = {
			limit = {
				FROM = {
					NOT = {
						trait = gluttonous
						trait = proud
					}
				}
				
			}
			reverse_opinion = {
				modifier = gift_feast
				who = FROM
				months = 48
			}
		}
		
	}
	
	option = {#Fine horses
		trigger = {
			wealth = 100
			FROM = {
				is_landed = yes
				OR = {
					is_merchant_republic = yes
					higher_tier_than = BARON
				}
				has_character_modifier = gft1

			}
		}
		ai_chance = {
			factor = 90
			modifier = {
				factor = 2
				trait = proud
			}
		}
		hidden_tooltip = {
			FROM = {character_event = {id = GFT.116 days = 3}}
		}
		name = GFT101F
		wealth = -100
		FROM = {
			capital_scope = {
				FROM = {
					spawn_unit = {
						province = PREV
						troops =
						{
							light_cavalry = { 150 150 }
						}
						cannot_inherit = yes
					}
				}
			}
		}
		reverse_opinion = {
			modifier = gift_horses
			who = FROM
			months = 48
		}
	}
		
	option = {#Camels from Baghdad
		trigger = {
			FROM = {
				has_character_modifier = gft3
				OR = {
					is_merchant_republic = yes
					higher_tier_than = BARON
				}
			}
			wealth = 110
			FROM = {is_landed = yes}
		}
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				trait = charitable
			}
			modifier = {
				factor = 2
				trait = proud
			}
		}
		hidden_tooltip = {
			FROM = {character_event = {id = GFT.117 days = 3}}
		}
		name = GFT101G
		wealth = -110
		FROM = {
			capital_scope = {
				FROM = {
					spawn_unit = {
						province = PREV
						troops =
						{
							camel_cavalry = { 50 50 }
						}
						cannot_inherit = yes
					}
				}
			}
		}
		reverse_opinion = {
			modifier = gift_camels
			who = FROM
			months = 48
		}
	}
	
	option = {#Elephants from Samatata
		trigger = {
			FROM = {
				has_character_modifier = gft3
			}
			wealth = 180
			FROM = {
				is_landed = yes
				OR = {
					is_merchant_republic = yes
					higher_tier_than = BARON
				}
			}
		}
		ai_chance = {
			factor = 25
			modifier = {
				factor = 3
				trait = charitable
			}
			modifier = {
				factor = 2
				trait = proud
			}
			modifier = {
				factor = 2
				trait = ambitious
			}
			
		}
		hidden_tooltip = {
			FROM = {character_event = {id = GFT.118 days = 3}}
		}
		name = GFT101H
		wealth = -180
		FROM = {
			capital_scope = {
				FROM = {
					spawn_unit = {
						province = PREV
						troops =
						{
							war_elephants = { 20 20 }
						}
						cannot_inherit = yes
					}
				}
			}
		}
		reverse_opinion = {
			modifier = gift_elephants
			who = FROM
			months = 48
		}
	}
	
	
}




character_event = { #Gratitude
	id = GFT.111
	desc = GFT111	
	picture = GFX_evt_throne_room
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		prestige = 5
		name = GFT111A		
	}

}


character_event = { #An exotic beauty
	id = GFT.112
	desc = GFT112	
	picture = GFX_evt_lovers
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	immediate = {
		random_consort = {
			limit = {
				has_opinion_modifier = {
					who = FROM
					modifier = beautiful_spy
				}
			}
			opinion = {
				who = ROOT
				modifier = my_lion
				months = 1200
			}
		}
	}
	option = {

		name = GFT112A		
	}

}


narrative_event = { #Powerful Warrior
	id = GFT.113
	desc = GFT113
	title = GFT113T
	picture = GFX_evt_emissary
	border = GFX_event_narrative_frame_diplomacy
	
	is_triggered_only = yes
	
	immediate = {
		random_courtier = {
			limit = {
				has_opinion_modifier = {
					who = FROM
					modifier = warrior_spy
				}
			}
			opinion = {
				who = ROOT
				modifier = my_lord
				months = 1200
			}
		}
	}
	
	option = {
		name = GFT113A		
	}
}

character_event = { #Rare Jewels
	id = GFT.114
	desc = GFT114	
	picture = GFX_evt_holy_emperor
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	
	option = {
		if = {
			limit = {
				NOT = {trait = greedy}
			}
			random = {
				chance = 15
				add_trait = greedy
			}
		}
		if = {
			limit = {
				trait = charitable
			}
			random = {
				chance = 25
				remove_trait = charitable
			}
			
		}
		prestige = 25
		wealth = 60
		name = GFT114A		
	}
}


character_event = { #Feast
	id = GFT.115
	desc = GFT115	
	picture = GFX_evt_feast
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	
	option = {
		FROM = {
			prestige = 50
			add_character_modifier = {
				name = fstb
				duration = 365
			}
		}

		name = GFT115A		
	}
}


character_event = { #Fine horses
	id = GFT.116
	desc = GFT116	
	picture = GFX_evt_moors
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	
	option = {
		name = GFT116A		
	}
}


character_event = { #Camels
	id = GFT.117
	desc = GFT117	
	picture = GFX_evt_desert
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	
	option = {
		name = GFT117A		
	}
}



character_event = { #Elephant
	id = GFT.118
	desc = GFT118	
	picture = GFX_evt_cathedral_indian_group
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	
	option = {
		name = GFT118A		
	}
}


