############################
# Pseudo-Cartography events
#
# by LordPeter and redtide
############################
namespace = fabcart

### Pseudo-Cartography (fabcart) aka Fake Map Modes (FMM)

character_event = {
	id = fabcart.1 # Top Menu 1
	desc =  EVTDESCfabcart.1
	picture = "GFX_evt_council"
	border = GFX_event_normal_frame_economy
	sound = narrative_event

	is_triggered_only = yes

	immediate = {
		fn_clear_fake_map_mode_flags = yes
	}

	option = {
		name = EVTOPTAfabcart.1
		character_event = { id = fabcart.11 } # Submenu 1.1 "Province Characteristics"
	}

	option = {
		name = EVTOPTBfabcart.1
		character_event = { id = fabcart.12 } # Submenu 1.2 "Vassals, Realms, and Regions"
	}

	option = {
		name = EVTOPTCfabcart.1
		character_event = { id = fabcart.13 } # Submenu 1.3 "Technology"
	}

	option = {
		name = EVTOPTDfabcart.1
#		character_event = { id = fabcart.2 } # Top Menu 2
	}
}

character_event = {
	id = fabcart.11 # Submenu 1.1 "Province Characteristics"
	desc =  EVTDESCfabcart.11
	picture = "GFX_evt_council"
	border = GFX_event_normal_frame_economy
	sound = turning_page

	is_triggered_only = yes

	option = {
		name = EVTOPTAfabcart.11
		character_event = { id = fabcart.111 } # Submenu 1.1.1 "Geography and Climate"
	}

	option = {
		name = EVTOPTBfabcart.11
		character_event = { id = fabcart.112 } # Submenu 1.1.2 "Province Settlements"
	}

	option = {
		name = EVTOPTCfabcart.11
		character_event = { id = fabcart.113 } # Submenu 1.1.3 "Health and Wellbeing"
	}

	option = {
		name = EVTOPTDfabcart.11
		character_event = { id = fabcart.1 } # "Select a different category" (Return to Top Menu 1)
	}
}

character_event = {
	id = fabcart.111 # Submenu 1.1.1 "Geography and Climate"
	desc =  EVTDESCfabcart.111
	picture = "GFX_evt_sand_desert"
	border = GFX_event_normal_frame_war
	sound = turning_page

	is_triggered_only = yes # by decision

	option = {
		name = EVTOPTAfabcart.111 # Submenu 1.1.1 Option A "Simple Terrain"
		set_character_flag = fake_map_mode_simple_terrain
	}

	option = {
		name = EVTOPTBfabcart.111 # Submenu 1.1.1 Option B "Climate"
		set_character_flag = fake_map_mode_climate
	}

	option = {
		name = EVTOPTCfabcart.111 # Submenu 1.1.1 Option C "Supply Limit"
		set_character_flag = fake_map_mode_supply_limit
	}

	option = {
		name = EVTOPTDfabcart.111 # Submenu 1.1.1 Option D "Return to Submenu 1.1"
		character_event = { id = fabcart.11 }
	}
}

character_event = {
	id = fabcart.112 # Submenu 1.1.2 "Province Settlements"
	desc =  EVTDESCfabcart.112
	picture = "GFX_evt_magnificent_castle"
	border = GFX_event_normal_frame_economy
	sound = turning_page

	is_triggered_only = yes

	option = {
		name = EVTOPTAfabcart.112 # Submenu 1.1.2 Option A "Number of Holdings"
		set_character_flag = fake_map_mode_num_of_holdings
	}

	option = {
		name = EVTOPTBfabcart.112 # Submenu 1.1.2 Option B "Number of Holding Slots"
		set_character_flag = fake_map_mode_num_of_holding_slots
	}

	option = {
		name = EVTOPTCfabcart.112 # Submenu 1.1.2 Option C "Number of Empty Holding Slots"
		set_character_flag = fake_map_mode_num_of_empty_holdings
	}

	option = {
		name = EVTOPTDfabcart.112 # Submenu 1.1.2 Option D "Return to Submenu 1.1"
		character_event = { id = fabcart.11 }
	}
}

