#Category only allowed for GER
GER_mefo_bills_category = {

	GER_mefo_bills_mission = {

		allowed = { always = no }

		icon = ger_mefo_bills

		available = {
			NOT = { has_government = democratic }
			GER_can_delay_mefo_payment = yes
			has_political_power > 0
			hidden_trigger = { always = no }
		}

		#cost = GER_mefo_bill_counter?10

		days_mission_timeout = 180
		is_good = yes
		fire_only_once = yes

		cancel_trigger = {
			hidden_trigger = {
				OR = {
					NOT = { GER_has_mefo_bills = yes }
					has_idea = GER_mefo_bills_ended
				}
			}
		}

		days_remove = GER_extend_mefo_bills_days?0
		remove_effect = {
		}

		complete_effect = {
		}

		timeout_effect = {
			if = {
				limit = {
					has_country_flag = ger_has_cancelled_mefo
				}
				GER_remove_mefo_bills = yes
				#1
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 15 compare = less_than }
					}
					add_political_power = -20
					add_timed_idea = { idea = GER_mefo_bills_ended days = 60 }
				}
				#2
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 20 compare = equals }
					}
					add_political_power = -40
					add_timed_idea = { idea = GER_mefo_bills_ended days = 80 }
				}
				#3
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 30 compare = equals }
					}
					add_political_power = -60
					add_timed_idea = { idea = GER_mefo_bills_ended days = 100 }
				}
				#4
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 40 compare = equals }
					}
					add_political_power = -80
					add_timed_idea = { idea = GER_mefo_bills_ended days = 120 }
				}
				#5
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 50 compare = equals }
					}
					add_political_power = -100
					add_timed_idea = { idea = GER_mefo_bills_ended days = 140 }
				}
				#6
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 60 compare = equals }
					}
					add_political_power = -120
					add_timed_idea = { idea = GER_mefo_bills_ended days = 160 }
				}
				#7
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 70 compare = equals }
					}
					add_political_power = -140
					add_timed_idea = { idea = GER_mefo_bills_ended days = 180 }
				}
				#8
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 80 compare = equals }
					}
					add_political_power = -160
					add_timed_idea = { idea = GER_mefo_bills_ended days = 200 }
				}
				#9
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 90 compare = equals }
					}
					add_political_power = -180
					add_timed_idea = { idea = GER_mefo_bills_ended days = 220 }
				}
				#10
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 100 compare = equals }
					}
					add_political_power = -200
					add_timed_idea = { idea = GER_mefo_bills_ended days = 240 }
				}
				#11
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 110 compare = equals }
					}
					add_political_power = -220
					add_timed_idea = { idea = GER_mefo_bills_ended days = 260 }
				}
				#12
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 120 compare = equals }
					}
					add_political_power = -240
					add_timed_idea = { idea = GER_mefo_bills_ended days = 280 }
				}
				#13
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 130 compare = equals }
					}
					add_political_power = -260
					add_timed_idea = { idea = GER_mefo_bills_ended days = 300 }
				}
				#14
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 140 compare = equals }
					}
					add_political_power = -280
					add_timed_idea = { idea = GER_mefo_bills_ended days = 320 }
				}
				#15
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 150 compare = equals }
					}
					add_political_power = -300
					add_timed_idea = { idea = GER_mefo_bills_ended days = 340 }
				}
				#16
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 160 compare = equals }
					}
					add_political_power = -320
					add_timed_idea = { idea = GER_mefo_bills_ended days = 360 }
				}
				#17
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 170 compare = equals }
					}
					add_political_power = -340
					add_timed_idea = { idea = GER_mefo_bills_ended days = 380 }
				}
				#18
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 180 compare = equals }
					}
					add_political_power = -360
					add_timed_idea = { idea = GER_mefo_bills_ended days = 400 }
				}
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 180 compare = greater_than }
					}
					add_political_power = -380
					add_timed_idea = { idea = GER_mefo_bills_ended days = 420 }
				}
			}
			else = {
				custom_effect_tooltip = GER_mefo_bills_mission_tt
				custom_effect_tooltip = GER_mefo_bills_effect_in_days
				hidden_effect = {
					set_variable = { GER_extend_mefo_bills_days = days_mission_timeout@GER_mefo_bills_mission }
					set_country_flag = paid_for_mefo
				}
				GER_mefo_bills_level_up = yes
				if = {
					limit = {
						check_variable = { var = GER_mefo_bill_counter value = 15 compare = less_than }
					}
					hidden_effect = { set_variable = { var = GER_mefo_bill_counter value = 10 } }
				}
				add_to_variable = { var = GER_mefo_bill_counter value = 10 }

				hidden_effect = {
					activate_mission = GER_mefo_bills_mission
				}
			}
		}

		ai_will_do = {
			factor = 200
		}
	}

	GER_cancel_mefos = {

		icon = ger_mefo_bills

		available = {
			hidden_trigger = {
				NOT = { has_country_flag = ger_has_cancelled_mefo }
				NOT = {
					OR = {
						NOT = { GER_has_mefo_bills = yes }
						has_idea = GER_mefo_bills_ended
					}
				}
			}
		}

		cost = 0

		fire_only_once = no

		visible = {
			hidden_trigger = {
				NOT = { has_country_flag = ger_has_cancelled_mefo }
				NOT = {
					OR = {
						NOT = { GER_has_mefo_bills = yes }
						has_idea = GER_mefo_bills_ended
					}
				}
			}
		}

		cancel_if_not_visible = yes

		remove_effect = {
			set_country_flag = ger_has_cancelled_mefo
		}

		ai_will_do = {
			factor = 0
		}
	}

	GER_renew_mefos = {

		icon = ger_mefo_bills

		available = {
			hidden_trigger = {
				has_country_flag = ger_has_cancelled_mefo
				NOT = {
					OR = {
						NOT = { GER_has_mefo_bills = yes }
						has_idea = GER_mefo_bills_ended
					}
				}
			}
		}

		cost = 0

		fire_only_once = no

		visible = {
			hidden_trigger = {
				has_country_flag = ger_has_cancelled_mefo
				NOT = {
					OR = {
						NOT = { GER_has_mefo_bills = yes }
						has_idea = GER_mefo_bills_ended
					}
				}
			}
		}

		cancel_if_not_visible = yes

		remove_effect = {
			clr_country_flag = ger_has_cancelled_mefo
		}

		ai_will_do = {
			factor = 200
		}
	}
}

operations = {

	GER_barbarossa_mission = {

		icon = generic_operation

		allowed = {
			always = no
			#added through on_action
		}

		available = {
			219 = { is_controlled_by_ROOT_or_ally = yes }
			195 = { is_controlled_by_ROOT_or_ally = yes }
			202 = { is_controlled_by_ROOT_or_ally = yes }
			217 = { is_controlled_by_ROOT_or_ally = yes }
		}

		days_mission_timeout = 180
		fire_only_once = yes

		activation = {

		}

		is_good = no

		complete_effect = {
			add_war_support = 0.1
			custom_effect_tooltip = barbarossa_mission_tt
		}

		timeout_effect = {

		}

		ai_will_do = {
			factor = 1
		}
	}
}

