### Increase  / Decrease the Separatism in the cities
#Example:
#set_temp_variable = { separatism_to_gain = 0.1 }
#add_vidin_separatism_with_tooltip_effect = yes

#Dobruja
add_varna_separatism_with_tooltip_effect = {
	if = {
			limit = { #Checks if the city is locked or not
				NOT = {
					OR = {
						has_country_flag = OTO_varna_locked_flag
						has_country_flag = OTO_varna_is_fully_hellenized
					}
				}
			}
			if = {
				limit = {
					check_variable = { separatism_to_gain < 0 } #Checks if the values are positive
				}
				custom_effect_tooltip = LOSE_SEPARATISM_VARNA_TT #Gives a TT for losing separatism / hellenization
			}
			else = {
				custom_effect_tooltip = GAIN_SEPARATISM_VARNA_TT #Gives a TT for gaining separatism / hellenization
			}
			hidden_effect = { #This section will give the values specified on the temp variable to the actual variable
				set_temp_variable = { varna_separatism_temp = OTO_varna_separatism } 
				add_to_variable = { OTO_varna_separatism = separatism_to_gain }
				clamp_variable = { #Keeps the value of the var between 0 and 1 (0 and 100)
					var = OTO_varna_separatism
					min = 0
					max = 1
				}
			}
	}
}
add_dobrich_separatism_with_tooltip_effect = {
	if = {
		limit = { 
				NOT = {
					OR = {
						has_country_flag = OTO_dobrich_locked_flag
						has_country_flag = OTO_dobrich_is_fully_hellenized
					}
				}
			}
			if = {
				limit = {
					check_variable = { separatism_to_gain < 0 } 
				}
				custom_effect_tooltip = LOSE_SEPARATISM_DOBRICH_TT 
			}
			else = {
				custom_effect_tooltip = GAIN_SEPARATISM_DOBRICH_TT 
			}
			hidden_effect = { 
				set_temp_variable = { dobrich_separatism_temp = OTO_dobrich_separatism } 
				add_to_variable = { OTO_dobrich_separatism = separatism_to_gain }
				clamp_variable = { 
					var = OTO_dobrich_separatism
					min = 0
					max = 1
				}
			}
		}
}
add_silistra_separatism_with_tooltip_effect = {
		if = {
			limit = { 
				NOT = {
					OR = {
						has_country_flag = OTO_silistra_locked_flag
						has_country_flag = OTO_silistra_is_fully_hellenized
					}
				}
			}
			if = {
				limit = {
					check_variable = { separatism_to_gain < 0 } 
				}
				custom_effect_tooltip = LOSE_SEPARATISM_SILISTRA_TT 
			}
			else = {
				custom_effect_tooltip = GAIN_SEPARATISM_SILISTRA_TT 
			}
			hidden_effect = { 
				set_temp_variable = { silistra_separatism_temp = OTO_silistra_separatism } 
				add_to_variable = { OTO_silistra_separatism = separatism_to_gain }
				clamp_variable = { 
					var = OTO_silistra_separatism
					min = 0
					max = 1
				}
			}
		}
}
add_tutrakan_separatism_with_tooltip_effect = {
		if = {
			limit = { 
				NOT = {
					OR = {
						has_country_flag = OTO_tutrakan_locked_flag
						has_country_flag = OTO_tutrakan_is_fully_hellenized
					}
				}
			}
			if = {
				limit = {
					check_variable = { separatism_to_gain < 0 } 
				}
				custom_effect_tooltip = LOSE_SEPARATISM_TUTRAKAN_TT 
			}
			else = {
				custom_effect_tooltip = GAIN_SEPARATISM_TUTRAKAN_TT 
			}
			hidden_effect = { 
				set_temp_variable = { tutrakan_separatism_temp = OTO_tutrakan_separatism } 
				add_to_variable = { OTO_tutrakan_separatism = separatism_to_gain }
				clamp_variable = { 
					var = OTO_tutrakan_separatism
					min = 0
					max = 1
				}
			}
		}
}
add_kyustendja_separatism_with_tooltip_effect = {
		if = {
			limit = { 
				NOT = {
					OR = {
						has_country_flag = OTO_kyustendja_locked_flag
						has_country_flag = OTO_kyustendja_is_fully_hellenized
					}
				}
			}
			if = {
				limit = {
					check_variable = { separatism_to_gain < 0 }
				}
				custom_effect_tooltip = LOSE_SEPARATISM_KYUSTENDJA_TT
			}
			else = {
				custom_effect_tooltip = GAIN_SEPARATISM_KYUSTENDJA_TT 
			}
			hidden_effect = { 
				set_temp_variable = { kyustendja_separatism_temp = OTO_kyustendja_separatism } 
				add_to_variable = { OTO_kyustendja_separatism = separatism_to_gain }
				clamp_variable = { 
					var = OTO_kyustendja_separatism
					min = 0
					max = 1
				}
			}
		}
}
add_tulcea_separatism_with_tooltip_effect = {
	if = {
			limit = { 
			NOT = {
				OR = {
					has_country_flag = OTO_tulcea_locked_flag
					has_country_flag = OTO_tulcea_is_fully_hellenized
				}
			}
			}
			if = {
				limit = {
					check_variable = { separatism_to_gain < 0 } 
				}
				custom_effect_tooltip = LOSE_SEPARATISM_TULCEA_TT 
			}
			else = {
				custom_effect_tooltip = GAIN_SEPARATISM_TULCEA_TT
			}
			hidden_effect = { 
				set_temp_variable = { tulcea_separatism_temp = OTO_tulcea_separatism } 
				add_to_variable = { OTO_tulcea_separatism = separatism_to_gain }
				clamp_variable = { 
					var = OTO_tulcea_separatism
					min = 0
					max = 1
				}
			}
	}
}


