add_namespace = goering_peace_events
### Peace Deals ###

country_event = { # Moskowien Peace Deal
	id = goering_peace_events.1
	title = goering_peace_events.1.t
	desc = goering_peace_events.1.desc
	picture = GFX_report_event_hans_krebs
	fire_only_once = yes
	is_triggered_only = yes

	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.1"
		hidden_effect = {
			clr_country_flag = GGR_operation_locked
			set_temp_variable = { Victory_ID = 101 }
			set_temp_variable = { Victory_Points = TNO_Cold_War_GUI_Victory_Points^101 }
			add_to_temp_variable = { Victory_Points = 75 }
			if = {
				limit = {
					GGR_war_plan_A_completed = yes
				}
				set_temp_variable = { Victory_Outcome = 5 }
				if = {
					limit = {
						OR = {
							SER = { is_subject_of = ITA }
							BUL = { is_subject_of = ITA }
							GRE = { is_subject_of = ITA }
							#ENG = { is_in_faction_with = USA }
						}
					}
					set_temp_variable = { Victory_Outcome = 4 }
				}
			}
			Cold_War_GUI_AddVictory = yes
			every_state = {
				limit = {
					OR = {
						is_core_of = TVR
					    is_core_of = LUF
					    is_core_of = RZH
					    is_core_of = NTI
					    is_core_of = OZM
					    is_core_of = SNP
					    is_core_of = OZL
					    is_core_of = VVV
					    is_core_of = PSK
					    is_core_of = PFT
					    is_core_of = SHI
					    is_core_of = OZT
					    is_core_of = NTA
					    is_core_of = ORL
					    is_core_of = RFS
					    is_core_of = OZO
					    is_core_of = POV
					    is_core_of = POP
					    is_core_of = OZP
					    is_core_of = OZA
					    is_core_of = PAU
					}
				}
				MCW = {
					transfer_state = PREV
					add_state_core = PREV
				}
			}
			set_division_template_lock = {
				division_template = "Ostlegion"
				is_locked = no
			}
			MCW = {
				set_variable = { national_debt = 0 }
				if = {
					limit = {
						NOT = { GER = { has_completed_focus = GGR_a_call_for_help } }
					}
					GER = {
						release_puppet = MCW
						country_event = { id = goering.heinrich.1 days = 2 }
					}
					GGR_set_up_RK_ROOT = yes
					promote_character = {
						character = MCW_hans_krebs
						ideology = national_socialism_idiosyncratic_nazism_subtype
					}
					add_ideas = {
						GGR_MCW_the_legacy
						GGR_MCW_the_vision
						GGR_MCW_the_plan
					}
				}
				else = {
					GGR_peacefully_transfer_moskowien = yes
				}
				drop_cosmetic_tag = yes
			}
			GER = {
				remove_ideas = {
					GGR_reluctant_soldiers
					GGR_reluctant_soldiers2
					GGR_reluctant_soldiers3
				}
				remove_dynamic_modifier = { modifier = GGR_operation_henry }
				GGR_clear_temporary_variables = yes
			}
		}
	}

	option = { #Chaos
		name = goering_peace_events.1.a
		GGR_decrease_militarist_loyalty_small = yes
		MCW = {
			add_stability = 0.1
		}
	}
}

country_event = { # Free Ukraine Peace Deal
	id = goering_peace_events.2
	title = goering_peace_events.2.t
	desc = goering_peace_events.2.desc
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.2"
	}
	option = { # puppet them
		name = goering_peace_events.2.a
		clr_country_flag = GGR_operation_locked
		hidden_effect = {
			set_temp_variable = { Victory_ID = 101 }
			set_temp_variable = { Victory_Points = TNO_Cold_War_GUI_Victory_Points^101 }
			add_to_temp_variable = { Victory_Points = 75 }
			GGR_determine_WPA_completion = yes
			Cold_War_GUI_AddVictory = yes
			UKR = {
				set_variable = { national_debt = 0 }
				clear_array = UKR_PS_Industrialist
				clear_array = UKR_PS_Bureaucrat
				clear_array = UKR_PS_Collaborator
				clear_array = UKR_PS_Militarist
				clr_country_flag = UKR_bb_enabled
				clr_country_flag = UKR_power_struggle_active
				remove_all_ideas = yes
				if = {
					limit = { exists = no }
					promote_character = UKR_eduard_wagner
					GGR_set_up_RK_ROOT = yes
				}
				else = { GGR_install_RK_with_no_changes = yes }
			}
			every_state = {
				limit = {
					is_core_of = POL
				}
				transfer_state_to = GER
				add_core_of = GER
			}
			if = {
				limit = {
					GGR_romania_conquered = yes
				}
				UKR = {
					transfer_state = 192
					transfer_state = 1966
					transfer_state = 1965
					transfer_state = 198
				}
			}
			if = {
				limit = {
					NOT = { country_exists = CRI }
				}
				every_state = {
					limit = {
						is_core_of = CRI
					}
					transfer_state_to = GER
					add_core_of = GER
				}
			}
			if = {
				limit = {
					CAU = {
						is_in_faction_with = GER
					}
				}
				CAU = {
					transfer_state = 234
					add_state_core = 234
				}
			}
			UKR = {
				UKR_bb_disable = yes
				GGR_transfer_general_RK_guy = yes
				remove_dynamic_modifier = { modifier = UKR_breadbasket_dynmod }
				every_state = {
					limit = {
						OR = {
							is_core_of = UKR
							is_core_of = FUK
							is_core_of = UKS
							is_core_of = BOV
						}
						NOT = {
							is_core_of = GER
							is_core_of = GGN
							is_core_of = POL
							is_core_of = CRI
						}
					}
					transfer_state_to = PREV
				}
				every_owned_state = {
					add_core_of = UKR
					cancel_resistance = yes
				}
			}
		}
	}
}

country_event = { # Hungary Peace Deal
	id = goering_peace_events.3
	title = goering_peace_events.3.t
	desc = goering_peace_events.3.desc
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.3"
		hidden_effect = {
			add_to_variable = { GGR_balkan_loot = 2 }
		}
	}

	option = { # RK
		name = goering_peace_events.3.a
		clr_country_flag = GGR_operation_locked
		hidden_effect = {
			set_temp_variable = { Victory_ID = 101 }
			set_temp_variable = { Victory_Points = TNO_Cold_War_GUI_Victory_Points^101 }
			add_to_temp_variable = { Victory_Points = 75 }
			GGR_determine_WPA_completion = yes
			Cold_War_GUI_AddVictory = yes
			if = {
				limit = { has_global_flag = goring_defeated_hun }
				ITA = {
					country_event = { id = ITA.5005 }
				}
			}
		}
	}
}

country_event = { # Romania Peace Deal
	id = goering_peace_events.4
	title = goering_peace_events.4.t
	desc = goering_peace_events.4.desc
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.4"
		hidden_effect = {
			add_to_variable = { GGR_balkan_loot = 2 }
			if = {
				limit = {
					has_completed_focus = GGR_fragile_handle_with_care
				}
				clr_country_flag = GGR_ploiesti_destroyed
			}
			remove_dynamic_modifier = { modifier = GGR_operation_tepes }
		}
	}

	option = { #RK
		name = goering_peace_events.4.a
		clr_country_flag = GGR_operation_locked
		hidden_effect = {
			set_temp_variable = { Victory_ID = 101 }
			set_temp_variable = { Victory_Points = TNO_Cold_War_GUI_Victory_Points^101 }
			add_to_temp_variable = { Victory_Points = 75 }
			GGR_determine_WPA_completion = yes
			Cold_War_GUI_AddVictory = yes
            if = {
				limit = { has_global_flag = goring_defeated_rom }
            	ITA = {
					country_event = { id = ITA.5003 }
				}
		    }
			every_state = {
				limit = {
					is_core_of = TNS
				}			
				if = {
					limit = {
						UKR = { is_in_faction_with = GER }
					}
					transfer_state_to = UKR
					add_core_of = UKR
				}
				else = { transfer_state_to = RKB }
			}
			RKB = {
				transfer_state = 1282
				add_state_core = 1282
				1282 = {
					remove_core_of = UKR
				}
			}
			if = {
				limit = { has_completed_focus = GGR_fragile_handle_with_care }
        		46 = {
            		remove_province_modifier = {
						static_modifiers = { GGR_fragile_oil_fields }
						province = {
							all_provinces = yes
						}
					}
        		}
			}
		}
	}
}
country_event = { # Brautigam Ukraine peace event
	id = goering_peace_events.5
	title = goering_peace_events.5.t
	desc = goering_peace_events.5.desc
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.5"
	}

	option = {
		name = goering_peace_events.5.a
		hidden_effect = {
			clr_country_flag = GGR_operation_locked
			set_temp_variable = { Victory_ID = 101 }
			set_temp_variable = { Victory_Points = TNO_Cold_War_GUI_Victory_Points^101 }
			add_to_temp_variable = { Victory_Points = 75 }
			GGR_determine_WPA_completion = yes
			Cold_War_GUI_AddVictory = yes
			UKR = {
				GGR_transfer_general_RK_guy = yes
				clr_country_flag = UKR_power_struggle_active
				clear_array = UKR_PS_Industrialist
				clear_array = UKR_PS_Bureaucrat
				clear_array = UKR_PS_Collaborator
				clear_array = UKR_PS_Militarist
				UKR_bb_disable = yes
				remove_dynamic_modifier = { modifier = UKR_breadbasket_dynmod }
				remove_all_ideas = yes
				if = {
					limit = { exists = no }
					promote_character = UKR_eduard_wagner
					GGR_set_up_RK_ROOT = yes
				}
				else = { GGR_install_RK_with_no_changes = yes }
			}
			every_state = {
				limit = {
					is_core_of = POL
				}
				transfer_state_to = GER
				add_core_of = GER
			}
			if = {
				limit = {
					GGR_romania_conquered = yes
				}
				UKR = {
					transfer_state = 192
					transfer_state = 1966
					transfer_state = 1965
					transfer_state = 198
				}
			}
			if = {
				limit = {
					NOT = { country_exists = CRI }
				}
				every_state = {
					limit = {
						is_core_of = CRI
					}
					transfer_state_to = GER
					add_core_of = GER
				}
			}
			if = {
				limit = {
					CAU = {
						is_in_faction_with = GER
					}
				}
				CAU = {
					transfer_state = 234
					add_state_core = 234
				}
			}
			UKR = {
				every_state = {
					limit = {
						OR = {
							is_core_of = UKR
							is_core_of = FUK
							is_core_of = UKS
							is_core_of = BOV
						}
						NOT = {
							is_core_of = GER
							is_core_of = GGN
							is_core_of = POL
							is_core_of = CRI
						}
					}
					transfer_state_to = PREV
				}
				every_owned_state = {
					add_core_of = UKR
				}
				every_owned_state = {
					cancel_resistance = yes
				}
			}
		}
	}
}

