capital = 112

oob = "POR_1936"
if = {
	limit = { has_dlc = "Man the Guns" }
		set_naval_oob = "POR_1936_naval_mtg"
	else = {
		set_naval_oob = "POR_1936_naval_legacy"
	}
}
if = {
	limit = { has_dlc = "By Blood Alone" }
		set_air_oob = "POR_1936_air_bba"
	else = {
		set_air_oob = "POR_1936_air_legacy"
		set_technology = {
			early_fighter = 1
			early_bomber = 1
			CAS1 = 1
		}
	}
}

set_research_slots = 3

set_technology = {
	infantry_weapons = 1
	infantry_weapons1 = 1
	tech_trucks = 1
	gw_artillery = 1
	interwar_antiair = 1
	tech_support = 1		
	tech_engineers = 1
	basic_train = 1
}
if = {
	limit = { not = { has_dlc = "Man the Guns" } }
	set_technology = {
		early_submarine = 1
		basic_submarine = 1
		early_destroyer = 1
		transport = 1
	}
}
if = {
	limit = { has_dlc = "Man the Guns" }
	set_technology = {
		basic_naval_mines = 1
		submarine_mine_laying = 1
		early_ship_hull_light = 1
		basic_ship_hull_light = 1
		early_ship_hull_submarine = 1
		basic_ship_hull_submarine = 1
		basic_battery = 1
		basic_torpedo = 1
		basic_depth_charges = 1
		mtg_transport = 1
	}
}

if = {
	limit = { has_dlc = "La Resistance" }	
	add_ideas = POR_unreliable_army
	add_ideas = POR_unstable_republic
	set_stability = 0.60
	set_war_support = 0.15	
	set_research_slots = 2

	ENG = {
		add_opinion_modifier = {
			target = POR 
			modifier  = POR_anglo_portuguese_alliance
		}
	}

	POR = {
		add_opinion_modifier = {
			target = ENG 
			modifier  = POR_anglo_portuguese_alliance
		}
	}

	GER = {
		add_opinion_modifier = {
			target = POR
			modifier = fascism_leanings_good
		}
	}

	ITA = {
		add_opinion_modifier = {
			target = POR
			modifier = fascism_leanings_good
		}
	}
	
}


1939.1.1 = {

	add_political_power = 1198
	add_command_power = 100
	
	if = {
		limit = {
			has_dlc = "La Resistance"
		}

		complete_national_focus = POR_estado_novo
		unlock_national_focus = POR_support_the_spanish_nationalists
		complete_national_focus = POR_portuguese_legion
		complete_national_focus = POR_observation_mission
		unlock_national_focus = POR_send_assistance
		complete_national_focus = POR_army_reorganization
		complete_national_focus = POR_metropolitan_army
		complete_national_focus = POR_corpo_do_estado_maior
		complete_national_focus = POR_second_navy_reequipment
		complete_national_focus = POR_a_powerful_merchant_marine
		complete_national_focus = POR_merchant_marine_protection
		complete_national_focus = POR_arsenal_do_alfeite
		complete_national_focus = POR_continue_the_public_works
		complete_national_focus = POR_instituto_superior_tecnico
		complete_national_focus = POR_roads_bridges_and_dams
		complete_national_focus = POR_ogme
		complete_national_focus = POR_food_industries
		complete_national_focus = POR_textile_industry
		complete_national_focus = POR_colonial_assimilation_policy
		complete_national_focus = POR_portuguese_artillery

		SPA = {
			add_opinion_modifier = {
				target = POR
				modifier = POR_helped_in_civil_war
			}
		}
		add_ideas = POR_volunteers_in_the_war_nationalist

		else = {
			#generic focuses
			complete_national_focus = army_effort
			complete_national_focus = equipment_effort
			complete_national_focus = motorization_effort
			complete_national_focus = aviation_effort
			complete_national_focus = naval_effort
			complete_national_focus = large_navy
			complete_national_focus = industrial_effort
			complete_national_focus = construction_effort
			complete_national_focus = production_effort
		}
	}
		
	oob = "POR_1939"
	if = {
		limit = { has_dlc = "Man the Guns" }
			set_naval_oob = "POR_1939_naval_mtg"
		else = {
			set_naval_oob = "POR_1939_naval_legacy"
		}
	}
	if = {
		limit = { has_dlc = "By Blood Alone" }
			set_air_oob = "POR_1939_air_bba"
		else = {
			set_air_oob = "POR_1939_air_legacy"
		}
	}
	set_technology = {
		interwar_artillery = 1
		infantry_weapons2 = 1
		support_weapons = 1

		#doctrines
		air_superiority = 1
		trench_warfare = 1
		fleet_in_being = 1
		battlefleet_concentration = 1
		convoy_sailing = 1
		submarine_operations = 1

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

		#industry
		basic_machine_tools = 1
		improved_machine_tools = 1
		advanced_machine_tools = 1
		synth_oil_experiments = 1
		fuel_silos = 1
		oil_processing = 1
		improved_oil_processing = 1
		construction1 = 1
		construction2 = 1
		dispersed_industry = 1
		dispersed_industry2 = 1
	}
	complete_special_project = {
		project = sp:sp_air_radar
	}
}