GER_case_anton_category = {

	GER_case_anton = {

		icon = generic_operation

		available = {
			original_tag = GER
			has_war = yes
			has_government = fascism
			any_country_with_original_tag = {
				original_tag_to_check = FRA
				has_government = fascism
				OR = {
					is_subject_of = GER
					has_focus_tree = vichy_french_focus
				}
				NOT = { has_war_with = GER }
				NOT = { has_country_flag = case_anton }
				custom_trigger_tooltip = {
					tooltip = GER_case_anton_tt2
					count_triggers = {
						amount = 3 # lost control of ca half french north africa
						458 = { CONTROLLER = { has_war_with = ROOT } }
						459 = { CONTROLLER = { has_war_with = ROOT } }
						460 = { CONTROLLER = { has_war_with = ROOT } }
						461 = { CONTROLLER = { has_war_with = ROOT } }
						462 = { CONTROLLER = { has_war_with = ROOT } }
						513 = { CONTROLLER = { has_war_with = ROOT } }
						665 = { CONTROLLER = { has_war_with = ROOT } }
					}
				}
			}
			divisions_in_state = { state = 31 size < 1 }
			divisions_in_state = { state = 25 size < 1 }
			divisions_in_state = { state = 22 size < 1 }
			divisions_in_state = { state = 21 size < 1 }
			divisions_in_state = { state = 851 size < 1 }
			divisions_in_state = { state = 32 size < 1 }
			divisions_in_state = { state = 22 size < 1 }
			divisions_in_state = { state = 26 size < 1 }
			divisions_in_state = { state = 33 size < 1 }
			divisions_in_state = { state = 20 size < 1 }
			OR = {
				ITA = { owns_state = 735 }
				divisions_in_state = { state = 735 size < 1 }
			}
		}

		cost = 50
		fire_only_once = yes

		visible = {
			original_tag = GER
			has_government = fascism
			any_country_with_original_tag = {
				original_tag_to_check = FRA
				has_government = fascism
				OR = {
					is_subject_of = GER
					has_focus_tree = vichy_french_focus
				}
				NOT = { has_war_with = GER }
			}
		}
		ai_will_do = {
			factor = 25

			modifier = {
				factor = 0
				VIC = { is_ai = no }
			}
		}
		complete_effect = {
			custom_effect_tooltip = GER_case_anton_tt
			hidden_effect = {
				random_other_country = {
					limit = {
						original_tag = FRA
						has_government = fascism
						OR = {
							is_subject_of = GER
							has_focus_tree = vichy_french_focus
						}
					}
					set_country_flag = case_anton
					activate_mission = FRA_case_anton_mission
				}
			}
		}
	}
}

