##############################
# LEARNING SCENARIO EVENTS
##############################
# 107000 - 107999

# 107000: The first ingame welcome event, explain speed widget
long_character_event = {
	id = 107000
	title = EVTNAME107000
	desc = EVTDESC107000
	picture = GFX_evt_speed_widget

	hide_from = yes
	is_triggered_only = yes
	triggered_from_code = yes

	immediate = {
		set_global_flag = ck2_tutorial_2
	}

	option = {
		name = EVTOPTA107000

		long_character_event = {
			id = 107005
			days = 5
		}
	}
}

# 107001: Followup to the first ingame welcome event, explain this learning scenario
long_character_event = {
	id = 107001
	title = EVTNAME107001
	desc = EVTDESC107001
	picture = GFX_evt_emissary

	is_triggered_only = yes

	option = {
		name = EVTOPTA107001

		long_character_event = {
			id = 107002
			days = 5
		}
	}
}

# 107002: Explain wealth, prestige, piety and score
long_character_event = {
	id = 107002
	title = EVTNAME107002
	desc = EVTDESC107002
	picture = GFX_evt_currencies

	hide_from = yes
	is_triggered_only = yes

	option = {
		name = EVTOPTA107002

		long_character_event = {
			id = 107003
			days = 5
		}
	}
}

# 107003: Explain the ui: Alerts
long_character_event = {
	id = 107003
	title = EVTNAME107003
	desc = EVTDESC107003
	picture = GFX_evt_alerts

	hide_from = yes
	is_triggered_only = yes

	option = {
		name = EVTOPTA107003

		long_character_event = {
			id = 107004
			days = 5
		}
	}
}

# 107004: Explain the ui: Mapmodes
long_character_event = {
	id = 107004
	title = EVTNAME107004
	desc = EVTDESC107004
	picture = GFX_evt_diplomatic_mapmode

	hide_from = yes
	is_triggered_only = yes

	option = {
		name = EVTOPTA107004

		long_character_event = {
			id = 107007
			days = 5
		}
	}
}

# 107005: Explain Your character, char view.
long_character_event = {
	id = 107005
	title = EVTNAME107005
	desc = EVTDESC107005
	picture = GFX_evt_emissary

	hide_from = yes
	is_triggered_only = yes

	option = {
		name = EVTOPTA107005

		long_character_event = {
			id = 107006
			days = 5
		}
	}
}

# 107006: Traits, Attributes and Ambitions
long_character_event = {
	id = 107006
	title = EVTNAME107006
	desc = EVTDESC107006
	picture = GFX_evt_character

	hide_from = yes
	is_triggered_only = yes

	option = {
		name = EVTOPTA107006

		long_character_event = {
			id = 107001
			days = 5
		}
	}
}

# 107007: Explain Need for heir, wife, Arrange Marriage view and Character Browser
long_character_event = {
	id = 107007
	title = EVTNAME107007
	desc = EVTDESC107007
	picture = GFX_evt_find_spouce

	is_triggered_only = yes
	hide_from = yes

	is_married = no

	option = {
		name = EVTOPTA107007

		long_character_event = {
			id = 107008
			days = 5
			tooltip = EVTTOOLTIP107008
		}
	}
}

# 107008: Wife stats and alliances
long_character_event = {
	id = 107008
	title = EVTNAME107008
	desc = EVTDESC107008
	picture = GFX_evt_inheritable_traits_alliance

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107008

		long_character_event = {
			id = 107009
			days = 5
		}
	}
}

# 107009: Diplomacy View
long_character_event = {
	id = 107009
	title = EVTNAME107009
	desc = EVTDESC107009
	picture = GFX_evt_arrange_marriage

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107009
	}
}

# 107100: After married event
long_character_event = {
	id = 107100
	title = EVTNAME107100
	desc = EVTDESC107100
	picture = GFX_evt_emissary

	is_triggered_only = yes
	triggered_from_code = yes

	option = {
		name = EVTOPTA107100

		hidden_effect = {
			spouse = {
				impregnate = ROOT
			}

			long_character_event = {
				id = 107101
				days = 5
			}
		}
	}
}

