
####
#### NO STEP BACK
####


#You don't want Russian party names? Just remove these lines
set_party_name = {
	ideology = communism
	long_name = SOV_communism_party_russian_long
	name = SOV_communism_party_russian
}
set_party_name = {
	ideology = fascism
	long_name = SOV_fascism_party_russian_long
	name = SOV_fascism_party_russian
}

#COUNTRY LEADERS
recruit_character = SOV_iosif_stalin
recruit_character = SOV_supreme_soviet #This is a fake character! Proper country leader role is added via focus
if = {
	limit = {
		has_dlc = "No Step Back"
	}
	recruit_character = SOV_provisional_government # United Exiles
	set_country_flag = vlasov_owner_flag
}

#POLITICAL ADVISORS
recruit_character = SOV_mikhail_kalinin
recruit_character = SOV_nikita_khrushchyov
recruit_character = SOV_nikolay_voznesensky
recruit_character = SOV_lazar_kaganovich
recruit_character = SOV_genrikh_yagoda
recruit_character = SOV_nikolay_yezhov
recruit_character = SOV_lavrenty_beriya
recruit_character = SOV_vsevolod_merkulov
recruit_character = SOV_vyacheslav_molotov
recruit_character = SOV_maksim_litvinov

recruit_character = SOV_lev_trotsky
recruit_character = SOV_ivan_smirnov
recruit_character = SOV_ivar_smilga
recruit_character = SOV_karl_radek
recruit_character = SOV_yevgeny_preobrazhensky
recruit_character = SOV_aleksandr_shlyapnikov
recruit_character = SOV_nikolay_bukharin
recruit_character = SOV_aleksey_rykov
recruit_character = SOV_mikhail_tomsky
recruit_character = SOV_grigory_sokolnikov
recruit_character = SOV_grigory_zinovyev
recruit_character = SOV_lev_kamenev
recruit_character = SOV_martemyan_ryutin
recruit_character = SOV_patriarch_sergy
recruit_character = SOV_aleksandr_kerensky
recruit_character = SOV_konstantin_rodzayevsky


recruit_character = SOV_aleksandr_vasilevsky
recruit_character = SOV_aleksandr_golovanov
recruit_character = SOV_aleksandr_gorbatov
recruit_character = SOV_aleksandr_novikov
recruit_character = SOV_aleksandr_yegorov
recruit_character = SOV_andrey_grechko
#recruit_character = SOV_andrey_vlasov SEELOW seelow 
recruit_character = SOV_andrey_yeryomenko
recruit_character = SOV_arseny_golovko
recruit_character = SOV_boris_shaposhnikov
recruit_character = SOV_dmitry_lelyushenko
recruit_character = SOV_filipp_golikov
recruit_character = SOV_filipp_oktyabrsky

recruit_character = SOV_georgy_zakharov
recruit_character = SOV_georgy_zhukov
recruit_character = SOV_gordey_levchenko
recruit_character = SOV_grigory_kulik
recruit_character = SOV_igor_kurchatov
recruit_character = SOV_issa_pliyev
recruit_character = SOV_ivan_chernyakhovsky
recruit_character = SOV_ivan_fedyuninsky
recruit_character = SOV_ivan_konev
recruit_character = SOV_ivan_yumashev
recruit_character = SOV_kirill_meretskov
recruit_character = SOV_kirill_moskalenko
recruit_character = SOV_kliment_voroshilov
recruit_character = SOV_konstantin_rokossovsky
recruit_character = SOV_konstantin_vershinin
recruit_character = SOV_kuzma_galitsky
recruit_character = SOV_leonid_govorov
recruit_character = SOV_maksim_purkayev
recruit_character = SOV_markian_popov
recruit_character = SOV_maks_reyter
recruit_character = SOV_mikhail_frinovsky

recruit_character = SOV_mikhail_tukhachevsky
recruit_character = SOV_nikandr_chibisov

recruit_character = SOV_nikolay_berzarin
recruit_character = SOV_nikolay_vatutin

recruit_character = SOV_nikolay_kuznetsov

recruit_character = SOV_pavel_rychagov
recruit_character = SOV_pavel_zhigarev
recruit_character = SOV_pyotr_smirnov
recruit_character = SOV_rodion_malinovsky
recruit_character = SOV_semyon_budyonny
recruit_character = SOV_semyon_timoshenko
recruit_character = SOV_sergey_khudyakov
recruit_character = SOV_sergey_korolyov
recruit_character = SOV_sergey_rudenko
recruit_character = SOV_sergey_gorshkov
recruit_character = SOV_stepan_krasovsky
recruit_character = SOV_vasily_blyukher
recruit_character = SOV_vasily_chuykov
recruit_character = SOV_vasily_kuznetsov
recruit_character = SOV_vladimir_kasatonov
recruit_character = SOV_vladimir_tributs

recruit_character = SOV_yakov_cherevichenko
recruit_character = SOV_yakov_smushkevich

recruit_character = SOV_vitaly_primakov
#Not available at game start
recruit_character = SOV_vasily_korzh
recruit_character = SOV_sidor_kovpak
recruit_character = SOV_lev_dovator
recruit_character = SOV_pavel_rybalko

if = {
	limit = {
		has_dlc = "No Step Back"
	}
	recruit_character = SOV_anastasy_vonsyatsky
	# recruit_character = SOV_grigory_semyonov # starts as an advisor to Puyi
	recruit_character = SOV_metropolitan_anastasy
	recruit_character = SOV_metropolitan_nikolay
	recruit_character = SOV_nikolay_ustryalov
	recruit_character = SOV_aleksandr_kazembek
	recruit_character = SOV_metropolitan_aleksy
	recruit_character = SOV_metropolitan_meletius
	recruit_character = SOV_aleksandr_prokofyev_seversky
	recruit_character = SOV_vyacheslav_tkachyov
	recruit_character = SOV_yan_nagursky
	recruit_character = SOV_vasily_yanchenko
	recruit_character = SOV_tsar_vladimir_kirillovich

	recruit_character = SOV_pyotr_krasnov
	recruit_character = SOV_konstantin_nechayev
	recruit_character = SOV_aleksandr_rodzyanko
	recruit_character = SOV_vladimir_kosmin
	recruit_character = SOV_andrey_shkuro
	recruit_character = SOV_anton_denikin
}


#Initialize character flags Part I (aka who's safe)
SOV_mikhail_kalinin = {
	set_character_flag = SOV_safe_from_purge_flag
}
SOV_nikita_khrushchyov = {
	set_character_flag = SOV_safe_from_purge_flag
}
SOV_lazar_kaganovich = {
	set_character_flag = SOV_safe_from_purge_flag
}
SOV_genrikh_yagoda = { #NKVD Chiefs are always safe from regular purges, they'll be handled by a special purge event
	set_character_flag = SOV_safe_from_purge_flag
}
SOV_nikolay_yezhov = { #NKVD Chiefs are always safe from regular purges, they'll be handled by a special purge event
	set_character_flag = SOV_safe_from_purge_flag
}
SOV_lavrenty_beriya = { #NKVD Chiefs are always safe from regular purges, they'll be handled by a special purge event. Beriya will always be safe.
	set_character_flag = SOV_safe_from_purge_flag
}
SOV_vsevolod_merkulov = {
	set_character_flag = SOV_safe_from_purge_flag
}
SOV_vyacheslav_molotov = {
	set_character_flag = SOV_safe_from_purge_flag
}
SOV_konstantin_rodzayevsky = { #Not in the country
	set_character_flag = SOV_exiled_flag
}
SOV_aleksandr_kerensky = { #Not in the country
	set_character_flag = SOV_exiled_flag
}
SOV_lev_trotsky = { #Not in the country
	set_character_flag = SOV_exiled_flag
}
SOV_patriarch_sergy = { #Priests are not political enemies at this point
	set_character_flag = SOV_safe_from_purge_flag
}
if = {
	limit = {
		has_dlc = "No Step Back"
	}
	SOV_metropolitan_anastasy = { #Priests are not political enemies at this point
		set_character_flag = SOV_safe_from_purge_flag
	}
	SOV_metropolitan_nikolay = { #Priests are not political enemies at this point
		set_character_flag = SOV_safe_from_purge_flag
	}
	SOV_metropolitan_aleksy = { #Priests are not political enemies at this point
		set_character_flag = SOV_safe_from_purge_flag
	}
	SOV_metropolitan_meletius = { #Priests are not political enemies at this point (Also exiled)
		set_character_flag = SOV_safe_from_purge_flag
	}
	SOV_anastasy_vonsyatsky = { #Not in the country
		set_character_flag = SOV_exiled_flag
	}
	SOV_aleksandr_kazembek = { #Not in the country
		set_character_flag = SOV_exiled_flag
	}
	SOV_aleksandr_prokofyev_seversky = { #Not in the country
		set_character_flag = SOV_exiled_flag
	}
	SOV_vyacheslav_tkachyov = { #Not in the country
		set_character_flag = SOV_exiled_flag
	}
	SOV_yan_nagursky = { #Not in the country
		set_character_flag = SOV_exiled_flag
	}
	SOV_vasily_yanchenko = { #Not in the country
		set_character_flag = SOV_exiled_flag
	}
	SOV_anton_denikin = { #Not in the country
		set_character_flag = SOV_exiled_flag
		set_character_flag = SOV_exiled_army_leader
	}
	SOV_pyotr_krasnov = { #Not in the country
		set_character_flag = SOV_exiled_flag
		set_character_flag = SOV_exiled_army_leader
	}
	SOV_konstantin_nechayev = { #Not in the country
		set_character_flag = SOV_exiled_flag
		set_character_flag = SOV_exiled_army_leader
	}
	SOV_vladimir_kosmin = { #Not in the country
		set_character_flag = SOV_exiled_flag
		set_character_flag = SOV_exiled_army_leader
	}
	SOV_aleksandr_rodzyanko = { #Not in the country
		set_character_flag = SOV_exiled_flag
		set_character_flag = SOV_exiled_army_leader
	}
	SOV_andrey_shkuro = { #Not in the country
		set_character_flag = SOV_exiled_flag
		set_character_flag = SOV_exiled_army_leader
	}
	
	
}


#Initialize character flags Part II (aka who's what)
SOV_lev_trotsky = {
	set_character_flag = SOV_aligned_left_opposition_flag #Probably not needed, but just in case ;)
}
SOV_ivan_smirnov = {
	set_character_flag = SOV_aligned_left_opposition_flag
}
SOV_ivar_smilga = {
	set_character_flag = SOV_aligned_left_opposition_flag
}
SOV_karl_radek = {
	set_character_flag = SOV_aligned_left_opposition_flag
}
SOV_yevgeny_preobrazhensky = {
	set_character_flag = SOV_aligned_left_opposition_flag
}
SOV_aleksandr_shlyapnikov = {
	set_character_flag = SOV_aligned_left_opposition_flag
}
SOV_nikolay_bukharin = {
	set_character_flag = SOV_aligned_right_opposition_flag
}
SOV_aleksey_rykov = {
	set_character_flag = SOV_aligned_right_opposition_flag
}
SOV_mikhail_tomsky = {
	set_character_flag = SOV_aligned_right_opposition_flag
}
SOV_grigory_sokolnikov = {
	set_character_flag = SOV_aligned_right_opposition_flag
}
#SOV_grigory_zinovyev -> Will be aligned with either left or right opposition via focus
#SOV_lev_kamenev -> Will be aligned with either left or right opposition via focus
#SOV_martemyan_ryutin -> Will be aligned with either left or right opposition via focus
if = {
	limit = {
		has_dlc = "No Step Back"
	}
	SOV_anastasy_vonsyatsky = {
		set_character_flag = SOV_aligned_the_exiles_flag
		set_character_flag = SOV_exiled_flag
	}
	 
	SOV_nikolay_ustryalov = {
		set_character_flag = SOV_aligned_the_exiles_flag
	}
	SOV_aleksandr_kazembek = {
		set_character_flag = SOV_aligned_the_exiles_flag
	}
	SOV_aleksandr_prokofyev_seversky = {
		set_character_flag = SOV_aligned_the_exiles_flag
		set_character_flag = SOV_exiled_military_advisor_flag
	}
	SOV_vyacheslav_tkachyov = {
		set_character_flag = SOV_aligned_the_exiles_flag
		set_character_flag = SOV_exiled_military_advisor_flag
	}
	SOV_yan_nagursky = {
		set_character_flag = SOV_aligned_the_exiles_flag
		set_character_flag = SOV_exiled_military_advisor_flag
	}
	SOV_vasily_yanchenko = {
		set_character_flag = SOV_aligned_the_exiles_flag
		set_character_flag = SOV_exiled_military_advisor_flag
	}
}

