capital = 49

if = {
	limit = {
		NOT = {
			has_dlc = "No Step Back"
		}
	}
	set_oob = "TUR_1936"
}
if = {
	limit = {
		has_dlc = "No Step Back"
	}
	set_oob = "TUR_1936_nsb"
}
if = {
	limit = { has_dlc = "Man the Guns" }
		set_naval_oob = "TUR_1936_naval_mtg"
	else = {
		set_naval_oob = "TUR_1936_naval_legacy"
	}
}
if = {
	limit = { has_dlc = "By Blood Alone" }
		set_air_oob = "TUR_1936_air_bba"
		set_technology = { 
			bba_early_transport_plane = 1
		}
	else = {
		set_air_oob = "TUR_1936_air_legacy"
		set_technology = {
			early_fighter = 1
			early_bomber = 1
			CAS1 = 1
			early_transport_plane = 1
		}
	}
}

###################
#### 3D MODELS ####
###################

#Cosmetic tags used (3D models will look for these cosmetic tags when hooking themselves):
#TUR_communism
#TUR_democratic
#TUR_fascism
#TUR_neutrality
set_cosmetic_tag = TUR_neutrality

set_research_slots = 3

set_technology = {
	infantry_weapons = 1
	infantry_weapons1 = 1
	tech_mountaineers = 1
	tech_recon = 1
	tech_support = 1
	tech_trucks = 1
	gw_artillery = 1
	interwar_antiair = 1
	basic_train = 1
}
if = {
	limit = {
		NOT = { has_dlc = "No Step Back" }
	}
	set_technology = {
		gwtank = 1
		basic_light_tank = 1

	}
}
if = {
	limit = {
		has_dlc = "No Step Back"
	}
	set_technology = {
		gwtank_chassis = 1
		basic_light_tank_chassis = 1
	}
}
if = {
	limit = { not = { has_dlc = "Man the Guns" } }
	set_technology = {
		early_submarine = 1
		early_destroyer = 1
		early_light_cruiser = 1
		early_battleship = 1
		early_battlecruiser = 1
		transport = 1
	}
}
if = {
	limit = { has_dlc = "Man the Guns" }
	set_technology = {
		basic_naval_mines = 1
		submarine_mine_laying = 1
		early_ship_hull_light = 1
		basic_ship_hull_light = 1
		early_ship_hull_submarine = 1
		basic_ship_hull_submarine = 1
		early_ship_hull_cruiser = 1
		early_ship_hull_heavy = 1
		basic_battery = 1
		basic_torpedo = 1
		coastal_defense_ships = 1
		mtg_transport = 1
	}
}