#Category only allowed for GER
GER_reichskommissariats = {
	GER_reichskommissariat_norwegen = {

		icon = ger_reichskommissariats

		available = {
			has_completed_focus = GER_form_the_reichskommissariats
			has_government = fascism
			controls_state = 110
			controls_state = 142
			controls_state = 143
			controls_state = 144
		}

		cost = 0
		ai_will_do = {
			factor = 0
			modifier = {
				add = 1
				ENG = { has_capitulated = yes }
			}
		}

		visible = {
			has_completed_focus = GER_form_the_reichskommissariats
			has_government = fascism
		}

		complete_effect = {
			if = {
				limit = {
					country_exists = NOR
					NOT = { NOR = { has_government = fascism } }
				}
				hidden_effect = {
					NOR = {
						set_state_controller = 110
						set_state_controller = 142
						set_state_controller = 143
						set_state_controller = 144
					}
				}
				NOR = {
					start_civil_war = {
						ideology = fascism
						size = 1

						transfer_state = 110
						transfer_state = 142
						transfer_state = 143
						transfer_state = 144
						GER = {
							puppet = PREV
							set_autonomy = { target = PREV autonomy_state = autonomy_integrated_puppet }
						}
						set_cosmetic_tag = NOR_reichskommissariat
						create_country_leader = {
							name = "Josef Terboven"
							desc = "POLITICS_JOSEF_TERBOVEN_DESC"
							picture = GFX_portrait_Josef_Terboven
							expire = "1965.1.1"
							ideology = nazism
							traits = {
							}
						}
					}
				}
			}
			else = {
				NOR = {
					transfer_state = 110
					transfer_state = 142
					transfer_state = 143
					transfer_state = 144
					set_cosmetic_tag = NOR_reichskommissariat
					create_country_leader = {
						name = "Josef Terboven"
						desc = "POLITICS_JOSEF_TERBOVEN_DESC"
						picture = GFX_portrait_Josef_Terboven
						expire = "1965.1.1"
						ideology = nazism
						traits = {
						}
					}
				}
				set_autonomy = { target = NOR autonomy_state = autonomy_integrated_puppet }
			}
		}
	}

	GER_reichskommissariat_niederlande = {

		icon = ger_reichskommissariats

		available = {
			has_completed_focus = GER_form_the_reichskommissariats
			has_government = fascism
			controls_state = 7
			controls_state = 35
			controls_state = 36
		}

		cost = 0

		ai_will_do = {
			factor = 0
			modifier = {
				add = 1
				ENG = { has_capitulated = yes }
			}
		}

		visible = {
			has_completed_focus = GER_form_the_reichskommissariats
			has_government = fascism
		}

		complete_effect = {
			if = {
				limit = {
					country_exists = HOL
					NOT = { HOL = { has_government = fascism } }
				}
				hidden_effect = {
					HOL = {
						set_state_controller = 7
						set_state_controller = 35
						set_state_controller = 36
					}
				}
				HOL = {
					start_civil_war = { ideology = fascism size = 1 }
				}
				random_country = {
					limit= {
						original_tag = HOL
						has_government = fascism
					}
					transfer_state = 7
					transfer_state = 35
					transfer_state = 36
					GER = {
						puppet = PREV
						set_autonomy = { target = PREV autonomy_state = autonomy_integrated_puppet }
					}

					set_cosmetic_tag = HOL_reichskommissariat
					create_country_leader = {
						name = "Arthur Seyss-Inquart"
						desc = "POLITICS_ARTHUR_SEYSS_INQUART_DESC"
						picture = GFX_portrait_Arthur_Seyss_Inquart
						expire = "1965.1.1"
						ideology = nazism
						traits = {
						}
					}
				}
			}
			else = {
				HOL = {
					transfer_state = 7
					transfer_state = 35
					transfer_state = 36
					set_cosmetic_tag = HOL_reichskommissariat
					create_country_leader = {
						name = "Arthur Seyss-Inquart"
						desc = "POLITICS_ARTHUR_SEYSS_INQUART_DESC"
						picture = GFX_portrait_Arthur_Seyss_Inquart
						expire = "1965.1.1"
						ideology = nazism
						traits = {
						}
					}
				}
				set_autonomy = { target = HOL autonomy_state = autonomy_integrated_puppet }
			}
		}
	}

	GER_reichskommissariat_belgien_nordfrankreich = {

		icon = ger_reichskommissariats

		available = {
			has_completed_focus = GER_form_the_reichskommissariats
			has_government = fascism
			controls_state = 6
			controls_state = 29
			controls_state = 34
		}

		cost = 0

		ai_will_do = {
			factor = 0
			modifier = {
				add = 1
				ENG = { has_capitulated = yes }
			}
		}

		visible = {
			has_completed_focus = GER_form_the_reichskommissariats
			has_government = fascism
		}

		complete_effect = {
			if = {
				limit = {
					country_exists = BEL
					NOT = { BEL = { has_government = fascism } }
				}
				hidden_effect = {
					BEL = {
						set_state_controller = 6
						set_state_controller = 34
					}
				}
				BEL = {
					start_civil_war = { ideology = fascism size = 1 }
				}
				random_country = {
					limit= {
						original_tag = BEL
						has_government = fascism
					}
					transfer_state = 6
					transfer_state = 29
					transfer_state = 34
					GER = {
						puppet = PREV
						set_autonomy = { target = PREV autonomy_state = autonomy_integrated_puppet }
					}
					set_cosmetic_tag = BEL_reichskommissariat
					create_country_leader = {
						name = "Josef Grohe"
						desc = "POLITICS_JOSEF_GROHE_DESC"
						picture = GFX_portrait_Josef_Grohe
						expire = "1965.1.1"
						ideology = nazism
						traits = {
						}
					}
					hidden_effect = {
						29 = { add_core_of = PREV }
					}
				}
			}
			else = {
				BEL = {
					transfer_state = 6
					transfer_state = 29
					transfer_state = 34
					set_cosmetic_tag = BEL_reichskommissariat
					create_country_leader = {
						name = "Josef Grohe"
						desc = "POLITICS_JOSEF_GROHE_DESC"
						picture = GFX_portrait_Josef_Grohe
						expire = "1965.1.1"
						ideology = nazism
						traits = {
						}
					}
				}
				set_autonomy = { target = BEL autonomy_state = autonomy_integrated_puppet }
			}
		}
	}

	GER_reichskommissariat_ostland = {

		icon = ger_reichskommissariats

		available = {
			has_completed_focus = GER_form_the_reichskommissariats
			has_government = fascism
			controls_state = 97
			controls_state = 94
			controls_state = 95
			controls_state = 96
			controls_state = 194
			controls_state = 204
			controls_state = 206
			controls_state = 207
			controls_state = 241
			controls_state = 11
			controls_state = 784
			controls_state = 189
			controls_state = 12
			controls_state = 190
			controls_state = 13
			controls_state = 191
			controls_state = 814
			controls_state = 815
			controls_state = 809
			controls_state = 808
			controls_state = 810
			controls_state = 813
			controls_state = 812
			controls_state = 811
		}

		cost = 0

		ai_will_do = {
			factor = 0
			modifier = {
				add = 1
				SOV = { has_capitulated = yes }
			}
		}

		visible = {
			has_completed_focus = GER_form_the_reichskommissariats
			has_government = fascism
		}

		complete_effect = {
			hidden_effect = {
					every_state = {
						limit = {
							OR = {
								state = 11
								state = 189
								state = 12
								state = 190
								state = 13
								state = 191
								state = 784
								state = 97
								state = 814
								state = 815
								state = 809
								state = 808
								state = 810
								state = 813
								state = 812
								state = 811
							}
							is_owned_by = GER
						}
						BLR = {
							transfer_state = PREV
						}
					}
					11 = { add_core_of = BLR }
					97 = { add_core_of = BLR }
					189 = { add_core_of = BLR }
					12 = { add_core_of = BLR }
					190 = { add_core_of = BLR }
					13 = { add_core_of = BLR }
					191 = { add_core_of = BLR }
					814 = { add_core_of = BLR }
					815 = { add_core_of = BLR }
					809 = { add_core_of = BLR }
					808 = { add_core_of = BLR }
					810 = { add_core_of = BLR }
					813 = { add_core_of = BLR }
					812 = { add_core_of = BLR }
					811 = { add_core_of = BLR }
					784 = { add_core_of = BLR }
			}
			release_on_controlled = BLR
			BLR = {
				set_state_controller = 11
				set_state_controller = 784
				set_state_controller = 189
				set_state_controller = 12
				set_state_controller = 190
				set_state_controller = 13
				set_state_controller = 191
				set_state_controller = 97
				set_state_controller = 94
				set_state_controller = 95
				set_state_controller = 96
				set_state_controller = 194
				set_state_controller = 204
				set_state_controller = 206
				set_state_controller = 207
				set_state_controller = 241
				set_state_controller = 784
				set_state_controller = 814
				set_state_controller = 815
				set_state_controller = 809
				set_state_controller = 808
				set_state_controller = 810
				set_state_controller = 813
				set_state_controller = 812
				set_state_controller = 811
				GER = {
					puppet = PREV
					if = {
						limit = {
							NOT = { has_dlc = "Death or Dishonor" }
						}
						set_autonomy = { target = PREV autonomy_state = autonomy_integrated_puppet end_wars = no end_civil_wars = no }
					}
					else = {
						set_autonomy = { target = PREV autonomy_state = autonomy_reichskommissariat  end_wars = no end_civil_wars = no }
					}
				}

				set_cosmetic_tag = BLR_reichskommissariat
				create_country_leader = {
					name = "Hinrich Lohse"
					desc = "POLITICS_HINRICH_LOHSE_DESC"
					picture = GFX_portrait_Hinrich_Lohse
					expire = "1965.1.1"
					ideology = nazism
					traits = {
					}
				}
			}
		}
	}

	GER_reichskommissariat_ukraine = {

		icon = ger_reichskommissariats

		available = {
			has_completed_focus = GER_form_the_reichskommissariats
			has_government = fascism
			controls_state = 93
			controls_state = 91
			controls_state = 89
			controls_state = 199
			controls_state = 201
			controls_state = 198
			controls_state = 202
			controls_state = 193
			controls_state = 192
			controls_state = 203
			controls_state = 197
			controls_state = 225
			controls_state = 259
			controls_state = 226
			controls_state = 196
			controls_state = 200
			controls_state = 221
			controls_state = 228
			controls_state = 227
		}

		cost = 0

		ai_will_do = {
			factor = 0
			modifier = {
				add = 1
				SOV = { has_capitulated = yes }
			}
		}

		visible = {
			has_completed_focus = GER_form_the_reichskommissariats
			has_government = fascism
		}

		complete_effect = {
			release_on_controlled = UKR
			UKR = {
				set_state_controller = 93
				set_state_controller = 91
				set_state_controller = 89
				set_state_controller = 199
				set_state_controller = 201
				set_state_controller = 198
				set_state_controller = 202
				set_state_controller = 193
				set_state_controller = 192
				set_state_controller = 203
				set_state_controller = 197
				set_state_controller = 225
				set_state_controller = 259
				set_state_controller = 226
				set_state_controller = 196
				set_state_controller = 200
				set_state_controller = 221
				set_state_controller = 228
				set_state_controller = 227
				GER = {
					puppet = PREV
					set_autonomy = { target = PREV autonomy_state = autonomy_integrated_puppet }
				}
				set_cosmetic_tag = UKR_reichskommissariat
				create_country_leader = {
					name = "Erich Koch"
					desc = "POLITICS_HINRICH_LOHSE_DESC"
					picture = GFX_portrait_Erich_Koch
					expire = "1965.1.1"
					ideology = nazism
					traits = {
					}
				}
			}
		}
	}
	
	GER_form_moskowien = {
	
	    icon = ger_reichskommissariats

		available = {
			has_completed_focus = GER_form_the_reichskommissariats
			has_government = fascism
			GER = {
			NOT = {
			has_war_with = SOV
			}
			}
			controls_state = 195
			controls_state = 244
			controls_state = 263
			controls_state = 246
			controls_state = 242
			controls_state = 243
			controls_state = 224
			controls_state = 208
			controls_state = 209
			controls_state = 210
			controls_state = 222
			controls_state = 220
			controls_state = 240
			controls_state = 260
			controls_state = 265
			controls_state = 245
			controls_state = 829
			controls_state = 239
			controls_state = 255
			controls_state = 264
			controls_state = 247
			controls_state = 219
			controls_state = 255
			controls_state = 222
			controls_state = 223
			controls_state = 258
			controls_state = 257
			controls_state = 254
			controls_state = 205
		}
		
		complete_effect = {
		RMO = {
		set_state_controller = 195
		set_state_controller = 244
		set_state_controller = 263
		set_state_controller = 246
		set_state_controller = 242
		set_state_controller = 243
		set_state_controller = 224
		set_state_controller = 208
		set_state_controller = 209
		set_state_controller = 210
		set_state_controller = 222
		set_state_controller = 220
		set_state_controller = 240
		set_state_controller = 260
		set_state_controller = 265
		set_state_controller = 245
		set_state_controller = 829
		set_state_controller = 239
		set_state_controller = 255
		set_state_controller = 264
		set_state_controller = 247
		set_state_controller = 219
		set_state_controller = 255
		set_state_controller = 222
		set_state_controller = 223
		set_state_controller = 258
		set_state_controller = 257
		set_state_controller = 254
		set_state_controller = 205
		add_state_claim = 219
		add_state_core = 219
		set_capital = 219
		}
		GER = {
		puppet = RMO
		set_autonomy = { target = RMO autonomy_state = autonomy_integrated_puppet }
		}
		}
	
	    cost = 0
	}
	
	GER_form_rkkaukasus = {
	
	 icon = ger_reichskommissariats

		available = {
			has_completed_focus = GER_form_the_reichskommissariats
			has_government = fascism
			GER = {
			NOT = {
			has_war_with = SOV
			}
			}
			controls_state = 234
			controls_state = 218
			controls_state = 238
			controls_state = 217
			controls_state = 236
			controls_state = 237
			controls_state = 235
			controls_state = 233
			controls_state = 826
			controls_state = 231
			controls_state = 230
			controls_state = 229
			controls_state = 232
			controls_state = 827
			controls_state = 828
			controls_state = 821
		}
		
		complete_effect = {
		RKK = {
		set_state_controller = 234
		set_state_controller = 218
		set_state_controller = 238
		set_state_controller = 217
		set_state_controller = 236
		set_state_controller = 237
		set_state_controller = 235
		set_state_controller = 233
		set_state_controller = 826
		set_state_controller = 231
		set_state_controller = 230
		set_state_controller = 229
		set_state_controller = 232
		set_state_controller = 827
		set_state_controller = 828
		set_state_controller = 821
		add_state_claim = 217
		add_state_core = 217
		set_capital = 217
		}
		GER = {
		puppet = RKK
		set_autonomy = { target = RKK autonomy_state = autonomy_integrated_puppet }
		}
		}
	
	}
}