#Initialize character flags Part III (aka who's in prison)
SOV_ivan_smirnov = {
	set_character_flag = SOV_imprisoned_flag
}
SOV_ivar_smilga = {
	set_character_flag = SOV_imprisoned_flag
}
SOV_aleksandr_shlyapnikov = {
	set_character_flag = SOV_imprisoned_flag
}
SOV_grigory_zinovyev = {
	set_character_flag = SOV_imprisoned_flag
}
SOV_lev_kamenev = {
	set_character_flag = SOV_imprisoned_flag
}
SOV_martemyan_ryutin = {
	set_character_flag = SOV_imprisoned_flag
}
	


### PROPAGANDA ###
set_variable = { SOV_new_propaganda_campaign = 0 } #Used to pick a poster slot
set_variable = { SOV_propaganda_campaign_to_remove = 0 } #Used to reset a poster slot
set_variable = { SOV_propaganda_locked_slot_index = 1 } #### === INSERT LOCKED SLOT INDEX IN STRIPE HERE === ####
set_variable = { SOV_propaganda_empty_slot_index = 2 } #### === INSERT EMPTY SLOT INDEX IN STRIPE HERE === ####
set_variable = { SOV_poster_left_icon_frame = SOV_propaganda_locked_slot_index } #Set up the appropriate empty slot GFX
set_variable = { SOV_poster_center_icon_frame = SOV_propaganda_locked_slot_index } #Set up the appropriate locked slot GFX
set_variable = { SOV_poster_right_icon_frame = SOV_propaganda_locked_slot_index } #Set up the appropriate locked slot GFX

set_variable = { SOV_default_propaganda_campaign_duration = 180 } #Duration days for propaganda campaigns
set_variable = { SOV_default_propaganda_campaign_cooldown = 90 } #Days of cooldown after a Propaganda Campaign has been finished.
set_variable = { SOV_default_propaganda_campaign_old_days = 150 } #A propaganda poster will age (change GFX) after this amount of days have passed since the campaign was activated
set_variable = { SOV_propaganda_cost = 15 } #Used not only to set the rest of propaganda campaign costs here, but also used to increase each campaign cost after being activated
set_variable = { SOV_propaganda_cost_increase = 2 } #This will multiply the regular propaganda_cost each time a propaganda campaign is activated, so that it's cost is increased
set_variable = { SOV_propaganda_motherland_calls_cost = SOV_propaganda_cost } # ID = 2
set_variable = { SOV_propaganda_victory_at_hand_cost = SOV_propaganda_cost } # ID = 3
set_variable = { SOV_propaganda_defend_moscow_cost = SOV_propaganda_cost } # ID = 4
set_variable = { SOV_propaganda_fight_to_the_last_cost = SOV_propaganda_cost } # ID = 5
set_variable = { SOV_propaganda_hit_of_hammer_cost = SOV_propaganda_cost } # ID = 6
set_variable = { SOV_propaganda_transport_cost = SOV_propaganda_cost } # ID = 7
set_variable = { SOV_propaganda_oil_for_the_motherland_cost = SOV_propaganda_cost } # ID = 8
set_variable = { SOV_propaganda_more_metal_cost = SOV_propaganda_cost } # ID = 9
set_variable = { SOV_propaganda_high_yield_cost = SOV_propaganda_cost } # ID = 10
set_variable = { SOV_propaganda_for_the_motherland_cost = SOV_propaganda_cost } # ID = 11
set_variable = { SOV_propaganda_heroes_forward_cost = SOV_propaganda_cost } # ID = 12
set_variable = { SOV_propaganda_anti_capitalism_cost = SOV_propaganda_cost } # ID = 13
set_variable = { SOV_propaganda_anti_fascism_cost = SOV_propaganda_cost } # ID = 14
set_variable = { SOV_propaganda_treacherous_enemy_cost = SOV_propaganda_cost } # ID = 15
set_variable = { SOV_propaganda_do_not_blab_cost = SOV_propaganda_cost } # ID = 16
set_variable = { SOV_propaganda_sweep_scum_out_cost = SOV_propaganda_cost } # ID = 17
set_variable = { SOV_propaganda_knowledge_cost = SOV_propaganda_cost } # ID = 18
set_variable = { SOV_propaganda_builders_of_communism_cost = SOV_propaganda_cost } # ID = 19
set_variable = { SOV_propaganda_glory_to_partisans_cost = SOV_propaganda_cost } # ID = 20
set_variable = { SOV_propaganda_death_to_invaders_cost = SOV_propaganda_cost } # ID = 21
set_variable = { SOV_propaganda_stalin_cost = SOV_propaganda_cost } # ID = 22
set_variable = { SOV_propaganda_rebuild_to_glory_cost = SOV_propaganda_cost } # ID = 23
set_variable = { SOV_propaganda_peace_cost = SOV_propaganda_cost } # ID = 24
set_variable = { SOV_propaganda_happy_life_cost = SOV_propaganda_cost } # ID = 25

set_variable = { SOV_propaganda_campaigns_taken = 0 } #Used as a requirement for certain focuses


###PARANOIA ###
set_variable = { SOV_paranoia = 0 } # Intitial Paranoia value
set_variable = { SOV_paranoia_very_low_increase = 5 } #Paranoia very low increment
set_variable = { SOV_paranoia_low_increase = 10 } #Paranoia low increment
set_variable = { SOV_paranoia_medium_increase = 20 } #Paranoia medium increment
set_variable = { SOV_paranoia_high_increase = 30 } #Paranoia high increment
set_variable = { SOV_paranoia_very_high_increase = 50 } #Paranoia very high increment
set_variable = { SOV_paranoia_low_decrease = -10 } #Paranoia low decrement --------> (prev -5)
set_variable = { SOV_paranoia_medium_decrease = -20 } #Paranoia medium decrement --------> (prev -10)
set_variable = { SOV_paranoia_high_decrease = -30 } #Paranoia high decrement --------> (prev -15)
set_variable = { SOV_paranoia_very_high_decrease = -50 } #Paranoia very high decrement --------> (prev -25)
set_variable = { SOV_paranoia_lower_threshold = 25 } #Lower Threshold -> Below Stalin doesn't purge
set_variable = { SOV_paranoia_higher_threshold = 75 } #Higher Threshold -> Below Stalin purges occasionally / Above Stalin can start a Great Purge
set_variable = { SOV_paranoia_modifier_increase = 1 } #Paranoia weekly increase via modifiers (Stalin's Paranoid leader trait) // WARNING: CUSTOM TOOLTIP DOES NOT WORK WITH VARS so needs to be updated
set_variable = { SOV_paranoia_weekly_modifiers_amount = 1 } #Number of Weekly Paranoia Modifiers currently active (Stalin's trait, Heads of NKVD, etc.). This value will be mulptiplied by SOV_paranoia_modifier_increase in order to apply the final weekly modifier
SOV_paranoia_modifier_update_gui_tooltip = yes #Used in the Paranoia GUI to show total weekly increase/decrease of Paranoia
set_country_flag = SOV_paranoia_modifier_active_flag
set_variable = { SOV_paranoia_great_purge_administration_number_of_targets = 4 } #Max amount of targets to be purged by the appropriate Great Purge (so that it can be changed if necessary)
set_variable = { SOV_paranoia_great_purge_army_number_of_targets = 4 } #Max amount of targets to be purged by the appropriate Great Purge (so that it can be changed if necessary)
set_variable = { SOV_paranoia_great_purge_navy_number_of_targets = 4 } #Max amount of targets to be purged by the appropriate Great Purge (so that it can be changed if necessary)
set_variable = { SOV_paranoia_great_purge_air_number_of_targets = 3 } #Max amount of targets to be purged by the appropriate Great Purge (so that it can be changed if necessary)
set_variable = { SOV_specific_random_purge_targets_override = -1 } #-1 = default random people will be purged // 0+ = that many chars will be randomly targeted - Then the var is reset to -1

#Purge-Related Decs Vars
set_variable = { SOV_reinforce_officer_ranks_days = 360 }
set_variable = { SOV_reinstate_aircraft_designer_days = 180 }

set_variable = { SOV_total_purge_counter = 0 } #Total Purges Counter
set_variable = { SOV_regular_purge_counter = 0 } #Regular Purges Counter
set_variable = { SOV_great_purge_counter = 0 } #Great Purges Counter
set_country_flag = SOV_last_purge_flag #Used for Cooldown between purges
set_variable = { SOV_paranoia_weekly_bucket = 0 }
set_variable = { SOV_medium_paranoia_days = 0 }
set_variable = { SOV_high_paranoia_days = 0 }

set_variable = { SOV_paranoia_based_on_level_multiplier = 5 } #Used in certain situations where unit leaders are purged and paranoia should be affected based on their level

set_variable = { SOV_moscow_trial_index = 1 }

set_variable = { SOV_last_regular_purge_area = 0 } # 1=ADMIN | 2=ARMY | 3=NAVY | 4=AIRFORCE // Used to prevent an area (army, administration...) to be purged twice in a row
set_variable = { SOV_last_great_purge_area = 0 } # 1=ADMIN | 2=ARMY | 3=NAVY | 4=AIRFORCE // Used to prevent an area (army, administration...) to be GREATLY purged twice in a row

set_variable = { SOV_purge_event_pp_to_avoid_regular = 0 } #PP Required to show the option to avoid a regular purge
set_variable = { SOV_purge_event_pp_to_avoid_great = 0 } #PP Required to show the option to avoid a great purge
set_variable = { SOV_purge_event_pp_to_avoid_regular_pay = -60 } #PP to be paid to avoid a regular purge
set_variable = { SOV_purge_event_pp_to_avoid_great_pay = -120 } #PP to be paid to avoid a great purge

set_variable = { SOV_paranoia_calm_down_stalin_re_enable_days = 180 } #Calm Down Stalin decision cooldown
set_variable = { SOV_paranoia_calm_down_stalin_decision_cost = 25 } #Calm Down Stalin decision cost
set_variable = { SOV_paranoia_inspection_re_enable_days = 180 } #Inpsection decisions cooldown
set_variable = { SOV_paranoia_inspection_remove_days = 7 } #Inspection decisions time to complete
set_variable = { SOV_paranoia_inspection_decision_cost = 50 } #Inspection decisions cost