country_event = { # Iberia + Frente Azul Peace Deal
	id = goering_peace_events.6
	title = goering_peace_events.6.t
	desc = goering_peace_events.6.desc
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.6"
	}

	option = {
		name = goering_peace_events.6.a
		GGR_decrease_militarist_hawkishness_large = yes
		clr_country_flag = GGR_operation_locked
		hidden_effect = {
			GER = {
				if = {
					limit = { 
						NOT = {
							has_global_flag = Iberian_Wars
						}	
					}
					transfer_state = 702
				}
				set_temp_variable = { Victory_ID = 103 }
				set_temp_variable = { Victory_Points = 200 }
				set_temp_variable = { Victory_Outcome = 5 }
				set_temp_variable = { SeaZone_ID = 5 } # 5; Mediterranean
				Cold_War_GUI_PowerProjection_AddSeaZone = yes
				Cold_War_GUI_AddVictory = yes
				set_country_flag = GGR_iberia_conquered 
				GGR_clear_temporary_variables = yes
				set_variable = { GGR_iberia_loot = 2 }
				if = {
					limit = {
						FRA = { is_in_faction_with = GER }
					}
					RKM = { save_event_target_as = morrocco_annexer }
				}
				else = {
					NAF = { save_event_target_as = morrocco_annexer }
				}
				NAF = { #Algeria
					if = {
						limit = {
							SLG = { is_subject_of = IBR }
						}
						annex_country = {
							target = SLG
							transfer_troops = no
						}
					}
					GGR_set_up_RK_ROOT = yes
				}
				event_target:morrocco_annexer = {
					#Marrakech
					transfer_state = 462
					transfer_state = 1008
					transfer_state = 1153
					transfer_state = 1152
					transfer_state = 461
					transfer_state = 1150
					transfer_state = 1005
					transfer_state = 1151
					transfer_state = 1546
					transfer_state = 2112
					transfer_state = 2113
					transfer_state = 2114
					GGR_set_up_RK_ROOT = yes
				}
				459 = {
					if = {
						limit = {
							is_owned_by = GER
						}
						NAF = {
							transfer_state = 1006
							transfer_state = 459
							add_state_core = 459
							add_state_core = 1006
						}
					}	
				}
				GER = { #Navy transfer
					if = {
						limit = {
							NOT = { has_global_flag = Iberian_Wars }
						}
						IBR = { transfer_navy = { target = GER } }
					}
				}
				WAF = { #Westafrika
					transfer_state = 1010
					transfer_state = 1011
					transfer_state = 1158
					transfer_state = 1156
					transfer_state = 1155
					transfer_state = 1157
					transfer_state = 1009
					transfer_state = 699
					transfer_state = 1159
					transfer_state = 839
					transfer_state = 2116
					transfer_state = 2115
					if = {
						limit = { NOT = { has_global_flag = Iberian_Wars } }
						transfer_state = 296
					}
					GGR_set_up_RK_ROOT = yes
				}
				remove_dynamic_modifier = { modifier = GGR_fall_blau }
				remove_dynamic_modifier = { modifier = GGR_fall_blau2 }
				remove_dynamic_modifier = { modifier = GGR_fall_blau3 }
			}
			FZL = {
				add_core_effect = yes
				remove_ideas = {
					IBR_iberiawars_stage_one 
					IBR_iberiawars_stage_two
					IBR_iberiawars_stage_three
					IBR_iberiawars_stage_four
					IBR_iberiawars_stage_five
					Iberian_Wars_Major
					Iberian_Wars_Exhaustion_1
					Iberian_Wars_Exhaustion_2
					Iberian_Wars_Exhaustion_3
					Iberian_Wars_Exhaustion_4
					Iberian_Wars_Exhaustion_5
				}
			}
			FZL = { set_cosmetic_tag = SPS_unified }
			set_temp_variable = { target = FZL }
			TNO_clear_num_volunteers = yes
		}
	}
}

country_event = { # Serbia Peace Deal ( non yugo )
	id = goering_peace_events.7
	title = goering_peace_events.7.t
	desc = goering_peace_events.7.desc
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.7"
		hidden_effect = {
			add_to_variable = { GGR_balkan_loot = 2 }
		}
	}

	option = { # RK
		name = goering_peace_events.7.a
		hidden_effect = {
			clr_country_flag = GGR_operation_locked
			set_temp_variable = { Victory_ID = 101 }
			set_temp_variable = { Victory_Points = TNO_Cold_War_GUI_Victory_Points^101 }
			add_to_temp_variable = { Victory_Points = 75 }
			GGR_determine_WPA_completion = yes
			Cold_War_GUI_AddVictory = yes
			if = {
				limit = { has_global_flag = goring_defeated_ser }
				ITA = {
					country_event = { id = ITA.5004 }
				}
			}
		}
	}
}

country_event = { # Sweden Peace Deal
	id = goering_peace_events.8
	title = goering_peace_events.8.t
	desc = goering_peace_events.8.desc
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.8"
		hidden_effect = {
			add_to_variable = { GGR_scandinavia_loot = 2 }
		}
	}

	option = { # RK
		name = goering_peace_events.8.a
		hidden_effect = {
			clr_country_flag = GGR_operation_locked
			remove_dynamic_modifier = { modifier = GGR_fall_hansa }
			GGR_clear_temporary_variables = yes
			clear_variable = GGR_SWE_encryption_factor

			set_temp_variable = { Victory_ID = 101 }
			set_temp_variable = { Victory_Points = TNO_Cold_War_GUI_Victory_Points^101 }
			add_to_temp_variable = { Victory_Points = 75 }
			GGR_determine_WPA_completion = yes
			Cold_War_GUI_AddVictory = yes
			124 = {
			    if = {
				    limit = {
					    is_owned_by = SCN
			        }
				    GER = {
				        transfer_state = 124
					}	
				}	
			}
			if = {
				limit = {
					GGR_sweden_conquered = yes
					GGR_finland_conquered = yes
					GGR_norway_conquered = yes
				}
				complete_national_focus = GGR_scandinavian_liberation
			}
		}
	}
}

country_event = { # Netherlands Peace Deal
	id = goering_peace_events.9
	title = goering_peace_events.9.t
	desc = goering_peace_events.9.desc
	picture = GFX_report_event_GER_city_burning

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.9"
		hidden_effect = {
			GER = {
				GER_johann_von_kielmansegg = {
					set_nationality = HOL
				}
			}
		}
	}

	option = { # RK, then Annex
		name = goering_peace_events.9.a
		clr_country_flag = GGR_operation_locked
		HOL = {
			GER_johann_von_kielmansegg = {
				add_country_leader_role = {
					character = THIS
					promote_leader = yes
					country_leader = {
						ideology = national_socialism_stratocratic_nazism_subtype
						expire = "2000.1.1.1"
					}
				}
			}
		}
	}
}

country_event = { # Finland Peace Deal
	id = goering_peace_events.10
	title = goering_peace_events.10.t
	desc = goering_peace_events.10.desc
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.10"
		hidden_effect = {
			add_to_variable = { GGR_scandinavia_loot = 2 }
		}
	}

	option = { # RK
		name = goering_peace_events.10.a
		clr_country_flag = GGR_operation_locked
		hidden_effect = {
			set_temp_variable = { Victory_ID = 101 }
			set_temp_variable = { Victory_Points = TNO_Cold_War_GUI_Victory_Points^101 }
			add_to_temp_variable = { Victory_Points = 75 }
			GGR_determine_WPA_completion = yes
			Cold_War_GUI_AddVictory = yes
			if = {
				limit = {
					country_exists = MPR
				}
				random_country = {
					limit = {
						is_central_russian_nation = yes #if this revolt happened so only one west russian nation left so who cares
						exists = yes
					}
					annex_country = {
						target = MPR
						transfer_troops = no
					}
				}
			}
			ONG = {
				every_country = {
					limit = {
						is_central_russian_nation = yes
					}
					declare_war_on = {
						target = PREV
						type = annex_everything
					}
				}
			}
			SCN = {
				annex_country = {
					target = FIN
					transfer_troops = no
				}
				GGR_set_up_RK_ROOT = yes
			}
			GER = {
				remove_dynamic_modifier = { modifier = GGR_operation_lapland }
				GGR_clear_temporary_variables = yes
			}
			145 = {
			    if = {
				    limit = {
				        is_owned_by = SCN
			        }
				    GER = {
				        transfer_state = 145
					}	
				}
			}
			if = {
				limit = {
					GGR_sweden_conquered = yes
					GGR_finland_conquered = yes
					GGR_norway_conquered = yes
				}
				SCN = {
					add_timed_idea = {
						idea = GGR_stabilising_regime
						days = 730
					}
				}
			}
		}
	}
}

country_event = { # Norway Peace Deal
	id = goering_peace_events.11
	title = goering_peace_events.11.t
	desc = goering_peace_events.11.desc
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.11"
		hidden_effect = {
			add_to_variable = { GGR_scandinavia_loot = 2 }
		}
	}

	option = { # RK
		name = goering_peace_events.11.a
		clr_country_flag = GGR_operation_locked
		hidden_effect = {
			remove_ideas = GGR_operation_nordlicht
			set_temp_variable = { Victory_ID = 101 }
			set_temp_variable = { Victory_Points = TNO_Cold_War_GUI_Victory_Points^101 }
			add_to_temp_variable = { Victory_Points = 75 }
			GGR_determine_WPA_completion = yes
			Cold_War_GUI_AddVictory = yes
			94 = {
			    if = {
				    limit = {
					    is_owned_by = SCN
			        }
				    GER = {
				        transfer_state = 94
						add_state_core = 94
					}
				}
			}
			FIN = {
				if = {
					limit = {
						is_in_faction_with = GER
						exists = yes
					}
					transfer_state = 896
					add_state_core = 896
				}
			}
			if = {
				limit = {
					GGR_sweden_conquered = yes
					GGR_finland_conquered = yes
					GGR_norway_conquered = yes
				}
				complete_national_focus = GGR_scandinavian_liberation
			}
		}
	}
}