1936.1.1 = {
	if = { 
		limit = { has_dlc = "Battle for the Bosporus" }	
		set_variable = { var = TUR_kemalist_power_variable value = 5 }
		797 = {
			add_dynamic_modifier = { modifier = kemalist_loyalties }
		}
		341 = {
			add_dynamic_modifier = { modifier = kemalist_loyalties }
		}
		340 = {
			add_dynamic_modifier = { modifier = kemalist_loyalties }
		}
		339 = {
			add_dynamic_modifier = { modifier = kemalist_loyalties }
		}
		354 = {
			add_dynamic_modifier = { modifier = kemalist_loyalties }
		}
		350 = {
			add_dynamic_modifier = { modifier = kurdish_agitation }
		}
		352 = {
			add_dynamic_modifier = { modifier = kurdish_separatism }
		}
		800 = {
			add_dynamic_modifier = { modifier = kurdish_separatism }
		}
		353 = {
			add_dynamic_modifier = { modifier = kurdish_agitation }
		}
		798 = {
			add_dynamic_modifier = { modifier = islamist_opposition }
		}
		349 = {
			add_dynamic_modifier = { modifier = islamist_sedition }
		}
		348 = {
			add_dynamic_modifier = { modifier = islamist_sedition }
		}
		345 = {
			add_dynamic_modifier = { modifier = islamist_opposition }
		}
		344 = {
			add_dynamic_modifier = { modifier = islamist_opposition }
		}
		355 = {
			add_dynamic_modifier = { modifier = islamist_sedition }
		}
		356 = {
			add_dynamic_modifier = { modifier = islamist_opposition }
		}
		add_ideas = {
			limited_conscription
			export_focus
			civilian_economy
			TUR_kemalist_army_officers_limited_power_loyal
			TUR_sectarian_woes
			TUR_disorganised_armed_forces
			TUR_debt_council
		}
		
		353 = {
			start_resistance = yes
			set_compliance = 20
			set_resistance = 10
			set_garrison_strength = 1.0
		}
		
		350 = {
			start_resistance = yes
			set_compliance = 25
			set_resistance = 15
			set_garrison_strength = 1.0
		}
		
		352 = {
			start_resistance = yes
			set_compliance = 10
			set_resistance = 15
			set_garrison_strength = 0.75
		}
		
		800 = {
			start_resistance = yes
			set_compliance = 10
			set_resistance = 15
			set_garrison_strength = 0.75
		}
		set_variable = { var = TUR_kemalist_officers_loyalty value = 1 }
		every_owned_state = {
			limit = {
				OR = {
					state = 49
					state = 342
					state = 343
					state = 346
					state = 347
				}
			}
			set_state_flag = TUR_ideological_battleground_state
		}
	
		add_opinion_modifier = { 
			target = GRE
			modifier = BFTB_balkan_pact_ally
		}
		add_opinion_modifier = { 
			target = ROM
			modifier = BFTB_balkan_pact_ally
		}
		add_opinion_modifier = { 
			target = YUG
			modifier = BFTB_balkan_pact_ally
		}
		add_opinion_modifier = { 
			target = BUL
			modifier = BFTB_balkan_pact_enemy
		}
		add_opinion_modifier = { 
			target = HUN
			modifier = BFTB_balkan_pact_enemy
		}
	}

	if = { 
		limit = { NOT = { has_dlc = "Battle for the Bosporus" }	}
		add_ideas = {
			limited_conscription
			export_focus
			civilian_economy
		}
	}
}