political_actions = {

	# Reinstate Wilhelm IV into the line of succession
	reinstate_wilhelm_iv_succession_rights = {

		allowed = {
			original_tag = GER
		}

		available = {

		}

		cost = 100

		fire_only_once = yes

		ai_will_do = {
			factor = 0
		}

		visible = {
			has_war = no
			has_government = neutrality
			has_country_flag = backed_down_netherlands_kaiser
		}

		complete_effect = {
			add_stability = -0.10
			add_popularity = { ideology = neutrality popularity = -0.05 }
			custom_effect_tooltip = reinstate_wilhelm_iv_succession_rights_tt
			hidden_effect = {
				set_country_flag = reinstated_wilhelm_iv_succession_rights
			}
		}
	}

	# Agnatic-Cognatic Primogeniture
	modernize_the_succession_laws = {

		allowed = {
			original_tag = GER
		}

		available = {

		}

		cost = 150

		fire_only_once = yes

		ai_will_do = {
			factor = 0
		}

		visible = {
			has_war = no
			has_government = neutrality
			has_country_flag = reinstated_wilhelm_iv_succession_rights
		}

		complete_effect = {
			add_stability = 0.05
			custom_effect_tooltip = modernize_the_succession_laws_tt
			hidden_effect = {
				set_country_flag = modernized_succession_laws
			}
		}
	}

	recall_von_lettow_vorbeck = {

		allowed = {
			original_tag = GER
		}
		available = {
			has_civil_war = no
		}
		visible = {
			OR = {
				has_country_leader = { ruling_only = yes character = GER_wilhelm_ii }
				has_country_leader = { ruling_only = yes character = GER_wilhelm_iii }
				has_country_leader = { ruling_only = yes character = GER_victoria }
			}
		}
		cost = 25
		fire_only_once = yes
		ai_will_do = {
			factor = 1
		}
		complete_effect = {
			create_corps_commander = {
				name = "Paul von Lettow-Vorbeck"
				gfx = GFX_portrait_ger_von_lettow_vorbeck
				traits = { trickster war_hero media_personality jungle_rat}
				skill = 4
				id = 499
				attack_skill = 3
				defense_skill = 3
				planning_skill = 2
				logistics_skill = 5
			}
		}
	}

	# Safety regulations
	GER_sharpen_air_safety_regulations = {

		allowed = {
			original_tag = GER
			has_dlc = "Waking the Tiger"
		}

		available = {

		}

		cost = 50

		fire_only_once = yes

		ai_will_do = {
			factor = 0
		}

		visible = {
			has_government = neutrality
		}

		complete_effect = {
			add_timed_idea = { idea = GER_air_safety_regulations days = 1095 }
			set_global_flag = GER_air_safety_regulations_flag
		}
	}
}

foreign_politics = {

	# Titles Deprivation Act 1917
	request_restoration_of_british_titles = {

		allowed = {
			original_tag = GER
		}

		available = {
			ENG = { has_opinion = { target = GER value > 99 } }
			custom_trigger_tooltip = {
				tooltip = hindenburg_destroyed_tt
				NOT = { has_global_flag = hindenburg_destroyed }
			}
		}

		cost = 150

		fire_only_once = yes

		ai_will_do = {
			factor = 0
		}

		visible = {
			has_war = no
			has_government = neutrality
			has_completed_focus = GER_ally_the_shade
			has_country_flag = modernized_succession_laws
		}

		complete_effect = {
			ENG = { country_event = { id = wtt_germany.999 days = 1 } }
			custom_effect_tooltip = request_restoration_of_british_titles_tt
			hidden_effect = { set_global_flag = hindenburg_event_in_progress }
		}
	}

	GER_request_polish_war_participation = {

		icon = generic_prepare_civil_war

		allowed = {
			original_tag = GER
		}

		available = {
			has_war_with = SOV
			NOT = { is_in_faction_with = POL }
		}

		cost = 50

		fire_only_once = yes

		ai_will_do = {
			factor = 200
		}

		visible = {
			has_country_flag = poland_traded_danzig
			has_completed_focus = GER_tackle_the_communist_threat
		}

		complete_effect = {
			POL = { country_event = { id = wtt_germany.65 hours = 6 } }
		}

	}
}

