grh_expedition_discovery = {
    custom_effect_tooltip = grh_expedition_discovery_tt
    hidden_effect = {
         if = {
            limit = {
                NOT = {
                    has_country_flag = grh_expedition_discovery_one
                }
            }
            country_event = nf_grh.200
            set_country_flag = grh_expedition_discovery_one

            else_if = {
                limit = {
                    NOT = {
                        has_country_flag = grh_expedition_discovery_two
                    }
                }
                country_event = nf_grh.201
                set_country_flag = grh_expedition_discovery_two

                else_if = {
                    limit = {
                        NOT = {
                            has_country_flag = grh_expedition_discovery_three
                        }
                    }
                    country_event = nf_grh.202
                    set_country_flag = grh_expedition_discovery_three

                    else_if = {
                        limit = {
                            NOT = {
                                has_country_flag = grh_expedition_discovery_four
                            }
                        }
                        country_event = nf_grh.203
                        set_country_flag = grh_expedition_discovery_four

                        else_if = {
                            limit = {
                                NOT = {
                                    has_country_flag = grh_expedition_discovery_five
                                }
                            }
                            country_event = nf_grh.204
                            set_country_flag = grh_expedition_discovery_five

                            else = {
                                country_event = nf_grh.199
                            }
                        }
                    }
                }
            }
        }
    }
}

grh_updating_south_modifiers = {
    set_variable = { grh_temp_exp = grh_south_strength }
                divide_variable = { 
                    var = grh_temp_exp 
                    value = 100 
                }
                set_variable = {
                    grh_army_experience = grh_temp_exp
                }

                set_variable = { grh_temp_support = grh_south_strength }
                divide_variable = { 
                    var = grh_temp_support 
                    value = 500 
                }
                set_variable = {
                    grh_war_support = grh_temp_support
                }
                

                set_variable = { grh_temp_stability = grh_south_defence }
                subtract_from_variable = {
                    var = grh_temp_stability
                    value = grh_south_strength
                }
                divide_variable = { 
                    var = grh_temp_stability 
                    value = 400 
                }
                set_variable = {
                    grh_stability = grh_temp_stability
                }

                set_variable = { grh_temp_population = grh_south_population }
                divide_variable = { 
                    var = grh_temp_population
                    value = 40
                }
                subtract_from_variable = { 
                    var = grh_temp_population
                    value = 0.05 
                }
                set_variable = {
                    grh_population_change = grh_temp_population
                }

                set_variable = { grh_temp_consume = grh_south_investment }
                divide_variable = { 
                    var = grh_temp_consume
                    value = 400 
                }
                subtract_from_variable = { 
                    var = grh_temp_consume
                    value = 0.1
                }
                multiply_variable = {
                    var = grh_temp_consume
                    value = -1
                }
                set_variable = {
                    grh_consumption = grh_temp_consume
                }

                set_variable = { grh_temp_resources = grh_south_investment }
                multiply_variable = { 
                    var = grh_temp_resources
                    value = grh_south_population
                }
                subtract_from_variable = {
                    var = grh_temp_resources
                    value = 1400
                }
                clamp_variable = {
                    var = grh_temp_resources
                    min = 0
                }
                divide_variable = { 
                    var = grh_temp_resources
                    value = 10000
                }
                set_variable = {
                    grh_resources = grh_temp_resources
                }
}