GGR_extend_division_limit_volksgrenadiers = {
	custom_effect_tooltip = GGR_extend_army_volksgrenadiers
	hidden_effect = {
		ROOT = {
			every_army_leader = {
				add_trait = { trait = GGR_volksgrenadiers }
			}
			every_army_leader = {
				limit = {
					has_trait = skilled_staffer
					NOT = { has_trait = GGR_volksgrenadiers_skilled }
				}
				add_trait = { trait = GGR_volksgrenadiers_skilled }
			}
		}
	}
}

GGR_unlock_helicopter_templates = {
    custom_effect_tooltip = GGR_unlock_helicopter_divisions
    division_template = {
        name = "Fallschirmjager - 9"
        division_names_group = GGR_paratroopers
        is_locked = no
        regiments = {
            helicopter_1 = { x = 0 y = 0 }
            helicopter_1 = { x = 0 y = 1 }
            helicopter_1 = { x = 0 y = 2 }
            helicopter_1 = { x = 1 y = 0 }
            helicopter_1 = { x = 1 y = 1 }
            helicopter_1 = { x = 1 y = 2 }
            helicopter_1 = { x = 2 y = 0 }
            helicopter_1 = { x = 2 y = 1 }
            helicopter_1 = { x = 2 y = 2 }
        }
    }
    
    division_template = {
        name = "Fallschirmjager - 16"
        division_names_group = GGR_paratroopers
        is_locked = no
        regiments = {
            helicopter_1 = { x = 0 y = 0 }
            helicopter_1 = { x = 0 y = 1 }
            helicopter_1 = { x = 0 y = 2 }
            helicopter_1 = { x = 0 y = 3 }
            helicopter_1 = { x = 1 y = 0 }
            helicopter_1 = { x = 1 y = 1 }
            helicopter_1 = { x = 1 y = 2 }
            helicopter_1 = { x = 1 y = 3 }
            helicopter_1 = { x = 2 y = 0 }
            helicopter_1 = { x = 2 y = 1 }
            helicopter_1 = { x = 2 y = 2 }
            helicopter_1 = { x = 2 y = 3 }
            helicopter_1 = { x = 3 y = 0 }
            helicopter_1 = { x = 3 y = 1 }
            helicopter_1 = { x = 3 y = 2 }
            helicopter_1 = { x = 3 y = 3 }
        }
    }
    
    division_template = {
        name = "Fallschirmjager - 25"
        division_names_group = GGR_paratroopers
        is_locked = no
        regiments = {
            helicopter_1 = { x = 0 y = 0 }
            helicopter_1 = { x = 0 y = 1 }
            helicopter_1 = { x = 0 y = 2 }
            helicopter_1 = { x = 0 y = 3 }
            helicopter_1 = { x = 0 y = 4 }
            helicopter_1 = { x = 1 y = 0 }
            helicopter_1 = { x = 1 y = 1 }
            helicopter_1 = { x = 1 y = 2 }
            helicopter_1 = { x = 1 y = 3 }
            helicopter_1 = { x = 1 y = 4 }
            helicopter_1 = { x = 2 y = 0 }
            helicopter_1 = { x = 2 y = 1 }
            helicopter_1 = { x = 2 y = 2 }
            helicopter_1 = { x = 2 y = 3 }
            helicopter_1 = { x = 2 y = 4 }
            helicopter_1 = { x = 3 y = 0 }
            helicopter_1 = { x = 3 y = 1 }
            helicopter_1 = { x = 3 y = 2 }
            helicopter_1 = { x = 3 y = 3 }
            helicopter_1 = { x = 3 y = 4 }
            helicopter_1 = { x = 4 y = 0 }
            helicopter_1 = { x = 4 y = 1 }
            helicopter_1 = { x = 4 y = 2 }
            helicopter_1 = { x = 4 y = 3 }
            helicopter_1 = { x = 4 y = 4 }
        }
    }
}



