GGR_conquered_madagascar = {
	GER = {
	    white_peace = MAD
	}
	MAD = {
		GGR_set_up_RK_ROOT = yes
		set_cosmetic_tag = MAD_GOERING
		GER = {
			MDG_Willi_Stoph = {
				set_nationality = MAD
			}
		}
		MDG = {
			MDG_Willi_Stoph = {
				set_nationality = MAD
			}
		}
		set_cosmetic_tag = MAD_KOLONIE
		set_party_name = {
			ideology = national_socialism
			long_name = MAD_KOLONIE_national_socialism_party_long
			name = MAD_KOLONIE_national_socialism_party
		}
		transfer_state = 706
		transfer_state = 707
		GGR_set_up_RK_ROOT = yes
		add_country_leader_role = {
			character = MDG_Willi_Stoph
			country_leader = {
				expire = "1999.1.1.1"
				ideology = national_socialism_revolutionary_nazism_subtype
				traits = { }
			}
			promote_leader = yes
		}
		remove_ideas = {
			KOM_socintern_member
		}
		add_core_effect = yes
		set_capital = {
			state = 945
		}
	}
	713 = {
		if = { 
		    limit = {
				is_owned_and_controlled_by = GER
		    }	
		    transfer_state_to = MAD
		    add_core_of = MAD	
	    }						
	}
}

GGR_conquered_turkey = {
	GER = { 	
		set_variable = { GGR_turkey_loot = 6 }
		remove_dynamic_modifier = { modifier = GGR_fall_gertrud }
		GGR_clear_temporary_variables = yes
		clear_variable = GGR_TUR_naval_coordination
		clear_variable = GGR_TUR_naval_speed
		clear_variable = GGR_TUR_naval_spotting
		clear_variable = GGR_TUR_terrain_pTMTlty
	}
	CAU = {
		every_state = {
			limit = {
				is_core_of = ARM
			}
			transfer_state_to = CAU
		}
		transfer_state = 1567
		transfer_state = 1565
		add_core_effect = yes
	}	
	every_country = {
		limit = {
			check_variable = { ECON_SPHERE_LEADER = TUR }
		}
		econ_leave_sphere = yes
	}
	if = {
		limit = {
		    TUR = {
				owns_state = 1267
			}
		}
		if = {
			limit = {
				BUL = {
					is_in_faction_with = GER 
				}
			}
			BUL = {
				transfer_state = 1267
				add_state_core = 1267	
			}
		}
		else = {
			RKB = {
				transfer_state = 1267
				add_state_core = 1267			
			}
		}
	}
	RKA = {
		transfer_state = 1446
		add_core_effect = yes
	}
	RKK = {
		annex_country = {
			target = TUR
			transfer_troops = no
		}
		GGR_set_up_RK_ROOT = yes
		164 = {
			if = {
				limit = {
				    is_owned_by = TUR
			    }
				GER = {
				    transfer_state = 164	
				}
			}	
		}
		RKA = {
		    if = {
			    limit = {	
					SNS = { 
						exists = yes
						NOT = {
						    is_subject_of = ITA 
						}	
					}
				}
				transfer_state = 1243
				transfer_state = 1450
				transfer_state = 1241
				transfer_state = 1242
				annex_country = {
					target = SNS
					transfer_troops = no
				}
				RKK = {
					transfer_state = 677
					transfer_state = 1449
					add_state_core = 677
					add_state_core = 1449
				}
			}
		    if = {
			    limit = {
				    BKU = {
					    exists = yes
					}	
				}
				RKA = {
					transfer_state = 1446
					transfer_state = 1781
					transfer_state = 1993
					add_core_effect = yes
				}
			    RKK = {
					annex_country = {
			            target = BKU
			            transfer_troops = no
		            }
					add_core_effect = yes
				}
			}
			GGR_set_up_RK_ROOT = yes
		}
	}
	341 = {
		transfer_state_to = GER
		set_compliance = 75
	}	
}