1939.1.1 = {

	add_political_power = 1198
	add_command_power = 100

	set_politics = {
		ruling_party = neutrality
		last_election = "1939.2.8"
		election_frequency = 60
		elections_allowed = yes
	}

	if = {
		limit = { has_dlc = "Battle for the Bosporus" }
		complete_national_focus = TUR_the_montreux_convention
		complete_national_focus = TUR_continue_the_policy_of_etatism
		complete_national_focus = TUR_hava_okulu
		complete_national_focus = TUR_ratify_the_six_arrows
		complete_national_focus = TUR_peace_at_home
		complete_national_focus = TUR_turkish_state_railways
		complete_national_focus = TUR_the_second_five_year_plan
		complete_national_focus = TUR_treaty_of_saadabad
		complete_national_focus = TUR_the_sanayiciler
		complete_national_focus = TUR_learning_from_the_great_war
		complete_national_focus = TUR_the_guardians_of_kemalism
		complete_national_focus = TUR_assess_our_future
		complete_national_focus = TUR_the_hatay_issue
		complete_national_focus = TUR_turk_ulusu
		complete_national_focus = TUR_cooperate_with_the_debt_council
		complete_national_focus = TUR_utilize_foreign_capital
		complete_national_focus = TUR_modernising_the_army
		complete_national_focus = TUR_expand_the_air_bases
		remove_ideas = {
			civilian_economy
			TUR_kemalist_army_officers_limited_power_loyal
			TUR_kemalist_army_officers_extended_power_loyal
			TUR_tpda
			TUR_disorganised_armed_forces
			TUR_debt_council
			TUR_etatism
			TUR_second_five_year_plan_inonu
			TUR_ismet_inonu
		}
		add_ideas = {
			partial_economic_mobilisation
			limited_conscription
			export_focus
			TUR_kemalist_army_officers_extended_power_neutral
			TUR_etatism_3
			TUR_disorganised_armed_forces_3
			TUR_tpda_absorbed
			TUR_legacy_of_ataturk_preserved
			TUR_sukru_saracoglu_prime_minister
			TUR_fevzi_cakmak_command
			TUR_sabiha_gokcen
		}
		add_timed_idea = {
			idea = TUR_second_five_year_plan_inonu
			days = 730
		}
		347 = {
			add_dynamic_modifier = { modifier = kemalist_loyalties }
		}	
		342 = {
			add_dynamic_modifier = { modifier = kemalist_loyalties }
		}
		set_variable = { var = TUR_kemalist_officers_loyalty value = 0 }	

		set_variable = { var = TUR_kemalist_power_variable value = 7 }

		promote_character = TUR_ismet_inonu
		retire_character = TUR_mustafa_kemal_ataturk
	}

	if = {
		limit = { NOT = { has_dlc = "Battle for the Bosporus" } }
		#generic focuses
		complete_national_focus = army_effort
		complete_national_focus = equipment_effort
		complete_national_focus = motorization_effort
		complete_national_focus = aviation_effort
		complete_national_focus = naval_effort
		complete_national_focus = large_navy
		complete_national_focus = industrial_effort
		complete_national_focus = construction_effort
		complete_national_focus = production_effort

		add_ideas = {
			partial_economic_mobilisation
			limited_conscription
			export_focus
		}

	}

	if = {
		limit = {
			has_character = TUR_mustafa_kemal_ataturk
			TUR_mustafa_kemal_ataturk = { is_unit_leader = yes }
		}
		TUR_mustafa_kemal_ataturk = { remove_unit_leader_role = yes }
	}
	
	oob = "TUR_1939"

	if = {
		limit = { has_dlc = "Man the Guns" }
			set_naval_oob = "TUR_1939_naval_mtg"
		else = {
			set_naval_oob = "TUR_1939_naval_legacy"
		}
	}
	if = {
		limit = { has_dlc = "By Blood Alone" }
			set_air_oob = "TUR_1939_air_bba"
		else = {
			set_air_oob = "TUR_1939_air_legacy"
			set_technology = {
				fighter1 = 1
				early_bomber = 1
				tactical_bomber1 = 1
			}
		}
	}

	set_technology = {
		interwar_artillery = 1
		infantry_weapons2 = 1
		support_weapons = 1

		#doctrines
		air_superiority = 1

		mass_assault = 1
		pocket_defence = 1
		defence_in_depth = 1
		
		fleet_in_being = 1
		convoy_sailing = 1
		submarine_operations = 1

		#electronics
		electronic_mechanical_engineering = 1
		radio = 1
		mechanical_computing = 1
		computing_machine = 1

		#industry
		basic_machine_tools = 1
		improved_machine_tools = 1
		synth_oil_experiments = 1
		fuel_silos = 1
		oil_processing = 1
		construction1 = 1
		construction2 = 1
		dispersed_industry = 1
		dispersed_industry2 = 1
	}
	complete_special_project = {
		project = sp:sp_air_radar
	}
	if = {
		limit = { not = { has_dlc = "Man the Guns" } }
		set_technology = {
			basic_submarine = 1
		}
	}
	if = {
		limit = { has_dlc = "Man the Guns" }
		set_technology = {
		}
	}
}

set_politics = {
	ruling_party = neutrality
	last_election = "1935.2.8"
	elections_allowed = yes
}
set_popularities = {
	democratic = 6
	neutrality = 94
}

set_convoys = 20
set_stability = 0.5
set_war_support = 0.3