country_event = { # Bulgaria Peace Deal
	id = goering_peace_events.12
	title = goering_peace_events.12.t
	desc = goering_peace_events.12.desc
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.12"
		hidden_effect = {
			add_to_variable = { GGR_balkan_loot = 2 }
		}
	}

	option = { # RK
		name = goering_peace_events.12.a
		clr_country_flag = GGR_operation_locked
		hidden_effect = {
			set_temp_variable = { Victory_ID = 101 }
			set_temp_variable = { Victory_Points = TNO_Cold_War_GUI_Victory_Points^101 }
			add_to_temp_variable = { Victory_Points = 75 }
			GGR_determine_WPA_completion = yes
			Cold_War_GUI_AddVictory = yes
			if = {
				limit = { has_global_flag = goring_defeated_bul }
				ITA = {
					country_event = { id = ITA.5006 }
				}
			}
			set_temp_variable = { SeaZone_ID = 5 } # 5; Mediterranean
			Cold_War_GUI_PowerProjection_AddSeaZone = yes
		}
	}
}

country_event = { # Russia Peace Deal
	id = goering_peace_events.130
	hidden = yes

	is_triggered_only = yes
	
	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.130"
		if = {
			limit = {
				all_country = {
					if = {
						limit = {
							OR = {
								is_russian_nation = yes
								is_after_midninght_russian_nation = yes
							}
						}
						OR = {
							exists = no
							has_capitulated = yes
							is_in_faction_with = GER
						}
					}
				}
			}
			GER = { country_event = goering_peace_events.13 }
		}
	}

	option = {
		name = goering_peace_events.13.a
	}
}

country_event = { # Russia Peace Deal
	id = goering_peace_events.13
	title = goering_peace_events.13.t
	desc = goering_peace_events.13.desc
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes
	
	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.13"
		set_temp_variable = { Victory_ID = 102 }
		set_temp_variable = { Victory_Points = 200 }
		set_temp_variable = { Victory_Outcome = 5 }
		Cold_War_GUI_AddVictory = yes
		add_to_variable = { GGR_moskowien_loot = 4 }
		set_variable = { GGR_war_timer_var = 200 }
		hidden_effect = {
			every_state = {
				limit = {
					has_state_flag = GGR_russian_state_resistance_flag
				}
				clr_state_flag = GGR_russian_state_resistance_flag
				remove_province_modifier = {
					static_modifiers = { GGR_russian_state_resistance }
					province = {
						all_provinces = yes
					}
				}
			}
		}
		GGR_conquered_russia = yes
	}

	option = {
		name = goering_peace_events.13.a
		custom_effect_tooltip = GOR_russia_conquered
	}
}

country_event = { # The United Kingdom Peace Deal
	id = goering_peace_events.14
	title = goering_peace_events.14.t
	desc = goering_peace_events.14.desc
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.14"}

	option = { # Halder 
		name = goering_peace_events.14.a
		trigger = { 
			has_game_rule = { rule = BRITAIN_CONTENT_STATUS option = BRITAIN_OLD }
		}
		GGR_decrease_militarist_loyalty = yes
		GGR_decrease_militarist_power = yes
		hidden_effect = {
			GER = {
				add_state_claim = 1322
				1322 = { set_compliance = 70 }
				add_state_claim = 1296
				1296 = { set_compliance = 70 }
				add_state_claim = 1322
				123 = { set_compliance = 70 }
				add_state_claim = 123
				1375 = { set_compliance = 70 }
				add_state_claim = 1375
			}
			BRI = {
				GGR_set_up_RK_ROOT = yes
			}
			GGR_Reload_main = yes
		}
	}
	option = { # Kinzel 
		name = goering_peace_events.14.b
		GGR_increase_militarist_loyalty = yes
		GGR_increase_militarist_power = yes
		hidden_effect = {
			BRI = {
				promote_character = BRI_Eberhard_Kinzel
				GGR_set_up_RK_ROOT = yes
			}
			GGR_Reload_main = yes
			if = {
				limit = { has_global_flag = FEN_GF_WonECW }
				CAN = {
				    transfer_state = 690
					transfer_state = 693
					transfer_state = 696
					transfer_state = 703
					transfer_state = 704
					transfer_state = 720
					transfer_state = 299
				}
			}
		}
	}
	option = {
		name = goering_peace_events.14.c
		trigger = {
			NOT = {
				has_game_rule = { rule = BRITAIN_CONTENT_STATUS option = BRITAIN_OLD }
			}
		}
		GGR_decrease_militarist_loyalty = yes
		GGR_decrease_militarist_power = yes
		hidden_effect = {
			every_state = {
				limit = {
					is_owned_by = GER
					NOT = {
						is_claimed_by = GER
					}
					OR = {
						is_core_of = ENG
						is_core_of = FEN
						AND = {
							WAL = { exists = no }
							is_core_of = WAL
						}
						AND = {
							SCO = { exists = no }
							is_core_of = SCO
						}
					}
					NOT = { 
						state = 1994
					}
				}
				BRI = {
					transfer_state = PREV
				}
			}
			BRI = {
				GGR_set_up_RK_ROOT = yes
				ENG = {
					ENG_Rudolf_Wulf = {
						set_nationality = BRI
					}		
				}		
				add_country_leader_role = {
					character = ENG_Rudolf_Wulf
					promote_leader = yes
					country_leader = {
						ideology = national_socialism_stratocratic_nazism_subtype
						expire = "2000.1.1.1"
					}
				}
			}
			GGR_Reload_main = yes
			if = {
				limit = { has_global_flag = FEN_GF_WonECW }
				CAN = {
				    transfer_state = 690
					transfer_state = 693
					transfer_state = 696
					transfer_state = 703
					transfer_state = 704
					transfer_state = 720
					transfer_state = 299
				}
			}
		}
	}
}

country_event = { # The British Isles Peace Deal
	id = goering_peace_events.15
	title = goering_peace_events.15.t
	desc = goering_peace_events.15.desc
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.15"
	}

	option = { # Wooh
		name = goering_peace_events.15.a
		trigger = {
			NOT = {
				is_in_faction_with = WAL
			}
		}
		clr_country_flag = GGR_operation_locked
		SCO = { transfer_navy = { target = GER } }
		IRE = { transfer_navy = { target = GER } }
	    ULS = { transfer_navy = { target = GER } }
		WAL = { transfer_navy = { target = GER } }
		set_temp_variable = { Victory_ID = 101 }
		set_temp_variable = { Victory_Points = TNO_Cold_War_GUI_Victory_Points^101 }
		add_to_temp_variable = { Victory_Points = 100 }
		GGR_determine_WPA_completion = yes
		Cold_War_GUI_AddVictory = yes
	}
	option = {
		name = goering_peace_events.15.b
		trigger = {
			is_in_faction_with = WAL
		}
		clr_country_flag = GGR_operation_locked
		set_temp_variable = { Victory_ID = 101 }
		set_temp_variable = { Victory_Points = TNO_Cold_War_GUI_Victory_Points^101 }
		add_to_temp_variable = { Victory_Points = 75 }
		GGR_determine_WPA_completion = yes
		Cold_War_GUI_AddVictory = yes
	}
}

country_event = { # Kaukasia Peace Deal
	id = goering_peace_events.16
	title = goering_peace_events.16.t
	desc = goering_peace_events.16.desc
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.16"}

	option = {
		name = goering_peace_events.16.a
		hidden_effect = {
			clr_country_flag = GGR_operation_locked
			set_temp_variable = { Victory_ID = 101 }
			set_temp_variable = { Victory_Points = TNO_Cold_War_GUI_Victory_Points^101 }
			add_to_temp_variable = { Victory_Points = 75 }
			remove_dynamic_modifier = { modifier = GGR_fall_schwarzes_gold }
			GGR_clear_temporary_variables = yes
			GGR_determine_WPA_completion = yes
			Cold_War_GUI_AddVictory = yes
			if = {
				limit = {
					UKR = { owns_state = 234 }
				}
				CAU = {
					transfer_state = 234
				}
			}
			CAU = {
				econ_join_sphere_GER = yes
				GGR_set_up_RK_ROOT = yes
				CAU_alfred_becker = {
					promote_character = { ideology = national_socialism_stratocratic_nazism_subtype }
				}
				set_cosmetic_tag = CAU_reichskolonie
				remove_ideas = CAU_disunited_army

				#Just making sure no resource rights left
				every_owned_state = {
                	BGR = {
                    	remove_resource_rights = PREV
                	}
                	GGR = {
                    	remove_resource_rights = PREV
                	}
				}
			}
		}
	}
}