country_event = { id = NSB_soviet_paranoia_system_events.01 days = 90 random_days = 10 } # EVENT ACTIVATING THE PARANOIA SYSTEM

# Civil war preparation 
set_variable = { SOV_army_framejob_decision_cost = 25 } #Frame general decisions cost
set_variable = { SOV_navy_framejob_decision_cost = 25 } #Frame admiral decisions cost
set_variable = { SOV_army_framejob_decision_re_enable_days = 30 } #Frame general decisions starting days, minus increment
set_variable = { SOV_navy_framejob_decision_re_enable_days = 30 } #Frame admiral decisions starting days, minus increment
set_variable = { SOV_army_framejob_decision_re_enable_days_display = 60 } #Frame general decisions starting days
set_variable = { SOV_navy_framejob_decision_re_enable_days_display = 60 } #Frame admiral decisions starting days
set_variable = { SOV_influence_general_decision_cost = 25 } #Influence general decisions cost
set_variable = { SOV_influence_admiral_decision_cost = 25 } #Influence admiral decisions cost
set_variable = { SOV_influence_army_decision_cost = 40 } #Influence army decisions cost
set_variable = { SOV_influence_navy_decision_cost = 40 } #Influence navy decisions cost
set_variable = { SOV_influence_aiforce_decision_cost = 40 } #Influence airforce decisions cost

#UI Elements
set_variable = { SOV_paranoia_photo_zinovyev = 1 }
set_variable = { SOV_paranoia_photo_radek = 1 }
set_variable = { SOV_paranoia_photo_bukharin = 1 }
set_variable = { SOV_paranoia_photo_trotsky = 1 }
set_variable = { SOV_paranoia_photo_tukhachevsky = 1 }
set_variable = { SOV_paranoia_main_paranoiameter = 1 }
#Generic portraits
add_to_array = {
	array = SOV_paranoia_generic_portraits_array
	value = 0
	index = 0
}
set_temp_variable = { i = 0 }
while_loop_effect = {
	limit = {
		check_variable = { i = 12 compare = less_than }
	}
	add_to_array = { SOV_paranoia_generic_portraits_array = 1 } # 1 = NO PORTRAIT
	add_to_temp_variable = { i = 1 }
}
set_variable = { SOV_paranoia_portrait_index = 1 }


#GOSPROYEKTSTROY
set_variable = { SOV_gosproyektstroy_decision_cost = 50 }
set_variable = { SOV_gosproyektstroy_decision_time = 90 }

#USSR ACADEMY OF SCIENCES
set_variable = { SOV_national_academy_of_sciences_research_increase = 0.01 } #Research speed increment for each Academy of Sciences built
set_variable = { SOV_academy_of_sciences_research_speed_factor = 0.01 } #Var used by the dynamic modifier to apply the research bonus
set_variable = { SOV_national_academy_of_sciences_construction_cost = 50 } #The cost for activating the decision to build an academy.
set_variable = { SOV_national_academy_of_sciences_construction_time = 90 } #The time it takes for the decision to finish and build an academy.
set_variable = { SOV_academies_required_for_atomic_bomb_project = 7 } #Number of academies of sciences required to pick focus Soviet Atomic Bomb Project

#THIRD FIVE YEAR PLAN FACTORY REQUIREMENTS
set_variable = { SOV_fyp_factory_requirement_tier_1 = 100 }
set_variable = { SOV_fyp_factory_requirement_tier_2 = 120 }
set_variable = { SOV_fyp_factory_requirement_tier_3 = 130 }
set_variable = { SOV_fyp_factory_requirement_tier_4 = 150 }
set_variable = { SOV_fyp_factory_requirement_tier_5 = 200 }

#THIRD FIVE YEAR PLAN NATIONAL SPIRIT VARS
set_variable = { SOV_fyp_production_factory_efficiency_gain_factor = -0.15 }
set_variable = { SOV_fyp_production_factory_max_efficiency_factor = 0.05 }
set_variable = { SOV_fyp_consumer_goods_factor = 0.05 }
set_variable = { SOV_fyp_production_speed_industrial_complex_factor = 0.05 }

set_variable = { SOV_fyp_industrial_concern_cost_factor = -0.15 } #-> Third Five Year Plan
set_variable = { SOV_fyp_local_resources_factor = 0 } #-> Increase State Reserves
set_variable = { SOV_fyp_line_change_production_efficiency_factor = 0 } #-> Industrial Modernization
set_variable = { SOV_fyp_production_speed_arms_factory_factor = 0.1 } #-> Shift to Armaments Production
set_variable = { SOV_fyp_production_factory_start_efficiency_factor = 0 } #-> Optimize Production Lines
set_variable = { SOV_fyp_industrial_capacity_factory = 0 } #-> Steel Casting Industry
set_variable = { SOV_fyp_industrial_capacity_dockyard = 0 } #-> Steel Casting Industry
set_variable = { SOV_fyp_fuel_gain_factor_from_states = 0 } #-> Oil Production
set_variable = { SOV_fyp_production_oil_factor = 0 } #-> Oil Production
set_variable = { SOV_fyp_industry_repair_factor = 0.1 } #-> Fourth Five Year Plan

add_dynamic_modifier = { modifier = SOV_second_five_year_plan_dynamic_modifier }


#SOVIET AIRFORCE NATIONAL SPIRIT VARS
set_variable = { SOV_soviet_airforce_air_accidents_factor = 0.75 }
set_variable = { SOV_soviet_airforce_air_ace_generation_chance_factor = -0.5 }
set_variable = { SOV_soviet_airforce_air_night_penalty = 0.3 }
set_variable = { SOV_soviet_airforce_air_weather_penalty = 0.3 }
set_variable = { SOV_soviet_airforce_air_wing_xp_loss_when_killed_factor = 0.3 }
set_variable = { SOV_soviet_airforce_air_mission_xp_gain_factor = 0.1 }
set_variable = { SOV_soviet_airforce_air_training_xp_gain_factor = -0.1 }

set_variable = { SOV_soviet_airforce_aircraft_manufacturer_cost_factor = 0 } #-> Expand the Aircraft Industry
set_variable = { SOV_soviet_airforce_air_fuel_consumption_factor = 0 } #-> Modernize Aircraft Factories / Intensify Pilot Training Program
set_variable = { SOV_soviet_airforce_air_range_factor = 0 } #-> Modernize Aircraft Factories
set_variable = { SOV_soviet_airforce_air_agility_factor = 0 } #-> Modernize Aircraft Factories
set_variable = { SOV_soviet_airforce_air_strategic_bomber_night_penalty = 0 } #-> Raskova's Aviation Group
set_variable = { SOV_soviet_airforce_air_cas_present_factor = 0 } #-> Ground Support
set_variable = { SOV_soviet_airforce_strategic_bomb_visibility = 0 } #-> Long Range Aircraft
set_variable = { SOV_soviet_airforce_air_mission_efficiency = 0 } #-> The Modern War in the Skies
set_variable = { SOV_soviet_airforce_air_nav_efficiency = 0 } #-> Expand the Morskaya Aviatsiya

add_dynamic_modifier = { modifier = SOV_soviet_airforce_dynamic_modifier }


#THE RED FLEET NATIONAL SPIRIT VARS
set_variable = { SOV_red_fleet_navy_refit_ic_cost = -0.05 }
set_variable = { SOV_red_fleet_repair_speed_factor = 0.05 }

set_variable = { SOV_red_fleet_naval_coordination = 0 } #-> Advanced Maneuvers
set_variable = { SOV_red_fleet_navy_visibility = 0 } #-> Advanced Maneuvers
set_variable = { SOV_red_fleet_positioning = 0 } #-> Advanced Maneuvers
set_variable = { SOV_red_fleet_screening_efficiency = 0 } #-> Advanced Maneuvers
set_variable = { SOV_red_fleet_naval_invasion_capacity = 0 } #-> Marines
set_variable = { SOV_red_fleet_invasion_preparation = 0 } #-> Marines
set_variable = { SOV_red_fleet_special_forces_cap = 0 } #-> Marines


#DEFENSE INDUSTRY NATIONAL SPIRIT VARS
set_variable = { SOV_defense_industry_conversion_cost_civ_to_mil_factor = -0.2 }
set_variable = { SOV_defense_industry_production_factory_max_efficiency_factor = 0.05 }
set_variable = { SOV_defense_industry_production_factory_efficiency_gain_factor = -0.05 }
set_variable = { SOV_defense_industry_line_change_production_efficiency_factor = -0.1 }

set_variable = { SOV_defense_industry_tank_manufacturer_cost_factor = 0 } #-> Tank Designer focus
set_variable = { SOV_defense_industry_land_equipment_upgrade_xp_cost = 0 } #-> Tankograd
set_variable = { SOV_defense_industry_materiel_manufacturer_cost_factor = 0 } #-> Equipment Designers focus
set_variable = { SOV_defense_industry_breakthrough_factor = 0 } #-> PC of Mortar Armament
set_variable = { SOV_defense_industry_production_speed_coastal_bunker_factor = 0 } #-> Military Engineering University
set_variable = { SOV_defense_industry_production_speed_bunker_factor = 0 } #-> Military Engineering University
set_variable = { SOV_defense_industry_max_dig_in_factor = 0 } #-> Military Engineering University
set_variable = { SOV_defense_industry_army_artillery_defence_factor = 0 } #-> Military Engineering University


#THE RED ARMY NATIONAL SPIRIT VARS
set_variable = { SOV_the_red_army_mobilization_laws_cost_factor = -0.1 }
set_variable = { SOV_the_red_army_army_org_factor = -0.15 } # -> Restore Cossack Units / Cohsesion First #Meant to represent disgruntledness
set_variable = { SOV_the_red_army_experience_gain_army_factor = -0.1 }
set_variable = { SOV_the_red_army_experience_loss_factor = 0.25 }

set_variable = { SOV_the_red_army_mobilization_speed = 0 } #-> Strengthen the Mobilization Plan
set_variable = { SOV_the_red_army_conscription_factor = 0 } #-> Strengthen the Mobilization Plan
set_variable = { SOV_the_red_army_modifier_army_sub_unit_cavalry_speed_factor = 0 } #-> Restore Cossack Units
set_variable = { SOV_the_red_army_cavalry_attack_factor = 0 } #-> Restore Cossack Units
set_variable = { SOV_the_red_army_training_time_factor = 0 } # -> Cohsesion First
set_variable = { SOV_the_red_army_heat_attrition_factor = 0 } # -> An Adaptable Army
set_variable = { SOV_the_red_army_winter_attrition_factor = 0 } # -> An Adaptable Army
set_variable = { SOV_the_red_army_acclimatization_cold_climate_gain_factor = 0 } # -> An Adaptable Army
set_variable = { SOV_the_red_army_acclimatization_hot_climate_gain_factor = 0 } # -> An Adaptable Army
set_variable = { SOV_the_red_army_terrain_penalty_reduction = 0 } # -> An Adaptable Army
set_variable = { SOV_the_red_army_unit_infantry_design_cost_factor = 0 } # -> Military Reorganization
set_variable = { SOV_the_red_army_unit_artillery_brigade_design_cost_factor = 0 } # -> Military Reorganization
set_variable = { SOV_the_red_army_army_org_regain = 0 } # -> Barrier Troops
set_variable = { SOV_the_red_army_special_forces_cap = 0 } # -> The Glory of the Red Army
set_variable = { SOV_the_red_army_land_doctrine_cost_factor = 0 } # -> The Glory of the Red Army
set_variable = { SOV_the_red_army_cas_damage_reduction = 0 } # -> Experts in Camouflage
set_variable = { SOV_the_red_army_max_dig_in = 0 } # -> Experts in Camouflage
set_variable = { SOV_the_red_army_dig_in_speed_factor = 0 } # -> Experts in Camouflage
set_variable = { SOV_the_red_army_operative_slot  = 0 } # -> Organization of the Partisans
set_variable = { SOV_the_red_army_max_command_power_mult = 0 } # -> Depoliticize the Military