# 107101: Demesne, Holdings and Realm.
long_character_event = {
	id = 107101
	title = EVTNAME107101
	desc = EVTDESC107101
	picture = GFX_evt_holdings

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107101

		long_character_event = {
			id = 107102
			days = 5
		}
	}
}

# 107102: Vassals
long_character_event = {
	id = 107102
	title = EVTNAME107102
	desc = EVTDESC107102
	picture = GFX_evt_vassal_limit

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107102

		long_character_event = {
			id = 107103
			days = 5
		}
	}
}

# 107103: Opinions.
long_character_event = {
	id = 107103
	title = EVTNAME107103
	desc = EVTDESC107103
	picture = GFX_evt_opinions

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107103

		long_character_event = {
			id = 107104
			days = 5
		}
	}
}

# 107104: Improve opinions.
long_character_event = {
	id = 107104
	title = EVTNAME107104
	desc = EVTDESC107104
	picture = GFX_evt_send_gift

	is_triggered_only = yes
	hide_from = yes

	trigger = {
		any_vassal = {
			opinion = {
				who = ROOT
				value < 0
			}
		}
	}

	option = {
		name = EVTOPTA107104
	}
}

# 107200: Revolt, for TOG.
province_event = {
	id = 107200

	is_triggered_only = yes
	triggered_from_code = yes
	hide_window = yes

	has_dlc = "The Old Gods"

	trigger = {
		is_heretic = yes

		owner = {
			top_liege = {
				is_parent_religion = ROOT
				war = yes

				any_war = {
					using_cb = heretic_revolt
					defender = { character = PREV }
					attacker = { religion = ROOT }
				}
			}
		}
	}

	immediate = {
		create_character = {
			random_traits = yes
			dynasty = none
			religion = ROOT
			culture = ROOT
			female = no
			age = 25
			add_trait = peasant_leader

			attributes = {
				martial = 2
			}
		}

		new_character = {
			create_title = {
				tier = DUKE
				landless = yes
				temporary = yes
				rebel = yes
				culture = ROOT
				name = PEASANT_REVOLT
				holder = THIS
			}

			spawn_unit = {
				province = ROOT
				home = ROOT
				owner = THIS
				scaled_by_biggest_garrison = 0.1
				attrition = 1.0

				troops = {
					archers = { 6 6 }
					light_cavalry = { 4 4 }
					light_infantry = { 10 10 }
				}
			}

			create_character = {
				random_traits = yes
				dynasty = none
				religion = THIS
				culture = THIS
				female = no
				age = 30
				add_trait = peasant_leader
			}

			new_character = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = PREV
					scaled_by_biggest_garrison = 0.1
					attrition = 1.0
					disband_on_peace = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}
			}

			create_character = {
				random_traits = yes
				dynasty = none
				religion = THIS
				culture = THIS
				female = no
				age = 31
				add_trait = peasant_leader
			}

			new_character = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = PREV
					scaled_by_biggest_garrison = 0.1
					attrition = 1.0
					disband_on_peace = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}
			}

			# DoW on the province top liege
			ROOT = {
				owner = {
					top_liege = {
						reverse_war = {
							target = PREVPREVPREV
							casus_belli = peasant_revolt
							thirdparty_title = ROOT # The county
						}

						reverse_opinion = {
							who = PREVPREVPREV
							name = opinion_evil_tyrant
						}
					}
				}
			}
		}
	}
}

# 107201: Revolt, for non-TOG.
province_event = {
	id = 107201
	title = EVTNAME107000
	desc = EVTDESC600
	picture = GFX_evt_emissary

	is_triggered_only = yes
	triggered_from_code = yes

	lacks_dlc = "The Old Gods"

	option = {
		name = EVTOPTA600

		hidden_effect = {
			create_random_soldier = {
				random_traits = yes
				dynasty = random
				religion = ROOT
				culture = ROOT
				female = no
				age = 30
				employer = e_rebels
			}

			new_character = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					scaled_by_biggest_garrison = 0.3

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}
			}
		}
	}
}