GGR_conquered_birma = {
	GVT = {
		BUR = {
			every_core_state = {
				transfer_state_to = GVT
			}
		}
		GGR_set_up_RK_ROOT = yes
	}
}

GGR_conquered_switzerland = {
	GER = {
		white_peace = SWI
		annex_country = {
			target = SWI
			transfer_troops = no
		}
		add_ideas = GGR_swiss_resistance
		remove_dynamic_modifier = { modifier = GGR_operation_tannenbaum }
	}
}

GGR_conquered_denmark = {
	GER = {
		white_peace = DEN
		DEN = { transfer_navy = { target = GER } }
		annex_country = {
			target = DEN
			transfer_troops = no
		}
	}
}

GGR_conquered_poland = {
	GER = {
		country_event = { id = reich_shared.22 days = 4 }
		white_peace = POL
		annex_country = {
			target = POL
			transfer_troops = no
		}
	}
}

GGR_conquered_netherlands = {
	GER = {
		white_peace = HOL
		GER_johann_von_kielmansegg = {
			set_nationality = HOL
		}
		country_event = { id = goering_peace_events.9 }
		HOL = { 
			transfer_navy = { target = GER }
			GGR_set_up_RK_ROOT = yes
		}
	}
}

GGR_conquered_slovakia = {
	GER = {
		white_peace = SLO
		GSL = {
			annex_country = {
				target = SLO
				transfer_troops = no
			}
			transfer_state = 1763
			transfer_state = 1762
			transfer_state = 70
			transfer_state = 71
			GGR_set_up_RK_ROOT = yes
			GGR_transfer_general_RK_guy = yes
		}
	}
}

GGR_conquered_caucasus = {
	GER = {
		white_peace = CAU
		country_event = { id = goering_peace_events.16 }
	}
	CAU = {
		transfer_navy = { target = GER }
	}
}

GGR_conquered_england = {
	GER = {
		white_peace = ENG
		ENG = { transfer_navy = { target = GER } }
		remove_dynamic_modifier = { modifier = GGR_operation_sealion2_ENG }
		country_event = { id = goering_peace_events.14 }
		delete_units = {
			division_template = "(spz.) Panzergrenadierabteilung"
			disband = yes
		}
		delete_units = {
			division_template = "(spz.) Panzerabteilung"
			disband = yes
		}
		delete_units = {
			division_template = "(spz.) Fallschirmjägerabteilung"
			disband = yes
		}
		delete_units = {
			division_template = "(spz.) Marineabteilung"
			disband = yes
		}
		clr_country_flag = GGR_operation_locked
		remove_dynamic_modifier = { modifier = GGR_operation_sealion2 }
		remove_dynamic_modifier = { modifier = GGR_operation_sealion2_ENG }
		set_temp_variable = { Victory_ID = 101 }
		set_temp_variable = { Victory_Points = TNO_Cold_War_GUI_Victory_Points^101 }
		add_to_temp_variable = { Victory_Points = 125 }
		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
	}
	BRI = {
		annex_country = {
			target = ENG
			transfer_troops = no
		}
		annex_country = {
			target = CRN
			transfer_troops = yes
		}
	}
	if = {
		limit = {
			has_country_flag = GGR_jordan_saved
		}
		clr_country_flag = GGR_jordan_saved
		BRI = {
			add_ideas = BRI_British_Free_Corps
		}
	}	
	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
		}
	}
}

GGR_conquered_france = {
	GLC = {
		GER = {
			every_owned_state = {
				limit = {
					is_core_of = FRS
					OR = {
						is_owned_by = GLC
						is_owned_by = GER
						is_owned_by = FRS
					}
				}
				transfer_state_to = GLC
			}
		}
		promote_character = GLC_heinz_gunther_guderian
		GGR_set_up_RK_ROOT = yes
	}
	NAF = {
		transfer_state = 784
		GGR_set_up_RK_ROOT = yes
	}
	GER = {
	    FRS = { transfer_navy = { target = GER } }
		clr_country_flag = FRA_fat_invansion
	}	
}

