set_country_flag = polit_nato_ally
capital = 37
add_ideas = disarmed_nation 
load_focus_tree = generic_focus
if = {
	limit = { has_dlc = "Arms Against Tyranny" }
	set_country_flag = DEN_danish_election_flag
}


oob = "DEN_1936"
if = {
	limit = { has_dlc = "Man the Guns" }
		set_naval_oob = "DEN_1936_naval_mtg"
	else = {
		set_naval_oob = "DEN_1936_naval_legacy"
	}
}
if = {
	limit = { has_dlc = "By Blood Alone" }
		set_air_oob = "DEN_1936_air_bba"
	else = {
		set_air_oob = "DEN_1936_air_legacy"
		set_technology = {
			early_fighter = 1
			cv_early_fighter = 1

		}
	}
}

# Diplomacy
IF = {
	limit = {
		OR = {
			has_dlc = "Together for Victory"
			has_dlc = "Man the Guns"
		}
	}
	set_autonomy = {
		target = ICE
		autonomous_state = autonomy_dominion
		freedom_level = 0.4
	}
	ELSE = {
		puppet = ICE
	}
}

#### COUNTRY LEADERS ####
recruit_character = DEN_thorvald_stauning
recruit_character = DEN_knud_bach
recruit_character = DEN_knud_bach_2
recruit_character = DEN_knud_bach_3
if = {
	limit = {
		has_dlc = "Arms Against Tyranny"
	}
	recruit_character = DEN_christian_x
	recruit_character = DEN_freedom_council
}
recruit_character = DEN_aksel_larsen
recruit_character = DEN_frits_clausen
if = {
	limit = {
		has_dlc = "Arms Against Tyranny"
	}
	recruit_character = DEN_werner_best
}

#### MILITARY LEADERS and ADVISORS ####
if = {
	limit = {
		has_dlc = "Arms Against Tyranny"
	}
	recruit_character = DEN_erik_with
}
recruit_character = DEN_william_wain_prior
recruit_character = DEN_ebbe_gortz
if = {
	limit = {
		has_dlc = "Arms Against Tyranny"
	}
	recruit_character = DEN_frederik_christian_essemann
	recruit_character = DEN_carl_jacobsen
	recruit_character = DEN_christian_peder_kryssing
	recruit_character = DEN_erik_leschly
	recruit_character = DEN_erik_moller
	recruit_character = DEN_paul_ramm
	recruit_character = DEN_charles_henry_rye
}
recruit_character = DEN_christian_frederik_von_schalburg
recruit_character = DEN_hjalmar_rechnitzer
recruit_character = DEN_aage_vedel
if = {
	limit = {
		has_dlc = "Arms Against Tyranny"
	}
	recruit_character = DEN_emmanuel_briand_de_crevecoeur
	recruit_character = DEN_christian_evers
}
recruit_character = DEN_carl_hammerich
if = {
	limit = {
		has_dlc = "Arms Against Tyranny"
	}
	recruit_character = DEN_paul_ipsen
	recruit_character = DEN_prince_frederik
	recruit_character = DEN_frederik_ix
	recruit_character = DEN_christian_forslev
	recruit_character = DEN_asger_grandjean
	recruit_character = DEN_aage_falking
}
recruit_character = DEN_hans_a_rolsted
recruit_character = DEN_kaj_birksted
recruit_character = DEN_poul_sommer
if = {
	limit = {
		has_dlc = "Arms Against Tyranny"
	}
	recruit_character = DEN_johan_von_stemann
	recruit_character = DEN_peter_horn
}
recruit_character = DEN_paul_sommer
recruit_character = DEN_hans_lunding

#### POLITICAL ADVISORS ####
if = {
	limit = {
		has_dlc = "Arms Against Tyranny"
	}
	recruit_character = DEN_peter_rochegune_munch
	recruit_character = DEN_christmas_moller
	recruit_character = DEN_vilhelm_buhl
	recruit_character = DEN_erik_scavenius
	recruit_character = DEN_jorgen_jorgensen
}
recruit_character = DEN_knud_kristensen
if = {
	limit = {
		has_dlc = "Arms Against Tyranny"
	}
}
if = {
	limit = {
		has_dlc = "Arms Against Tyranny"
	}
	recruit_character = DEN_hans_hedtoft
	recruit_character = DEN_arnold_peter_moller
	recruit_character = DEN_alsing_andersen
	recruit_character = DEN_karl_kristian_steincke
	recruit_character = DEN_niels_bohr
	recruit_character = DEN_cay_lembcke
	recruit_character = DEN_emil_strobech
}
recruit_character = DEN_ejnar_warum
recruit_character = DEN_viggo_kampman