# 107202: Raising levies from holdings
long_character_event = {
	id = 107202
	title = EVTNAME107202
	desc = EVTDESC107202
	picture = GFX_evt_raise_troops

	is_triggered_only = yes
	triggered_from_code = yes
	hide_from = yes

	option = {
		name = EVTOPTA107202

		long_character_event = {
			id = 107203
			days = 5
		}
	}
}

# 107203: Moving armies around
long_character_event = {
	id = 107203
	title = EVTNAME107203
	desc = EVTDESC107203
	picture = GFX_evt_emissary

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107203

		long_character_event = {
			id = 107204
			days = 58
		}
	}
}

# 107204: Merging troops, assigning leaders
long_character_event = {
	id = 107204
	title = EVTNAME107204
	desc = EVTDESC107204
	picture = GFX_evt_manage_troops

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107204

		long_character_event = {
			id = 107205
			days = 5
		}
	}
}

# 107205: Rivers and straits
long_character_event = {
	id = 107205
	title = EVTNAME107205
	desc = EVTDESC107205
	picture = GFX_evt_river

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107205
	}
}

# 107250: You dealt with the revolt nicely! Now to consider expansion. Suggest unraising levies or vassals will get angry.
long_character_event = {
	id = 107250
	title = EVTNAME107250
	desc = EVTDESC107250
	picture = GFX_evt_unraise_troops

	is_triggered_only = yes
	triggered_from_code = yes
	hide_from = yes

	option = {
		name = EVTOPTA107250

		long_character_event = {
			id = 107251
			days = 5
		}
	}
}

# 107251: Suggest appropriate OPM overseas.
long_character_event = {
	id = 107251
	title = EVTNAME107251
	desc = EVTDESC107251
	picture = GFX_evt_emissary

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107251

		long_character_event = {
			id = 107252
			days = 5
		}
	}
}

# 107252: Explain CBs
long_character_event = {
	id = 107252
	title = EVTNAME107252
	desc = EVTDESC107252
	picture = GFX_evt_emissary

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107252

		long_character_event = {
			id = 107253
			days = 5
		}
	}
}

# 107253: Claims
long_character_event = {
	id = 107253
	title = EVTNAME107253
	desc = EVTDESC107253
	picture = GFX_evt_emissary

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107253

		long_character_event = {
			id = 107254
			days = 5
		}
	}
}

# 107254: Council, Forging claims
long_character_event = {
	id = 107254
	title = EVTNAME107254
	desc = EVTDESC107254
	picture = GFX_evt_fabricate_claims

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107254
	}
}

# 107300: This is how you declare war
long_character_event = {
	id = 107300
	title = EVTNAME107300
	desc = EVTDESC107300
	picture = GFX_evt_declare_war

	is_triggered_only = yes

	hide_from = yes

	immediate = {
		wealth = 100
	}

	option = {
		name = EVTOPTA107300
	}
}

# 107301: Calling in allies
long_character_event = {
	id = 107301
	title = EVTNAME107301
	desc = EVTDESC107301
	picture = GFX_evt_call_to_arms

	is_triggered_only = yes
	triggered_from_code = yes
	hide_from = yes

	option = {
		name = EVTOPTA107301

		long_character_event = {
			id = 107302
			days = 5
		}
	}
}

# 107302: Ships
long_character_event = {
	id = 107302
	title = EVTNAME107302
	desc = EVTDESC107302
	picture = GFX_evt_raise_troops

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107302

		long_character_event = {
			id = 107303
			days = 5
		}
	}
}

# 107303: Explain Mercs, here is some money
long_character_event = {
	id = 107303
	title = EVTNAME107303
	desc = EVTDESC107303
	picture = GFX_evt_emissary

	is_triggered_only = yes
	hide_from = yes

	immediate = {
		wealth = 2000
	}

	option = {
		name = EVTOPTA107303

		long_character_event = {
			id = 107304
			days = 76
		}
	}
}

