capital = 278

oob = "ARG_1936"

IF = {
	limit = { has_dlc = "Man the Guns" }
		set_naval_oob = "ARG_1936_naval_mtg"
	ELSE = {
		set_naval_oob = "ARG_1936_naval_legacy"
	}
}
IF = {
	limit = { has_dlc = "By Blood Alone" }
		set_air_oob = "ARG_1936_air_bba"
		set_technology = {
			iw_small_airframe = 1
			aa_lmg = 1
			engines_1 = 1
			early_bombs = 1
		}
	ELSE = {
		set_air_oob = "ARG_1936_air_legacy"
		set_technology = {
			early_fighter = 1
			CAS1 = 1
		}
	}
}

every_core_state = {
	ROOT = {
		add_to_array = { cores_at_game_start = PREV }
	}
}

# Corruption Modifier
set_variable = { ARG_corruption_political_power_factor = 0.1 }
set_variable = { ARG_corruption_production_factory_max_efficiency_factor = -0.1 }
set_variable = { ARG_corruption_production_speed_buildings_factor = -0.1 }
set_variable = { ARG_corruption_war_support_factor = -0.2 }

# Crackdown on Corruption Modifier
set_variable = { ARG_corruption_crackdown_stability_factor = 0.1 }
set_variable = { ARG_corruption_crackdown_production_factory_max_efficiency_factor = 0.1 }
set_variable = { ARG_corruption_crackdown_neutrality_factor = 0.02 }
set_variable = { ARG_corruption_crackdown_fascism_factor = 0.02 }
set_variable = { ARG_corruption_crackdown_war_support_factor = -0.1 }

# Anti Corruption Modifier
set_variable = { ARG_anti_corruption_stability_factor = 0.15 }
set_variable = { ARG_anti_corruption_production_factory_max_efficiency_factor = 0.1 }
set_variable = { ARG_anti_corruption_neutrality_factor = 0.02 }
set_variable = { ARG_anti_corruption_democratic_factor = 0.03 }
set_variable = { ARG_anti_corruption_war_support_factor = -0.2 }

# Growing Nationalism Modifier
set_variable = { ARG_growing_nationalism_fascism_drift = 0.05 } 
set_variable = { ARG_growing_nationalism_recruitable_population_factor = 0.02 }
set_variable = { ARG_growing_nationalism_stability_factor = 0.05 }
set_variable = { ARG_growing_nationalism_war_support_factor = 0 }
set_variable = { ARG_growing_nationalism_democratic_drift = -0.02 }
set_variable = { ARG_growing_nationalism_political_power_factor = 0 }

IF = {
	# TODO JA, set this to the correct dlc!
	limit = { has_dlc = "Trial of Allegiance" }

	# Army modifier
	JUNO_set_shared_military_branch_defaults = yes

	add_ideas = {
		SMB_MTG_naval_arms_race_legacy
		ARG_infamous_decade_idea
		ARG_roca_runciman_treaty_idea
	}

	add_dynamic_modifier = {
		modifier = ARG_political_corruption_modifier
	}

}

# Starting tech
set_technology = {
	infantry_weapons = 1
	tech_mountaineers = 1
	tech_trucks = 1
	motorised_infantry = 1
	gw_artillery = 1
	interwar_antiair = 1
	basic_train = 1
}

IF = {
	limit = { not = { has_dlc = "Man the Guns" } }
	set_technology = {
		early_submarine = 1
		early_destroyer = 1
		early_light_cruiser = 1
		early_heavy_cruiser = 1
		early_battleship = 1
		transport = 1
	}
}
IF = {
	limit = { has_dlc = "Man the Guns" }
	set_technology = {
		basic_naval_mines = 1
		early_ship_hull_light = 1
		basic_ship_hull_light = 1
		early_ship_hull_submarine = 1
		basic_ship_hull_submarine = 1
		early_ship_hull_cruiser = 1
		early_ship_hull_heavy = 1
		basic_battery = 1
		basic_cruiser_armor_scheme = 1
		basic_torpedo = 1
		basic_depth_charges = 1
		coastal_defense_ships = 1
		mtg_transport = 1
	}
}

set_country_flag = monroe_doctrine