GGR_conquered_algeria = {
	GER = {
		white_peace = SLG
		white_peace = ILG
	}
	NAF = {
		annex_country = {
			target = ILG
			transfer_troops = no
		}
		annex_country = {
			target = SLG
			transfer_troops = no
		}
		GGR_set_up_RK_ROOT = yes
	}
}

GGR_conquered_morocco = {
	NAF = {
		transfer_state = 1005
        transfer_state = 1152
		transfer_state = 1151
		transfer_state = 1153
		transfer_state = 1150
		transfer_state = 461
		transfer_state = 462
		transfer_state = 1008
		transfer_state = 1152
		GGR_set_up_RK_ROOT = yes
	}
	WAF = {
        transfer_state = 1009
		transfer_state = 699
		transfer_state = 1157
		transfer_state = 1155
        transfer_state = 1156
		transfer_state = 1158
		transfer_state = 1011
		transfer_state = 1010
		transfer_state = 839
		transfer_state = 1159
		GGR_set_up_RK_ROOT = yes
	}
	ADS = { 
	    transfer_state = 1546
		add_state_core = 1546
	}
}

GGR_conquered_greece = {
	GER = {
		white_peace = GRE
	}
	RKB = {		
		annex_country = {
			target = GRE
			transfer_troops = no
		}
		GGR_set_up_RK_ROOT = yes
	}
}

GGR_conquered_burgundy = {
	GER = {
		white_peace = BRG
		remove_dynamic_modifier = { modifier = GGR_Fall_Schwarz }
		hidden_effect = {
			remove_ideas = {
				GGR_the_silent_war_lost
				GGR_the_silent_war_stalemate
				GGR_the_silent_war_won
			}
		}
	}

	set_temp_variable = { Victory_ID = 107 }
	set_temp_variable = { Victory_Outcome = 5 }
	set_temp_variable = { Victory_Points = 1500 }
	Cold_War_GUI_AddVictory = yes

	BRG = { transfer_navy = { target = GER } }
	
	set_victory_points = { #goodbye Nord-Paris
		province = 11506
		value = 0
	}
	clr_global_flag = paris_divided
	GER = {
		if = {
			limit = {
				country_exists = HOL
			}
			HOL = {
				transfer_state = 1734
				transfer_state = 6
				add_core_effect = yes
			}
		}
		else = {
			transfer_state = 1734
			transfer_state = 6
		}
		transfer_state = 34
	}
	if = {
		limit = {
			NOT = { country_exists = GLC }
		}
		FRA = {
			annex_country = {
				target = BRG
				transfer_troops = no
			}
			add_core_effect = yes
		}
	}
	else = {
		GER = {
			transfer_state = 29
			transfer_state = 17
			transfer_state = 18
			transfer_state = 1733
		}
		GLC = {
			annex_country = {
				target = BRG
				transfer_troops = no
			}
			add_core_effect = yes
		}
	}

	every_country = {
		limit = {
			has_idea = GGR_rk_alerted
		}
		remove_ideas = GGR_rk_alerted
	}

	set_variable = { 6.nationality = 139 }
	set_variable = { 15.nationality = 123 }
	set_variable = { 16.nationality = 123 }
	set_variable = { 17.nationality = 123 }
	set_variable = { 18.nationality = 123 }
	set_variable = { 29.nationality = 123 }
	set_variable = { 34.nationality = 123 }
	set_variable = { 788.nationality = 123 }
	set_variable = { 1625.nationality = 123 }
	set_variable = { 1626.nationality = 123 }
	set_variable = { 1635.nationality = 123 }
	set_variable = { 1733.nationality = 123 }
	set_variable = { 1734.nationality = 139 }
	state_control_effect_786 = yes
	if = {
		limit = {
			country_exists = GLC
		}
		GLC = {
			set_capital = {
				state = 786
			}
		}
	}
	else = {
		FRA = {
			set_capital = {
				state = 786
			}
		}
	}
}

