JAP_industrialization_category = {
	### MEIJI CIVILIAN INDUSTRIAL REVOLUTION ###
	### CIVILIAN
	JAP_industrialization_mission = {
		icon = generic_factory
		allowed = {
			always = no
		}
		available = {
			has_completed_focus = JAP_catch_up_to_the_west
		}
		activation = {
			always = no
		}

		fire_only_once = yes
		is_good = no
		days_mission_timeout = JAP_industralization_mission_civ_days #300
		modifier = {

		}
		timeout_effect = {
			hidden_effect = {
				add_political_power = -150
				remove_ideas = JAP_industrial_revolution_part1
				remove_ideas = JAP_industrial_revolution_part1_2
				remove_ideas = JAP_industrial_revolution_part1_3
				remove_ideas = JAP_industrial_revolution_part1_4
				remove_ideas = JAP_industrial_revolution_part1_5
				remove_ideas = JAP_industrial_revolution_part1_6
				add_timed_idea = {
					idea = failed_civ
					days = 140
				}
				unlock_national_focus = JAP_catch_up_to_the_west
			}
		}
		complete_effect = {
			hidden_effect = {
				set_country_flag = civ
				remove_ideas = JAP_industrial_revolution_part1
				remove_ideas = JAP_industrial_revolution_part1_2
				remove_ideas = JAP_industrial_revolution_part1_3
				remove_ideas = JAP_industrial_revolution_part1_4
				remove_ideas = JAP_industrial_revolution_part1_5
				remove_ideas = JAP_industrial_revolution_part1_6
			}
			if = {
				limit = {
					has_completed_focus = JAP_unified_military_industry
					has_completed_focus = JAP_expand_nagasaki_shipyard
					has_completed_focus = JAP_nationalization_of_our_railways
				}
				complete_national_focus = JAP_end_of_the_industrial_revolution
			}
		}
	}
	### MILITARY
	JAP_industrialization_mission2 = {
		icon = generic_factory
		allowed = {
			always = no
		}
		available = {
			has_completed_focus = JAP_unified_military_industry
		}
		activation = {
			always = no
		}

		fire_only_once = yes
		is_good = no
		days_mission_timeout = JAP_industralization_mission_mil_days #500
		modifier = {

		}
		timeout_effect = {
			hidden_effect = {
				add_political_power = -150
				remove_ideas = JAP_industrial_revolution_part2
				remove_ideas = JAP_industrial_revolution_part2_2
				remove_ideas = JAP_industrial_revolution_part2_3
				add_timed_idea = {
					idea = failed_mil
					days = 140
				}
				unlock_national_focus = JAP_unified_military_industry
			}
		}
		complete_effect = {
			hidden_effect = {
				set_country_flag = mil
				remove_ideas = JAP_industrial_revolution_part2
				remove_ideas = JAP_industrial_revolution_part2_2
				remove_ideas = JAP_industrial_revolution_part2_3
			}
			if = {
				limit = {
					has_completed_focus = JAP_catch_up_to_the_west
					has_completed_focus = JAP_expand_nagasaki_shipyard
					has_completed_focus = JAP_nationalization_of_our_railways
				}
				complete_national_focus = JAP_end_of_the_industrial_revolution
			}
		}
	}
	### NAVY
	JAP_industrialization_mission3 = {
		icon = generic_factory
		allowed = {
			always = no
		}
		available = {
			has_completed_focus = JAP_expand_nagasaki_shipyard
		}
		activation = {
			always = no
		}

		fire_only_once = yes
		is_good = no
		days_mission_timeout = JAP_industralization_mission_navy_days #600
		modifier = {

		}
		timeout_effect = {
			hidden_effect = {
				add_political_power = -150
				remove_ideas = JAP_industrial_revolution_part3
				remove_ideas = JAP_industrial_revolution_part3_2
				remove_ideas = JAP_industrial_revolution_part3_3
				remove_ideas = JAP_industrial_revolution_part3_4
				remove_ideas = JAP_industrial_revolution_part3_5
				remove_ideas = JAP_industrial_revolution_part3_6
				remove_ideas = JAP_industrial_revolution_part3_7
				remove_ideas = JAP_industrial_revolution_part3_8
				remove_ideas = JAP_industrial_revolution_part3_9
				remove_ideas = JAP_industrial_revolution_part3_10
				add_timed_idea = {
					idea = failed_navy
					days = 140
				}
				unlock_national_focus = JAP_expand_nagasaki_shipyard
			}
		}
		complete_effect = {
			hidden_effect = {
				set_country_flag = navy
				remove_ideas = JAP_industrial_revolution_part3
				remove_ideas = JAP_industrial_revolution_part3_2
				remove_ideas = JAP_industrial_revolution_part3_3
				remove_ideas = JAP_industrial_revolution_part3_4
				remove_ideas = JAP_industrial_revolution_part3_5
				remove_ideas = JAP_industrial_revolution_part3_6
				remove_ideas = JAP_industrial_revolution_part3_7
				remove_ideas = JAP_industrial_revolution_part3_8
				remove_ideas = JAP_industrial_revolution_part3_9
				remove_ideas = JAP_industrial_revolution_part3_10
			}
			if = {
				limit = {
					has_completed_focus = JAP_catch_up_to_the_west
					has_completed_focus = JAP_unified_military_industry
					has_completed_focus = JAP_nationalization_of_our_railways
				}
				complete_national_focus = JAP_end_of_the_industrial_revolution
			}
		}
	}
	### RAILWAYS
	JAP_industrialization_mission4 = {
		icon = generic_factory
		allowed = {
			always = no
		}
		available = {
			has_completed_focus = JAP_nationalization_of_our_railways
		}
		activation = {
			always = no
		}

		fire_only_once = yes
		is_good = no
		days_mission_timeout = JAP_industralization_mission_rail_days #925
		modifier = {

		}
		timeout_effect = {
			hidden_effect = {
				add_political_power = -150
				remove_ideas = JAP_industrial_revolution_part4
				remove_ideas = JAP_industrial_revolution_part4_2
				remove_ideas = JAP_industrial_revolution_part4_3
				remove_ideas = JAP_industrial_revolution_part4_4
				remove_ideas = JAP_industrial_revolution_part4_5
				remove_ideas = JAP_industrial_revolution_part4_6
				remove_ideas = JAP_industrial_revolution_part4_7
				remove_ideas = JAP_industrial_revolution_part4_8
				remove_ideas = JAP_industrial_revolution_part4_9
				remove_ideas = JAP_industrial_revolution_part4_10
				remove_ideas = JAP_industrial_revolution_part4_11
				add_timed_idea = {
					idea = JAP_failed_railroads
					days = 140
				}
				unlock_national_focus = JAP_nationalization_of_our_railways
			}
		}
		complete_effect = {
			hidden_effect = {
				remove_ideas = JAP_industrial_revolution_part4
				remove_ideas = JAP_industrial_revolution_part4_2
				remove_ideas = JAP_industrial_revolution_part4_3
				remove_ideas = JAP_industrial_revolution_part4_4
				remove_ideas = JAP_industrial_revolution_part4_5
				remove_ideas = JAP_industrial_revolution_part4_6
				remove_ideas = JAP_industrial_revolution_part4_7
				remove_ideas = JAP_industrial_revolution_part4_8
				remove_ideas = JAP_industrial_revolution_part4_9
				remove_ideas = JAP_industrial_revolution_part4_10
				remove_ideas = JAP_industrial_revolution_part4_11
				set_country_flag = rail
			}
			if = {
				limit = {
					has_completed_focus = JAP_catch_up_to_the_west
					has_completed_focus = JAP_unified_military_industry
					has_completed_focus = JAP_expand_nagasaki_shipyard
				}
				complete_national_focus = JAP_end_of_the_industrial_revolution
			}
		}
	}

	JAP_industrialization_funding_mission_hidden = {
		icon = Industry

		allowed = {
			always = no
		}

		activation = {
			always = no
		}

		available = {
			JAP = {
				exists = yes
				NOT = { has_country_flag = jap_industralisation_funding_mission_flag }
			} # Flag to permanently remove loop (made it seperate because i think you wanting to trigger vs wanting to keep looping to check trigger are two different things from what you said )
		}

		is_good = yes

		days_mission_timeout = 30

		timeout_effect = {
			if = {
				limit = { JAP = { has_country_flag = jap_industralisation_funding_events_flag } }
				JAP = { # Flag to trigger the events
					random_list = {
						6 = {
							country_event = japindustrialrevolution.40 #Public Funding
						}
						8 = {
							country_event = japindustrialrevolution.41 #Private Funding
						}
						12 = {
							country_event = japindustrialrevolution.42 #Government Funding
						}
						18 = {
						#	country_event = japindustrialrevolution.43 #No Funding
						}
					}
				}
			}
			activate_mission = JAP_industrialization_funding_mission_hidden
		}

		complete_effect = {
			# Clear when
		}
	}

	JAP_coal_mine_mission = {
		icon = coal
		allowed = {
			always = no
		}
		available = {
			owns_state = 1260
			1260 = {
				coal_mine > 0
			}
		}
		activation = {
			always = no
		}
		highlight_states = {
			highlight_state_targets = {
				state = 1260
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			1260 = {
				add_extra_state_shared_building_slots = 1
			}
			add_stability = 0.02
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.mine_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_mine_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_steel_mill_mission = {
		icon = iron
		allowed = {
			always = no
		}
		available = {
			owns_state = 533
			533 = {
				steel_mill > 0
			}
		}
		activation = {
			always = no
		}
		highlight_states = {
			highlight_state_targets = {
				state = 533
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			533 = {
				add_extra_state_shared_building_slots = 1
			}
			add_stability = 0.02
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.steel_iron_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_steel_iron_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_kagoshima_machinefactory_mission = {
		icon = generic_factory
		allowed = {
			always = no
		}
		available = {
			owns_state = 1054
			1054 = {
				machine_parts_factory > 0
			}
		}
		activation = {
			always = no
		}
		highlight_states = {
			highlight_state_targets = {
				state = 1054
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			1054 = {
				add_extra_state_shared_building_slots = 1
			}
			add_stability = 0.02
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.manufacturing_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_manufacturing_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_kokura_machinefactory_mission = {
		icon = generic_factory
		allowed = {
			always = no
		}
		available = {
			owns_state = 1258
			1258 = {
				machine_parts_factory > 0
			}
		}
		activation = {
			always = no
		}
		highlight_states = {
			highlight_state_targets = {
				state = 1258
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			1258 = {
				add_extra_state_shared_building_slots = 1
			}
			add_stability = 0.02
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.manufacturing_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_manufacturing_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_seasbo_naval_base_mission = {
		icon = naval_base
		allowed = {
			always = no
		}
		available = {
			owns_state = 1259
			1259 = {
				dockyard > 0
			}
		}
		activation = {
			always = no
		}
		highlight_states = {
			highlight_state_targets = {
				state = 1259
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			1259 = {
				add_extra_state_shared_building_slots = 1
			}
			add_stability = 0.02
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.shipyard_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_shipyard_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_yokohama_shipyard_mission = {
		icon = naval_base
		allowed = {
			always = no
		}
		available = {
			owns_state = 1266
			1266 = {
				dockyard > 0
			}
		}
		activation = {
			always = no
		}
		highlight_states = {
			highlight_state_targets = {
				state = 1266
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			1266 = {
				add_extra_state_shared_building_slots = 1
			}
			add_stability = 0.02
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.shipyard_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_shipyard_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_ishikawajima_shipyard_mission = {
		icon = naval_base
		allowed = {
			always = no
		}
		available = {
			owns_state = 282
			282 = {
				dockyard > 1
			}
		}
		activation = {
			always = no
		}
		highlight_states = {
			highlight_state_targets = {
				state = 282
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			282 = {
				add_extra_state_shared_building_slots = 1
			}
			add_stability = 0.02
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.shipyard_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_shipyard_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_kure_shipyard_mission = {
		icon = naval_base
		allowed = {
			always = no
		}
		available = {
			owns_state = 1261
			1261 = {
				dockyard > 0
			}
		}
		activation = {
			always = no
		}
		highlight_states = {
			highlight_state_targets = {
				state = 1261
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			1261 = {
				add_extra_state_shared_building_slots = 1
			}
			add_stability = 0.02
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.shipyard_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_shipyard_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_yokosuka_shipyard_mission = {
		icon = naval_base
		allowed = {
			always = no
		}
		available = {
			owns_state = 1266
			1266 = {
				dockyard > 1
			}
		}
		activation = {
			always = no
		}
		highlight_states = {
			highlight_state_targets = {
				state = 1266
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			1266 = {
				add_extra_state_shared_building_slots = 1
			}
			add_stability = 0.02
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.shipyard_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_shipyard_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_kobe_shipyard_mission = {
		icon = naval_base
		allowed = {
			always = no
		}
		available = {
			owns_state = 531
			531 = {
				dockyard > 0
			}
		}
		activation = {
			always = no
		}
		highlight_states = {
			highlight_state_targets = {
				state = 531
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			531 = {
				add_extra_state_shared_building_slots = 1
			}
			add_stability = 0.02
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.shipyard_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_shipyard_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_maizuru_shipyard_mission = {
		icon = naval_base
		allowed = {
			always = no
		}
		available = {
			owns_state = 531
			531 = {
				dockyard > 1
			}
		}
		activation = {
			always = no
		}
		highlight_states = {
			highlight_state_targets = {
				state = 531
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			531 = {
				add_extra_state_shared_building_slots = 1
			}
			add_stability = 0.02
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.shipyard_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_shipyard_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_nagasaki_shipyard_mission = {
		icon = naval_base
		allowed = {
			always = no
		}
		available = {
			owns_state = 1260
			1260 = {
				dockyard > 0
			}
		}
		activation = {
			always = no
		}
		highlight_states = {
			highlight_state_targets = {
				state = 1260
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			1260 = {
				add_extra_state_shared_building_slots = 1
			}
			add_stability = 0.02
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.shipyard_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_shipyard_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_kure_arms_mission = {
		icon = generic_factory
		allowed = {
			always = no
		}
		available = {
			owns_state = 1261
			1261 = {
				arms_factory > 0
			}
		}
		activation = {
			always = no
		}
		highlight_states = {
			highlight_state_targets = {
				state = 1261
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			1261 = {
				add_extra_state_shared_building_slots = 1
			}
			add_stability = 0.02
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.manufacturing_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_manufacturing_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_muroran_arms_mission = {
		icon = generic_factory
		allowed = {
			always = no
		}
		available = {
			owns_state = 536
			536 = {
				arms_factory > 0
			}
		}
		activation = {
			always = no
		}
		highlight_states = {
			highlight_state_targets = {
				state = 536
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			536 = {
				add_extra_state_shared_building_slots = 1
			}
			add_stability = 0.02
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.manufacturing_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_manufacturing_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_form_sanyo_company = {
		icon = generic_construction
		allowed = {
			tag = JAP
		}
		available = {

		}
		visible = {
			has_completed_focus = JAP_form_the_sanyo_railway_company
		}
		fire_only_once = yes
		cost = 25
		days_remove = 365
		modifier = {
			civilian_factory_use = 1
		}
		complete_effect = {
		}
		remove_effect = {
			add_stability = 0.02
			add_political_power = 25
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_form_hokkaido_company = {
		icon = generic_construction
		allowed = {
			tag = JAP
		}
		available = {

		}
		visible = {
			has_completed_focus = JAP_develop_hokkaido_coal_company
		}
		fire_only_once = yes
		cost = 25
		days_remove = 365
		modifier = {
			civilian_factory_use = 1
		}
		complete_effect = {
		}
		remove_effect = {
			add_stability = 0.02
			add_political_power = 25
			add_resource = {
				type = coal
				amount = 6
				state = 536
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_form_kyushu_company = {
		icon = generic_construction
		allowed = {
			tag = JAP
		}
		available = {

		}
		visible = {
			has_completed_focus = JAP_form_kyushu_railway_company
		}
		fire_only_once = yes
		cost = 25
		days_remove = 365
		modifier = {
			civilian_factory_use = 1
		}
		complete_effect = {
		}
		remove_effect = {
			add_stability = 0.02
			add_political_power = 25
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_form_mito_company = {
		icon = generic_construction
		allowed = {
			tag = JAP
		}
		available = {

		}
		visible = {
			has_completed_focus = JAP_form_mito_railway_company
		}
		fire_only_once = yes
		cost = 25
		days_remove = 365
		modifier = {
			civilian_factory_use = 1
		}
		complete_effect = {
		}
		remove_effect = {
			add_stability = 0.02
			add_political_power = 25
		}
		ai_will_do = {
			base = 100
		}
	}

	the_british_for_trains = {
		icon = train
		allowed = {
			tag = JAP
		}
		available = {

		}
		visible = {
			has_completed_focus = JAP_tetsudou_industry
		}
		fire_only_once = yes
		cost = 15
		modifier = {

		}
		complete_effect = {
			ENG = { country_event = japindustrialrevolution.38 }
		}
		remove_effect = {
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_mission_tokyo_yokohama_rail = { # 1 Tokyo to Yokohama
		icon = railway
		allowed = { always = no }
		available = {
			has_railway_level = {
				state = 282
				level = 2
			}
			has_railway_level = {
				state = 1266
				level = 2
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_kyoto_yokohama_rail_trigger_tt
				hidden_trigger = {
					has_railway_connection = {
						start_province = 1182
						target_province = 13931
					}
				}
			}
		}
		activation = { always = no }
		priority = 37
		highlight_states = {
			highlight_state_targets = {
				state = 1266
				state = 282
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		cancel_trigger = {
			OR = {
				NOT = { owns_state = 1266 }
				NOT = { owns_state = 282 }
			}
		}
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			country_event = japindustrialrevolution.2
			1266 = {
				add_extra_state_shared_building_slots = 1
			}
			282 = {
				add_extra_state_shared_building_slots = 1
			}
			add_tech_bonus = {
				bonus = 0.25
				uses = 1
				category = transport_tech
			}
			if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_2
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_2
					add_idea = JAP_industrial_revolution_part4_3
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_3
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_3
					add_idea = JAP_industrial_revolution_part4_4
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_4
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_4
					add_idea = JAP_industrial_revolution_part4_5
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_5
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_5
					add_idea = JAP_industrial_revolution_part4_6
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_6
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_6
					add_idea = JAP_industrial_revolution_part4_7
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_7
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_7
					add_idea = JAP_industrial_revolution_part4_8
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_8
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_8
					add_idea = JAP_industrial_revolution_part4_9
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_9
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_9
					add_idea = JAP_industrial_revolution_part4_10
				}
			}
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission4
				days = 210
			}
			set_temp_variable = {
				eoanb_prestige_change = 2
			}
			eoanb_change_prestige_score = yes
			set_temp_variable = { institution_progress_temp = 1 }
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.railroad_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_railroad_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_mission_tokaido_rail = { #4 Yokohama to Shizuoka to Nagoya to Kyoto
		icon = railway
		allowed = { always = no }
		available = {
			has_railway_level = {
				state = 1266
				level = 2
			}
			has_railway_level = {
				state = 282
				level = 2
			}
			has_railway_level = {
				state = 532
				level = 2
			}
			has_railway_level = {
				state = 1265
				level = 2
			}
			has_railway_level = {
				state = 1106
				level = 2
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_tokaido_rail_trigger_tt_1
				hidden_trigger = {
					has_railway_connection = {
						start_province = 13931
						target_province = 7087
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_tokaido_rail_trigger_tt_2
				hidden_trigger = {
					has_railway_connection = {
						start_province = 7087
						target_province = 10125
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_tokaido_rail_trigger_tt_3
				hidden_trigger = {
					has_railway_connection = {
						start_province = 10125
						target_province = 11960
					}
				}
			}
		}
		activation = { always = no }
		priority = 37
		highlight_states = {
			highlight_state_targets = {
				state = 1266
				state = 282
				state = 532
				state = 1265
				state = 1106
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		cancel_trigger = {
			OR = {
				NOT = { owns_state = 1266 }
				NOT = { owns_state = 282 }
				NOT = { owns_state = 532 }
				NOT = { owns_state = 1265 }
				NOT = { owns_state = 1106 }
			}
		}
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			1266 = {
				add_extra_state_shared_building_slots = 1
			}
			282 = {
				add_extra_state_shared_building_slots = 1
			}
			532 = {
				add_extra_state_shared_building_slots = 1
			}
			1265 = {
				add_extra_state_shared_building_slots = 1
			}
			1106 = {
				add_extra_state_shared_building_slots = 1
			}
			add_tech_bonus = {
				bonus = 0.25
				uses = 1
				category = transport_tech
			}
			if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_2
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_2
					add_idea = JAP_industrial_revolution_part4_3
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_3
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_3
					add_idea = JAP_industrial_revolution_part4_4
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_4
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_4
					add_idea = JAP_industrial_revolution_part4_5
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_5
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_5
					add_idea = JAP_industrial_revolution_part4_6
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_6
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_6
					add_idea = JAP_industrial_revolution_part4_7
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_7
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_7
					add_idea = JAP_industrial_revolution_part4_8
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_8
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_8
					add_idea = JAP_industrial_revolution_part4_9
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_9
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_9
					add_idea = JAP_industrial_revolution_part4_10
				}
			}

			add_days_mission_timeout = {
				mission = JAP_industrialization_mission4
				days = 210
			}
			set_temp_variable = {
				eoanb_prestige_change = 2
			}
			eoanb_change_prestige_score = yes
			set_temp_variable = { institution_progress_temp = 1 }
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.railroad_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_railroad_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_mission_hokurika_rail = { #9 Tokyo to Ueda to Kanazawa
		icon = railway
		allowed = { always = no }
		available = {
			has_railway_level = {
				state = 282
				level = 2
			}
			has_railway_level = {
				state = 534
				level = 2
			}
			has_railway_level = {
				state = 535
				level = 2
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_hokurika_rail_trigger_tt_1
				hidden_trigger = {
					has_railway_connection = {
						start_province = 1182
						target_province = 10015
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_hokurika_rail_trigger_tt_2
				hidden_trigger = {
					has_railway_connection = {
						start_province = 10015
						target_province = 10032
					}
				}
			}
		}
		activation = { always = no }
		priority = 37
		highlight_states = {
			highlight_state_targets = {
				state = 282
				state = 534
				state = 535
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		cancel_trigger = {
			OR = {
				NOT = { owns_state = 282 }
				NOT = { owns_state = 534 }
				NOT = { owns_state = 535 }
			}
		}
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			282 = {
				add_extra_state_shared_building_slots = 1
			}
			534 = {
				add_extra_state_shared_building_slots = 1
			}
			535 = {
				add_extra_state_shared_building_slots = 1
			}
			add_tech_bonus = {
				bonus = 0.25
				uses = 1
				category = transport_tech
			}
			if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_2
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_2
					add_idea = JAP_industrial_revolution_part4_3
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_3
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_3
					add_idea = JAP_industrial_revolution_part4_4
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_4
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_4
					add_idea = JAP_industrial_revolution_part4_5
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_5
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_5
					add_idea = JAP_industrial_revolution_part4_6
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_6
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_6
					add_idea = JAP_industrial_revolution_part4_7
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_7
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_7
					add_idea = JAP_industrial_revolution_part4_8
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_8
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_8
					add_idea = JAP_industrial_revolution_part4_9
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_9
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_9
					add_idea = JAP_industrial_revolution_part4_10
				}
			}
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission4
				days = 210
			}
			set_temp_variable = {
				eoanb_prestige_change = 2
			}
			eoanb_change_prestige_score = yes
			set_temp_variable = { institution_progress_temp = 1 }
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.railroad_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_railroad_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_mission_sanyo_rail = { #7 Hyogo to Okayama to Hiroshima to Hagi
		icon = railway
		allowed = { always = no }
		available = {
			has_railway_level = {
				state = 531
				level = 2
			}
			has_railway_level = {
				state = 1261
				level = 2
			}
			has_railway_level = {
				state = 1210
				level = 2
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_sanyo_rail_trigger_tt_1
				hidden_trigger = {
					has_railway_connection = {
						start_province = 13921
						target_province = 7212
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_sanyo_rail_trigger_tt_2
				hidden_trigger = {
					has_railway_connection = {
						start_province = 7212
						target_province = 1092
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_sanyo_rail_trigger_tt_3
				hidden_trigger = {
					has_railway_connection = {
						start_province = 1092
						target_province = 13915
					}
				}
			}
		}
		activation = { always = no }
		priority = 37
		highlight_states = {
			highlight_state_targets = {
				state = 531
				state = 1261
				state = 1210
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		cancel_trigger = {
			OR = {
				NOT = { owns_state = 531 }
				NOT = { owns_state = 1261 }
				NOT = { owns_state = 1210 }
			}
		}
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			531 = {
				add_extra_state_shared_building_slots = 1
			}
			1261 = {
				add_extra_state_shared_building_slots = 1
			}
			1210 = {
				add_extra_state_shared_building_slots = 1
			}
			add_tech_bonus = {
				bonus = 0.25
				uses = 1
				category = transport_tech
			}
			if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_2
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_2
					add_idea = JAP_industrial_revolution_part4_3
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_3
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_3
					add_idea = JAP_industrial_revolution_part4_4
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_4
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_4
					add_idea = JAP_industrial_revolution_part4_5
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_5
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_5
					add_idea = JAP_industrial_revolution_part4_6
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_6
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_6
					add_idea = JAP_industrial_revolution_part4_7
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_7
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_7
					add_idea = JAP_industrial_revolution_part4_8
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_8
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_8
					add_idea = JAP_industrial_revolution_part4_9
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_9
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_9
					add_idea = JAP_industrial_revolution_part4_10
				}
			}
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission4
				days = 210
			}
			set_temp_variable = {
				eoanb_prestige_change = 2
			}
			eoanb_change_prestige_score = yes
			set_temp_variable = { institution_progress_temp = 1 }
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.railroad_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_railroad_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_mission_osaka_kobe_rail = { #2 Osaka to Hyogo
		icon = railway
		allowed = { always = no }
		available = {
			has_railway_level = {
				state = 1263
				level = 2
			}
			has_railway_level = {
				state = 531
				level = 2
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_osaka_kobe_rail_trigger_tt
				hidden_trigger = {
					has_railway_connection = {
						start_province = 7072
						target_province = 13921
					}
				}
			}
		}
		activation = { always = no }
		priority = 37
		highlight_states = {
			highlight_state_targets = {
				state = 1263
				state = 531
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		cancel_trigger = {
			OR = {
				NOT = { owns_state = 1263 }
				NOT = { owns_state = 531 }
			}
		}
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			1263 = {
				add_extra_state_shared_building_slots = 1
			}
			531 = {
				add_extra_state_shared_building_slots = 1
			}
			add_tech_bonus = {
				bonus = 0.25
				uses = 1
				category = transport_tech
			}
			if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_2
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_2
					add_idea = JAP_industrial_revolution_part4_3
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_3
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_3
					add_idea = JAP_industrial_revolution_part4_4
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_4
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_4
					add_idea = JAP_industrial_revolution_part4_5
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_5
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_5
					add_idea = JAP_industrial_revolution_part4_6
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_6
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_6
					add_idea = JAP_industrial_revolution_part4_7
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_7
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_7
					add_idea = JAP_industrial_revolution_part4_8
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_8
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_8
					add_idea = JAP_industrial_revolution_part4_9
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_9
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_9
					add_idea = JAP_industrial_revolution_part4_10
				}
			}
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission4
				days = 210
			}
			set_temp_variable = {
				eoanb_prestige_change = 2
			}
			eoanb_change_prestige_score = yes
			set_temp_variable = { institution_progress_temp = 1 }
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.railroad_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_railroad_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_mission_hokkaido_rail = { #3 Aomori port to Hakodate to Sapporo to Ashigawa
		icon = railway
		allowed = { always = no }
		available = {
			has_railway_level = {
				state = 1277
				level = 2
			}
			has_railway_level = {
				state = 536
				level = 2
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_hokkaido_rail_trigger_tt_1
				hidden_trigger = {
					has_railway_connection = {
						start_province = 9859
						target_province = 3962
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_hokkaido_rail_trigger_tt_2
				hidden_trigger = {
					has_railway_connection = {
						start_province = 3962
						target_province = 10444
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_hokkaido_rail_trigger_tt_3
				hidden_trigger = {
					has_railway_connection = {
						start_province = 10444
						target_province = 12421
					}
				}
			}
		}
		activation = { always = no }
		priority = 37
		highlight_states = {
			highlight_state_targets = {
				state = 1277
				state = 536
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		cancel_trigger = {
			OR = {
				NOT = { owns_state = 536 }
				NOT = { owns_state = 1277 }
			}
		}
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			536 = {
				add_extra_state_shared_building_slots = 1
			}
			1277 = {
				add_extra_state_shared_building_slots = 1
			}
			add_tech_bonus = {
				bonus = 0.25
				uses = 1
				category = transport_tech
			}
			if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_2
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_2
					add_idea = JAP_industrial_revolution_part4_3
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_3
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_3
					add_idea = JAP_industrial_revolution_part4_4
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_4
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_4
					add_idea = JAP_industrial_revolution_part4_5
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_5
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_5
					add_idea = JAP_industrial_revolution_part4_6
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_6
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_6
					add_idea = JAP_industrial_revolution_part4_7
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_7
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_7
					add_idea = JAP_industrial_revolution_part4_8
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_8
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_8
					add_idea = JAP_industrial_revolution_part4_9
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_9
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_9
					add_idea = JAP_industrial_revolution_part4_10
				}
			}
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission4
				days = 210
			}
			set_temp_variable = {
				eoanb_prestige_change = 2
			}
			eoanb_change_prestige_score = yes
			set_temp_variable = { institution_progress_temp = 1 }
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.railroad_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_railroad_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_mission_iyotetsu_rail = { #8 Hyogo to Tokushima to Takumastu to Kochi
		icon = railway
		allowed = { always = no }
		available = {
			has_railway_level = {
				state = 531
				level = 2
			}
			has_railway_level = {
				state = 1269
				level = 2
			}
			has_railway_level = {
				state = 1053
				level = 2
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_iyotetsu_rail_trigger_tt_1
				hidden_trigger = {
					has_railway_connection = {
						start_province = 13921
						target_province = 9965
					}
				}
				OR = {
					hidden_trigger = {
						has_railway_connection = {
							start_province = 9965
							target_province = 13921
						}
					}
				}
			}			
			custom_trigger_tooltip = {
				tooltip = JAP_mission_iyotetsu_rail_trigger_tt_2
				hidden_trigger = {
					has_railway_connection = {
						start_province = 9965
						target_province = 4094
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_iyotetsu_rail_trigger_tt_3
				hidden_trigger = {
					has_railway_connection = {
						start_province = 4094
						target_province = 7197
					}
				}
			}
		}
		activation = { always = no }
		priority = 37
		highlight_states = {
			highlight_state_targets = {
				state = 531
				state = 1269
				state = 1053
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		cancel_trigger = {
			OR = {
				NOT = { owns_state = 531 }
				NOT = { owns_state = 1269 }
				NOT = { owns_state = 1053 }
			}
		}
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			531 = {
				add_extra_state_shared_building_slots = 1
			}
			1269 = {
				add_extra_state_shared_building_slots = 1
			}
			1053 = {
				add_extra_state_shared_building_slots = 1
			}
			add_tech_bonus = {
				bonus = 0.25
				uses = 1
				category = transport_tech
			}
			if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_2
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_2
					add_idea = JAP_industrial_revolution_part4_3
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_3
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_3
					add_idea = JAP_industrial_revolution_part4_4
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_4
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_4
					add_idea = JAP_industrial_revolution_part4_5
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_5
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_5
					add_idea = JAP_industrial_revolution_part4_6
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_6
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_6
					add_idea = JAP_industrial_revolution_part4_7
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_7
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_7
					add_idea = JAP_industrial_revolution_part4_8
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_8
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_8
					add_idea = JAP_industrial_revolution_part4_9
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_9
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_9
					add_idea = JAP_industrial_revolution_part4_10
				}
			}
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission4
				days = 210
			}
			set_temp_variable = {
				eoanb_prestige_change = 2
			}
			eoanb_change_prestige_score = yes
			set_temp_variable = { institution_progress_temp = 1 }
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.railroad_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_railroad_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_mission_kansai_rail = { #6 Kyoto to Osaka
		icon = railway
		allowed = { always = no }
		available = {
			has_railway_level = {
				state = 1106
				level = 2
			}
			has_railway_level = {
				state = 1263
				level = 2
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_kansai_rail_trigger_tt
				hidden_trigger = {
					has_railway_connection = {
						start_province = 11960
						target_province = 7072
					}
				}
			}
		}
		activation = { always = no }
		priority = 37
		highlight_states = {
			highlight_state_targets = {
				state = 1106
				state = 1263
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		cancel_trigger = {
			OR = {
				NOT = { owns_state = 1106 }
				NOT = { owns_state = 1263 }
			}
		}
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			1106 = {
				add_extra_state_shared_building_slots = 1
			}
			1263 = {
				add_extra_state_shared_building_slots = 1
			}
			add_tech_bonus = {
				bonus = 0.25
				uses = 1
				category = transport_tech
			}
			if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_2
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_2
					add_idea = JAP_industrial_revolution_part4_3
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_3
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_3
					add_idea = JAP_industrial_revolution_part4_4
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_4
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_4
					add_idea = JAP_industrial_revolution_part4_5
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_5
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_5
					add_idea = JAP_industrial_revolution_part4_6
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_6
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_6
					add_idea = JAP_industrial_revolution_part4_7
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_7
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_7
					add_idea = JAP_industrial_revolution_part4_8
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_8
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_8
					add_idea = JAP_industrial_revolution_part4_9
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_9
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_9
					add_idea = JAP_industrial_revolution_part4_10
				}
			}
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission4
				days = 210
			}
			set_temp_variable = {
				eoanb_prestige_change = 2
			}
			eoanb_change_prestige_score = yes
			set_temp_variable = { institution_progress_temp = 1 }
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.railroad_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_railroad_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_mission_kyushu_rail = { #5 Kokura Port to Kokura to Jumamoto to Osumi Port
		icon = railway
		allowed = { always = no }
		available = {
			has_railway_level = {
				state = 1258
				level = 2
			}
			has_railway_level = {
				state = 1257
				level = 2
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_kyushu_rail_trigger_tt_1
				hidden_trigger = {
					has_railway_connection = {
						start_province = 13840
						target_province = 1025
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_kyushu_rail_trigger_tt_2
				hidden_trigger = {
					has_railway_connection = {
						start_province = 1025
						target_province = 11925
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = JAP_mission_kyushu_rail_trigger_tt_3
				hidden_trigger = {
					has_railway_connection = {
						start_province = 11925
						target_province = 13548
					}
				}
			}
		}
		activation = { always = no }
		priority = 37
		highlight_states = {
			highlight_state_targets = {
				state = 1258
				state = 1257
			}
		}
		fire_only_once = yes
		is_good = no
		days_mission_timeout = 1600
		cancel_trigger = {
			OR = {
				NOT = { owns_state = 1258 }
				NOT = { owns_state = 1257 }
			}
		}
		timeout_effect = {
			if = {
				limit = {
					is_ai = no
				}
				add_political_power = -50
				add_stability = -0.02
			}
		}
		complete_effect = {
			1258 = {
				add_extra_state_shared_building_slots = 1
			}
			1257 = {
				add_extra_state_shared_building_slots = 1
			}
			add_tech_bonus = {
				bonus = 0.25
				uses = 1
				category = transport_tech
			}
			if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_2
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_2
					add_idea = JAP_industrial_revolution_part4_3
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_3
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_3
					add_idea = JAP_industrial_revolution_part4_4
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_4
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_4
					add_idea = JAP_industrial_revolution_part4_5
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_5
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_5
					add_idea = JAP_industrial_revolution_part4_6
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_6
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_6
					add_idea = JAP_industrial_revolution_part4_7
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_7
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_7
					add_idea = JAP_industrial_revolution_part4_8
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_8
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_8
					add_idea = JAP_industrial_revolution_part4_9
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_industrial_revolution_part4_9
				}
				swap_ideas = {
					remove_idea = JAP_industrial_revolution_part4_9
					add_idea = JAP_industrial_revolution_part4_10
				}
			}
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission4
				days = 210
			}
			set_temp_variable = {
				eoanb_prestige_change = 2
			}
			eoanb_change_prestige_score = yes
			set_temp_variable = { institution_progress_temp = 1 }
			if = {
				limit = {
					has_active_mission = JAP_ministry_progression_timer
				}
				add_to_variable = {
					var = JAP.railroad_value
					value = 1
				}
				custom_effect_tooltip = JAP_add_value_percentage_railroad_tt
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	major_recalibrate_industry_civ = {
		icon = generic_construction
		allowed = {
			tag = JAP
		}
		available = {
			NOT = {
				has_decision = medium_recalibrate_industry_civ
				has_decision = minor_recalibrate_industry_civ
			}
		}
		visible = {
			has_active_mission = JAP_industrialization_mission
		}
		fire_only_once = no
		cost = JAP_civ_recalibration_ramp_major
		days_remove = 56
		modifier = {
			stability_weekly = -0.012
		}
		complete_effect = {
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission
				days = 35
			}
			hidden_effect = {
				add_to_variable = {
					var = JAP_recalibration_ramp_combined
					value = 0.25
				}
				JAP_update_industrialization_effect = yes
			}
		}
		remove_effect = {
		}
		ai_will_do = {
			base = 100
		}
	}

	medium_recalibrate_industry_civ = {
		icon = generic_construction
		allowed = {
			tag = JAP
		}
		available = {
			NOT = {
				has_decision = major_recalibrate_industry_civ
				has_decision = minor_recalibrate_industry_civ
			}
		}
		visible = {
			has_active_mission = JAP_industrialization_mission
		}
		fire_only_once = no
		cost = JAP_civ_recalibration_ramp_medium
		days_remove = 56
		modifier = {
			stability_weekly = -0.01
		}
		complete_effect = {
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission
				days = 15
			}
			hidden_effect = {
				add_to_variable = {
					var = JAP_recalibration_ramp_combined
					value = 0.1
				}
				JAP_update_industrialization_effect = yes
			}
		}
		remove_effect = {
		}
		ai_will_do = {
			base = 100
		}
	}

	minor_recalibrate_industry_civ = {
		icon = generic_construction
		allowed = {
			tag = JAP
		}
		available = {
			NOT = {
				has_decision = medium_recalibrate_industry_civ
				has_decision = major_recalibrate_industry_civ
			}
		}
		visible = {
			has_active_mission = JAP_industrialization_mission
		}
		fire_only_once = no
		cost = JAP_civ_recalibration_ramp_minor
		days_remove = 56
		modifier = {
			stability_weekly = -0.005
		}
		complete_effect = {
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission
				days = 5
			}
			hidden_effect = {
				add_to_variable = {
					var = JAP_recalibration_ramp_combined
					value = 0.05
				}
				JAP_update_industrialization_effect = yes
			}
		}
		remove_effect = {
		}
		ai_will_do = {
			base = 100
		}
	}

	major_recalibrate_industry_mil = {
		icon = artillery
		allowed = {
			tag = JAP
		}
		available = {
			NOT = {
				has_decision = medium_recalibrate_industry_mil
				has_decision = minor_recalibrate_industry_mil
			}
		}
		visible = {
			has_active_mission = JAP_industrialization_mission2 
		}
		fire_only_once = no
		cost = JAP_mil_recalibration_ramp_major
		days_remove = 56
		modifier = {
			stability_weekly = -0.012
		}
		complete_effect = {
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission2
				days = 35
			}
			hidden_effect = {
				add_to_variable = {
					var = JAP_recalibration_ramp_combined
					value = 0.25
				}
				JAP_update_industrialization_effect = yes
			}
		}
		remove_effect = {
		}
		ai_will_do = {
			base = 100
		}
	}

	medium_recalibrate_industry_mil = {
		icon = artillery
		allowed = {
			tag = JAP
		}
		available = {
			NOT = {
				has_decision = major_recalibrate_industry_mil
				has_decision = minor_recalibrate_industry_mil
			}
		}
		visible = {
			has_active_mission = JAP_industrialization_mission2 
		}
		fire_only_once = no
		cost = JAP_mil_recalibration_ramp_medium
		days_remove = 56
		modifier = {
			stability_weekly = -0.01
		}
		complete_effect = {
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission2
				days = 15
			}
			hidden_effect = {
				add_to_variable = {
					var = JAP_recalibration_ramp_combined
					value = 0.1
				}
				JAP_update_industrialization_effect = yes
			}
		}
		remove_effect = {
		}
		ai_will_do = {
			base = 100
		}
	}

	minor_recalibrate_industry_mil = {
		icon = artillery
		allowed = {
			tag = JAP
		}
		available = {
			NOT = {
				has_decision = major_recalibrate_industry_mil
				has_decision = medium_recalibrate_industry_mil
			}
		}
		visible = {
			has_active_mission = JAP_industrialization_mission2 
		}
		fire_only_once = no
		cost = JAP_mil_recalibration_ramp_minor
		days_remove = 56
		modifier = {
			stability_weekly = -0.005
		}
		complete_effect = {
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission2
				days = 5
			}
			hidden_effect = {
				add_to_variable = {
					var = JAP_recalibration_ramp_combined
					value = 0.05
				}
				JAP_update_industrialization_effect = yes
			}
		}
		remove_effect = {
		}
		ai_will_do = {
			base = 100
		}
	}

	major_recalibrate_industry_navy = {
		icon = naval_base
		allowed = {
			tag = JAP
		}
		available = {
			NOT = {
				has_decision = medium_recalibrate_industry_navy
				has_decision = minor_recalibrate_industry_navy
			}
		}
		visible = {
			has_active_mission = JAP_industrialization_mission3 
		}
		fire_only_once = no
		cost = JAP_navy_recalibration_ramp_major
		days_remove = 56
		modifier = {
			stability_weekly = -0.012
		}
		complete_effect = {
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission3
				days = 35
			}
			hidden_effect = {
				add_to_variable = {
					var = JAP_recalibration_ramp_combined
					value = 0.25
				}
				JAP_update_industrialization_effect = yes
			}
		}
		remove_effect = {
		}
		ai_will_do = {
			base = 100
		}
	}

	medium_recalibrate_industry_navy = {
		icon = naval_base
		allowed = {
			tag = JAP
		}
		available = {
			NOT = {
				has_decision = major_recalibrate_industry_navy
				has_decision = minor_recalibrate_industry_navy
			}
		}
		visible = {
			has_active_mission = JAP_industrialization_mission3 
		}
		fire_only_once = no
		cost = JAP_navy_recalibration_ramp_medium
		days_remove = 56
		modifier = {
			stability_weekly = -0.01
		}
		complete_effect = {
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission3
				days = 15
			}
			hidden_effect = {
				add_to_variable = {
					var = JAP_recalibration_ramp_combined
					value = 0.1
				}
				JAP_update_industrialization_effect = yes
			}
		}
		remove_effect = {
		}
		ai_will_do = {
			base = 100
		}
	}

	minor_recalibrate_industry_navy = {
		icon = naval_base
		allowed = {
			tag = JAP
		}
		available = {
			NOT = {
				has_decision = major_recalibrate_industry_navy
				has_decision = medium_recalibrate_industry_navy
			}
		}
		visible = {
			has_active_mission = JAP_industrialization_mission3 
		}
		fire_only_once = no
		cost = JAP_navy_recalibration_ramp_minor
		days_remove = 56
		modifier = {
			stability_weekly = -0.005
		}
		complete_effect = {
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission3
				days = 5
			}
			hidden_effect = {
				add_to_variable = {
					var = JAP_recalibration_ramp_combined
					value = 0.05
				}
				JAP_update_industrialization_effect = yes
			}
		}
		remove_effect = {
		}
		ai_will_do = {
			base = 100
		}
	}

	major_recalibrate_industry_rail = {
		icon = railway
		allowed = {
			tag = JAP
		}
		available = {
			NOT = {
				has_decision = medium_recalibrate_industry_rail
				has_decision = minor_recalibrate_industry_rail
			}
		}
		visible = {
			has_active_mission = JAP_industrialization_mission4 
		}
		fire_only_once = no
		cost = JAP_rail_recalibration_ramp_major
		days_remove = 56
		modifier = {
			stability_weekly = -0.012
		}
		complete_effect = {
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission4
				days = 35
			}
			hidden_effect = {
				add_to_variable = {
					var = JAP_recalibration_ramp_combined
					value = 0.25
				}
				JAP_update_industrialization_effect = yes
			}
		}
		remove_effect = {
		}
		ai_will_do = {
			base = 100
		}
	}

	medium_recalibrate_industry_rail = {
		icon = railway
		allowed = {
			tag = JAP
		}
		available = {
			NOT = {
				has_decision = major_recalibrate_industry_rail
				has_decision = minor_recalibrate_industry_rail
			}
		}
		visible = {
			has_active_mission = JAP_industrialization_mission4 
		}
		fire_only_once = no
		cost = JAP_rail_recalibration_ramp_medium
		days_remove = 56
		modifier = {
			stability_weekly = -0.01
		}
		complete_effect = {
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission4
				days = 15
			}
			hidden_effect = {
				add_to_variable = {
					var = JAP_recalibration_ramp_combined
					value = 0.1
				}
				JAP_update_industrialization_effect = yes
			}
		}
		remove_effect = {
		}
		ai_will_do = {
			base = 100
		}
	}

	minor_recalibrate_industry_rail = {
		icon = railway
		allowed = {
			tag = JAP
		}
		available = {
			NOT = {
				has_decision = major_recalibrate_industry_rail
				has_decision = minor_recalibrate_industry_rail
			}
		}
		visible = {
			has_active_mission = JAP_industrialization_mission4 
		}
		fire_only_once = no
		cost = JAP_rail_recalibration_ramp_minor
		days_remove = 56
		modifier = {
			stability_weekly = -0.005
		}
		complete_effect = {
			add_days_mission_timeout = {
				mission = JAP_industrialization_mission4
				days = 5
			}
			hidden_effect = {
				add_to_variable = {
					var = JAP_recalibration_ramp_combined
					value = 0.05
				}
				JAP_update_industrialization_effect = yes
			}
		}
		remove_effect = {
		}
		ai_will_do = {
			base = 100
		}
	}
}
#### Ministry of Public Works ###
JAP_ministry_of_public_works_category = {
	JAP_form_the_ministry_of_public_works = {

		icon = GFX_decision_constitution

		available = {
			custom_trigger_tooltip = {
				tooltip = ministry_departments_percent_requirement_tt
				has_country_flag = fl_finished_mpw
			}
		}
		allowed = { TAG = JAP }

		visible = {

		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			complete_national_focus = JAP_formation_of_the_public_works
			custom_effect_tooltip = JAP_upkeep_progress_tt
			set_variable = {
				var = JAP_upkeep_percentage
				value = 100
			}
			hidden_effect = {
				add_ideas = JAP_formed_mpw
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 25
				}
				UCT = { activate_mission = JAP_upkeep_hidden_timer }
				add_political_power = JAP_pp_value
				clear_variable = JAP_pp_value
			}
		}

		modifier = {

		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_railroad_department_boost = {

		icon = GFX_Japan_railroad_decision_texticon

		available = {
			has_completed_focus = JAP_tetsudou_industry
		}
		allowed = { TAG = JAP }

		visible = {
			has_active_mission = JAP_ministry_progression_timer
		}

		fire_only_once = yes

		cost = 40

		complete_effect = {
			custom_effect_tooltip = JAP_railroad_department_boost_tt
			add_to_variable = {
				var = JAP_railroad_percentage
				value = 6
			}
			clamp_variable = {
				var = JAP_railroad_percentage
				max = 100
			}
			add_to_variable = {
				var = JAP_pp_value
				value = 40
			}
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_mines_department_boost = {

		icon = GFX_Japan_mining_decision_texticon

		available = {
			has_completed_focus = JAP_nagasaki_coal_mine
		}
		allowed = { TAG = JAP }

		visible = {
			has_active_mission = JAP_ministry_progression_timer
		}

		fire_only_once = yes

		cost = 40

		complete_effect = {
			custom_effect_tooltip = JAP_mines_department_boost_tt
			add_to_variable = {
				var = JAP_mine_percentage
				value = 6
			}
			clamp_variable = {
				var = JAP_mine_percentage
				max = 100
			}
			add_to_variable = {
				var = JAP_pp_value
				value = 40
			}
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_telecommunication_department_boost = {

		icon = GFX_Japan_telecom_decision_texticon


		available = {
			has_completed_focus = JAP_introduce_electricity_new
		}
		allowed = { TAG = JAP }

		visible = {
			has_active_mission = JAP_ministry_progression_timer
		}

		fire_only_once = yes

		cost = 40

		complete_effect = {
			custom_effect_tooltip = JAP_telecommunication_department_boost_tt
			add_to_variable = {
				var = JAP_telecommunication_percentage
				value = 6
			}
			clamp_variable = {
				var = JAP_telecommunication_percentage
				max = 100
			}
			add_to_variable = {
				var = JAP_pp_value
				value = 40
			}
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_shipyard_department_boost = {

		icon = GFX_Japan_shipyard_decision_texticon

		available = {
			has_completed_focus = JAP_kaigun_industry
		}
		allowed = { TAG = JAP }

		visible = {
			has_active_mission = JAP_ministry_progression_timer
		}

		fire_only_once = yes

		cost = 40

		complete_effect = {
			custom_effect_tooltip = JAP_shipyard_department_boost_tt
			add_to_variable = {
				var = JAP_shipyard_percentage
				value = 6
			}
			clamp_variable = {
				var = JAP_shipyard_percentage
				max = 100
			}
			add_to_variable = {
				var = JAP_pp_value
				value = 40
			}
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_steel_iron_department_boost = {

		icon = GFX_Japan_iron_and_steel_decision_texticon

		available = {
			has_completed_focus = JAP_mutsu_steel_mill
		}
		allowed = { TAG = JAP }

		visible = {
			has_active_mission = JAP_ministry_progression_timer
		}

		fire_only_once = yes

		cost = 40

		complete_effect = {
			custom_effect_tooltip = JAP_steel_iron_department_boost_tt
			add_to_variable = {
				var = JAP_steel_iron_percentage
				value = 6
			}
			clamp_variable = {
				var = JAP_steel_iron_percentage
				max = 100
			}
			add_to_variable = {
				var = JAP_pp_value
				value = 40
			}
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_manufacturing_department_boost = {

		icon = GFX_Japan_manufacturing_decision_texticon

		available = {
			has_completed_focus = JAP_our_military_economy
		}
		allowed = { TAG = JAP }

		visible = {
			has_active_mission = JAP_ministry_progression_timer
		}

		fire_only_once = yes

		cost = 40

		complete_effect = {
			custom_effect_tooltip = JAP_manufacturing_department_boost_tt
			add_to_variable = {
				var = JAP_manufacturing_percentage
				value = 6
			}
			clamp_variable = {
				var = JAP_manufacturing_percentage
				max = 100
			}
			add_to_variable = {
				var = JAP_pp_value
				value = 40
			}
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_ministry_progression_timer = {
		icon = GFX_decision_newspaper_folded

		available = {
			check_variable = { JAP_railroad_percentage = 100 }
			check_variable = { JAP_mine_percentage = 100 }
			check_variable = { JAP_telecommunication_percentage = 100 }
			check_variable = { JAP_shipyard_percentage = 100 }
			check_variable = { JAP_steel_iron_percentage = 100 }
			check_variable = { JAP_manufacturing_percentage = 100 }

			custom_trigger_tooltip = {
				tooltip = form_the_ministry_of_public_works_percent_check_tt
			}
		}
		
		allowed = {
			TAG = JAP
		}

		activation = {
			always = no
		}

		fire_only_once = no

		is_good = no

		days_mission_timeout = 7

		complete_effect = {
			set_country_flag = fl_finished_mpw
		}

		timeout_effect = {
			if = {
				limit = {
					has_completed_focus = JAP_railroads_department
				}
				add_to_variable = {
					var = JAP_railroad_percentage
					value = JAP.railroad_value
				}
				clamp_variable = {
					var = JAP_railroad_percentage
					max = 100
				}
				custom_effect_tooltip = JAP_railroad_value_tt
			}
			if = {
				limit = {
					has_completed_focus = JAP_mines_department
				}
				add_to_variable = {
					var = JAP_mine_percentage
					value = JAP.mine_value
				}
				clamp_variable = {
					var = JAP_mine_percentage
					max = 100
				}
				custom_effect_tooltip = JAP_mine_value_tt
			}
			if = {
				limit = {
					has_completed_focus = JAP_telecommunication_department
				}
				add_to_variable = {
					var = JAP_telecommunication_percentage
					value = JAP.telecommunication_value
				}
				clamp_variable = {
					var = JAP_telecommunication_percentage
					max = 100
				}
				custom_effect_tooltip = JAP_telecommunication_value_tt
			}
			if = {
				limit = {
					has_completed_focus = JAP_shipyards_department
				}
				add_to_variable = {
					var = JAP_shipyard_percentage
					value = JAP.shipyard_value
				}
				clamp_variable = {
					var = JAP_shipyard_percentage
					max = 100
				}
				custom_effect_tooltip = JAP_shipyard_value_tt
			}
			if = {
				limit = {
					has_completed_focus = JAP_steel_and_iron_department
				}
				add_to_variable = {
					var = JAP_steel_iron_percentage
					value = JAP.steel_iron_value
				}
				clamp_variable = {
					var = JAP_steel_iron_percentage
					max = 100
				}
				custom_effect_tooltip = JAP_steel_iron_value_tt
			}
			if = {
				limit = {
					has_completed_focus = JAP_manufacturing_department
				}
				add_to_variable = {
					var = JAP_manufacturing_percentage
					value = JAP.manufacturing_value
				}
				clamp_variable = {
					var = JAP_manufacturing_percentage
					max = 100
				}
				custom_effect_tooltip = JAP_manufacturing_value_tt
			}
			activate_mission = JAP_ministry_progression_timer
		}
		
		ai_will_do = {
			base = 10
		}
	}

	JAP_upkeep_decision = {

		icon = GFX_decision_money

		available = {
			check_variable = { JAP_upkeep_percentage < 100 }
			custom_trigger_tooltip = {
				tooltip = JAP_upkeep_less_than_check_tt
			}
		}
		allowed = { TAG = JAP }

		visible = {
			has_active_mission = JAP_upkeep_timer
		}

		fire_only_once = no

		days_re_enable = 15

		cost = JAP_upkeep_ramp_cost

		complete_effect = {
			custom_effect_tooltip = JAP_upkeep_add_10_tt
			add_to_variable = {
				var = JAP_upkeep_percentage
				value = 10
			}
			clamp_variable = {
				var = JAP_upkeep_percentage
				max = 100
			}
			if = {
				limit = {
					has_idea = JAP_formed_mpw_10
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_10 add_idea = JAP_formed_mpw_20 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 120
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_formed_mpw_20
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_20 add_idea = JAP_formed_mpw_30 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 105
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_formed_mpw_30
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_30 add_idea = JAP_formed_mpw_40 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 90
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_formed_mpw_40
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_40 add_idea = JAP_formed_mpw_50 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 75
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_formed_mpw_50
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_50 add_idea = JAP_formed_mpw_60 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 60
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_formed_mpw_60
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_60 add_idea = JAP_formed_mpw_70 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 45
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_formed_mpw_70
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_70 add_idea = JAP_formed_mpw_80 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 30
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_formed_mpw_80
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_80 add_idea = JAP_formed_mpw_90 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 15
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_formed_mpw_90
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_90 add_idea = JAP_formed_mpw }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 15
				}
			}
		}
		ai_will_do = {
			base = 10
		}
	}

	JAP_upkeep_timer = {

		icon = GFX_decision_newspaper_folded

		available = {
			custom_trigger_tooltip = {
				tooltip = upketp_mpw_two_years_tt
				has_country_flag = upkept_mpw_fl
			}
		}
		allowed = {
			TAG = JAP
		}

		activation = {
			has_idea = JAP_formed_mpw
		}

		is_good = no

		fire_only_once = no

		days_mission_timeout = 30

		complete_effect = {
			hidden_effect = {
				if = {
					limit = {
						check_variable = { JAP_upkeep_percentage = 100 }
					}
					add_ideas = JAP_formed_mpw
				}
				else_if = {
					limit = {
						check_variable = { JAP_upkeep_percentage = 90 }
					}
					add_ideas = JAP_formed_mpw_90
				}
				else_if = {
					limit = {
						check_variable = { JAP_upkeep_percentage = 80 }
					}
					add_ideas = JAP_formed_mpw_80
				}
				else_if = {
					limit = {
						check_variable = { JAP_upkeep_percentage = 70 }
					}
					add_ideas = JAP_formed_mpw_70
				}
				else_if = {
					limit = {
						check_variable = { JAP_upkeep_percentage = 60 }
					}
					add_ideas = JAP_formed_mpw_60
				}
				else_if = {
					limit = {
						check_variable = { JAP_upkeep_percentage = 50 }
					}
					add_ideas = JAP_formed_mpw_50
				}
				else_if = {
					limit = {
						check_variable = { JAP_upkeep_percentage = 40 }
					}
					add_ideas = JAP_formed_mpw_40
				}
				else_if = {
					limit = {
						check_variable = { JAP_upkeep_percentage = 30 }
					}
					add_ideas = JAP_formed_mpw_30
				}
				else_if = {
					limit = {
						check_variable = { JAP_upkeep_percentage = 20 }
					}
					add_ideas = JAP_formed_mpw_20
				}
				else_if = {
					limit = {
						check_variable = { JAP_upkeep_percentage = 10 }
					}
					add_ideas = JAP_formed_mpw_10
				}
			}
		}

		timeout_effect = {
			add_to_variable = {
				var = JAP_upkeep_percentage
				value = -10
			}
			clamp_variable = {
				var = JAP_upkeep_percentage
				min = 0
			}
			if = {
				limit = {
					has_idea = JAP_formed_mpw
				}
				swap_ideas = { remove_idea = JAP_formed_mpw add_idea = JAP_formed_mpw_90 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 15
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_formed_mpw_90
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_90 add_idea = JAP_formed_mpw_80 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 30
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_formed_mpw_80
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_80 add_idea = JAP_formed_mpw_70 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 45
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_formed_mpw_70
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_70 add_idea = JAP_formed_mpw_60 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 60
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_formed_mpw_60
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_60 add_idea = JAP_formed_mpw_50 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 75
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_formed_mpw_50
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_50 add_idea = JAP_formed_mpw_40 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 90
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_formed_mpw_40
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_40 add_idea = JAP_formed_mpw_30 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 105
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_formed_mpw_30
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_30 add_idea = JAP_formed_mpw_20 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 120
				}
			}
			else_if = {
				limit = {
					has_idea = JAP_formed_mpw_20
				}
				swap_ideas = { remove_idea = JAP_formed_mpw_20 add_idea = JAP_formed_mpw_10 }
				set_variable = {
					var = JAP_upkeep_ramp_cost
					value = 135
				}
			}
			activate_mission = JAP_upkeep_timer
		}
		ai_will_do = {
			base = 10
		}
	}
	JAP_upkeep_hidden_timer = {

		#icon = 
	
		available = {
			always = no
		}

		allowed = {
			always = no
		}
	
		activation = {
			always = no
		}
	
		is_good = no
	
		fire_only_once = yes
	
		days_mission_timeout = 730

		timeout_effect = {
			JAP = {
				set_country_flag = upkept_mpw_fl
			}
		}
		ai_will_do = {
			base = 10
		}
	}
}

JAP_raid_decisions = {
	JAP_raid_kokura_warehouse = {
		icon = generic_construction
		allowed = {
			tag = JAP
		}
		available = {
			has_full_control_of_state = 1258
		}
		visible = {
		NOT = { has_war = no }
		}
		fire_only_once = yes
		cost = 15
		days_remove = 25
		modifier = {

		}
		complete_effect = {

		}
		remove_effect = {
			random_list = {
				50 = {
					add_manpower = -550
					add_equipment_to_stockpile = {
						type = infantry_equipment
						amount = 150
					}
					add_equipment_to_stockpile = {
						type = uniform_equipment
						amount = 150
					}
					hidden_effect = {
						TSH = {
							add_equipment_to_stockpile = {
								type = infantry_equipment
								amount = -150
							}
							add_equipment_to_stockpile = {
								type = uniform_equipment
								amount = -150
							}
						}
					}
				}
				25 = {
					add_manpower = -450
					add_equipment_to_stockpile = {
						type = infantry_equipment
						amount = 225
					}
					add_equipment_to_stockpile = {
						type = uniform_equipment
						amount = 225
					}
					hidden_effect = {
						TSH = {
							add_equipment_to_stockpile = {
								type = infantry_equipment
								amount = -225
							}
							add_equipment_to_stockpile = {
								type = uniform_equipment
								amount = -225
							}
						}
					}
				}
				15 = {
					add_manpower = -300
					add_equipment_to_stockpile = {
						type = infantry_equipment
						amount = 320
					}
					add_equipment_to_stockpile = {
						type = uniform_equipment
						amount = 320
					}
					hidden_effect = {
						TSH = {
							add_equipment_to_stockpile = {
								type = infantry_equipment
								amount = -320
							}
							add_equipment_to_stockpile = {
								type = uniform_equipment
								amount = -320
							}
						}
					}
				}
				7 = {
					add_manpower = -100
					add_equipment_to_stockpile = {
						type = infantry_equipment
						amount = 500
					}
					add_equipment_to_stockpile = {
						type = uniform_equipment
						amount = 500
					}
					hidden_effect = {
						TSH = {
							add_equipment_to_stockpile = {
								type = infantry_equipment
								amount = -500
							}
							add_equipment_to_stockpile = {
								type = uniform_equipment
								amount = -500
							}
						}
					}
				}
				3 = {

				}
			}
		}
			ai_will_do = {
				base = 100
		}
	}

	JAP_raid_kyoto_warehouse = {
		icon = generic_construction
		allowed = {
			tag = JAP
		}
		available = {
			has_full_control_of_state = 1106
		}
		visible = {
			NOT = { has_war = no }
		}
		fire_only_once = yes
		cost = 15
		days_remove = 25
		modifier = {

		}
		complete_effect = {

		}
		remove_effect = {
			random_list = {
				50 = {
					add_manpower = -510
					add_equipment_to_stockpile = {
						type = infantry_equipment
						amount = 90
					}
					hidden_effect = {
						TSH = {
							add_equipment_to_stockpile = {
								type = infantry_equipment
								amount = -490
							}
						}
					}
				}
				25 = {
					add_manpower = -430
					add_equipment_to_stockpile = {
						type = infantry_equipment
						amount = 125
					}
					hidden_effect = {
					TSH = {
						add_equipment_to_stockpile = {
							type = infantry_equipment
							amount = -125
							}
						}
					}
				}
				15 = {
					add_manpower = -280
					add_equipment_to_stockpile = {
						type = infantry_equipment
						amount = 250
					}
					hidden_effect = {
						TSH = {
							add_equipment_to_stockpile = {
								type = infantry_equipment
								amount = -250
							}
						}
					}
				}
				7 = {
					add_manpower = -100
					add_equipment_to_stockpile = {
						type = infantry_equipment
						amount = 490
					}
					hidden_effect = {
						TSH = {
							add_equipment_to_stockpile = {
								type = infantry_equipment
								amount = -490
							}
						}
					}
				}
				3 = {

				}
			}
		}
			ai_will_do = {
				base = 100
		}
	}

	JAP_raid_fuushimi_warehouse = {
		icon = uniform
		allowed = {
			tag = JAP
		}
		available = {
			has_full_control_of_state = 531
		}
		visible = {
			NOT = { has_war = no }
		}
		fire_only_once = yes
		cost = 15
		days_remove = 25
		modifier = {

		}
		complete_effect = {

		}
		remove_effect = {
			random_list = {
				50 = {
					add_manpower = -390
					add_equipment_to_stockpile = {
						type = uniform_equipment
						amount = 200
					}
					hidden_effect = {
						TSH = {
							add_equipment_to_stockpile = {
								type = uniform_equipment
								amount = -200
							}
						}
					}
				}
				25 = {
					add_manpower = -350
					add_equipment_to_stockpile = {
						type = uniform_equipment
						amount = 230
					}
					hidden_effect = {
						TSH = {
							add_equipment_to_stockpile = {
								type = uniform_equipment
								amount = -230
							}
						}
					}
				}
				15 = {
					add_manpower = -200
					add_equipment_to_stockpile = {
						type = uniform_equipment
						amount = 420
					}
					hidden_effect = {
						TSH = {
							add_equipment_to_stockpile = {
								type = uniform_equipment
								amount = -420
							}
						}
					}
				}
				7 = {
					add_manpower = -125
					add_equipment_to_stockpile = {
						type = uniform_equipment
						amount = 590
					}
					hidden_effect = {
						TSH = {
							add_equipment_to_stockpile = {
								type = uniform_equipment
								amount = -590
							}
						}
					}
				}
				3 = {

				}
			}
		}
			ai_will_do = {
				base = 100
		}
	}
}
JAP_political_decisions = {
	JAP_construct_kyoto_university = {
		icon = generic_construction
		allowed = {
			tag = JAP
		}
		available = {
			# has_completed_focus = JAP_kyoto_university
		}
		visible = {
			has_completed_focus = JAP_kyoto_university
		}
		fire_only_once = yes
		cost = 50
		days_remove = 365
		modifier = {

		}
		complete_effect = {
		}
		remove_effect = {
			add_stability = 0.05
			add_political_power = 120

			set_temp_variable = { eoanb_prestige_change = 5 }
			eoanb_change_prestige_score = yes

			add_tech_bonus = {
				bonus = 1
				uses = 1
				category = biochemistry_tech
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_construct_imperial_college_university = {
		icon = generic_construction
		allowed = {
			tag = JAP
		}
		available = {
			# has_completed_focus = JAP_construction_of_the_imperial_college
		}
		visible = {
			has_completed_focus = JAP_construction_of_the_imperial_college
		}
		fire_only_once = yes
		cost = 50
		days_remove = 365
		modifier = {

		}
		complete_effect = {
		}
		remove_effect = {
			add_stability = 0.05
			add_political_power = 120

			set_temp_variable = { eoanb_prestige_change = 5 }
			eoanb_change_prestige_score = yes

			add_tech_bonus = {
				bonus = 0.5
				uses = 1
				category = mechanical_engineering_tech
			}
		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_construct_tokyo_university = {
		icon = generic_construction
		allowed = {
			tag = JAP
		}
		available = {
			# has_completed_focus = JAP_tokyo_university
		}
		visible = {
			has_completed_focus = JAP_tokyo_university
		}
		fire_only_once = yes
		cost = 50
		days_remove = 365
		modifier = {

		}
		complete_effect = {
		}
		remove_effect = {
			add_stability = 0.05
			add_political_power = 120

			set_temp_variable = { eoanb_prestige_change = 5 }
			eoanb_change_prestige_score = yes

			add_tech_bonus = {
				bonus = 1
				uses = 1
				category = electronics_devices_tech
			}
		}
		ai_will_do = {
			base = 100
		}
	}
}
JAP_refurbish_army_decisions = {
	JAP_muratara_rifle = {
		icon = generic_prepare_civil_war
		allowed = {
			tag = JAP
		}
		available = {
			# has_completed_focus = JAP_refurbish_the_armys_ways
		}
		visible = {
			has_completed_focus = JAP_refurbish_the_armys_ways
		}
		fire_only_once = yes
		cost = 30
		modifier = {

		}
		complete_effect = {
			add_tech_bonus = {
				bonus = 0.5
				uses = 1
				category = infantry_weapons
			}
		}
		remove_effect = {

		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_arisaka_rifle = {
		icon = generic_prepare_civil_war
		allowed = {
			tag = JAP
		}
		available = {
			# has_completed_focus = JAP_refurbish_the_armys_ways
		}
		visible = {
			has_completed_focus = JAP_refurbish_the_armys_ways
		}
		fire_only_once = yes
		cost = 30
		modifier = {

		}
		complete_effect = {
			add_tech_bonus = {
				bonus = 0.5
				uses = 1
				category = infantry_weapons
			}
		}
		remove_effect = {

		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_meiji_19_uniform = {
		icon = generic_prepare_civil_war
		allowed = {
			tag = JAP
		}
		available = {
			# has_completed_focus = JAP_refurbish_the_armys_ways
		}
		visible = {
			has_completed_focus = JAP_refurbish_the_armys_ways
		}
		fire_only_once = yes
		cost = 30
		modifier = {

		}
		complete_effect = {
			add_tech_bonus = {
				bonus = 0.25
				uses = 1
				category = tech_category_uniforms
			}
		}
		remove_effect = {

		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_canet_artillery = {
		icon = generic_prepare_civil_war
		allowed = {
			tag = JAP
		}
		available = {
			# has_completed_focus = JAP_refurbish_the_armys_ways
		}
		visible = {
			has_completed_focus = JAP_refurbish_the_armys_ways
		}
		fire_only_once = yes
		cost = 30
		modifier = {

		}
		complete_effect = {
			add_tech_bonus = {
				bonus = 0.25
				uses = 1
				category = infantry_weapons
			}
		}
		remove_effect = {

		}
		ai_will_do = {
			base = 100
		}
	}

	JAP_decision_regular_exercises_tokyo = {

		icon = generic_prepare_civil_war

		available = {
			# has_completed_focus = JAP_refurbish_the_armys_ways
			divisions_in_state = {
				size > 3
				state = 282
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_refurbish_the_armys_ways
		}

		fire_only_once = yes

		cost = 50

		days_remove = 120

		complete_effect = {
			add_manpower = -500
		}

		modifier = {
			experience_gain_army_factor = 0.15
		}

		remove_effect = {
			add_manpower = 500
			army_experience = 10
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_decision_regular_exercises_aki = {

		icon = generic_prepare_civil_war

		available = {
			# has_completed_focus = JAP_refurbish_the_armys_ways
			divisions_in_state = {
				size > 3
				state = 1261
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_refurbish_the_armys_ways
		}

		fire_only_once = yes

		cost = 50

		days_remove = 120

		complete_effect = {
			add_manpower = -500
		}

		modifier = {
			experience_gain_army_factor = 0.15
		}

		remove_effect = {
			add_manpower = 500
			army_experience = 10
		}

		ai_will_do = {
			base = 10
		}
	}
}
JAP_study_fpwar_decisions = {
	JAP_advisors_to_france = {

		icon = generic_prepare_civil_war

		available = {
			# has_completed_focus = JAP_study_the_franoprussian_war
			PRS = {
				owns_state = 28
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_study_the_franoprussian_war
		}

		fire_only_once = yes

		cost = 50

		days_remove = 120

		complete_effect = {
			add_manpower = -30
		}

		modifier = {
			experience_gain_army_factor = 0.15
		}

		remove_effect = {
			add_manpower = 30
			army_experience = 15
			FRA = {
				army_experience = 5
			}
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_advisors_to_germany = {

		icon = generic_prepare_civil_war

		available = {
			# has_completed_focus = JAP_study_the_franoprussian_war
			PRS = {
				owns_state = 28
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_study_the_franoprussian_war
		}

		fire_only_once = yes

		cost = 50

		days_remove = 120

		complete_effect = {
			add_manpower = -30
		}

		modifier = {
			experience_gain_army_factor = 0.15
		}

		remove_effect = {
			add_manpower = 30
			army_experience = 15
			PRS = {
				army_experience = 5
			}
		}

		ai_will_do = {
			base = 10
		}
	}
}

JAP_recovering_boshinwar_decisions = {
	JAP_military_boshin_mission = {
		icon = pass_law_icon
		allowed = {
			always = no
		}
		available = {
			has_decision = JAP_elate_the_armies
			has_decision = JAP_training_schools
			has_decision = JAP_situate_logistical_plans
			has_decision = JAP_reconcile_political_parties
		}
		activation = {
			always = no
		}

		fire_only_once = yes
		is_good = no
		days_mission_timeout = 520

		timeout_effect = {
			add_political_power = -100
		}

		complete_effect = {
			custom_effect_tooltip = military_boshin_mission_tt
			hidden_effect = {
				remove_ideas = JAP_recovering_from_boshin_war_4
			}
		}
	}

	JAP_reconcile_political_parties = {

		icon = generic_prepare_civil_war

		available = {
			# has_completed_focus = JAP_imperial_general_headquarters
			NOT = {
				has_decision = JAP_elate_the_armies
				has_decision = JAP_training_schools
				has_decision = JAP_situate_logistical_plans
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_imperial_general_headquarters
		}

		fire_only_once = yes

		cost = 20

		days_remove = 120

		complete_effect = {
			add_political_power = -30
		}

		modifier = {
			political_power_gain = 0.25
		}

		remove_effect = {
			swap_ideas = { remove_idea = JAP_recovering_from_boshin_war add_idea = JAP_recovering_from_boshin_war_1 }
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_elate_the_armies = {

		icon = generic_prepare_civil_war

		available = {
			# has_completed_focus = JAP_imperial_general_headquarters
			has_decision = JAP_reconcile_political_parties
			NOT = {
				has_decision = JAP_training_schools
				has_decision = JAP_situate_logistical_plans
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_imperial_general_headquarters
		}

		fire_only_once = yes

		cost = 20

		days_remove = 10

		complete_effect = {
			add_political_power = -30
		}

		modifier = {
			political_power_gain = 0.25
		}

		remove_effect = {
			swap_ideas = { remove_idea = JAP_recovering_from_boshin_war_1 add_idea = JAP_recovering_from_boshin_war_2 }
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_training_schools = {

		icon = generic_prepare_civil_war

		available = {
			# has_completed_focus = JAP_imperial_general_headquarters
			has_decision = JAP_reconcile_political_parties
			has_decision = JAP_elate_the_armies
			NOT = {
				has_decision = JAP_situate_logistical_plans
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_imperial_general_headquarters
		}

		fire_only_once = yes

		cost = 20

		days_remove = 120

		complete_effect = {
			add_political_power = -30
		}

		modifier = {
			political_power_gain = 0.25
		}

		remove_effect = {
			swap_ideas = { remove_idea = JAP_recovering_from_boshin_war_2 add_idea = JAP_recovering_from_boshin_war_3 }
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_situate_logistical_plans = {

		icon = generic_prepare_civil_war

		available = {
			# has_completed_focus = JAP_imperial_general_headquarters
			has_decision = JAP_reconcile_political_parties
			has_decision = JAP_training_schools
			has_decision = JAP_elate_the_armies
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_imperial_general_headquarters
		}

		fire_only_once = yes

		cost = 20

		days_remove = 120

		complete_effect = {
			add_political_power = -30
		}

		modifier = {
			political_power_gain = 0.25
		}

		remove_effect = {
			swap_ideas = { remove_idea = JAP_recovering_from_boshin_war_3 add_idea = JAP_recovering_from_boshin_war_4 }
		}

		ai_will_do = {
			base = 10
		}
	}
}
JAP_founding_new_banks_descions = {
	JAP_mutsubishi_bank = {

		icon = money

		available = {
			# has_completed_focus = JAP_found_new_banks
			NOT = {
				has_decision = JAP_mitsui_bank
				has_decision = JAP_dai_ichi_kokuritsu_bank
				has_decision = JAP_daishi_bank
				has_decision = JAP_77_bank
				has_decision = JAP_eighteenth_bank
				has_decision = JAP_juroku_bank
				has_decision = JAP_hyakujusi_bank
				has_decision = JAP_hyakugo_bank
				has_decision = JAP_kakegawa_bank
				has_decision = JAP_fukui_bank
				has_decision = JAP_awa_bank
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_found_new_banks
		}

		fire_only_once = yes

		cost = 0

		days_remove = 240

		complete_effect = {
			add_political_power = -100
		}

		modifier = {
			production_factory_max_efficiency_factor = -0.05
		}

		remove_effect = {
			add_political_power = 140
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_mitsui_bank = {

		icon = money

		available = {
			# has_completed_focus = JAP_found_new_banks
			NOT = {
				has_decision = JAP_mutsubishi_bank
				has_decision = JAP_dai_ichi_kokuritsu_bank
				has_decision = JAP_daishi_bank
				has_decision = JAP_77_bank
				has_decision = JAP_eighteenth_bank
				has_decision = JAP_juroku_bank
				has_decision = JAP_hyakujusi_bank
				has_decision = JAP_hyakugo_bank
				has_decision = JAP_kakegawa_bank
				has_decision = JAP_fukui_bank
				has_decision = JAP_awa_bank
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_found_new_banks
		}

		fire_only_once = yes

		cost = 0

		days_remove = 240

		complete_effect = {
			add_political_power = -100
		}

		modifier = {
			production_factory_max_efficiency_factor = -0.05
		}

		remove_effect = {
			add_political_power = 140
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_dai_ichi_kokuritsu_bank = {

		icon = money

		available = {
			# has_completed_focus = JAP_found_new_banks
			NOT = {
				has_decision = JAP_mutsubishi_bank
				has_decision = JAP_mitsui_bank
				has_decision = JAP_daishi_bank
				has_decision = JAP_77_bank
				has_decision = JAP_eighteenth_bank
				has_decision = JAP_juroku_bank
				has_decision = JAP_hyakujusi_bank
				has_decision = JAP_hyakugo_bank
				has_decision = JAP_kakegawa_bank
				has_decision = JAP_fukui_bank
				has_decision = JAP_awa_bank
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_found_new_banks
		}

		fire_only_once = yes

		cost = 0

		days_remove = 240

		complete_effect = {
			add_political_power = -100
		}

		modifier = {
			production_factory_max_efficiency_factor = -0.05
		}

		remove_effect = {
			add_political_power = 140
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_daishi_bank = {

		icon = money

		available = {
			# has_completed_focus = JAP_found_new_banks
			NOT = {
				has_decision = JAP_mutsubishi_bank
				has_decision = JAP_mitsui_bank
				has_decision = JAP_dai_ichi_kokuritsu_bank
				has_decision = JAP_77_bank
				has_decision = JAP_eighteenth_bank
				has_decision = JAP_juroku_bank
				has_decision = JAP_hyakujusi_bank
				has_decision = JAP_hyakugo_bank
				has_decision = JAP_kakegawa_bank
				has_decision = JAP_fukui_bank
				has_decision = JAP_awa_bank
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_found_new_banks
		}

		fire_only_once = yes

		cost = 0

		days_remove = 240

		complete_effect = {
			add_political_power = -100
		}

		modifier = {
			production_factory_max_efficiency_factor = -0.05
		}

		remove_effect = {
			add_political_power = 140
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_77_bank = {

		icon = money

		available = {
			# has_completed_focus = JAP_found_new_banks
			NOT = {
				has_decision = JAP_mutsubishi_bank
				has_decision = JAP_mitsui_bank
				has_decision = JAP_dai_ichi_kokuritsu_bank
				has_decision = JAP_daishi_bank
				has_decision = JAP_eighteenth_bank
				has_decision = JAP_juroku_bank
				has_decision = JAP_hyakujusi_bank
				has_decision = JAP_hyakugo_bank
				has_decision = JAP_kakegawa_bank
				has_decision = JAP_fukui_bank
				has_decision = JAP_awa_bank
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_found_new_banks
		}

		fire_only_once = yes

		cost = 0

		days_remove = 240

		complete_effect = {
			add_political_power = -100
		}

		modifier = {
			production_factory_max_efficiency_factor = -0.05
		}

		remove_effect = {
			add_political_power = 140
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_eighteenth_bank = {

		icon = money

		available = {
			# has_completed_focus = JAP_found_new_banks
			NOT = {
				has_decision = JAP_mutsubishi_bank
				has_decision = JAP_mitsui_bank
				has_decision = JAP_dai_ichi_kokuritsu_bank
				has_decision = JAP_daishi_bank
				has_decision = JAP_77_bank
				has_decision = JAP_juroku_bank
				has_decision = JAP_hyakujusi_bank
				has_decision = JAP_hyakugo_bank
				has_decision = JAP_kakegawa_bank
				has_decision = JAP_fukui_bank
				has_decision = JAP_awa_bank
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_found_new_banks
		}

		fire_only_once = yes

		cost = 0

		days_remove = 240

		complete_effect = {
			add_political_power = -100
		}

		modifier = {
			production_factory_max_efficiency_factor = -0.05
		}

		remove_effect = {
			add_political_power = 140
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_juroku_bank = {

		icon = money

		available = {
			# has_completed_focus = JAP_found_new_banks
			NOT = {
				has_decision = JAP_mutsubishi_bank
				has_decision = JAP_mitsui_bank
				has_decision = JAP_dai_ichi_kokuritsu_bank
				has_decision = JAP_daishi_bank
				has_decision = JAP_77_bank
				has_decision = JAP_eighteenth_bank
				has_decision = JAP_hyakujusi_bank
				has_decision = JAP_hyakugo_bank
				has_decision = JAP_kakegawa_bank
				has_decision = JAP_fukui_bank
				has_decision = JAP_awa_bank
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_found_new_banks
		}

		fire_only_once = yes

		cost = 0

		days_remove = 240

		complete_effect = {
			add_political_power = -100
		}

		modifier = {
			production_factory_max_efficiency_factor = -0.05
		}

		remove_effect = {
			add_political_power = 140
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_hyakujusi_bank = {

		icon = money

		available = {
			# has_completed_focus = JAP_found_new_banks
			NOT = {
				has_decision = JAP_mutsubishi_bank
				has_decision = JAP_mitsui_bank
				has_decision = JAP_dai_ichi_kokuritsu_bank
				has_decision = JAP_daishi_bank
				has_decision = JAP_77_bank
				has_decision = JAP_eighteenth_bank
				has_decision = JAP_juroku_bank
				has_decision = JAP_hyakugo_bank
				has_decision = JAP_kakegawa_bank
				has_decision = JAP_fukui_bank
				has_decision = JAP_awa_bank
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_found_new_banks
		}

		fire_only_once = yes

		cost = 0

		days_remove = 240

		complete_effect = {
			add_political_power = -100
		}

		modifier = {
			production_factory_max_efficiency_factor = -0.05
		}

		remove_effect = {
			add_political_power = 140
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_hyakugo_bank = {

		icon = money

		available = {
			# has_completed_focus = JAP_found_new_banks
			NOT = {
				has_decision = JAP_mutsubishi_bank
				has_decision = JAP_mitsui_bank
				has_decision = JAP_dai_ichi_kokuritsu_bank
				has_decision = JAP_daishi_bank
				has_decision = JAP_77_bank
				has_decision = JAP_eighteenth_bank
				has_decision = JAP_juroku_bank
				has_decision = JAP_hyakujusi_bank
				has_decision = JAP_kakegawa_bank
				has_decision = JAP_fukui_bank
				has_decision = JAP_awa_bank
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_found_new_banks
		}

		fire_only_once = yes

		cost = 0

		days_remove = 240

		complete_effect = {
			add_political_power = -100
		}

		modifier = {
			production_factory_max_efficiency_factor = -0.05
		}

		remove_effect = {
			add_political_power = 140
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_kakegawa_bank = {

		icon = money

		available = {
			# has_completed_focus = JAP_found_new_banks
			NOT = {
				has_decision = JAP_mutsubishi_bank
				has_decision = JAP_mitsui_bank
				has_decision = JAP_dai_ichi_kokuritsu_bank
				has_decision = JAP_daishi_bank
				has_decision = JAP_77_bank
				has_decision = JAP_eighteenth_bank
				has_decision = JAP_juroku_bank
				has_decision = JAP_hyakujusi_bank
				has_decision = JAP_hyakugo_bank
				has_decision = JAP_fukui_bank
				has_decision = JAP_awa_bank
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_found_new_banks
		}

		fire_only_once = yes

		cost = 0

		days_remove = 240

		complete_effect = {
			add_political_power = -100
		}

		modifier = {
			production_factory_max_efficiency_factor = -0.05
		}

		remove_effect = {
			add_political_power = 140
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_fukui_bank = {

		icon = money

		available = {
			# has_completed_focus = JAP_found_new_banks
			NOT = {
				has_decision = JAP_mutsubishi_bank
				has_decision = JAP_mitsui_bank
				has_decision = JAP_dai_ichi_kokuritsu_bank
				has_decision = JAP_daishi_bank
				has_decision = JAP_77_bank
				has_decision = JAP_eighteenth_bank
				has_decision = JAP_juroku_bank
				has_decision = JAP_hyakujusi_bank
				has_decision = JAP_hyakugo_bank
				has_decision = JAP_kakegawa_bank
				has_decision = JAP_awa_bank
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_found_new_banks
		}

		fire_only_once = yes

		cost = 0

		days_remove = 240

		complete_effect = {
			add_political_power = -100
		}

		modifier = {
			production_factory_max_efficiency_factor = -0.05
		}

		remove_effect = {
			add_political_power = 140
		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_awa_bank = {

		icon = money

		available = {
			# has_completed_focus = JAP_found_new_banks
			NOT = {
				has_decision = JAP_mutsubishi_bank
				has_decision = JAP_mitsui_bank
				has_decision = JAP_dai_ichi_kokuritsu_bank
				has_decision = JAP_daishi_bank
				has_decision = JAP_77_bank
				has_decision = JAP_eighteenth_bank
				has_decision = JAP_juroku_bank
				has_decision = JAP_hyakujusi_bank
				has_decision = JAP_hyakugo_bank
				has_decision = JAP_kakegawa_bank
				has_decision = JAP_fukui_bank
			}
		}
		allowed = { TAG = JAP }
		visible = {
			has_completed_focus = JAP_found_new_banks
		}

		fire_only_once = yes

		cost = 0

		days_remove = 240

		complete_effect = {
			add_political_power = -100
		}

		modifier = {
			production_factory_max_efficiency_factor = -0.05
		}

		remove_effect = {
			add_political_power = 140
		}

		ai_will_do = {
			base = 10
		}
	}
}

JAP_taiwan_expedition_decisions = {
	JAP_expedition_expand_the_budget = {

		icon = GFX_

		available = {
			has_political_power > 125
			# date > 1874.05.06
			has_active_mission = JAP_formosa_expedition_timer
		}
		allowed = { TAG = JAP }

		visible = {
			NOT = {
				check_variable = {
					var = JAP_budget_check
					value = 3
					compare = equals
				}
			}
		}

		fire_only_once = no

		days_re_enable = 100

		cost = 125

		complete_effect = {
			add_to_variable = {
				var = JAP_expedition_budget_total
				value = 500
			}

			add_to_variable = {
				var = JAP_budget_check
				value = 1
			}
			custom_effect_tooltip = JAP_expedition_budget_total_tt

			hidden_effect = {
				if = {
					limit = {
						check_variable = { JAP_expedition_budget_current < JAP_expedition_budget_total }
					}
					remove_ideas = JAP_formosa_expedition_budget_idea
				}
			}
		}

		modifier = {

		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_retreat_from_the_expedition = { #Historical

		icon = GFX_

		available = {
			has_decision = JAP_kaolut_expedition_mission
			has_decision = JAP_lingulan_expedition_mission
			has_decision = JAP_kwaling_expedition_mission
			has_decision = JAP_mudan_expedition_mission

		}
		allowed = { TAG = JAP }

		visible = {

		}

		fire_only_once = no

		cost = 30

		complete_effect = {
			country_event = JAP_imperial.29
		}

		modifier = {

		}

		ai_will_do = {
			base = 10
		}
	}
	
	JAP_escalate_the_conflict = { #Alternate Historical

		icon = GFX_

		available = {
			always = no
			# has_decision = JAP_kaolut_expedition_mission
			# has_decision = JAP_lingulan_expedition_mission
			# has_decision = JAP_kwaling_expedition_mission
			# has_decision = JAP_mudan_expedition_mission
			# custom_trigger_tooltip = {
			# 	tooltip = JAP_deaths_is_greater_than_tt
			# }
			# check_variable = { JAP_japanese_deaths > 250 }
		}
		allowed = { TAG = JAP }

		visible = {

		}

		fire_only_once = no

		cost = 60

		complete_effect = {
			custom_effect_tooltip = incomplete_tt
		}

		modifier = {

		}

		ai_will_do = {
			base = 10
		}
	}

	JAP_blank_seperator_decision = { 

		icon = GFX_decision_blank_seperator

		available = {
			hidden_trigger = {
				always = no
			}
		}
		allowed = { TAG = JAP }

		fire_only_once = yes
	}
	
	JAP_kaolut_expedition_mission = {

		icon = GFX_formosa_campaign_mission

		available = {
		 	ships_in_area = { area = 75 size > 0 }
		 	date > 1874.05.06
		 	has_active_mission = JAP_formosa_expedition_timer
		}
		allowed = { TAG = JAP }

		visible = {
			NOT = {
				has_country_flag = JAP_current_expedition_mudan
			}
			NOT = {
				has_country_flag = JAP_current_expedition_kwaling
			}
			NOT = {
				has_country_flag = JAP_current_expedition_lingulan
			}
			NOT = {
				has_country_flag = JAP_current_expedition_kaolut
			}
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			custom_effect_tooltip = JAP_expedition_location_tt
			set_country_flag = JAP_current_expedition_kaolut
			set_country_flag = JAP_current_expedition_kaolut_generals
			set_country_flag = JAP_current_expedition_kaolut_ships
			set_country_flag = JAP_current_expedition_kaolut_soldiers
			set_variable = {
				global.formosa_kaolut_mission = 2
			}
			hidden_effect = {
				set_variable = {
					var = JAP_soldier_cost_var
					value = 20
				}
				set_variable = {
					var = JAP_general_cost_var
					value = 35
				}
				set_variable = {
					var = JAP_ship_cost_var
					value = 45
				}
				add_to_variable = {
					var = JAP_expedition_budget_current
					value = 100
				}
				if = {
					limit = {
						check_variable = { JAP_expedition_budget_current > JAP_expedition_budget_total }
					}
					add_ideas = JAP_formosa_expedition_budget_idea
				}
				else_if = {
					limit = {
						check_variable = { JAP_expedition_budget_current < JAP_expedition_budget_total }
					}
					remove_ideas = JAP_formosa_expedition_budget_idea
				}
			}
		}

		modifier = {

		}

		ai_will_do = {
			base = 10
		}
	}
	
	JAP_lingulan_expedition_mission = {

		icon = GFX_formosa_campaign_mission

		available = {
		 	ships_in_area = { area = 75 size > 0 }
		 	date > 1874.05.06
		 	has_active_mission = JAP_formosa_expedition_timer
		}
		allowed = { TAG = JAP }

		visible = {
			NOT = {
				has_country_flag = JAP_current_expedition_mudan
			}
			NOT = {
				has_country_flag = JAP_current_expedition_kwaling
			}
			NOT = {
				has_country_flag = JAP_current_expedition_lingulan
			}
			NOT = {
				has_country_flag = JAP_current_expedition_kaolut
			}
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			custom_effect_tooltip = JAP_expedition_location_tt
			set_country_flag = JAP_current_expedition_lingulan
			set_country_flag = JAP_current_expedition_lingulan_generals
			set_country_flag = JAP_current_expedition_lingulan_ships
			set_country_flag = JAP_current_expedition_lingulan_soldiers
			set_variable = {
				global.formosa_lingulan_mission = 2
			}
			hidden_effect = {
				set_variable = {
					var = JAP_soldier_cost_var
					value = 40
				}
				set_variable = {
					var = JAP_general_cost_var
					value = 30
				}
				set_variable = {
					var = JAP_ship_cost_var
					value = 20
				}
				add_to_variable = {
					var = JAP_expedition_budget_current
					value = 100
				}
				if = {
					limit = {
						check_variable = { JAP_expedition_budget_current > JAP_expedition_budget_total }
					}
					add_ideas = JAP_formosa_expedition_budget_idea
				}
				else_if = {
					limit = {
						check_variable = { JAP_expedition_budget_current < JAP_expedition_budget_total }
					}
					remove_ideas = JAP_formosa_expedition_budget_idea
				}
			}
		}

		modifier = {

		}

		ai_will_do = {
			base = 10
		}
	}
	
	JAP_kwaling_expedition_mission = {

		icon = GFX_formosa_campaign_mission

		available = {
			ships_in_area = { area = 75 size > 0 }
			date > 1874.05.06
			has_active_mission = JAP_formosa_expedition_timer
		}
		allowed = { TAG = JAP }

		visible = {
			NOT = {
				has_country_flag = JAP_current_expedition_mudan
			}
			NOT = {
				has_country_flag = JAP_current_expedition_kwaling
			}
			NOT = {
				has_country_flag = JAP_current_expedition_lingulan
			}
			NOT = {
				has_country_flag = JAP_current_expedition_kaolut
			}
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			custom_effect_tooltip = JAP_expedition_location_tt
			set_country_flag = JAP_current_expedition_kwaling
			set_country_flag = JAP_current_expedition_kwaling_generals
			set_country_flag = JAP_current_expedition_kwaling_ships
			set_country_flag = JAP_current_expedition_kwaling_soldiers
			set_variable = {
				global.formosa_kwaling_mission = 2
			}
			hidden_effect = {
				set_variable = {
					var = JAP_soldier_cost_var
					value = 40
				}
				set_variable = {
					var = JAP_general_cost_var
					value = 30
				}
				set_variable = {
					var = JAP_ship_cost_var
					value = 30
				}
				add_to_variable = {
					var = JAP_expedition_budget_current
					value = 100
				}
				if = {
					limit = {
						check_variable = { JAP_expedition_budget_current > JAP_expedition_budget_total }
					}
					add_ideas = JAP_formosa_expedition_budget_idea
				}
				else_if = {
					limit = {
						check_variable = { JAP_expedition_budget_current < JAP_expedition_budget_total }
					}
					remove_ideas = JAP_formosa_expedition_budget_idea
				}
			}
		}

		modifier = {

		}

		ai_will_do = {
			base = 10
		}
	}
	
	JAP_mudan_expedition_mission = {

		icon = GFX_formosa_campaign_mission

		available = {
			ships_in_area = { area = 75 size > 0 }
			date > 1874.05.06
			has_active_mission = JAP_formosa_expedition_timer
		}
		allowed = { TAG = JAP }

		visible = {
			NOT = {
				has_country_flag = JAP_current_expedition_mudan
			}
			NOT = {
				has_country_flag = JAP_current_expedition_kwaling
			}
			NOT = {
				has_country_flag = JAP_current_expedition_lingulan
			}
			NOT = {
				has_country_flag = JAP_current_expedition_kaolut
			}
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			custom_effect_tooltip = JAP_expedition_location_tt
			set_country_flag = JAP_current_expedition_mudan
			set_country_flag = JAP_current_expedition_mudan_generals
			set_country_flag = JAP_current_expedition_mudan_ships
			set_country_flag = JAP_current_expedition_mudan_soldiers
			set_variable = {
				global.formosa_mudan_mission = 2
			}
			hidden_effect = {
				set_variable = {
					var = JAP_soldier_cost_var
					value = 15
				}
				set_variable = {
					var = JAP_general_cost_var
					value = 45
				}
				set_variable = {
					var = JAP_ship_cost_var
					value = 50
				}
				add_to_variable = {
					var = JAP_expedition_budget_current
					value = 100
				}
				if = {
					limit = {
						check_variable = { JAP_expedition_budget_current > JAP_expedition_budget_total }
					}
					add_ideas = JAP_formosa_expedition_budget_idea
				}
				else_if = {
					limit = {
						check_variable = { JAP_expedition_budget_current < JAP_expedition_budget_total }
					}
					remove_ideas = JAP_formosa_expedition_budget_idea
				}
			}
		}

		modifier = {

		}

		ai_will_do = {
			base = 10
		}
	}
	
	JAP_expedition_invest_in_general = {

		icon = GFX_

		available = {
			NOT = {
				has_decision = JAP_expedition_invest_in_ship_fitting
				has_decision = JAP_expedition_invest_in_soldiers
			}
		}
		allowed = { TAG = JAP }

		visible = {
			OR = {
				has_country_flag = JAP_current_expedition_mudan_generals
				has_country_flag = JAP_current_expedition_kwaling_generals
				has_country_flag = JAP_current_expedition_kaolut_generals
				has_country_flag = JAP_current_expedition_lingulan_generals
			}
		}

		fire_only_once = no

		days_remove = 14

		cost = JAP_general_cost_var

		remove_effect = {
			custom_effect_tooltip = JAP_expedition_invest_in_generals_tt
			country_event = JAP_imperial.23

			hidden_effect = {
				if = {
					limit = {
						has_country_flag = JAP_current_expedition_mudan
					}

					add_to_variable = {
						var = JAP_expedition_budget_current
						value = 450
					}
				}
				else_if = {
					limit = {
						has_country_flag = JAP_current_expedition_kwaling
					}

					add_to_variable = {
						var = JAP_expedition_budget_current
						value = 300
					}
				}
				else_if = {
					limit = {
						has_country_flag = JAP_current_expedition_kaolut
					}
					add_to_variable = {
						var = JAP_expedition_budget_current
						value = 350
					}
				}
				else_if = {
					limit = {
						has_country_flag = JAP_current_expedition_lingulan
					}

					add_to_variable = {
						var = JAP_expedition_budget_current
						value = 400
					}
					add_to_variable = {
						var = JAP_location_expedition_check
						value = 1
					}
				}
				clr_country_flag = JAP_current_expedition_mudan_generals
				clr_country_flag = JAP_current_expedition_kwaling_generals
				clr_country_flag = JAP_current_expedition_kaolut_generals
				clr_country_flag = JAP_current_expedition_lingulan_generals
			}
		}
		complete_effect = {
			hidden_effect = {
				if = {
					limit = {
						check_variable = { JAP_expedition_budget_current > JAP_expedition_budget_total }
					}
					add_ideas = JAP_formosa_expedition_budget_idea
				}
				else_if = {
					limit = {
						check_variable = { JAP_expedition_budget_current < JAP_expedition_budget_total }
					}
					remove_ideas = JAP_formosa_expedition_budget_idea
				}
			}
		}

		modifier = {

		}

		ai_will_do = {
			base = 10
		}
	}
	
	JAP_expedition_invest_in_ship_fitting = {

		icon = GFX_

		available = {
			NOT = {
				has_decision = JAP_expedition_invest_in_general
				has_decision = JAP_expedition_invest_in_soldiers
			}
		}

		allowed = {

		}

		visible = {
			OR = {
				has_country_flag = JAP_current_expedition_mudan_ships
				has_country_flag = JAP_current_expedition_kwaling_ships
				has_country_flag = JAP_current_expedition_kaolut_ships
				has_country_flag = JAP_current_expedition_lingulan_ships
			}
		}

		fire_only_once = no

		days_remove = 14

		cost = JAP_ship_cost_var

		remove_effect = {
			custom_effect_tooltip = JAP_expedition_invest_in_ship_fitting_tt
			country_event = JAP_imperial.24

			hidden_effect = {
				if = {
					limit = {
						has_country_flag = JAP_current_expedition_mudan
					}

					add_to_variable = {
						var = JAP_expedition_budget_current
						value = 500
					}
				}
				else_if = {
					limit = {
						has_country_flag = JAP_current_expedition_kwaling
					}

					add_to_variable = {
						var = JAP_expedition_budget_current
						value = 300
					}
				}
				else_if = {
					limit = {
						has_country_flag = JAP_current_expedition_kaolut
					}

					add_to_variable = {
						var = JAP_expedition_budget_current
						value = 450
					}
				}
				else_if = {
					limit = {
						has_country_flag = JAP_current_expedition_lingulan
					}

					add_to_variable = {
						var = JAP_expedition_budget_current
						value = 200
					}
				}
				add_to_variable = {
					var = JAP_location_expedition_check
					value = 1
				}
			
				clr_country_flag = JAP_current_expedition_mudan_ships
				clr_country_flag = JAP_current_expedition_kwaling_ships
				clr_country_flag = JAP_current_expedition_kaolut_ships
				clr_country_flag = JAP_current_expedition_lingulan_ships
			}
		}

		complete_effect = {
			hidden_effect = {
				if = {
					limit = {
						check_variable = { JAP_expedition_budget_current > JAP_expedition_budget_total }
					}
					add_ideas = JAP_formosa_expedition_budget_idea
				}
				else_if = {
					limit = {
						check_variable = { JAP_expedition_budget_current < JAP_expedition_budget_total }
					}
					remove_ideas = JAP_formosa_expedition_budget_idea
				}
			}
		}

		modifier = {

		}

		ai_will_do = {
			base = 10
		}
	}
	
	JAP_expedition_invest_in_soldiers = {

		icon = GFX_

		available = {
			NOT = {
				has_decision = JAP_expedition_invest_in_general
				has_decision = JAP_expedition_invest_in_ship_fitting
			}
		}
		allowed = { TAG = JAP }

		visible = {
			OR = {
				has_country_flag = JAP_current_expedition_mudan_soldiers
				has_country_flag = JAP_current_expedition_kwaling_soldiers
				has_country_flag = JAP_current_expedition_kaolut_soldiers
				has_country_flag = JAP_current_expedition_lingulan_soldiers
			}
		}

		fire_only_once = no

		days_remove = 14

		cost = JAP_soldier_cost_var

		remove_effect = {
			custom_effect_tooltip = JAP_expedition_invest_in_soldiers_tt
			country_event = JAP_imperial.25

			hidden_effect = {
				if = {
					limit = {
						has_country_flag = JAP_current_expedition_mudan
					}

					add_to_variable = {
						var = JAP_expedition_budget_current
						value = 150
					}
				}
				else_if = {
					limit = {
						has_country_flag = JAP_current_expedition_kwaling
					}

					add_to_variable = {
						var = JAP_expedition_budget_current
						value = 400
					}
				}
				else_if = {
					limit = {
						has_country_flag = JAP_current_expedition_kaolut
					}

					add_to_variable = {
						var = JAP_expedition_budget_current
						value = 200
					}
				}
				else_if = {
					limit = {
						has_country_flag = JAP_current_expedition_lingulan
					}

					add_to_variable = {
						var = JAP_expedition_budget_current
						value = 400
					}
				}
				add_to_variable = {
					var = JAP_location_expedition_check
					value = 1
				}

				clr_country_flag = JAP_current_expedition_mudan_soldiers
				clr_country_flag = JAP_current_expedition_kwaling_soldiers
				clr_country_flag = JAP_current_expedition_kaolut_soldiers
				clr_country_flag = JAP_current_expedition_lingulan_soldiers
			}
		}

		complete_effect = {
			hidden_effect = {
				if = {
					limit = {
						check_variable = { JAP_expedition_budget_current > JAP_expedition_budget_total }
					}
					add_ideas = JAP_formosa_expedition_budget_idea
				}
				else_if = {
					limit = {
						check_variable = { JAP_expedition_budget_current < JAP_expedition_budget_total }
					}
					remove_ideas = JAP_formosa_expedition_budget_idea
				}
			}
		}

		modifier = {

		}

		ai_will_do = {
			base = 10
		}
	}
	
	JAP_expedition_mission_location = {

		icon = GFX_

		available = {

		}

		allowed = { TAG = JAP }

		visible = {

		}
		activation = {
			# always = yes
			OR = {
				has_country_flag = JAP_current_expedition_mudan
				has_country_flag = JAP_current_expedition_kwaling
				has_country_flag = JAP_current_expedition_kaolut 
				has_country_flag = JAP_current_expedition_lingulan
			}
		}

		cancel_trigger = {
			hidden_trigger = {
				NOT = {
					has_country_flag = JAP_current_expedition_mudan
				}
				NOT = {
					has_country_flag = JAP_current_expedition_kwaling
				}
				NOT = {
					has_country_flag = JAP_current_expedition_lingulan
				}
				NOT = {
					has_country_flag = JAP_current_expedition_kaolut
				}
			}
		}

		selectable_mission = yes

		days_mission_timeout = 53

		fixed_random_seed = no

		complete_effect = {
			if = {
				limit = {
					check_variable = {
						var = JAP_location_expedition_check
						value = 0
						compare = equals
					}
				}
				random_list = {
					18 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
					}
					20 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
					}
					24 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
					}
					20 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
					}
					18 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
					}
				}
			}
			else_if = {
				limit = {
					check_variable = {
						var = JAP_location_expedition_check
						value = 1
						compare = equals
					}
				}
				random_list = {
					14 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
					}
					18 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
					}
					27 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
					}
					22 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
					}
					19 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
					}
				}
			}
			else_if = {
				limit = {
					check_variable = {
						var = JAP_location_expedition_check
						value = 2
						compare = equals
					}
				}
				random_list = {
					10 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
					}
					16 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
					}
					30 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
					}
					24 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
					}
					20 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
					}
				}
			}
			else_if = {
				limit = {
					check_variable = {
						var = JAP_location_expedition_check
						value = 3
						compare = equals
					}
				}
				random_list = {
					6 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
					}
					14 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
					}
					33 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
					}
					26 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
					}
					21 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
					}
				}
			}
			hidden_effect = {
				country_event = JAP_imperial.26

				if = {
					limit = {
						check_variable = { JAP_expedition_budget_current > JAP_expedition_budget_total }
					}
					add_ideas = JAP_formosa_expedition_budget_idea
				}
				else_if = {
					limit = {
						check_variable = { JAP_expedition_budget_current < JAP_expedition_budget_total }
					}
					remove_ideas = JAP_formosa_expedition_budget_idea
				}
			}
			set_variable = {
				var = JAP_location_expedition_check
				value = 0
			} 
			add_to_variable = {
				var = JAP_chinese_payments_check
				value = 1
			}
			clr_country_flag = JAP_current_expedition_kwaling
			clr_country_flag = JAP_current_expedition_mudan
			clr_country_flag = JAP_current_expedition_kaolut
			clr_country_flag = JAP_current_expedition_lingulan
			clr_country_flag = JAP_current_expedition_mudan_ships
			clr_country_flag = JAP_current_expedition_kwaling_ships
			clr_country_flag = JAP_current_expedition_kaolut_ships
			clr_country_flag = JAP_current_expedition_lingulan_ships
			clr_country_flag = JAP_current_expedition_mudan_soldiers
			clr_country_flag = JAP_current_expedition_kwaling_soldiers
			clr_country_flag = JAP_current_expedition_kaolut_soldiers
			clr_country_flag = JAP_current_expedition_lingulan_soldiers
			clr_country_flag = JAP_current_expedition_mudan_generals
			clr_country_flag = JAP_current_expedition_kwaling_generals
			clr_country_flag = JAP_current_expedition_kaolut_generals
			clr_country_flag = JAP_current_expedition_lingulan_generals
		}
	
		fire_only_once = no

		timeout_effect = {
			if = {
				limit = {
					check_variable = {
						var = JAP_location_expedition_check
						value = 0
						compare = equals
					}
				}
				random_list = {
					18 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
					}
					20 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
					}
					24 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
					}
					20 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
					}
					18 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
					}
				}
			}
			else_if = {
				limit = {
					check_variable = {
						var = JAP_location_expedition_check
						value = 1
						compare = equals
					}
				}
				random_list = {
					14 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
					}
					18 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
					}
					27 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
					}
					22 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
					}
					19 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
					}
				}
			}
			else_if = {
				limit = {
					check_variable = {
						var = JAP_location_expedition_check
						value = 2
						compare = equals
					}
				}
				random_list = {
					10 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
					}
					16 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
					}
					30 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
					}
					24 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
					}
					20 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
					}
				}
			}
			else_if = {
				limit = {
					check_variable = {
						var = JAP_location_expedition_check
						value = 3
						compare = equals
					}
				}
				random_list = {
					6 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_1
						}
					}
					14 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_2
						}
					}
					33 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_3
						}
					}
					26 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_4
						}
					}
					21 = {
						if = {
							limit = {
								has_country_flag = JAP_current_expedition_mudan
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kwaling
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_lingulan
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
						else_if = {
							limit = {
								has_country_flag = JAP_current_expedition_kaolut
							}
							custom_effect_tooltip = JAP_expedition_outcome_5
						}
					}
				}
			}
			hidden_effect = {
				country_event = JAP_imperial.26

				if = {
					limit = {
						check_variable = { JAP_expedition_budget_current > JAP_expedition_budget_total }
					}
					add_ideas = JAP_formosa_expedition_budget_idea
				}
				else_if = {
					limit = {
						check_variable = { JAP_expedition_budget_current < JAP_expedition_budget_total }
					}
					remove_ideas = JAP_formosa_expedition_budget_idea
				}
			}
			set_variable = {
				var = JAP_location_expedition_check
				value = 0
			}
			add_to_variable = {
				var = JAP_chinese_payments_check
				value = 1
			}
			clr_country_flag = JAP_current_expedition_kwaling
			clr_country_flag = JAP_current_expedition_mudan
			clr_country_flag = JAP_current_expedition_kaolut
			clr_country_flag = JAP_current_expedition_lingulan
			clr_country_flag = JAP_current_expedition_mudan_ships
			clr_country_flag = JAP_current_expedition_kwaling_ships
			clr_country_flag = JAP_current_expedition_kaolut_ships
			clr_country_flag = JAP_current_expedition_lingulan_ships
			clr_country_flag = JAP_current_expedition_mudan_soldiers
			clr_country_flag = JAP_current_expedition_kwaling_soldiers
			clr_country_flag = JAP_current_expedition_kaolut_soldiers
			clr_country_flag = JAP_current_expedition_lingulan_soldiers
			clr_country_flag = JAP_current_expedition_mudan_generals
			clr_country_flag = JAP_current_expedition_kwaling_generals
			clr_country_flag = JAP_current_expedition_kaolut_generals
			clr_country_flag = JAP_current_expedition_lingulan_generals
		}
		ai_will_do = {
			base = 10
		}
	}
	
	JAP_formosa_expedition_timer = {

		icon = GFX_

		available = {
			always = no
		}
		allowed = {
			TAG = JAP
		}

		visible = {
			always = no
		}

		activation = {
			always = no
		}

		fire_only_once = yes
		is_good = no
		days_mission_timeout = 212

		timeout_effect = {
			custom_effect_tooltip = incomplete_tt
		}
		ai_will_do = {
			base = 10
		}
	}
}