# 107304: Embarking troops
long_character_event = {
	id = 107304
	title = EVTNAME107304
	desc = EVTDESC107304
	picture = GFX_evt_embark_army

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107304

		long_character_event = {
			id = 107305
			days = 47
		}
	}
}

# 107305: Disembarking troops
long_character_event = {
	id = 107305
	title = EVTNAME107305
	desc = EVTDESC107305
	picture = GFX_evt_disembark_army

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107305
	}
}

# 107306: Sieges
long_character_event = {
	id = 107306
	title = EVTNAME107306
	desc = EVTDESC107306
	picture = GFX_evt_emissary

	is_triggered_only = yes
	triggered_from_code = yes
	hide_from = yes

	option = {
		name = EVTOPTA107306

		long_character_event = {
			id = 107307
			days = 5
		}
	}
}

# 107307: Assaulting
long_character_event = {
	id = 107307
	title = EVTNAME107307
	desc = EVTDESC107307
	picture = GFX_evt_assault

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107307
	}
}

# 107310: How to make peace
long_character_event = {
	id = 107310
	title = EVTNAME107310
	desc = EVTDESC107310
	picture = GFX_evt_war_view

	is_triggered_only = yes
	triggered_from_code = yes
	hide_from = yes

	option = {
		name = EVTOPTA107310
	}
}

# 107311: Peace treaties
long_character_event = {
	id = 107311
	title = EVTNAME107311
	desc = EVTDESC107311
	picture = GFX_evt_emissary

	is_triggered_only = yes
	triggered_from_code = yes
	hide_from = yes

	option = {
		name = EVTOPTA107311
	}
}

# 107320: War is won, consider disbanding mercenaries
long_character_event = {
	id = 107320
	title = EVTNAME107320
	desc = EVTDESC107320
	picture = GFX_evt_unraise_troops

	is_triggered_only = yes
	triggered_from_code = yes
	hide_from = yes

	option = {
		name = EVTOPTA107320
	}
}

# 107325: What do when over demesne size
long_character_event = {
	id = 107325
	title = EVTNAME107325
	desc = EVTDESC107325
	picture = GFX_evt_demesne_size

	is_triggered_only = yes
	triggered_from_code = yes
	hide_from = yes

	option = {
		name = EVTOPTA107325
	}
}

# 107326: What do when over vassal limit
long_character_event = {
	id = 107326
	title = EVTNAME107326
	desc = EVTDESC107326
	picture = GFX_evt_vassal_limit

	is_triggered_only = yes
	triggered_from_code = yes
	hide_from = yes

	option = {
		name = EVTOPTA107326
	}
}

# 107327: Demesne Laws
long_character_event = {
	id = 107327
	title = EVTNAME107327
	desc = EVTDESC107327
	picture = GFX_evt_laws_view

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107327

		long_character_event = {
			id = 107328
			days = 5
		}
	}
}

# 107328: Technology
long_character_event = {
	id = 107328
	title = EVTNAME107328
	desc = EVTDESC107328
	picture = GFX_evt_invest

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA107328

		long_character_event = {
			id = 107329
			days = 5
		}
	}
}

# 107329: Increasing Technology
long_character_event = {
	id = 107329
	title = EVTNAME107329
	desc = EVTDESC107329
	picture = GFX_evt_invest

	is_triggered_only = yes
	hide_from = yes

	immediate = {
		military_techpoints = 400
		economy_techpoints = 400
		culture_techpoints = 400
	}

	option = {
		name = EVTOPTA107329
	}
}

# 107330: You have a son and heir, explain gavelkind and other succession laws
long_character_event = {
	id = 107330
	title = EVTNAME107330
	desc = EVTDESC107330
	picture = GFX_evt_laws_view

	is_triggered_only = yes
	triggered_from_code = yes
	hide_from = yes

	option = {
		name = EVTOPTA107330
	}
}