add_dynamic_modifier = { modifier = SOV_the_red_army_dynamic_modifier }

#THE POLITBURO SPIRIT VARS
set_variable = { SOV_the_politburo_communism_drift = 0.05 }

set_variable = { SOV_the_politburo_defensive_war_stability_factor = 0 } # -> Socialism in One Country
set_variable = { SOV_the_politburo_drift_defence_factor = 0 } # -> Socialism in One Country
set_variable = { SOV_the_politburo_political_power_factor = 0 } #0.05 -> The Stalin Constitution
set_variable = { SOV_the_politburo_economy_cost_factor = 0 } # -> Secure the Administration
set_variable = { SOV_the_politburo_trade_laws_cost_factor = 0 } # -> Secure the Administration
set_variable = { SOV_the_politburo_mobilization_laws_cost_factor = 0 } # -> Secure the Administration
set_variable = { SOV_the_politburo_good_consumer_goods_factor = 0 } # -> Collectivization Process
set_variable = { SOV_the_politburo_production_speed_buildings_factor = 0 } # -> Collectivization Process
set_variable = { SOV_the_politburo_global_building_slots_factor = 0 } # -> Collectivization Process
set_variable = { SOV_the_politburo_max_surrender_limit_offset = 0 } # -> The Workers Dictatorship
set_variable = { SOV_the_politburo_max_command_power = 0 } # -> Organization, Centralization, Discipline
set_variable = { SOV_the_politburo_mobilization_speed = 0 } # -> Organization, Centralization, Discipline
set_variable = { SOV_the_politburo_operative_slot = 0 } # -> Behead the Snake
set_variable = { SOV_the_politburo_political_advisor_cost_factor = 0 } # -> Freedom of Debate, Unity of Action
set_variable = { SOV_the_politburo_opinion_gain_monthly_same_ideology_factor = 0 } # -> The Construction of Communism

#FACTIONALISM VARS
set_variable = { SOV_factionalism_political_power_factor = -0.10 }
set_variable = { SOV_factionalism_political_advisor_cost_factor = 0 }
set_variable = { SOV_factionalism_popularity_stability_cost_factor = -0.1 }

#POUM VARS
set_variable = { SOV_default_poum_days = 30 }
set_variable = { SOV_default_poum_cd = 180 }
set_variable = { SOV_long_poum_cd = 365 }


#MERGE DESIGNERS VARS
set_variable = { SOV_merge_designers_cost = 50 } #Default cost for merge designer decisions
set_variable = { SOV_merge_designers_time = 180 } #The time to complete merge designer decisions

#INDUSTRIAL RELOCATION
set_variable = { SOV_industrial_relocation_max_factories = 4 } #Max amount of factories that will be relocated by a decision
set_variable = { SOV_industrial_relocation_days = 60 } #Decision duration (can be halved by focus)
set_variable = { SOV_industrial_relocation_trains_focus = 120 } #Trains to be used by the focus (20 trains / factory)
set_variable = { SOV_industrial_relocation_trains_focus_negative = -120 } #Trains to be used by the focus (20 trains / factory)
set_variable = { SOV_industrial_relocation_trains_decision = 80 } #Trains to be used by the generic decision (20 trains / factory)
set_variable = { SOV_industrial_relocation_trains_decision_negative = -80 } #Trains to be used by the generic decision (20 trains / factory)
set_variable = { SOV_industrial_relocation_trains_decision_aluminium = 20 } #Trains to be used by the aluminium decision (20 trains / factory)
set_variable = { SOV_industrial_relocation_trains_decision_aluminium_negative = -20 } #Trains to be used by the aluminium decision (20 trains / factory)

#DECISIONS COST - For cost reductions
set_variable = { SOV_pressure_country_government_cost = 50 }
set_variable = { SOV_promote_ideology_rallies_cost = 50 }
set_variable = { SOV_send_ultimatum_to_country_cost = 75 }
set_variable = { SOV_send_infantry_equipment_cost = 50 }
set_variable = { SOV_peace_deal_cost = 15 }
set_variable = { SOV_sinkiang_proposal_cost = 15 }
set_variable = { SOV_sinkiang_puppeting_cost = 100 } #This will increase for each state controlled by SIK excluding the ones owned at game start.
set_variable = { SOV_sinkiang_puppeting_cost_increase_per_state = 15 }

#DECISIONS DAYS
set_variable = { SOV_sinkiang_mineral_prospection_days = 180 }
set_variable = { SOV_sinkiang_oil_prospection_days = 270 }
set_variable = { SOV_sinkiang_military_aid_days = 90 }
set_variable = { SOV_sinkiang_support_expansion_days = 365 }

#DECISIONS DAYS
set_variable = { SOV_pressure_government_days = 30 }
set_variable = { SOV_pressure_government_cd = 365 }
set_variable = { SOV_ideological_rallies_days = 90 }
set_variable = { SOV_ultimatum_days = 14 }
set_variable = { SOV_send_infantry_equipment_cd = 180 }
set_variable = { SOV_operation_countenance_preparation_days = 30 }
set_variable = { SOV_operation_countenance_mission_days = 30 }

set_variable = { SOV_permanent_revolution_uprising_days = 90 }

#PLANNED ECONOMY VARS
set_variable = { SOV_planned_economy_industrial_capacity_factory_initial = 0.01 } #+0.01% per puppet (max 0.1%)
set_variable = { SOV_planned_economy_production_lack_of_resource_penalty_factor_initial = -0.01 } #-0.01% per puppet (max -0.01%)
set_variable = { SOV_planned_economy_industrial_capacity_factory_extra = 0.01 } #+0.01% per puppet (max 0.1%)
set_variable = { SOV_planned_economy_production_lack_of_resource_penalty_factor_extra = -0.01 } #-0.01% per puppet (max -0.01%)

set_variable = { SOV_planned_economy_party_popularity_stability_factor = 0 } #Victory Over Devastation
set_variable = { SOV_planned_economy_max_surrender_limit_offset = 0 } #Victory Over Devastation
set_variable = { SOV_planned_economy_industry_repair_factor = 0 } #Victory Over Devastation
set_variable = { SOV_planned_economy_consumer_goods_factor = 0 } #Victory Over Devastation


#Add synthetic refineries tech
set_technology = {
	synth_oil_experiments = 1
}


####
#### VANILLA ####
####

capital = 219

starting_train_buffer = 3.0

if = {
	limit = {
		NOT = {
			has_dlc = "No Step Back"
		}
	}
	set_oob = "SOV_1936"
}
if = {
	limit = {
		has_dlc = "No Step Back"
	}
	set_oob = "SOV_1936_nsb"
}
if = {
	limit = { has_dlc = "Man the Guns" }
		set_naval_oob = "SOV_1936_naval_mtg"
	else = {
		set_naval_oob = "SOV_1936_naval_legacy"
	}
}
if = {
	limit = { has_dlc = "By Blood Alone" }
		set_air_oob = "SOV_1936_air_bba"
		set_technology = {
			iw_small_airframe = 1
			aa_lmg = 1
			aa_cannon_1 = 1
			early_bombs = 1
			engines_1 = 1
			engines_2 = 1
			iw_medium_airframe = 1
			iw_large_airframe = 1
			basic_small_airframe = 1
			basic_medium_airframe = 1
			aircraft_construction = 1
		}
	else = {
		set_air_oob = "SOV_1936_air_legacy"
		set_technology = {
			early_fighter = 1
			fighter1 = 1
			early_bomber = 1
			strategic_bomber1 = 1
			naval_bomber1 = 1
		}
	}
}

set_research_slots = 3
set_stability = 0.5
set_war_support = 0.3
# Starting tech
set_technology = { #WARNING: Do not just remove techs from here -> It can impact a lot of stuff. Before removing, double check that content does not count on these techs being researched
	infantry_weapons = 1
	infantry_weapons1 = 1
	tech_recon = 1
	tech_support = 1		
	tech_engineers = 1
	tech_military_police = 1
	tech_mountaineers = 1
	motorised_infantry = 1
	tech_trucks = 1
	paratroopers = 1
	gw_artillery = 1
	interwar_antiair = 1
	mass_assault = 1
	fleet_in_being = 1
	fuel_silos = 1
	fuel_refining = 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
		improved_light_tank_chassis = 1
		engine_tech_1 = 1
		engine_tech_2 = 1
	}
}
if = {
	limit = { not = { has_dlc = "Man the Guns" } }
	set_technology = {
		early_submarine = 1
		basic_submarine = 1
		early_destroyer = 1
		early_light_cruiser = 1
		early_heavy_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
		basic_ship_hull_cruiser = 1
		early_ship_hull_heavy = 1
		basic_battery = 1
		basic_light_battery = 1
		basic_torpedo = 1
		basic_depth_charges = 1
		mtg_transport = 1
	}
}

if = {
	limit = {
		has_dlc = "La Resistance"
	}
	set_technology = {
		armored_car1 = 1
	}
}

set_country_flag = SOV_TEST_REMOVE_VANILLA_ADVISORS_flag

add_ideas = {	
	home_of_revolution
	trotskyite_plot_nsb
	SOV_politicized_military

	SOV_genrikh_yagoda #NKVD Chief (political advisor)
}