#Moesia
add_vidin_separatism_with_tooltip_effect = {
	if = {
		limit = { 
			NOT = {
				OR = {
					has_country_flag = OTO_vidin_locked_flag
					has_country_flag = OTO_vidin_is_fully_hellenized
				}
			}
		}
		if = {
			limit = {
				check_variable = { separatism_to_gain < 0 } 
			}
			custom_effect_tooltip = LOSE_SEPARATISM_VIDIN_TT 
		}
		else = {
			custom_effect_tooltip = GAIN_SEPARATISM_VIDIN_TT 
		}
		hidden_effect = { 
			set_temp_variable = { vidin_separatism_temp = OTO_vidin_separatism } 
			add_to_variable = { OTO_vidin_separatism = separatism_to_gain }
			clamp_variable = { 
				var = OTO_vidin_separatism
				min = 0
				max = 1
			}
		}
	}
}
add_vratsa_separatism_with_tooltip_effect = {
	if = {
			limit = {
				NOT = {
					OR = {
						has_country_flag = OTO_vratsa_locked_flag
						has_country_flag = OTO_vratsa_is_fully_hellenized
					}
				}
			}
			if = {
				limit = {
					check_variable = { separatism_to_gain < 0 } 
				}
				custom_effect_tooltip = LOSE_SEPARATISM_VRATSA_TT 
			}
			else = {
				custom_effect_tooltip = GAIN_SEPARATISM_VRATSA_TT 
			}
			hidden_effect = { 
				set_temp_variable = { vratsa_separatism_temp = OTO_vratsa_separatism } 
				add_to_variable = { OTO_vratsa_separatism = separatism_to_gain }
				clamp_variable = { 
					var = OTO_vratsa_separatism
					min = 0
					max = 1
				}
			}
	}
}
add_pleven_separatism_with_tooltip_effect = {
	if = {
			limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_pleven_locked_flag
					has_country_flag = OTO_pleven_is_fully_hellenized
				}
			}
			}
			if = {
				limit = {
					check_variable = { separatism_to_gain < 0 } 
				}
				custom_effect_tooltip = LOSE_SEPARATISM_PLEVEN_TT 
			}
			else = {
				custom_effect_tooltip = GAIN_SEPARATISM_PLEVEN_TT 
			}
			hidden_effect = { 
				set_temp_variable = { pleven_separatism_temp = OTO_pleven_separatism } 
				add_to_variable = { OTO_pleven_separatism = separatism_to_gain }
				clamp_variable = { 
					var = OTO_pleven_separatism
					min = 0
					max = 1
				}
			}
	}
}
add_tarnovo_separatism_with_tooltip_effect = {
	if = {
			limit = { 
			NOT = {
				OR = {
					has_country_flag = OTO_tarnovo_locked_flag
					has_country_flag = OTO_tarnovo_is_fully_hellenized
				}
			}
			}
			if = {
				limit = {
					check_variable = { separatism_to_gain < 0 } 
				}
				custom_effect_tooltip = LOSE_SEPARATISM_TARNOVO_TT 
			}
			else = {
				custom_effect_tooltip = GAIN_SEPARATISM_TARNOVO_TT 
			}
			hidden_effect = { 
				set_temp_variable = { tarnovo_separatism_temp = OTO_tarnovo_separatism } 
				add_to_variable = { OTO_tarnovo_separatism = separatism_to_gain }
				clamp_variable = { 
					var = OTO_tarnovo_separatism
					min = 0
					max = 1
				}
			}
	}
}
add_gabrovo_separatism_with_tooltip_effect = {
	if = {
		limit = { 
		NOT = {
			OR = {
				has_country_flag = OTO_gabrovo_locked_flag
				has_country_flag = OTO_gabrovo_is_fully_hellenized
			}
		}
		}
		if = {
			limit = {
				check_variable = { separatism_to_gain < 0 } 
			}
			custom_effect_tooltip = LOSE_SEPARATISM_GABROVO_TT 
		}
		else = {
			custom_effect_tooltip = GAIN_SEPARATISM_GABROVO_TT 
		}
		hidden_effect = { 
			set_temp_variable = { gabrovo_separatism_temp = OTO_gabrovo_separatism } 
			add_to_variable = { OTO_gabrovo_separatism = separatism_to_gain }
			clamp_variable = {
				var = OTO_gabrovo_separatism
				min = 0
				max = 1
			}
		}
	}
}