#Category only allowed for GER
GER_military_buildup = {

	GER_plan_z = {

		icon = generic_naval

		available = {
			has_navy_size = {
				unit = battleship
				size > 9
			}
			has_navy_size = {
				unit = battle_cruiser
				size > 2
			}
			has_navy_size = {
				unit = carrier
				size > 3
			}
			has_navy_size = {
				unit = heavy_cruiser
				size > 19
			}
			has_navy_size = {
				unit = light_cruiser
				size > 19
			}
			has_navy_size = {
				unit = destroyer
				size > 99
			}
		}

		fire_only_once = yes
		days_mission_timeout = 1800
		is_good = no
		activation = {
			has_completed_focus = GER_plan_z
		}


		visible = {
			has_completed_focus = GER_plan_z
		}

		complete_effect = {
			add_war_support = 0.05
			navy_experience = 150
		}


	}

	GER_jaegernotprogramm = {

		icon = generic_air

		available = {
			has_war = yes
			AND = {
				has_deployed_air_force_size = {
					type = fighter
					size < 750
				}
				has_equipment = {
					small_plane_airframe < 250
				}
			}
			NOT = {
				has_idea = GER_jaegernotprogramm
			}
		}

		cost = 50
		fire_only_once = yes
		ai_will_do = {
			factor = 1
		}

		visible = {
			has_war = yes
			AND = {
				has_deployed_air_force_size = {
					type = fighter
					size < 750
				}
				has_equipment = {
					small_plane_airframe < 250
				}
			}
			NOT = {
				has_idea = GER_jaegernotprogramm
			}
		}

		complete_effect = {
			add_stability = -0.05
			add_war_support = -0.05
			add_timed_idea = { idea = GER_jaegernotprogramm days = 90 }
		}
	}
}

special_projects = {
	GER_begin_heavy_water_production = {
		allowed = {
			original_tag = GER
			has_dlc = "La Resistance"
		}
		available = {
			110 = {
				CONTROLLER = {
					OR = {
						tag = ROOT
						is_subject_of = ROOT
					}
				}
			}
		}
		visible = { has_tech = atomic_research }
		cost = 0
		ai_will_do = {
			factor = 5
		}
		cancel_trigger = { NOT = { has_global_flag = GER_heavy_water_production_underway } } #can be removed via intelligence ops
		days_remove = 365
		remove_effect = {
			add_tech_bonus = {
				name = GER_heavy_water
				category = nuclear
				uses = 2
				bonus = 2
			}
		}
		complete_effect = { set_global_flag = GER_heavy_water_production_underway }
	}
	GER_dismantle_maginot = {

		icon = generic_construction

		available = {
			#has_war = yes
			controls_state = 28
			if = {
				limit = {
					FRA = { has_completed_focus = FRA_extend_the_maginot_line }
				}
				controls_state = 18
				controls_state = 29
			}
		}

		cost = 50
		fire_only_once = yes

		ai_will_do = {
			factor = 0
		}
		visible = {
			#has_war = yes
			controls_state = 28
			if = {
				limit = {
					FRA = { has_completed_focus = FRA_extend_the_maginot_line }
				}
				controls_state = 18
				controls_state = 29
			}
		}
		days_remove = 180
		modifier = {
			civilian_factory_use = 5
		}
		remove_effect = {
			28 = {
				set_building_level = {
					type = bunker
					level = 2
					province = {
						all_provinces = yes
						limit_to_border = no
						level > 2
					}
				}
			}
			if = {
				limit = {
					FRA = { has_completed_focus = FRA_extend_the_maginot_line }
				}
				18 = {
					set_building_level = {
						type = bunker
						level = 2
						province = {
							all_provinces = yes
							limit_to_border = no
							level > 2
						}
					}
				}
				29 = {
					set_building_level = {
						type = bunker
						level = 2
						province = {
							all_provinces = yes
							limit_to_border = no
							level > 2
						}
					}
				}
			}
			if = {
				limit = {
					has_idea = FRA_protected_by_the_maginot_line
				}
				remove_ideas = FRA_protected_by_the_maginot_line
			}
		}
		complete_effect = {
			if = {
				limit = { FRA = { has_completed_focus = FRA_extend_the_maginot_line } }
				add_timed_idea = { idea = GER_dismantle_maginot days = 270 }
				else = {
					add_timed_idea = { idea = GER_dismantle_maginot days = 180 }
				}
			}
		}
	}
	GER_dismantle_czechoslovakian_forts = {

		icon = generic_construction

		available = {
			#has_war = yes
			controls_state = 69 # Sudetenland
			controls_state = 74 # Eastern Sudetenland
			controls_state = 9 # Bohemia
			controls_state = 75 # Moravia
		}

		cost = 50
		fire_only_once = yes

		ai_will_do = {
			factor = 0
		}
		visible = {
			#has_war = yes
			controls_state = 69 # Sudetenland
			controls_state = 74 # Eastern Sudetenland
			controls_state = 9 # Bohemia
			controls_state = 75 # Moravia
		}
		days_remove = 180
		modifier = {
			civilian_factory_use = 3
		}
		remove_effect = {
			69 = {
				set_building_level = {
					type = bunker
					level = 1
					province = {
						all_provinces = yes
						limit_to_border = no
						level > 1
					}
				}
			}
			74 = {
				set_building_level = {
					type = bunker
					level = 1
					province = {
						all_provinces = yes
						limit_to_border = no
						level > 1
					}
				}
			}
			9 = {
				set_building_level = {
					type = bunker
					level = 1
					province = {
						all_provinces = yes
						limit_to_border = no
						level > 1
					}
				}
			}
			75 = {
				set_building_level = {
					type = bunker
					level = 1
					province = {
						all_provinces = yes
						limit_to_border = no
						level > 1
					}
				}
			}
			if = {
				limit = {
					72 = {
						controller = {
							OR = {
								tag = ROOT
								is_subject_of = ROOT
							}
						}
					}
					71 = {
						controller = {
							OR = {
								tag = ROOT
								is_subject_of = ROOT
							}
						}
					}
				}
				72 = {
					set_building_level = {
						type = bunker
						level = 1
						province = {
							all_provinces = yes
							limit_to_border = no
							level > 1
						}
					}
				}
				71 = {
					set_building_level = {
						type = bunker
						level = 1
						province = {
							all_provinces = yes
							limit_to_border = no
							level > 1
						}
					}
				}
			}
			if = {
				limit = {
					70 = {
						controller = {
							OR = {
								tag = ROOT
								is_subject_of = ROOT
							}
						}
					}
				}
				70 = {
					set_building_level = {
						type = bunker
						level = 1
						province = {
							all_provinces = yes
							limit_to_border = no
							level > 1
						}
					}
				}
			}
			if = {
				limit = {
					73 = {
						controller = {
							OR = {
								tag = ROOT
								is_subject_of = ROOT
							}
						}
					}
					664 = {
						controller = {
							OR = {
								tag = ROOT
								is_subject_of = ROOT
							}
						}
					}
				}
				73 = {
					set_building_level = {
						type = bunker
						level = 1
						province = {
							all_provinces = yes
							limit_to_border = no
							level > 1
						}
					}
				}
				664 = {
					set_building_level = {
						type = bunker
						level = 1
						province = {
							all_provinces = yes
							limit_to_border = no
							level > 1
						}
					}
				}
			}
		}
		complete_effect = {
			add_timed_idea = { idea = GER_dismantle_czechoslovakian_forts days = 180 }
		}
	}
}