1939.1.1 = {

	add_political_power = 1198
	add_command_power = 100
	set_stability = 0.75
	set_war_support = 0.55 #Needs at least 0.5 to make sense with War Economy Law
	
	#DESIGNERS AND LAWS
	add_ideas = {
		stalingrad_tractor_factory
		SOV_tula_arms_plant
		#laws
		war_economy
		extensive_conscription
	}


	###################
	### Purge stuff ###
	###################

	#ADVISORS
	#Yagoda and Yezhov get purged -> Beriya is new Head of NKVD
	remove_ideas = SOV_genrikh_yagoda
	add_ideas = SOV_lavrenty_beriya #Chars cannot be added using a single add_ideas effect for all of them
	add_ideas = vladimir_kasatonov

	#PURGE NSs
	add_timed_idea = {
		idea = SOV_understaffed_bureaucracy
		days  =365
	}
	add_ideas = {
		SOV_anti_soviet_military_thinking_banned_army
		SOV_purged_junior_army_officers_2
		SOV_anti_soviet_military_thinking_banned_navy
		SOV_purged_junior_navy_officers_1
		SOV_anti_soviet_military_thinking_banned_airforce
	}

	SOV_remove_paranoia_effect = yes

	#POLITICAL PARANOIA UI
	#Custom
	set_variable = { SOV_paranoia_photo_zinovyev = 8 }
	set_variable = { SOV_paranoia_photo_radek = 9 }
	set_variable = { SOV_paranoia_photo_bukharin = 10 }
	set_variable = { SOV_paranoia_photo_tukhachevsky = 12 }
	
	#Generic
	set_variable = { SOV_paranoia_portrait_index = 1 }
	set_temp_variable = { i = 0 }
	while_loop_effect = {
		limit = {
			check_variable = { i = 6 compare = less_than }
		}
		set_temp_variable = { SOV_generic_portrait_frame = SOV_paranoia_portrait_index }

		add_to_temp_variable = { SOV_generic_portrait_frame = 1 }

		add_to_array = {
			array = SOV_paranoia_generic_portraits_array
			value = SOV_generic_portrait_frame
			index = SOV_paranoia_portrait_index
		}
		
		add_to_variable = { SOV_paranoia_portrait_index = 1 }
		add_to_temp_variable = { i = 1 }
	}

	#SET PURGE FLAGS
	set_country_flag = SOV_first_moscow_trial_flag
	set_country_flag = SOV_second_moscow_trial_flag
	set_country_flag = SOV_third_moscow_trial_flag
	set_country_flag = SOV_trial_of_the_generals_flag

	#PURGE ALL THESE PEOPLES
	SOV_grigory_zinovyev = { SOV_purge_character_effect = yes }
	SOV_lev_kamenev = { SOV_purge_character_effect = yes }
	SOV_ivan_smirnov = { SOV_purge_character_effect = yes }
	SOV_grigory_sokolnikov = { SOV_purge_character_effect = yes }
	SOV_aleksandr_shlyapnikov = { SOV_purge_character_effect = yes }
	SOV_karl_radek = { SOV_purge_character_effect = yes }
	SOV_ivar_smilga = { SOV_purge_character_effect = yes }
	SOV_yevgeny_preobrazhensky = { SOV_purge_character_effect = yes }
	SOV_martemyan_ryutin = { SOV_purge_character_effect = yes }
	if = {
		limit = {
			has_dlc = "No Step Back"
		}
		SOV_nikolay_ustryalov = { SOV_purge_character_effect = yes }
	}
	SOV_mikhail_tukhachevsky = { SOV_purge_character_effect = yes }
	SOV_aleksandr_yegorov = { SOV_purge_character_effect = yes }
	SOV_vasily_blyukher = { SOV_purge_character_effect = yes }
	SOV_vitaly_primakov = { SOV_purge_character_effect = yes }
	SOV_nikolay_bukharin = { SOV_purge_character_effect = yes }
	SOV_aleksey_rykov = { SOV_purge_character_effect = yes }
	SOV_mikhail_tomsky = { SOV_purge_character_effect = yes }
	SOV_maksim_litvinov = { SOV_purge_character_effect = yes }
	SOV_genrikh_yagoda = { SOV_purge_character_effect = yes }
	SOV_nikolay_yezhov = { SOV_purge_character_effect = yes }
	SOV_sergey_khudyakov = { SOV_purge_character_effect = yes }
	SOV_yakov_smushkevich = { SOV_purge_character_effect = yes }
	SOV_pavel_rychagov = { SOV_purge_character_effect = yes }

	#COWED GENERALS
	set_temp_variable = { army_leader_counter = 0 }
	while_loop_effect = {
		limit = {
			check_variable = { army_leader_counter = 10 compare = less_than }
		}
		random_army_leader = {
			limit = {
				NOT = { has_character_flag = SOV_character_purged_flag }
				NOT = { has_trait = trait_SOV_cowed_by_stalin_army }
			}
			add_unit_leader_trait = trait_SOV_cowed_by_stalin_army
		}
		add_to_temp_variable = { army_leader_counter = 1 }
	}
	#COWED ADMIRALS
	set_temp_variable = { navy_leader_counter = 0 }
	while_loop_effect = {
		limit = {
			check_variable = { navy_leader_counter = 3 compare = less_than }
		}
		random_navy_leader = {
			limit = {
				NOT = { has_character_flag = SOV_character_purged_flag }
				NOT = { has_trait = trait_SOV_cowed_by_stalin_navy }
			}
			add_unit_leader_trait = trait_SOV_cowed_by_stalin_navy
		}
		add_to_temp_variable = { navy_leader_counter = 1 }
	}
	

	set_global_flag = SOV_fourth_international_fired #news happened 1938

	################
	### M-R PACT ###
	################

	#MR pact stuff
	add_opinion_modifier = { target = GER modifier = MR_pact }# pact 
	set_global_flag = sov_yes_pact
	add_state_claim = 146 #KARELIA (FIN)
	add_state_claim = 147 #SALLA (FIN)
	add_state_claim = 722 #PETSAMO (FIN)
	add_state_claim = 13 #PÄRNU (EST)
	add_state_claim = 191 #TARTU (EST)
	add_state_claim = 811 #SAAREMAA (EST)
	add_state_claim = 813 #VIRUMAA (EST)
	add_state_claim = 812 #TALLIN (EST)
	add_state_claim = 12 #VIDZEME (LAT)
	add_state_claim = 190 #KURZEME (LAT)
	add_state_claim = 808 #RIGA (LAT)
	add_state_claim = 809 #ZEMGALE (LAT)
	add_state_claim = 810 #LATGALE (LAT)
	add_state_claim = 11 #KAUNAS (LIT)
	add_state_claim = 784 #WILNO (LIT)
	add_state_claim = 189 #ZEMAITIJA (LIT)
	add_state_claim = 814 #SUDUVA (LIT)
	add_state_claim = 815 #AUKSTAITIJA (LIT)
	add_state_claim = 89 #STANISLAWOW (POL)
	add_state_claim = 91 #LWOW (POL)
	add_state_claim = 93 #WOLYN (POL)
	add_state_claim = 94 #POLESIE (POL)
	add_state_claim = 95 #NOWOGRODEK (POL)
	add_state_claim = 96 #WILEJKA (POL)
	add_state_claim = 97 #BIALYSTOK (POL)
	add_state_claim = 78 #BESSARABIA (ROM)
	add_state_claim = 80 #BUCOVINA (ROM)
	add_state_claim = 766 #SOUTHERN BESSARABIA (ROM
	#MR pact stuff end

	#Germany soviet treaty (Tank templates unlocked at the bottom of this file)
	GER = {
		add_opinion_modifier = {
			target = SOV
			modifier = sov_ger_treaty
		}
		add_opinion_modifier = {
			target = SOV
			modifier = sov_ger_treaty_trade
		}
	}
	if = {
		limit = {
			NOT = { has_dlc = "No Step Back" }
		}
		add_tech_bonus = {
			name = med_armor_bonus
			ahead_reduction = 2
			category = cat_medium_armor
		}
		add_tech_bonus = {
			name = armor_bonus
			bonus = 1.0
			uses = 1
			category = armor
		}
	}
	if = {
		limit = {
			has_dlc = "No Step Back"
		}
		add_tech_bonus = {
			name = armor_bonus
			bonus = 1.0
			uses = 2
			category = armor
		}
	}

	if = {
		limit = { has_dlc = "By Blood Alone" }
			set_air_oob = "SOV_1939_air_bba"
			set_technology = {
				basic_large_airframe = 1
			}
		else = {
			set_air_oob = "SOV_1945_air_legacy"
			set_technology = {
				CAS1 = 1
				tactical_bomber1 = 1
			}
		}
	}

	#1936
	complete_national_focus = SOV_heavy_industry #35
	unlock_national_focus = SOV_the_path_of_marxism_leninism #35
	unlock_national_focus = SOV_the_centre #35
	unlock_national_focus = SOV_the_stalin_constitution # -> Dec 1936
	unlock_national_focus = SOV_the_zinovyevite_terrorist_center #35 -> Mid 1936
	complete_national_focus = SOV_infrastructure_effort_nsb #35
	unlock_national_focus = SOV_strengthen_the_mobilization_plan #35
	unlock_national_focus = SOV_restore_cossack_units #35 -> 1936/1939	
	complete_national_focus = SOV_found_the_pcdi #35 -> Dec 1936

	#1937
	unlock_national_focus = SOV_the_comintern #35
	unlock_national_focus = SOV_the_anti_soviet_trotskyist_center #35 -> Early 1937
	unlock_national_focus = SOV_addressing_internal_affairs #35
	unlock_national_focus = SOV_the_workers_dictatorship
	unlock_national_focus = SOV_pc_of_mechanical_engineering #35 -> Aug 1937
	complete_national_focus = SOV_transpolar_flights #35 -> 1937
	unlock_national_focus = SOV_the_military_conspiracy #35 -> Mid 1937
	complete_national_focus = SOV_finish_the_five_year_plan # -> Dec 1937

	#1938
	unlock_national_focus = SOV_socialism_in_one_country #35
	unlock_national_focus = SOV_third_five_year_plan # -> 1938
	unlock_national_focus = SOV_the_bloc_of_rights_and_trotskyites #35 -> Early 1938
	complete_national_focus = SOV_the_threat_from_the_land_of_the_rising_sun #35
	complete_national_focus = SOV_expand_the_agitprop #35
	complete_national_focus = SOV_national_specialists #35
	complete_national_focus = SOV_eastern_development #35
	complete_national_focus = SOV_expand_the_red_fleet #35
	complete_national_focus = SOV_pc_of_the_ussr_navy #35

	#1939
	complete_national_focus = SOV_support_the_kuomintang #35
	complete_national_focus = SOV_develop_the_urals #35
	complete_national_focus = SOV_the_ussr_academy_of_sciences
	complete_national_focus = SOV_baltic_security #35 -> 1939

	#FYP NS
	add_to_variable = { SOV_fyp_production_factory_efficiency_gain_factor = 0.05 }
	add_to_variable = { SOV_fyp_consumer_goods_factor = 0.05 }
	remove_dynamic_modifier = { modifier = SOV_second_five_year_plan_dynamic_modifier }
	add_dynamic_modifier = { modifier = SOV_third_five_year_plan_dynamic_modifier }

	#DEFENSE INDUSTRY NS
	add_to_variable = { SOV_defense_industry_production_factory_max_efficiency_factor = 0.05 }
	add_to_variable = { SOV_defense_industry_production_factory_efficiency_gain_factor = -0.05 }

	#THE RED ARMY NS
	add_to_variable = { SOV_the_red_army_mobilization_speed = 0.05 }
	add_to_variable = { SOV_the_red_army_conscription_factor = 0.03 }
	add_to_variable = { SOV_the_red_army_modifier_army_sub_unit_cavalry_speed_factor = 0.05 }
	add_to_variable = { SOV_the_red_army_cavalry_attack_factor = 0.05 }

	#THE POLITBURO NS
	add_to_variable = { SOV_the_politburo_communism_drift = 0.05 }
	add_to_variable = { SOV_the_politburo_drift_defence_factor = 0.05 } 
	add_to_variable = { SOV_the_politburo_defensive_war_stability_factor = 0.25 }
	add_to_variable = { SOV_the_politburo_political_power_factor = 0.05 }
	add_to_variable = { SOV_the_politburo_drift_defence_factor = 0.05 } 
	add_to_variable = { SOV_the_politburo_political_power_factor = 0.05 }
	add_to_variable = { SOV_the_politburo_max_surrender_limit_offset = 0.05 }
	add_dynamic_modifier = { modifier = SOV_the_politburo_good_dynamic_modifier }
	
	if = {
		limit = { has_dlc = "Man the Guns" }
			set_naval_oob = "SOV_1939_naval_mtg"
		else = {
			set_naval_oob = "SOV_1939_naval_legacy"
		}
	}

	set_technology = {
		interwar_artillery = 1
		interwar_antitank = 1
		infantry_weapons2 = 1
		support_weapons = 1
		support_weapons2 = 1
		paratroopers = 1

		#doctrines
		pocket_defence = 1
		defence_in_depth = 1
		battlefleet_concentration = 1
		submarine_operations = 1

		#Air
		formation_flying = 1		
		dive_bombing = 1
		direct_ground_support = 1

		#electronics
		electronic_mechanical_engineering = 1
		radio = 1
		radio_detection = 1
		mechanical_computing = 1
		computing_machine = 1
		basic_encryption = 1
		basic_decryption = 1

		#industry
		basic_machine_tools = 1
		improved_machine_tools = 1
		advanced_machine_tools = 1
		synth_oil_experiments = 1
		oil_processing = 1
		fuel_refining2 = 1
		construction1 = 1
		construction2 = 1
		construction3 = 1
	}
	complete_special_project = {
		project = sp:sp_air_radar
		scientist = SOV_vladimir_kotelnikov
		state = 260
	}
	if = {
		limit = {
			NOT = { has_dlc = "No Step Back" }
		}
		set_technology = {
			improved_light_tank = 1 
			basic_heavy_tank = 1    # Should be available in 1936 (T-35)
			basic_medium_tank = 1 # Should be available in 1936 (T-28)
			improved_medium_tank = 1
			advanced_medium_tank = 1
		}
		set_oob = "SOV_1939"
	}
	if = {
		limit = {
			has_dlc = "No Step Back"
		}
		set_technology = {
			improved_light_tank_chassis = 1
			basic_heavy_tank_chassis = 1
			basic_medium_tank_chassis = 1 
		}
		set_oob = "SOV_1939_nsb"
	}
	if = {
		limit = { not = { has_dlc = "Man the Guns" } }
		set_technology = {
			basic_submarine = 1
			basic_destroyer = 1
			basic_heavy_cruiser = 1
		}
	}
	if = {
		limit = { has_dlc = "Man the Guns" }
		set_technology = {
			improved_ship_hull_light = 1
			improved_ship_hull_submarine = 1
			basic_ship_hull_cruiser = 1
		}
	}
}