#Thrace
add_plovdiv_separatism_with_tooltip_effect = {
	if = {
		limit = { 
			NOT = {
				OR = {
					has_country_flag = OTO_plovdiv_locked_flag
					has_country_flag = OTO_plovdiv_is_fully_hellenized
				}
			}
		}
		if = {
			limit = {
				check_variable = { separatism_to_gain < 0 } 
			}
			custom_effect_tooltip = LOSE_SEPARATISM_PLOVDIV_TT 
		}
		else = {
			custom_effect_tooltip = GAIN_SEPARATISM_PLOVDIV_TT 
		}
		hidden_effect = { 
			set_temp_variable = { plovdiv_separatism_temp = OTO_plodiv_separatism } 
			add_to_variable = { OTO_plodiv_separatism = separatism_to_gain }
			clamp_variable = { 
				var = OTO_plodiv_separatism
				min = 0
				max = 1
			}
		}
	}
}
add_burgas_separatism_with_tooltip_effect = {
	if = {
		limit = { 
			NOT = {
				OR = {
					has_country_flag = OTO_burgas_locked_flag
					has_country_flag = OTO_burgas_is_fully_hellenized
				}
			}
		}
		if = {
			limit = {
				check_variable = { separatism_to_gain < 0 } 
			}
			custom_effect_tooltip = LOSE_SEPARATISM_BURGAS_TT 
		}
		else = {
			custom_effect_tooltip = GAIN_SEPARATISM_BURGAS_TT 
		}
		hidden_effect = { 
			set_temp_variable = { burgas_separatism_temp = OTO_burgas_separatism } 
			add_to_variable = { OTO_burgas_separatism = separatism_to_gain }
			clamp_variable = { 
				var = OTO_burgas_separatism
				min = 0
				max = 1
			}
		}
	}
}
add_kazanlak_separatism_with_tooltip_effect = {
	if = {
		limit = { 
			NOT = {
				OR = {
					has_country_flag = OTO_kazanlak_locked_flag
					has_country_flag = OTO_kazanlak_is_fully_hellenized
				}
			}
		}
		if = {
			limit = {
				check_variable = { separatism_to_gain < 0 } 
			}
			custom_effect_tooltip = LOSE_SEPARATISM_KAZANLAK_TT 
		}
		else = {
			custom_effect_tooltip = GAIN_SEPARATISM_KAZANLAK_TT 
		}
		hidden_effect = { 
			set_temp_variable = { kazanlak_separatism_temp = OTO_kazanlak_separatism } 
			add_to_variable = { OTO_kazanlak_separatism = separatism_to_gain }
			clamp_variable = { 
				var = OTO_kazanlak_separatism
				min = 0
				max = 1
			}
		}
	}
}
add_kavala_separatism_with_tooltip_effect = {
	if = {
		limit = { 
			NOT = {
				OR = {
					has_country_flag = OTO_kavala_locked_flag
					has_country_flag = OTO_kavala_is_fully_hellenized
				}
			}
		}
		if = {
			limit = {
				check_variable = { separatism_to_gain < 0 } 
			}
			custom_effect_tooltip = LOSE_SEPARATISM_KAVALA_TT 
		}
		else = {
			custom_effect_tooltip = GAIN_SEPARATISM_KAVALA_TT 
		}
		hidden_effect = { 
			set_temp_variable = { kavala_separatism_temp = OTO_kavala_separatism } 
			add_to_variable = { OTO_kavala_separatism = separatism_to_gain }
			clamp_variable = { 
				var = OTO_kavala_separatism
				min = 0
				max = 1
			}
		}
	}
}
add_komotini_separatism_with_tooltip_effect = {
	if = {
		limit = { 
			NOT = {
				OR = {
					has_country_flag = OTO_komotini_locked_flag
					has_country_flag = OTO_komotini_is_fully_hellenized
				}
			}
		}
		if = {
			limit = {
				check_variable = { separatism_to_gain < 0 }
			}
			custom_effect_tooltip = LOSE_SEPARATISM_KOMOTINI_TT
		}
		else = {
			custom_effect_tooltip = GAIN_SEPARATISM_KOMOTINI_TT 
		}
		hidden_effect = { 
			set_temp_variable = { komotini_separatism_temp = OTO_komotini_separatism } 
			add_to_variable = { OTO_komotini_separatism = separatism_to_gain }
			clamp_variable = { 
				var = OTO_komotini_separatism
				min = 0
				max = 1
			}
		}
	}
}
add_drama_separatism_with_tooltip_effect = {
	if = {
			limit = { 
			NOT = {
				OR = {
					has_country_flag = OTO_drama_locked_flag
					has_country_flag = OTO_drama_is_fully_hellenized
				}
			}
			}
			if = {
				limit = {
					check_variable = { separatism_to_gain < 0 } 
				}
				custom_effect_tooltip = LOSE_SEPARATISM_DRAMA_TT 
			}
			else = {
				custom_effect_tooltip = GAIN_SEPARATISM_DRAMA_TT
			}
			hidden_effect = { 
				set_temp_variable = {drama_separatism_temp = OTO_drama_separatism } 
				add_to_variable = { OTO_drama_separatism = separatism_to_gain }
				clamp_variable = { 
					var = OTO_drama_separatism
					min = 0
					max = 1
				}
			}
	}
}
add_odrin_separatism_with_tooltip_effect = {
	if = {
			limit = { 
			NOT = {
				OR = {
					has_country_flag = OTO_odrin_locked_flag
					has_country_flag = OTO_odrin_is_fully_hellenized
				}
			}
			}
			if = {
				limit = {
					check_variable = { separatism_to_gain < 0 } 
				}
				custom_effect_tooltip = LOSE_SEPARATISM_ODRIN_TT 
			}
			else = {
				custom_effect_tooltip = GAIN_SEPARATISM_ODRIN_TT
			}
			hidden_effect = { 
				set_temp_variable = { odrin_separatism_temp = OTO_odrin_separatism } 
				add_to_variable = { OTO_odrin_separatism = separatism_to_gain }
				clamp_variable = { 
					var = OTO_odrin_separatism
					min = 0
					max = 1
				}
			}
	}
}

