capital = 808

oob = "LAT_1936"
if = {
	limit = { has_dlc = "Man the Guns" }
		set_naval_oob = "LAT_1936_naval_mtg"
	else = {
		set_naval_oob = "LAT_1936_naval_legacy"
	}
}
if = {
	limit = { has_dlc = "By Blood Alone" }
		set_air_oob = "LAT_1936_air_bba"
	else = {
		set_air_oob = "LAT_1936_air_legacy"
		set_technology = {
			early_fighter = 1
		}
	}
}

if = {
	limit = { has_dlc = "Arms Against Tyranny" }
	store_core_states_on_game_start = yes
}

add_ideas = {
	limited_conscription
}
IF = {
	limit = { has_dlc = "No Step Back" }
	add_ideas = {
		LAT_perkonkrust_idea
		democratic_opposition
	}
}

recruit_character = LAT_gustavs_celminsh
recruit_character = LAT_augusts_kirhensteins
recruit_character = LAT_martinsh_penikis
recruit_character = LAT_hermanis_buks
recruit_character = LAT_janis_berzins
recruit_character = LAT_ludvigs_bolsteins
recruit_character = LAT_teodors_zvejnieks
recruit_character = LAT_kornelijs_veidnieks
recruit_character = LAT_rudolfs_kandis
recruit_character = LAT_konstantins_cakste
recruit_character = LAT_arturs_silgailis
recruit_character = LAT_fricis_celmins
recruit_character = LAT_otto_hellmich
recruit_character = LAT_rudolfs_kocins
recruit_character = LAT_arturs_sprogis
recruit_character = LAT_tomas_spade
recruit_character = LAT_vilis_lacis
recruit_character = LAT_vilhelms_munters
recruit_character = LAT_janis_kaminskis
recruit_character = LAT_fricis_menders
recruit_character = LAT_alberts_kvesis
recruit_character = LAT_karlis_ulmanis

IF = { 
	limit = { has_dlc = "No Step Back" }
	recruit_character = LAT_janis_balodis
	recruit_character = LAT_janis_sudrabkalns
	recruit_character = LAT_emilija_veinberga
	recruit_character = LAT_janis_rudzutaks
	recruit_character = LAT_karlis_baumanis
	recruit_character = LAT_fricis_virsaitis
	recruit_character = LAT_andrejs_krustinsh
	recruit_character = LAT_zhanis_bahs
	recruit_character = LAT_krisjanis_berkis
}


set_technology = {
	infantry_weapons = 1
	infantry_weapons1 = 1
	tech_trucks = 1
	gw_artillery = 1
	tech_support = 1
	basic_train = 1
}
if = {
	limit = { not = { has_dlc = "Man the Guns" } }
	set_technology = {
		early_submarine = 1
	}
}
if = {
	limit = { has_dlc = "Man the Guns" }
	set_technology = {
		basic_torpedo = 1
		submarine_mine_laying = 1
		early_ship_hull_submarine = 1
	}
}

set_research_slots = 3

set_convoys = 10

1939.1.1 = {

	add_political_power = 1198
	add_command_power = 100
	
	remove_ideas = {
		LAT_perkonkrust_idea
		democratic_opposition
	}

	IF = {
		limit = { has_dlc = "No Step Back" }
		add_ideas = {
			LAT_janis_balodis
		}
	}
	
	set_country_flag = fought_perkonkrust_flag
	
	if = {
		limit = {
			has_dlc = "No Step Back"
		}
		complete_national_focus = LAT_suspend_the_constitution
		complete_national_focus = LAT_empower_paramilitarists
		complete_national_focus = LAT_the_sun_shines_equally
		complete_national_focus = BALTIC_rejoin_the_railways
		complete_national_focus = BALTIC_renew_allied_trade
		complete_national_focus = LAT_banish_clemens
		complete_national_focus = LAT_appease_democrats
		complete_national_focus = LAT_martial_prime_minister
		complete_national_focus = LAT_improve_military_life
		complete_national_focus = LAT_establish_chambers_of_professions
		complete_national_focus = BALTIC_attract_workers_to_capital
		complete_national_focus = BALTIC_modernize_industry
		complete_national_focus = LAT_nationalised_industry
		complete_national_focus = LAT_merge_presidential_titles
		complete_national_focus = BALTIC_school_of_aviation
		complete_national_focus = LAT_aizsargi
		complete_national_focus = BALTIC_british_aircraft
		complete_national_focus = BALTIC_allied_shipments
	}
	
	oob = "LAT_1939"
	
	if = {
		limit = { has_dlc = "Man the Guns" }
			set_naval_oob = "LAT_1939_naval_mtg"
		else = {
			set_naval_oob = "LAT_1939_naval_legacy"
		}
	}
	if = {
		limit = { has_dlc = "By Blood Alone" }
			set_air_oob = "LAT_1939_air_bba"
		else = {
			set_air_oob = "LAT_1939_air_legacy"
		}
	}

	set_technology = {	
		tech_engineers = 1
		interwar_artillery = 1
		interwar_antiair = 1
		support_weapons = 1

		#doctrines
		air_superiority = 1
		grand_battle_plan = 1
		trench_warfare = 1
		fleet_in_being = 1
		battlefleet_concentration = 1
		convoy_sailing = 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_politics = {
	ruling_party = neutrality
	last_election = "1931.10.3"
	election_frequency = 10
	elections_allowed = no
}
set_popularities = {
	democratic = 30
	fascism = 15
	communism = 15
	neutrality = 40
}

# probably needs some adjustment before nazi occupation in 1940
1939.1.1 = {
	#
}

### 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 = "Ronis Class"								
		type = ship_hull_submarine_1
		name_group = LAT_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
		}
	}
}