set_convoys = 50
set_politics = {
	ruling_party = neutrality
	last_election = "1933.3.5"
	election_frequency = 48
	elections_allowed = no
}
set_popularities = {
	fascism = 10
	communism = 10
	neutrality = 60
	democratic = 20
}

1939.1.1 = {
	set_politics = {
		ruling_party = neutrality
		last_election = "1938.10.30"
		election_frequency = 48
		elections_allowed = no
	}
	set_popularities = {
		neutrality = 100
	}
}

set_convoys = 100
set_stability = 0.75

if = {
	limit = {
		has_dlc = "La Resistance"
	}

	recruit_character = POR_antonio_de_oliveira_salazar
	recruit_character = POR_bento_goncalves
	recruit_character = POR_rolao_preto
	recruit_character = POR_jose_norton_de_matos
	recruit_character = POR_jose_vicente_de_freitas
	recruit_character = POR_luis_augusto_ferreira_martins
	recruit_character = POR_raul_augusto_esteves
	recruit_character = POR_jose_mendes_cabecadas
	recruit_character = POR_julio_botelho_moniz
	recruit_character = POR_humberto_delgado
	recruit_character = POR_vieira_da_rocha
	recruit_character = POR_manuel_ortins_torres_de_bettencourt
	recruit_character = POR_antonio_oscar_carmona
	recruit_character = POR_manuel_quintao_meireles
	recruit_character = POR_jaime_afreixo
	recruit_character = POR_americo_tomas
	recruit_character = POR_domingos_oliveira
	recruit_character = POR_manuel_gouveia
	recruit_character = POR_jose_filipe_de_barros_rodrigues
	recruit_character = POR_francisco_da_costa_gomes
	recruit_character = POR_jose_manuel_sarmento_de_beires
	recruit_character = POR_francisco_craveiro_lopes
	recruit_character = POR_alvaro_cunhal
	recruit_character = POR_francisco_da_cunha_leal
	recruit_character = POR_bento_de_jesus_caraca
	recruit_character = POR_jaime_cortesao
	recruit_character = POR_alberto_monsaraz
	recruit_character = POR_maria_lamas
	recruit_character = POR_joao_de_azevedo_coutinho
	recruit_character = POR_duarte_jose_pacheco
	recruit_character = POR_manuel_goncalves_cerejeira
	recruit_character = POR_jose_adriano_pequito_rebelo
	recruit_character = POR_jose_hipolito_raposo
	recruit_character = POR_joao_francisco_de_barbosa_azevedo
	recruit_character = POR_alfredo_da_silva
	recruit_character = POR_fernando_dos_santos_costa
	recruit_character = POR_augusto_de_vasconcelos
	recruit_character = POR_agostinho_lourenco
}

if = {
	limit = {
		NOT = { has_dlc = "La Resistance" }
	}

	recruit_character = POR_antonio_de_oliveira_salazar
	recruit_character = POR_bento_goncalves
	recruit_character = POR_rolao_preto
	recruit_character = POR_jose_norton_de_matos
	recruit_character = POR_jose_vicente_de_freitas
	recruit_character = POR_jose_manuel_sarmento_de_beires
	recruit_character = POR_manuel_ortins_torres_de_bettencourt
	recruit_character = POR_humberto_carmona
	recruit_character = POR_lobato_guerra
	recruit_character = POR_humberto_delgado
	recruit_character = POR_manuel_gouveia
	recruit_character = POR_jaime_afreixo
	recruit_character = POR_americo_tomas
	recruit_character = POR_manuel_quintao_meireles
	recruit_character = POR_jose_filipe_de_barros_rodrigues
	recruit_character = POR_jose_adriano_rebelo_pequito
	recruit_character = POR_francisco_craveiro_lopes
	recruit_character = POR_jaime_cortesao
	recruit_character = POR_raul_brandao
	recruit_character = POR_augusto_de_vasconcelos
	recruit_character = POR_jose_hipolito_raposo
}

### VARIANTS ###
# 1936 Start #
if = {
	limit = { not = { has_dlc = "Man the Guns" } }
	### Ship Variants ###
}
if = {
	limit = { has_dlc = "Man the Guns" }
	# Submarines #
	create_equipment_variant = {
		name = "Delfim Class"				
		type = ship_hull_submarine_2
		name_group = POR_SS_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_torpedo_slot = ship_torpedo_sub_1
			fixed_ship_engine_slot = sub_ship_engine_1
			rear_1_custom_slot = empty
		}
	}
	# Destroyers #
	create_equipment_variant = {
		name = "Guadiana Class"					
		type = ship_hull_light_1
		name_group = POR_DD_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_battery_1
			fixed_ship_anti_air_slot = empty
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = light_ship_engine_1
			fixed_ship_torpedo_slot = ship_torpedo_1
			mid_1_custom_slot = empty
			rear_1_custom_slot = empty
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Douro Class"	
		type = ship_hull_light_1
		name_group = POR_DD_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = light_ship_engine_2
			fixed_ship_torpedo_slot = ship_torpedo_1
			mid_1_custom_slot = ship_mine_layer_1
			rear_1_custom_slot = ship_depth_charge_1
		}
	}
}