GGR_install_reichsland_finland = {
    set_autonomy = {
        target = FIN
        autonomous_state = autonomy_autonomous_reichskommissariat
    }
    FIN = {
        add_ideas = Pakt_Reichsland
        econ_join_sphere_GER = yes
    }

    hidden_effect = {
        add_to_faction = FIN
        GER = {
            transfer_state = 145
			145 = {
				set_demilitarized_zone = no
			}
			FIN = { transfer_navy = { target = GER } }
        }
        FIN = {
			#add_ideas = GGR_occupational_expenses_dummy
            set_cosmetic_tag = FIN_Reichsland
            set_politics = {
                ruling_party = fascism
            }
            set_popularities = {
                fascism = 43
                fascism_1 = 18
                national_socialism = 14
                anocracy = 8
                liberal_conservatism = 10
                conservatism = 7
            }
            set_party_name = {
                ideology = national_socialism
                long_name = FIN_reichsland_long
                name = FIN_reichsland_short
            }
            set_party_name = {
                ideology = fascism
                long_name = FIN_reichsland_long
                name = FIN_reichsland_short
            }
            set_party_name = {
                ideology = fascism_1
                long_name = FIN_reichsland_long
                name = FIN_reichsland_short
            }
        }
		if = {
			limit = {
				NOT = { ONG = { has_cosmetic_tag = ONG_unity } }
			}
			every_country = {
				limit = {
					is_central_russian_nation = yes
				}
				ONG = {
					declare_war_on = {
						target = PREV
						type = annex_everything
					}
				}
			}
		}
        if = {
            limit = {
                country_exists = MPR
            }
			WSR = {
                annex_country = {
                    target = MPR
                    transfer_troops = yes
                }
            }
        }
    }
}