country_event = { # Iberia Peace Deal
	id = goering_peace_events.17
	title = goering_peace_events.17.t
	desc = goering_peace_events.17.desc
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.17"}

	option = {
		name = goering_peace_events.17.a
		hidden_effect = {
			set_temp_variable = { Victory_ID = 103 }
			set_temp_variable = { Victory_Points = 200 }
			set_temp_variable = { Victory_Outcome = 5 }
			set_temp_variable = { SeaZone_ID = 5 } # 5; Mediterranean
		    Cold_War_GUI_PowerProjection_AddSeaZone = yes
			Cold_War_GUI_AddVictory = yes
			
        
			clear_variable = TNO_Cold_War_GUI_Victory_Entry^18
			clear_variable = TNO_Cold_War_GUI_Victory_Outcome^18
			clear_variable = TNO_Cold_War_GUI_Victory_Points^18
			
			Cold_War_GUI_CalculateDisplayArrays = yes
			Cold_War_GUI_Score_Calculation = yes

			USA = {
				clear_variable = TNO_Cold_War_GUI_Victory_Entry^18
				clear_variable = TNO_Cold_War_GUI_Victory_Outcome^18
				clear_variable = TNO_Cold_War_GUI_Victory_Points^18
				
				Cold_War_GUI_CalculateDisplayArrays = yes
				Cold_War_GUI_Score_Calculation = yes
			}

			JAP = {				
				clear_variable = TNO_Cold_War_GUI_Victory_Entry^18
				clear_variable = TNO_Cold_War_GUI_Victory_Outcome^18
				clear_variable = TNO_Cold_War_GUI_Victory_Points^18
				
				Cold_War_GUI_CalculateDisplayArrays = yes
				Cold_War_GUI_Score_Calculation = yes
			}

			GER = { clr_country_flag = GGR_operation_locked set_country_flag = GGR_iberia_conquered }
			GBQ = { #Baskenland
				transfer_state = 172
				transfer_state = 993
				transfer_state = 984
				GGR_set_up_RK_ROOT = yes
			}
			RKG = { #Galicia
				transfer_state = 171
				transfer_state = 982
				GGR_set_up_RK_ROOT = yes
			}
			GKA = { #Katalonien
				transfer_state = 167
				transfer_state = 166
				transfer_state = 985
				transfer_state = 165
				transfer_state = 1012
				transfer_state = 986
				transfer_state = 987
				transfer_state = 1378
				GGR_set_up_RK_ROOT = yes
			}
			ADS = { #Andalusien
				transfer_state = 168
				transfer_state = 1002
				transfer_state = 1001
				transfer_state = 169
				transfer_state = 173
				transfer_state = 988
				transfer_state = 1003
				transfer_state = 1701
				GGR_set_up_RK_ROOT = yes
			}
			GCA = { #Castilien
				transfer_state = 174
				transfer_state = 996
				transfer_state = 170
				transfer_state = 41
				transfer_state = 995
				transfer_state = 994
				transfer_state = 176
				transfer_state = 999
				transfer_state = 175
				transfer_state = 1013
				transfer_state = 983
			    transfer_state = 1702
				GGR_set_up_RK_ROOT = yes
			}
			GPG = { #Portugal
				transfer_state = 180
				transfer_state = 997
				transfer_state = 998
				transfer_state = 181
				transfer_state = 1000
				transfer_state = 112
				transfer_state = 179
				transfer_state = 1004
				transfer_state = 1672
				transfer_state = 1673
				transfer_state = 1674
				GGR_set_up_RK_ROOT = yes
			}
			if = {
				limit = {
					FRA = { is_in_faction_with = GER }
				}
				RKM = { save_global_event_target_as = morrocco_annexer }
			}
			else = {
				NAF = { save_global_event_target_as = morrocco_annexer }
			}
			NAF = { #Algeria
				if = {
					limit = {
						SLG = { is_subject_of = IBR }
					}
					annex_country = {
						target = SLG
						transfer_troops = no
					}
				}
				GGR_set_up_RK_ROOT = yes
			}
			event_target:morrocco_annexer = {
				#Marrakech
				transfer_state = 462
				transfer_state = 1008
				transfer_state = 1153
				transfer_state = 1152
				transfer_state = 461
				transfer_state = 1150
				transfer_state = 1005
				transfer_state = 1151
				transfer_state = 1546
				transfer_state = 2112
				transfer_state = 2113
				transfer_state = 2114
				GGR_set_up_RK_ROOT = yes
			}
			459 = {
			    if = {
				    limit = {
				        is_owned_by = GER
			        }
				    NAF = {
				        transfer_state = 1006
				        transfer_state = 459
					    add_state_core = 459
					    add_state_core = 1006
					}	
				}	
			}
			GER = { #Navy transfer
				if = {
					limit = {
						NOT = { has_global_flag = Iberian_Wars }
					}
					IBR = { transfer_navy = { target = GER } }
				}
			}
			WAF = { #Westafrika
				transfer_state = 1010
				transfer_state = 1011
				transfer_state = 1158
				transfer_state = 1156
				transfer_state = 1155
				transfer_state = 1157
				transfer_state = 1009
				transfer_state = 699
				transfer_state = 1159
				transfer_state = 839
				transfer_state = 2116
				transfer_state = 2115
				if = {
					limit = {
						NOT = { has_global_flag = Iberian_Wars }
					}
					transfer_state = 296
				}
				GGR_set_up_RK_ROOT = yes
			}
			if = {
				limit = {
					NOT = {
						country_exists = RCA
						GRO = {
							exists = yes
							is_in_faction_with = GER
						}
					}
				}
				RCA = { GGR_set_up_RK_ROOT = yes }
			}
			1548 = {
				if = {
					limit = { is_owned_by = GER }
					transfer_state_to = RCA
				}
			}
			1549 = {
				if = {
					limit = { is_owned_by = GER }
					transfer_state_to = RCA
				}
			}
			705 = {
				if = {
					limit = { is_owned_by = GER }
					transfer_state_to = RCA
				}
			}
			RCA = {
				if = {
					limit = {
						original_tag = GGN
					}
					GGR_set_up_RK_ROOT = yes
				}
				else = {
					set_country_flag = GGR_set_up_RK_ROOT_done
					GGR_set_up_RK_ROOT = yes
				}
			}
			GER = {
			    remove_dynamic_modifier = { modifier = GGR_fall_blau }
			    remove_dynamic_modifier = { modifier = GGR_fall_blau2 }
			    remove_dynamic_modifier = { modifier = GGR_fall_blau3 }
			}
			177 = {
				if = {
					limit = { 
						NOT = {
						    is_controlled_by = ITA 
						}	
					}
				    GKA = {
				        transfer_state = 177
						add_state_core = 177
					}
				}	
			}
			if = {
				limit = { 
					NOT = {
						has_global_flag = Iberian_Wars
					}	
				}
				GER = {
					transfer_state = 702
				}
			}
			1547 = {
				if = {
					limit = { 
						NOT = {
						    is_controlled_by = GIB 
						}	
					}
				    GER = {
				        transfer_state = 1547
						transfer_state = 118
						transfer_state = 290
						transfer_state = 1545
					}
				}	
			}
			every_country = {
		        if = {
			        limit = {
				        check_variable = { ECON_SPHERE_LEADER = IBR }
					}
					clr_country_flag = HAS_ECON_SPHERE
			        clear_variable = ECON_SPHERE_LEADER
				}	
			}
		}
	}
}

country_event = { # Turkey Peace Deal
	id = goering_peace_events.18
	title = goering_peace_events.18.t
	desc = goering_peace_events.18.desc
	picture = GFX_report_event_MAD_palace

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.18"}

	option = {
		name = goering_peace_events.18.a
		hidden_effect = {
			set_temp_variable = { Victory_ID = 104 }
			set_temp_variable = { Victory_Points = 200 }
			set_temp_variable = { Victory_Outcome = 5 }
			Cold_War_GUI_AddVictory = yes
			set_temp_variable = { SeaZone_ID = 5 } # 5; Mediterranean
		    Cold_War_GUI_PowerProjection_AddSeaZone = yes
		}	
	}
}