GER_aid_hun_rom_democratic_civil_war = {

	GER_aid_hun_democratic_civil_war = {

		icon = generic_prepare_civil_war

		available = {
			HUN = {
				NOT = { has_government = democratic }
				NOT = { has_war_with = GER }
				has_civil_war = yes
				exists = yes
				any_enemy_country = {
					original_tag = HUN
					has_government = democratic
				}
			}
		}

		cost = 0

		ai_will_do = {
			factor = 200
		}

		#Available if democratic civil war
		visible = {
			has_completed_focus = GER_align_hungary
			GER = { has_government = democratic }
		}

		complete_effect = {
			if = {
				limit = {
					HUN = { is_in_faction_with = GER }
				}
				remove_from_faction = HUN
				random_country = {
					limit = {
						original_tag = HUN
						has_government = democratic
						has_war_with = HUN
					}
					GER = { add_to_faction = PREV }
				}
			}
			random_country = {
				limit = {
					original_tag = HUN
					has_government = democratic
					has_war_with = HUN
				}
				GER = { add_to_war = { targeted_alliance = PREV enemy = HUN hostility_reason = asked_to_join } }
			}
		}
	}

	GER_aid_rom_democratic_civil_war = {

		icon = generic_prepare_civil_war

		available = {
			ROM = {
				NOT = { has_government = democratic }
				NOT = { has_war_with = GER }
				has_civil_war = yes
				exists = yes
				any_enemy_country = {
					original_tag = ROM
					has_government = democratic
				}
			}
		}

		cost = 0

		ai_will_do = {
			factor = 200
		}

		#Available if democratic civil war
		visible = {
			has_completed_focus = GER_align_romania
			GER = { has_government = democratic }
		}

		complete_effect = {
			if = {
				limit = {
					ROM = { is_in_faction_with = GER }
				}
				remove_from_faction = ROM
				random_country = {
					limit = {
						original_tag = ROM
						has_government = democratic
						has_war_with = ROM
					}
					GER = { add_to_faction = PREV }
				}
			}
			random_country = {
				limit = {
					original_tag = ROM
					has_government = democratic
					has_war_with = ROM
				}
				GER = { add_to_war = { targeted_alliance = PREV enemy = ROM hostility_reason = asked_to_join } }
			}
		}
	}

}

GER_austro_hungarian_empire = {

	GER_reform_austro_hungarian_empire = {

		allowed = {
			OR = {
				original_tag = AUS
				original_tag = HUN
				original_tag = CZE
			}
		}

		available = {
			AUS = {
				OR = {
					has_government = neutrality
					neutrality > 0.4
				}
			}
			HUN = {
				OR = {
					has_government = neutrality
					neutrality > 0.4
				}
			}
			CZE = {
				OR = {
					has_government = neutrality
					neutrality > 0.4
				}
			}
		}

		visible = {
			GER = {
				has_completed_focus = GER_rekindle_imperial_sentiment
				has_government = neutrality
			}
			AUS = {
				exists = yes
			}
			HUN = {
				exists = yes
			}
			CZE = {
				exists = yes
			}
			NOT = { has_global_flag = GER_reformed_austro_hungarian_empire }
		}

		cost = 0
		fire_only_once = yes

		ai_will_do = {
			factor = 200
			modifier = {
				factor = 0
				tag = HUN
			}
			modifier = {
				factor = 0
				tag = CZE
			}
		}

		complete_effect = {
			custom_effect_tooltip = GER_reform_austro_hungarian_empire_tt
			hidden_effect = { set_global_flag = GER_reformed_austro_hungarian_empire }
			if = {
				limit = {
					tag = AUS
				}
				HUN = { country_event = { id = wtt_germany.68 hours = 1 } }
				CZE = { country_event = { id = wtt_germany.68 hours = 3 } }
			}
			if = {
				limit = {
					tag = HUN
				}
				AUS = { country_event = { id = wtt_germany.68 hours = 1 } }
				CZE = { country_event = { id = wtt_germany.68 hours = 3 } }
			}
			if = {
				limit = {
					tag = CZE
				}
				HUN = { country_event = { id = wtt_germany.68 hours = 1 } }
				AUS = { country_event = { id = wtt_germany.68 hours = 3 } }
			}
		}
	}
}

GER_balance_of_power_category = {
 GER_send_aid = {
 available = {
 SPR = { has_civil_war = yes }
 }
 icon = GFX_decision_ger_military_buildup
 fire_only_once = no
 days_re_enable = 30
 cost = 20
 available = {
 has_equipment = {
    infantry_equipment_1 > 1500
    }
 
 }
 complete_effect = {
 add_power_balance_value = {
    id = GER_power_balance
    value = +0.10
	}
 GER = { send_equipment = {

        type = infantry_equipment_1

        amount = 1500
		
		target = SPA
    }
    }
 SPA = { add_equipment_to_stockpile = {

        type = infantry_equipment_1

        amount = 1500
    }
    }
 }
 }
 GER_increase_luftwaffe = {
 available = {
 SPR = { has_civil_war = yes }
 }
 icon = GFX_decision_generic_air
 days_remove = 90
 fire_only_once = no
 cost = 35
 modifier = {
 ground_attack_factor = 0.15 
 }
 complete_effect = {
 add_power_balance_value = {
    id = GER_power_balance
    value = +0.15
	
 }
}
}

 GER_utilize_political_influence = {
 available = {
 SPR = { has_civil_war = yes }
 }
 icon = GFX_decision_generic_speech
 days_remove = 15
 days_re_enable = 20
 fire_only_once = no
 cost = 50
 remove_effect = {
 add_power_balance_value = {
    id = GER_power_balance
    value = +0.1
	}
 }
}

 GER_recruit_nationalist_troops = {
 available = { 
 SPR = { has_civil_war = yes }
 }
 icon = GFX_decision_generic_military
 days_remove = 15
 fire_only_once = no
 cost = 10
 targeted_modifier = {
  tag = SPA
  weekly_manpower = 2500
 }
 remove_effect = {
 add_power_balance_value = {
    id = GER_power_balance
    value = +0.05
	}
 }
}
 GER_prototype_testing = {
 available = { 
 SPR = { has_civil_war = yes }
 }
 icon = GFX_decision_generic_research
 fire_only_once = yes
 custom_cost_trigger = {
			has_air_experience > 50
		}
    custom_cost_text = GER_bop_air_cost
	complete_effect = {
	add_tech_bonus = {
	name = tested_prototypes
	bonus = 0.5
	uses = 2
	category = cat_air_guns
	}
	hidden_effect = {
	air_experience = -50
	}
	}
 }
 GER_increase_our_presence = {
 available = {
 SPR = { has_civil_war = yes }
 }
 icon = GFX_decision_generic_army_support
 fire_only_once = no
 days_remove = 10
 days_re_enable = 120
 custom_cost_trigger = {
			has_army_experience > 10
		}
		custom_cost_text = GER_bop_army_cost
		complete_effect = {
	    add_timed_idea = {
	    idea = GER_increased_presence
	    days = 60
	}
	add_power_balance_value = {
    id = GER_power_balance
    value = +0.1
	}
	hidden_effect = {
	army_experience = -10
	}
	}
 }
}