character_event = {
	id = fabcart.113 # Submenu 1.1.3 "Health and Wellbeing"
	desc =  EVTDESCfabcart.113
	picture = "GFX_evt_prospering_province"
	border = GFX_event_normal_frame_economy
	sound = turning_page

	is_triggered_only = yes

	option = {
		name = EVTOPTAfabcart.113 # Submenu 1.1.3 Option A "Prosperity and Depopulation"
		set_character_flag = fake_map_mode_prosperity_depopulation
	}

	option = {
		name = EVTOPTBfabcart.113 # Submenu 1.1.3 Option B "Hospital Level"
		set_character_flag = fake_map_mode_hospital_level
	}

	option = {
		name = EVTOPTCfabcart.113 # Submenu 1.1.3 Option C "Disease Resistance"
		set_character_flag = fake_map_mode_disease_defence
	}

	option = {
		name = EVTOPTDfabcart.113 # Submenu 1.1.3 Option D "Return to Submenu 1.1"
		character_event = { id = fabcart.11 }
	}
}

character_event = {
	id = fabcart.12 # Submenu 1.2 "Vassals, Realms, and Regions"
	desc =  EVTDESCfabcart.12
	picture = "GFX_evt_council"
	border = GFX_event_normal_frame_diplomacy
	sound = turning_page

	is_triggered_only = yes

	option = {
		name = EVTOPTAfabcart.12
		character_event = { id = fabcart.121 } # Submenu 1.2.1 "Status of Direct Vassals"
	}

	option = {
		name = EVTOPTBfabcart.12
		character_event = { id = fabcart.122 } # Submenu 1.2.2 "Status of Independent Realms"
	}

	option = {
		name = EVTOPTCfabcart.12
		character_event = { id = fabcart.123 } # Submenu 1.2.3 "Regions and Control"
	}

	option = {
		name = EVTOPTDfabcart.12
		character_event = { id = fabcart.1 } # "Something Else" (Return to Top Menu 1)
	}
}

character_event = {
	id = fabcart.121 # Submenu 1.2.1 "Status of Direct Vassals"
	desc =  EVTDESCfabcart.121
	picture = "GFX_evt_emissary"
	border = GFX_event_normal_frame_diplomacy
	sound = turning_page

	is_triggered_only = yes # by decision

	option = {
		name = EVTOPTAfabcart.121 # Submenu 1.2.1 Option A "Succession Laws of Direct Vassals"
		set_character_flag = fake_map_mode_vassal_succession_law
	}

	option = {
		name = EVTOPTBfabcart.121 # Submenu 1.2.1 Option B "Power Relative to Liege"
		set_character_flag = fake_map_mode_relative_power_to_liege
	}

	option = {
		name = EVTOPTCfabcart.121 # Submenu 1.2.1 Option C "Powerful Vassals"
		set_character_flag = fake_map_mode_powerful_vassals
	}

	option = {
		name = EVTOPTDfabcart.121 # Submenu 1.2.1 Option D "Return to Submenu 1.2"
		character_event = { id = fabcart.12 }
	}
}

character_event = {
	id = fabcart.122 # Submenu 1.2.2 "Status of Independent Realms"
	desc =  EVTDESCfabcart.122
	picture = "GFX_evt_rival_rulers"
	border = GFX_event_normal_frame_diplomacy
	sound = turning_page

	is_triggered_only = yes

	option = {
		name = EVTOPTAfabcart.122 # Submenu 1.2.2 Option A "Succession Laws of Independent Realms"
		set_character_flag = fake_map_mode_succession_law
	}

	option = {
		name = EVTOPTBfabcart.122 # Submenu 1.2.2 Option B "Relative Power as a Defender (Including Allies)"
		set_character_flag = fake_map_mode_realm_power_defender
	}

	option = {
		name = EVTOPTCfabcart.122 # Submenu 1.2.2 Option C "Relative Power as an Attacker (Including Allies)"
		set_character_flag = fake_map_mode_realm_power_attacker
	}

	option = {
		name = EVTOPTDfabcart.122 # Submenu 1.2.2 Option D "Return to Submenu 1.2"
		character_event = { id = fabcart.12 }
	}
}