GGR_unlock_liger_templates = {
    custom_effect_tooltip = GGR_unlock_liger_divisions
    division_template = {
        name = "Das Liger Division - 9"
        division_names_group = GGR_panzer
        is_locked = no 
        regiments = {
            Liger = { x = 0 y = 0 }
            Liger = { x = 0 y = 1 }
            Liger = { x = 0 y = 2 }
            Liger = { x = 1 y = 0 }
            Liger = { x = 1 y = 1 }
            Liger = { x = 1 y = 2 }
            Liger = { x = 2 y = 0 }
            Liger = { x = 2 y = 1 }
            Liger = { x = 2 y = 2 }
        }
    }
    
    division_template = {
        name = "Das Liger Division - 16"
        division_names_group = GGR_panzer
        is_locked = no 
        regiments = {
            Liger = { x = 0 y = 0 }
            Liger = { x = 0 y = 1 }
            Liger = { x = 0 y = 2 }
            Liger = { x = 0 y = 3 }
            Liger = { x = 1 y = 0 }
            Liger = { x = 1 y = 1 }
            Liger = { x = 1 y = 2 }
            Liger = { x = 1 y = 3 }
            Liger = { x = 2 y = 0 }
            Liger = { x = 2 y = 1 }
            Liger = { x = 2 y = 2 }
            Liger = { x = 2 y = 3 }
            Liger = { x = 3 y = 0 }
            Liger = { x = 3 y = 1 }
            Liger = { x = 3 y = 2 }
            Liger = { x = 3 y = 3 }
        }
    }

    division_template = {
        name = "Das Liger Division - 25"
        division_names_group = GGR_panzer
        is_locked = no 
        regiments = {
            Liger = { x = 0 y = 0 }
            Liger = { x = 0 y = 1 }
            Liger = { x = 0 y = 2 }
            Liger = { x = 0 y = 3 }
            Liger = { x = 0 y = 4 }
            Liger = { x = 1 y = 0 }
            Liger = { x = 1 y = 1 }
            Liger = { x = 1 y = 2 }
            Liger = { x = 1 y = 3 }
            Liger = { x = 1 y = 4 }
            Liger = { x = 2 y = 0 }
            Liger = { x = 2 y = 1 }
            Liger = { x = 2 y = 2 }
            Liger = { x = 2 y = 3 }
            Liger = { x = 2 y = 4 }
            Liger = { x = 3 y = 0 }
            Liger = { x = 3 y = 1 }
            Liger = { x = 3 y = 2 }
            Liger = { x = 3 y = 3 }
            Liger = { x = 3 y = 4 }
            Liger = { x = 4 y = 0 }
            Liger = { x = 4 y = 1 }
            Liger = { x = 4 y = 2 }
            Liger = { x = 4 y = 3 }
            Liger = { x = 4 y = 4 }
        }
    }
}