GGR_conquered_russia = {
	
	hidden_effect = {
		if = {
			limit = {
				country_exists = RKT
			}
			clr_country_flag = GGR_operation_locked
			remove_dynamic_modifier = { modifier = GGR_fall_rot } 
			GGR_clear_temporary_variables = yes
		}
		GGR_reuse_AM_tags = yes
		add_stability = stab_taken
		add_war_support = war_supp_taken
		set_temp_variable = { pus_temp = pus_taken }
		econ_pus_change = yes
		clear_variable = stab_taken
		clear_variable = war_supp_taken
		clear_variable = pus_taken
		every_country = {
			limit = {
				has_country_flag = GGR_add_salted_earth
			}
			clr_country_flag = GGR_add_salted_earth
			add_timed_idea = {
				idea = AM_salted_earth
				days = 730
			}
		}
		remove_dynamic_modifier = { modifier = GGR_continued_resistance }
		if = {
			limit = {
				country_exists = RUS
			}
			every_possible_country = {
				limit = {
					OR = {
						is_central_asian_nation = yes
						is_kazakh_nation = yes
					}
					exists = no
				}
				every_core_state = {
					limit = {
						is_owned_by = RUS
					}
					transfer_state_to = RKT
				}
			}
			RKT = {
				GGR_set_up_RK_ROOT = yes
			}
		}
		if = {
			limit = {
				PRM = {
					is_in_faction_with = GER
					exists = yes
				}
			}
			GER = {
				set_autonomy = {
					target = PRM
					autonomous_state = autonomy_collaborator_puppet_state
				}
				country_event = { id = goering.rot.27 days = 2 }
			}
			every_country = {
				country_event = { id = WORLD_REICH.309 hours = 6 }
			}
			PRM = {
				add_political_power = 1000 #needed to integrate all hell of a mess
				country_event = RUS_wonder.0
				set_popularities = {
					national_socialism = 100
				}
				remove_faction_status = yes
				add_ideas = Pakt_Marionettenstaat
				set_country_flag = RUS_superregional_stage
				country_event = { id = goering.rot.27 days = 2 }
				set_country_leader_portrait = {
					ideology = national_socialism
					portrait = "gfx/leaders/GE/Portrait_PRM_Gutrum_Vagner.png"
				}
			}
		}
		else = {
			if = {
				limit = {
					NOT = { country_exists = FIN }
				}
				every_state = {
					limit = {
						is_core_of = FIN
						NOT = { is_owned_by = SCN }
					}
					transfer_state_to = SCN
				}
				SCN = { GGR_set_up_RK_ROOT = yes }
			}
			MCW = {
				every_state = {
					limit = {
						is_west_russian_state = yes
						is_AA_ural_region = no
					}
					transfer_state_to = PREV
					add_core_of = PREV
				}
			}
			RKU = {
				every_state = {
					limit = {
						is_AA_ural_region = yes
					}
					transfer_state_to = PREV
				}
				GGR_set_up_RK_ROOT = yes
				add_ideas = {
					RKU_bastion_against_slavs
					RUS_vorkuta_gulags
				}
			}
			if = {
				limit = {
					country_exists = RKT
				}
				846 = {
					if = {
						limit = {
							owner = { is_in_faction_with = GER }
						}
						transfer_state_to = RKT
						remove_core_of = RKU
					}
				}
				582 = {
					if = {
						limit = {
							owner = { is_in_faction_with = GER }
						}
						transfer_state_to = RKT
						remove_core_of = RKU
					}
				}
			}
			RKF = {
				every_state = {
					limit = {
						is_far_east_state = yes
						NOT = {
							state = 657
							is_owned_by = VIL
							is_owned_by = MAN
						}
					}
					RKF = {
						transfer_state = PREV
						add_state_core = PREV
					}
				}
				GGR_set_up_RK_ROOT = yes
				add_ideas = {
					RKF_yakut_diamonds
					GGR_RKS_wastes_of_siberia
				}
			}
			RKS = {
				every_state = {
					limit = {
						OR = {
							is_west_siberia_state = yes
							is_central_siberia_state = yes
							state = 329
						}
						is_AA_ural_region = no
						NOT = { 
							OR = {
								state = 814
								state = 565
								state = 863
							}
						}
					}
					RKS = {
						transfer_state = PREV
						add_state_core = PREV
					}
				}
				GGR_set_up_RK_ROOT = yes
				GER = {
					add_dynamic_modifier = { modifier = RUS_legacy_of_the_siberian_plan scope = RKS }
					add_ideas = GER_yakut_diamonds
				}
				if = {
					limit = {
						has_global_flag = RUS_Siberia_unification
					}
					set_temp_variable = { SIB_plan_country = SIB }
				}
				else_if = {
					limit = {
						has_global_flag = RUS_Central_Siberian_unification
					}
					set_temp_variable = { SIB_plan_country = CSB }
					CSB = { SIB_plan_reduce_effects = yes }
				}
				else = {
					set_temp_variable = { SIB_plan_country = TOM }
					TOM = { SIB_plan_reduce_effects = yes }
				}
				SIB_plan_transfer = yes
				SIB_plan_reduce_effects = yes
			}
			every_state = {
				limit = {
					OR = {
						state = 215
						state = 216
						state = 1359
						state = 1724
						state = 213
						state = 722
						state = 147
					}
				}
				if = {
					limit = {
						FIN = {
							is_in_faction_with = GER
						}
					}
					transfer_state_to = FIN
					add_core_of = FIN
				}
				else = {
					transfer_state_to = SCN
					add_core_of = SCN
				}
			}
			657 = {
				if = {
					limit = {
						is_owned_by = GER
					}
					RKF = {
						transfer_state = 1646
						transfer_state = 1647
						transfer_state = 657
						add_state_core = 1646
						add_state_core = 1647
						add_state_core = 657
					}	
				}	
			}
			ARC = {
				peace_out_effect = yes
			}
			add_to_array = { GGR_anarchy_states = 644 }
			add_to_array = { GGR_anarchy_states = 516 }
			add_to_array = { GGR_anarchy_states = 759 }
			add_to_array = { GGR_anarchy_states = 889 }
			add_to_array = { GGR_anarchy_states = 761 }
			add_to_array = { GGR_anarchy_states = 575 }
			add_to_array = { GGR_anarchy_states = 890 }
			GGR_update_anarchy = yes
		}
	}
}