add_policy = {
	add_to_array = { selected_policies_array = v }
	meta_effect = {
		text = {
			if = {
				limit = {
					NOT = { has_idea = eu4_like_policy_[POLICY] }
				}
				add_ideas = eu4_like_policy_[POLICY]
				add_dynamic_modifier = { modifier = eu4_like_policy_[POLICY] }
				set_variable = { eu4_like_policy_[POLICY]_date = global.date }
				add_to_variable = { eu4_like_policy_[POLICY]_date = 0.0075 }
			}
		}
		POLICY = "[?v]"
	}
	remove_from_array = { selectable_policies_array = v }
	update_idea_cost_modifiers = yes
	update_policy_costs = yes
	update_policy_window = yes
	update_main_ideas_window = yes
}

remove_policy = {
	country_event = { id = remove_policy_events.1 }
	update_idea_cost_modifiers = yes
	update_policy_costs = yes
	update_policy_window = yes
	update_main_ideas_window = yes
}

check_and_perhaps_remove_current_policies_effect = {
	clear_temp_array = policies_to_be_removed_temp
	if = {
		limit = {
			is_in_array = { selected_policies_array = 1 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 5 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 8 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 1 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 2 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 1 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 2 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 2 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 3 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 3 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 10 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 3 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 4 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 2 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 15 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 4 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 5 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 5 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 7 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 5 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 6 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 15 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 17 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 6 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 7 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 6 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 16 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 7 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 8 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 1 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 13 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 8 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 9 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 1 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 4 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 9 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 10 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 4 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 17 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 10 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 11 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 1 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 16 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 11 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 12 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 1 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 10 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 12 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 13 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 2 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 4 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 13 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 14 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 2 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 7 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 14 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 15 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 2 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 8 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 15 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 16 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 3 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 11 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 16 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 17 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 3 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 12 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 17 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 18 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 3 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 14 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 18 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 19 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 3 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 18 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 19 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 20 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 4 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 15 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 20 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 21 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 4 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 13 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 21 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 22 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 5 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 9 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 22 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 23 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 5 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 17 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 23 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 24 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 5 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 10 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 24 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 25 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 6 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 13 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 25 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 26 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 6 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 14 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 26 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 27 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 6 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 15 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 27 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 28 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 6 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 12 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 28 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 29 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 7 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 11 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 29 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 30 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 7 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 14 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 30 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 31 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 7 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 10 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 31 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 32 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 8 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 9 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 32 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 33 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 8 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 10 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 33 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 34 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 8 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 13 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 34 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 35 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 9 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 11 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 35 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 36 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 9 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 12 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 36 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 37 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 9 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 16 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 37 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 38 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 11 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 12 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 38 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 39 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 11 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 18 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 39 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 40 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 12 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 14 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 40 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 41 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 13 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 18 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 41 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 42 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 14 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 17 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 42 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 43 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 15 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 16 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 43 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 44 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 16 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 18 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 44 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 45 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 17 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 18 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 45 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 46 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 19 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 22 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 46 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 47 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 19 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 23 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 47 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 48 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 20 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 24 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 48 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 49 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 21 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 24 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 49 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 50 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 22 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 21 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 50 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 51 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 22 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 23 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 51 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 52 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 21 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 23 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 52 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 53 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 20 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 23 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 53 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 54 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 24 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 23 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 54 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 55 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 24 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 22 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 55 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 56 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 20 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 22 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 56 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 57 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 24 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 3 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 57 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 58 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 19 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 17 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 58 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 59 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 19 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 10 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 59 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 60 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 19 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 13 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 60 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 61 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 20 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 11 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 61 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 62 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 20 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 9 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 62 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 63 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 21 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 2 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 63 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 64 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 21 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 6 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 64 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 65 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 25 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 5 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 65 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 66 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 25 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 22 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 66 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 67 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 25 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 10 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 67 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 68 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 25 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 8 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 68 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 69 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 25 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 1 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 69 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 70 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 26 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 5 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 70 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 71 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 26 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 17 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 71 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 72 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 26 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 10 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 72 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 73 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 26 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 23 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 73 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 74 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 26 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 9 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 74 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 75 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 27 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 6 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 75 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 76 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 27 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 4 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 76 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 77 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 27 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 16 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 77 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 78 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 27 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 23 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 78 }
	}
	if = {
		limit = {
			is_in_array = { selected_policies_array = 79 }
			OR = {
				AND = {
					set_temp_variable = { idea_group_out_of_context = 27 }
					NOT = { has_completed_idea_group = yes }
				}
				AND = {
					set_temp_variable = { idea_group_out_of_context = 1 }
					NOT = { has_completed_idea_group = yes }
				}
			}
		}
		add_to_temp_array = { policies_to_be_removed_temp = 79 }
	}

	if = {
		limit = {
			check_variable = { policies_to_be_removed_temp^num > 0 }
		}
		for_each_loop = {
			array = policies_to_be_removed_temp
			value = v
			remove_policy = yes
		}
	}
	if = {
		limit = {
			NOT = { has_not_selected_max_amount_of_policies = yes }
		}
		clear_temp_array = selected_policies_array_temp
		for_each_loop = {
			array = selected_policies_array
			value = v
			add_to_temp_array = { selected_policies_array_temp = v }
		}
		resize_array = { selected_policies_array = max_amount_of_policies }
		for_each_loop = {
			array = selected_policies_array_temp
			value = v
			if = {
				limit = {
					NOT = { is_in_array = { selected_policies_array = v } }
				}
				remove_policy = yes
			}
		}
	}
}

update_policies_effect = {
	clear_array = selectable_policies_array
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 1 } }
			set_temp_variable = { idea_group_out_of_context = 5 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 8 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 1 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 2 } }
			set_temp_variable = { idea_group_out_of_context = 1 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 2 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 2 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 3 } }
			set_temp_variable = { idea_group_out_of_context = 3 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 10 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 3 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 4 } }
			set_temp_variable = { idea_group_out_of_context = 2 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 15 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 4 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 5 } }
			set_temp_variable = { idea_group_out_of_context = 5 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 7 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 5 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 6 } }
			set_temp_variable = { idea_group_out_of_context = 15 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 17 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 6 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 7 } }
			set_temp_variable = { idea_group_out_of_context = 6 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 16 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 7 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 8 } }
			set_temp_variable = { idea_group_out_of_context = 1 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 13 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 8 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 9 } }
			set_temp_variable = { idea_group_out_of_context = 1 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 4 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 9 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 10 } }
			set_temp_variable = { idea_group_out_of_context = 4 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 17 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 10 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 11 } }
			set_temp_variable = { idea_group_out_of_context = 1 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 16 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 11 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 12 } }
			set_temp_variable = { idea_group_out_of_context = 1 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 10 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 12 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 13 } }
			set_temp_variable = { idea_group_out_of_context = 2 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 4 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 13 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 14 } }
			set_temp_variable = { idea_group_out_of_context = 2 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 7 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 14 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 15 } }
			set_temp_variable = { idea_group_out_of_context = 2 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 8 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 15 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 16 } }
			set_temp_variable = { idea_group_out_of_context = 3 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 11 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 16 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 17 } }
			set_temp_variable = { idea_group_out_of_context = 3 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 12 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 17 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 18 } }
			set_temp_variable = { idea_group_out_of_context = 3 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 14 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 18 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 19 } }
			set_temp_variable = { idea_group_out_of_context = 3 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 18 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 19 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 20 } }
			set_temp_variable = { idea_group_out_of_context = 4 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 15 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 20 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 21 } }
			set_temp_variable = { idea_group_out_of_context = 4 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 13 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 21 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 22 } }
			set_temp_variable = { idea_group_out_of_context = 5 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 9 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 22 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 23 } }
			set_temp_variable = { idea_group_out_of_context = 5 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 17 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 23 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 24 } }
			set_temp_variable = { idea_group_out_of_context = 5 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 10 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 24 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 25 } }
			set_temp_variable = { idea_group_out_of_context = 6 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 13 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 25 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 26 } }
			set_temp_variable = { idea_group_out_of_context = 6 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 14 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 26 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 27 } }
			set_temp_variable = { idea_group_out_of_context = 6 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 15 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 27 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 28 } }
			set_temp_variable = { idea_group_out_of_context = 6 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 12 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 28 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 29 } }
			set_temp_variable = { idea_group_out_of_context = 7 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 11 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 29 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 30 } }
			set_temp_variable = { idea_group_out_of_context = 7 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 14 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 30 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 31 } }
			set_temp_variable = { idea_group_out_of_context = 7 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 10 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 31 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 32 } }
			set_temp_variable = { idea_group_out_of_context = 8 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 9 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 32 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 33 } }
			set_temp_variable = { idea_group_out_of_context = 8 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 10 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 33 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 34 } }
			set_temp_variable = { idea_group_out_of_context = 8 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 13 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 34 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 35 } }
			set_temp_variable = { idea_group_out_of_context = 9 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 11 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 35 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 36 } }
			set_temp_variable = { idea_group_out_of_context = 9 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 12 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 36 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 37 } }
			set_temp_variable = { idea_group_out_of_context = 9 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 16 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 37 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 38 } }
			set_temp_variable = { idea_group_out_of_context = 11 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 12 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 38 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 39 } }
			set_temp_variable = { idea_group_out_of_context = 11 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 18 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 39 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 40 } }
			set_temp_variable = { idea_group_out_of_context = 12 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 14 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 40 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 41 } }
			set_temp_variable = { idea_group_out_of_context = 13 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 18 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 41 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 42 } }
			set_temp_variable = { idea_group_out_of_context = 14 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 17 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 42 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 43 } }
			set_temp_variable = { idea_group_out_of_context = 15 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 16 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 43 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 44 } }
			set_temp_variable = { idea_group_out_of_context = 16 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 18 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 44 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 45 } }
			set_temp_variable = { idea_group_out_of_context = 17 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 18 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 45 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 46 } }
			set_temp_variable = { idea_group_out_of_context = 19 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 22 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 46 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 47 } }
			set_temp_variable = { idea_group_out_of_context = 19 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 23 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 47 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 48 } }
			set_temp_variable = { idea_group_out_of_context = 20 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 24 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 48 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 49 } }
			set_temp_variable = { idea_group_out_of_context = 21 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 24 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 49 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 50 } }
			set_temp_variable = { idea_group_out_of_context = 22 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 21 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 50 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 51 } }
			set_temp_variable = { idea_group_out_of_context = 22 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 23 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 51 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 52 } }
			set_temp_variable = { idea_group_out_of_context = 21 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 23 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 52 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 53 } }
			set_temp_variable = { idea_group_out_of_context = 20 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 23 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 53 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 54 } }
			set_temp_variable = { idea_group_out_of_context = 24 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 23 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 54 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 55 } }
			set_temp_variable = { idea_group_out_of_context = 24 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 22 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 55 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 56 } }
			set_temp_variable = { idea_group_out_of_context = 20 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 22 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 56 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 57 } }
			set_temp_variable = { idea_group_out_of_context = 24 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 3 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 57 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 58 } }
			set_temp_variable = { idea_group_out_of_context = 19 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 17 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 58 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 59 } }
			set_temp_variable = { idea_group_out_of_context = 19 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 10 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 59 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 60 } }
			set_temp_variable = { idea_group_out_of_context = 19 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 13 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 60 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 61 } }
			set_temp_variable = { idea_group_out_of_context = 20 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 11 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 61 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 62 } }
			set_temp_variable = { idea_group_out_of_context = 20 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 9 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 62 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 63 } }
			set_temp_variable = { idea_group_out_of_context = 21 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 2 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 63 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 64 } }
			set_temp_variable = { idea_group_out_of_context = 21 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 6 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 64 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 65 } }
			set_temp_variable = { idea_group_out_of_context = 25 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 5 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 65 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 66 } }
			set_temp_variable = { idea_group_out_of_context = 25 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 22 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 66 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 67 } }
			set_temp_variable = { idea_group_out_of_context = 25 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 10 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 67 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 68 } }
			set_temp_variable = { idea_group_out_of_context = 25 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 8 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 68 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 69 } }
			set_temp_variable = { idea_group_out_of_context = 25 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 1 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 69 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 70 } }
			set_temp_variable = { idea_group_out_of_context = 26 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 5 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 70 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 71 } }
			set_temp_variable = { idea_group_out_of_context = 26 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 17 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 71 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 72 } }
			set_temp_variable = { idea_group_out_of_context = 26 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 10 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 72 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 73 } }
			set_temp_variable = { idea_group_out_of_context = 26 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 23 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 73 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 74 } }
			set_temp_variable = { idea_group_out_of_context = 26 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 9 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 74 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 75 } }
			set_temp_variable = { idea_group_out_of_context = 27 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 6 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 75 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 76 } }
			set_temp_variable = { idea_group_out_of_context = 27 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 4 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 76 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 77 } }
			set_temp_variable = { idea_group_out_of_context = 27 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 16 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 77 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 78 } }
			set_temp_variable = { idea_group_out_of_context = 27 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 23 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 78 }
	}
	if = {
		limit = {
			NOT = { is_in_array = { selected_policies_array = 79 } }
			set_temp_variable = { idea_group_out_of_context = 27 }
			has_selected_idea_group = yes
			set_temp_variable = { idea_group_out_of_context = 1 }
			has_selected_idea_group = yes
		}
		add_to_array = { selectable_policies_array = 79 }
	}
	update_policy_window = yes
}

update_policy_costs = {
	set_variable = { eu4_like_ideas_country_policy_cost = global.eu4_like_ideas_policy_cost }
	set_temp_variable = { eu4_like_ideas_country_policy_cost_modifier = 1 }
	add_to_temp_variable = { eu4_like_ideas_country_policy_cost_modifier = modifier@policy_cost }
	multiply_variable = { eu4_like_ideas_country_policy_cost = eu4_like_ideas_country_policy_cost_modifier }
	# Round to two decimals
	divide_variable = { eu4_like_ideas_country_policy_cost = 10 }
	multiply_variable = { eu4_like_ideas_country_policy_cost = 10 }
	# Min Policy Cost
	if = {
		limit = {
			check_variable = { eu4_like_ideas_country_policy_cost < 0.05 }
		}
		set_variable = { eu4_like_ideas_country_policy_cost = 0.05 }
	}
	force_update_dynamic_modifier = yes
}