country_event = { # Italy Peace Deal
	id = goering_peace_events.19
	title = goering_peace_events.19.t
	desc = goering_peace_events.19.d
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes
    immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.19"
		hidden_effect = {
			remove_dynamic_modifier = { modifier = GGR_sever_the_artery_dynmod }
			remove_dynamic_modifier = { modifier = GGR_burn_the_peninsula_dynmod }
			remove_dynamic_modifier = { modifier = GGR_plunder_the_resources_dynmod }
			remove_dynamic_modifier = { modifier = GGR_a_swift_end_dynmod }
			remove_dynamic_modifier = { modifier = GGR_an_unprecedented_invasion_dynmod }
			remove_dynamic_modifier = { modifier = GGR_release_the_kraken_dynmod }
			remove_dynamic_modifier = { modifier = GGR_infiltrate_the_lowlands_dynmod }
			GGR_clear_temporary_variables = yes

			every_country = {
				limit = { has_dynamic_modifier = { modifier = BFI_italy_in_the_OFN } }
				remove_dynamic_modifier = { modifier = BFI_italy_in_the_OFN }
			}
			every_country = {
				limit = { has_dynamic_modifier = { modifier = BFI_USA_italosphere_in_the_OFN } }
				remove_dynamic_modifier = { modifier = BFI_USA_italosphere_in_the_OFN }
			}
			every_country = {
				limit = { has_dynamic_modifier = { modifier = BFI_italy_in_the_CPS } }
				remove_dynamic_modifier = { modifier = BFI_italy_in_the_CPS }
			}
			every_country = {
				limit = { has_dynamic_modifier = { modifier = BFI_JAP_italy_in_the_CPS } }
				remove_dynamic_modifier = { modifier = BFI_JAP_italy_in_the_CPS }
			}
			every_country = {
				limit = { has_dynamic_modifier = { modifier = BFI_JAP_italosphere_in_the_CPS } }
				remove_dynamic_modifier = { modifier = BFI_JAP_italosphere_in_the_CPS }
			}
			every_country = {
				limit = { has_dynamic_modifier = { modifier = BFI_italy_all_alone } }
				remove_dynamic_modifier = { modifier = BFI_italy_all_alone }
			}


			add_to_variable = { GGR_balkan_loot = 2 }
			set_temp_variable = { Victory_ID = 106 }
			set_temp_variable = { Victory_Outcome = 5 }
			set_temp_variable = { Victory_Points = 800 }
			Cold_War_GUI_AddVictory = yes
			country_event = { id = goering.gaiseric.35 days = 21 }
			if = {
				limit = {
					GER = {
						has_country_flag = GGR_ignored_riches
					}
				}
				country_event = { id = goering.gaiseric.30 days = 1 }
				country_event = { id = goering.gaiseric.31 days = 2 }
			}
			TNO_improve_poverty_high = yes #IT SHOULD BE ENOUGH
			ITA = { transfer_navy = { target = GER } }
			177 = {
				if = {
					limit = { 
					    is_controlled_by = ITA 	
					}
					if = {
						limit = {
							country_exists = FZL
						}
						FZL = {
							transfer_state = 177
							add_state_core = 177
						}
					}
					else = {
						GKA = {
							transfer_state = 177
							add_state_core = 177
						}
					}
				}	
			}
			RKA = {
				if = {
					limit = {
						exists = no
					}
					GGR_set_up_RK_ROOT = yes
				}
				transfer_state = 1705
				if = {
					limit = {
						PAL = { 
						    OR = {
						        is_subject_of = ITA
							    has_war_with = GER
								has_country_flag = GGR_capitulate_properly_pls
						    }	
							NOT = {
							    is_in_faction_with = JER 
							}	
						}
						
					}
					annex_country = {
						target = PAL
						transfer_troops = no
					}
				}
				if = {
					limit = {
						country_exists = YEM
						YEM = { 
						    OR = {
						        is_subject_of = ITA
							    has_war_with = GER
								has_country_flag = GGR_capitulate_properly_pls
						    }
						} 
						
					}
					annex_country = {
						target = YEM
						transfer_troops = no
					}
				}
			}
			if = {
				limit = {
					country_exists = SNS
					SNS = { 
						OR = {
						    is_subject_of = ITA
							has_war_with = GER
						    has_country_flag = GGR_capitulate_properly_pls
						} 
					}
				}		
                RKA = {				
				    annex_country = {
					    target = SNS
					    transfer_troops = no
					}	
					add_core_effect = yes
				}
			}
			every_country = {
		        if = {
			        limit = {
				        check_variable = { ECON_SPHERE_LEADER = ITA }
					}	
					clr_country_flag = HAS_ECON_SPHERE
			        clear_variable = ECON_SPHERE_LEADER
			    }
            }
			RKK = {
				transfer_state = 163
				transfer_state = 164
				transfer_state = 1328
				transfer_state = 183
			}
			if = {
				limit = {
					country_exists = GUL
					GUL = {
					    OR = {
						    is_subject_of = ITA
							has_war_with = GER
							has_country_flag = GGR_capitulate_properly_pls
						}
					}  
				}
				RKA = {
					annex_country = {
						target = GUL
						transfer_troops = no
					}
					add_core_effect = yes
				}
				GUL = { transfer_navy = { target = GER } }
			}
			if = {
				limit = {
					country_exists = OMA
					OMA = {
					    OR = {
						    is_subject_of = ITA
							has_war_with = GER
							has_country_flag = GGR_capitulate_properly_pls
						}
					}  
				}
				RKA = {
					annex_country = {
						target = OMA
						transfer_troops = no
					}
					add_core_effect = yes
				}
				OMA = { transfer_navy = { target = GER } }
			}
			if = {
				limit = {
					FRA = { is_in_faction_with = GER }
				}
				FRA = {
					transfer_state = 735
					add_state_core = 735
				}
			}
			else = {
				GLC = {
					transfer_state = 735
					add_state_core = 735
				}
			}
			white_peace = ITA
			RKB = {
				if = {
					limit = {
						exists = no
					}
					GGR_set_up_RK_ROOT = yes
				}
			    if = {
                    limit = {
					    country_exists = GRE
						GRE = {
					        OR = {
						        is_subject_of = ITA
							    has_war_with = GER
								has_country_flag = GGR_capitulate_properly_pls
							}	
						}  
				    }
					annex_country = {
					    target = GRE
					    transfer_troops = no
				    }
				    add_core_effect = yes
					GRE = { transfer_navy = { target = GER } }
				}
				transfer_state = 1264
				add_state_core = 1264
			    if = { 
				    limit = {
				        country_exists = BOS
						BOS = {
					        OR = {
						        is_subject_of = ITA
							    has_war_with = GER
								has_country_flag = GGR_capitulate_properly_pls
							}	
						}	
					} 
					annex_country = {
					    target = BOS
						transfer_troops = no
					}
				}
			    if = { 
				    limit = {
				        country_exists = SER
						SER = {
					        OR = {
						        is_subject_of = ITA
							    has_war_with = GER
								has_country_flag = GGR_capitulate_properly_pls
							}	
						}	
					} 
					annex_country = {
					    target = SER
						transfer_troops = no
					}
					if = {
						limit = {
							HUN = {
								is_in_faction_with = GER
							}
						}
						HUN = {
							transfer_state = 968
							add_state_core = 968
						}
					}
					else = {
						RKB = {
							transfer_state = 968
							add_state_core = 968
						}
					}
				}
				if = { 
				    limit = {
				        country_exists = CRO	
						CRO = {
					        OR = {
						        is_subject_of = ITA
							    has_war_with = GER
								has_country_flag = GGR_capitulate_properly_pls
							}	
						}
					}	
					annex_country = {
					    target = CRO
						transfer_troops = no
					}
				}
				if = { 
				    limit = {
				        country_exists = MNT	
						MNT = {
					        OR = {
						        is_subject_of = ITA
							    has_war_with = GER
								has_country_flag = GGR_capitulate_properly_pls
							}	
						}
					}	
					annex_country = {
					    target = MNT
						transfer_troops = no
					}
				}
				if = { 
				    limit = {
				        country_exists = ALB
						ALB = {
					        OR = {
						        is_subject_of = ITA
							    has_war_with = GER
								has_country_flag = GGR_capitulate_properly_pls
							}	
						}
					}	
					annex_country = {
					    target = ALB
						transfer_troops = no
					}
				}
				transfer_state = 745
				transfer_state = 103
				transfer_state = 44
				transfer_state = 1295
				transfer_state = 105
				transfer_state = 1294
				transfer_state = 1326
				transfer_state = 1979
				transfer_state = 1704
				transfer_state = 106
				add_core_effect = yes
			}
			SER = {
				if = {
					limit = {
						is_in_faction_with = GER
						exists = yes
					}
					transfer_state = 969
					transfer_state = 1980
					transfer_state = 105
					transfer_state = 1274
					transfer_state = 969
					transfer_state = 1553
					transfer_state = 1726
					transfer_state = 1976
					every_owned_state = {
						add_core_of = PREV
						remove_core_of = RKB
					}
				}
			}
			BUL = {
				if = {
					limit = {
						is_in_faction_with = GER
						exists = yes
					}
					transfer_state = 1704
					every_owned_state = {
						add_core_of = PREV
						remove_core_of = RKB
					}
				}
			}

			GEA = {
			    if = { 
				    limit = {
				        country_exists = IEA	
						IEA = {
					        OR = {
						        is_subject_of = ITA
							    has_war_with = GER
								has_country_flag = GGR_capitulate_properly_pls
							}	
						}
					}
					annex_country = {
					    target = IEA
						transfer_troops = no
					}
				}
				transfer_state = 1089
				transfer_state = 1090
				every_state = {
					limit = {
						is_core_of = EGY
						OR = {
							state = 551
							state = 1120
							state = 1121
							state = 549
							state = 1122
							state = 1123
							state = 1124
							state = 1125
							state = 1136
							state = 1135
							state = 1128
							state = 1127
							state = 1126
							state = 1130
							state = 1129
							state = 1133
							state = 1134
							state = 1179
							state = 1132
							state = 1131
						}
					}
					EGY = { transfer_navy = { target = GER } }
					GEA = {
						transfer_state = PREV
						transfer_state = 709
					}
				}
				GGR_set_up_RK_ROOT = yes
			}
			NAF = {
				every_state = {
					limit = {
						is_on_continent = africa
						OR = {
							is_core_of = ITA
							is_core_of = LBA
							is_core_of = TUN
						}
						NOT = { 
							state = 709
						}
					}
					transfer_state_to = NAF
				}
				if = {
				    limit = {
					    country_exists = EGY
						EGY = {
					        OR = {
						        is_subject_of = ITA
							    has_war_with = GER
								has_country_flag = GGR_capitulate_properly_pls
							}	
						}
					} 
				    annex_country = {
					    target = EGY
					    transfer_troops = no
					}	
				}
				GGR_set_up_RK_ROOT = yes
			}
			FRA = {
				if = {
					limit = {
						is_in_faction_with = GER
						ILG = {
							OR = {
								is_subject_of = ITA
								is_in_faction_with = ITA
								is_guaranteed_by = ITA
							}
						}
					}
					every_state = {
						limit = {
							OR = {
								is_core_of = ILG
								is_core_of = SLG
							}
						}
						transfer_state_to = FRA
						add_core_of = FRA
					}
				}
			}
			NAF = {	
			    if = {
                    limit = {
					    country_exists = ILG
					    ILG = { 
						    OR = {
						        is_subject_of = ITA
							    has_war_with = GER
								has_country_flag = GGR_capitulate_properly_pls
						    }
						}  
				    }
					annex_country = {
					    target = ILG
					    transfer_troops = no
				    }
				    add_core_effect = yes
				}	
			}
			LOM = {				
				annex_country = {
					target = ITA
					transfer_troops = yes
				}
				transfer_state = 1376
				transfer_state = 1377
				transfer_state = 1379
				transfer_state = 1376
			}
			GER = {
				set_variable = { GGR_italy_loot = 4 }
				transfer_state = 39
				transfer_state = 736
				transfer_state = 102
				transfer_state = 116
				transfer_state = 965
				set_temp_variable = { SeaZone_ID = 5 } # 5; Mediterranean
				Cold_War_GUI_PowerProjection_AddSeaZone = yes
			}
		}
	}

	option = { # ISR
		name = goering_peace_events.19.a
		GGR_decrease_militarist_loyalty_large = yes
		GGR_decrease_militarist_power = yes
		hidden_effect = {
			set_autonomy = {
				target = LOM
				autonomous_state = autonomy_collaborator_puppet_state
			}
			LOM = {
				add_core_effect = yes
				econ_join_sphere_GER = yes
				annex_country = {
					target = MOC
					transfer_troops = no
				}
				set_variable = { TNO_economy_type = token:Econ_Type_Planned }
				set_variable = { TNO_economy_subtype = token:Econ_Subtype_Gelenkte_Wirtschaft }
				set_cosmetic_tag = ISR_Italy
				remove_faction_status = yes
				add_ideas = Pakt_Marionettenstaat
				set_popularities = {
					fascism = 30
					national_socialism = 70
				}
				set_party_name = {
					ideology = national_socialism
					long_name = ITA_national_socialism_party_long
					name = ITA_national_socialism_party
				}
				set_party_name = {
					ideology = fascism
					long_name = ITA_fascism_party_long
					name = ITA_fascism_party
				}
				ITA = {
					ITA_Roberto_Farinacci = {
						set_nationality = LOM
					}
				}
				promote_character = ITA_Roberto_Farinacci
			}
		}
	}
	option = { # MW Italy
		name = goering_peace_events.19.b
		hidden_effect = {
			add_to_variable = { GGR_italy_loot = 4 }
			LOM = {
				GGR_set_up_RK_ROOT = yes
			}
		}
	}
}