if = {
	limit = { has_dlc = "Battle for the Bosporus" }
	recruit_character = TUR_mustafa_kemal_ataturk
	recruit_character = TUR_sefik_husnu
	recruit_character = TUR_celal_bayar
	recruit_character = TUR_mehmet_recep_peker
	recruit_character = TUR_fevzi_cakmak
	recruit_character = TUR_fahrettin_altay
	recruit_character = TUR_kazim_orbay
	recruit_character = TUR_cemil_cahit_toydemir
	recruit_character = TUR_izzettin_chalishlar
	recruit_character = TUR_kazim_karabekir
	recruit_character = TUR_mustafa_muglali
	recruit_character = TUR_mehmet_salih_omurtak
	recruit_character = TUR_hayrullah_fisek
	recruit_character = TUR_mehmet_nuri_yamut
	recruit_character = TUR_sadik_altincan
	recruit_character = TUR_sukru_okan
	recruit_character = TUR_mehmet_ali_ulgen
	recruit_character = TUR_abdurrahman_gurman
	recruit_character = TUR_fakhri_pasha
	recruit_character = TUR_refet_bele
	recruit_character = TUR_zeki_dogan
	recruit_character = TUR_sabiha_gokcen
	recruit_character = TUR_ali_fuat_cebesoy
	recruit_character = TUR_vecihi_hurkus
	recruit_character = TUR_ali_ihsan_sabis
	recruit_character = TUR_rauf_orbay
	recruit_character = TUR_izzettin_calislar
	recruit_character = TUR_ahmet_ali_celikten
	recruit_character = TUR_mehmet_fahri_engin
	recruit_character = TUR_muzaffer_goksenin
	recruit_character = TUR_halil_kut
	recruit_character = TUR_mumtaz_okmen
	recruit_character = TUR_riza_nur
	recruit_character = TUR_nejdet_sancar
	recruit_character = TUR_kazim_ozalp
	recruit_character = TUR_sukru_saracoglu_prime_minister
	recruit_character = TUR_adnan_menderes
	recruit_character = TUR_nuri_demirag_prime_minister
	recruit_character = TUR_hasan_saka
	recruit_character = TUR_hilmi_uran
	recruit_character = TUR_fethi_okyar
	recruit_character = TUR_sukru_saracoglu
	recruit_character = TUR_halide_edib_adivar
	recruit_character = TUR_sevket_sureyya_aydemir
	recruit_character = TUR_mehmet_emin_yurdakul
	recruit_character = TUR_nuri_demirag
	recruit_character = TUR_nuri_killigil
	recruit_character = TUR_said_i_nursi
	recruit_character = TUR_ismet_inonu
	recruit_character = TUR_nihal_atsiz
	recruit_character = TUR_zeki_velidi_togan
	recruit_character = TUR_nazim_hikmet

	recruit_character = TUR_ahmet_fevzi_pasha # Ottoman Sultanate general. Not available at game start
	recruit_character = TUR_refet_pasha # Ottoman Sultanate general. Not available at game start
	recruit_character = TUR_mehmet_esat_pasha # Ottoman Sultanate general. Not available at game start
	recruit_character = TUR_halife_abdulmecid_efendi #Empty Character that can become Country Leader via event.
	recruit_character = GER_hans_von_luck #Foreign General. Not available at game start
	recruit_character = GER_wilhelm_ritter_von_thoma #Foreign General. Not available at game start
	recruit_character = ITA_ferdinando_umberto_filippo_adalberto #Foreign Admiral. Not available at game start
	recruit_character = TUR_durrushehvar_i #Empty char. Can become country leader later
	recruit_character = TUR_abdulmejid_ii #Empty char. Can become country leader later
	recruit_character = TUR_hazi_aslanov #Empty Char. Can become unit leader later
}

if = {
	limit = { NOT = { has_dlc = "Battle for the Bosporus" } }
	recruit_character = TUR_ismet_inonu
	recruit_character = TUR_mustafa_kemal_ataturk
	recruit_character = TUR_sefik_husnu
	recruit_character = TUR_celal_bayar
	recruit_character = TUR_fevzi_cakmak
	recruit_character = TUR_cemil_cahit_toydemir
	recruit_character = TUR_rauf_orbay
	recruit_character = TUR_memduh_tagmac
	recruit_character = TUR_abdurrahman_gurman
	recruit_character = TUR_mehmet_ali_ulgen
	recruit_character = TUR_sabiha_gokcen
	recruit_character = TUR_mehmet_gunaltay
	recruit_character = TUR_ali_fuat_cebesoy
	recruit_character = TUR_refik_saydam
	recruit_character = TUR_erkan_gataly
	recruit_character = TUR_ali_orlungat
	recruit_character = TUR_mehmet_salih_omurtak
	recruit_character = TUR_nazmi_solok
	recruit_character = TUR_hassan_saka
	recruit_character = TUR_kazim_ozalp
	recruit_character = TUR_mumtaz_okmen
	recruit_character = TUR_kazim_orbay
}

if = {
	limit = {
		AND = {
			has_dlc = "La Resistance"
			has_dlc = "Battle for the Bosporus"
		}
	}
	recruit_character = TUR_elyesa_bazna
	create_operative_leader = {
		name = "Ruzi Nazar"
		GFX = "GFX_portrait_tur_ruzi_nazar"
		traits = { operative_tough operative_commando }
		bypass_recruitment = no
		available_to_spy_master = yes
		female = no
		nationalities = { TUR SOV KAZ }
	}
}