#Macedonia
add_skopie_separatism_with_tooltip_effect = {
	if = {
		limit = { 
			NOT = {
				OR = {
					has_country_flag = OTO_skopie_locked_flag
					has_country_flag = OTO_skopie_is_fully_hellenized
				}
			}
		}
		if = {
			limit = {
				check_variable = { separatism_to_gain < 0 } 
			}
			custom_effect_tooltip = LOSE_SEPARATISM_SKOPIE_TT 
		}
		else = {
			custom_effect_tooltip = GAIN_SEPARATISM_SKOPIE_TT 
		}
		hidden_effect = { 
			set_temp_variable = { skopie_separatism_temp = OTO_skopie_separatism } 
			add_to_variable = { OTO_skopie_separatism = separatism_to_gain }
			clamp_variable = { 
				var = OTO_skopie_separatism
				min = 0
				max = 1
			}
		}
	}
}
add_bitolya_separatism_with_tooltip_effect = {
	if = {
		limit = { 
			NOT = {
				OR = {
					has_country_flag = OTO_bitolya_locked_flag
					has_country_flag = OTO_bitolya_is_fully_hellenized
				}
			}
		}
		if = {
			limit = {
				check_variable = { separatism_to_gain < 0 } 
			}
			custom_effect_tooltip = LOSE_SEPARATISM_BITOLYA_TT 
		}
		else = {
			custom_effect_tooltip = GAIN_SEPARATISM_BITOLYA_TT 
		}
		hidden_effect = { 
			set_temp_variable = { bitolya_separatism_temp = OTO_bitolya_separatism } 
			add_to_variable = { OTO_bitolya_separatism = separatism_to_gain }
			clamp_variable = { 
				var = OTO_bitolya_separatism
				min = 0
				max = 1
			}
		}
	}
}
add_gorna_djumaya_separatism_with_tooltip_effect = {
	if = {
		limit = { 
			NOT = {
				OR = {
					has_country_flag = OTO_gorna_djumaya_locked_flag
					has_country_flag = OTO_gorna_djumaya_is_fully_hellenized
				}
			}
		}
		if = {
			limit = {
				check_variable = { separatism_to_gain < 0 } 
			}
			custom_effect_tooltip = LOSE_SEPARATISM_GORNA_DJUMAYA_TT
		}
		else = {
			custom_effect_tooltip = GAIN_SEPARATISM_GORNA_DJUMAYA_TT 
		}
		hidden_effect = { 
			set_temp_variable = { gorna_djumaya_separatism_temp = OTO_gorna_djumaya_separatism } 
			add_to_variable = { OTO_gorna_djumaya_separatism = separatism_to_gain }
			clamp_variable = { 
				var = OTO_gorna_djumaya_separatism
				min = 0
				max = 1
			}
		}
	}
}
add_tetovo_separatism_with_tooltip_effect = {
	if = {
		limit = { 
			NOT = {
				OR = {
					has_country_flag = OTO_tetovo_locked_flag
					has_country_flag = OTO_tetovo_is_fully_hellenized
				}
			}
		}
		if = {
			limit = {
				check_variable = { separatism_to_gain < 0 } 
			}
			custom_effect_tooltip = LOSE_SEPARATISM_TETOVO_TT 
		}
		else = {
			custom_effect_tooltip = GAIN_SEPARATISM_TETOVO_TT 
		}
		hidden_effect = { 
			set_temp_variable = { tetovo_separatism_temp = OTO_tetovo_separatism } 
			add_to_variable = { OTO_tetovo_separatism = separatism_to_gain }
			clamp_variable = { 
				var = OTO_tetovo_separatism
				min = 0
				max = 1
			}
		}
	}
}
add_serres_separatism_with_tooltip_effect = {
	if = {
		limit = { 
			NOT = {
				OR = {
					has_country_flag = OTO_serres_locked_flag
					has_country_flag = OTO_serres_is_fully_hellenized
				}
			}
		}
		if = {
			limit = {
				check_variable = { separatism_to_gain < 0 }
			}
			custom_effect_tooltip = LOSE_SEPARATISM_SERRES_TT
		}
		else = {
			custom_effect_tooltip = GAIN_SEPARATISM_SERRES_TT 
		}
		hidden_effect = { 
			set_temp_variable = { serres_separatism_temp = OTO_serres_separatism } 
			add_to_variable = { OTO_serres_separatism = separatism_to_gain }
			clamp_variable = { 
				var = OTO_serres_separatism
				min = 0
				max = 1
			}
		}
	}
}
add_kukush_separatism_with_tooltip_effect = {
	if = {
		limit = { 
		NOT = {
			OR = {
				has_country_flag = OTO_kukush_locked_flag
				has_country_flag = OTO_kukush_is_fully_hellenized
			}
		}
		}
		if = {
			limit = {
				check_variable = { separatism_to_gain < 0 } 
			}
			custom_effect_tooltip = LOSE_SEPARATISM_KUKUSH_TT 
		}
		else = {
			custom_effect_tooltip = GAIN_SEPARATISM_KUKUSH_TT
		}
		hidden_effect = { 
			set_temp_variable = { kukush_separatism_temp = OTO_kukush_separatism } 
			add_to_variable = { OTO_kukush_separatism = separatism_to_gain }
			clamp_variable = { 
				var = OTO_kukush_separatism
				min = 0
				max = 1
			}
		}
	}
}
add_solyn_separatism_with_tooltip_effect = {
	if = {
		limit = { 
		NOT = {
			OR = {
				has_country_flag = OTO_solyn_locked_flag
				has_country_flag = OTO_solyn_is_fully_hellenized
			}
		}
		}
		if = {
			limit = {
				check_variable = { separatism_to_gain < 0 } 
			}
			custom_effect_tooltip = LOSE_SEPARATISM_SOLYN_TT 
		}
		else = {
			custom_effect_tooltip = GAIN_SEPARATISM_SOLYN_TT
		}
		hidden_effect = { 
			set_temp_variable = { solyn_separatism_temp = OTO_solyn_separatism } 
			add_to_variable = { OTO_solyn_separatism = separatism_to_gain }
			clamp_variable = { 
				var = OTO_solyn_separatism
				min = 0
				max = 1
			}
		}
	}
}

	### Switch from Separatism to Hellenasitaion:
	OTO_calculate_hellenization = {
	###################################
	### SEPARATISM -> HELLENIZATION ###
	###################################
	if = {
		limit = {
			original_tag = OTO
		}

			#Dobrudja
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_varna_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_varna_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = varna_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_varna_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_varna_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_dobrich_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_dobrich_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = dobrich_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_dobrich_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_dobrich_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_silistra_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_silistra_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}
				set_country_flag = {
					flag = silistra_started_hellenizing
					days = 365
				}	
				set_country_flag = OTO_silistra_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_silistra_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_tutrakan_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_tutrakan_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = tutrakan_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_tutrakan_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_tutrakan_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_kyustendja_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_kyustendja_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = kyustendja_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_kyustendja_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_kyustendja_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_tulcea_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_tulcea_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}
				set_country_flag = {
					flag = tulcea_started_hellenizing
					days = 365
				}	
				set_country_flag = OTO_tulcea_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_tulcea_tt
			}

			#Moesia
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_vidin_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_vidin_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = vidin_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_vidin_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_vidin_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_vratsa_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_vratsa_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = vratsa_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_vratsa_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_vratsa_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_pleven_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_pleven_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = pleven_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_pleven_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_pleven_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_tarnovo_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_tarnovo_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = tarnovo_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_tarnovo_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_tarnovo_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_gabrovo_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_gabrovo_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = gabrovo_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_gabrovo_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_gabrovo_tt
			}

			#Thrace
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_plodiv_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_plovdiv_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = plovdiv_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_plovdiv_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_plovdiv_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_burgas_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_burgas_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = burgas_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_burgas_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_burgas_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_kazanlak_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_kazanlak_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = kazanlak_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_kazanlak_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_kazanlak_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_kavala_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_kavala_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = kavala_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_kavala_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_kavala_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_komotini_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_komotini_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = komotini_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_komotini_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_komotini_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_drama_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_drama_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = drama_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_drama_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_drama_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_odrin_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_odrin_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = odrin_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_odrin_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_odrin_tt
			}

			#Macedonia
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_bitolya_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_bitolya_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = bitolya_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_bitolya_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_bitolya_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_skopie_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_skopie_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = skopie_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_skopie_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_skopie_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_gorna_djumaya_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_gorna_djumaya_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = gorna_djumaya_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_gorna_djumaya_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_gorna_djumaya_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_tetovo_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_tetovo_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = tetovo_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_tetovo_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_tetovo_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_serres_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_serres_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = serres_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_serres_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_serres_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_solyn_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_solyn_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = solyn_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_solyn_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_solyn_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_kukush_separatism
							value = 0.05
							compare = less_than_or_equals
						}
						NOT = {
							OTO = {
								has_country_flag = OTO_kukush_being_hellenized_flag
							}
						}
					}
				}
				subtract_from_variable = {
					var = OTO_ch_all_separatist_cities
					value = 1
				}
				clamp_temp_variable = {
					var = OTO_ch_all_separatist_cities
					min = 0
					max = 27
				}	
				set_country_flag = {
					flag = kukush_started_hellenizing
					days = 365
				}
				set_country_flag = OTO_kukush_being_hellenized_flag
				custom_effect_tooltip = OTO_hellenization_kukush_tt
			}
		}
	}

	OTO_lock_hellenization = {
	############################
	### HELLENIZATION = 100% ###
	############################
	if = {
		limit = {
			original_tag = OTO
		}
		#Dobrudja
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_varna_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_varna_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_varna_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_varna_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_varna_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_dobrich_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_dobrich_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_dobrich_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_dobrich_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_dobrich_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_silistra_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_silistra_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_silistra_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_silistra_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_silistra_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_tutrakan_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_tutrakan_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_tutrakan_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_tutrakan_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_tutrakan_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_kyustendja_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_kyustendja_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_kyustendja_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_kyustendja_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_kyustendja_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_tulcea_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_tulcea_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_tulcea_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_tulcea_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_tulcea_tt
			}

			#Moesia
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_vidin_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_vidin_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_vidin_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_vidin_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_vidin_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_vratsa_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_vratsa_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_vratsa_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_vratsa_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_vratsa_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_pleven_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_pleven_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_pleven_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_pleven_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_pleven_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_tarnovo_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_tarnovo_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_tarnovo_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_tarnovo_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_tarnovo_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_gabrovo_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_gabrovo_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_gabrovo_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_gabrovo_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_gabrovo_tt
			}

			#Thrace
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_plodiv_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_plovdiv_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_plovdiv_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_plovdiv_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_plovdiv_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_burgas_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_burgas_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_burgas_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_burgas_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_burgas_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_kazanlak_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_kazanlak_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_kazanlak_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_kazanlak_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_kazanlak_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_kavala_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_kavala_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_kavala_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_kavala_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_kavala_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_komotini_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_komotini_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_komotini_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_komotini_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_komotini_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_drama_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_drama_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_drama_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_drama_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_drama_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_odrin_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_odrin_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_odrin_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_odrin_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized__tt
			}

			#Macedonia
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_skopie_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_skopie_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_skopie_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_skopie_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_skopie_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_bitolya_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_bitolya_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_bitolya_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_bitolya_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_bitolya_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_gorna_djumaya_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_gorna_djumaya_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_gorna_djumaya_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_gorna_djumaya_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_gorna_djumaya_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_tetovo_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_tetovo_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_tetovo_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_tetovo_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_tetovo_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_serres_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_serres_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_serres_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_serres_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_serres_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_kukush_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_kukush_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_kukush_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_kukush_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_kukush_tt
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							var = OTO_solyn_separatism
							value = 1
							compare = greater_than_or_equals
						}
						has_country_flag = OTO_solyn_being_hellenized_flag
						NOT = {
							OTO = {
								has_country_flag = OTO_solyn_is_fully_hellenized
							}
						}
					}
				}
				set_country_flag = OTO_solyn_is_fully_hellenized
				custom_effect_tooltip = OTO_fully_hellenized_solyn_tt
			}
		}
	}

	OTO_return_to_separatism = {
	####################################
	### HELLENIZATION =-> SEPARATISM ###
	####################################
	if = {
		limit = {
			original_tag = OTO
		}

		#Dobrudja
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_varna_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = varna_started_hellenizing
							has_country_flag = OTO_varna_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_varna_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_varna_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_dobrich_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = dobrich_started_hellenizing
							has_country_flag = OTO_dobrich_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_dobrich_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_dobrich_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_silistra_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = silistra_started_hellenizing
							has_country_flag = OTO_silistra_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_silistra_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_silistra_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_tutrakan_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = tutrakan_started_hellenizing
							has_country_flag = OTO_tutrakan_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_tutrakan_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_tutrakan_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_kyustendja_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = kyustendja_started_hellenizing
							has_country_flag = OTO_kyustendja_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_kyustendja_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_kyustendja_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_tulcea_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = tulcea_started_hellenizing
							has_country_flag = OTO_tulcea_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_tulcea_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_tulcea_tt
		}

		#Moesia
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_vidin_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = vidin_started_hellenizing
							has_country_flag = OTO_vidin_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_vidin_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_vidin_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_vratsa_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = vratsa_started_hellenizing
							has_country_flag = OTO_vratsa_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_vratsa_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_vratsa_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_pleven_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = pleven_started_hellenizing
							has_country_flag = OTO_pleven_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_pleven_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_pleven_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_tarnovo_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = tarnovo_started_hellenizing
							has_country_flag = OTO_tarnovo_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_tarnovo_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_tarnovo_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_gabrovo_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = gabrovo_started_hellenizing
							has_country_flag = OTO_gabrovo_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_gabrovo_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_gabrovo_tt
		}

		#Thrace
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_plodiv_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = plovdiv_started_hellenizing
							has_country_flag = OTO_plovdiv_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_plovdiv_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_plovdiv_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_burgas_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = burgas_started_hellenizing
							has_country_flag = OTO_burgas_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_burgas_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_burgas_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_kazanlak_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = kazanlak_started_hellenizing
							has_country_flag = OTO_kazanlak_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_kazanlak_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_kazanlak_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_kavala_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = kavala_started_hellenizing
							has_country_flag = OTO_kavala_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_kavala_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_kavala_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_komotini_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = komotini_started_hellenizing
							has_country_flag = OTO_komotini_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_komotini_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_komotini_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_drama_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = drama_started_hellenizing
							has_country_flag = OTO_drama_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_drama_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_drama_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_odrin_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = odrin_started_hellenizing
							has_country_flag = OTO_odrin_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_odrin_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_odrin_tt
		}
		
		#Macedonia
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_skopie_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = skopie_started_hellenizing
							has_country_flag = OTO_skopie_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_skopie_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_skopie_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_bitolya_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = bitolya_started_hellenizing
							has_country_flag = OTO_bitolya_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_bitolya_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_bitolya_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_gorna_djumaya_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = gorna_djumaya_started_hellenizing
							has_country_flag = OTO_gorna_djumaya_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_gorna_djumaya_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_gorna_djumaya_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_tetovo_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = tetovo_started_hellenizing
							has_country_flag = OTO_tetovo_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_tetovo_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_tetovo_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_serres_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = serres_started_hellenizing
							has_country_flag = OTO_serres_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_serres_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_serres_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_kukush_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = kukush_started_hellenizing
							has_country_flag = OTO_kukush_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_kukush_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_kukush_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_solyn_separatism
						value = 0.05
						compare = less_than_or_equals
					}
					OTO = {
						AND = {
							has_country_flag = solyn_started_hellenizing
							has_country_flag = OTO_solyn_being_hellenized_flag
						}
					}
				}
			}
			add_to_variable = {
				var = OTO_ch_all_separatist_cities
				value = 1
			}
			clamp_temp_variable = {
				var = OTO_ch_all_separatist_cities
				min = 0
				max = 27
			}	
			clr_country_flag = OTO_solyn_being_hellenized_flag
			custom_effect_tooltip = OTO_back_to_sep_solyn_tt
		}
	}
	}

	OTO_lock_separatism = {
	##########################
	### SEPARATIISM = 100% ###
	##########################
	if = {
		limit = {
			original_tag = OTO
		}

		#Dobrudja
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_varna_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_varna_being_hellenized_flag
								has_country_flag = OTO_varna_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_varna_locked_flag
			custom_effect_tooltip = OTO_locked_varna_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_dobrich_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_dobrich_being_hellenized_flag
								has_country_flag = OTO_dobrich_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_dobrich_locked_flag
			custom_effect_tooltip = OTO_locked_dobrich_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_silistra_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_silistra_being_hellenized_flag
								has_country_flag = OTO_silistra_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_silistra_locked_flag
			custom_effect_tooltip = OTO_locked_silistra_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_tutrakan_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_tutrakan_being_hellenized_flag
								has_country_flag = OTO_tutrakan_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_tutrakan_locked_flag
			custom_effect_tooltip = OTO_locked_tutrakan_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_kyustendja_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_kyustendja_being_hellenized_flag
								has_country_flag = OTO_kyustendja_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_kyustendja_locked_flag
			custom_effect_tooltip = OTO_locked_kyustendja_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_tulcea_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_tulcea_being_hellenized_flag
								has_country_flag = OTO_tulcea_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_tulcea_locked_flag
			custom_effect_tooltip = OTO_locked_tulcea_tt
		}

		#Moesia
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_vidin_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_vidin_being_hellenized_flag
								has_country_flag = OTO_vidin_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_vidin_locked_flag
			custom_effect_tooltip = OTO_locked_vidin_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_vratsa_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_vratsa_being_hellenized_flag
								has_country_flag = OTO_vratsa_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_vratsa_locked_flag
			custom_effect_tooltip = OTO_locked_vratsa_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_pleven_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_pleven_being_hellenized_flag
								has_country_flag = OTO_pleven_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_pleven_locked_flag
			custom_effect_tooltip = OTO_locked_pleven_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_tarnovo_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_tarnovo_being_hellenized_flag
								has_country_flag = OTO_tarnovo_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_tarnovo_locked_flag
			custom_effect_tooltip = OTO_locked_tarnovo_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_gabrovo_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_gabrovo_being_hellenized_flag
								has_country_flag = OTO_gabrovo_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_gabrovo_locked_flag
			custom_effect_tooltip = OTO_locked_gabrovo_tt
		}

		#Thrace
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_plodiv_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_plovdiv_being_hellenized_flag
								has_country_flag = OTO_plovdiv_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_plovdiv_locked_flag
			custom_effect_tooltip = OTO_locked_plovdiv_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_burgas_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_burgas_being_hellenized_flag
								has_country_flag = OTO_burgas_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_burgas_locked_flag
			custom_effect_tooltip = OTO_locked_burgas_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_kazanlak_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_kazanlak_being_hellenized_flag
								has_country_flag = OTO_kazanlak_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_kazanlak_locked_flag
			custom_effect_tooltip = OTO_locked_kazanlak_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_kavala_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_kavala_being_hellenized_flag
								has_country_flag = OTO_kavala_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_kavala_locked_flag
			custom_effect_tooltip = OTO_locked_kavala_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_komotini_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_komotini_being_hellenized_flag
								has_country_flag = OTO_komotini_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_komotini_locked_flag
			custom_effect_tooltip = OTO_locked_komotini_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_drama_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_drama_being_hellenized_flag
								has_country_flag = OTO_drama_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_drama_locked_flag
			custom_effect_tooltip = OTO_locked_drama_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_odrin_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_odrin_being_hellenized_flag
								has_country_flag = OTO_odrin_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_odrin_locked_flag
			custom_effect_tooltip = OTO_locked_odrin_tt
		}
		
		#Macedonia
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_skopie_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_skopie_being_hellenized_flag
								has_country_flag = OTO_skopie_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_skopie_locked_flag
			custom_effect_tooltip = OTO_locked_skopie_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_bitolya_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_bitolya_being_hellenized_flag
								has_country_flag = OTO_bitolya_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_bitolya_locked_flag
			custom_effect_tooltip = OTO_locked_bitolya_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_gorna_djumaya_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_gorna_djumaya_being_hellenized_flag
								has_country_flag = OTO_gorna_djumaya_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_gorna_djumaya_locked_flag
			custom_effect_tooltip = OTO_locked_gorna_djumaya_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_tetovo_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_tetovo_being_hellenized_flag
								has_country_flag = OTO_tetovo_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_tetovo_locked_flag
			custom_effect_tooltip = OTO_locked_tetovo_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_serres_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_serres_being_hellenized_flag
								has_country_flag = OTO_serres_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_serres_locked_flag
			custom_effect_tooltip = OTO_locked_serres_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_kukush_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_kukush_being_hellenized_flag
								has_country_flag = OTO_kukush_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_kukush_locked_flag
			custom_effect_tooltip = OTO_locked_kukush_tt
		}
		if = {
			limit = {
				AND = {
					check_variable = {
						var = OTO_solyn_separatism
						value = 1
						compare = greater_than_or_equals
					}
					NOT = {
						OTO = {
							OR = {
								has_country_flag = OTO_solyn_being_hellenized_flag
								has_country_flag = OTO_solyn_is_fully_hellenized
							}
						}
					}
				}
			}
			set_country_flag = OTO_solyn_locked_flag
			custom_effect_tooltip = OTO_locked_solyn_tt
		}
	}
	}

	OTO_kukush_scripted_effect = {
	if = {
		limit = {
			731 = {
				resistance > 100
			}
		}
		set_variable = { OTO_ch_chance_success = 0 }
		set_variable = { OTO_ch_chance_fail = 100 }
	}
	else_if = {
		limit = {
			731 = {
				AND = {
					resistance < 100
					resistance > 80
				}
			}
		}
		add_to_variable = { OTO_ch_chance_success = 5 }
		set_variable = {OTO_ch_helper_var = 100}
		subtract_from_variable = {
			var = OTO_ch_helper_var
			value = OTO_ch_chance_success
		}
	}
	else_if = {
		limit = {
			731 = {
				AND = {
					resistance < 80
					resistance > 60
				}
			}
		}
		add_to_variable = { OTO_ch_chance_success = 10 }
		set_variable = {OTO_ch_helper_var = 100}
		subtract_from_variable = {
			var = OTO_ch_helper_var
			value = OTO_ch_chance_success
		}
	}
	else_if = {
		limit = {
			731 = {
				AND = {
					resistance < 60
					resistance > 50
				}
			}
		}
		add_to_variable = { OTO_ch_chance_success = 20 }
		set_variable = {OTO_ch_helper_var = 100}
		subtract_from_variable = {
			var = OTO_ch_helper_var
			value = OTO_ch_chance_success
		}
	}
	else_if = {
		limit = {
			731 = {
				AND = {
					resistance < 50
					resistance > 30
				}
			}
		}
		add_to_variable = { OTO_ch_chance_success = 30 }
		set_variable = {OTO_ch_helper_var = 100}
		subtract_from_variable = {
			var = OTO_ch_helper_var
			value = OTO_ch_chance_success
		}
	}
	else_if = {
		limit = {
			731 = {
				AND = {
					resistance < 30
					resistance > 10
				}
			}
		}
		add_to_variable = { OTO_ch_chance_success = 40 }
		set_variable = {OTO_ch_helper_var = 100}
		subtract_from_variable = {
			var = OTO_ch_helper_var
			value = OTO_ch_chance_success
		}
	}
	else_if = {
		limit = {
			731 = {
				AND = {
					resistance < 10
					resistance > 0
				}
			}
		}
		add_to_variable = { OTO_ch_chance_success = 50 }
		set_variable = {OTO_ch_helper_var = 100}
		subtract_from_variable = {
			var = OTO_ch_helper_var
			value = OTO_ch_chance_success
		}
	}
	else_if = {
		limit = {
			731 = {
				resistance < 0
			}
		}
		add_to_variable = { OTO_ch_chance_success = 100 }
		set_variable = {OTO_ch_helper_var = 100}
		subtract_from_variable = {
			var = OTO_ch_helper_var
			value = OTO_ch_chance_success
		}
	}

	if = {
		limit = {
			731 = {
				compliance > 100
			}
		}
		set_variable = { OTO_ch_chance_success = 100 }
		set_variable = { OTO_ch_chance_fail = 0 }
	}
	else_if = {
		limit = {
			731 = {
				AND = {
					compliance < 100
					compliance > 80
				}
			}
		}
		add_to_variable = { OTO_ch_chance_success = 5 }
		set_variable = {OTO_ch_helper_var = 100}
		subtract_from_variable = {
			var = OTO_ch_helper_var
			value = OTO_ch_chance_success
		}
	}
	else_if = {
		limit = {
			731 = {
				AND = {
					compliance < 80
					compliance > 60
				}
			}
		}
		add_to_variable = { OTO_ch_chance_success = 10 }
		set_variable = {OTO_ch_helper_var = 100}
		subtract_from_variable = {
			var = OTO_ch_helper_var
			value = OTO_ch_chance_success
		}
	}
	else_if = {
		limit = {
			731 = {
				AND = {
					compliance < 60
					compliance > 50
				}
			}
		}
		add_to_variable = { OTO_ch_chance_success = 20 }
		set_variable = {OTO_ch_helper_var = 100}
		subtract_from_variable = {
			var = OTO_ch_helper_var
			value = OTO_ch_chance_success
		}
	}
	else_if = {
		limit = {
			731 = {
				AND = {
					compliance < 50
					compliance > 30
				}
			}
		}
		add_to_variable = { OTO_ch_chance_success = 30 }
		set_variable = {OTO_ch_helper_var = 100}
		subtract_from_variable = {
			var = OTO_ch_helper_var
			value = OTO_ch_chance_success
		}
	}
	else_if = {
		limit = {
			731 = {
				AND = {
					compliance < 30
					compliance > 10
				}
			}
		}
		add_to_variable = { OTO_ch_chance_success = 40 }
		set_variable = {OTO_ch_helper_var = 100}
		subtract_from_variable = {
			var = OTO_ch_helper_var
			value = OTO_ch_chance_success
		}
	}
	else_if = {
		limit = {
			731 = {
				AND = {
					compliance < 10
					compliance > 0
				}
			}
		}
		add_to_variable = { OTO_ch_chance_success = 50 }
		set_variable = {OTO_ch_helper_var = 100}
		subtract_from_variable = {
			var = OTO_ch_helper_var
			value = OTO_ch_chance_success
		}
	}
	else_if = {
		limit = {
			731 = {
				compliance < 0
			}
		}
		add_to_variable = { OTO_ch_chance_success = 100 }
		set_variable = {OTO_ch_helper_var = 100}
		subtract_from_variable = {
			var = OTO_ch_helper_var
			value = OTO_ch_chance_success
		}
	}

	add_to_variable = {
		var = OTO_ch_helper_var_2
		value = OTO_ch_chance_success
	}
	add_to_variable = {
		var = OTO_ch_helper_var_2
		value = OTO_ch_chance_fail
	}
	clamp_variable = {
		var = OTO_ch_chance_success
		min = 0
		max = 100
	}
	clamp_variable = {
		var = OTO_ch_chance_fail
		min = 0
		max = 100
	}
	if = {
		limit = {
			NOT = {
				check_variable = { OTO_ch_helper_var_2  = 100}
			}
		}
		OTO_kukush_scripted_effect = yes		
	}
	}

	OTO_calculate_avg_sep = {
	set_variable = { OTO_avg_sep = 0 }
	#Dobrudja
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_varna_being_hellenized_flag
					has_country_flag = OTO_varna_is_fully_hellenized
					has_country_flag = OTO_varna_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_varna_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_dobrich_being_hellenized_flag
					has_country_flag = OTO_dobrich_is_fully_hellenized
					has_country_flag = OTO_dobrich_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_dobrich_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_silistra_being_hellenized_flag
					has_country_flag = OTO_silistra_is_fully_hellenized
					has_country_flag = OTO_silistra_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_silistra_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_tutrakan_being_hellenized_flag
					has_country_flag = OTO_tutrakan_is_fully_hellenized
					has_country_flag = OTO_tutrakan_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_tutrakan_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_kyustendja_being_hellenized_flag
					has_country_flag = OTO_kyustendja_is_fully_hellenized
					has_country_flag = OTO_kyustendja_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_kyustendja_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_tulcea_being_hellenized_flag
					has_country_flag = OTO_tulcea_is_fully_hellenized
					has_country_flag = OTO_tulcea_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_tulcea_separatism
		}
	}

	#Moesia
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_vidin_being_hellenized_flag
					has_country_flag = OTO_vidin_is_fully_hellenized
					has_country_flag = OTO_vidin_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_vidin_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_vratsa_being_hellenized_flag
					has_country_flag = OTO_vratsa_is_fully_hellenized
					has_country_flag = OTO_vratsa_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_vratsa_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_pleven_being_hellenized_flag
					has_country_flag = OTO_pleven_is_fully_hellenized
					has_country_flag = OTO_pleven_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_pleven_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_tarnovo_being_hellenized_flag
					has_country_flag = OTO_tarnovo_is_fully_hellenized
					has_country_flag = OTO_tarnovo_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_tarnovo_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_gabrovo_being_hellenized_flag
					has_country_flag = OTO_gabrovo_is_fully_hellenized
					has_country_flag = OTO_gabrovo_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_gabrovo_separatism
		}
	}

	#Thrace
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_plovdiv_being_hellenized_flag
					has_country_flag = OTO_plovdiv_is_fully_hellenized
					has_country_flag = OTO_plovdiv_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_plodiv_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_burgas_being_hellenized_flag
					has_country_flag = OTO_burgas_is_fully_hellenized
					has_country_flag = OTO_burgas_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_burgas_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_kazanlak_being_hellenized_flag
					has_country_flag = OTO_kazanlak_is_fully_hellenized
					has_country_flag = OTO_kazanlak_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_kazanlak_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_kavala_being_hellenized_flag
					has_country_flag = OTO_kavala_is_fully_hellenized
					has_country_flag = OTO_kavala_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_kavala_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_komotini_being_hellenized_flag
					has_country_flag = OTO_komotini_is_fully_hellenized
					has_country_flag = OTO_komotini_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_komotini_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_drama_being_hellenized_flag
					has_country_flag = OTO_drama_is_fully_hellenized
					has_country_flag = OTO_drama_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_drama_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_odrin_being_hellenized_flag
					has_country_flag = OTO_odrin_is_fully_hellenized
					has_country_flag = OTO_odrin_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_odrin_separatism
		}
	}

	# Macedonia
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_skopie_being_hellenized_flag
					has_country_flag = OTO_skopie_is_fully_hellenized
					has_country_flag = OTO_skopie_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_skopie_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_bitolya_being_hellenized_flag
					has_country_flag = OTO_bitolya_is_fully_hellenized
					has_country_flag = OTO_bitolya_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_bitolya_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_gorna_djumaya_being_hellenized_flag
					has_country_flag = OTO_gorna_djumaya_is_fully_hellenized
					has_country_flag = OTO_gorna_djumaya_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_gorna_djumaya_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_tetovo_being_hellenized_flag
					has_country_flag = OTO_tetovo_is_fully_hellenized
					has_country_flag = OTO_tetovo_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_tetovo_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_serres_being_hellenized_flag
					has_country_flag = OTO_serres_is_fully_hellenized
					has_country_flag = OTO_serres_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_serres_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_kukush_being_hellenized_flag
					has_country_flag = OTO_kukush_is_fully_hellenized
					has_country_flag = OTO_kukush_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_kukush_separatism
		}
	}
	if = {
		limit = {
			NOT = {
				OR = {
					has_country_flag = OTO_solyn_being_hellenized_flag
					has_country_flag = OTO_solyn_is_fully_hellenized
					has_country_flag = OTO_solyn_locked_flag
				}
			}
		}
		add_to_variable = {
			var = OTO_avg_sep 
			value = OTO_solyn_separatism
		}
	}

	#Dividing the avg_sep variable with the current city count
	divide_variable = {
		var = OTO_avg_sep 
		value = OTO_ch_all_separatist_cities
	}
	clamp_variable = {
		var = OTO_avg_sep 
		min = 0
		max = 1
	}
}