### search_filters = {FOCUS_FILTER_POLITICAL}
### search_filters = {FOCUS_FILTER_RESEARCH}
### search_filters = {FOCUS_FILTER_INDUSTRY}
### search_filters = {FOCUS_FILTER_STABILITY}
### search_filters = {FOCUS_FILTER_WAR_SUPPORT}
### search_filters = {FOCUS_FILTER_MANPOWER}
### search_filters = {FOCUS_FILTER_ANNEXATION}
### search_filters = {FOCUS_FILTER_SOV_POLITICAL_PARANOIA}
### search_filters = {FOCUS_FILTER_PROPAGANDA}
### search_filters = {FOCUS_FILTER_ARMY_XP}
### search_filters = {FOCUS_FILTER_NAVY_XP}
### search_filters = {FOCUS_FILTER_AIR_XP}
# Reminder that focus filters prio has to be handled in the generic focus file :)

focus_tree = {
	id = soviet_focus

	country = {
		factor = 0
		
		modifier = {
			add = 10
			tag = SOV
		}
	}
	
	default = no

	continuous_focus_position = { x = 55 y = 1500 }


##    ##  #######      ######  ######## ######## ########     ########     ###     ######  ##    ## 
###   ## ##     ##    ##    ##    ##    ##       ##     ##    ##     ##   ## ##   ##    ## ##   ##  
####  ## ##     ##    ##          ##    ##       ##     ##    ##     ##  ##   ##  ##       ##  ##   
## ## ## ##     ##     ######     ##    ######   ########     ########  ##     ## ##       #####    
##  #### ##     ##          ##    ##    ##       ##           ##     ## ######### ##       ##  ##   
##   ### ##     ##    ##    ##    ##    ##       ##           ##     ## ##     ## ##    ## ##   ##  
##    ##  #######      ######     ##    ######## ##           ########  ##     ##  ######  ##    ## 



 ######  #### ##     ## #### ##       ####    ###    ##    ##    #### ##    ## ########  ##     ##  ######  ######## ########  ##    ## 
##    ##  ##  ##     ##  ##  ##        ##    ## ##   ###   ##     ##  ###   ## ##     ## ##     ## ##    ##    ##    ##     ##  ##  ##  
##        ##  ##     ##  ##  ##        ##   ##   ##  ####  ##     ##  ####  ## ##     ## ##     ## ##          ##    ##     ##   ####   
##        ##  ##     ##  ##  ##        ##  ##     ## ## ## ##     ##  ## ## ## ##     ## ##     ##  ######     ##    ########     ##    
##        ##   ##   ##   ##  ##        ##  ######### ##  ####     ##  ##  #### ##     ## ##     ##       ##    ##    ##   ##      ##    
##    ##  ##    ## ##    ##  ##        ##  ##     ## ##   ###     ##  ##   ### ##     ## ##     ## ##    ##    ##    ##    ##     ##    
 ######  ####    ###    #### ######## #### ##     ## ##    ##    #### ##    ## ########   #######   ######     ##    ##     ##    ##    


	focus = {
		id = SOV_infrastructure_effort_nsb

		icon = GFX_goal_generic_construction
		x = 1
		y = 0
		cost = 5

		ai_will_do = {
			factor = 1
		}

		available = {

		}

		bypass = {
			custom_trigger_tooltip =  {
				tooltip = infrastructure_effort_tt
				all_owned_state = {
					free_building_slots = {
						building = infrastructure
						size < 2
					}
				}
			}
		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY}

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SOV_infrastructure_effort_3Inf }
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
			}
		}

		completion_reward = {
			
			651 = {
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				set_state_flag = SOV_infrastructure_effort_3Inf	
			}
			252 = {
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				set_state_flag = SOV_infrastructure_effort_3Inf	
			}
			234 = {
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				set_state_flag = SOV_infrastructure_effort_3Inf	
			}
			40 = {
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				set_state_flag = SOV_infrastructure_effort_3Inf	
			}
		}
	}

	focus = {
		id = SOV_heavy_industry

		icon = GFX_goal_generic_construct_civ_factory
		x = 2
		y = 0
		relative_position_id = SOV_infrastructure_effort_nsb
		cost = 5

		completion_reward = { #TODO_Manu: This is just copy-pasted from the old focus -> Is this what we want?
			IF = {
				limit = {
					any_owned_state = {
						is_controlled_by = ROOT 
						industrial_complex > 0
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
						NOT = { has_state_flag = SOV_finish_five_year_plan_2IC }
					}
				}
				random_owned_controlled_state = {
					limit = {
						industrial_complex > 0
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
					set_state_flag = SOV_finish_five_year_plan_2IC
				}
			}
			ELSE = {
				random_owned_controlled_state = {
					limit = {
						# industrial_complex > 0
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
					set_state_flag = SOV_finish_five_year_plan_2IC
				}
			}
			IF = {
				limit = {
					check_variable = { num_owned_states > 1}
					any_owned_state = {
						is_controlled_by = ROOT 
						industrial_complex > 0
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
						NOT = { has_state_flag = SOV_finish_five_year_plan_2IC }
					}
				}
				random_owned_controlled_state = {
					limit = {
						industrial_complex > 0
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
						NOT = { has_state_flag = SOV_finish_five_year_plan_2IC }
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
					set_state_flag = SOV_finish_five_year_plan_2IC
				}
			}
			ELSE_IF = {
				limit = {
					check_variable = { num_owned_states > 1 }
				}
				random_owned_controlled_state = {
					limit = {
						# industrial_complex > 0
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
						NOT = { has_state_flag = SOV_finish_five_year_plan_2IC }
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
					set_state_flag = SOV_finish_five_year_plan_2IC
				}
			}
		}
	}

	focus = {
		id = SOV_finish_the_five_year_plan

		icon = GFX_focus_generic_industry_1
		prerequisite = { focus = SOV_infrastructure_effort_nsb }
		prerequisite = { focus = SOV_heavy_industry }
		x = 1
		y = 1
		relative_position_id = SOV_infrastructure_effort_nsb
		cost = 10

		available = {
			custom_trigger_tooltip = {
				tooltip = SOV_fyp_controlled_factories_tier_1_tt
				NOT = { num_of_controlled_factories < SOV_fyp_factory_requirement_tier_1 }
			}
		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY}

		complete_tooltip = {
			every_state = {
				limit = { has_state_flag = SOV_finish_five_year_plan_2IC }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}

		completion_reward = { #TODO_Manu: This is just copy-pasted from the old focus -> Is this what we want?
			random_owned_controlled_state = {
				limit = {
					industrial_complex > 0
					free_building_slots = {
						building = industrial_complex
						size > 2
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
				set_state_flag = SOV_finish_five_year_plan_2IC
			}
			random_owned_controlled_state = {
				limit = {
					industrial_complex > 0
					free_building_slots = {
						building = industrial_complex
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
				set_state_flag = SOV_finish_five_year_plan_2IC
			}

			custom_effect_tooltip = generic_skip_one_line_tt
			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = SOV_lazar_kaganovich
		}
	}

	focus = {
		id = SOV_improve_railway_network

		icon = GFX_goal_generic_construct_infrastructure
		prerequisite = { focus = SOV_finish_the_five_year_plan }
		x = -2
		y = 1
		relative_position_id = SOV_finish_the_five_year_plan
		cost = 5
		
		search_filters = {FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			# Moscow - Rostov on Don
			build_railway = {
				path = { 9330 3356 6279 6230 6398 6341 413 3527 11475 11412 6591 3540 3519 11459 11450 11434 9417 }
			}
			# Stalingrad-Rostov on Don
			build_railway = {
				path = { 3529 9504 533 9516 509 500 11459 } #(Stalingrad - Conjunction near Millerovo)
			}
			# Stalingrad-Mikhaylovka 
			build_railway = {
				path = { 9504 3582 9436 11485 3539 9564 11408 } #(Conjunction right next to Stalingrad - Conjunction in West Saratov)
			}
			# Stalingrad - Astrakhan
			build_railway = {
				path = { 3529 11474 520 6516 6486 9455 11429 6620 9753 }
			}
			# Tbilisi - Yerevan
			build_railway = {
				path = { 1599 9702 12441 3564 12320 }
			}

			#Supply Hub in Yerevan
			230 = {
				add_building_construction = {
					type = supply_node
					level = 1
					province = 12320
					instant_build = yes
				}
			}
			#Supply Hub in Kandalaksha
			213 = {
				add_building_construction = {
					type = supply_node
					level = 1
					province = 6181
					instant_build = yes
				}
			}

			custom_effect_tooltip = generic_skip_one_line_tt
			custom_effect_tooltip = available_designer
			show_ideas_tooltip = SOV_soviet_railways
		}
	}

	focus = {
		id = SOV_third_five_year_plan

		icon = GFX_focus_generic_industry_2
		prerequisite = { focus = SOV_finish_the_five_year_plan }
		x = 0
		y = 1
		relative_position_id = SOV_finish_the_five_year_plan
		cost = 5

		available = {
			SOV_third_five_year_plan_available = yes
			custom_trigger_tooltip = {
				tooltip = SOV_fyp_controlled_factories_tier_2_tt
				NOT = { num_of_controlled_factories < SOV_fyp_factory_requirement_tier_2 }
			}
			}
		
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH}

		completion_reward = {
		
		 remove_ideas = {
		 SOV_Disorganized_industry
		 }
			hidden_effect = {
				add_to_variable = { SOV_fyp_production_factory_efficiency_gain_factor = 0.05 }
				add_to_variable = { SOV_fyp_consumer_goods_factor = 0.05 }
			}
				hidden_effect = {
					#Swap dynamic modifier to change icon
					remove_dynamic_modifier = { modifier = SOV_second_five_year_plan_dynamic_modifier }
					add_dynamic_modifier = { modifier = SOV_third_five_year_plan_dynamic_modifier }
				}
				custom_effect_tooltip = SOV_third_five_year_plan_ns_tt

				add_tech_bonus = {
					name = SOV_third_five_year_plan_default
					bonus = 0.75
					uses = 2
					category = construction_tech
				}
				hidden_effect = {
					#Swap dynamic modifier to change icon
					remove_dynamic_modifier = { modifier = SOV_third_five_year_plan_dynamic_modifier }
					add_dynamic_modifier = { modifier = SOV_third_five_year_plan_civilian_dynamic_modifier }
				}
		}
	}

	focus = {
		id = SOV_reorganize_the_pc_of_heavy_industry

		icon = GFX_goal_generic_production2
		prerequisite = { focus = SOV_third_five_year_plan }
		x = -2
		y = 2
		relative_position_id = SOV_third_five_year_plan
		cost = 10


		available = {
			SOV_third_five_year_plan_available = yes
			custom_trigger_tooltip = {
				tooltip = SOV_fyp_controlled_factories_tier_3_tt
				NOT = { num_of_controlled_factories < SOV_fyp_factory_requirement_tier_3 }
			}
			}
		
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH}

		completion_reward = {
			hidden_effect = {
				add_to_variable = { SOV_fyp_consumer_goods_factor = -0.02 }
			}
			custom_effect_tooltip = SOV_reorganize_the_pc_of_heavy_industry_ns_tt
				

				add_tech_bonus = {
					name = SOV_reorganize_the_pc_of_heavy_industry_name_default
					bonus = 1.0
					uses = 2
					category = industry
				}
		}
	}

	focus = {
		id = SOV_industrial_modernization

		icon = GFX_goal_reichsautobahn
		prerequisite = { focus = SOV_steel_casting_industry }
		prerequisite = { focus = SOV_reorganize_the_pc_of_heavy_industry }
		x = 2
		y = 1
		relative_position_id = SOV_reorganize_the_pc_of_heavy_industry
		cost = 10

		available = {
			SOV_third_five_year_plan_available = yes
			custom_trigger_tooltip = {
				tooltip = SOV_fyp_controlled_factories_tier_4_tt
				NOT = { num_of_controlled_factories < SOV_fyp_factory_requirement_tier_4 }
			}
			}
		
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH}

		completion_reward = {
			add_to_variable = { SOV_fyp_production_factory_max_efficiency_factor = 0.05 }
			add_to_variable = { SOV_fyp_line_change_production_efficiency_factor = 0.1 }
			custom_effect_tooltip = SOV_industrial_modernization_ns_tt

			add_tech_bonus = {
				name = SOV_industrial_modernization
				ahead_reduction = 2
				bonus = 1.0
				uses = 1
				category = industry
			}
		}
	}

	focus = {
		id = SOV_increase_state_reserves

		icon = GFX_goal_generic_construction2
		prerequisite = { focus = SOV_third_five_year_plan }
		x = 0
		y = 1
		relative_position_id = SOV_third_five_year_plan
		cost = 5

		available = {
			SOV_third_five_year_plan_available = yes
		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			#Modify Third Year Plan NS
			set_variable = { SOV_fyp_local_resources_factor = 0.1 }
			custom_effect_tooltip = SOV_increase_state_reserves_ns_tt

			custom_effect_tooltip = SOV_increase_state_reserves_silo_tt
			set_temp_variable = { temp_targets_index = 0 }
			
			while_loop_effect = {
				limit = {
					check_variable = { temp_targets_index = 3 compare = less_than }
					any_owned_state = {
						infrastructure < 3
						free_building_slots = {
							building = fuel_silo
							size > 0
							include_locked = yes
						}
						NOT = { has_state_flag = SOV_increase_state_reserves_flag }
					}
				}
				if = { #If possible, prio low-infrastructure states for silos
					limit = {
						any_owned_state = {
							infrastructure < 3
							free_building_slots = {
								building = fuel_silo
								size > 0
								include_locked = yes
							}
							NOT = { has_state_flag = SOV_increase_state_reserves_flag }
						}
					}
					random_owned_controlled_state = {
						limit = {
							infrastructure < 3
							free_building_slots = {
								building = fuel_silo
								size > 0
								include_locked = yes
							}
							NOT = { has_state_flag = SOV_increase_state_reserves_flag }
						}
						set_state_flag = SOV_increase_state_reserves_flag
						add_extra_state_shared_building_slots = 1
						add_building_construction = {
							type = fuel_silo
							level = 1
							instant_build = yes
						}
					}
				}
				else = {
					random_owned_controlled_state = {
						limit = {
							free_building_slots = {
								building = fuel_silo
								size > 0
								include_locked = yes
							}
							NOT = { has_state_flag = SOV_increase_state_reserves_flag }
						}
						set_state_flag = SOV_increase_state_reserves_flag
						add_extra_state_shared_building_slots = 1
						add_building_construction = {
							type = fuel_silo
							level = 1
							instant_build = yes
						}
					}
				}
				add_to_temp_variable = { temp_targets_index = 1 }
			}
			every_owned_state = { #Tooltip purposes (lets you know which states have been selected once the focus is completed)
				limit = {
					has_state_flag = SOV_increase_state_reserves_flag
				}
			}
		}
	}

	focus = {
		id = SOV_shift_to_armaments_production

		icon = GFX_focus_generic_combined_arms
		prerequisite = { focus = SOV_leningrad_polytechnical_institute }
		prerequisite = { focus = SOV_war_economy }
		x = 2
		y = 1
		relative_position_id = SOV_leningrad_polytechnical_institute
		cost = 5


		available = {
		}
		
		completion_reward = {
			hidden_effect = {
				set_variable = { SOV_fyp_production_speed_industrial_complex_factor = 0 } #Remove Civ constr speed
			}
			hidden_effect = {
				#Swap dynamic modifier to change icon
				remove_dynamic_modifier = { modifier = SOV_third_five_year_plan_civilian_dynamic_modifier }
				add_dynamic_modifier = { modifier = SOV_third_five_year_plan_military_dynamic_modifier }
			}
			add_to_variable = { SOV_fyp_industrial_capacity_factory = 0.05 } #Add small output bonus
			custom_effect_tooltip = SOV_shift_to_armaments_production_ns_tt

			add_tech_bonus = {
				name = SOV_shift_to_armaments_production
				bonus = 1.0
				uses = 2
				category = infantry_weapons
			}
		}
	}

	focus = {
		id = SOV_optimize_production_lines

		icon = GFX_focus_generic_tank_production
		prerequisite = { focus = SOV_shift_to_armaments_production }
		x = 0
		y = 1
		relative_position_id = SOV_shift_to_armaments_production
		cost = 5

		available = {
		}
		
		completion_reward = {
			add_to_variable = { SOV_fyp_production_factory_efficiency_gain_factor = 0.05 } #Add efficiency gain
			add_to_variable = { SOV_fyp_production_factory_start_efficiency_factor = 0.05 } #Add efficiency start
			add_to_variable = { SOV_fyp_industrial_capacity_factory = 0.05 } #Add small output bonus
			custom_effect_tooltip = SOV_optimize_production_lines_ns_tt

			add_tech_bonus = {
				name = SOV_optimize_production_lines
				bonus = 1
				uses = 2
				category = industry
			}
		}
	}

	focus = {
		id = SOV_steel_casting_industry

		icon = GFX_focus_generic_steel
		prerequisite = { focus = SOV_third_five_year_plan }
		x = 2
		y = 2
		relative_position_id = SOV_third_five_year_plan
		cost = 10

		available = {
			any_owned_state = {
				has_resources_amount = {
					resource = steel
					amount > 0
				}
				free_building_slots = {
					building = industrial_complex
					size > 1
					include_locked = yes
				}
			}
			SOV_third_five_year_plan_available = yes
		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			set_variable = { SOV_fyp_industrial_capacity_factory = 0.05 }
			set_variable = { SOV_fyp_industrial_capacity_dockyard = 0.05 }

			custom_effect_tooltip = SOV_steel_casting_industry_ns_tt

			random_owned_controlled_state = {
				limit = {
					has_resources_amount = {
						resource = steel
						amount > 0
					}
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
				add_resource = {
					type = steel
					amount = 5
				}
				set_state_flag = SOV_steel_casting_industry_flag
			}
			if = {
				limit = {
					any_owned_state = {
						has_resources_amount = {
							resource = steel
							amount > 0
						}
						free_building_slots = {
							building = industrial_complex
							size > 1
							include_locked = yes
						}
						NOT = {	has_state_flag = SOV_steel_casting_industry_flag }
					}
				}
				random_owned_controlled_state = {
					limit = {
						has_resources_amount = {
							resource = steel
							amount > 0
						}
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
						NOT = {	has_state_flag = SOV_steel_casting_industry_flag }
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
					add_resource = {
						type = steel
						amount = 5
					}
					set_state_flag = SOV_steel_casting_industry_flag
				}
			}
		}
	}

	focus = {
		id = SOV_synthetic_rubber

		icon = GFX_focus_generic_rubber
		prerequisite = { focus = SOV_oil_production }
		x = 0
		y = 1
		relative_position_id = SOV_oil_production
		cost = 5

		available = {
			has_tech = rubber_processing
			223 = { 
					is_controlled_by = ROOT
				}
				260 = { 
					is_controlled_by = ROOT
				}
		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH}

		completion_reward = {
			# ADD SYNTHETICS IN HISTORICAL STATES (VORONEZH AND TULA)
			if = {
				limit = {
					has_full_control_of_state = 260 #VORONEZH
				}
				260 = { #VORONEZH
					add_extra_state_shared_building_slots = 2
					add_building_construction = {
						type = synthetic_refinery
						level = 2
						instant_build = yes
					}
				}
				if = {
					limit = {
						has_full_control_of_state = 254 #RYAZAN
						has_full_control_of_state = 258 #LIPETSK
					}
					# Moscow - Voronezh
					build_railway = {
						path = { 6380 6414 9348 9282 11268 9330 3356 6279 6230 6398 6341 413 3527 }
					}
				}
			}
			if = {
				limit = {
					has_full_control_of_state = 223 #TULA
				}
				223 = { #TULA
					add_extra_state_shared_building_slots = 2
					add_building_construction = {
						type = synthetic_refinery
						level = 2
						instant_build = yes
					}
				}
				# Moscow - Tula
				build_railway = {
					path = { 6380 6414 9348 6290 6396 6262 }
				}
			}
			add_tech_bonus = {
				name = SOV_synthetic_rubber
				bonus = 0.75
				uses = 2
				category = cat_synth_rubber
			}
		}
	}

	focus = {
		id = SOV_oil_production

		icon = GFX_goal_generic_oil_refinery
		prerequisite = { focus = SOV_leningrad_polytechnical_institute }
		prerequisite = { focus = SOV_war_economy }
		x = 4
		y = 1
		relative_position_id = SOV_leningrad_polytechnical_institute
		cost = 5

		available = {
			232 = { 
					is_controlled_by = ROOT
				}
				821 = { 
					is_controlled_by = ROOT
				}
				231 = { 
					is_controlled_by = ROOT
				}
				230 = { 
					is_controlled_by = ROOT
				}
				229 = { 
					is_controlled_by = ROOT
				}
		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			set_variable = { SOV_fyp_fuel_gain_factor_from_states = 0.05 }
			set_variable = { SOV_fyp_production_oil_factor = 0.05 }
			custom_effect_tooltip = SOV_oil_production_ns_tt
			
			set_temp_variable = { SOV_silos_from_focus = 0 }
			every_owned_state = {
				limit ={
					is_fully_controlled_by = ROOT
					has_resources_amount = {
						resource = oil
						amount > 0
					}
					infrastructure < 3
				}
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes						
				}
				hidden_effect = {
					if = {
						limit = {
							check_variable = { SOV_silos_from_focus = 2 compare = less_than_or_equals }
						}				
						add_building_construction = {
							type = fuel_silo
							level = 1
							instant_build = yes						
						}
						add_to_temp_variable = { SOV_silos_from_focus = 1 }
					}
				}
				custom_effect_tooltip = SOV_oil_production_silo_tt
			}
			#Build Railways in Caucasus
			if = {
				limit = {
					has_full_control_of_state = 229 #BAKU
					has_full_control_of_state = 230 #ARMENIA
					has_full_control_of_state = 231 #GEORGIA
				}
				# Baku - Tbilisi
				build_railway = {
					path = { 7661 1536 4614 4477 11645 11674 1539 11708 1599 }
				}
			}
			if = {
				limit = {
					has_full_control_of_state = 232 #DAGESTAN
					has_full_control_of_state = 821 #CHECHNYA-INGUSHETIA
				}
				# Makhachkala (Hub province) - Grozny
				build_railway = {
					path = { 3668 3682 3672 }
				}
			}
		}
	}

	

	

	focus = {
		id = SOV_no_time_for_peace

		icon = GFX_focus_rocketry
		prerequisite = { focus = SOV_found_the_jet_institute }
		x = 0
		y = 1
		relative_position_id = SOV_found_the_jet_institute
		cost = 5   

		available = {

		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH}

		completion_reward = {


			add_breakthrough_progress = {
				specialization = specialization_nuclear
				value = 0.75
			}
			add_breakthrough_progress = {
				specialization = specialization_air
				value = 0.75
			}

			custom_effect_tooltip = generic_skip_one_line_tt

			IF = {
				limit = {
					NOT = {
						has_tech = atomic_research
					}
				}
				add_tech_bonus = {
					name = SOV_no_time_for_peace
					bonus = 0.5
					uses = 1 # was 2
					category = nuclear
				}
			}
			add_tech_bonus = {
				name = SOV_no_time_for_peace
				bonus = 0.5
				uses = 1 # was 2
				category = rocketry
			}

			custom_effect_tooltip = generic_skip_one_line_tt

			add_ideas = SOV_no_time_for_peace_idea
		}
	}

	focus = {
		id = SOV_soviet_atomic_bomb_project
		icon = GFX_SOV_soviet_atomic_bomb_project_ccp_2d_sov_compatibility
		prerequisite = { focus = SOV_the_ussr_academy_of_sciences }
		x = -1
		y = 1
		relative_position_id = SOV_the_ussr_academy_of_sciences
		cost = 10
		
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {

			IF = {
				limit = {
					NOT = {
						has_tech = atomic_research
					}
				}
				add_tech_bonus = {
					name = SOV_soviet_atomic_bomb_project_tech_bonus_name
					bonus = 1
					uses = 1
					ahead_reduction = 1
					category = nuclear
				}
				add_breakthrough_progress = {
					specialization = specialization_nuclear
					value = 0.5
				}
			}
			ELSE = {
				add_breakthrough_progress = {
					specialization = specialization_nuclear
					value = 0.8
				}
			}

			custom_effect_tooltip = generic_skip_one_line_tt

			custom_effect_tooltip = SOV_soviet_atomic_bomb_project_tt
			hidden_effect = {
				IF = {
					limit = { 
						588 = {
							is_fully_controlled_by = ROOT
							air_facility < 1
							land_facility < 1
							naval_facility < 1
							nuclear_facility < 1
						}
					}

					588 = {
						add_building_construction = {
							type = nuclear_facility
							level = 1
							instant_build = yes
							province = 7350 # Kurchatov
						}
						add_victory_points = {
							province = 7350
							value = 1
						}	
					}
				}
			}

			custom_effect_tooltip = generic_skip_one_line_tt

			if = {
				limit = {
					has_dlc = "La Resistance"
				}
				create_operative_leader = {
					name = SOV_ursula_kuczynski
					GFX = GFX_Portrait_ursula_kuczynski
					female = yes
					traits = { operative_safe_cracker operative_infiltrator }
					bypass_recruitment = no
					available_to_spy_master = yes
					nationalities = { SOV GER }
				}
				add_ideas = SOV_soviet_atomic_bomb_project_ns
			}
			custom_effect_tooltip = SOV_soviet_atomic_bomb_project_unlock_operation_tt
		}
	}

	focus = {
		id = SOV_national_specialists

		icon = GFX_goal_generic_consumer_goods
		prerequisite = { focus = SOV_finish_the_five_year_plan }
		x = 3
		y = 1
		relative_position_id = SOV_finish_the_five_year_plan
		cost = 5

		mutually_exclusive = { focus = SOV_foreign_experts }

		available = {

		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH}

		completion_reward = {
			custom_effect_tooltip = SOV_national_specialists_tt

			SOV_replace_industrial_designer = yes #"National" Industrial Designers get +5% research bonus
			hidden_effect = {
				add_ideas = SOV_national_specialists_ns
			}
		}
	}

	focus = {
		id = SOV_foreign_experts

		icon = GFX_focus_spa_the_spanish_miracle
		prerequisite = { focus = SOV_finish_the_five_year_plan }
		x = 2
		y = 0
		relative_position_id = SOV_national_specialists
		cost = 5

		mutually_exclusive = { focus = SOV_national_specialists }

		available = {

		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			custom_effect_tooltip = available_designer
			show_ideas_tooltip = SOV_gosproyektstroy_1
		}
	}

	focus = {
		id = SOV_eastern_development

		icon = GFX_goal_generic_construct_civ_factory
		prerequisite = { focus = SOV_national_specialists focus = SOV_foreign_experts }
		x = 0
		y = 1
		relative_position_id = SOV_national_specialists
		cost = 5

		bypass = {
			408 = { #VLADIVOSTOK
				is_fully_controlled_by = ROOT
				NOT = {
					infrastructure < 5
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
				}
			}
			409 = { #KHABAROVSK
				is_fully_controlled_by = ROOT
				is_fully_controlled_by = ROOT
				NOT = {
					infrastructure < 5
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
				}
			}
			566 = { #IRKUTSK
				is_fully_controlled_by = ROOT
				is_fully_controlled_by = ROOT
				NOT = {
					infrastructure < 5
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
				}
			}
			564 = { #ULAN UDE
				is_fully_controlled_by = ROOT
				is_fully_controlled_by = ROOT
				NOT = {
					infrastructure < 5
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
				}
			}
		}

		available = {
			OR = {
				408 = { #VLADIVOSTOK
					is_fully_controlled_by = ROOT
				}
				409 = { #KHABAROVSK
					is_fully_controlled_by = ROOT
				}
				566 = { #IRKUTSK
					is_fully_controlled_by = ROOT
				}
				564 = { #ULAN UDE
					is_fully_controlled_by = ROOT
				}
			}
		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			set_temp_variable = { SOV_states_targeted_eastern_development = 0 } #Used this way to prioritize between desirable states
			if = {
				limit = {
					408 = { #VLADIVOSTOK
						is_fully_controlled_by = ROOT
						infrastructure < 5
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
					}
				}
				408 = { #VLADIVOSTOK
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
				}
				add_to_temp_variable = { SOV_states_targeted_eastern_development = 1 }
			}
			else_if = { #Irkutsk replaces Vladivostok if necessary
				limit = {
					check_variable = { SOV_states_targeted_eastern_development = 2 compare = less_than_or_equals }
					566 = { #IRKUTSK
						is_fully_controlled_by = ROOT
						infrastructure < 5
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
					}
				}
				566 = { #IRKUTSK
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
				}
			}

			if = {
				limit = {
					409 = { #KHABAROVSK
						is_fully_controlled_by = ROOT
						infrastructure < 5
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
					}
				}
				409 = { #KHABAROVSK
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
				}
				add_to_temp_variable = { SOV_states_targeted_eastern_development = 1 }
			}
			else_if = { #Ulan Ude replaces Khabarovsk if necessary
				limit = {
					check_variable = { SOV_states_targeted_eastern_development = 2 compare = less_than_or_equals }
					564 = { #ULAN UDE
						is_fully_controlled_by = ROOT
						infrastructure < 5
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
					}
				}
				564 = { #ULAN UDE
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}

	focus = {
		id = SOV_develop_the_urals

		icon = GFX_goal_generic_construct_civ_factory
		prerequisite = { focus = SOV_national_specialists focus = SOV_foreign_experts }
		x = 2
		y = 0
		relative_position_id = SOV_eastern_development
		cost = 5

		bypass = {
			572 = { #CHELYABISNK
				is_fully_controlled_by = ROOT
				NOT = {
					infrastructure < 5
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
				}
			}
			573 = { #ZLATOUST
				is_fully_controlled_by = ROOT
				is_fully_controlled_by = ROOT
				NOT = {
					infrastructure < 5
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
				}
			}
			582 = { #MAGNITOGORSK
				is_fully_controlled_by = ROOT
				is_fully_controlled_by = ROOT
				NOT = {
					infrastructure < 5
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
				}
			}
			653 = { #SVERDLOVSK
				is_fully_controlled_by = ROOT
				is_fully_controlled_by = ROOT
				NOT = {
					infrastructure < 5
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
				}
			}
		}

		available = {
			OR = {
				572 = { #CHELYABISNK
					is_fully_controlled_by = ROOT
				}
				573 = { #ZLATOUST
					is_fully_controlled_by = ROOT
				}
				582 = { #MAGNITOGORSK
					is_fully_controlled_by = ROOT
				}
				653 = { #SVERDLOVSK
					is_fully_controlled_by = ROOT
				}
			}
		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			set_temp_variable = { SOV_states_targeted_eastern_development = 0 } #Used this way to prioritize between desirable states
			if = {
				limit = {
					572 = { #CHELYABISNK
						is_fully_controlled_by = ROOT
						infrastructure < 5
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
					}
				}
				572 = { #CHELYABISNK
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
				}
				add_to_temp_variable = { SOV_states_targeted_eastern_development = 1 }
			}
			else_if = { #Magnitogorsk replaces Chelyabinsk if necessary
				limit = {
					check_variable = { SOV_states_targeted_eastern_development = 2 compare = less_than_or_equals }
					582 = { #MAGNITOGORSK
						is_fully_controlled_by = ROOT
						infrastructure < 5
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
					}
				}
				582 = { #MAGNITOGORSK
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
				}
			}

			if = {
				limit = {
					573 = { #ZLATOUST
						is_fully_controlled_by = ROOT
						infrastructure < 5
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
					}
				}
				573 = { #ZLATOUST
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
				}
				add_to_temp_variable = { SOV_states_targeted_eastern_development = 1 }
			}
			else_if = { #Sverdlovsk replaces Zlatoust if necessary
				limit = {
					check_variable = { SOV_states_targeted_eastern_development = 2 compare = less_than_or_equals }
					653 = { #SVERDLOVSK
						is_fully_controlled_by = ROOT
						infrastructure < 5
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
					}
				}
				653 = { #SVERDLOVSK
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}

	focus = {
		id = SOV_the_ussr_academy_of_sciences

		icon = GFX_focus_research
		prerequisite = { focus = SOV_eastern_development }
		prerequisite = { focus = SOV_develop_the_urals }
		x = 1
		y = 1
		relative_position_id = SOV_eastern_development
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {
			add_research_slot = 1
			if = {
				limit = {
					any_country = {
						SOV_is_valid_academy_of_sciences_target = yes
					}
				}
				if = { #ALT IDEOLOGY
					limit = {
						NOT = { has_government = communism }
					}
					add_to_tech_sharing_group = SOV_imperial_academies_of_sciences_joint_program
					every_country = {
						limit = {
							SOV_is_valid_academy_of_sciences_target = yes
						}
						add_to_tech_sharing_group = SOV_imperial_academies_of_sciences_joint_program
					}
				}
				else = { #DEFAULT COMMUNISM
					add_to_tech_sharing_group = SOV_soviet_academies_of_sciences_joint_program
					every_country = {
						limit = {
							SOV_is_valid_academy_of_sciences_target = yes
						}
						add_to_tech_sharing_group = SOV_soviet_academies_of_sciences_joint_program
					}
				}
			}
			custom_effect_tooltip = generic_skip_one_line_tt
			if = { #ALT IDEOLOGY
				limit = {
					NOT = { has_government = communism }
				}
				hidden_effect = {
					add_dynamic_modifier = { modifier = SOV_ussr_academy_of_sciences_dynamic_modifier_alt }
				}
				effect_tooltip = { add_ideas = SOV_national_academy_of_sciences_alt_fake }
			}
			else = { #DEFAULT COMMUNISM
				hidden_effect = {
					add_dynamic_modifier = { modifier = SOV_ussr_academy_of_sciences_dynamic_modifier }
				}
				effect_tooltip = { add_ideas = SOV_national_academy_of_sciences_fake }
			}
		}
	}

	focus = {
		id = SOV_national_academies_of_sciences

		icon = GFX_focus_research2
		prerequisite = { focus = SOV_the_ussr_academy_of_sciences }
		x = 1
		y = 1
		relative_position_id = SOV_the_ussr_academy_of_sciences
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {
			if = { 
				limit = { #DEFAULT COMMUNISM
					has_government = communism
				}
				custom_effect_tooltip = SOV_national_academies_of_sciences_tt
			}
			else = { #ALT IDEOLOGY
				custom_effect_tooltip = SOV_national_academies_of_sciences_alt_tt
			}
		}
	}

	

	focus = {
		id = SOV_transformation_of_nature_alt

		icon = GFX_focus_generic_land_reclamation
		prerequisite = { focus = SOV_synthetic_rubber }
		prerequisite = { focus = SOV_no_time_for_peace }
		prerequisite = { focus = SOV_optimize_production_lines }
		x = 0
		y = 1
		relative_position_id = SOV_optimize_production_lines
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			swap_ideas = {
			remove_idea = SOV_industry
			add_idea = SOV_transformation_of_nature
		}
		}
	}


   ###    #### ########   ######  ########     ###    ######## ######## 
  ## ##    ##  ##     ## ##    ## ##     ##   ## ##   ##          ##    
 ##   ##   ##  ##     ## ##       ##     ##  ##   ##  ##          ##    
##     ##  ##  ########  ##       ########  ##     ## ######      ##    
#########  ##  ##   ##   ##       ##   ##   ######### ##          ##    
##     ##  ##  ##    ##  ##    ## ##    ##  ##     ## ##          ##    
##     ## #### ##     ##  ######  ##     ## ##     ## ##          ##    



	focus = {
		id = SOV_transpolar_flights

		icon = GFX_goal_generic_air_fighter2
		x = 11
		y = 0
		relative_position_id = SOV_infrastructure_effort_nsb
		cost = 5

		ai_will_do = {
			factor = 1
		}

		available = {

		}
		
		search_filters = {FOCUS_FILTER_AIR_XP}

		completion_reward = {
			air_experience = 150
		}
	}

	focus = {
		id = SOV_expand_the_aircraft_industry

		icon = GFX_goal_generic_construct_mil_factory
		prerequisite = { focus = SOV_transpolar_flights }
		x = -1
		y = 1
		relative_position_id = SOV_transpolar_flights
		cost = 10

		available = {
			any_owned_state = {
				is_fully_controlled_by = ROOT
				free_building_slots = {
					building = arms_factory
					size > 1
					include_locked = yes
				}
			}
		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			set_variable = { SOV_soviet_airforce_aircraft_manufacturer_cost_factor = -0.25 }
			custom_effect_tooltip = SOV_expand_the_aircraft_industry_ns_tt

			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
				if = {
					limit = {
						air_base < 9
					}
					add_building_construction = {
						type = air_base
						level = 2
						instant_build = yes
					}
				}
				else = {
					ROOT = {
						random_owned_controlled_state = {
							limit = {
								air_base < 9
							}
							add_building_construction = {
								type = air_base
								level = 2
								instant_build = yes
							}
						}
					}
				}
			}
		}
	}

	focus = {
		id = SOV_modernize_aircraft_facilities

		icon = GFX_goal_generic_air_production
		prerequisite = { focus = SOV_expand_the_aircraft_industry }
		x = -1
		y = 1
		relative_position_id = SOV_expand_the_aircraft_industry
		cost = 5

		available = {

		}
		
		search_filters = {}

		completion_reward = {
			add_to_variable = { SOV_soviet_airforce_air_fuel_consumption_factor = -0.05 }
			add_to_variable = { SOV_soviet_airforce_air_range_factor = 0.05 }
			add_to_variable = { SOV_soviet_airforce_air_agility_factor = 0.05 }
			custom_effect_tooltip = SOV_modernize_aircraft_facilities_ns_tt
		}
	}

	focus = {
		id = SOV_merge_aircraft_plants

		icon = GFX_focus_SOV_merge_plants
		prerequisite = { focus = SOV_modernize_aircraft_facilities }
		x = -1
		y = 1
		relative_position_id = SOV_modernize_aircraft_facilities
		cost = 5

		available = {
			NOT = { has_country_flag = SOV_paranoia_system_active_flag }
		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			if = {
				limit = {
					has_dlc = "Arms Against Tyranny"
				}
				every_military_industrial_organization = {
					limit = {
						has_mio_trait = SOV_mio_trait_merge_plant_no_28 #All Aircraft MIOs have this trait
					}
					unlock_mio_trait_tooltip = SOV_mio_trait_merge_plant_no_28
					unlock_mio_trait_tooltip = SOV_mio_trait_merge_plant_no_150
					unlock_mio_trait_tooltip = SOV_mio_trait_merge_vef_plant
				}
			}
			else = {
				custom_effect_tooltip = SOV_merge_aircraft_plants_tt
			}
		}
	}

	focus = {
		id = SOV_found_the_jet_institute

		icon = GFX_goal_generic_build_airforce
		prerequisite = { focus = SOV_war_economy }
		prerequisite = { focus = SOV_leningrad_polytechnical_institute }
		x = 0
		y = 1
		relative_position_id = SOV_leningrad_polytechnical_institute
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {

			add_breakthrough_progress = {
				specialization = specialization_air
				value = 0.75
			}

			add_tech_bonus = {
				name = SOV_found_the_jet_institute
				bonus = 0.5
				uses = 2
				category = jet_technology
			}

		}
	}

	focus = {
		id = SOV_increase_aircraft_production

		icon = GFX_focus_generic_aircraft_production
		prerequisite = { focus = SOV_expand_the_aircraft_industry }
		x = 0
		y = 2
		relative_position_id = SOV_expand_the_aircraft_industry
		cost = 10

		mutually_exclusive = { focus = SOV_intensify_pilot_training_program }

		available = {
			NOT = { has_country_flag = SOV_paranoia_system_active_flag }
		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH}

		completion_reward = {
			hidden_effect = {
				#This handles the equipment bonus that's not supported by dynamic modifiers
				add_ideas = SOV_increased_aircraft_production_ns_bonus
				add_to_variable = { SOV_soviet_airforce_air_accidents_factor = 0.05 }
			}

			hidden_effect = {
				if = { #DEFAULT COMMIE
					limit = {
						has_government = communism
					}
					#Swap dynamic modifiers to show the bonus equipment custom tooltip
					remove_dynamic_modifier = { modifier = SOV_soviet_airforce_dynamic_modifier }
					add_dynamic_modifier = { modifier = SOV_soviet_airforce_aircraft_production_focus_dynamic_modifier }
				}
				else = { #ALT IDEOLOGY
					#Swap dynamic modifiers to show the bonus equipment custom tooltip
					remove_dynamic_modifier = { modifier = SOV_soviet_airforce_dynamic_modifier_alt }
					add_dynamic_modifier = { modifier = SOV_soviet_airforce_aircraft_production_focus_dynamic_modifier_alt }
				}
			}
			
			custom_effect_tooltip = SOV_increase_aircraft_production_ns_tt

			add_tech_bonus = {
				name = SOV_increase_aircraft_production
				bonus = 1.0
				uses = 2
				category = light_air
			}
		}
	}

	focus = {
		id = SOV_foster_flying_clubs

		icon = GFX_focus_SOV_flying_clubs
		prerequisite = { focus = SOV_transpolar_flights }
		x = 1
		y = 1
		relative_position_id = SOV_transpolar_flights
		cost = 10

		available = {

		}
		
		search_filters = {FOCUS_FILTER_AIR_XP}

		completion_reward = {
			add_to_variable = { SOV_soviet_airforce_air_accidents_factor = -0.25 }
			add_to_variable = { SOV_soviet_airforce_air_ace_generation_chance_factor = 0.25 }
			add_to_variable = { SOV_soviet_airforce_air_weather_penalty = -0.1 }
			add_to_variable = { SOV_soviet_airforce_air_training_xp_gain_factor = 0.1 }
			custom_effect_tooltip = SOV_foster_flying_clubs_ns_tt

			air_experience = 25
		}
	}

	focus = {
		id = SOV_women_in_aviation

		icon = GFX_focus_SOV_women_in_aviation
		prerequisite = { focus = SOV_foster_flying_clubs }
		x = 1
		y = 1
		relative_position_id = SOV_foster_flying_clubs
		cost = 5

		available = {
		}
		
		search_filters = {FOCUS_FILTER_AIR_XP}

		completion_reward = {
			add_to_variable = { SOV_soviet_airforce_air_ace_generation_chance_factor = 0.25 }
			add_to_variable = { SOV_soviet_airforce_air_weather_penalty = -0.05 }
			add_to_variable = { SOV_soviet_airforce_air_mission_xp_gain_factor = 0.05 }
			add_to_variable = { SOV_soviet_airforce_air_training_xp_gain_factor = 0.05 }
			custom_effect_tooltip = SOV_women_in_aviation_ns_tt

			air_experience = 25
			set_rule = {
				can_generate_female_aces = yes
			}
		}
	}

	focus = {
		id = SOV_raskovas_aviation_group

		icon = GFX_goal_generic_CAS
		prerequisite = { focus = SOV_women_in_aviation }
		x = 1
		y = 1
		relative_position_id = SOV_women_in_aviation
		cost = 10

		available = {
		}
		
		search_filters = {FOCUS_FILTER_AIR_XP}

		completion_reward = {
			add_to_variable = { SOV_soviet_airforce_air_night_penalty = -0.2 }
			add_to_variable = { SOV_soviet_airforce_air_wing_xp_loss_when_killed_factor = -0.1 }
			set_variable = { SOV_soviet_airforce_air_strategic_bomber_night_penalty = -0.1 }
			custom_effect_tooltip = SOV_raskovas_aviation_group_ns_tt

			custom_effect_tooltip = SOV_night_witches_nsb_tt
			hidden_effect = {
				if = {
					limit = {
						has_dlc = "By Blood Alone"
					}
					create_equipment_variant = {
						name = "U-2" #
						type = small_plane_cas_airframe_0
						modules = {
							fixed_main_weapon_slot = bomb_locks
							fixed_auxiliary_weapon_slot_1 = empty
							engine_type_slot = engine_1_1x
							special_type_slot_1 = non_strategic_materials_small
						}
					}
					create_equipment_variant = {
						name = "Yak-1" #
						type = small_plane_airframe_1
						modules = {
							fixed_main_weapon_slot = aircraft_cannon_1_1x
							fixed_auxiliary_weapon_slot_1 = heavy_mg_2x
							engine_type_slot = engine_2_1x
							special_type_slot_1 = non_strategic_materials_small
						}
					}
					if = {
						limit = {
							NOT = { has_government = communism }
						}
						
						load_oob = "SOV_night_witches_nsb_alt_bba"
						else = {
							load_oob = "SOV_night_witches_nsb_bba" #nested here because otherwise it is considered a nested else for the higher level if
						}
					}
				}
				else_if = { #ALT IDEOLOGY
					limit = {
						NOT = { has_government = communism }
					}
					load_oob = "SOV_night_witches_nsb_alt"
				}
				else = { #DEFAULT COMMUNISM
					load_oob = "SOV_night_witches_nsb"
				}
			}
		}
	}

	focus = {
		id = SOV_intensify_pilot_training_program

		icon = GFX_goal_generic_air_doctrine
		prerequisite = { focus = SOV_foster_flying_clubs }
		x = 0
		y = 2
		relative_position_id = SOV_foster_flying_clubs
		cost = 10

		mutually_exclusive = { focus = SOV_increase_aircraft_production }

		available = {
			NOT = { has_country_flag = SOV_paranoia_system_active_flag }
		}
		
		search_filters = {FOCUS_FILTER_AIR_XP}

		completion_reward = {
			add_to_variable = { SOV_soviet_airforce_air_accidents_factor = -0.25 }
			add_to_variable = { SOV_soviet_airforce_air_ace_generation_chance_factor = 0.15 }
			add_to_variable = { SOV_soviet_airforce_air_night_penalty = -0.1 }
			add_to_variable = { SOV_soviet_airforce_air_weather_penalty = -0.15 }
			add_to_variable = { SOV_soviet_airforce_air_wing_xp_loss_when_killed_factor = -0.15 }
			add_to_variable = { SOV_soviet_airforce_air_fuel_consumption_factor = 0.1 }
			custom_effect_tooltip = SOV_intensify_pilot_training_program_ns_tt

			air_experience = 50
		}
	}

	focus = {
		id = SOV_expand_aviation_institutes

		icon = GFX_focus_generic_military_academy
		prerequisite = { focus = SOV_expand_the_aircraft_industry focus = SOV_foster_flying_clubs }
		x = 1
		y = 1
		relative_position_id = SOV_expand_the_aircraft_industry
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_AIR_XP}

		completion_reward = {
			add_to_variable = { SOV_soviet_airforce_air_accidents_factor = -0.25 }
			add_to_variable = { SOV_soviet_airforce_air_weather_penalty = -0.1 }
			add_to_variable = { SOV_soviet_airforce_air_training_xp_gain_factor = 0.05 }
			add_to_variable = { SOV_soviet_airforce_air_wing_xp_loss_when_killed_factor = -0.15 }
			custom_effect_tooltip = SOV_expand_aviation_institutes_ns_tt
			custom_effect_tooltip = SOV_modernize_aircraft_facilities_tt
			hidden_effect = {
				IF = {
					limit = { 
						260 = {
							is_fully_controlled_by = ROOT
							air_facility < 1
							land_facility < 1
							naval_facility < 1
							nuclear_facility < 1
						}
					}

					260 = {
						add_building_construction = {
							type = air_facility
							level = 1
							instant_build = yes
							province = 9448 # East of Voronezh
						}
					}
				}
			}
		}
	}

	focus = {
		id = SOV_ground_support

		icon = GFX_goal_generic_air_fighter
		prerequisite = { focus = SOV_increase_aircraft_production focus = SOV_intensify_pilot_training_program }
		x = 0
		y = 1
		relative_position_id = SOV_increase_aircraft_production
		cost = 10

		mutually_exclusive = { focus = SOV_long_range_aircraft }

		available = {

		}
		
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {
			add_to_variable = { SOV_soviet_airforce_air_cas_present_factor = 0.1 }
			custom_effect_tooltip = SOV_ground_support_ns_tt

			add_tech_bonus = {
				name = SOV_ground_support
				bonus = 0.75
				uses = 2
				category = light_fighter
				category = cas_bomber
			}
		}
	}

	focus = {
		id = SOV_long_range_aircraft

		icon = GFX_goal_generic_air_bomber
		prerequisite = { focus = SOV_increase_aircraft_production focus = SOV_intensify_pilot_training_program }
		x = 0
		y = 1
		relative_position_id = SOV_intensify_pilot_training_program
		cost = 10

		mutually_exclusive = { focus = SOV_ground_support }

		available = {

		}
		
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {
			add_to_variable = { SOV_soviet_airforce_strategic_bomb_visibility = -0.1 }
			custom_effect_tooltip = SOV_long_range_aircraft_ns_tt

			add_tech_bonus = {
				name = SOV_long_range_aircraft
				bonus = 0.75
				uses = 2
				category = cat_heavy_fighter
				category = tactical_bomber
				category = cat_strategic_bomber
			}
		}
	}

	focus = {
		id = SOV_the_modern_war_in_the_skies

		icon = GFX_goal_generic_CAS
		prerequisite = { focus = SOV_ground_support focus = SOV_long_range_aircraft }
		x = 1
		y = 1
		relative_position_id = SOV_ground_support
		cost = 10

		available = {

		}
		
		search_filters = {FOCUS_FILTER_AIR_XP}

		completion_reward = {
			add_to_variable = { SOV_soviet_airforce_air_night_penalty = -0.1 }
			add_to_variable = { SOV_soviet_airforce_air_mission_efficiency = 0.1 } 
			custom_effect_tooltip = SOV_the_modern_war_in_the_skies_ns_tt

			air_experience = 50

			add_breakthrough_progress = {
				specialization = specialization_air
				value = 0.5
			}
		}
	}




##     ## #### ##       #### ########    ###    ########  ##    ## 
###   ###  ##  ##        ##     ##      ## ##   ##     ##  ##  ##  
#### ####  ##  ##        ##     ##     ##   ##  ##     ##   ####   
## ### ##  ##  ##        ##     ##    ##     ## ########     ##    
##     ##  ##  ##        ##     ##    ######### ##   ##      ##    
##     ##  ##  ##        ##     ##    ##     ## ##    ##     ##    
##     ## #### ######## ####    ##    ##     ## ##     ##    ##    



	focus = {
		id = SOV_found_the_pcdi

		icon = GFX_goal_generic_defence
		x = 22
		y = 0
		relative_position_id = SOV_expand_the_red_fleet
		cost = 5

		completion_reward = {
			hidden_effect = {
				219 = {
				custom_effect_tooltip = SOV_defense_of_moscow_forts
				hidden_effect = {
					if = {
						limit = {
							ROOT = { controls_province = 3391 }
						}
						add_building_construction = {
							type = bunker
							level = 3
							province = 3391
							instant_build = yes
						}
					}
					if = {
						limit = {
							ROOT = { controls_province = 6414 }
						}
						add_building_construction = {
							type = bunker
							level = 3
							province = 6414
							instant_build = yes
						}
					}
					if = {
						limit = {
							ROOT = { controls_province = 9348 }
						}
						add_building_construction = {
							type = bunker
							level = 3
							province = 9348
							instant_build = yes
						}
					}
					if = {
						limit = {
							ROOT = { controls_province = 301 }
						}
						add_building_construction = {
							type = bunker
							level = 3
							province = 301
							instant_build = yes
						}
					}
					if = {
						limit = {
							ROOT = { controls_province = 9378 }
						}
						add_building_construction = {
							type = bunker
							level = 3
							province = 9378
							instant_build = yes
						}
					}
					if = {
						limit = {
							ROOT = { controls_province = 6283 }
						}
						add_building_construction = {
							type = bunker
							level = 3
							province = 6283
							instant_build = yes
						}
					}
					if = {
						limit = {
							ROOT = { controls_province = 3259 }
						}
						add_building_construction = {
							type = bunker
							level = 3
							province = 3259
							instant_build = yes
						}
					}
					if = {
						limit = {
							ROOT = { controls_province = 11282 }
						}
						add_building_construction = {
							type = bunker
							level = 3
							province = 11282
							instant_build = yes
						}
					}
					if = {
						limit = {
							ROOT = { controls_province = 6380 }
						}
						add_building_construction = {
							type = bunker
							level = 4
							province = 6380
							instant_build = yes
						}
					}				
				}
			}
				if = {
				limit = {
					has_full_control_of_state = 195 #LENINGRAD
				}
				195 = { #LENINGRAD
					add_building_construction = {
						type = anti_air_building
						level = 1
						instant_build = yes
					}
					add_building_construction = {
						type = bunker
						level = 3
						province = {
							id = 3151
							id = 6174
						}
						instant_build = yes
					}
					add_building_construction = {
						type = coastal_bunker
						level = 3
						province = {
							id = 3151
							id = 6174
						}
						instant_build = yes
					}
					add_dynamic_modifier = { modifier = SOV_krasnaya_gorka_battery scope = SOV }
				}
			}
			if = {
				limit = {
					has_full_control_of_state = 208 #LUGA
				}
				208 = { #LUGA
					add_building_construction = {
						type = anti_air_building
						level = 1
						instant_build = yes
					}
					add_building_construction = {
						type = bunker
						level = 3
						province = 9097
						instant_build = yes
					}
					add_building_construction = {
						type = coastal_bunker
						level = 3
						province = 9097
						instant_build = yes
					}
					add_dynamic_modifier = { modifier = SOV_seraya_loshad_battery scope = SOV }
				}
			}

			if = {
				limit = {
					has_full_control_of_state = 137 #CRIMEA
				}
				137 = { #CRIMEA
					add_building_construction = {
						type = anti_air_building
						level = 1
						instant_build = yes
					}
					add_building_construction = {
						type = bunker
						level = 3
						province = 3686
						instant_build = yes
					}
					add_building_construction = {
						type = coastal_bunker
						level = 3
						province = 3686
						instant_build = yes
					}
					add_dynamic_modifier = { modifier = SOV_armored_battery_35 scope = SOV }
				}
			}
			209 = {
				if = {
					limit = { is_fully_controlled_by = ROOT }
					add_building_construction = {
						type = bunker
						level = 6
						province = 415
						instant_build = yes
					}
				}
			}
			210 = {
				if = {
					limit = { is_fully_controlled_by = ROOT }
					add_building_construction = {
						type = bunker
						level = 4
						province = 3333
						instant_build = yes
					}
				}
			}
			207 = {
				if = {
					limit = { is_fully_controlled_by = ROOT }
					add_building_construction = {
						type = bunker
						level = 4
						province = 3219
						instant_build = yes
					}
					add_building_construction = {
						type = bunker
						level = 4
						province = 6371
						instant_build = yes
					}
					add_building_construction = {
						type = bunker
						level = 4
						province = 6220
						instant_build = yes
					}
				}
			}
			206 = {
				if = {
					limit = { is_fully_controlled_by = ROOT }
					add_building_construction = {
						type = bunker
						level = 4
						province = 11370
						instant_build = yes
					}
				}
			}
			202 = {
				if = {
					limit = { is_fully_controlled_by = ROOT }
					add_building_construction = {
						type = bunker
						level = 7
						province = 525
						instant_build = yes
					}
					add_building_construction = {
						type = bunker
						level = 7
						province = 3494
						instant_build = yes
					}
				}

			}
			203 = {
				if = {
					limit = { is_fully_controlled_by = ROOT }
					add_building_construction = {
						type = bunker
						level = 7
						province = 11409
						instant_build = yes
					}
				}
			}
			834 ={
				if = {
					limit = { is_fully_controlled_by = ROOT }
					add_building_construction = {
						type = bunker
						level = 5
						province = 754
						instant_build = yes
					}
					add_building_construction = {
						type = bunker
						level = 5
						province = 741
						instant_build = yes
					}
				}
			}
			192 = {
				if = {
					limit = { is_fully_controlled_by = ROOT }
					add_building_construction = {
						type = bunker
						level = 5
						province = 11670
						instant_build = yes
					}
				}
			}
				add_dynamic_modifier = { modifier = SOV_defense_industry_dynamic_modifier }
			}
			custom_effect_tooltip = SOV_found_the_pcdi_ns_tt
		}
	}

	focus = {
		id = SOV_pc_of_mechanical_engineering

		icon = GFX_goal_generic_production2
		prerequisite = { focus = SOV_found_the_pcdi }
		x = -3
		y = 1
		relative_position_id = SOV_found_the_pcdi
		cost = 10

		available = {
			has_full_control_of_state = 219 #MOSCOW
		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH}

		completion_reward = {
			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 }
			custom_effect_tooltip = SOV_pc_of_mechanical_engineering_ns_tt

			if = { #DEFAULT COMMIE
				limit = {
					has_government = communism
				}
				add_tech_bonus = {
					name = SOV_pc_of_mechanical_engineering_name_default
					bonus = 1
					uses = 2
					category = motorized_equipment
					category = infantry_weapons
				}
			}
			else = { #ALT IDEOLOGY
				add_tech_bonus = {
					name = SOV_pc_of_mechanical_engineering_name_alt
					bonus = 1
					uses = 2
					category = motorized_equipment
					category = infantry_weapons
				}
			}
			
			219 = {
				if = {
					limit = {
						free_building_slots = {
							building = arms_factory
							size > 0
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = arms_factory
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}

	focus = {
		id = SOV_superior_war_machines

		icon = GFX_focus_generic_tank_production
		prerequisite = { focus = SOV_pc_of_mechanical_engineering }
		x = -1
		y = 1
		relative_position_id = SOV_pc_of_mechanical_engineering
		cost = 10

		available = {
			if = {
				limit = {
					has_dlc = "No Step Back"
				}
				or = {
				has_tech = improved_medium_tank_chassis
				has_tech = improved_heavy_tank_chassis
				}
			}
			else = {
				has_tech = improved_medium_tank
			}
		}
		
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {
			set_variable = { SOV_defense_industry_tank_manufacturer_cost_factor = -0.25 }
			custom_effect_tooltip = SOV_superior_war_machines_ns_tt

			add_tech_bonus = {
				name = SOV_superior_war_machines
				bonus = 0.75
				uses = 2
				category = armor
			}
		}
	}

	focus = {
		id = SOV_the_means_to_wage_war

		icon = GFX_goal_generic_military_sphere
		prerequisite = { focus = SOV_pc_of_mechanical_engineering }
		x = 1
		y = 1
		relative_position_id = SOV_pc_of_mechanical_engineering
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {
			set_variable = { SOV_defense_industry_materiel_manufacturer_cost_factor = -0.25 }
			custom_effect_tooltip = SOV_the_means_to_wage_war_ns_tt

			add_tech_bonus = {
				name = SOV_the_means_to_wage_war
				bonus = 0.75
				uses = 2
				category = support_tech
			}
		}
	}

	focus = {
		id = SOV_soviet_artillery

		icon = GFX_goal_generic_army_artillery
		prerequisite = { focus = SOV_superior_war_machines }
		x = -1
		y = 1
		relative_position_id = SOV_superior_war_machines
		cost = 10

		available = {
		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH}

		completion_reward = {
			if = {
				limit = {
					has_government = communism
				}
				add_tech_bonus = {
					name = SOV_soviet_artillery_tech_bonus_name_default
					bonus = 0.75
					uses = 2
					ahead_reduction = 2
					category = artillery
				}
			}
			else  ={
				add_tech_bonus = {
					name = SOV_soviet_artillery_tech_bonus_name_alt
					bonus = 0.75
					uses = 2
					ahead_reduction = 2
					category = artillery
				}
			}

			custom_effect_tooltip = generic_skip_one_line_tt
			
			if = { # 2 Mils in Chelyabinsk
				limit = {
					has_full_control_of_state = 572
					572 = {
						free_building_slots = {
							building = arms_factory
							size > 0
							include_locked = yes
						}
					}
				}
				572 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = arms_factory
						level = 1
						instant_build = yes
					}
				}
			}
			else = { # If Chelyabinsk not available, then 1 Mil elsewhere
				random_owned_state = {
					limit = {
						is_fully_controlled_by = ROOT
						arms_factory > 1
						free_building_slots = {
							building = arms_factory
							size > 0
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = arms_factory
						level = 1
						instant_build = yes
					}
				}
			}

			custom_effect_tooltip = generic_skip_one_line_tt

			add_ideas = SOV_defense_industry_artillery_bonus

			custom_effect_tooltip = generic_skip_one_line_tt

			if = {
				limit = {
					has_dlc = "No Step Back"
				}
				#SU-85/100 tank template (AT)
				if = {
					limit = {
						has_tech = antitank5
					}
					create_equipment_variant = {
						name = "SU-100"
						type = medium_tank_destroyer_chassis_2
						parent_version = 0
						modules = {
							main_armament_slot = tank_high_velocity_cannon_3
							turret_type_slot = tank_medium_fixed_superstructure_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 = 10
							tank_nsb_armor_upgrade = 8
						}
						icon = "GFX_SOV_advanced_medium_td_medium"
					}
				}
				else_if = {
					limit = {
						has_tech = antitank2
					}
					create_equipment_variant = {
						name = "SU-100"
						type = medium_tank_destroyer_chassis_2
						parent_version = 0
						modules = {
							main_armament_slot = tank_high_velocity_cannon_2
							turret_type_slot = tank_medium_fixed_superstructure_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 = 10
							tank_nsb_armor_upgrade = 8
						}
						icon = "GFX_SOV_advanced_medium_td_medium"
					}
				}
				else_if = { #You really should invest some time in research AT...
					limit = {
						has_tech = interwar_antitank
					}
					create_equipment_variant = {
						name = "SU-85"
						type = medium_tank_destroyer_chassis_2
						parent_version = 0
						modules = {
							main_armament_slot = tank_high_velocity_cannon
							turret_type_slot = tank_medium_fixed_superstructure_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 = 10
							tank_nsb_armor_upgrade = 8
						}
						icon = "GFX_SOV_improved_medium_td_medium"
					}
				}
				else = { #This is just blasphemy
					create_equipment_variant = {
						name = "SU-85"
						type = medium_tank_destroyer_chassis_2
						parent_version = 0
						modules = {
							main_armament_slot = tank_heavy_cannon
							turret_type_slot = tank_medium_fixed_superstructure_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 = 10
							tank_nsb_armor_upgrade = 8
						}
						icon = "GFX_SOV_improved_medium_td_medium"
					}
				}

				#SU-122 tank template (SPG)
				if = {
					limit = {
						has_tech = artillery4
					}
					create_equipment_variant = {
						name = "SU-122"
						type = medium_tank_artillery_chassis_2
						parent_version = 0
						modules = {
							main_armament_slot = tank_heavy_howitzer
							turret_type_slot = tank_medium_fixed_superstructure_turret
							suspension_type_slot = tank_bogie_suspension
							armor_type_slot = tank_riveted_armor
							engine_type_slot = tank_diesel_engine
							special_type_slot_1 = sloped_armor
						}
						upgrades = {
							tank_nsb_engine_upgrade = 10
							tank_nsb_armor_upgrade = 8
						}
						icon = "GFX_SOV_improved_medium_art_medium"
					}
				}
				else_if = {
					limit = {
						has_tech = artillery1
					}
					create_equipment_variant = {
						name = "SU-122"
						type = medium_tank_artillery_chassis_2
						parent_version = 0
						modules = {
							main_armament_slot = tank_medium_howitzer_2
							turret_type_slot = tank_medium_fixed_superstructure_turret
							suspension_type_slot = tank_bogie_suspension
							armor_type_slot = tank_riveted_armor
							engine_type_slot = tank_diesel_engine
							special_type_slot_1 = sloped_armor
						}
						upgrades = {
							tank_nsb_engine_upgrade = 10
							tank_nsb_armor_upgrade = 8
						}
						icon = "GFX_SOV_improved_medium_art_medium"
					}
				}
				else = { #You really need some arty research
					create_equipment_variant = {
						name = "SU-122"
						type = medium_tank_artillery_chassis_2
						parent_version = 0
						modules = {
							main_armament_slot = tank_medium_howitzer
							turret_type_slot = tank_medium_fixed_superstructure_turret
							suspension_type_slot = tank_bogie_suspension
							armor_type_slot = tank_riveted_armor
							engine_type_slot = tank_diesel_engine
							special_type_slot_1 = sloped_armor
						}
						upgrades = {
							tank_nsb_engine_upgrade = 10
							tank_nsb_armor_upgrade = 8
						}
						icon = "GFX_SOV_improved_medium_art_medium"
					}
				}
			}
		}
	}

	focus = {
		id = SOV_pc_of_mortar_armament

		icon = GFX_goal_generic_occupy_start_war
		prerequisite = { focus = SOV_pc_of_mechanical_engineering }
		x = 0
		y = 2
		relative_position_id = SOV_pc_of_mechanical_engineering
		cost = 5

		available = {
			has_full_control_of_state = 219 #MOSCOW
		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH}

		completion_reward = {
			add_to_variable = { SOV_defense_industry_breakthrough_factor = 0.05 }
			add_to_variable = { SOV_defense_industry_army_artillery_defence_factor = 0.05 }
			custom_effect_tooltip = SOV_pc_of_mortar_armament_ns_tt

			if = { #DEFAULT COMMIE
				limit = {
					has_government = communism
				}
				add_tech_bonus = {
					name = SOV_pc_of_mortar_armament_name_default
					bonus = 0.75
					uses = 2
					category = artillery
				}
			}
			else = { #ALT IDEOLOGY
				add_tech_bonus = {
					name = SOV_pc_of_mortar_armament_name_alt
					bonus = 0.75
					uses = 2
					category = artillery
				}
			}

			219 = {
				if = {
					limit = {
						free_building_slots = {
							building = arms_factory
							size > 0
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = arms_factory
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}

	focus = {
		id = SOV_development_of_tankograd

		icon = GFX_goal_generic_army_tanks
		prerequisite = { focus = SOV_the_means_to_wage_war }
		x = 1
		y = 1
		relative_position_id = SOV_the_means_to_wage_war
		cost = 5

		available = {
			custom_trigger_tooltip = {
				tooltip = SOV_fyp_controlled_factories_tier_4_tt
				NOT = { num_of_controlled_factories < SOV_fyp_factory_requirement_tier_4 }
			}
			#TODO_Manu: This could require X num of factories to have been relocated
		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_ARMY_XP}

		completion_reward = {
			add_to_variable = { SOV_defense_industry_land_equipment_upgrade_xp_cost = -0.1 }
			custom_effect_tooltip = SOV_development_of_tankograd_ns_tt

			custom_effect_tooltip = SOV_development_of_tankograd_factories_tt
			#This is just for tooltip purposes
			effect_tooltip = {
				every_owned_state = {
					limit = {
						is_on_continent = asia
						arms_factory > 2
						free_building_slots = {
							building = arms_factory
							size > 1
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = arms_factory
						level = 1
						instant_build = yes
					}
				}
			}

			#Actual effects
			set_temp_variable = { temp_targets_index = 0 }
			while_loop_effect = {
				limit = {
					check_variable = { temp_targets_index = 10 compare = less_than }
				}
				hidden_effect = {
					random_owned_state = {
						limit = {
							is_on_continent = asia
							arms_factory > 2
							free_building_slots = {
								building = arms_factory
								size > 1
								include_locked = yes
							}
							NOT = { has_state_flag = SOV_development_of_tankograd_flag }
						}
						add_extra_state_shared_building_slots = 1
						add_building_construction = {
							type = arms_factory
							level = 1
							instant_build = yes
						}
						set_state_flag = SOV_development_of_tankograd_flag
						add_to_temp_variable = { SOV.temp_targets_index = 1 }
						#log = "Round [?SOV.temp_targets_index]"
					}
				}
			}
		}
	}

	focus = {
		id = SOV_merge_tank_and_materiel_plants

		icon = GFX_focus_SOV_merge_plants
		prerequisite = { focus = SOV_development_of_tankograd focus = SOV_pc_of_mortar_armament focus = SOV_soviet_artillery }

		x = 0
		y = 1
		relative_position_id = SOV_pc_of_mortar_armament
		cost = 5

		available = {
			NOT = { has_country_flag = SOV_paranoia_system_active_flag }
		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			if = {
				limit = {
					has_dlc = "Arms Against Tyranny"
				}
				#TANKS
				every_military_industrial_organization = {
					limit = {
						has_mio_trait = SOV_mio_trait_merge_plant_no_174 #All Tank MIOs have this trait
					}
					unlock_mio_trait_tooltip = SOV_mio_trait_merge_plant_no_174
					unlock_mio_trait_tooltip = SOV_mio_trait_merge_plant_no_112
					unlock_mio_trait_tooltip = SOV_mio_trait_merge_ural_heavy_machine_building_plant
				}

				custom_effect_tooltip = generic_skip_one_line_tt

				#MATERIEL
				every_military_industrial_organization = {
					limit = {
						has_mio_trait = SOV_mio_trait_merge_nkmz_plant #All Materiel MIOs have this trait
					}
					unlock_mio_trait_tooltip = SOV_mio_trait_merge_nkmz_plant
					unlock_mio_trait_tooltip = SOV_mio_trait_merge_magnitogorsk_metallurgical_plant
				}
				mio:SOV_grabin_design_bureau_organization = {
					unlock_mio_trait_tooltip = SOV_mio_trait_merge_plant_no_172
				}
				mio:SOV_tula_arms_plant_organization = {
					unlock_mio_trait_tooltip = SOV_mio_trait_merge_plant_no_622
				}
				mio:SOV_gaz_organization = {
					unlock_mio_trait_tooltip = SOV_mio_trait_merge_automobile_tool_plant
				}
			}
			else = {
				custom_effect_tooltip = SOV_merge_tank_and_materiel_plants_tt
			}
		}
	}

	focus = {
		id = SOV_strengthen_the_mobilization_plan
		icon = GFX_focus_SOV_mobilization_plan
		x = 6
		y = 0
		relative_position_id = SOV_found_the_pcdi
		cost = 10

		completion_reward = {
			army_experience = 300
			add_to_variable = { SOV_the_red_army_mobilization_speed = 0.15 }
			add_to_variable = { SOV_the_red_army_conscription_factor = 0.1 }
			custom_effect_tooltip = SOV_strengthen_the_mobilization_plan_ns_tt
		}
	}

	focus = {
		id = SOV_military_engineering_university
		icon = GFX_focus_generic_military_academy
		prerequisite = { focus = SOV_found_the_pcdi }
		prerequisite = { focus = SOV_strengthen_the_mobilization_plan }
		x = 1
		y = 2
		relative_position_id = SOV_found_the_pcdi
		cost = 5

		completion_reward = {
			add_to_variable = { SOV_defense_industry_production_speed_coastal_bunker_factor = 0.05 }
			add_to_variable = { SOV_defense_industry_production_speed_bunker_factor = 0.05 }
			add_to_variable = { SOV_defense_industry_max_dig_in_factor = 0.05 }
			custom_effect_tooltip = SOV_military_engineering_university_ns_tt
		}
	}

	focus = {
		id = SOV_leningrad_polytechnical_institute
		icon = GFX_focus_research
		#prerequisite = { focus = SOV_the_means_to_wage_war }
		prerequisite = { focus = SOV_military_engineering_university }
		x = 0
		y = 1
		relative_position_id = SOV_military_engineering_university
		cost = 5
		available = {

		}
		
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {
			add_research_slot = 1
		}
	}

	focus = {
		id = SOV_the_road_of_life
		icon = GFX_focus_SOV_the_road_of_life
		prerequisite = { focus = SOV_military_engineering_university }
		prerequisite = { focus = SOV_desperate_measures }
		x = 2
		y = 1
		relative_position_id = SOV_military_engineering_university
		cost = 3

		available = {
					208 = {
						NOT = { is_controlled_by = ROOT }
					}
					244 = {
						NOT = { is_controlled_by = ROOT }
					}
		}
		
		search_filters = {}

		completion_reward = {
			add_timed_idea = {
				idea = SOV_the_road_of_life_ns
				days = 730
			}
		}
	}

	

	
	
	

	focus = {
		id = SOV_cohesion_first
		icon = GFX_focus_secret_rearmament
		prerequisite = { focus = SOV_strengthen_the_mobilization_plan }
		x = -1
		y = 1
		relative_position_id = SOV_strengthen_the_mobilization_plan
		cost = 10
		available = {
		}
		
		search_filters = {}

		completion_reward = {
			add_to_variable = { SOV_the_red_army_army_org_factor = 0.05 }
			add_to_variable = { SOV_the_red_army_training_time_factor = 0.1 }
			custom_effect_tooltip = SOV_cohesion_first_ns_tt
		}
	}

	focus = {
		id = SOV_rehabilitated_military
		icon = GFX_goal_generic_small_arms
		prerequisite = { focus = SOV_strengthen_the_mobilization_plan}
		x = 1
		y = 1
		relative_position_id = SOV_strengthen_the_mobilization_plan
		cost = 10

		available = {
			NOT = { has_country_flag = SOV_paranoia_system_active_flag }
		}
		
		search_filters = {}

		completion_reward = {
			add_to_variable = { SOV_the_red_army_army_org_factor = 0.05 }
			custom_effect_tooltip = SOV_rehabilitated_military_ns_tt

			add_ideas = SOV_rehabilitated_military_ns
		}
	}

	focus = {
		id = SOV_military_reorganization
		icon = GFX_focus_generic_military_mission
		prerequisite = { focus = SOV_desperate_measures }
		x = 2
		y = 1
		relative_position_id = SOV_desperate_measures
		cost = 10

		select_effect = {
			add_ideas = SOV_military_reorganization_ns
		}

		
		
		search_filters = {FOCUS_FILTER_ARMY_XP}

		completion_reward = {
			effect_tooltip = {
				add_ideas = SOV_military_reorganization_ns
			}
			hidden_effect = {
				remove_ideas = SOV_military_reorganization_ns
			}
			remove_ideas = SOV_Disarganization
		}
	}

	focus = {
		id = SOV_desperate_measures
		icon = GFX_goal_generic_more_territorial_claims
		prerequisite = { focus = SOV_cohesion_first focus = SOV_rehabilitated_military }
		x = 0
		y = 2
		relative_position_id = SOV_strengthen_the_mobilization_plan
		cost = 10

		available = {
			any_enemy_country = {
				SOV_is_major_not_original_sov = yes
			}
		}
		
		search_filters = {}

		completion_reward = {
			add_timed_idea = {
				idea = SOV_desperate_measures_ns
				days = 365
			}
			army_experience = 50
			custom_effect_tooltip = SOV_desperate_measures_decisions_unlocked_tt
		    
			hidden_effect = {
				add_equipment_to_stockpile = {
					type = train_equipment
					amount = SOV_industrial_relocation_trains_focus
					producer = SOV
				}
			}

			custom_effect_tooltip = SOV_focus_complete_effect_tt
			unlock_decision_category_tooltip = SOV_industry_relocation
			206 = {
					remove_building = {
						type = industrial_complex
						level = 2
					}
			}
			192 = {
					remove_building = {
						type = industrial_complex
						level = 1
					}
			}
			199 = {
					remove_building = {
						type = industrial_complex
						level = 1
					}
			}

			571 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			570 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
			569 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = SOV_an_adaptable_army
		icon = GFX_focus_prc_infiltration
		prerequisite = { focus = SOV_keep_commissars_organization}
		prerequisite = { focus = SOV_experts_in_camouflage}
		x = 1
		y = 1
		relative_position_id = SOV_experts_in_camouflage
		cost = 5
		
		search_filters = {}

		completion_reward = {
			add_to_variable = { SOV_the_red_army_heat_attrition_factor = -0.1 }
			add_to_variable = { SOV_the_red_army_winter_attrition_factor = -0.1 }
			add_to_variable = { SOV_the_red_army_acclimatization_cold_climate_gain_factor = 0.15 }
			add_to_variable = { SOV_the_red_army_acclimatization_hot_climate_gain_factor = 0.15 }
			add_to_variable = { SOV_the_red_army_terrain_penalty_reduction = 0.05 }
			custom_effect_tooltip = SOV_an_adaptable_army_ns_tt
		}
	}

	focus = {
		id = SOV_lessons_of_war
		icon = GFX_goal_generic_military_sphere
		prerequisite = { focus = SOV_military_reorganization }
		x = 0
		y = 2
		relative_position_id = SOV_send_military_advisors_to_spain
		cost = 5

		available = {
			NOT = { has_idea = SOV_desperate_measures_ns }
		}
		
		search_filters = {FOCUS_FILTER_ARMY_XP}

		completion_reward = {
			set_variable = { SOV_the_red_army_experience_gain_army_factor = 0 }
			set_variable = { SOV_the_red_army_experience_loss_factor = 0 }

			custom_effect_tooltip = SOV_lessons_of_war_ns_tt

			custom_effect_tooltip = SOV_lessons_of_war_unlock_military_operations_tt

			hidden_effect = {
				every_army_leader = {
					limit = {
						has_trait = trait_SOV_cowed_by_stalin_army
					}
					remove_unit_leader_trait =  trait_SOV_cowed_by_stalin_army
				}
				every_navy_leader = {
					limit = {
						has_trait = trait_SOV_cowed_by_stalin_navy
					}
					remove_unit_leader_trait =  trait_SOV_cowed_by_stalin_navy
				}
			}
		}
	}

	focus = {
		id = SOV_penal_battalions
		icon = GFX_focus_SOV_penal_battalions
		prerequisite = { focus = SOV_barrier_troops }
		x = 0
		y = 1
		relative_position_id = SOV_barrier_troops
		cost = 5

		available = {
		}
		
		search_filters = {}

		completion_reward = {
			#Spawn Penal divisions
			custom_effect_tooltip = SOV_penal_battalions_spawn_tt
			hidden_effect = {
				division_template = {
					name = "Shtrafnaya Chast"
					division_names_group = SOV_PEN_01
					is_locked = yes

					regiments = {
						penal_battalion = { x = 0 y = 0 }
						penal_battalion = { x = 0 y = 1 }
						penal_battalion = { x = 0 y = 2 }
						penal_battalion = { x = 1 y = 0 }
						penal_battalion = { x = 1 y = 1 }
						penal_battalion = { x = 1 y = 2 }
						penal_battalion = { x = 2 y = 0 }
						penal_battalion = { x = 2 y = 1 }
						penal_battalion = { x = 2 y = 2 }
					}
					support = {
						artillery = { x = 0 y = 0 }
					}
				}

				SOV_spawn_penal_divisions_effect = yes
			}
		}
	}

	focus = {
		id = SOV_organization_of_the_partisans
		icon = GFX_focus_focus_fra_maquis
		prerequisite = { focus = SOV_military_reorganization }
		
		x = -1
		y = 1
		relative_position_id = SOV_military_reorganization
		cost = 5
		
		search_filters = {FOCUS_FILTER_PROPAGANDA}

		completion_reward = {
			add_to_variable = { SOV_the_red_army_operative_slot  = 1 }
			custom_effect_tooltip = SOV_organization_of_the_partisans_ns_tt

			if = {
				limit = {
					has_government = communism
				}
				show_unit_leaders_tooltip = SOV_vasily_korzh
				show_unit_leaders_tooltip = SOV_sidor_kovpak
			}

			if = {
				limit = {
					has_dlc = "La Resistance"
				}
				if = {
					limit = {
						has_government = communism
					}
					create_operative_leader = {
						name = SOV_dimitry_medvedev
						GFX = GFX_Portrait_dmitry_medvedev
						female = yes
						traits = { operative_demolition_expert operative_commando }
						bypass_recruitment = no
						available_to_spy_master = yes
						nationalities = { SOV }
					}
				}

				custom_effect_tooltip = generic_skip_one_line_tt

				add_timed_idea = {
					idea = SOV_central_headquarters_of_the_partisan_movement
					days = 720
				}
			}
			else = {
				add_timed_idea = {
					idea = SOV_central_headquarters_of_the_partisan_movement_no_lar
					days = 720
				}
			}

			if = {
				limit = {
					has_government = communism
				}
				custom_effect_tooltip = unlock_propaganda_campaign_tt
				unlock_decision_tooltip = SOV_propaganda_death_to_invaders
				custom_effect_tooltip = propaganda_campaign_requirement_tt
			}
		}
	}

	focus = {
		id = SOV_smersh
		icon = GFX_goal_generic_forceful_treaty
		prerequisite = { focus = SOV_nkvd_primacy}
		prerequisite = { focus = SOV_penal_battalions  }
		x = 1
		y = 1
		relative_position_id = SOV_penal_battalions
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_PROPAGANDA}

		completion_reward = {
			if = {
				limit = {
					has_dlc = "La Resistance"
				}
				add_ideas = SOV_smersh
			}
			else = {
				add_ideas = SOV_smersh_no_lar
			}

			if = {
				limit = {
					has_government = communism
				}
				custom_effect_tooltip = unlock_propaganda_campaign_tt
				if = {
					limit ={ has_dlc = "La Resistance" }
					unlock_decision_tooltip = SOV_propaganda_treacherous_enemy
				}
				custom_effect_tooltip = propaganda_campaign_requirement_tt
			}
		}
	}

	focus = {
		id = SOV_barrier_troops
		icon = GFX_focus_generic_manpower
		prerequisite = { focus = SOV_desperate_measures }
		x = 5
		y = 1
		relative_position_id = SOV_desperate_measures
		cost = 5

		available = {

		}
		
		search_filters = {}

		completion_reward = {
			add_to_variable = { SOV_the_red_army_army_org_regain = 0.1 }
			custom_effect_tooltip = SOV_barrier_troops_ns_tt
		}
	}

	focus = {
		id = SOV_experts_in_camouflage
		icon = GFX_goal_generic_position_armies
		prerequisite = { focus = SOV_organization_of_the_partisans }
		x = 0
		y = 1
		relative_position_id = SOV_organization_of_the_partisans
		cost = 5

		available = {

		}
		
		search_filters = {}

		completion_reward = {
			add_to_variable = { SOV_the_red_army_cas_damage_reduction = 0.05 }
			add_to_variable = { SOV_the_red_army_max_dig_in = 5 }
			add_to_variable = { SOV_the_red_army_dig_in_speed_factor = 0.05 }
			custom_effect_tooltip = SOV_experts_in_camouflage_ns_tt
		}
	}

	focus = {
		id = SOV_keep_commissars_organization
		icon = GFX_goal_generic_major_war
		prerequisite = { focus = SOV_penal_battalions }
		prerequisite = { focus = SOV_lessons_of_war }
		#prerequisite = { focus = SOV_organization_of_the_partisans }
		x = 0
		y = 1
		relative_position_id = SOV_lessons_of_war
		cost = 5

		available = {

		}

		bypass = {
			has_completed_focus = SOV_depoliticize_the_military
		}
		
		search_filters = {}

		completion_reward = {
			if = {
				limit = {
					has_idea = SOV_politicized_military
				}
				swap_ideas = {
					remove_idea = SOV_politicized_military
					add_idea = SOV_politicized_military_keep
				}
			}
			else_if = {
				limit = {
					has_idea = SOV_politicized_military_humanism
				}
				swap_ideas = {
					remove_idea = SOV_politicized_military_humanism
					add_idea = SOV_politicized_military_keep_humanism
				}
			}
		}
	}

	focus = {
		id = SOV_the_glory_of_the_red_army
		icon = GFX_focus_SOV_the_glory_of_the_red_army_communism
		#prerequisite = { focus = SOV_keep_commissars_organization }
		prerequisite = { focus = SOV_an_adaptable_army }
		x = -1
		y = 2
		relative_position_id = SOV_keep_commissars_organization
		cost = 10

		available = {
		}
		
		search_filters = {FOCUS_FILTER_ARMY_XP}

		completion_reward = {
			add_to_variable = { SOV_the_red_army_army_org_factor = 0.05 }
			add_to_variable = { SOV_the_red_army_army_defence_factor = 0.10 }
			add_to_variable = { SOV_the_red_army_army_attack_factor = 0.10 }
			add_to_variable = { SOV_the_red_army_special_forces_cap = 0.1 }
			add_to_variable = { SOV_the_red_army_land_doctrine_cost_factor = -0.1 }
			custom_effect_tooltip = SOV_the_glory_of_the_red_army_ns_tt

			show_unit_leaders_tooltip = SOV_pavel_rybalko

			#New
			hidden_effect = {
				set_technology = { masterful_blitz = 1 popup = no }
			}
			add_breakthrough_progress = {
				specialization = specialization_land
				value = 0.25
			}
			custom_effect_tooltip = SOV_the_glory_of_the_red_army_masterful_blitz_tactic_tt
		}
	}




########   #######  ##       #### ######## ####  ######     ###    ##       
##     ## ##     ## ##        ##     ##     ##  ##    ##   ## ##   ##       
##     ## ##     ## ##        ##     ##     ##  ##        ##   ##  ##       
########  ##     ## ##        ##     ##     ##  ##       ##     ## ##       
##        ##     ## ##        ##     ##     ##  ##       ######### ##       
##        ##     ## ##        ##     ##     ##  ##    ## ##     ## ##       
##         #######  ######## ####    ##    ####  ######  ##     ## ######## 



	

	focus = {
		id = SOV_the_centre
		icon = GFX_focus_fra_loyalty_stalin
		x = 37
		y = 0
		cost = 5
		available = {

		}
		
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_SOV_POLITICAL_PARANOIA FOCUS_FILTER_STABILITY}

		completion_reward = {
			hidden_effect = {
				231 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				821 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				229 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				236 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				217 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				237 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				265 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				829 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				401 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				406 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				407 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				260 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				258 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				257 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				239 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				231 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				255 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				254 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				219 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				252 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				253 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				248 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				247 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				264 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				195 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				251 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				232 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				551 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				883 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				886 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				271 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				549 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				660 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				718 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				275 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				904 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				264 = {
				add_building_construction = {
					type = air_base
					level = 10
					instant_build = yes
				}
				}
				add_dynamic_modifier = { modifier = SOV_the_politburo_good_dynamic_modifier }
			}
			custom_effect_tooltip = SOV_the_centre_ns_tt

			add_political_power = 25
			add_stability = 0.05

			SOV_paranoia_low_decrease_effect = yes
			
		}
	}

	focus = {
		id = SOV_socialism_in_one_country
		icon = GFX_focus_SOV_socialism_in_one_country
		prerequisite = { focus = SOV_the_centre }
		x = -1
		y = 1
		relative_position_id = SOV_the_centre
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_SOV_POLITICAL_PARANOIA}

		completion_reward = {
			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 } 
			custom_effect_tooltip = SOV_socialism_in_one_country_ns_tt

			add_political_power = 25

			SOV_paranoia_low_decrease_effect = yes
		}
	}

	focus = {
		id = SOV_the_stalin_constitution
		icon = GFX_goal_support_communism
		prerequisite = { focus = SOV_the_centre }
		x = 1
		y = 1
		relative_position_id = SOV_the_centre
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_SOV_POLITICAL_PARANOIA FOCUS_FILTER_STABILITY}

		completion_reward = {
			add_to_variable = { SOV_the_politburo_political_power_factor = 0.05 }
			add_to_variable = { SOV_the_politburo_drift_defence_factor = 0.05 } 
			custom_effect_tooltip = SOV_the_stalin_constitution_ns_tt

			add_political_power = 50
			add_stability = 0.05

			SOV_paranoia_low_decrease_effect = yes
		}
	}

	focus = {
		id = SOV_the_zinovyevite_terrorist_center
		icon = GFX_focus_SOV_purge_zinovyevists
		prerequisite = { focus = SOV_the_stalin_constitution }
		x = 0
		y = 1
		relative_position_id = SOV_the_stalin_constitution
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_SOV_POLITICAL_PARANOIA}

		select_effect = {
			set_country_flag = SOV_paranoia_do_not_cancel_focus_flag #This focus cannot be canceled
		}

		completion_reward = {
			clr_country_flag = SOV_paranoia_do_not_cancel_focus_flag
			set_country_flag = { flag = SOV_paranoia_random_purge_cooldown_from_focus_flag days = 15 } #Used to prevent random purges from popping up while this is active
			set_country_flag = SOV_first_moscow_trial_flag #Used to unlock the next purge focus

			add_political_power = 25

			SOV_paranoia_high_increase_effect = yes
			
			#HISTORICAL
			#Zinovyev
			if = {
				limit = {
					has_character = SOV_grigory_zinovyev
				}
				SOV_grigory_zinovyev = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}
			#Kamenev
			if = {
				limit = {
					has_character = SOV_lev_kamenev
				}
				SOV_lev_kamenev = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}
			#Smirnov
			if = {
				limit = {
					has_character = SOV_ivan_smirnov
				}
				SOV_ivan_smirnov = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}

			#NOT-SO-HISTORICAL
			#Sokolnikov
			if = {
				limit = {
					has_character = SOV_grigory_sokolnikov
				}
				SOV_grigory_sokolnikov = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}
			#Shlyapnikov
			if = {
				limit = {
					has_character = SOV_aleksandr_shlyapnikov
				}
				SOV_aleksandr_shlyapnikov = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}
			
			custom_effect_tooltip = SOV_will_trigger_a_great_purge_tt
			hidden_effect = {
				set_country_flag = SOV_purge_event_unavoidable_flag #No way to avoid this purge. This people are about to be purged and there's nothing you can do for them.
				SOV_trigger_great_purge_moscow_trial_effect = yes #FIRST MOSCOW TRIAL -> Zinovyev & friends
			}
			custom_effect_tooltip = SOV_trigger_first_moscow_trial_tt
		}
	}

	focus = {
		id = SOV_secure_the_administration
		icon = GFX_focus_generic_join_comintern
		prerequisite = { focus = SOV_socialism_in_one_country }
		x = 0
		y = 1
		relative_position_id = SOV_socialism_in_one_country
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_SOV_POLITICAL_PARANOIA}

		completion_reward = {
			add_to_variable = { SOV_the_politburo_economy_cost_factor = -0.2 }
			add_to_variable = { SOV_the_politburo_trade_laws_cost_factor = -0.2 }
			add_to_variable = { SOV_the_politburo_mobilization_laws_cost_factor = -0.2 }
			custom_effect_tooltip = SOV_secure_the_administration_ns_tt

			add_political_power = 50

			SOV_paranoia_medium_decrease_effect = yes
		}
	}

	focus = {
		id = SOV_the_collectivization_process
		icon = GFX_focus_prc_agrarian_socialism
		prerequisite = { focus = SOV_secure_the_administration }
		x = 0
		y = 3
		relative_position_id = SOV_socialism_in_one_country
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_SOV_POLITICAL_PARANOIA}

		completion_reward = {
			add_to_variable = { SOV_the_politburo_good_consumer_goods_factor = -0.02 }
			add_to_variable = { SOV_the_politburo_production_speed_buildings_factor = 0.05 } 
			add_to_variable = { SOV_the_politburo_global_building_slots_factor = 0.1 } 
			custom_effect_tooltip = SOV_the_collectivization_process_ns_tt

			add_stability = -0.05
			add_war_support = -0.05

			if = { #Target a rural state with no civs
				limit = {
					any_owned_state = {
						OR = {
							has_state_category = town #Developed Rural Region
							has_state_category = rural #Rural Region
						}
						is_fully_controlled_by = ROOT
						industrial_complex < 1
						arms_factory < 1
						dockyard < 1
						free_building_slots = {
							building = industrial_complex
							size > 1
							include_locked = yes
						}
					}
				}
				random_owned_state = {
					limit = {
						OR = {
							has_state_category = town #Developed Rural Region
							has_state_category = rural #Rural Region
						}
						is_fully_controlled_by = ROOT
						industrial_complex < 1
						arms_factory < 1
						dockyard < 1
						free_building_slots = {
							building = industrial_complex
							size > 1
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 2
					add_building_construction = {
						type = industrial_complex
						level = 2
						instant_build = yes
					}
				}
			}
			else_if = { #Failsafe 1: Target a random rural state
				limit = {
					any_owned_state = {
						OR = {
							has_state_category = town #Developed Rural Region
							has_state_category = rural #Rural Region
						}
						is_fully_controlled_by = ROOT
						free_building_slots = {
							building = industrial_complex
							size > 1
							include_locked = yes
						}
					}
				}
				random_owned_state = {
					limit = {
						OR = {
							has_state_category = town #Developed Rural Region
							has_state_category = rural #Rural Region
						}
						is_fully_controlled_by = ROOT
						free_building_slots = {
							building = industrial_complex
							size > 1
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 2
					add_building_construction = {
						type = industrial_complex
						level = 2
						instant_build = yes
					}
				}
			}
			else_if = { #Failsafe 2: Target a random state
				limit = {
					any_owned_state = {
						is_fully_controlled_by = ROOT
						free_building_slots = {
							building = industrial_complex
							size > 1
							include_locked = yes
						}
					}
				}
				random_owned_state = {
					limit = {
						is_fully_controlled_by = ROOT
						free_building_slots = {
							building = industrial_complex
							size > 1
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 2
					add_building_construction = {
						type = industrial_complex
						level = 2
						instant_build = yes
					}
				}
			}

			SOV_paranoia_medium_decrease_effect = yes
		}
	}

	focus = {
		id = SOV_the_anti_soviet_trotskyist_center
		icon = GFX_focus_SOV_purge_trotskyists
		prerequisite = { focus = SOV_the_zinovyevite_terrorist_center }
		x = 0
		y = 1
		relative_position_id = SOV_the_zinovyevite_terrorist_center
		cost = 5

		available = {
			has_country_flag = {
				flag = SOV_first_moscow_trial_flag
				days > 175
			}
			custom_trigger_tooltip = {
				tooltip = SOV_last_purge_focus_days_tt
				has_country_flag = {
					flag = SOV_first_moscow_trial_flag
					days > 175
				}
			}
		}
		
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_SOV_POLITICAL_PARANOIA}

		select_effect = {
			set_country_flag = SOV_paranoia_do_not_cancel_focus_flag #This focus cannot be canceled
		}

		completion_reward = {
			clr_country_flag = SOV_paranoia_do_not_cancel_focus_flag
			set_country_flag = { flag = SOV_paranoia_random_purge_cooldown_from_focus_flag days = 15 } #Used to prevent random purges from popping up while this is active
			set_country_flag = SOV_second_moscow_trial_flag #Used to unlock the next purge focus

			add_political_power = 25

			SOV_paranoia_high_increase_effect = yes

			#HISTORICAL
			#Radek
			if = {
				limit = {
					has_character = SOV_karl_radek
				}
				SOV_karl_radek = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}
			#NOT-SO-HISTORICAL
			#Smilga
			if = {
				limit = {
					has_character = SOV_ivar_smilga
				}
				SOV_ivar_smilga = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}
			#Preobrazhensky
			if = {
				limit = {
					has_character = SOV_yevgeny_preobrazhensky
				}
				SOV_yevgeny_preobrazhensky = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}
			#Ryutin
			if = {
				limit = {
					has_character = SOV_martemyan_ryutin
				}
				SOV_martemyan_ryutin = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}
			#Ustryalov
			if = {
				limit = {
					has_dlc = "No Step Back"
				}
				if = {
					limit = {
						has_character = SOV_nikolay_ustryalov
					}
					SOV_nikolay_ustryalov = {
						set_character_flag = SOV_targeted_for_purge_flag
					}
				}
				else = {
					SOV_add_random_character_to_purge_targets_effect = yes
				}
			}

			custom_effect_tooltip = SOV_will_trigger_a_great_purge_tt
			hidden_effect = {
				set_country_flag = SOV_purge_event_unavoidable_flag #No way to avoid this purge. This people are about to be purged and there's nothing you can do for them.
				SOV_trigger_great_purge_moscow_trial_effect = yes #SECOND MOSCOW TRIAL -> Left Opposition
			}
			custom_effect_tooltip = SOV_trigger_second_moscow_trial_tt

			hidden_effect = {
				swap_ruler_traits = {
					remove = stalin_political_paranoia
					add = stalin_political_paranoia_advanced
				}
				add_to_variable = { SOV_paranoia_weekly_modifiers_amount = 1 }
				SOV_paranoia_modifier_update_gui_tooltip = yes
			}		
			custom_effect_tooltip = SOV_increase_weekly_paranoia_in_trait_tt
		}
	}

	focus = {
		id = SOV_the_workers_dictatorship
		icon = GFX_focus_spr_masters_of_our_own_fate
		prerequisite = { focus = SOV_the_anti_soviet_trotskyist_center }
		x = 0
		y = 1
		relative_position_id = SOV_the_anti_soviet_trotskyist_center
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_SOV_POLITICAL_PARANOIA}

		completion_reward = {
			add_to_variable = { SOV_the_politburo_political_power_factor = 0.05 }
			add_to_variable = { SOV_the_politburo_max_surrender_limit_offset = 0.25 }
			custom_effect_tooltip = SOV_the_workers_dictatorship_ns_tt

			add_political_power = 50

			SOV_paranoia_low_decrease_effect = yes
		}
	}

	focus = {
		id = SOV_organization_centralization_discipline
		icon = GFX_focus_SOV_organization_centralization_discipline
		prerequisite = { focus = SOV_the_collectivization_process }
		prerequisite = { focus = SOV_the_workers_dictatorship }
		x = -2
		y = 1
		relative_position_id = SOV_the_workers_dictatorship
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_SOV_POLITICAL_PARANOIA}

		completion_reward = {
			add_to_variable = { SOV_the_politburo_max_command_power = 20 }
			add_to_variable = { SOV_the_politburo_mobilization_speed = 0.05 }
			custom_effect_tooltip = SOV_organization_centralization_discipline_ns_tt

			add_political_power = 50

			SOV_paranoia_medium_decrease_effect = yes
		}
	}

	focus = {
		id = SOV_war_economy
		icon = GFX_goal_generic_trade
		prerequisite = { focus = SOV_desperate_measures }
		x = -1
		y = 1
		relative_position_id = SOV_desperate_measures
		cost = 5

		completion_reward = {
			
				582 = {
					add_extra_state_shared_building_slots = 3
					add_building_construction = {
						type = arms_factory
						level = 3
						instant_build = yes
					}
				}
				573 = {
					add_extra_state_shared_building_slots = 3
					add_building_construction = {
						type = arms_factory
						level = 3
						instant_build = yes
					}
				}
				651 = {
					add_extra_state_shared_building_slots = 3
					add_building_construction = {
						type = arms_factory
						level = 3
						instant_build = yes
					}
				}
				572 = {
					add_extra_state_shared_building_slots = 3
					add_building_construction = {
						type = arms_factory
						level = 3
						instant_build = yes
					}
				}
				398 = {
					add_extra_state_shared_building_slots = 3
					add_building_construction = {
						type = arms_factory
						level = 3
						instant_build = yes
					}
				}
				add_ideas = tot_economic_mobilisation
				custom_effect_tooltip = generic_skip_one_line_tt
				unlock_decision_tooltip = {
					decision = women_in_the_workforce
					show_effect_tooltip = yes # default is no
					show_modifiers = yes # default is no
				} 
				activate_decision = women_in_the_workforce
			    
		}
	}

	focus = {
		id = SOV_the_military_conspiracy
		icon = GFX_focus_SOV_military_purge
		prerequisite = { focus = SOV_the_workers_dictatorship }
		x = 0
		y = 2
		relative_position_id = SOV_the_anti_soviet_trotskyist_center
		cost = 5

		available = {
			has_country_flag = {
				flag = SOV_second_moscow_trial_flag
				days > 175
			}
			custom_trigger_tooltip = {
				tooltip = SOV_last_purge_focus_days_military_tt
				has_country_flag = {
					flag = SOV_second_moscow_trial_flag
					days > 175
				}
			}
		}
		
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_SOV_POLITICAL_PARANOIA}

		select_effect = {
			set_country_flag = SOV_paranoia_do_not_cancel_focus_flag #This focus cannot be canceled
		}

		completion_reward = {
			clr_country_flag = SOV_paranoia_do_not_cancel_focus_flag
			set_country_flag = { flag = SOV_paranoia_random_purge_cooldown_from_focus_flag days = 15 } #Used to prevent random purges from popping up while this is active
			set_country_flag = SOV_trial_of_the_generals_flag #Used to unlock the next purge focus

			add_political_power = 25

			SOV_paranoia_high_increase_effect = yes

			#Historical
			if = {
				limit = {
					has_character = SOV_mikhail_tukhachevsky
				}
				SOV_mikhail_tukhachevsky = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}
			#NOT-SO-HISTORICAL
			#Yegorov
			if = {
				limit = {
					has_character = SOV_aleksandr_yegorov
				}
				SOV_aleksandr_yegorov = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}
			#Blyukher
			if = {
				limit = {
					has_character = SOV_vasily_blyukher
				}
				SOV_vasily_blyukher = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}
			#Primakov
			if = {
				limit = {
					has_character = SOV_vitaly_primakov
				}
				SOV_vitaly_primakov = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}			

			custom_effect_tooltip = SOV_will_trigger_a_great_purge_tt
			hidden_effect = {
				set_country_flag = SOV_purge_event_unavoidable_flag #No way to avoid this purge. This people are about to be purged and there's nothing you can do for them.
				SOV_great_purge_army_trial_of_the_generals_effect = yes #TRIAL OF THE GENERALS -> Tukhachevsky
			}

			set_country_flag = SOV_stalinist_military_flag #New Generals have more chances of being Stalinists after this
		}
	}

	focus = {
		id = SOV_the_bloc_of_rights_and_trotskyites
		icon = GFX_focus_SOV_purge_bukharinists
		prerequisite = { focus = SOV_the_military_conspiracy }
		x = 0
		y = 1
		relative_position_id = SOV_the_military_conspiracy
		cost = 5

		available = {
			has_country_flag = {
				flag = SOV_trial_of_the_generals_flag
				days > 175
			}
			custom_trigger_tooltip = {
				tooltip = SOV_last_purge_focus_days_rights_tt
				has_country_flag = {
					flag = SOV_trial_of_the_generals_flag
					days > 175
				}
			}
		}
		
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_SOV_POLITICAL_PARANOIA}

		select_effect = {
			set_country_flag = SOV_paranoia_do_not_cancel_focus_flag #This focus cannot be canceled
		}

		completion_reward = {
			clr_country_flag = SOV_paranoia_do_not_cancel_focus_flag
			set_country_flag = { flag = SOV_paranoia_random_purge_cooldown_from_focus_flag days = 15 } #Used to prevent random purges from popping up while this is active
			set_country_flag = SOV_third_moscow_trial_flag #Used to unlock the next purge focus

			add_political_power = 25

			#HISTORICAL
			#Bukharin
			if = {
				limit = {
					has_character = SOV_nikolay_bukharin
				}
				SOV_nikolay_bukharin = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}
			#Rykov
			if = {
				limit = {
					has_character = SOV_aleksey_rykov
				}
				SOV_aleksey_rykov = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}
			#NOT-SO-HISTORICAL
			#Tomsky
			if = {
				limit = {
					has_character = SOV_mikhail_tomsky
				}
				SOV_mikhail_tomsky = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}
			#Litvinov
			if = {
				limit = {
					has_character = SOV_maksim_litvinov
				}
				SOV_maksim_litvinov = {
					set_character_flag = SOV_targeted_for_purge_flag
				}
			}
			else = {
				SOV_add_random_character_to_purge_targets_effect = yes
			}

			custom_effect_tooltip = SOV_will_trigger_a_great_purge_tt
			hidden_effect = {
				set_country_flag = SOV_purge_event_unavoidable_flag #No way to avoid this purge. This people are about to be purged and there's nothing you can do for them.
				SOV_trigger_great_purge_moscow_trial_effect = yes #THIRD MOSCOW TRIAL -> Right Opposition
			}
			custom_effect_tooltip = SOV_trigger_third_moscow_trial_tt

			SOV_remove_paranoia_effect = yes #REMOVE PARANOIA SYSTEM
		}
	}

	focus = {
		id = SOV_behead_the_snake
		icon = GFX_focus_SOV_behead_the_snake
		prerequisite = { focus = SOV_the_military_conspiracy }
		x = -2
		y = 1
		relative_position_id = SOV_the_military_conspiracy
		cost = 5

		available = {
			has_government = communism
		}
		
		search_filters = {FOCUS_FILTER_SOV_POLITICAL_PARANOIA}

		completion_reward = {
			if = {
				limit = {
					has_dlc = "La Resistance"
				}
				custom_effect_tooltip = SOV_behead_the_snake_no_lar1_tt
				create_operative_leader = {
					name = "Ramón Mercader"
					GFX = GFX_portrait_SOV_ramon_mercader
					traits = { operative_tough operative_infiltrator }
					bypass_recruitment = no
					available_to_spy_master = yes
					nationalities = { SOV MEX NOR USA }
				}

				#Extra operative slot
				set_variable = { SOV_the_politburo_operative_slot = 1 }
				custom_effect_tooltip = SOV_behead_the_snake_ns_tt
			}
			else = {
				custom_effect_tooltip = SOV_behead_the_snake_no_lar1_tt
			}
			swap_ideas = {
			remove_idea = trotskyite_plot_nsb
			add_idea = trotskyite_plot_purged
		}
		}
	}

	focus = {
		id = SOV_stalins_cult_of_personality
		icon = GFX_focus_SOV_stalins_cult_of_personality
		prerequisite = { focus = SOV_the_bloc_of_rights_and_trotskyites }
		x = 0
		y = 1
		relative_position_id = SOV_the_bloc_of_rights_and_trotskyites
		cost = 5

		available = {
			has_country_flag = {
				flag = SOV_third_moscow_trial_flag
				days > 175
			}
			custom_trigger_tooltip = {
				tooltip = SOV_last_purge_focus_days_cult_tt
				has_country_flag = {
					flag = SOV_third_moscow_trial_flag
					days > 175
				}
			}
			has_completed_focus = SOV_expand_the_agitprop
			has_country_leader = {
				character = SOV_iosif_stalin
				ruling_only = yes
			}
		}
		
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_PROPAGANDA}

		completion_reward = {
			add_political_power = 25

			custom_effect_tooltip = unlock_propaganda_campaign_tt
			unlock_decision_tooltip = SOV_propaganda_stalin
			custom_effect_tooltip = propaganda_campaign_requirement_tt
		}
	}

	

	focus = {
		id = SOV_inheritor_of_the_mantle_of_lenin
		icon = GFX_focus_generic_support_the_left_right
		prerequisite = { focus = SOV_stalins_cult_of_personality }
		x = -1
		y = 1
		relative_position_id = SOV_stalins_cult_of_personality
		cost = 5

		available = {
			custom_trigger_tooltip = {
				tooltip = SOV_propaganda_campaigns_taken_5_or_greater_tt
				check_variable = { SOV_propaganda_campaigns_taken = 5 compare = greater_than_or_equals }
			}
		}
		
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT}

		completion_reward = {
			add_war_support = 0.05
			add_country_leader_trait = stalin_inheritor_of_lenin
		}
	}

	focus = {
		id = SOV_brilliant_genius
		icon = GFX_focus_generic_socialist_science
		prerequisite = { focus = SOV_stalins_cult_of_personality }
		x = 1
		y = 1
		relative_position_id = SOV_stalins_cult_of_personality
		cost = 5
		
		available = {
			custom_trigger_tooltip = {
				tooltip = SOV_propaganda_campaigns_taken_10_or_greater_tt
				check_variable = { SOV_propaganda_campaigns_taken = 10 compare = greater_than_or_equals }
			}
		}
		
		search_filters = {FOCUS_FILTER_RESEARCH}

		completion_reward = {
			#Academies of Sciences decisions are 50% cheaper
			divide_variable = { SOV_national_academy_of_sciences_construction_cost = 2 }
			custom_effect_tooltip = SOV_brilliant_genius_academies_of_sciences_tt

			if = {
				limit = {
					has_completed_focus = SOV_leader_of_the_party_and_the_people
				}
				swap_ruler_traits = {
					remove = stalin_inheritor_of_lenin_leader
					add = stalin_inheritor_of_lenin_final
				}
			}
			else = {
				swap_ruler_traits = {
					remove = stalin_inheritor_of_lenin
					add = stalin_inheritor_of_lenin_genius
				}
			}
		}
	}


	focus = {
		id = SOV_great_commander
		icon = GFX_focus_generic_military_dictatorship
		prerequisite = { focus = SOV_inheritor_of_the_mantle_of_lenin }
		prerequisite = { focus = SOV_brilliant_genius }
		x = -1
		y = 1
		relative_position_id = SOV_brilliant_genius
		cost = 5
		
		available = {
			custom_trigger_tooltip = {
				tooltip = SOV_propaganda_campaigns_taken_15_or_greater_tt
				check_variable = { SOV_propaganda_campaigns_taken = 15 compare = greater_than_or_equals }
			}
		}
		
		search_filters = {FOCUS_FILTER_WAR_SUPPORT}

		completion_reward = {
			add_country_leader_trait = stalin_great_commander
			add_field_marshal_role = {
				character = "SOV_iosif_stalin"
				traits={ old_guard politically_connected media_personality harsh_leader }
				skill=3
				attack_skill=1
				defense_skill=3
				planning_skill=3
				logistics_skill=3
				legacy_id=0
			}
		}
	}

	

	focus = {
		id = SOV_father_of_nations
		icon = GFX_focus_SOV_father_of_nations
		prerequisite = { focus = SOV_great_commander }
		x = 0
		y = 1
		relative_position_id = SOV_great_commander
		cost = 5

		available = {
			custom_trigger_tooltip = {
				tooltip = SOV_propaganda_campaigns_taken_20_or_greater_tt
				check_variable = { SOV_propaganda_campaigns_taken = 20 compare = greater_than_or_equals }
			}
		}
		
		search_filters = {FOCUS_FILTER_MANPOWER FOCUS_FILTER_STABILITY}

		completion_reward = {
			swap_ruler_traits = {
				remove = stalin_heart_of_steel
				add = stalin_father_of_nations
			}
			hidden_effect = {
				play_song = "comintern_war_1"
			}
		}
	}

	focus = {
		id = SOV_freedom_of_debate_unity_of_action
		icon = GFX_focus_YUG_pan_slavic_congress
		prerequisite = { focus = SOV_addressing_internal_affairs }
		x = -2
		y = 1
		relative_position_id = SOV_addressing_internal_affairs
		cost = 5

		available = {
		}
		
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_STABILITY}

		completion_reward = {
			add_to_variable = { SOV_the_politburo_political_power_factor = 0.05 }
			add_to_variable = { SOV_the_politburo_political_advisor_cost_factor = -0.15 }
			custom_effect_tooltip = SOV_freedom_of_debate_unity_of_action_ns_tt

			add_political_power = 50
			add_stability = 0.05
			add_war_support = 0.05
		}
	}

	
	


######################################################################################################################################

#### ##    ## ######## ######## ########  ##    ##    ###    ##             ###    ######## ########    ###    #### ########   ######  
 ##  ###   ##    ##    ##       ##     ## ###   ##   ## ##   ##            ## ##   ##       ##         ## ##    ##  ##     ## ##    ## 
 ##  ####  ##    ##    ##       ##     ## ####  ##  ##   ##  ##           ##   ##  ##       ##        ##   ##   ##  ##     ## ##       
 ##  ## ## ##    ##    ######   ########  ## ## ## ##     ## ##          ##     ## ######   ######   ##     ##  ##  ########   ######  
 ##  ##  ####    ##    ##       ##   ##   ##  #### ######### ##          ######### ##       ##       #########  ##  ##   ##         ## 
 ##  ##   ###    ##    ##       ##    ##  ##   ### ##     ## ##          ##     ## ##       ##       ##     ##  ##  ##    ##  ##    ## 
#### ##    ##    ##    ######## ##     ## ##    ## ##     ## ########    ##     ## ##       ##       ##     ## #### ##     ##  ######  
	


	focus = {
		id = SOV_addressing_internal_affairs
		icon = GFX_focus_generic_self_management
		prerequisite = { focus = SOV_the_centre }
		x = 5
		y = 1
		

		relative_position_id = SOV_the_centre
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY}

		completion_reward = {
			add_political_power = 50
			add_stability = 0.1
		}
	}

	focus = {
		id = SOV_nkvd_primacy
		icon = GFX_goal_generic_military_deal
		prerequisite = { focus = SOV_socialism_in_one_country }
		x = -1
		y = 2
		relative_position_id = SOV_socialism_in_one_country
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_SOV_POLITICAL_PARANOIA}

		completion_reward = {
			add_ideas = SOV_nkvd_nsb
			SOV_paranoia_medium_increase_effect = yes
		}
	}

	focus = {
		id = SOV_the_new_soviet_woman
		icon = GFX_goal_support_communism
		prerequisite = { focus = SOV_addressing_internal_affairs }
		x = 2
		y = 1
		relative_position_id = SOV_addressing_internal_affairs
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY}

		completion_reward = {
			add_political_power = 70
			add_stability = 0.1
			add_popularity = {
				ideology = communism
				popularity = 0.1
			}
		}
	}

focus = {
		id = SOV_expand_the_agitprop
		icon = GFX_focus_generic_soviet_politics
		prerequisite = { focus = SOV_addressing_internal_affairs }
		x = 0
		y = 1
		relative_position_id = SOV_addressing_internal_affairs
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_PROPAGANDA}

		completion_reward = {
			add_political_power = 25
			add_popularity = {
				ideology = communism
				popularity = 0.1
			}

			hidden_effect = {
				SOV_unlock_propaganda_campaign_slot_effect = yes
				add_dynamic_modifier = { modifier = SOV_agitprop_dynamic_modifier }				
			}
			unlock_decision_category_tooltip = SOV_propaganda_campaigns
			
			custom_effect_tooltip = SOV_agitprop_dynamic_modifier_tt
			

		}
	}

	focus = {
		id = SOV_positive_heroism
		icon = GFX_goal_generic_cavalry
		prerequisite = { focus = SOV_expand_the_agitprop }
		x = -2
		y = 1
		relative_position_id = SOV_expand_the_agitprop
		cost = 10

		mutually_exclusive = { focus = SOV_collectivist_propaganda }

		available = {

		}
		
		search_filters = {FOCUS_FILTER_PROPAGANDA}

		completion_reward = {
			add_political_power = 25
			custom_effect_tooltip = available_military_high_command
			show_ideas_tooltip = konstantin_rokossovsky

			custom_effect_tooltip = unlock_propaganda_campaign_tt
			unlock_decision_tooltip = SOV_propaganda_heroes_forward
			custom_effect_tooltip = unlock_propaganda_campaign_slot_tt
			SOV_unlock_propaganda_campaign_slot_effect = yes
		}
	}

	focus = {
		id = SOV_revive_the_stakhanovite_movement
		icon = GFX_goal_generic_construction2
		prerequisite = { focus = SOV_positive_heroism }
		x = 0
		y = 1
		relative_position_id = SOV_positive_heroism
		cost = 10

		available = {

		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY}

		completion_reward = {
			add_ideas = SOV_stakhanovite_movement
		}
	}

	focus = {
		id = SOV_war_heroes
		icon = GFX_goal_generic_war_with_comintern
		prerequisite = { focus = SOV_revive_the_stakhanovite_movement }
		x = 0
		y = 1
		relative_position_id = SOV_revive_the_stakhanovite_movement
		cost = 10

		available = {

		}
		
		search_filters = {}

		completion_reward = {
			add_ideas = SOV_war_heroes_ns

			if = {
				limit = {
					SOV_georgy_zhukov = {
						NOT = { has_character_flag = SOV_character_purged_flag }
						is_corps_commander = yes
					}
				}
				SOV_georgy_zhukov = {
					promote_leader = yes
				}
			}
			else = {
				random_army_leader = {
					limit = {
						NOT = { has_character_flag = SOV_potential_target_flag }
						is_corps_commander = yes
						NOT = { is_character = SOV_konstantin_rokossovsky }
						NOT = { is_character = SOV_ivan_konev }
					}
					promote_leader = yes
				}
			}
			if = {
				limit = {
					SOV_konstantin_rokossovsky = {
						NOT = { has_character_flag = SOV_character_purged_flag }
						is_corps_commander = yes
					}
				}
				SOV_konstantin_rokossovsky = {
					promote_leader = yes
				}
			}
			else = {
				random_army_leader = {
					limit = {
						NOT = { has_character_flag = SOV_potential_target_flag }
						is_corps_commander = yes
						NOT = { is_character = SOV_georgy_zhukov }
						NOT = { is_character = SOV_ivan_konev }
					}
					promote_leader = yes
				}
			}
			if = {
				limit = {
					SOV_ivan_konev = {
						NOT = { has_character_flag = SOV_character_purged_flag }
						is_corps_commander = yes
					}
				}
				SOV_ivan_konev = {
					promote_leader = yes
				}
			}
			else = {
				random_army_leader = {
					limit = {
						NOT = { has_character_flag = SOV_potential_target_flag }
						is_corps_commander = yes
						NOT = { is_character = SOV_georgy_zhukov }
						NOT = { is_character = SOV_konstantin_rokossovsky }
					}
					promote_leader = yes
				}
			}
		}
	}

	focus = {
		id = SOV_collectivist_propaganda
		icon = GFX_goal_generic_propaganda
		prerequisite = { focus = SOV_expand_the_agitprop }
		x = 0
		y = 1
		relative_position_id = SOV_expand_the_agitprop
		cost = 5

		mutually_exclusive = { focus = SOV_positive_heroism }

		available = {

		}
		
		search_filters = {FOCUS_FILTER_MANPOWER FOCUS_FILTER_PROPAGANDA}

		completion_reward = {
			add_political_power = 25
			add_ideas = SOV_collectivist_propaganda_ns

			custom_effect_tooltip = unlock_propaganda_campaign_tt
			custom_effect_tooltip = unlock_propaganda_campaign_slot_tt
			SOV_unlock_propaganda_campaign_slot_effect = yes
		}
	}

	focus = {
		id = SOV_socialist_emulation
		icon = GFX_goal_generic_soviet_construction
		prerequisite = { focus = SOV_collectivist_propaganda }
		x = 0
		y = 1
		relative_position_id = SOV_collectivist_propaganda
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH}

		completion_reward = {
			add_ideas = SOV_socialist_emulation_1_ns
		}
	}

	focus = {
		id = SOV_socialist_realism
		icon = GFX_focus_generic_soviet_politics
		prerequisite = { focus = SOV_socialist_emulation }
		x = 0
		y = 1
		relative_position_id = SOV_socialist_emulation
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_INDUSTRY FOCUS_FILTER_POLITICAL}

		completion_reward = {
			swap_ideas = {
				remove_idea = SOV_socialist_emulation_1_ns
				add_idea = SOV_socialist_emulation_2_ns
			}
		}
	}

	focus = {
		id = SOV_the_komsomol
		icon = GFX_focus_generic_join_comintern
		prerequisite = { focus = SOV_expand_the_agitprop }
		x = 2
		y = 1
		relative_position_id = SOV_expand_the_agitprop
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_POLITICAL FOCUS_FILTER_PROPAGANDA}

		completion_reward = {
			add_political_power = 50
			add_popularity = {
				ideology = communism
				popularity = 0.1
			}

			custom_effect_tooltip = unlock_propaganda_campaign_tt
			unlock_decision_tooltip = SOV_propaganda_knowledge
			unlock_decision_tooltip = SOV_propaganda_builders_of_communism
			unlock_decision_tooltip = SOV_propaganda_sweep_scum_out
			custom_effect_tooltip = unlock_propaganda_campaign_slot_tt
			SOV_unlock_propaganda_campaign_slot_effect = yes
		}
	}

	focus = {
		id = SOV_patriarch_of_all_russia
		icon = GFX_focus_SOV_patriarch_of_all_russia
		prerequisite = { focus = SOV_war_heroes focus = SOV_socialist_realism }
		x = 1
		y = 1
		relative_position_id = SOV_war_heroes
		cost = 5

		available = {

		}
		
		search_filters = {FOCUS_FILTER_STABILITY}

		completion_reward = {
			add_stability = 0.1

			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = SOV_patriarch_sergy
		}
	}



########  #######  ########  ######## ####  ######   ##    ##     ######   #######  ##     ## ##     ## #### ######## 
##       ##     ## ##     ## ##        ##  ##    ##  ###   ##    ##    ## ##     ## ###   ### ###   ###  ##  ##       
##       ##     ## ##     ## ##        ##  ##        ####  ##    ##       ##     ## #### #### #### ####  ##  ##       
######   ##     ## ########  ######    ##  ##   #### ## ## ##    ##       ##     ## ## ### ## ## ### ##  ##  ######   
##       ##     ## ##   ##   ##        ##  ##    ##  ##  ####    ##       ##     ## ##     ## ##     ##  ##  ##       
##       ##     ## ##    ##  ##        ##  ##    ##  ##   ###    ##    ## ##     ## ##     ## ##     ##  ##  ##       
##        #######  ##     ## ######## ####  ######   ##    ##     ######   #######  ##     ## ##     ## #### ######## 



	focus = {
		id = SOV_the_comintern
		icon = GFX_goal_support_communism
		prerequisite = { focus = SOV_the_centre }
		x = -5
		y = 1
		relative_position_id = SOV_the_centre
		cost = 2

		

		available = {

		}
		
		search_filters = {FOCUS_FILTER_POLITICAL}

		completion_reward = {
			add_political_power = 50
			add_popularity = {
				ideology = communism
				popularity = 0.05
			}
		}
	}



	focus = {
		id = SOV_send_military_advisors_to_spain
		icon = GFX_focus_intervention_spain_republic
		prerequisite = { focus = SOV_the_comintern }
		x = -1
		y = 1
		relative_position_id = SOV_the_comintern
		cost = 1

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				has_civil_war = yes
			}	
		}
		completion_reward = {
			add_timed_idea = { idea = SOV_military_advisors_in_spain days = 1095 }
			
			if = {
				limit = {
					has_dlc = "La Resistance"
					has_completed_focus = SOV_covert_support_for_spanish_poum
					has_completed_focus = SOV_coup_detat
					has_global_flag = SPR_anarchist_uprising_flag
					country_exists = SPC
					SPC = { has_completed_focus = SPR_the_anti_fascist_workers_revolution }
				}
				SPC = {
					hidden_effect = { country_event = { id = NSB_soviet_foreign_politics_events.20 hours = 2 random_hours = 1 } }
					effect_tooltip = { add_timed_idea = {idea = SOV_soviet_advisors_spr days = 1095 } }
				}
			}
			else_if = {
				limit = {
					has_dlc = "La Resistance"
					country_exists = SPD
				}
				SPD = {
					hidden_effect = { country_event = { id = NSB_soviet_foreign_politics_events.20 hours = 2 random_hours = 1 } }
					effect_tooltip = { add_timed_idea = {idea = SOV_soviet_advisors_spr days = 1095 } }
				}
			}
			else_if = {
				limit = {
					has_dlc = "La Resistance"
					NOT = { country_exists = SPD }
				}
				custom_effect_tooltip = SOV_aid_republican_spain_tt
				effect_tooltip = { add_timed_idea = {idea = SOV_soviet_advisors_spr days = 1095 } }
			}
			else = {
				random_country = {
					limit = {
						original_tag = SPR
						has_civil_war = yes
						OR = {
							has_government = communism
							has_government = democratic
						}
					}
					hidden_effect = { country_event = { id = NSB_soviet_foreign_politics_events.20 hours = 2 random_hours = 1 } }
					effect_tooltip = { add_timed_idea = {idea = SOV_soviet_advisors_spr days = 1095 } }
				}
			}
			# A Spanish General will join the USSR if his side loses the SCW
			if = {
				limit = {
					has_dlc = "La Resistance"
				}
				custom_effect_tooltip = SOV_send_military_advisors_to_spain_generals_tt
				set_country_flag = SOV_spanish_refugee_generals_welcome_flag
			}
		}
	}




########  #######  ########  ######## ####  ######   ##    ##    ########   #######  ##       #### ######## ####  ######   ######  
##       ##     ## ##     ## ##        ##  ##    ##  ###   ##    ##     ## ##     ## ##        ##     ##     ##  ##    ## ##    ## 
##       ##     ## ##     ## ##        ##  ##        ####  ##    ##     ## ##     ## ##        ##     ##     ##  ##       ##       
######   ##     ## ########  ######    ##  ##   #### ## ## ##    ########  ##     ## ##        ##     ##     ##  ##        ######  
##       ##     ## ##   ##   ##        ##  ##    ##  ##  ####    ##        ##     ## ##        ##     ##     ##  ##             ## 
##       ##     ## ##    ##  ##        ##  ##    ##  ##   ###    ##        ##     ## ##        ##     ##     ##  ##    ## ##    ## 
##        #######  ##     ## ######## ####  ######   ##    ##    ##         #######  ######## ####    ##    ####  ######   ######  





	
	focus = {
		id = SOV_secure_leningrad
		icon = GFX_focus_generic_attack_finland
		prerequisite = { focus = SOV_the_comintern }
		x = 1
		y = 1
		relative_position_id = SOV_the_comintern
		cost = 1
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				has_civil_war = yes
			}	
		}
		dynamic = yes 

		available = {
			NOT = { has_country_flag = SOV_paranoia_system_active_flag }
			is_subject = no
		}

		bypass = {
			has_full_control_of_state = 146
		}
		
		search_filters = {FOCUS_FILTER_ANNEXATION}

		completion_reward = {
			add_state_claim = 146 # Karjala
			create_wargoal = {
					type = take_state
					target = FIN
					generator = { 146 }
				}
		}
	}







	




	



#   #  ##  #  #  ##  ###   ##  #  # ###  ## ###     ###  ###   ##  #  #  ##  #  # 
## ## #  # ## # #  # #  # #  # #  #  #  #    #      #  # #  # #  # ## # #  # #  # 
# # # #  # # ## #### ###  #    ####  #   #   #      ###  ###  #### # ## #    #### 
#   # #  # #  # #  # #  # #  # #  #  #    #  #      #  # #  # #  # #  # #  # #  # 
#   #  ##  #  # #  # #  #  ##  #  # ### ##   #      ###  #  # #  # #  #  ##  #  # 
    }

	