set_convoys = 50

set_politics = {
	ruling_party = communism
	last_election = "1933.7.1"
	election_frequency = 48
	elections_allowed = no
}
set_popularities = {
	democratic = 10
	fascism = 2
	communism = 88
}

create_faction = Comintern
add_to_faction = SOV
add_to_faction = MON
add_to_faction = TAN
add_to_faction = FIN #AI Reasons

if = {
	limit = {
		has_dlc = "La Resistance"
	}
	create_operative_leader = {
		name = "Alexander Radó"
		GFX = GFX_portrait_alexander_rado
		traits = { operative_natural_orator }
		bypass_recruitment = no
		available_to_spy_master = yes
		nationalities = { SOV HUN }
	}

	create_operative_leader = {
		name = "Kim Philby"
		GFX = GFX_portrait_kim_philby
		traits = { operative_double_agent operative_infiltrator }
		bypass_recruitment = no
		available_to_spy_master = yes
		nationalities = { SOV ENG }
	}
	create_operative_leader = {
		name = "Richard Sorge"
		GFX = GFX_portrait_richard_sorge
		traits = { operative_well_groomed }
		bypass_recruitment = no
		available_to_spy_master = yes
		nationalities = { SOV GER }
	}
}

1945.1.1 = {

		oob = "SOV_1945_12_1"

		set_cosmetic_tag = SOV_scenario

		set_rule = { 
		 desc = desc_key # a description can be given to rule (you can get original tooltip using DESC key) 
		 can_not_declare_war = yes 
		}


	set_autonomy = {
		target = ROM
		autonomous_state = autonomy_puppet
	    freedom_level = 0.2
	}
	set_autonomy = {
		target = BUL
		autonomous_state = autonomy_puppet
	    freedom_level = 0.2
	}
#	set_autonomy = {
#		target = HUN
#		autonomous_state = autonomy_puppet
#	    freedom_level = 0.2
#	}

		add_to_faction = ALB
		add_to_faction = ROM
		add_to_faction = BUL
		add_to_faction = YUG
#		add_to_faction = HUN

		complete_national_focus = SOV_secure_the_administration
		complete_national_focus = SOV_the_collectivization_process
		complete_national_focus = SOV_organization_centralization_discipline
		unlock_national_focus = SOV_war_economy
		complete_national_focus = SOV_behead_the_snake
		complete_national_focus = SOV_stalins_cult_of_personality
		unlock_national_focus = SOV_they_will_know_fear
		complete_national_focus = SOV_positive_heroism
		complete_national_focus = SOV_revive_the_stakhanovite_movement
		unlock_national_focus = SOV_war_heroes
		unlock_national_focus = SOV_claims_in_baltic 
		unlock_national_focus = SOV_secure_leningrad
		unlock_national_focus = SOV_claims_on_poland
		unlock_national_focus = SOV_claim_on_bessarabia
		complete_national_focus = SOV_rehabilitated_military
		complete_national_focus = SOV_military_reorganization
		complete_national_focus = SOV_desperate_measures
		complete_national_focus = SOV_an_adaptable_army
		complete_national_focus = SOV_lessons_of_war
		complete_national_focus = SOV_penal_battalions
		complete_national_focus = SOV_organization_of_the_partisans
		complete_national_focus = SOV_smersh
		complete_national_focus = SOV_barrier_troops
		complete_national_focus = SOV_experts_in_camouflage
		complete_national_focus = SOV_swap_to_political_advisors 
		complete_national_focus = SOV_the_glory_of_the_red_army
		complete_national_focus = SOV_military_engineering_university
		complete_national_focus = SOV_the_molotov_line
		unlock_national_focus = SOV_move_industry_to_the_urals
		complete_national_focus = SOV_the_road_of_life
		complete_national_focus = SOV_the_defense_of_moscow
		complete_national_focus = SOV_superior_war_machines
		complete_national_focus = SOV_the_means_to_wage_war
		complete_national_focus = SOV_soviet_artillery
		complete_national_focus = SOV_pc_of_mortar_armament
		complete_national_focus = SOV_development_of_tankograd
		complete_national_focus = SOV_expand_the_aircraft_industry
		complete_national_focus = SOV_modernize_aircraft_facilities
		complete_national_focus = SOV_foster_flying_clubs
		complete_national_focus = SOV_women_in_aviation

		unlock_national_focus = SOV_raskovas_aviation_group

		complete_national_focus = SOV_intensify_pilot_training_program
		complete_national_focus = SOV_expand_aviation_institutes
		complete_national_focus = SOV_ground_support
		complete_national_focus = SOV_the_modern_war_in_the_skies
		complete_national_focus = SOV_improve_railway_network
		complete_national_focus = SOV_policy_of_collective_security
		complete_national_focus = SOV_prepare_a_war_with_japan
		complete_national_focus = SOV_recover_the_kuril_islands





	create_intelligence_agency = {
  		name = "NKVD"
  		icon = "GFX_intelligence_agency_logo_sov"
	}

	set_stability = 0.95
    set_war_support = 0.95

    remove_ideas = 	trotskyite_plot_nsb
	remove_ideas = SOV_politicized_military
	remove_ideas = SOV_understaffed_bureaucracy 
	remove_ideas = SOV_anti_soviet_military_thinking_banned_army 
	remove_ideas = SOV_purged_junior_army_officers_2
	remove_ideas = SOV_anti_soviet_military_thinking_banned_navy 
	remove_ideas = SOV_purged_junior_navy_officers_1 
	remove_ideas = SOV_anti_soviet_military_thinking_banned_airforce 

    add_political_power = 2000
    add_command_power = 100

    add_ideas = {
    	tot_economic_mobilisation
		all_adults_serve
    }

    	if = {
		limit = {
			has_dlc = "No Step Back"
		}
		set_technology = {
			basic_medium_tank_chassis = 1 
			improved_medium_tank_chassis = 1
			advanced_medium_tank_chassis = 1
			improved_heavy_tank_chassis = 1
			advanced_heavy_tank_chassis = 1
			engine_tech_2 = 1
			engine_tech_3 = 1
			armor_tech_1 = 1
			armor_tech_2 = 1
			armor_tech_3 = 1
		}
	}

	if = {
		limit = { has_dlc = "By Blood Alone" }
			set_air_oob = "SOV_1945_1_12_air_bba"
			set_technology = {
			improved_small_airframe = 1
			advanced_small_airframe = 1
			modern_small_airframe = 1
			improved_medium_airframe = 1
			advanced_medium_airframe = 1
			basic_large_airframe = 1
			improved_large_airframe = 1
			survivability_studies = 1
			aa_hmg = 1
			aa_cannon_1 = 1
			aa_cannon_2 = 1
			engines_3 = 1
			engines_4 = 1
			range_improvements = 1
		}
		else = {
			set_oob = "SOV_1945_1_12_air_legacy"
		}
	}



	set_technology = { 
		interwar_artillery = 1
		interwar_antitank = 1
		infantry_weapons2 = 1
		improved_infantry_weapons = 1
		support_weapons = 1
		support_weapons2 = 1
		paratroopers = 1
		improved_infantry_weapons_2 = 1
		support_weapons3 = 1
		mechanised_infantry = 1
		mechanised_infantry2 = 1
		tech_mountaineers2 = 1
		tech_engineers2 = 1
		tech_recon2 = 1
		paratroopers2 = 1
		tech_field_hospital = 1
		tech_field_hospital2 = 1		
    tech_signal_company = 1
    tech_signal_company2 = 1
    tech_logistics_company = 1
    tech_logistics_company2 = 1
		artillery1 = 1
		artillery2 = 1
		artillery3 = 1
		artillery4 = 1
		antiair1 = 1
		antiair2 = 1
		antitank1 = 1
		antitank2 = 1
		antitank3 = 1

		#doctrines 
		pocket_defence = 1
		defence_in_depth = 1
		large_front_operations = 1
		deep_operations = 1
		#fleet
		fleet_in_being = 1
		battlefleet_concentration = 1
		convoy_sailing = 1
		subsidiary_carrier_role = 1
		#air 
		formation_flying = 1		
		dive_bombing = 1
		direct_ground_support = 1
		formation_fighting = 1
		hunt_and_destroy = 1
		combat_unit_destruction = 1


		#electronics
		electronic_mechanical_engineering = 1
		radio = 1
		radio_detection = 1
		cavity_magnatron = 1
		decimetric_radar = 1
		centimetric_radar = 1
		mechanical_computing = 1
		computing_machine = 1
		basic_encryption = 1
		basic_decryption = 1
		improved_computing_machine = 1
		improved_decimetric_radar = 1
		improved_encryption = 1
		improved_decryption = 1

		#industry
		excavation1 = 1
		excavation2 = 1
		excavation3 = 1
		basic_machine_tools = 1
		improved_machine_tools = 1
		advanced_machine_tools = 1
		assembly_line_production = 1
		synth_oil_experiments = 1
		oil_processing = 1
		rubber_processing = 1
		improved_rubber_processing = 1
		advanced_rubber_processing = 1
		fuel_refining3 = 1
		improved_oil_processing = 1
		construction1 = 1
		construction2 = 1
		construction3 = 1
		construction4 = 1
		dispersed_industry = 1
		dispersed_industry2 = 1
		dispersed_industry3 = 1
		dispersed_industry4 = 1
		improved_equipment_conversion = 1

		#1944
		experimental_rockets = 1
		rocket_engines = 1
		jet_engines = 1
		atomic_research = 1
		nuclear_reactor = 1
		advanced_infantry_weapons = 1
		advanced_infantry_weapons2 = 1
		infantry_at = 1
		infantry_at2 = 1
		tech_engineers3 = 1
		tech_recon3 = 1
		tech_military_police = 1
		tech_military_police2 = 1
		tech_military_police3 = 1
		tech_maintenance_company = 1
		tech_maintenance_company2 = 1
		tech_maintenance_company3 = 1
		tech_field_hospital3 = 1
		tech_logistics_company3 = 1
		tech_signal_company3 = 1
		rocket_artillery = 1
		rocket_artillery2 = 1
		rocket_artillery3 = 1
		rocket_artillery4 = 1
		antiair3 = 1
		antiair4 = 1
		antiair5 = 1 
}
	if = {
		limit = {
			has_dlc = "La Resistance"
		}
		set_technology = {
			armored_car1 = 1
			armored_car2 = 1
			scout_plane1 = 1
			scout_plane2 = 1
		}
	}

	if = {
		limit = {
			has_dlc = "Man the Guns"
		}
		set_technology = {
		improved_naval_mines = 1
		basic_light_shell = 1
		basic_medium_shell = 1
		improved_depth_charges = 1
		smoke_generator = 1
		improved_airplane_launcher = 1
        mtg_landing_craft = 1
        degaussing = 1
        fire_control_methods_1 = 1
        damage_control_2 = 1
        damage_control_1 = 1
        magnetic_detonator = 1
        basic_heavy_shell = 1
        improved_heavy_battery = 1
        improved_medium_battery = 1
        improved_light_battery = 1
        basic_submarine_snorkel = 1
        improved_ship_hull_submarine = 1
        advanced_ship_torpedo_launcher = 1
		improved_ship_torpedo_launcher = 1
		electric_torpedo = 1
		homing_torpedo = 1
        improved_heavy_armor_scheme = 1
        improved_ship_hull_heavy = 1

		}
		set_naval_oob = "SOV_1939_naval_mtg"
	}
}