GER_pressure_spain_category = {
 GER_send_ultimatum_to_spain = {
 available = {
 SPA = { exists = yes }
 }
 icon = GFX_decision_generic_speech
 fire_only_once = yes
 days_remove = 10
 cost = 120
 remove_effect = {
 SPA = { 
 country_event = cltree.3 
 }
 }
 }
 GER_second_spanish_intervention = {
 available = {
 SPR = { exists = yes }
 }
 icon = GFX_decision_generic_military
 fire_only_once = yes
 days_remove = 10
 cost = 120
 remove_effect = {
 GER = { create_wargoal = { type = annex_everything target = SPR } }
 }
 }
 
 GER_form_rk_iberien = {
 icon = GFX_decision_ger_reichskommissariats
 fire_only_once = yes
 days_remove = 10
 cost = 120
 available = {
 GER = {
 controls_state = 171
 controls_state = 174
 controls_state = 790
 controls_state = 792
 controls_state = 172
 controls_state = 791
 controls_state = 788
 controls_state = 170
 controls_state = 169
 controls_state = 789
 controls_state = 173
 controls_state = 168
 controls_state = 167
 controls_state = 794
 controls_state = 41
 controls_state = 175
 controls_state = 177
 controls_state = 290
 controls_state = 793
 controls_state = 176
 controls_state = 166
 controls_state = 165
 }
 }
 remove_effect = {
 RKI = {
 transfer_state = 171
 transfer_state = 174
 transfer_state = 790
 transfer_state = 792
 transfer_state = 172
 transfer_state = 791
 transfer_state = 788
 transfer_state = 170
 transfer_state = 169
 transfer_state = 173
 transfer_state = 168
 transfer_state = 167
 transfer_state = 789
 transfer_state = 794
 transfer_state = 41
 transfer_state = 175
 transfer_state = 177
 transfer_state = 290
 transfer_state = 793
 transfer_state = 176
 transfer_state = 166
 transfer_state = 165
 add_state_core = 41
 }
 
 GER = {
 puppet = RKI
 set_autonomy = { target = PREV autonomy_state = autonomy_integrated_puppet }
 }
 }
 }
 GER_portuguese_ambitions = {
 fire_only_once = yes
 available = {
 RKI = {exists = yes}
 }
 icon = GFX_decision_generic_operation
 days_remove = 10
 cost = 120
 remove_effect = {
  GER = {
  create_wargoal = { type = annex_everything target = POR }
  }
 }
 }
 GER_transfer_portuguese_lands = {
 fire_only_once = yes
 available = {
 GER = {
 controls_state = 180
 controls_state = 795
 controls_state = 179
 controls_state = 181
 controls_state = 112
 }
 }
 icon = GFX_decision_generic_form_nation
 days_remove = 10
 remove_effect = {
 RKI = {
 transfer_state = 180
 transfer_state = 795
 transfer_state = 179
 transfer_state = 181
 transfer_state = 112
 }
 }
 }
 GER_attack_galiz_catal = {
 available = {
 GLC = {
 exists = yes
 }
 CAT = {
 exists = yes
 }
 }
 icon = GFX_decision_generic_ignite_civil_war
 days_remove = 10
 remove_effect = {
 GER = {
 create_wargoal = { type = annex_everything target = GLC }
 create_wargoal = { type = annex_everything target = CAT }
 }
 }
 }
 }

GER_operation_barbarossa_worse_category = {
 GER_operation_barb_mission = {
 activation = {
 GER = {
  has_war_with = SOV
  NOT = {
  has_idea = GER_barb_duration
  has_idea = GER_barb_duration_1
  has_idea = GER_barb_duration_2
  }
 }
 tag = GER
 }
 available = {
 GER = {
 NOT = {
  has_war_with = SOV
 }
 }
 }
 days_mission_timeout = 80
 icon = GFX_decision_generic_ignite_civil_war
 timeout_effect = {
  add_ideas = GER_barb_duration
 }
}
 GER_operation_barb_mission_1 = {
 activation = {
 GER = {
  has_war_with = SOV
  has_idea = GER_barb_duration
 }
 tag = GER
 }
 available = {
 GER = {
 NOT = {
  has_war_with = SOV
 }
 }
 }
 days_mission_timeout = 80
 icon = GFX_decision_generic_ignite_civil_war
 timeout_effect = {
  swap_ideas = {
    remove_idea = GER_barb_duration
    add_idea = GER_barb_duration_1
 }  
 }
 complete_effect = {
 remove_ideas = GER_barb_duration
 }
}

GER_operation_barb_mission_2 = {
 activation = {
 GER = {
  has_war_with = SOV
  has_idea = GER_barb_duration_1
 }
 tag = GER
 }
 available = {
 GER = {
 NOT = {
  has_war_with = SOV
 }
 }
 }
 days_mission_timeout = 120
 icon = GFX_decision_generic_ignite_civil_war
 timeout_effect = {
  swap_ideas = {
    remove_idea = GER_barb_duration_1
    add_idea = GER_barb_duration_2
 }  
 }
 complete_effect = {
 remove_ideas = GER_barb_duration_1
 }
}

GER_operation_barb_mission_3 = {
 activation = {
 GER = {
  has_war_with = SOV
  has_idea = GER_barb_duration_2
 }
 tag = GER
 }
 available = {
 GER = {
 NOT = {
  has_war_with = SOV
 }
 }
 }
 days_mission_timeout = 360
 icon = GFX_decision_generic_ignite_civil_war
 timeout_effect = {
 
 }
 complete_effect = {
 remove_ideas = GER_barb_duration_2
 }
}
}

GER_peace_with_soviets_category = {
 GER_peace_deal = {
 available = {
 tag = GER
 controls_state = 219
 controls_state = 195
 controls_state = 217
 }
 days_remove = 10
 remove_effect = {
 SOV = {
 country_event = cltree.5
 }
 
 }
 }
 
 
 }
 