country_event = { # Japan Peace Event
	id = goering_peace_events.21
	title = goering_peace_events.21.t
	desc = goering_peace_events.21.d
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes
    immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.21"
	}

	option = {
		name = goering_peace_events.21.a
		custom_effect_tooltip = GGR_japanese_issues_uhoh
		TOH = {  
			add_ideas = TOH_remaining_resistance1
		}
		add_ideas = GER_japanese_manpower_drain
		
		set_temp_variable = { Victory_ID = 108 }
		set_temp_variable = { Victory_Outcome = 5 }
		set_temp_variable = { Victory_Points = 5000 }
		Cold_War_GUI_AddVictory = yes

		hidden_effect = {
			remove_dynamic_modifier = { modifier = GGR_Operation_Dammerung }
			clr_global_flag = TNO_world_tension_WW3
			GER = {
				remove_ideas = { 
				    GGR_aggressive_submarine_tactics
				}
			}
			every_country = {
				if = {
					limit = {
						OR = {
							check_variable = { ECON_SPHERE_LEADER = JAP }
							is_in_japanese_faction = yes
						}	
					}	
					clr_country_flag = HAS_ECON_SPHERE
					clear_variable = ECON_SPHERE_LEADER
					remove_faction_status = yes
				}
			}
			JAP = {
				remove_superpower = yes
			}
			USA = { # ports on the west
				transfer_state = 768
				transfer_state = 769
			}
			every_state = {
				limit = {
					OR = {
						state = 1364
						state = 1647
						state = 1646
						state = 657
						state = 1645
						state = 1644
						state = 408
						state = 809
					}
				}
				if = {
					limit = {
						country_exists = AMR
					}
					transfer_state_to = AMR
					add_core_of = AMR
				}
				else_if = {
					limit = {
						country_exists = PRM
					}
					transfer_state_to = PRM
					add_core_of = PRM
				}
				else = {
					transfer_state_to = RKF
					add_core_of = RKF
				}
			}
			if = {
				limit = { CHI = { is_in_faction_with = GER } }
				every_country = {
					limit = { is_china_nation = yes is_in_faction_with = GER }
					if = {
						limit = {
							tag = TIB
						}
						if = {
							limit = {
								is_in_faction_with = JAP
							}
							CHI = {
								annex_country = {
									target = PREV
									transfer_troops = no
								}
							}
						}
					}
					CHI = {
						annex_country = {
							target = PREV
							transfer_troops = no
						}
					}
				}
				CHI = {
					set_cosmetic_tag = YUN_NPA_China
					transfer_state = 524
					transfer_state = 1850
					transfer_state = 1851
					transfer_state = 1854
					transfer_state = 1852
					transfer_state = 1855
					transfer_state = 1853
					transfer_state = 1856
					transfer_state = 1464
					transfer_state = 591
					transfer_state = 810
					transfer_state = 594
					transfer_state = 729
					transfer_state = 326
					transfer_state = 813
					transfer_state = 812
					transfer_state = 811
					transfer_state = 1022
					annex_country = {
						target = ROC
						transfer_troops = no
					}
					add_core_effect = yes
				}
			}
			else = { 
				ROC = {
					every_country = {
						limit = {
							OR = {
								is_china_nation = yes
								tag = CHI
							}
							OR = {
								is_in_faction_with = JAP
								has_war_with = GER
							}
						}
						every_state = {
							limit = {
								is_core_of = PREV
							}
							transfer_state_to = ROC
						}
					}
					ROC = {
						transfer_state = 524
						transfer_state = 1850
						transfer_state = 1851
						transfer_state = 1854
						transfer_state = 1852
						transfer_state = 1855
						transfer_state = 1853
						transfer_state = 1856
						transfer_state = 1464
						transfer_state = 591
						transfer_state = 810
						transfer_state = 594
						transfer_state = 960
					    transfer_state = 325
						every_owned_state = {
							set_demilitarized_zone = no
						}
						GGR_set_up_RK_ROOT = yes
					}
				}
			}
			GVT = {
				if = {
					limit = {
						NOT = {
							country_exists = GVT
						}
					}
					GGR_set_up_RK_ROOT = yes
				}
				if = {
					limit = {
						THA = {
							exists = yes
							OR = {
								is_in_faction_with = JAP
								has_war_with = GER
							}	
						}	
					}
					annex_country = {
						target = THA
						transfer_troops = no
					}
				} 
				if = {
					limit = {
						LAO = {
							exists = yes
							OR = {
								is_in_faction_with = JAP
								has_war_with = GER
							}	
						}	
					}
					annex_country = {
						target = LAO
						transfer_troops = no
					}
				} 
				if = {
					limit = {
						VIN = {
							exists = yes
							OR = {
								is_in_faction_with = JAP
								has_war_with = GER
							}	
						}	
					}
					annex_country = {
						target = VIN
						transfer_troops = no
					}
				} 
				if = {
					limit = {
						CAM = {
							exists = yes
							OR = {
								is_in_faction_with = JAP
								has_war_with = GER
							}	
						}	
					}
					annex_country = {
						target = CAM
						transfer_troops = no
					}
				} 
				if = {
					limit = {
						SHO = {
							exists = yes
							OR = {
								is_in_faction_with = JAP
								has_war_with = GER
							}	
						}	
					}
					annex_country = {
						target = SHO
						transfer_troops = no
					}
				} 
				if = {
					limit = {
						YUN = {
							exists = yes
							OR = {
								is_in_faction_with = JAP
								has_war_with = GER
							}	
						}	
					}
					annex_country = {
						target = YUN
						transfer_troops = no
					}
				}
				if = {
					limit = {
						JHR = {
							exists = yes
							OR = {
								is_in_faction_with = JAP
								has_war_with = GER
							}	
						}	
					}
					annex_country = {
						target = JHR
						transfer_troops = no
					}
				}
				if = {
					limit = {
						NOT = { 
							country_exists = YUN
							country_exists = CHI
						}
					}
					transfer_state = 325
					transfer_state = 960
				}
				add_core_effect = yes
			}
			RKO = {
				if = {
					limit = {
						NOT = {
							country_exists = RKO
						}
					}
					GGR_set_up_RK_ROOT = yes
				}
				if = {
					limit = {
						PHI = {
							exists = yes
							OR = {
								is_in_faction_with = JAP
								has_war_with = GER
							}	
						}	
					}
					annex_country = {
						target = PHI
						transfer_troops = no
					}
				}
				if = {
					limit = {
						FGB = {
							exists = yes
							OR = {
								is_in_faction_with = JAP
								has_war_with = GER
							}	
						}	
					}
					annex_country = {
						target = FGB
						transfer_troops = no
					}
				}
				add_core_effect = yes
			}
			if = {
				limit = {
					INS = { is_in_faction_with = GER }
				}
				INS = {
					transfer_state = 523
					transfer_state = 1332
					transfer_state = 2320
					transfer_state = 2321
					add_core_effect = yes
				}
			}
			else = {
				RKO = {
					if = {
						limit = {
							NOT = {
								country_exists = RKO
							}
						}
						transfer_state = 523
						transfer_state = 1332
						transfer_state = 2320
						transfer_state = 2321
						GGR_set_up_RK_ROOT = yes
						
					}
					else_if = {
						limit = {
							country_exists = RKO
						}
						transfer_state = 523
						transfer_state = 1332
						transfer_state = 2320
						transfer_state = 2321
						add_core_effect = yes
					}
				}
			}

			RKO = {
				if = {
					limit = {
						INS = {
							exists = yes
							OR = {
								is_in_faction_with = JAP
								has_war_with = GER
							}	
						}	
					}
					annex_country = {
						target = INS
						transfer_troops = no
					}
				}
				if = {
					limit = {
						NRB = {
							exists = yes
							OR = {
								is_in_faction_with = JAP
								has_war_with = GER
							}	
						}	
					}
					if = {
						limit = {
							INS = { is_in_faction_with = GER }
						}
						INS = {
							annex_country = {
								target = NRB
								transfer_troops = no
							}
						}
					}
					else = {
						annex_country = {
							target = NRB
							transfer_troops = no
						}
					}
				}
				if = {
					limit = {
						SRK = {
							exists = yes
							OR = {
								is_in_faction_with = JAP
								has_war_with = GER
							}	
						}	
					}
					annex_country = {
						target = SRK
						transfer_troops = no
					}
					add_core_effect = yes
				}
				if = {
					limit = {
						BRU = {
							exists = yes
							OR = {
								is_in_faction_with = JAP
								has_war_with = GER
							}	
						}	
					}
					annex_country = {
						target = BRU
						transfer_troops = no
					}
					add_core_effect = yes
				}
			}
			MDG = {
				if = {
					limit = {
						country_exists = MAD
						OR = {
							is_in_faction_with = JAP
							has_war_with = GER
						}	
					}
					GER = {
						MDG_Willi_Stoph = {
							set_nationality = MDG
						}
					}
					GGR_conquered_madagascar = yes 
				}
			}
			RIN = {
				if = {
					limit = {
						NOT = {
							country_exists = RIN
						}
					}
					GGR_set_up_RK_ROOT = yes
				}
				if = {
					limit = {
						AZH = {
							exists = yes
							OR = {
								is_in_faction_with = JAP
								has_war_with = GER
							}	
						}
					}
					annex_country = {
						target = AZH
						transfer_troops = no
					}
					annex_country = {
						target = BHU
						transfer_troops = no
					}
				}
				if = {
					limit = {
						NOT = {
							BUR = { has_idea = Pakt_Bundnispartner }
						}
					}
					if = {
						limit = {
							AZH = { is_in_faction_with = GER }
						}
						AZH = {
							transfer_state = 1313
							transfer_state = 1307
							transfer_state = 1308
						}
					}
					else = {
						transfer_state = 1313
						transfer_state = 1307
						transfer_state = 1308
					}
					GVT = {
						transfer_state = 288
						transfer_state = 1309
						transfer_state = 1310
						transfer_state = 842
						transfer_state = 1311
						transfer_state = 640
						transfer_state = 1319
						transfer_state = 842
						transfer_state = 872
						transfer_state = 762
						add_core_effect = yes
					}	
				}
				add_core_effect = yes
			}
			TOH = {
				if = {
					limit = {
						NOT = {
							country_exists = TOH
						}
					}
					GGR_set_up_RK_ROOT = yes
				}
				JAP = { transfer_navy = { target = TOH } }	
				annex_country = {
					target = JAP
					transfer_troops = no
				}
				if = {
					limit = {
						NOT = { CHI = { is_in_faction_with = GER } }
					}
					transfer_state = 813
					transfer_state = 729
					transfer_state = 326
					transfer_state = 1022
				}
				add_core_effect = yes
				GER = {
					set_temp_variable = { SeaZone_ID = 0 } # 0; East Pacific
					Cold_War_GUI_PowerProjection_AddSeaZone = yes
					set_temp_variable = { SeaZone_ID = 1 } # 1; West Pacific
					Cold_War_GUI_PowerProjection_AddSeaZone = yes
					clr_country_flag = GGR_operation_locked
				}
			}
		}
	}
}

