wrw_preventwar_category = {

	mission_preventwar = {
	
		activation = {
			GER = {
				has_country_flag = economic_crisis_ger
				has_government = fascism
			}
		}
	
		available = {
			always = no
		}
	
		priority = 500
		
		is_good = no
		
		days_mission_timeout = 9999
		
		fire_only_once = yes
		
		cancel_trigger = {
			AND = {
				custom_trigger_tooltip = {
					tooltip = GER_1_Progress_85
					check_variable = { GER_1_Progress > 84 }
				}
				custom_trigger_tooltip = {
					tooltip = GER_2_Progress_85
					check_variable = { GER_2_Progress > 84 }
				}
				custom_trigger_tooltip = {
					tooltip = GER_3_Progress_85
					check_variable = { GER_3_Progress > 84 }
				}
				custom_trigger_tooltip = {
					tooltip = GER_economy_is_fine
					check_variable = { GER_Collapse_var = 0}
				}
			}
		}
		
		timeout_effect = {
		
			GER = {
				clr_country_flag = economic_crisis_ger
			}
		
			GER = {
				country_event = {
					id = post_war.101
					days = 1
				}
			}
			
		}
		
		cancel_effect = {
			GER = {
				clr_country_flag = economic_crisis_ger
			}
			
			hidden_effect = {
				GER = {
					country_event = {
						id = ger_preventwar.2
						days = 2
					}
				}
			}
		}
	
	}
	
	mission_progress_2_minus = {
	
		icon = POL_looming_peasants_strike
	
		available = {
			always = no
		}
		
		activation = {
			GER = {
				has_country_flag = economic_crisis_ger
			}
		}
	
		priority = 471
		
		is_good = no
		
		days_mission_timeout = 45
		
		days_re_enable = 10
		
		fire_only_once = no
		
		cancel_trigger = {
		}
		
		timeout_effect = {
			custom_effect_tooltip = GER_2_Progress_minus_15
			add_to_variable = {GER_2_Progress = -15}
			GER_progressbar_var = yes
		}
	
	}
	
	mission_progress_4_minus = {
	
		icon = border_war
	
		available = {
			always = no
		}
		
		activation = {
			GER = {
				has_country_flag = economic_crisis_ger
			}
		}
	
		priority = 471
		
		is_good = no
		
		days_mission_timeout = 45
		
		days_re_enable = 10
		
		fire_only_once = no
		
		cancel_trigger = {
		}
		
		timeout_effect = {
			custom_effect_tooltip = GER_4_Progress_minus_15
			add_to_variable = {GER_4_Progress = -15}
			GER_progressbar_var = yes
		}
	
	}

	propaganda_volk = { 
	
		priority = 12

		icon = eng_propaganda_campaigns
		cost = 75
		allowed = {
			OR = {
				original_tag = GER
			}
		}

		available = {
		    is_subject = no		
		}
		
		
		
		visible = {
			AND = {
				GER = {
					has_country_flag = economic_crisis_ger
				}
				original_tag = GER
			}
		}
		fire_only_once = no
		
		ai_will_do = {
			factor = 50
		}

		complete_effect = {
				custom_effect_tooltip = GER_2_Progress_15
				add_to_variable = {GER_2_Progress = 15}
				GER_progressbar_var = yes
			}
			
		days_re_enable = 45
			
		}
		
	culture_volk = { 
	
		priority = 11

		icon = generic_nationalism
		cost = 85
		allowed = {
			OR = {
				original_tag = GER
			}
		}

		available = {
		    is_subject = no		
		}
		
		
		
		visible = {
			OR = {
				original_tag = GER
			}
		}
		fire_only_once = no
		
		ai_will_do = {
			factor = -500
		}

		complete_effect = {
				custom_effect_tooltip = GER_2_Progress_30
				add_to_variable = {GER_2_Progress = 30}
				GER_progressbar_var = yes
			}
			
		days_re_enable = 45
			
	}
	
	ger_army_chistka_mal = { 
	
		priority = 5

		icon = generic_military
		cost = 75
		allowed = {
			OR = {
				original_tag = GER
			}
		}

		available = {
		    is_subject = no		
		}
		
		
		
		visible = {
			OR = {
				original_tag = GER
			}
		}
		fire_only_once = no
		
		ai_will_do = {
			factor = -10
		}

		complete_effect = {
				custom_effect_tooltip = GER_1_Progress_15
				add_to_variable = {GER_1_Progress = 15}
				GER_progressbar_var = yes
				add_manpower = -900
			}
			
		days_re_enable = 60
			
		}
		
		
		
		ger_army_chistka_big = { 
	
			priority = 4

			icon = generic_military
			cost = 75
			allowed = {
				OR = {
					original_tag = GER
				}
			}

			available = {
				is_subject = no		
			}
			
			
			
			visible = {
				OR = {
					original_tag = GER
				}
			}
			fire_only_once = no
			
			ai_will_do = {
				factor = 50
			}

			complete_effect = {
					custom_effect_tooltip = GER_1_Progress_30
					add_to_variable = {GER_1_Progress = 30}
					GER_progressbar_var = yes
					add_manpower = -3000
				}
				
			days_re_enable = 40
			
		}
		
		ger_reichstag_chistka = { 
	
			priority = 3

			icon = SOV_place_hq_exiles
			cost = 60
			allowed = {
				OR = {
					original_tag = GER
				}
			}

			available = {
				is_subject = no		
			}
			
			
			
			visible = {
				OR = {
					original_tag = GER
				}
			}
			fire_only_once = no
			
			ai_will_do = {
				factor = 50
			}

			complete_effect = {
					custom_effect_tooltip = GER_3_Progress_30
					add_to_variable = {GER_3_Progress = 30}
					GER_progressbar_var = yes
					add_manpower = -15
				}
				
			days_re_enable = 65
			
		}
		
		ger_reichstag_sobr = { 
	
			priority = 0

			icon = ger_reichskommissariats
			allowed = {
				OR = {
					original_tag = GER
				}
			}

			available = {
				is_subject = no		
			}
			
			
			
			visible = {
				OR = {
					original_tag = GER
				}
			}
			fire_only_once = no
			
			ai_will_do = {
				factor = 50
			}

			complete_effect = {
					add_political_power = 200
					custom_effect_tooltip = GER_3_Progress_minus_15
					add_to_variable = {GER_3_Progress = -15}
					GER_progressbar_var = yes
				}
				
			days_re_enable = 90
			
		}
		
		ger_find_active_cells_wermacht = { 
		
			priority = 2

			icon = SWI_elect_confederation_president
			cost = 45
			allowed = {
				OR = {
					original_tag = GER
				}
			}

			available = {
				is_subject = no		
			}
			
			
			
			visible = {
				OR = {
					original_tag = GER
				}
			}
			fire_only_once = no
			
			ai_will_do = {
				factor = 50
			}

			complete_effect = {
					custom_effect_tooltip = GER_4_Progress_15
					add_to_variable = {GER_4_Progress = 15}
					GER_progressbar_var = yes
					custom_effect_tooltip = GER_1_Progress_minus_15
					add_to_variable = {GER_1_Progress = -15}
					add_manpower = -150
				}
				
			days_re_enable = 65
				
		}
		
		ger_use_spions = { 
		
			priority = 1

			icon = SWI_expand_covert_operations
			cost = 125
			allowed = {
				OR = {
					original_tag = GER
				}
			}

			available = {
				is_subject = no		
			}
			
			
			
			visible = {
				OR = {
					original_tag = GER
				}
			}
			fire_only_once = no
			
			ai_will_do = {
				factor = 50
			}

			complete_effect = {
					custom_effect_tooltip = GER_4_Progress_30
					add_to_variable = {GER_4_Progress = 30}
					GER_progressbar_var = yes
					custom_effect_tooltip = GER_3_Progress_minus_15
					add_to_variable = {GER_3_Progress = -15}
					
				}
				
			days_re_enable = 175
				
		}
		
		ger_army_narot = { 
	
			priority = 100

			icon = ger_military_buildup
			cost = 130
			allowed = {
				OR = {
					original_tag = GER
				}
			}

			available = {
				is_subject = no		
				custom_trigger_tooltip = {
					tooltip = GER_2_Progress_85
					check_variable = { GER_2_Progress > 84 }
				}
			}
			
			
			
			visible = {
				check_variable = { GER_Collapse_var > 0 }
			}
			fire_only_once = no
			
			ai_will_do = {
				factor = 0
			}

			complete_effect = {
					add_manpower = -10000
					add_command_power = -15
					add_stability = -0.1
					custom_effect_tooltip = GER_2_Progress_minus_50
					add_to_variable = {GER_2_Progress = -100}
					GER_progressbar_var = yes
					
					if = {
						limit = {
							has_idea = GER_Collapse_10
							check_variable = {GER_Collapse_var = 10}
						}
						swap_ideas = {
							remove_idea = GER_Collapse_10
							add_idea = GER_Collapse_9
						}
					}
						
					
					else_if = {
						limit = {
							has_idea = GER_Collapse_9
							check_variable = {GER_Collapse_var = 9}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_9
							add_idea = GER_Collapse_8
						}
						
					}
					
					else_if = {
						limit = {
							has_idea = GER_Collapse_8
							check_variable = {GER_Collapse_var = 8}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_8
							add_idea = GER_Collapse_7
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_7
							check_variable = {GER_Collapse_var = 7}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_7
							add_idea = GER_Collapse_6
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_6
							check_variable = {GER_Collapse_var = 6}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_6
							add_idea = GER_Collapse_5
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_5
							check_variable = {GER_Collapse_var = 5}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_5
							add_idea = GER_Collapse_4
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_4
							check_variable = {GER_Collapse_var = 4}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_4
							add_idea = GER_Collapse_3
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_3
							check_variable = {GER_Collapse_var = 3}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_3
							add_idea = GER_Collapse_2
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_2
							check_variable = {GER_Collapse_var = 2}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_2
							add_idea = GER_Collapse_1
						}
					}
					
					else_if = {
						limit = {
							has_idea = GER_Collapse_1
							check_variable = {GER_Collapse_var = 1}
						}
						
						remove_ideas = GER_Collapse_1
					}
					add_to_variable = {GER_Collapse_var = -1}
				}
				
			days_re_enable = 1
			
		}
		
		ger_army_demobilisation = { 
	
			priority = 101

			icon = generic_disband_irregulars 
			cost = 130
			allowed = {
				OR = {
					original_tag = GER
				}
			}

			available = {
				is_subject = no

				custom_trigger_tooltip = {
					tooltip = GER_1_Progress_85
					check_variable = { GER_1_Progress > 84 }
				}
			}
			
			
			
			visible = {
				check_variable = { GER_Collapse_var > 0 }
			}
			fire_only_once = no
			
			ai_will_do = {
				factor = 0
			}

			complete_effect = {
					add_command_power = -45
					add_war_support = -0.15
					add_stability = 0.05
					custom_effect_tooltip = GER_1_Progress_minus_50
					custom_effect_tooltip = GER_2_Progress_15
					add_to_variable = {GER_1_Progress = -100}
					add_to_variable = {GER_2_Progress = 15}
					add_equipment_to_stockpile = {
						type = infantry_equipment
						amount = -20000
						producer = GER
					}
					GER_progressbar_var = yes
					
					if = {
						limit = {
							has_idea = GER_Collapse_10
						}
						swap_ideas = {
							remove_idea = GER_Collapse_10
							add_idea = GER_Collapse_9
						}
					}
						
					
					else_if = {
						limit = {
							has_idea = GER_Collapse_9
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_9
							add_idea = GER_Collapse_8
						}
						
					}
					
					else_if = {
						limit = {
							has_idea = GER_Collapse_8
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_8
							add_idea = GER_Collapse_7
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_7
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_7
							add_idea = GER_Collapse_6
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_6
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_6
							add_idea = GER_Collapse_5
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_5
							check_variable = {GER_Collapse_var = 5}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_5
							add_idea = GER_Collapse_4
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_4
							check_variable = {GER_Collapse_var = 4}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_4
							add_idea = GER_Collapse_3
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_3
							check_variable = {GER_Collapse_var = 3}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_3
							add_idea = GER_Collapse_2
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_2
							check_variable = {GER_Collapse_var = 2}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_2
							add_idea = GER_Collapse_1
						}
					}
					
					else_if = {
						limit = {
							has_idea = GER_Collapse_1
							check_variable = {GER_Collapse_var = 1}
						}
						
						remove_ideas = GER_Collapse_1
					}
					add_to_variable = {GER_Collapse_var = -1}
				}
				
			days_re_enable = 1
			
		}
		
		ger_reichskommissariats = { 
	
			priority = 30

			icon = generic_disband_irregulars 
			cost = 160
			allowed = {
				OR = {
					original_tag = GER
				}
			}

			available = {
				is_subject = no

				custom_trigger_tooltip = {
					tooltip = GER_4_Progress_85
					check_variable = { GER_4_Progress > 84 }
				}
			}
			
			
			
			visible = {
				check_variable = { GER_Collapse_var > 0 }
			}
			fire_only_once = no
			
			ai_will_do = {
				factor = 0
			}

			complete_effect = {
					add_command_power = -15
					add_stability = -0.05
					custom_effect_tooltip = GER_4_Progress_minus_50
					add_to_variable = {GER_4_Progress = -100}
					GER_progressbar_var = yes
					
					if = {
						limit = {
							has_idea = GER_Collapse_10
							check_variable = {GER_Collapse_var = 10}
						}
						swap_ideas = {
							remove_idea = GER_Collapse_10
							add_idea = GER_Collapse_9
						}
					}
						
					
					else_if = {
						limit = {
							has_idea = GER_Collapse_9
							check_variable = {GER_Collapse_var = 9}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_9
							add_idea = GER_Collapse_8
						}
						
					}
					
					else_if = {
						limit = {
							has_idea = GER_Collapse_8
							check_variable = {GER_Collapse_var = 8}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_8
							add_idea = GER_Collapse_7
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_7
							check_variable = {GER_Collapse_var = 7}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_7
							add_idea = GER_Collapse_6
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_6
							check_variable = {GER_Collapse_var = 6}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_6
							add_idea = GER_Collapse_5
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_5
							check_variable = {GER_Collapse_var = 5}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_5
							add_idea = GER_Collapse_4
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_4
							check_variable = {GER_Collapse_var = 4}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_4
							add_idea = GER_Collapse_3
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_3
							check_variable = {GER_Collapse_var = 3}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_3
							add_idea = GER_Collapse_2
						}
						
					}
					else_if = {
						limit = {
							has_idea = GER_Collapse_2
							check_variable = {GER_Collapse_var = 2}
						}
						
						swap_ideas = {
							remove_idea = GER_Collapse_2
							add_idea = GER_Collapse_1
						}
					}
					
					else_if = {
						limit = {
							has_idea = GER_Collapse_1
							check_variable = {GER_Collapse_var = 1}
						}
						
						remove_ideas = GER_Collapse_1
					}
					add_to_variable = {GER_Collapse_var = -1}
				}
				
			days_re_enable = 1
			
		}
		
}