character_event = {
	id = fabcart.123 # Submenu 1.2.3 "Regions and Control"
	desc =  EVTDESCfabcart.123
	picture = "GFX_evt_rider_adventure"
	border = GFX_event_normal_frame_diplomacy
	sound = turning_page

	is_triggered_only = yes

	option = {
		name = EVTOPTAfabcart.123 # Submenu 1.2.3 Option A "Regions"
		set_character_flag = fake_map_mode_region
	}

	option = {
		name = EVTOPTBfabcart.123 # Submenu 1.2.3 Option B "Provinces Not Completely Controlled by Top Liege"
		set_character_flag = fake_map_mode_check_control
	}

	option = {
		name = EVTOPTCfabcart.123 # Submenu 1.2.3 Option C "Provinces Not Completely Controlled by Local Count"
		set_character_flag = fake_map_mode_check_control2
	}

	option = {
		name = EVTOPTDfabcart.123 # Submenu 1.2.3 Option D "Return to Submenu 1.2"
		character_event = { id = fabcart.12 }
	}
}

character_event = {
	id = fabcart.13 # Submenu 1.3 "Technology Subcategories"
	desc =  EVTDESCfabcart.13
	picture = "GFX_evt_council"
	border = GFX_event_normal_frame_economy
	sound = turning_page

	is_triggered_only = yes

	option = {
		name = EVTOPTAfabcart.13
		character_event = { id = fabcart.131 } # Submenu 1.3.1 "Military"
	}

	option = {
		name = EVTOPTBfabcart.13
		character_event = { id = fabcart.133 } # Submenu 1.3.3 "Economy"
	}

	option = {
		name = EVTOPTCfabcart.13
		character_event = { id = fabcart.135 } # Submenu 1.3.5 "Culture"
	}

	option = {
		name = EVTOPTDfabcart.13
		character_event = { id = fabcart.1 } # "Something Else" (Return to Top Menu 1)
	}
}

character_event = {
	id = fabcart.131 # Submenu 1.3.1 "Military Tech"
	desc =  EVTDESCfabcart.131
	picture = "GFX_evt_machines_of_war"
	border = GFX_event_normal_frame_war
	sound = turning_page

	is_triggered_only = yes # by decision

	option = {
		name = EVTOPTAfabcart.131 # Submenu 1.3.1 Option A "Light Infantry"
		set_character_flag = fake_map_mode_tech_li
	}

	option = {
		name = EVTOPTBfabcart.131 # Submenu 1.3.1 Option B "Heavy Infantry"
		set_character_flag = fake_map_mode_tech_hi
	}

	option = {
		name = EVTOPTCfabcart.131 # Submenu 1.3.1 Option C "Cavalry"
		set_character_flag = fake_map_mode_tech_cav
	}

	option = {
		name = EVTOPTDfabcart.131
		character_event = { id = fabcart.132 } # "Something Else"
	}
}

character_event = {
	id = fabcart.132 # Submenu 1.3.2 "More Military Tech"
	desc =  EVTDESCfabcart.132
	picture = "GFX_evt_machines_of_war"
	border = GFX_event_normal_frame_war
	sound = turning_page

	is_triggered_only = yes # by decision

	option = {
		name = EVTOPTAfabcart.132 # Submenu 1.3.2 Option A "Siege Equipment"
		set_character_flag = fake_map_mode_tech_siege
	}

	option = {
		name = EVTOPTBfabcart.132 # Submenu 1.3.2 Option B "Shipbuilding"
		set_character_flag = fake_map_mode_tech_ships
	}

	option = {
		name = EVTOPTCfabcart.132 # Submenu 1.3.2 Option C "Military Organization"
		set_character_flag = fake_map_mode_tech_milorg
	}

	option = {
		name = EVTOPTDfabcart.132
		character_event = { id = fabcart.13 } # "Return to Submenu 1.3"
	}
}

character_event = {
	id = fabcart.133 # Submenu 1.3.3 "Economy Tech"
	desc =  EVTDESCfabcart.133
	picture = "GFX_evt_market"
	border = GFX_event_normal_frame_economy
	sound = turning_page

	is_triggered_only = yes # by decision

	option = {
		name = EVTOPTAfabcart.133 # Submenu 1.3.3 Option A "Castle Infrastructure"
		set_character_flag = fake_map_mode_tech_castle
	}

	option = {
		name = EVTOPTBfabcart.133 # Submenu 1.3.3 Option B "Town Infrastructure"
		set_character_flag = fake_map_mode_tech_town
	}

	option = {
		name = EVTOPTCfabcart.133 # Submenu 1.3.3 Option C "Church Infrastructure"
		set_character_flag = fake_map_mode_tech_church
	}

	option = {
		name = EVTOPTDfabcart.133
		character_event = { id = fabcart.134 } # "Something Else"
	}
}