1939.1.1 = {

	add_political_power = 1198
	add_command_power = 100
	IF = {
		limit = {
			has_dlc = "Trial of Allegiance"
		}

		complete_national_focus = SMB_army #35
		complete_national_focus = SMB_navy #35
		complete_national_focus = ARG_roberto_maria_ortiz
		complete_national_focus = ARG_defense_and_democracy
		complete_national_focus = ARG_banco_central_de_la_republica_argentina
		complete_national_focus = ARG_crack_down_on_corruption #35
		complete_national_focus = ARG_industrial_expansion
		complete_national_focus = ARG_british_cooperation
		complete_national_focus = ARG_rapid_urbanization
		complete_national_focus = ARG_import_substitution #35
		complete_national_focus = ARG_agricultural_improvements
		complete_national_focus = ARG_military_production_lines
		complete_national_focus = ARG_emphasis_on_public_works #35
		complete_national_focus = ARG_economic_reactivation_act #35
		complete_national_focus = ARG_towards_a_greater_argentina
		complete_national_focus = ARG_universidad_de_buenos_aires
		complete_national_focus = SMB_air_force #35

		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 = "ARG_1939"
	IF = {
		limit = { has_dlc = "Man the Guns" }
			set_naval_oob = "ARG_1939_naval_mtg"
		ELSE = {
			set_naval_oob = "ARG_1939_naval_legacy"
		}
	}
	IF = {
		limit = { has_dlc = "By Blood Alone" }
			set_air_oob = "ARG_1939_air_bba"
			set_technology = {
				iw_medium_airframe = 1
				bba_early_transport_plane = 1
			}
		ELSE = {
			set_air_oob = "ARG_1939_air_legacy"
			set_technology = {
				early_bomber = 1
				naval_bomber1 = 1
				early_transport_plane = 1
			}
		}
	}

	set_technology = {
		interwar_artillery = 1
		infantry_weapons1 = 1
		infantry_weapons2 = 1
		support_weapons = 1
		tech_support = 1
		tech_engineers = 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
	}
	IF = {
		limit = { NOT = { has_dlc = "Man the Guns" } }
		set_technology = {
			basic_destroyer = 1
			basic_light_cruiser = 1
		}
	}
	IF = {
		limit = { has_dlc = "Man the Guns" }
		set_technology = {
			basic_light_battery = 1
			basic_medium_battery = 1
		}
	}
}

set_convoys = 120

set_politics = {
	ruling_party = neutrality
	last_election = "1931.11.8"
	election_frequency = 72
	elections_allowed = yes
}
set_popularities = {
	democratic = 25
	fascism = 20
	communism = 25
	neutrality = 30
}

1939.1.1 = {
	set_politics = {
		ruling_party = neutrality
		last_election = "1937.9.5"
		election_frequency = 108
		elections_allowed = yes
	}

	set_popularities = {
		democratic = 15
		fascism = 20
		communism = 15
		neutrality = 50
	}

}


### VARIANTS ###
# 1936 Start #
IF = {
	limit = {
		has_dlc = "By Blood Alone"
	}
	create_equipment_variant = {
		name = "FMA D.21" #
		type = small_plane_airframe_0
		modules = {
			fixed_main_weapon_slot = light_mg_2x
			engine_type_slot = engine_1_1x
			special_type_slot_1 = empty
		}
		obsolete = no
	}
}
IF = {
	limit = { NOT = { has_dlc = "Man the Guns" } }
	### Ship Variants ###
	create_equipment_variant = {
		name = "Cervantes Class"
		type = destroyer_1
		upgrades = {
			ship_torpedo_upgrade = 1
			destroyer_engine_upgrade = 1
			ship_ASW_upgrade = 1
			ship_anti_air_upgrade = 1
		}
	}
	create_equipment_variant = {
		name = "Veinticinco de Mayo Class"
		type = heavy_cruiser_1
		upgrades = {
			ship_reliability_upgrade = 1
			ship_engine_upgrade = 1
			ship_armor_upgrade = 1
			ship_gun_upgrade = 1
		}
	}

}
IF = {
	limit = { has_dlc = "Man the Guns" }
	# Submarines #
	create_equipment_variant = {
		name = "Santa Fe Class"				
		type = ship_hull_submarine_1
		name_group = ARG_SS_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_torpedo_slot = ship_torpedo_sub_1
			fixed_ship_engine_slot = sub_ship_engine_2
			rear_1_custom_slot = ship_torpedo_sub_1
		}
	}
	# Destroyers #
	create_equipment_variant = {
		name = "Catamarca Class"				# represents Catamarca, La Plata Class		
		type = ship_hull_light_1
		name_group = ARG_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 = "Cervantes Class"	
		type = ship_hull_light_2
		name_group = ARG_DD_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = light_ship_engine_2
			fixed_ship_torpedo_slot = ship_torpedo_1
			mid_1_custom_slot = empty
			rear_1_custom_slot = ship_depth_charge_1
		}
	}
	create_equipment_variant = {
		name = "Mendoza Class"				
		type = ship_hull_light_2
		name_group = ARG_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 = empty
			mid_1_custom_slot = empty
			rear_1_custom_slot = empty
		}
	}
	# Heavy Cruisers #
	create_equipment_variant = {
		name = "Libertad Class"				
		type = ship_hull_cruiser_coastal_defense_ship
		name_group = ARG_CL_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_medium_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = cruiser_ship_engine_1
			fixed_ship_armor_slot = ship_armor_cruiser_2
			fixed_ship_secondaries_slot = ship_secondaries_1
			mid_1_custom_slot = empty
			mid_2_custom_slot = empty
			rear_1_custom_slot = empty
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Garibaldi Class"				
		type = ship_hull_cruiser_coastal_defense_ship
		name_group = ARG_CA_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_medium_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = cruiser_ship_engine_1
			fixed_ship_armor_slot = ship_armor_cruiser_1
			fixed_ship_secondaries_slot = ship_secondaries_1
			mid_1_custom_slot = ship_secondaries_1
			mid_2_custom_slot = empty
			rear_1_custom_slot = empty
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Veinticinco de Mayo Class"				
		type = ship_hull_cruiser_1
		name_group = ARG_CA_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_medium_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = cruiser_ship_engine_1
			fixed_ship_armor_slot = ship_armor_cruiser_1
			fixed_ship_secondaries_slot = ship_secondaries_1
			mid_1_custom_slot = ship_torpedo_1
			mid_2_custom_slot = empty
			rear_1_custom_slot = ship_airplane_launcher_1
		}
	}
	# Battleships #
	create_equipment_variant = {
		name = "Rivadavia Class"	
		type = ship_hull_heavy_1
		name_group = ARG_BB_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_heavy_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = heavy_ship_engine_1
			fixed_ship_secondaries_slot = ship_secondaries_1
			fixed_ship_armor_slot = ship_armor_bb_1
			front_1_custom_slot = ship_heavy_battery_1
			mid_1_custom_slot = ship_secondaries_1
			mid_2_custom_slot = empty
			rear_1_custom_slot = empty
		}
	}
}