set_research_slots = 3
set_stability = 0.9
set_war_support = 0.1
set_technology = {
	infantry_weapons = 1
	infantry_weapons1 = 1
	tech_support = 1		
	tech_recon = 1
	tech_engineers = 1
	tech_trucks = 1
	gw_artillery = 1
	interwar_antiair = 1
	basic_train = 1
}

#### AAT SET UP ####
if = {
	limit = {
		has_dlc = "Arms Against Tyranny"
	}
	set_stability = 0.5
	add_ideas = {
		disarmed_nation
	}

	set_power_balance = {
		id = DEN_balance_of_power
		set_default = no  # whether or not to reset the power balance to the initial value, default = no
		set_value = -0.1
	}

	#PARY POPULARITY
	set_variable = { DEN_democratic_popularity = 94 }
	set_variable = { DEN_communism_popularity = 2 }
	set_variable = { DEN_neutrality_popularity = 3 }
	set_variable = { DEN_fascism_popularity = 1 }

	#NEGLECTED MILITARY
	set_variable = { DEN_neglected_military_mobilization_speed = -0.2 }
	set_variable = { DEN_neglected_military_surrender_limit = -0.2}
	set_variable = { DEN_neglected_military_planning_speed = -0.1 }
	add_dynamic_modifier = { modifier = DEN_neglected_military_dynamic_modifier }

	#ECONOMIC CRISIS
	set_variable = { DEN_economic_crisis_monthly_population = -0.1 }
	set_variable = { DEN_economic_crisis_stability_weekly = -0.001 }
	set_variable = { DEN_economic_crisis_neutrality_drift = 0.02 }
	set_variable = { DEN_economic_crisis_democratic_drift = -0.05 }
	add_dynamic_modifier = { modifier = DEN_economic_crisis_dynamic_modifier }

	#INDUSTRIAL CAPABILITIES
	set_variable = { DEN_industrial_capability_resources_to_market = 0 }
	set_variable = { DEN_industrial_capabilities_consumer_goods = 0.3 }
	set_variable = { DEN_industrial_capabilities_retention_efficiency = -0.05 }
	set_variable = { DEN_industrial_capabilities_factory_output = -0.1 }
	set_variable = { DEN_industrial_capabilities_dockyard_output = -0.1 }
	set_variable = { DEN_industrial_capabilities_industry_repair = 0 }
	set_variable = { DEN_industrial_capabilities_equipment_conversion = -0.05 }
	set_variable = { DEN_industrial_capabilities_license_production = 0 }
	set_variable = { DEN_industrial_capabilities_refit_speed = 0 }
	set_variable = { DEN_industrial_capabilities_ship_repair = 0 }
	set_variable = { DEN_industrial_capability_local_resources = 0 }
	add_dynamic_modifier = { modifier = DEN_industrial_capability_dynamic_modifier }

	#WAR PREPARATIONS
	set_variable = { DEN_war_preparations_lack_of_resource_penalty = 0 }
	set_variable = { DEN_war_preparations_fuel_gain = 0 }
	set_variable = { DEN_war_preparations_max_fuel = 0 }
	set_variable = { DEN_war_preparations_civilian_intel_to_others = 0 }
	set_variable = { DEN_war_preparations_army_intel_to_others = 0 }
	set_variable = { DEN_war_preparations_navy_intel_to_others = 0 }
	set_variable = { DEN_war_preparations_fuel_silo_speed = 0 }
	set_variable = { DEN_war_preparations_weekly_casualties_war_support = 0 }	
	set_variable = { DEN_war_preparations_weekly_bombing_war_support = 0 }
	set_variable = { DEN_war_preparations_weekly_convoys_war_support = 0 }
	set_variable = { DEN_war_preparations_offensive_war_stability = 0 }

	#POLITICAL EDICTS
	set_variable = { DEN_political_edicts_drift_defence_factor = 0 }
	set_variable = { DEN_political_edicts_conscription_factor = 0 }
	set_variable = { DEN_political_edicts_operative_slot = 0 }

	#OCCUPATION LAWS
	set_variable = { DEN_occupation_laws_cic_to_overlord = 0 }
	set_variable = { DEN_occupation_laws_mic_to_overlord = 0 }
	set_variable = { DEN_occupation_laws_autonomy_manpower_share = 0 }
	set_variable = { DEN_occupation_laws_master_ideology_drift = 0 }
	set_variable = { DEN_occupation_laws_autonomy_gain = 0 }

	set_variable = { DEN_overlord_opinion = 0 }

	#RESISTANCE
	set_variable = { DEN_resistance_air_mission_efficiency = 0 }
	set_variable = { DEN_resistance_air_attack_factor = 0 }
	set_variable = { DEN_resistance_air_agility_factor = 0 }
	set_variable = { DEN_resistance_air_home_defence = 0 }
	set_variable = { DEN_resistance_power_balance_weekly = 0 }
	set_variable = { DEN_resistance_target_on_our_occupied_states = 0 }
	set_variable = { DEN_resistance_compliance_growth_on_our_occupied_states = 0 }
	set_variable = { DEN_resistance_damage_to_garrison_on_our_occupied_states = 0 }
	set_variable = { DEN_resistance_naval_damage = 0 }
	set_variable = { DEN_resistance_naval_defense = 0 }
	set_variable = { DEN_resistance_enemy_fleet_size_ratio_penalty = 0 }
	set_variable = { DEN_resistance_mobilization_speed = 0 }
	set_variable = { DEN_resistance_weekly_manpower = 0 }

	#HAEREN
	set_variable = { DEN_haeren_army_speed = 0 }
	set_variable = { DEN_haeren_army_org = 0 }
	set_variable = { DEN_haeren_org_loss_when_moving = 0 }
	set_variable = { DEN_haeren_army_core_attack = 0 }
	set_variable = { DEN_haeren_army_core_defence = 0 }
	set_variable = { DEN_haeren_army_armor_defence = 0 }
	set_variable = { DEN_haeren_army_artillery_defence = 0 }
	set_variable = { DEN_haeren_army_artillery_attack = 0 }
	set_variable = { DEN_haeren_army_armor_attack = 0 }
	set_variable = { DEN_haeren_army_attack = 0 }
	set_variable = { DEN_haeren_army_defence = 0 }
	set_variable = { DEN_haeren_army_attack_against_major = 0 }
	set_variable = { DEN_haeren_army_defence_against_major = 0 }
	set_variable = { DEN_haeren_army_attack_against_minor = 0 }
	set_variable = { DEN_haeren_improvement_tracker_var = 0 } #To improve the icon
	
	#SOVAERNET
	set_variable = { DEN_sovaernet_naval_coordination = 0 }
	set_variable = { DEN_sovaernet_naval_hit_chance = 0 }
	set_variable = { DEN_sovaernet_naval_detection = 0 }
	set_variable = { DEN_sovaernet_navy_org = 0 }
	set_variable = { DEN_sovaernet_naval_morale = 0 }
	set_variable = { DEN_sovaernet_navy_anti_air = 0 }
	set_variable = { DEN_sovaernet_capital_ship_defence = 0 }
	set_variable = { DEN_sovaernet_navy_screen_attack = 0 }
	set_variable = { DEN_sovaernet_navy_screen_defence = 0 }
	set_variable = { DEN_sovaernet_naval_accidents = 0 }
	set_variable = { DEN_sovaernet_screening_efficiency = 0 }
	set_variable = { DEN_sovaernet_positioning = 0 }
	set_variable = { DEN_sovaernet_naval_critical_score_chance = 0 }
	set_variable = { DEN_sovaernet_improvement_tracker_var = 0 } #To improve the icon
	
	#FLYVEVÅBNET
	set_variable = { DEN_flyvevabnet_air_bombing_targetting = 0 }
	set_variable = { DEN_flyvevabnet_ace_generation_chance = 0 }
	set_variable = { DEN_flyvevabnet_strategic_bomber = 0 }
	set_variable = { DEN_flyvevabnet_escort_efficiency = 0 }
	set_variable = { DEN_flyvevabnet_intercept_efficiency = 0 }
	set_variable = { DEN_flyvevabnet_cas_efficiency = 0 }
	set_variable = { DEN_flyvevabnet_mission_efficiency = 0 }
	set_variable = { DEN_flyvevabnet_naval_strike_targetting = 0 }
	set_variable = { DEN_flyvevabnet_air_accidents = 0 }
	set_variable = { DEN_flyvevabnet_air_agility = 0 }
	set_variable = { DEN_flyvevabnet_ground_attack = 0 }
	set_variable = { DEN_flyvevabnet_air_night_penalty = 0 }
	set_variable = { DEN_flyvevabnet_air_weather_penalty = 0 }
	set_variable = { DEN_flyvevabnet_improvement_tracker_var = 0 } #To improve the icon
	
	#DECISION VARIABLES
	#BoP
	set_variable = { DEN_bop_decrease_low_cost = 50 }
	set_variable = { DEN_bop_decrease_medium_cost = 75 }
	set_variable = { DEN_bop_decrease_high_cost = 100 }
	set_variable = { DEN_bop_decrease_very_high_cost = 150 }
	set_variable = { DEN_bop_increase_low_cost = 50 }
	set_variable = { DEN_bop_increase_medium_cost = 75 }
	set_variable = { DEN_bop_increase_high_cost = 100 }
	set_variable = { DEN_bop_increase_very_high_cost = 150 }

	set_variable = { DEN_development_cost = 25 }
	set_variable = { DEN_double_cost_increase = 2 }
	set_variable = { DEN_danish_brigade_size_cost = 100 }
	
	set_variable = { DEN_decision_low_cost = 50 }
	set_variable = { DEN_decision_medium_cost = 75 }
	set_variable = { DEN_decision_high_cost = 100 }
	set_variable = { DEN_decision_very_high_cost = 150 }

	set_variable = { DEN_short_reset_time = 90 }
	set_variable = { DEN_medium_reset_time = 180 }
	set_variable = { DEN_long_reset_time = 365 }
	set_variable = { DEN_very_long_reset_time = 545 }

	#Initializing Development Array
	add_to_array = {
	    array = DEN_original_core_states_array
	    value = 101 #GREENLAND
	    index = 0
	}
	#States to add to the Development Array
	add_to_array = { DEN_original_core_states_array = 37 } #Sjaelland
	add_to_array = { DEN_original_core_states_array = 911 } #Fyn
	add_to_array = { DEN_original_core_states_array = 99 } #Norrejylland
	add_to_array = { DEN_original_core_states_array = 912 } #Sonderjylland
	add_to_array = { DEN_original_core_states_array = 910 } #Bornholm
	add_to_array = { DEN_original_core_states_array = 337 } #Faroes
	add_to_array = { DEN_original_core_states_array = 124 } #Gotland
	add_to_array = { DEN_original_core_states_array = 100 } #Iceland
	#Set up variable in each state
	for_each_scope_loop = {
	    array = DEN_original_core_states_array
	    set_variable = { DEN_develop_state_cost = 25 }
	}

	#set_variable = { DEN_unruly_subject_modifier = -10 } #Modifying Opinions this way doesn't work yet
}