1945.2.28 = {
	oob = "SOV_1945_3_6"

	if = {
		limit = { has_dlc = "By Blood Alone" }
			set_air_oob = "SOV_1945_air_bba"
			set_technology = {
			improved_small_airframe = 1
			advanced_small_airframe = 1
			modern_small_airframe = 1
			improved_medium_airframe = 1
			advanced_medium_airframe = 1
			basic_large_airframe = 1
			improved_large_airframe = 1
			survivability_studies = 1
			aa_hmg = 1
			aa_cannon_1 = 1
			aa_cannon_2 = 1
			engines_3 = 1
			engines_4 = 1
			range_improvements = 1
		}
		else = {
			set_oob = "SOV_1945_air_legacy"
		}
	}
}

1945.4.1 = {
	oob = "SOV_1945_nsb"
	if = {
		limit = { 
				NOT = {
					 has_dlc = "By Blood Alone"
			 }
	 } 
	 set_oob = "SOV_1945_nsb"
}
}

1945.4.26 = {
	oob = "SOV_1945_27_nsb"
}


### VARIANTS ###
# 1936 Start #

if = {
	limit = {
		has_dlc = "By Blood Alone"
	}
	create_equipment_variant = {
		name = "I-15" #
		type = small_plane_airframe_0
		modules = {
			fixed_main_weapon_slot = light_mg_4x
			engine_type_slot = engine_1_1x
			special_type_slot_1 = empty
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "I-16" #
		type = small_plane_airframe_1
		modules = {
			fixed_main_weapon_slot = light_mg_2x
			engine_type_slot = engine_1_1x
			special_type_slot_1 = empty
		}
		icon = "GFX_SOV_fighter1_medium"
	}
	create_equipment_variant = {
		name = "DB-3" #
		type = medium_plane_airframe_0
		modules = {
			fixed_main_weapon_slot = medium_bomb_bay
			fixed_auxiliary_weapon_slot_1 = bomb_locks
			engine_type_slot = engine_2_2x
			special_type_slot_1 = lmg_defense_turret
		}
		icon = "GFX_SOV_early_bomber_medium"
	}
	create_equipment_variant = {
		name = "TB-3" #
		type = large_plane_airframe_0
		modules = {
			fixed_main_weapon_slot = large_bomb_bay
			fixed_auxiliary_weapon_slot_1 = empty
			engine_type_slot = engine_1_4x
			special_type_slot_1 = lmg_defense_turret_2x
		}
		icon = "GFX_SOV_transport_plane_equipment_1_medium"
	}
	create_equipment_variant = {
		name = "ANT-40" #
		type = medium_plane_airframe_1
		modules = {
			fixed_main_weapon_slot = medium_bomb_bay
			fixed_auxiliary_weapon_slot_1 = bomb_locks
			engine_type_slot = engine_2_2x
			special_type_slot_1 = lmg_defense_turret_2x
		}
		icon = "GFX_SOV_tactical_bomber1_medium"
	}

		# 1945 #
		create_equipment_variant = {
			name = "Yak-3"
			type = small_plane_airframe_2
			modules = {
				fixed_main_weapon_slot = heavy_mg_2x
				fixed_auxiliary_weapon_slot_1 = aircraft_cannon_2_1x
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = engine_3_1x
				special_type_slot_1 = armor_plate_small
				special_type_slot_2 = drop_tanks
				special_type_slot_3 = empty
			}
			icon = "GFX_SOV_light_plane_2_medium"
		}
	create_equipment_variant = {
		name = "Ilyushin Il-2M3"
		type = small_plane_cas_airframe_2
		modules = {
			fixed_main_weapon_slot = bomb_locks
			fixed_auxiliary_weapon_slot_1 = aircraft_cannon_2_2x
			fixed_auxiliary_weapon_slot_2 = rocket_rails
			engine_type_slot = engine_3_1x
			special_type_slot_1 = hmg_defense_turret
			special_type_slot_2 = armor_plate_small
			special_type_slot_3 = empty
		}
		icon = "GFX_SOV_CAS2_medium"
	}
	create_equipment_variant = {
		name = "Petlyakov Pe-2"
		type = medium_plane_airframe_2
		modules = {
			fixed_main_weapon_slot = medium_bomb_bay
			fixed_auxiliary_weapon_slot_1 = medium_bomb_bay
			fixed_auxiliary_weapon_slot_2 = empty
			fixed_auxiliary_weapon_slot_3 = empty
			engine_type_slot = engine_3_2x
			special_type_slot_1 = lmg_defense_turret_2x
			special_type_slot_2 = armor_plate_medium
			special_type_slot_3 = empty
			special_type_slot_4 = empty
		}
		icon = "GFX_SOV_tactical_bomber2_medium"
	}
}

if = {
	limit = {
		has_dlc = "No Step Back"
	}
		create_equipment_variant = {
			name = "T-34-85"
			type = medium_tank_chassis_3
			parent_version = 1
			modules = {
				main_armament_slot = tank_medium_cannon_2
				turret_type_slot = tank_medium_three_man_tank_turret
				suspension_type_slot = tank_christie_suspension
				armor_type_slot = tank_cast_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = tank_radio_2
				special_type_slot_2 = smoke_launchers
				special_type_slot_3 = additional_machine_guns
				special_type_slot_4 = empty
			}
			upgrades = {
				tank_nsb_engine_upgrade = 9
				tank_nsb_armor_upgrade = 6
			}
			icon = "GFX_ENG_improved_medium_tank_medium"
		}
	create_equipment_variant = {
		name = "T-27"
		type = light_tank_chassis_0
		parent_version = 0
		modules = {
			main_armament_slot = tank_heavy_machine_gun
			turret_type_slot = tank_light_fixed_superstructure_turret
			suspension_type_slot = tank_bogie_suspension
			armor_type_slot = tank_riveted_armor
			engine_type_slot = tank_gasoline_engine
		}
		upgrades = {
			tank_nsb_engine_upgrade = 1
			tank_nsb_armor_upgrade = 1
		}
		obsolete = yes
		icon = "GFX_gwtank_medium"
	}

	create_equipment_variant = {
		name = "T-26TU mod. 1933"
		type = light_tank_chassis_1
		parent_version = 0
		modules = {
			main_armament_slot = tank_small_cannon_2
			turret_type_slot = tank_light_two_man_tank_turret
			suspension_type_slot = tank_bogie_suspension
			armor_type_slot = tank_riveted_armor
			engine_type_slot = tank_gasoline_engine
			special_type_slot_1 = tank_radio_1
		}
		upgrades = {
			tank_nsb_engine_upgrade = 2
			tank_nsb_armor_upgrade = 2
		}
		icon = "GFX_SOV_basic_light_tank_medium"
	}
	create_equipment_variant = {
		name = "BT-5"
		type = light_tank_chassis_1
		parent_version = 1
		modules = {
			main_armament_slot = tank_small_cannon_2
			turret_type_slot = tank_light_one_man_tank_turret
			suspension_type_slot = tank_christie_suspension
			armor_type_slot = tank_riveted_armor
			engine_type_slot = tank_gasoline_engine
		}
		upgrades = {
			tank_nsb_engine_upgrade = 8
			tank_nsb_armor_upgrade = 1
		}
		icon = "GFX_SOV_improved_light_tank_medium"
	}
	create_equipment_variant = {
		name = "BT-7"
		type = light_tank_chassis_2
		parent_version = 0
		modules = {
			main_armament_slot = tank_small_cannon_2
			turret_type_slot = tank_light_two_man_tank_turret
			suspension_type_slot = tank_christie_suspension
			armor_type_slot = tank_welded_armor
			engine_type_slot = tank_gasoline_engine
		}
		upgrades = {
			tank_nsb_engine_upgrade = 10
			tank_nsb_armor_upgrade = 2
		}
		icon = "GFX_SOV_improved_light_tank_medium"
	}

	create_equipment_variant = {
		name = "T-28"
		type = medium_tank_chassis_0
		parent_version = 0
		modules = {
			main_armament_slot = tank_close_support_gun
			turret_type_slot = tank_medium_three_man_tank_turret
			suspension_type_slot = tank_bogie_suspension
			armor_type_slot = tank_riveted_armor
			engine_type_slot = tank_gasoline_engine
			special_type_slot_1 = tank_radio_1
			special_type_slot_2 = secondary_turret_hmg
			special_type_slot_3 = secondary_turret_hmg
		}
		upgrades = {
			tank_nsb_armor_upgrade = 3
			tank_nsb_engine_upgrade = 10
		}
		icon = "GFX_SOV_basic_heavy_tank_medium"
	}
	create_equipment_variant = {
		name = "T-35"
		type = heavy_tank_chassis_0
		parent_version = 0
		modules = {
			main_armament_slot = tank_close_support_gun
			turret_type_slot = tank_medium_three_man_tank_turret
			suspension_type_slot = tank_bogie_suspension
			armor_type_slot = tank_riveted_armor
			engine_type_slot = tank_gasoline_engine
			special_type_slot_1 = tank_radio_1
			special_type_slot_2 = secondary_turret_hmg
			special_type_slot_3 = secondary_turret_hmg
			special_type_slot_4 = secondary_turret_small_cannon
		}
		upgrades = {
			tank_nsb_armor_upgrade = 3
			tank_nsb_engine_upgrade = 10
		}
		icon = "GFX_SOV_basic_heavy_tank_medium"
	}
}
if = {
	limit = { not = { has_dlc = "Man the Guns" } }
	### Ship Variants ###
	create_equipment_variant = {
		name = "Series I Debakrist"
		type = submarine_1
		upgrades = {
			ship_reliability_upgrade = 1
			sub_engine_upgrade = 1
			sub_stealth_upgrade = 1
			sub_torpedo_upgrade = 1
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Series IX Srednyaya"
		type = submarine_2
		upgrades = {
			ship_reliability_upgrade = 1
			sub_engine_upgrade = 1
			sub_stealth_upgrade = 1
			sub_torpedo_upgrade = 1
		}
	}
	create_equipment_variant = {
		name = "Leningrad & Minsk Class"
		type = destroyer_1
		upgrades = {
			ship_torpedo_upgrade = 3
			destroyer_engine_upgrade = 3
			ship_ASW_upgrade = 3
			ship_anti_air_upgrade = 3
		}
	}
}
if = {
	limit = { has_dlc = "Man the Guns" }
	# Submarines #
	create_equipment_variant = {			
		name = "AG Class"
		type = ship_hull_submarine_1
		name_group = SOV_SS_SHCHUKA
		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 = "Series I Debakrist"			# represents Debakrist, B class, L-55 sub
		type = ship_hull_submarine_1
		name_group = SOV_SS_SHCHUKA
		parent_version = 0
		modules = {
			fixed_ship_torpedo_slot = ship_torpedo_sub_1
			fixed_ship_engine_slot = sub_ship_engine_1
			rear_1_custom_slot = ship_torpedo_sub_1
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Series II Leninets"				# represents Leninets series II, XI
		type = ship_hull_submarine_2
		name_group = SOV_SS_LENINETS
		parent_version = 0
		modules = {
			fixed_ship_torpedo_slot = ship_torpedo_sub_1
			fixed_ship_engine_slot = sub_ship_engine_1
			rear_1_custom_slot = ship_mine_layer_sub
		}
	}
	create_equipment_variant = {
		name = "Series V Shchuka"				# represents Shchuka series III, V, V-bis, V-bis-2
		type = ship_hull_submarine_1
		name_group = SOV_SS_SHCHUKA
		parent_version = 0
		modules = {
			fixed_ship_torpedo_slot = ship_torpedo_sub_2
			fixed_ship_engine_slot = sub_ship_engine_1
			rear_1_custom_slot = empty
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Series IX Srednyaya"				# 'Stalinets', series IX, IX-bis, IX-bis-2 and P-class
		type = ship_hull_submarine_2
		name_group = SOV_SS_STALINETS
		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
		}
	}
	create_equipment_variant = {
		name = "Series X Shchuka"				
		type = ship_hull_submarine_1
		name_group = SOV_SS_SHCHUKA
		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 = "Orfey Class"						# represents Yakov Sverdlov, Frunze, and Orfey classes
		type = ship_hull_light_1
		name_group = SOV_DD_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_battery_1
			fixed_ship_anti_air_slot = empty
			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 = ship_torpedo_1
			rear_1_custom_slot = empty
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Fidonisi Class"						# represents Fidonisi and Izyaslav classes
		type = ship_hull_light_1
		name_group = SOV_DD_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_battery_1
			fixed_ship_anti_air_slot = empty
			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 = ship_torpedo_1
			rear_1_custom_slot = ship_depth_charge_1
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Leningrad & Minsk Class"				
		type = ship_hull_light_2
		name_group = SOV_DD_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_battery_2
			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 = ship_depth_charge_1
		}
	}
	create_equipment_variant = {
		name = "Bug Class"					# minelayer
		type = ship_hull_light_1
		name_group = SOV_MINELAYERS_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_battery_1
			fixed_ship_anti_air_slot = empty
			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 = empty
			mid_1_custom_slot = ship_mine_layer_1
			rear_1_custom_slot = ship_mine_layer_1
		}
	}
	# Light Cruisers #
	create_equipment_variant = {
		name = "Komintern Class"
		type = ship_hull_cruiser_1
		name_group = SOV_MINELAYERS_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_medium_battery_1
			fixed_ship_anti_air_slot = empty
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = cruiser_ship_engine_1
			mid_1_custom_slot = ship_light_medium_battery_1
			mid_2_custom_slot = empty
			rear_1_custom_slot = ship_mine_layer_1
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Chervona Ukraina Class"
		type = ship_hull_cruiser_1
		name_group = SOV_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
			mid_1_custom_slot = ship_light_medium_battery_1
			mid_2_custom_slot = ship_torpedo_1
			rear_1_custom_slot = ship_mine_layer_1
		}
	}
	create_equipment_variant = {
		name = "Marti Class"
		type = ship_hull_cruiser_1				# minelayer
		name_group = SOV_MINELAYERS_HISTORICAL
		parent_version = 0
		role_icon_index = 4
		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
			mid_1_custom_slot = empty
			mid_2_custom_slot = empty
			rear_1_custom_slot = ship_mine_layer_1
		}
	}
	# Heavy Cruisers #
		create_equipment_variant = {
			name = "Kirov Class"
			type = ship_hull_cruiser_2
			name_group = SOV_CA_HISTORICAL
			parent_version = 0
			modules = {
				fixed_ship_battery_slot = ship_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_2
				fixed_ship_armor_slot = ship_armor_cruiser_1
				mid_1_custom_slot = ship_airplane_launcher_1
				mid_2_custom_slot = ship_anti_air_1
				rear_1_custom_slot = ship_medium_battery_1
			}
		}
	# Battleships #
	create_equipment_variant = {
		name = "Marat Class"					
		type = ship_hull_heavy_1
		name_group = SOV_BB_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_bb_1
			front_1_custom_slot = ship_heavy_battery_1
			mid_1_custom_slot = empty
			mid_2_custom_slot = empty
			rear_1_custom_slot = empty
		}
	}
}