# 1939 Start #
1939.1.1 = {
	IF = {
		limit = { NOT = { has_dlc = "Man the Guns" } }
		# Ship variants #
	}
	IF = {
		limit = { has_dlc = "Man the Guns" }
		# Destroyers #
		create_equipment_variant = {
			name = "Buenos Aires Class"	
			type = ship_hull_light_2
			name_group = ARG_DD_HISTORICAL
			parent_version = 0
			modules = {
				fixed_ship_battery_slot = ship_light_battery_2
				fixed_ship_anti_air_slot = ship_anti_air_1
				fixed_ship_fire_control_system_slot = ship_fire_control_system_0
				fixed_ship_radar_slot = empty
				fixed_ship_engine_slot = light_ship_engine_2
				fixed_ship_torpedo_slot = ship_torpedo_1
				mid_1_custom_slot = empty
				rear_1_custom_slot = empty
			}
		}
		# Light Cruisers #
		create_equipment_variant = {
			name = "La Argentina Class"
			type = ship_hull_cruiser_1
			name_group = ARG_CA_HISTORICAL
			parent_version = 0
			modules = {
				fixed_ship_battery_slot = ship_light_medium_battery_2
				fixed_ship_anti_air_slot = ship_anti_air_1
				fixed_ship_fire_control_system_slot = ship_fire_control_system_0
				fixed_ship_radar_slot = empty
				fixed_ship_engine_slot = cruiser_ship_engine_1
				fixed_ship_armor_slot = ship_armor_cruiser_1
				mid_1_custom_slot = ship_torpedo_1
				mid_2_custom_slot = ship_light_medium_battery_2
				rear_1_custom_slot = ship_airplane_launcher_1
			}
		}
	}
}