# 107331: You have a daughter and heir, explain gavelkind and other succession laws
long_character_event = {
	id = 107331
	title = EVTNAME107331
	desc = EVTDESC107331
	picture = GFX_evt_laws_view

	is_triggered_only = yes
	triggered_from_code = yes
	hide_from = yes

	option = {
		name = EVTOPTA107331
	}
}

# 107332: Crown Laws
long_character_event = {
	id = 107332
	title = EVTNAME107332
	desc = EVTDESC107332
	picture = GFX_evt_crown_laws

	is_triggered_only = yes
	triggered_from_code = yes
	hide_from = yes

	option = {
		name = EVTOPTA107332

		long_character_event = {
			id = 107327
			days = 5
		}
	}
}

# 107333: You have a son, discrediting your daughter from inheritance
long_character_event = {
	id = 107333
	title = EVTNAME107333
	desc = EVTDESC107333
	picture = GFX_evt_emissary

	is_triggered_only = yes
	triggered_from_code = yes
	hide_from = yes

	option = {
		name = EVTOPTA107333
	}
}

# 107334: Educate child
long_character_event = {
	id = 107334
	title = EVTNAME107334
	desc = EVTDESC107334
	picture = GFX_evt_educate_child

	is_triggered_only = yes
	triggered_from_code = yes

	option = {
		name = EVTOPTA107334
	}
}

# 107340: Claims and Inheritance
long_character_event = {
	id = 107340
	title = EVTNAME107340
	desc = EVTDESC107340
	picture = GFX_evt_claims

	is_triggered_only = yes
	triggered_from_code = yes

	option = {
		name = EVTOPTA107340

		long_character_event = {
			id = 107341
			days = 5
		}
	}
}

# 107341: Intrigue
long_character_event = {
	id = 107341
	title = EVTNAME107341
	desc = EVTDESC107341
	picture = GFX_evt_plot

	is_triggered_only = yes

	option = {
		name = EVTOPTA107341

		long_character_event = {
			id = 107342
			days = 5
		}
	}
}

# 107342: Adding plot backers
long_character_event = {
	id = 107342
	title = EVTNAME107342
	desc = EVTDESC107342
	picture = GFX_evt_invite_plot_backers

	is_triggered_only = yes

	option = {
		name = EVTOPTA107342
	}
}

# 107343: First successful intrigue, suggest new target
long_character_event = {
	id = 107343
	title = EVTNAME107343
	desc = EVTDESC107343
	picture = GFX_evt_plot

	is_triggered_only = yes
	triggered_from_code = yes

	option = {
		name = EVTOPTA107343
	}
}

# 107344: Second successful intrigue, suggest other possible targets
long_character_event = {
	id = 107344
	title = EVTNAME107344
	desc = EVTDESC107344
	picture = GFX_evt_plot

	is_triggered_only = yes
	triggered_from_code = yes

	option = {
		name = EVTOPTA107344
	}
}

# 107345: Factions, faction tab
long_character_event = {
	id = 107345
	title = EVTNAME107345
	desc = EVTDESC107345
	picture = GFX_evt_factions_view

	is_triggered_only = yes
	triggered_from_code = yes

	option = {
		name = EVTOPTA107345
	}
}

# 107350: You are dead, now keep playing a normal game
long_character_event = {
	id = 107350
	title = EVTNAME107350
	desc = EVTDESC107350
	picture = GFX_evt_emissary

	is_triggered_only = yes
	triggered_from_code = yes

	option = {
		name = EVTOPTA107350
	}
}

# 107360: Removes incapable trait from character
long_character_event = {
	id = 107360
	title = EVTNAME107360
	desc = EVTDESC107360
	picture = GFX_evt_emissary

	is_triggered_only = yes
	triggered_from_code = yes

	trigger = {
		is_incapable = yes
	}

	option = {
		name = EVTOPTA107360

		remove_trait = incapable

		hidden_effect = {
			remove_trait = sick_incapable
		}
	}
}