GER_balance_of_power_ss_category = {
 GER_promote_ss_officers = {
 icon = GFX_decision_hol_exchange_intelligence_data
 available = {
 }
 fire_only_once = no
 days_re_enable = 30
 cost = 25
 days_remove = 30
 modifier = {
 experience_gain_army = 0.20
 }
 remove_effect = {
 add_power_balance_value = {
    id = GER_power_balance_ss
    value = -0.1
	}
 add_command_power = 5
 }
 }
 GER_permit_foreign_ss_recruitment = {
 icon = GFX_decision_generic_military
 available = {
 FRA = {
 has_capitulated = yes
 }
 }
 days_re_enable = 30
 fire_only_once = no
 cost = 50
 days_remove = 50
 modifier = {
 weekly_manpower = 1000
 non_core_manpower = 0.15
 }
 remove_effect = {
 add_power_balance_value = {
    id = GER_power_balance_ss
    value = -0.1
	}
 }
 }
 GER_prioritize_ss_divisions = {
 icon = GFX_decision_generic_police_action
 available = {
 GER = {
 casualties > 50000
 }
 }
 days_re_enable = 30
 fire_only_once = no
 cost = 50
 days_remove = 70
 modifier = {
 war_support_factor = 0.05
 mobilization_speed = 0.15
 resistance_growth = -0.3
 }
 remove_effect = {
 add_power_balance_value = {
    id = GER_power_balance_ss
    value = -0.15
	}
 }
 }
 
 GER_study_the_blitzkrieg = {
 icon = GFX_decision_generic_operation
 available = {
 FRA = {
 has_capitulated = yes
 }
 }
 cost = 50
 fire_only_once = no
 days_re_enable = 30
 days_remove = 30
 modifier = {
 experience_gain_army = 0.15
 experience_gain_air = 0.15
 }
 remove_effect = {
 add_power_balance_value = {
    id = GER_power_balance_ss
    value = 0.1
	}
 
 }
 }
 GER_maneuver_warfare = {
 icon = GFX_decision_generic_tank
 available = {
 }
 cost = 50
 fire_only_once = no
 days_re_enable = 30
 days_remove = 50
 modifier = {
 army_speed_factor = 0.1
 breakthrough_factor = 0.05
 army_attack_factor = 0.1
 army_defence_factor = -0.2
 }
 remove_effect = {
 add_power_balance_value = {
    id = GER_power_balance_ss
    value = 0.1
	}
 }
 }
 GER_give_power_to_the_general_staff = {
 icon = GFX_decision_generic_army_support
 available = {
 GER = { 
  has_war_with = SOV
 }
 }
 cost = 50
 fire_only_once = no
 days_re_enable = 30
 days_remove = 70
 modifier = {
 max_planning_factor = 0.15
 planning_speed = 0.1
 }
 remove_effect = {
 add_power_balance_value = {
    id = GER_power_balance_ss
    value = 0.1
	}
 }
 }
 GER_desperate_defence = {
 icon = GFX_decision_generic_nationalism
 available = {
 GER = { 
  surrender_progress > 0.01
 }
 }
 cost = 50
 fire_only_once = no
 days_re_enable = 100
 days_remove = 70
 modifier = {
 weekly_manpower = -10000
 army_core_defence_factor = 0.5
 }
 remove_effect = {
 add_power_balance_value = {
    id = GER_power_balance_ss
    value = -0.25
	}
 }
 }
 
}

GER_seize_rk_industry_category = {
 seize_rk_factory = {
 icon = GFX_decision_generic_merge_plant_materiel
 fire_only_once = yes
 available = {
 OR = {
 RMO = {
 exists = yes
 }
 
 RKK = {
 exists = yes
 }
 }
 }
 days_remove = 30
 remove_effect = {
 5 = {
    add_extra_state_shared_building_slots = 4
    add_building_construction = {
        type = industrial_complex
        level = 4
        instant_build = yes
    }
 
 }
 763 = {
    add_extra_state_shared_building_slots = 4
    add_building_construction = {
        type = arms_factory
        level = 4
        instant_build = yes
    }
 
 }
 }
 }


}

GER_four_year_plan_category = {
 GER_finish_plan_mission = {
 icon = GFX_decision_generic_construction
 activation = {
 GER = {
  has_completed_focus = GER_four_year_plan
  has_war = no
  NOT = {
  has_idea = GER_four_year_plan_finished
  has_country_flag = plan_finished
  }
 }
 tag = GER
 }
 available = {
 GER = {
 has_war = yes
 }
 }
 days_mission_timeout = 1440
 timeout_effect = {
 add_timed_idea = {
 idea = GER_four_year_plan_finished
 days = 520
 }
 set_country_flag = plan_finished
 }
 complete_effect = {
 set_country_flag = plan_finished
 }
 }
 
 GER_lighten_mefo = {
 icon = GFX_decision_ger_mefo_bills
 available = {
 GER = {
 hidden_trigger = {
 OR = {
 has_idea = GER_mefo_bills_1
 has_idea = GER_mefo_bills_2
 has_idea = GER_mefo_bills_3
 has_idea = GER_mefo_bills_4
 has_idea = GER_mefo_bills_5
 has_idea = GER_mefo_bills_6
 has_idea = GER_mefo_bills_7
 has_idea = GER_mefo_bills_8
 has_idea = GER_mefo_bills_9
 has_idea = GER_mefo_bills_10
 has_idea = GER_mefo_bills_11
 has_idea = GER_mefo_bills_12
 has_idea = GER_mefo_bills_13
 has_idea = GER_mefo_bills_14
 has_idea = GER_mefo_bills_15
 has_idea = GER_mefo_bills_16
 has_idea = GER_mefo_bills_17
 has_idea = GER_mefo_bills_18
 }
 }
 has_active_mission = GER_finish_plan_mission
 }
 }
 days_remove = 70
 days_re_enable = 70
 modifier = {
 consumer_goods_factor = 0.05
 political_power_cost = -0.3
 }
 }
 
 GER_establish_civillian_factory = {
 available = {
 has_active_mission = GER_finish_plan_mission
 }
 icon = GFX_decision_generic_merge_plant_materiel
 cost = 50
 days_remove = 60
 days_re_enable = 100
 modifier = {
 consumer_goods_factor = 0.02
 }
 remove_effect = {
 add_days_mission_timeout = {
    mission = GER_finish_plan_mission
    days = -100
 }
 51 = {
    add_extra_state_shared_building_slots = 1
    add_building_construction = {
        type = industrial_complex
        level = 1
        instant_build = yes
    }
    }
 }
 
 }
 
 GER_establish_military_factory = {
 available = {
 has_active_mission = GER_finish_plan_mission
 }
 icon = GFX_decision_generic_merge_plant_tank
 cost = 50
 days_remove = 60
 days_re_enable = 100
 modifier = {
 consumer_goods_factor = 0.02
 industrial_capacity_factory = 0.05
 }
 remove_effect = {
 add_days_mission_timeout = {
    mission = GER_finish_plan_mission
    days = -100
 }
 55 = {
    add_extra_state_shared_building_slots = 1
    add_building_construction = {
        type = arms_factory
        level = 1
        instant_build = yes
    }
    }
 }
 
 }
 
 GER_synthetic_rubber = {
 available = {
 has_active_mission = GER_finish_plan_mission
 }
 icon = GFX_decision_generic_wreckers
 cost = 50
 days_remove = 60
 days_re_enable = 100
 modifier = {
 consumer_goods_factor = 0.02
 }
 remove_effect = {
 add_days_mission_timeout = {
    mission = GER_finish_plan_mission
    days = -100
 }
 59 = {
    add_extra_state_shared_building_slots = 1
    add_building_construction = {
        type = synthetic_refinery
        level = 1
        instant_build = yes
    }
    }
 }
 
 }
 
 GER_construct = {
 available = {
 has_active_mission = GER_finish_plan_mission
 }
 icon = GFX_decision_hol_exchange_intelligence_data
 cost = 50
 days_remove = 60
 days_re_enable = 100
 modifier = {
 consumer_goods_factor = 0.02
 production_speed_buildings_factor = 0.1
 }
 remove_effect = {
 add_days_mission_timeout = {
    mission = GER_finish_plan_mission
    days = -100
 }
 }
 
 }
 
 GER_take_loans = {
 available = {
 has_active_mission = GER_finish_plan_mission
 }
 icon = GFX_decision_hol_attract_foreign_investors
 days_remove = 70
 days_re_enable = 100
 modifier = {
 consumer_goods_factor = -0.05
 political_power_cost = 0.3
 }
 
 }
 
 

}