# 1939 Start #
1939.1.1 = {
	if = {
		limit = {
			has_dlc = "By Blood Alone"
		}
		create_equipment_variant = {
			name = "I-153" #
			type = small_plane_airframe_0
			modules = {
				fixed_main_weapon_slot = light_mg_4x
				fixed_auxiliary_weapon_slot_1 = rocket_rails
				engine_type_slot = engine_1_1x
				special_type_slot_1 = empty
			}
		}
		create_equipment_variant = {
			name = "I-16 Type 10" #
			type = small_plane_airframe_1
			modules = {
				fixed_main_weapon_slot = light_mg_4x
				fixed_auxiliary_weapon_slot_1 = empty
				engine_type_slot = engine_2_1x
				special_type_slot_1 = empty
			}
		}
		create_equipment_variant = {
			name = "MBR-2" #
			type = small_plane_cas_airframe_1
			modules = {
				fixed_main_weapon_slot = bomb_locks
				fixed_auxiliary_weapon_slot_1 = empty
				engine_type_slot = engine_2_1x
				special_type_slot_1 = floats
				special_type_slot_2 = fuel_tanks_small
			}
		}
		create_equipment_variant = {
			name = "Pe-8" #
			type = large_plane_airframe_1
			modules = {
				fixed_main_weapon_slot = large_bomb_bay
				fixed_auxiliary_weapon_slot_1 = large_bomb_bay
				engine_type_slot = engine_3_4x #Increased tier due to thrust/weight issues
				special_type_slot_1 = lmg_defense_turret
				special_type_slot_2 = cannon_defense_turret_2x
			}
		}
	}
	if = {
		limit = { not = { has_dlc = "Man the Guns" } }
		# Ship variants #
		create_equipment_variant = {
			name = "Series X Shchuka"
			type = submarine_2
			upgrades = {
				ship_reliability_upgrade = 3
				sub_engine_upgrade = 3
				sub_stealth_upgrade = 3
				sub_torpedo_upgrade = 3
			}
		}

		create_equipment_variant = {
			name = "Maxim Gorky Class"
			type = heavy_cruiser_2
			upgrades = {
				ship_reliability_upgrade = 2
				ship_engine_upgrade = 2
				ship_armor_upgrade = 2
				ship_gun_upgrade = 2
			}
		}
	}
	if = {
		limit = { has_dlc = "Man the Guns" }
		# Submarines #
		create_equipment_variant = {
			name = "Series XIII Leninets"				
			type = ship_hull_submarine_2
			name_group = SOV_SS_LENINETS
			parent_version = 0
			modules = {
				fixed_ship_torpedo_slot = ship_torpedo_sub_2
				fixed_ship_engine_slot = sub_ship_engine_2
				rear_1_custom_slot = ship_mine_layer_sub
			}
		}
		create_equipment_variant = {
			name = "Series XIV K-Class"				
			type = ship_hull_submarine_3
			name_group = SOV_SS_SHCHUKA
			parent_version = 0
			modules = {
				fixed_ship_torpedo_slot = ship_torpedo_sub_2
				fixed_ship_engine_slot = sub_ship_engine_3
				front_1_custom_slot = ship_mine_layer_sub
				mid_1_custom_slot = empty
				rear_1_custom_slot = ship_torpedo_sub_2
			}
		}
		# Destroyers #
		create_equipment_variant = {
			name = "Gnevnyy Class"				
			type = ship_hull_light_2
			name_group = SOV_DD_HISTORICAL
			parent_version = 0
			modules = {
				fixed_ship_battery_slot = ship_light_battery_2
				fixed_ship_anti_air_slot = empty
				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 = empty
				mid_1_custom_slot = empty
				rear_1_custom_slot = ship_depth_charge_1
			}
			obsolete = yes
		}
		create_equipment_variant = {
			name = "Soobrazitelnyi Class"				
			type = ship_hull_light_3
			name_group = SOV_DD_HISTORICAL
			parent_version = 0
			modules = {
				fixed_ship_battery_slot = ship_light_battery_2
				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 = empty
				mid_1_custom_slot = empty
				rear_1_custom_slot = ship_depth_charge_1
			}
		}
		create_equipment_variant = {
			name = "Tashkent Class"				
			type = ship_hull_light_3
			name_group = SOV_DD_HISTORICAL
			parent_version = 0
			modules = {
				fixed_ship_battery_slot = ship_light_battery_2
				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_3
				fixed_ship_torpedo_slot = ship_torpedo_1
				mid_1_custom_slot = ship_anti_air_1
				rear_1_custom_slot = ship_depth_charge_1
			}
		}
	}
	if = {
		limit = {
			has_dlc = "No Step Back"
		}
		create_equipment_variant = {
			name = "A-20"
			type = medium_tank_chassis_1
			parent_version = 0
			modules = {
				main_armament_slot = tank_small_cannon_2
				turret_type_slot = tank_medium_two_man_tank_turret
				suspension_type_slot = tank_christie_suspension
				armor_type_slot = tank_welded_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = sloped_armor
			}
			upgrades = {
				tank_nsb_engine_upgrade = 8
				tank_nsb_armor_upgrade = 2
			}
			icon = "GFX_SOV_basic_medium_tank_medium"
		}
		create_equipment_variant = {
			name = "KV-1"
			type = heavy_tank_chassis_1
			parent_version = 0
			modules = {
				main_armament_slot = tank_medium_cannon
				turret_type_slot = tank_heavy_three_man_tank_turret
				suspension_type_slot = tank_torsion_bar_suspension
				armor_type_slot = tank_welded_armor
				engine_type_slot = tank_diesel_engine		
			}
			upgrades = {
				tank_nsb_engine_upgrade = 10
				tank_nsb_armor_upgrade = 9
			}
			icon = "GFX_SOV_improved_heavy_tank_medium"
		}
	}
}