country_event = { # The USA Peace Deal
	id = goering_peace_events.22
	title = goering_peace_events.22.t
	desc = goering_peace_events.22.d
	picture = GFX_report_event_GER_army_2

	fire_only_once = yes
	is_triggered_only = yes
    immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_peace_events.22"
	}

	option = {
		name = goering_peace_events.22.a
		hidden_effect = {
			clr_global_flag = TNO_world_tension_WW3
			
			set_temp_variable = { Victory_ID = 109 }
			set_temp_variable = { Victory_Outcome = 5 }
			set_temp_variable = { Victory_Points = 5000 }
			Cold_War_GUI_AddVictory = yes

			remove_dynamic_modifier = { modifier = GGR_operation_ikarus }
			remove_dynamic_modifier = { modifier = GGR_operation_hydra }
			remove_dynamic_modifier = { modifier = GGR_conquistador }
			every_state = {
				limit = {
					OR = {
						state = 464
						state = 730
						state = 696
						state = 981
						state = 698
						state = 697
						state = 178
						state = 702
						state = 703
						state = 704
						state = 720
						state = 299
						state = 1510
						state = 1529
						state = 1536		
						state = 101
						state = 366
						state = 2511
						state = 2089
						state = 2088
					}
					controller = {
						OR = {
							tag = GER
							tag = SCN
							has_idea = Pakt_Reichskolonie
							has_idea = Pakt_Military_Authority
							is_in_faction_with = USA
							tag = CAN
						}
					}
				}
				transfer_state_to = ANA
				add_core_of = ANA
			}
			if = {
				limit = {
					country_exists = ENA
				}
				every_state = {
					limit = {
						OR = {
							state = 2506
							state = 641
							state = 2505
							state = 2504
							state = 1627
							state = 270
							state = 2507
							state = 2503
							state = 2502
							state = 635
							state = 2492
							state = 636
							state = 2499
							state = 2493
							state = 2483
							state = 2496
							state = 2498
							state = 726
							state = 2497
							state = 2495
							state = 2494
							state = 2500
							state = 2501
							state = 727
							state = 2520
							state = 2519
							state = 649
							state = 2517
						}
						controller = {
							OR = {
								tag = GER
								has_idea = Pakt_Reichskolonie
								has_idea = Pakt_Military_Authority
								is_in_faction_with = USA
							}
						}
					}
					transfer_state_to = ENA
					add_core_of = ENA
				}
			}
			USA = {
				transfer_navy = { target = ANA }
			}
			ANA = {			
				GGR_set_up_RK_ROOT = yes
			}
			SCN = {
				transfer_state = 100
				add_state_core = 100
				transfer_state = 337
				add_state_core = 337
			}
			USA = {
				remove_superpower = yes
			}
			every_country = {
				if = {
					limit = {
						OR = {
							check_variable = { ECON_SPHERE_LEADER = USA }
							is_in_american_faction = yes
						}	
					}	
					clr_country_flag = HAS_ECON_SPHERE
					clear_variable = ECON_SPHERE_LEADER
					remove_faction_status = yes
				}
			}
			if = {
				limit = {
					MAD = {
						exists = yes
						is_in_faction_with = USA
					}
				}
				GGR_conquered_madagascar = yes 
			}
			if = {
				limit = {
					BRA = {
						exists = yes
						is_in_faction_with = USA
					}
				}
				if = {
					limit = {
						BOL = {
							exists = yes
							is_subject_of = BRA
						}
					}
					GAR = {
						annex_country = {
							target = BOL
							transfer_troops = no
						}
						GGR_set_up_RK_ROOT = yes
					}
				}
				if = {
					limit = {
						GUX = {
							exists = yes
							is_subject_of = BRA
						}
					}
					GBR = {
						annex_country = {
							target = GUX
							transfer_troops = no
						}
						GGR_set_up_RK_ROOT = yes
					}
				}
				GBR = {
					annex_country = {
						target = BRA
						transfer_troops = no
					}
					GGR_set_up_RK_ROOT = yes
				}
				GAR = {
					annex_country = {
						target = BRP
						transfer_troops = no
					}
					GGR_set_up_RK_ROOT = yes
				}
			}
			if = {
				limit = {
					URG = {
						exists = yes
						is_in_faction_with = USA
					}
				}
				GAR = {
					annex_country = {
						target = URG
						transfer_troops = no
					}
					annex_country = {
						target = URP
						transfer_troops = no
					}
					GGR_set_up_RK_ROOT = yes
				}
			}
			RSA = {
				if = {
					limit = {
						country_exists = SAF
						OR = {
							is_in_faction_with = USA
							has_war_with = GER
						}	
					}
					annex_country = {
						target = SAF
						transfer_troops = no
					}
					GGR_set_up_RK_ROOT = yes
				}
			}
			AMK = {
				transfer_state = 375
				transfer_state = 374
				transfer_state = 372
				transfer_state = 370
				transfer_state = 371
				transfer_state = 368
				transfer_state = 367
				transfer_state = 365
				transfer_state = 368
				transfer_state = 364
				transfer_state = 363
				transfer_state = 362
				768 = {	
					if = {
						limit = {
							is_owned_by = USA
						}
						GER = {
							transfer_state = 768
							transfer_state = 769
						}	
					}
				}
				629 = {
					if = {
						limit = {
							is_owned_by = USA
						}
						GER = {
							transfer_state = 629
							transfer_state = 772
						}	
					}
				}
				GGR_set_up_RK_ROOT = yes
			}
			RFE = {
				transfer_state = 1433
				transfer_state = 1432
				transfer_state = 388
				transfer_state = 387
				transfer_state = 380
				transfer_state = 382
				transfer_state = 376
				transfer_state = 377
				transfer_state = 381
				transfer_state = 469
				GGR_set_up_RK_ROOT = yes
			}
			WST = {
				if = {
					limit = {
						NOT = {
							country_exists = WST
						}
					}
					GGR_set_up_RK_ROOT = yes
				}
				transfer_state = 378
				transfer_state = 379
				transfer_state = 385
				transfer_state = 386
				transfer_state = 463
				transfer_state = 739
				transfer_state = 471
				transfer_state = 740
				add_core_effect = yes
				
				# I have no clue why it doesn't want to set by default
				set_party_name = {
					ideology = national_socialism
					name = WST_national_socialism_party
					long_name = WST_national_socialism_party_long
				}
				set_party_name = {
					ideology = national_socialism_2
					name = WST_national_socialism_party
					long_name = WST_national_socialism_party_long
				}
			}
			GQB = {
				if = {
					limit = {
						NOT = {
							country_exists = GQB
						}
					}
					GGR_set_up_RK_ROOT = yes
				}
				transfer_state = 468
				transfer_state = 466
				transfer_state = 465
				transfer_state = 464
				transfer_state = 331
				transfer_state = 1729
				transfer_state = 332
				transfer_state = 730
				transfer_state = 2466
				transfer_state = 2465
				transfer_state = 2467
				add_core_effect = yes
			}
			RLA = {
				if = {
					limit = {
						NOT = {
							country_exists = RLA
						}
					}
					GGR_set_up_RK_ROOT = yes
				}
				transfer_state = 682
				transfer_state = 683
				transfer_state = 276
				transfer_state = 467
				add_core_effect = yes
			}
			GAS = {
				if = {
					limit = {
						NZL = {
							exists = yes 
							OR = {
								is_in_faction_with = USA
								has_war_with = GER
							}
						}
					}
					annex_country = {
						target = NZL
						transfer_troops = no
					}
					GGR_set_up_RK_ROOT = yes
				}
				if = {
					limit = {
						AST = {
							exists = yes 
							OR = {
								is_in_faction_with = USA
								has_war_with = GER
							}
						}
					}
					annex_country = {
						target = AST
						transfer_troops = no
					}
					GGR_set_up_RK_ROOT = yes
				}
			}
			RKL = {
				if = {
					limit = {
						BLZ = {
							exists = yes
							OR = {
								is_in_faction_with = USA
								has_war_with = GER
							}	
						}
					}
					annex_country = {
						target = BLZ
						transfer_troops = no
					}
					GGR_set_up_RK_ROOT = yes
				}
			}
			GBR = {
				if = {
					limit = {
						NOT = {
							country_exists = GBR
						}
					}
					every_state = {
						limit = {
							is_for_ofn_peace_deal = yes
						}
						transfer_state_to = GBR
					}
					GBR = {
						GGR_set_up_RK_ROOT = yes
					}
				}
				else_if = {
					limit = {
						country_exists = GBR
					}
					every_state = {
						limit = {
							is_for_ofn_peace_deal = yes
						}
						GBR = {
							transfer_state = PREV
							add_state_core = PREV
						}
					}
				}
			}
			GCR = {
				if = {
					limit = {
						NOT = {
							country_exists = GCR
						}
					}
					every_state = {
						limit = {
							NOT = { state = 696 }
							is_caribbean_region = yes
							owner = {
								exists = yes
								is_in_faction_with = USA
							}
						}
						GCR = {
							transfer_state = PREV
						}
					}	
					GCR = {
						GGR_set_up_RK_ROOT = yes
					}
				} 
				else_if = {
					limit = {
						country_exists = GCR
					}
					every_state = {
						limit = {
							NOT = { state = 696 }
							is_caribbean_region = yes
							owner = {
								exists = yes
								is_in_faction_with = USA
							}
						}
						GCR = {
							transfer_state = PREV
							add_state_core = PREV
						}
					}
				}
				if = {
					limit = {
						CUB = {
							exists = yes 
							OR = {
								is_in_faction_with = USA
								has_war_with = GER
							}
						}
						NOT = {
							country_exists = GCR
						}
					}	
					annex_country = {
						target = CUB
						transfer_troops = no
					}
					GGR_set_up_RK_ROOT = yes
				}	
				else_if = {
					limit = {
						CUB = {
							exists = yes 
							OR = {
								is_in_faction_with = USA
								has_war_with = GER
							}	
						}
						country_exists = GCR
					}
					annex_country = {
						target = CUB
						transfer_troops = no
					}
					add_core_effect = yes
				}
				if = {
					limit = {
						HAI = {
							exists = yes 
							OR = {
								is_in_faction_with = USA
								has_war_with = GER
							}
						}
						NOT = {
							country_exists = GCR
						}
					}	
					annex_country = {
						target = HAI
						transfer_troops = no
					}
					GGR_set_up_RK_ROOT = yes
				}	
				else_if = {
					limit = {
						HAI = {
							exists = yes 
							OR = {
								is_in_faction_with = USA
								has_war_with = GER
							}	
						}
						country_exists = GCR
					}
					annex_country = {
						target = HAI
						transfer_troops = no
					}
					add_core_effect = yes
				}
				if = {
					limit = {
						DOM = {
							exists = yes 
							OR = {
								is_in_faction_with = USA
								has_war_with = GER
							}
						}
						NOT = {
							country_exists = GCR
						}
					}	
					annex_country = {
						target = DOM
						transfer_troops = no
					}
					GGR_set_up_RK_ROOT = yes
				}	
				else_if = {
					limit = {
						DOM = {
							exists = yes 
							OR = {
								is_in_faction_with = USA
								has_war_with = GER
							}	
						}
						country_exists = GCR
					}
					annex_country = {
						target = DOM
						transfer_troops = no
					}
					add_core_effect = yes
				}
				transfer_state = 686
				transfer_state = 690
				transfer_state = 693
				add_state_core = 686
				add_state_core = 690
				add_state_core = 693 
			}
			TSM = {
				transfer_state = 518
				GGR_install_RK_with_no_changes = yes
			}
			472 = {
				transfer_state_to = ZZZ
				add_core_of = ZZZ
			}
			GER = {
				add_to_array = { GGR_anarchy_states = 472 }
				add_to_array = { GGR_anarchy_states = 471 }
				add_to_array = { GGR_anarchy_states = 674 }
				add_to_array = { GGR_anarchy_states = 1570 }
				add_to_array = { GGR_anarchy_states = 1571 }
				add_to_array = { GGR_anarchy_states = 1572 }
				GGR_update_anarchy = yes

				
				if = {
					limit = {
						country_exists = MAD
						MAD = { is_in_faction_with = USA }
					}
					GGR_conquered_madagascar = yes
				}

				clr_country_flag = GGR_operation_locked
				set_temp_variable = { SeaZone_ID = 0 } # 0; East Pacific
				Cold_War_GUI_PowerProjection_AddSeaZone = yes
				set_temp_variable = { SeaZone_ID = 1 } # 1; West Pacific
				Cold_War_GUI_PowerProjection_AddSeaZone = yes
				set_temp_variable = { SeaZone_ID = 2 } # 2; South Atlantic
				Cold_War_GUI_PowerProjection_AddSeaZone = yes

				transfer_state = 685

				if = {
					limit = {
						FAR = {
							exists = yes
							OR = {
								is_in_faction_with = USA
								has_war_with = GER
							}	
						}	
					}
					SCN = {
						annex_country = {
							target = FAR
							transfer_troops = no
						}
						add_core_effect = yes
					}
				}

			}
			RMI = {
				annex_country = {
					target = USA
					transfer_troops = no
				}
				set_party_name = {
					ideology = despotism
					long_name = USA_GER_despotism_party_long
					name = USA_GER_despotism_party
				} 
				set_party_name = {
					ideology = fascism
					long_name = USA_GER_fascism_party_long
					name = USA_GER_fascism_party
				}
				set_party_name = {
					ideology = national_socialism
					long_name = USA_GER_national_socialism_party_long
					name = USA_GER_national_socialism_party
				}
				set_cosmetic_tag = USA_GER
				GGR_set_up_RK_ROOT = yes
			}
		}
	}
}