#### TECH SET UP
if = {
	limit = { not = { has_dlc = "Man the Guns" } }
	set_technology = {
		early_submarine = 1
		early_destroyer = 1
		early_heavy_cruiser = 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
		early_ship_hull_submarine = 1
		early_ship_hull_cruiser = 1
		basic_battery = 1
		basic_cruiser_armor_scheme = 1
		basic_torpedo = 1
		coastal_defense_ships = 1
		mtg_transport = 1
	}
}




if = {
	limit = {
		has_dlc = "Arms Against Tyranny"
	}
	set_politics = {
		ruling_party = democratic
		last_election = "1935.10.22"
		election_frequency = 42
		elections_allowed = yes
	}
	set_popularities = {
		democratic = DEN_democratic_popularity
		fascism = DEN_fascism_popularity
		communism = DEN_communism_popularity
		neutrality = DEN_neutrality_popularity
	}

	store_core_states_on_game_start = yes
}
if = {
	limit = {
		NOT = { has_dlc = "Arms Against Tyranny" }
	}
	set_popularities = {
		democratic = 94
		fascism = 1
		communism = 2
		neutrality = 3
	}
	set_politics = {
		ruling_party = democratic
		last_election = "1935.10.22"
		election_frequency = 48
		elections_allowed = yes
	}
}



set_convoys = 55

### 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 = "Rota Class"								# represents Rota and Daphne classes
		type = ship_hull_submarine_1
		name_group = DEN_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
		}
	}
	# Heavy Cruisers #
	create_equipment_variant = {
		name = "Herluf Trolle Class"				
		type = ship_hull_cruiser_coastal_defense_ship
		name_group = DEN_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_2
			fixed_ship_secondaries_slot = ship_secondaries_1
			mid_1_custom_slot = empty
			mid_2_custom_slot = empty
			rear_1_custom_slot = ship_torpedo_1
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Niels Iuel Class"				
		type = ship_hull_cruiser_coastal_defense_ship
		name_group = DEN_CA_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_medium_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = cruiser_ship_engine_1
			fixed_ship_armor_slot = ship_armor_cruiser_2
			fixed_ship_secondaries_slot = empty
			mid_1_custom_slot = ship_anti_air_1
			mid_2_custom_slot = empty
			rear_1_custom_slot = ship_light_medium_battery_1
		}
	}
}

add_equipment_to_stockpile = {
	type = train_equipment_1
	amount = 7
}

add_ideas = CRI_first_world_country
set_convoys = 5