### VARIANTS ###
# 1936 Start #
if = {
	limit = { not = { has_dlc = "Man the Guns" } }
	### Ship Variants ###
	create_equipment_variant = {
		name = "Kocatepe Class"
		type = destroyer_1
		upgrades = {
			ship_torpedo_upgrade = 2
			destroyer_engine_upgrade = 2
			ship_ASW_upgrade = 1
			ship_anti_air_upgrade = 1
		}
	}
	create_equipment_variant = {
		name = "Tinaztepe Class"
		type = destroyer_1
		obsolete = yes
		upgrades = {
			ship_torpedo_upgrade = 1
			destroyer_engine_upgrade = 1
			ship_ASW_upgrade = 1
			ship_anti_air_upgrade = 1
		}
	}
	create_equipment_variant = {
		name = "Dumlupinar Class"
		type = submarine_1
		upgrades = {
			ship_reliability_upgrade = 2
			sub_engine_upgrade = 2
			sub_stealth_upgrade = 2
			sub_torpedo_upgrade = 2
		}
	}
}
if = {
	limit = { has_dlc = "Man the Guns" }
	# Submarines #
	create_equipment_variant = {
		name = "Birinci Inönü Class"				
		type = ship_hull_submarine_1
		name_group = TUR_SS_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_torpedo_slot = ship_torpedo_sub_1
			fixed_ship_engine_slot = sub_ship_engine_1
			rear_1_custom_slot = empty
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Dumlupinar Class"				
		type = ship_hull_submarine_2
		name_group = TUR_SS_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_torpedo_slot = ship_torpedo_sub_1
			fixed_ship_engine_slot = sub_ship_engine_2
			rear_1_custom_slot = ship_mine_layer_sub
		}
	}
	create_equipment_variant = {
		name = "Sakarya Class"								# represents Sakarya and Gur classes
		type = ship_hull_submarine_1
		name_group = TUR_SS_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_torpedo_slot = ship_torpedo_sub_2
			fixed_ship_engine_slot = sub_ship_engine_2
			rear_1_custom_slot = empty
		}
	}
	# Destroyers #
	create_equipment_variant = {
		name = "Peyk Class"									# large torpedo boats		
		type = ship_hull_light_1
		name_group = TUR_DD_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = light_ship_engine_1
			fixed_ship_torpedo_slot = ship_torpedo_1
			mid_1_custom_slot = empty
			rear_1_custom_slot = empty
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Kocatepe Class"								# represents Kocatepe and Zafer classes
		type = ship_hull_light_1
		name_group = TUR_DD_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = light_ship_engine_2
			fixed_ship_torpedo_slot = ship_torpedo_1
			mid_1_custom_slot = empty
			rear_1_custom_slot = empty
		}
	}
	# Cruisers #
	create_equipment_variant = {
		name = "Mecidiye Class"								# represents Mecidiye and Hamidiye protected cruisers		
		type = ship_hull_cruiser_coastal_defense_ship
		name_group = TUR_CL_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_medium_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = cruiser_ship_engine_1
			fixed_ship_armor_slot = empty
			fixed_ship_secondaries_slot = ship_secondaries_1
			mid_1_custom_slot = empty
			mid_2_custom_slot = empty
			rear_1_custom_slot = ship_torpedo_1
		}
	}
	# Battlecruiser #
	create_equipment_variant = {
		name = "Yavuz Class"	
		type = ship_hull_heavy_1
		name_group = TUR_BC_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_heavy_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = heavy_ship_engine_1
			fixed_ship_secondaries_slot = ship_secondaries_1
			fixed_ship_armor_slot = ship_armor_bc_1
			front_1_custom_slot = ship_heavy_battery_1
			mid_1_custom_slot = ship_secondaries_1
			mid_2_custom_slot = empty
			rear_1_custom_slot = empty
		}
	}
}

# 1939 Start #
1939.1.1 = {
	if = {
		limit = { not = { has_dlc = "Man the Guns" } }
		# Ship variants #
	}
	if = {
		limit = { has_dlc = "Man the Guns" }
		# Submarines #
		create_equipment_variant = {
			name = "Saldiray Class"				
			type = ship_hull_submarine_2
			name_group = TUR_SS_HISTORICAL
			parent_version = 0
			modules = {
				fixed_ship_torpedo_slot = ship_torpedo_sub_2
				fixed_ship_engine_slot = sub_ship_engine_2
				rear_1_custom_slot = empty
			}
		}
	}
}