GGR_spawn_good_attack_2 = {
    division_template = {
        name = "GORING GOOD DIVISION ATTACK 2"
        division_names_group = GGR_panzer
        is_locked = yes
        regiments = {
            MBT = { x = 0 y = 0 }
            MBT = { x = 0 y = 1 }
            MBT = { x = 0 y = 2 }
            MBT = { x = 0 y = 3 }
            MBT = { x = 1 y = 0 }
            MBT = { x = 1 y = 1 }
            MBT = { x = 1 y = 2 }
            MBT = { x = 1 y = 3 }
            APC = { x = 2 y = 0 }
            APC = { x = 2 y = 1 }
            APC = { x = 2 y = 2 }
            APC = { x = 2 y = 3 }
            sp_artillery_brigade = { x = 3 y = 0 }
            sp_artillery_brigade = { x = 3 y = 1 }
            sp_artillery_brigade = { x = 3 y = 2 }
            sp_artillery_brigade = { x = 3 y = 3 }
            sp_anti_air_brigade = { x = 3 y = 4 }
        }
        support = {
            engineer = { x = 0 y = 0 }
            MBT_recon = { x = 0 y = 1 }
            logistics_company = { x = 0 y = 2 }
            signal_company = { x = 0 y = 3 }
        }
    }
    if = {
        limit = {
            NOT = { has_variable = division_count }
        }
        set_temp_variable = { division_count = 1 }
    }
    if = {
        limit = {
            capital_scope = {
                is_fully_controlled_by = PREV
            }
        }
        capital_scope = {
            create_unit = {
                division = "division_template = \"GORING GOOD DIVISION ATTACK 2\" start_experience_factor = 1 start_equipment_factor = 1"
                owner = PREV
                count = division_count
            }
        }
    }
    else = {
        random_owned_controlled_state = {
            create_unit = {
                division = "division_template = \"GORING GOOD DIVISION ATTACK 2\" start_experience_factor = 1 start_equipment_factor = 1"
                owner = PREV
                count = division_count
            }
        }
    }
}
GGR_spawn_good_attack = {
    division_template = {
        name = "GORING GOOD DIVISION ATTACK"
        division_names_group = GGR_panzer
        is_locked = yes
        regiments = {
            heavy_tank = { x = 0 y = 0 }
            heavy_tank = { x = 0 y = 1 }
            heavy_tank = { x = 0 y = 2 }
            heavy_tank = { x = 0 y = 3 }
            heavy_tank = { x = 1 y = 0 }
            heavy_tank = { x = 1 y = 1 }
            heavy_tank = { x = 1 y = 2 }
            heavy_tank = { x = 1 y = 3 }
            APC = { x = 2 y = 0 }
            APC = { x = 2 y = 1 }
            APC = { x = 2 y = 2 }
            APC = { x = 2 y = 3 }
            sp_artillery_brigade = { x = 3 y = 0 }
            sp_artillery_brigade = { x = 3 y = 1 }
            sp_artillery_brigade = { x = 3 y = 2 }
            sp_artillery_brigade = { x = 3 y = 3 }
            sp_anti_air_brigade = { x = 3 y = 4 }
        }
        support = {
            engineer = { x = 0 y = 0 }
            MBT_recon = { x = 0 y = 1 }
            field_hospital = { x = 0 y = 2 }
            signal_company = { x = 0 y = 3 }
        }
    }
    if = {
        limit = {
            NOT = { has_variable = division_count }
        }
        set_temp_variable = { division_count = 1 }
    }
    if = {
        limit = {
            capital_scope = {
                is_fully_controlled_by = PREV
            }
        }
        capital_scope = {
            create_unit = {
                division = "division_template = \"GORING GOOD DIVISION ATTACK\" start_experience_factor = 1 start_equipment_factor = 1"
                owner = PREV
                count = division_count
            }
        }
    }
    else = {
        random_owned_controlled_state = {
            create_unit = {
                division = "division_template = \"GORING GOOD DIVISION ATTACK\" start_experience_factor = 1 start_equipment_factor = 1"
                owner = PREV
                count = division_count
            }
        }
    }
}
GGR_spawn_good_infantry = {
    division_template = {
        name = "GORING GOOD DIVISION INFANTRY"
        division_names_group = GGR_infantry
        is_locked = yes
        regiments = {
            elite_infantry = { x = 0 y = 0 }
            elite_infantry = { x = 0 y = 1 }
            elite_infantry = { x = 0 y = 2 }
            elite_infantry = { x = 0 y = 3 }
            elite_infantry = { x = 1 y = 0 }
            elite_infantry = { x = 1 y = 1 }
            elite_infantry = { x = 1 y = 2 }
            elite_infantry = { x = 1 y = 3 }
            elite_infantry = { x = 2 y = 0 }
            elite_infantry = { x = 2 y = 1 }
            elite_infantry = { x = 2 y = 2 }
            elite_infantry = { x = 2 y = 3 }
            artillery_brigade = { x = 3 y = 0 }
            artillery_brigade = { x = 3 y = 1 }
            artillery_brigade = { x = 3 y = 2 }
        }
        support = {
            engineer = { x = 0 y = 0 }
            artillery = { x = 0 y = 1 }
            logistics_company = { x = 0 y = 2 }
            signal_company = { x = 0 y = 3 }
        }
    }
    if = {
        limit = {
            NOT = { has_variable = division_count }
        }
        set_temp_variable = { division_count = 1 }
    }
    if = {
        limit = {
            capital_scope = {
                is_fully_controlled_by = PREV
            }
        }
        capital_scope = {
            create_unit = {
                division = "division_template = \"GORING GOOD DIVISION INFANTRY\" start_experience_factor = 1 start_equipment_factor = 1"
                owner = PREV
                count = division_count
            }
        }
    }
    else = {
        random_owned_controlled_state = {
            create_unit = {
                division = "division_template = \"GORING GOOD DIVISION INFANTRY\" start_experience_factor = 1 start_equipment_factor = 1"
                owner = PREV
                count = division_count
            }
        }
    }
}
GGR_spawn_good_motorized = {
    division_template = {
        name = "GORING GOOD DIVISION MOTORIZED"
        division_names_group = GGR_motorized
        is_locked = yes
        regiments = {
            motorized = { x = 0 y = 0 }
            motorized = { x = 0 y = 1 }
            motorized = { x = 0 y = 2 }
            motorized = { x = 0 y = 3 }
            motorized = { x = 1 y = 0 }
            motorized = { x = 1 y = 1 }
            motorized = { x = 1 y = 2 }
            motorized = { x = 1 y = 3 }
            motorized = { x = 2 y = 0 }
            motorized = { x = 2 y = 1 }
            motorized = { x = 2 y = 2 }
            motorized = { x = 2 y = 3 }
            APC = { x = 3 y = 0 }
            APC = { x = 3 y = 1 }
            APC = { x = 3 y = 2 }
        }
        support = {
            engineer = { x = 0 y = 0 }
            ifv_recon = { x = 0 y = 1 }
            field_hospital = { x = 0 y = 2 }
            signal_company = { x = 0 y = 3 }
        }
    }
    if = {
        limit = {
            NOT = { has_variable = division_count }
        }
        set_temp_variable = { division_count = 1 }
    }
    if = {
        limit = {
            capital_scope = {
                is_fully_controlled_by = PREV
            }
        }
        capital_scope = {
            create_unit = {
                division = "division_template = \"GORING GOOD DIVISION MOTORIZED\" start_experience_factor = 1 start_equipment_factor = 1"
                owner = PREV
                count = division_count
            }
        }
    }
    else = {
        random_owned_controlled_state = {
            create_unit = {
                division = "division_template = \"GORING GOOD DIVISION MOTORIZED\" start_experience_factor = 1 start_equipment_factor = 1"
                owner = PREV
                count = division_count
            }
        }
    }
}

GGR_spawn_divisions_hard_mode = {
    set_temp_variable = { division_count = 25 }
    GGR_spawn_good_infantry = yes
    set_temp_variable = { division_count = 10 }
    GGR_spawn_good_attack = yes
    GGR_spawn_good_motorized = yes
}