## SCOPE: Country research_slot_init_for_country = { set_research_slots = 0 set_variable = { research_slots_from_gdp = 0 } set_variable = { next_slot_from_gdp = 1 } set_variable = { research_slots_from_gdp_c = 0 } set_variable = { next_slot_from_gdp_c = 1 } if = { limit = { check_variable = { gdp_total > GLOBAL.gdp_slot^1 } } add_research_slot = 1 add_to_variable = { research_slots_from_gdp = 1 } add_to_variable = { next_slot_from_gdp = 1 } } if = { limit = { check_variable = { gdp_total > GLOBAL.gdp_slot^2 } } add_research_slot = 1 add_to_variable = { research_slots_from_gdp = 1 } add_to_variable = { next_slot_from_gdp = 1 } } if = { limit = { check_variable = { gdp_total > GLOBAL.gdp_slot^3 } } add_research_slot = 1 add_to_variable = { research_slots_from_gdp = 1 } add_to_variable = { next_slot_from_gdp = 1 } } if = { limit = { check_variable = { gdp_total > GLOBAL.gdp_slot^4 } } add_research_slot = 1 add_to_variable = { research_slots_from_gdp = 1 } add_to_variable = { next_slot_from_gdp = 1 } } if = { limit = { check_variable = { gdp_total > GLOBAL.gdp_slot^5 } } add_research_slot = 1 add_to_variable = { research_slots_from_gdp = 1 } add_to_variable = { next_slot_from_gdp = 1 } } if = { limit = { check_variable = { gdp_total > GLOBAL.gdp_slot^6 } } add_research_slot = 1 add_to_variable = { research_slots_from_gdp = 1 } add_to_variable = { next_slot_from_gdp = 1 } } if = { limit = { check_variable = { gdp_total > GLOBAL.gdp_slot^7 } } add_research_slot = 1 add_to_variable = { research_slots_from_gdp = 1 } add_to_variable = { next_slot_from_gdp = 1 } } if = { limit = { check_variable = { gdp_total > GLOBAL.gdp_slot^8 } } add_research_slot = 1 add_to_variable = { research_slots_from_gdp = 1 } add_to_variable = { next_slot_from_gdp = 1 } } if = { limit = { check_variable = { gdp_total > GLOBAL.gdp_slot^9 } } add_research_slot = 1 add_to_variable = { research_slots_from_gdp = 1 } add_to_variable = { next_slot_from_gdp = 1 } } if = { limit = { check_variable = { gdp_per_capita > GLOBAL.gdp_c_slot^1 } } add_research_slot = 1 add_to_variable = { research_slots_from_gdp_c = 1 } add_to_variable = { next_slot_from_gdp_c = 1 } } if = { limit = { check_variable = { gdp_per_capita > GLOBAL.gdp_c_slot^2 } } add_research_slot = 1 add_to_variable = { research_slots_from_gdp_c = 1 } add_to_variable = { next_slot_from_gdp_c = 1 } } if = { limit = { check_variable = { gdp_per_capita > GLOBAL.gdp_c_slot^3 } } add_research_slot = 1 add_to_variable = { research_slots_from_gdp_c = 1 } add_to_variable = { next_slot_from_gdp_c = 1 } } if = { limit = { check_variable = { gdp_per_capita > GLOBAL.gdp_c_slot^4 } } add_research_slot = 1 add_to_variable = { research_slots_from_gdp_c = 1 } add_to_variable = { next_slot_from_gdp_c = 1 } } if = { limit = { check_variable = { gdp_per_capita > GLOBAL.gdp_c_slot^5 } } add_research_slot = 1 add_to_variable = { research_slots_from_gdp_c = 1 } add_to_variable = { next_slot_from_gdp_c = 1 } } if = { limit = { check_variable = { gdp_per_capita > GLOBAL.gdp_c_slot^6 } } add_research_slot = 1 add_to_variable = { research_slots_from_gdp_c = 1 } add_to_variable = { next_slot_from_gdp_c = 1 } } } add_research_buff = { if = { limit = { has_idea = research_idea_1 } swap_ideas = { remove_idea = research_idea_1 add_idea = research_idea_2 } } else_if = { limit = { has_idea = research_idea_2 } swap_ideas = { remove_idea = research_idea_2 add_idea = research_idea_3 } } else_if = { limit = { has_idea = research_idea_3 } add_political_power = 150 } else = { add_ideas = research_idea_1 } } generic_research_buff = { if = { limit = { has_idea = scientific_advances } swap_ideas = { remove_idea = scientific_advances add_idea = scientific_advances2 } } else_if = { limit = { has_idea = scientific_advances2 } swap_ideas = { remove_idea = scientific_advances2 add_idea = scientific_advances3 } } else_if = { limit = { has_idea = scientific_advances3 } swap_ideas = { remove_idea = scientific_advances3 add_idea = scientific_advances4 } } else_if = { limit = { has_idea = scientific_advances4 } swap_ideas = { remove_idea = scientific_advances4 add_idea = scientific_advances5 } } else_if = { limit = { has_idea = scientific_advances5 } swap_ideas = { remove_idea = scientific_advances5 add_idea = scientific_advances6 } } else = { add_ideas = scientific_advances } }