country_event = { # Switzerland Peace Deal
	id = goering_peace_events.24
	title = goering_peace_events.24.t
	desc = goering_peace_events.24.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.24"}

	option = {
		name = goering_peace_events.24.a
		set_temp_variable = { Victory_ID = 101 }
		set_temp_variable = { Victory_Points = TNO_Cold_War_GUI_Victory_Points^101 }
		add_to_temp_variable = { Victory_Points = 75 }
		clr_country_flag = GGR_operation_locked
		GGR_determine_WPA_completion = yes
		Cold_War_GUI_AddVictory = yes
	}
}

country_event = { # sPAIN Peace Deal
	id = goering_peace_events.25
	title = goering_peace_events.25.t
	desc = goering_peace_events.25.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.25"}

	option = {
		name = goering_peace_events.25.a
	}
}

country_event = { # Portugal Peace Deal
	id = goering_peace_events.26
	title = goering_peace_events.26.t
	desc = goering_peace_events.26.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	trigger = {
		NOT = {
			has_country_flag = GGR_helping_spain
		}
	}
	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.26"}

	option = {
		name = goering_peace_events.26.a
	}
}

country_event = { # Greece Peace Deal
	id = goering_peace_events.27
	title = goering_peace_events.27.t
	desc = goering_peace_events.27.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.27"}

	option = {
		name = goering_peace_events.27.a
		clr_country_flag = GGR_operation_locked
		set_temp_variable = { Victory_ID = 101 }
		set_temp_variable = { Victory_Points = TNO_Cold_War_GUI_Victory_Points^101 }
		add_to_temp_variable = { Victory_Points = 75 }
		GGR_determine_WPA_completion = yes
		Cold_War_GUI_AddVictory = yes
		set_temp_variable = { SeaZone_ID = 5 } # 5; Mediterranean
		Cold_War_GUI_PowerProjection_AddSeaZone = yes
	}
}

country_event = { # France Peace Deal
	id = goering_peace_events.28
	title = goering_peace_events.28.t
	desc = goering_peace_events.28.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.28"}

	option = {
		name = goering_peace_events.28.a
		set_temp_variable = { SeaZone_ID = 5 } # 5; Mediterranean
		Cold_War_GUI_PowerProjection_AddSeaZone = yes
	}
}

country_event = { # Micronations Peace Deal (why do we even have it)
	id = goering_peace_events.29
	title = goering_peace_events.29.t
	desc = goering_peace_events.29.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.29"}

	option = {
		name = goering_peace_events.29.a
	}
}

country_event = { # North Africa Peace Deal
	id = goering_peace_events.30
	title = goering_peace_events.30.t
	desc = goering_peace_events.30.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.30"}

	option = {
		name = goering_peace_events.30.a
		GGR_increase_militarist_loyalty = yes
	}
}

country_event = { # Central Asia Peace Deal
	id = goering_peace_events.31
	title = goering_peace_events.31.t
	desc = goering_peace_events.31.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.31"}

	option = {
		name = goering_peace_events.31.a
		hidden_effect = {
			if = {
				limit = {
					OR = {
						country_exists = RKS
						PRM = {
							exists = yes
							is_in_faction_with = GER
						}
					}
				}
				clr_country_flag = GGR_operation_locked
				remove_dynamic_modifier = { modifier = GGR_fall_rot } 
				GGR_clear_temporary_variables = yes
			}
			every_possible_country = {
				limit = {
					OR = {
						is_kazakh_nation = yes
						is_central_asian_nation = yes
					}
				}
				every_state = {
					limit = {
						is_core_of = PREV
						is_owned_by = GER
					}
					transfer_state_to = RKT
				}
			}
			582 = {
				if = {
					limit = { owner = { is_in_faction_with = GER } }
					transfer_state_to = RKT
					remove_core_of = RKU
				}
			}
			846 = {
				if = {
					limit = { owner = { is_in_faction_with = GER } }
					transfer_state_to = RKT
					remove_core_of = RKU
				}
			}
			RKT = { GGR_set_up_RK_ROOT = yes }
		}
	}
}

country_event = { # Levant | HOLY LAND Peace Deal
	id = goering_peace_events.32
	title = goering_peace_events.32.t
	desc = goering_peace_events.32.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.32"}

	option = {
		name = goering_peace_events.32.a
	}
}


country_event = { # Canada Peace Deal
	id = goering_peace_events.33
	title = goering_peace_events.33.t
	desc = goering_peace_events.33.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.33"}

	option = {
		name = goering_peace_events.33.a
	}
}

country_event = { # Burgundy Peace Deal
	id = goering_peace_events.34
	title = goering_peace_events.34.t
	desc = goering_peace_events.34.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.34"}

	option = {
		name = goering_peace_events.34.a
	
	}
}

country_event = { # Ireland Peace Deal
	id = goering_peace_events.35
	title = goering_peace_events.35.t
	desc = goering_peace_events.35.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.35"}

	option = {
		name = goering_peace_events.35.a
	}
}

country_event = { # Morrocco holy shit Peace Deal
	id = goering_peace_events.36
	title = goering_peace_events.36.t
	desc = goering_peace_events.36.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.36"}

	option = {
		name = goering_peace_events.36.a
	}
}

country_event = { # West Africa Peace Deal
	id = goering_peace_events.37
	title = goering_peace_events.37.t
	desc = goering_peace_events.37.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.37"}

	option = {
		name = goering_peace_events.37.a
		clear_array = global.west_african_nations_to_annex
		GGR_increase_militarist_loyalty = yes
		hidden_effect = {
			GER = {
				set_temp_variable = { SeaZone_ID = 2 } # 2; South Atlantic
				Cold_War_GUI_PowerProjection_AddSeaZone = yes
			}
		}
	}
}

country_event = { # East Africa Peace Deal
	id = goering_peace_events.38
	title = goering_peace_events.38.t
	desc = goering_peace_events.38.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.38"}

	option = {
		name = goering_peace_events.38.a
		GGR_increase_militarist_loyalty_large = yes
	}
}

country_event = { # Central Africa Peace Deal
	id = goering_peace_events.39
	title = goering_peace_events.39.t
	desc = goering_peace_events.39.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.39"}

	option = {
		name = goering_peace_events.39.a
		GGR_increase_militarist_loyalty = yes
		if = {
			limit = {
				GRO = { exists = yes is_in_faction_with = GER }
			}
			every_country = {
				limit = { is_central_african_nation = yes }
				every_state = {
					limit = {
						is_core_of = PREV
						is_owned_by = GER
					}
					transfer_state_to = GRO
				}
			}
			GRO = { set_cosmetic_tag = RCA add_core_effect = yes }
		}
		else = {
			COG_siegfried_muller = {
				set_nationality = GGN
			}
			every_country = {
				limit = { is_central_african_nation = yes }
				every_state = {
					limit = {
						is_core_of = PREV
						is_owned_by = GER
					}
					transfer_state_to = RCA
				}
			}
			RCA = { GGR_set_up_RK_ROOT = yes }
		}
		hidden_effect = {
			GER = {
				set_temp_variable = { SeaZone_ID = 2 } # 2; South Atlantic
				Cold_War_GUI_PowerProjection_AddSeaZone = yes
			}
			RCA = {
				transfer_units_fraction = {
					target = GER
					size = 1
					stockpile_ratio = 1
					keep_unit_leaders_trigger = { always = yes }
				}
			}
		}
	}
}

country_event = { # Southwest Africa Peace Deal
	id = goering_peace_events.40
	title = goering_peace_events.40.t
	desc = goering_peace_events.40.d
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = { log = "[GetDateText]: [Root.GetName]: event goering_peace_events.40" }

	option = {
		name = goering_peace_events.40.a
		GGR_increase_militarist_loyalty = yes
		hidden_effect = {
			every_country = {
				limit = {
					is_south_african_nation = yes
				}
				every_state = {
					limit = {
						is_owned_by = GER
						is_core_of = PREV
					}
					transfer_state_to = GWA
				}
			}
			GWA = { GGR_set_up_RK_ROOT = yes }
			GER = {
				set_temp_variable = { SeaZone_ID = 2 } # 2; South Atlantic
				Cold_War_GUI_PowerProjection_AddSeaZone = yes
			}
		}
	}
}

country_event = { # South Africa Peace Deal
	id = goering_peace_events.41
	title = goering_peace_events.41.t
	desc = {
		text = goering_peace_events.41.d.base
		trigger = {
			NOT = { country_exists = BOR }
		}
	}
	desc = {
		text = goering_peace_events.41.d.boers
		trigger = {
			country_exists = BOR
		}
	}
	picture = GFX_report_event_CAU_factory

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_peace_events.41"}

	option = {
		name = goering_peace_events.41.a
		GGR_increase_militarist_loyalty = yes
		trigger = {
			NOT = {
				country_exists = BOR
			}
		}
	}
	option = {
		name = goering_peace_events.41.b
		GGR_increase_militarist_loyalty = yes
		trigger = {
			country_exists = BOR
		}
	}
}