character_event = {
	id = fabcart.134 # Submenu 1.3.4 "More Economy Tech"
	desc =  EVTDESCfabcart.134
	picture = "GFX_evt_market"
	border = GFX_event_normal_frame_economy
	sound = turning_page

	is_triggered_only = yes # by decision

	option = {
		name = EVTOPTAfabcart.134 # Submenu 1.3.4 Option A "Improved Keeps"
		set_character_flag = fake_map_mode_tech_keeps
	}

	option = {
		name = EVTOPTBfabcart.134 # Submenu 1.3.4 Option B "Trade Practices"
		set_character_flag = fake_map_mode_tech_trade
	}

	option = {
		name = EVTOPTCfabcart.134 # Submenu 1.3.4 Option C "Construction"
		set_character_flag = fake_map_mode_tech_construction
	}

	option = {
		name = EVTOPTDfabcart.134
		character_event = { id = fabcart.13 } # "Return to Submenu 1.3"
	}
}

character_event = {
	id = fabcart.135 # Submenu 1.3.5 "Culture Tech"
	desc =  EVTDESCfabcart.135
	picture = "GFX_evt_monk"
	border = GFX_event_normal_frame_religion
	sound = turning_page

	is_triggered_only = yes # by decision

	option = {
		name = EVTOPTAfabcart.135 # Submenu 1.3.5 Option A "Noble Customs"
		set_character_flag = fake_map_mode_tech_noble
	}

	option = {
		name = EVTOPTBfabcart.135 # Submenu 1.3.5 Option B "Popular Customs"
		set_character_flag = fake_map_mode_tech_popular
	}

	option = {
		name = EVTOPTCfabcart.135 # Submenu 1.3.5 Option C "Religious Customs"
		set_character_flag = fake_map_mode_tech_religious
	}

	option = {
		name = EVTOPTDfabcart.135
		character_event = { id = fabcart.136 } # "Something Else"
	}
}

character_event = {
	id = fabcart.136 # Submenu 1.3.6 "More Culture Tech"
	desc =  EVTDESCfabcart.136
	picture = "GFX_evt_monk"
	border = GFX_event_normal_frame_religion
	sound = turning_page

	is_triggered_only = yes # by decision

	option = {
		name = EVTOPTAfabcart.136 # Submenu 1.3.6 Option A "Majesty"
		set_character_flag = fake_map_mode_tech_majesty
	}

	option = {
		name = EVTOPTBfabcart.136 # Submenu 1.3.6 Option B "Tolerance"
		set_character_flag = fake_map_mode_tech_tolerance
	}

	option = {
		name = EVTOPTCfabcart.136 # Submenu 1.3.6 Option C "Legalism"
		set_character_flag = fake_map_mode_tech_legalism
	}

	option = {
		name = EVTOPTDfabcart.136
		character_event = { id = fabcart.13 } # "Return to Submenu 1.3"
	}
}

### Recall councilor if accidentally sent on "fake map mode" job

character_event = {	# Councilor is recalled by event to avoid messing with the assignment times for the other jobs - event happens for the player! (more efficient)
	id = fabcart.99
	desc =  EVTDESCfabcart.99
	picture = "GFX_evt_council"
	border = GFX_event_normal_frame_economy

	only_playable = yes

	ai = no

	trigger = {
		job_treasurer = {
			has_job_action = action_show_fake_map_mode
		}
	}

	mean_time_to_happen = {
		days = 1
		modifier = {	# Should happen almost instantly, that's why it's boosted even more here (not sure if this even works, but whatever)
			factor = 0.25
		}
	}

	# Inform player that steward has returned
	option = {
		name = EVTOPTAfabcart.99
		job_treasurer = {
			cancel_job_action = action_show_fake_map_mode
		}
	}
}
