capital = 6 # Brussels

IF = {
	limit = { 
		has_dlc = "Gotterdammerung"
		has_dlc = "La Resistance"
	}
	set_technology = {
		armored_car1 = 1
	}
	set_oob = "BEL_WW_1936_lar"
	ELSE_IF = {
		limit = {
			has_dlc = "Gotterdammerung"
			NOT = {
				has_dlc = "La Resistance"
			}
		}
		set_oob = "BEL_WW_1936"
	}
	ELSE_IF = {
		limit = {
			NOT = {
				has_dlc = "Gotterdammerung"
			}
		}
		set_oob = "BEL_1936"
	}
}


if = {
	limit = { has_dlc = "By Blood Alone" }
		set_air_oob = "BEL_1936_air_bba"
	else = {
		set_technology = {
			early_fighter = 1
		}
		set_air_oob = "BEL_1936_air_legacy"
	}
}

if = {
	limit = {
		has_dlc = "Gotterdammerung"
	}
	give_guarantee = FRA
	give_guarantee = ENG
}

set_research_slots = 3
set_stability = 0.7
set_war_support = 0.3 #we see what you are doing there Adolf

set_technology = {
	infantry_weapons = 1
	infantry_weapons1 = 1
	tech_support = 1
	tech_recon = 1
	tech_engineers = 1
	tech_trucks = 1
	motorised_infantry = 1
	trench_warfare = 1
	fuel_silos = 1
	fuel_refining = 1
	basic_train = 1
	gw_artillery = 1
	interwar_antitank = 1
	BEL_chasseurs_ardennais = 1 
	tech_mountaineers = 1
}

IF = {
	limit = {
		has_dlc = "No Step Back"
	}
	set_technology = {
		gwtank_chassis = 1
		basic_light_tank_chassis = 1
	}
	else = {
		set_technology = {
			gwtank = 1
			basic_light_tank = 1
			basic_light_td = 1
		}
	}
}

if = {
	limit = { not = { has_dlc = "Man the Guns" } }
	set_technology = {
		early_destroyer = 1
	}
}

if = {
	limit = { has_dlc = "Man the Guns" }
	set_technology = {
		early_ship_hull_light = 1
		basic_battery = 1
	}
}

if = {
	limit = { has_dlc = "By Blood Alone" }
		set_air_oob = "BEL_1936_air_bba"
		set_technology = {
			aa_lmg = 1
			engines_1 = 1
			early_bombs = 1
			aircraft_construction = 1
			iw_small_airframe = 1
			iw_medium_airframe = 1
			iw_large_airframe = 1
			bba_early_transport_plane = 1
		}
	else = {
		set_air_oob = "BEL_1936_air_legacy"
		set_technology = {
			early_fighter = 1
			cv_early_fighter = 1
			cv_naval_bomber1 = 1
			naval_bomber1 = 1
			early_bomber = 1
			CAS1 = 1
			early_transport_plane = 1
		}
	}
}

## VARIABLES ##

## Starting NS's

# Scars of WW1

IF = {
	limit = { has_dlc = "Gotterdammerung" }

	add_dynamic_modifier = {
		modifier = BEL_scars_of_ww1_dynamic_modifier
	}
	set_variable = { BEL_scars_of_ww1_war_support_factor = -0.3 }
	set_variable = { BEL_scars_of_ww1_production_speed_arms_factory_factor = -0.2 }
	set_variable = { BEL_scars_of_ww1_army_org_factor = -0.15 }
	set_variable = { BEL_scars_of_ww1_conscription_factor = -0.15 }

	# Corruption
	add_dynamic_modifier = {
		modifier = BEL_corruption_dynamic_modifier
	}
	set_variable = { BEL_corruption_political_power_gain = -0.25 }
	set_variable = { BEL_corruption_stability_factor = -0.20 }
	set_variable = { BEL_corruption_production_speed_buildings_factor = -0.20 }
	set_variable = { BEL_corruption_fascism_drift = 0.10 }

	# Economic Downturn
	add_dynamic_modifier = {
		modifier = BEL_economic_downturn_dynamic_modifier
	}
	set_variable = { BEL_economic_downturn_consumer_goods_factor = 0.25 }
	set_variable = { BEL_economic_downturn_industrial_capacity_factory = -0.20 }

	# King Leopold
	set_country_flag = BEL_leopold_flag
}


## Earned NS's

# Neutrality
set_variable = { BEL_neutrality_production_speed_buildings_factor = 0.1 }
set_variable = { BEL_neutrality_production_speed_arms_factory_factor = 0 }
set_variable = { BEL_neutrality_production_speed_infrastructure_factor = 0 }
set_variable = { BEL_neutrality_production_speed_industrial_complex_factor = 0 }
set_variable = { BEL_neutrality_join_faction_tension = 1 }
set_variable = { BEL_neutrality_justify_war_goal_time = 1 }
set_variable = { BEL_neutrality_guarantee_tension = 1 }
set_variable = { BEL_neutrality_enemy_justify_war_goal_time = 0 }
set_variable = { BEL_neutrality_send_volunteers_tension = 0 }
set_variable = { BEL_neutrality_lend_lease_tension = 0 }
set_variable = { BEL_neutrality_embargo_threshold_factor = 0 }

# Defensive Neutrality
set_variable = { BEL_defensive_neutrality_max_dig_in = 0 }
set_variable = { BEL_defensive_neutrality_production_speed_bunker_factor = 0 } 
set_variable = { BEL_defensive_neutrality_land_bunker_effectiveness_factor = 0 }
set_variable = { BEL_defensive_neutrality_bunker_max_level_terrain_limit = 0 }
set_variable = { BEL_defensive_neutrality_coastal_bunker_max_level_terrain_limit = 0 }
set_variable = { BEL_defensive_neutrality_surrender_limit = 0 }
set_variable = { BEL_defensive_neutrality_army_core_defence_factor = 0 }
set_variable = { BEL_defensive_neutrality_training_time_factor = 0 }
set_variable = { BEL_defensive_neutrality_mobilization_speed = 0 }

# Social Partners
set_variable = { BEL_social_partners_industry_free_repair_factor = 0.1 }
set_variable = { BEL_social_partners_production_factory_start_efficiency_factor = 0.05 }
set_variable = { BEL_social_partners_industrial_capacity_dockyard = 0.05 }
set_variable = { BEL_social_partners_industrial_capacity_factory = 0 }
set_variable = { BEL_social_partners_production_speed_rail_way_factor = 0 }
set_variable = { BEL_social_partners_production_speed_supply_node_factor = 0 }
set_variable = { BEL_social_partners_production_factory_max_efficiency_factor = 0 }
set_variable = { BEL_social_partners_production_speed_buildings_factor = 0 }
set_variable = { BEL_social_partners_production_factory_efficiency_gain_factor = 0 }

# Mobilize the Nation
set_variable = { BEL_mobilize_the_nation_conscription = 0.015 }

# Royal Military Academy
set_variable = { BEL_royal_military_academy_army_org_factor = 0 }
set_variable = { BEL_royal_military_academy_initiative_factor = 0 }
set_variable = { BEL_royal_military_academy_army_artillery_attack_factor = 0 }
set_variable = { BEL_royal_military_academy_army_attack_factor = 0 }
set_variable = { BEL_royal_military_academy_max_planning_factor = 0.10 }
set_variable = { BEL_royal_military_academy_army_leader_start_planning_level = 0 }
set_variable = { BEL_royal_military_academy_army_leader_start_logistics_level = 0 }

# Colonial Returns Modifier
set_variable = { BEL.BEL_belgian_congo_colonial_returns_dynamic_modifier_political_power_factor = 0.1 }
set_variable = { BEL.BEL_belgian_congo_colonial_returns_dynamic_modifier_resource_trade_cost_bonus_per_factory = 0 }
set_variable = { BEL.BEL_belgian_congo_colonial_returns_dynamic_modifier_production_lack_of_resource_penalty_factor = 0 }
set_variable = { BEL.BEL_belgian_congo_colonial_returns_dynamic_modifier_industrial_capacity_factory = 0 }
set_variable = { BEL.BEL_belgian_congo_colonial_returns_dynamic_modifier_industrial_capacity_dockyard = 0 }
set_variable = { BEL.BEL_belgian_congo_colonial_returns_dynamic_modifier_industrial_capacity_dockyard = 0 }
set_variable = { BEL.BEL_belgian_congo_colonial_returns_dynamic_modifier_consumer_goods_factor = 0 }
set_variable = { BEL.BEL_belgian_congo_colonial_returns_dynamic_modifier_air_training_xp_gain_factor = 0 }
set_variable = { BEL.BEL_belgian_congo_colonial_returns_dynamic_modifier_production_speed_air_base_factor = 0 }

# Gold Reserves
set_variable = { BEL_gold_reserves_consumer_goods_factor = -0.1 }

#Belgian Socialism
set_variable = { BEL_socialism_on_the_rise_communnism_drift = 0 }
set_variable = { BEL_socialism_on_the_rise_party_popularity_stability_factor = 0 }
set_variable = { BEL_socialism_on_the_rise_political_power_factor = 0.1 }
set_variable = { BEL_socialism_on_the_rise_stability_factor = 0.05}
set_variable = { BEL_socialism_on_the_rise_war_support_factor = 0 }
set_variable = { BEL_socialism_on_the_rise_production_speed_arms_factory_factor = 0 }
set_variable = { BEL_socialism_on_the_rise_research_speed_factor = 0 }

# Dynamic Modifier for Belgian Special Projects
set_variable = { BEL_academies_of_belgium_specialization_nuclear_speed_factor = 0 }
set_variable = { BEL_academies_of_belgium_sp_tag_nuclear_warfare_speed_factor = 0 }
set_variable = { BEL_academies_of_belgium_sp_tag_nuclear_power_speed_factor = 0 }
set_variable = { BEL_academies_of_belgium_sp_tag_helicopter_speed_factor = 0 }
set_variable = { BEL_academies_of_belgium_special_project_speed_factor = 0 }
set_variable = { BEL_academies_of_belgium_production_speed_facility_factor = 0 }
set_variable = { BEL_academies_of_belgium_production_speed_air_facility_factor = 0 }

### Dynamic State Modifiers

#Belgian Resistance
set_variable = { BEL_belgian_resistance_resistance_growth = 0.2 } #0.2
set_variable = { BEL_belgian_resistance_resistance_damage_to_garrison = 0.1 } #0.2
set_variable = { BEL_belgian_resistance_resistance_target = 0.2 } #0.2

#The Belgian Legion
set_variable = { BEL_belgian_legion_army_infantry_attack_factor = 0 }
set_variable = { BEL_belgian_legion_exile_manpower_factor = 0 }

#Rexist Legion
set_variable = { BEL_rexist_legion_army_core_attack_factor = 0.1 }
set_variable = { BEL_rexist_legion_army_core_defence_factor = 0.1 }
set_variable = { BEL_rexist_legion_army_org_factor = 0 }
set_variable = { BEL_rexist_legion_army_infantry_attack_factor = 0 }
set_variable = { BEL_rexist_legion_army_infantry_defence_factor = 0 }
set_variable = { BEL_rexist_legion_conscription_factor = 0 }
set_variable = { BEL_rexist_legion_land_night_attack = 0 }

IF = {
	limit = {
		has_dlc = "La Resistance"
	}
	BEL_create_jozef_raskin_operative = yes
}

if = {
	limit = { has_dlc = Gotterdammerung }
	recruit_character = BEL_hubert_pierlot
	recruit_character = BEL_paul_van_zeeland
	recruit_character = BEL_paul_emile_janson
	recruit_character = BEL_paul_henri_spaak
	recruit_character = BEL_emile_vanderveld
	recruit_character = BEL_leon_degrelle
	recruit_character = BEL_henri_de_man
	recruit_character = BEL_achille_van_acker
	recruit_character = BEL_king_leopold_iii
	recruit_character = BEL_raoul_van_overstraeten
	recruit_character = BEL_oscar_michiels
	recruit_character = BEL_victor_van_strydonck_de_burkel
	recruit_character = BEL_jules_pire
	recruit_character = BEL_raoul_daufresne_de_la_chevalerie
	recruit_character = BEL_maurice_keyaerts
	recruit_character = BEL_yvan_gerard
	recruit_character = BEL_lucien_lippert
	recruit_character = BEL_jean_baptise_piron
	recruit_character = BEL_victor_descamps
	recruit_character = BEL_lambert_chardome
	recruit_character = BEL_eddy_blondeel
	recruit_character = BEL_georges_timmermans
	recruit_character = BEL_willy_coppens
	recruit_character = BEL_remy_van_lierde
	recruit_character = BEL_jean_offenburg
	recruit_character = BEL_raymond_lallemant
	recruit_character = BEL_dieudonne_salve
	recruit_character = BEL_prudent_nuyten
	recruit_character = BEL_albert_deveze
	recruit_character = BEL_edouard_van_den_burgen
	recruit_character = BEL_camille_gutt
	recruit_character = BEL_camille_huysmans
	recruit_character = BEL_julien_lahaut
	recruit_character = BEL_emile_de_cartier_de_marchienne
	recruit_character = BEL_edgar_sengier
	recruit_character = BEL_walthere_dewe
	recruit_character = BEL_august_borms
	recruit_character = BEL_charles_count_of_flanders_person
	recruit_character = BEL_fernand_verstraete
	recruit_character = BEL_nicolas_florine
	recruit_character = BEL_karel_bossart
	recruit_character = BEL_georges_lemaitre
	recruit_character = BEL_alfred_renard
	recruit_character = BEL_mike_donnet
	recruit_character = BEL_auguste_piccard
	else = {
		recruit_character = BEL_hubert_pierlot
		recruit_character = BEL_joseph_jacquemotte
		recruit_character = BEL_mcl_keyaerts
		recruit_character = BEL_georges_timmermans
		recruit_character = BEL_gilles_wyvekens
		recruit_character = BEL_fritz_conrad
		recruit_character = BEL_raoul_van_overstraeten
		recruit_character = BEL_georges_deffontaine
		recruit_character = BEL_victor_strydonck_burkel
		recruit_character = BEL_georges_vereecken
		recruit_character = BEL_jules_pire
		recruit_character = BEL_oscar_michiels
		recruit_character = BEL_charles_bastin
		recruit_character = BEL_yvan_gerard
		recruit_character = BEL_rene_lagrou
		recruit_character = BEL_leon_degrelle
		recruit_character = BEL_fritz_lob
		recruit_character = BEL_jules_iserentant
		recruit_character = BEL_paul_henri_spaak
		recruit_character = BEL_gaston_eyskens
		recruit_character = BEL_paul_van_zeeland
	}
}


IF = {
	limit = {
		has_dlc = "Gotterdammerung"
	}
	set_autonomy = {
		target = COG
		autonomous_state = autonomy_colony
		freedom_level = 0.2
	}
}

IF = {
	limit = {
		has_dlc = "No Step Back"
		has_dlc = "Gotterdammerung"
	}
	create_equipment_variant = {
		name = "T13 B1"
		type = light_tank_destroyer_chassis_1
		parent_version = 1
		design_team = mio:BEL_vickers_armstrong_bel_organization
		modules = {
			main_armament_slot = tank_high_velocity_cannon
			turret_type_slot = tank_light_two_man_tank_turret
			suspension_type_slot = tank_bogie_suspension
			armor_type_slot = tank_riveted_armor
			engine_type_slot = tank_gasoline_engine
		}
		icon = "GFX_BEL_basic_light_td_tank_medium"
		upgrades = {
			tank_nsb_engine_upgrade = 2
			tank_nsb_armor_upgrade = 2
		}
	}

	ELSE_IF = {
		limit = {
			has_dlc = "No Step Back"
			NOT = { has_dlc = "Gotterdammerung" }
		}
		create_equipment_variant = {
			name = "T13 B1"
			type = light_tank_destroyer_chassis_1
			parent_version = 1
			design_team = mio:BEL_vickers_armstrong_bel_organization
			modules = {
				main_armament_slot = tank_high_velocity_cannon
				turret_type_slot = tank_light_two_man_tank_turret
				suspension_type_slot = tank_bogie_suspension
				armor_type_slot = tank_riveted_armor
				engine_type_slot = tank_gasoline_engine
			}
			upgrades = {
				tank_nsb_engine_upgrade = 2
				tank_nsb_armor_upgrade = 2
			}
		}
	}
}



1939.1.1 = {
	add_ideas = {
		limited_conscription
	}

	add_political_power = 1198
	add_command_power = 100

	#generic focuses

	IF = {
		limit = { 
			has_dlc = "Gotterdammerung"
		}
		complete_national_focus = BEL_government_resigns
		complete_national_focus = BEL_investigate_bribery_charges
		complete_national_focus = BEL_monetary_reconstruction
		complete_national_focus = BEL_rebuild_wallonian_industry
		complete_national_focus = BEL_gold_reserves
		complete_national_focus = BEL_perpetual_neutrality
		complete_national_focus = BEL_independent_neutral_and_loyal
		complete_national_focus = BEL_defense_bill
		complete_national_focus = BEL_repudiate_treaty_with_france
		complete_national_focus = CONGO_congo_investments
		complete_national_focus = CONGO_societe_generale_de_belgique
		complete_national_focus = CONGO_force_publique
		complete_national_focus = BEL_government_of_national_unity
		complete_national_focus = BEL_royal_intervention
		complete_national_focus = BEL_paul_emile_janson # Usually taken by event
		complete_national_focus = BEL_plan_de_man
		complete_national_focus = BEL_defensive_neutrality
		complete_national_focus = BEL_dyle_plan
		complete_national_focus = BEL_economic_recovery
		complete_national_focus = BEL_social_partners
		complete_national_focus = CONGO_forminiere
		complete_national_focus = BEL_adriaan_martens_crisis # Pierlot added as if per event
		#complete_national_focus = BEL_increased_length_of_service ## Removed to give more fortifications.
		complete_national_focus = BEL_fn_herstal
		complete_national_focus = BEL_national_redoubt_at_antwerp
		complete_national_focus = BEL_fortify_liege
		complete_national_focus = BEL_eben_emael_fortress

		else = {
			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 = flexible_navy
			complete_national_focus = industrial_effort
			complete_national_focus = construction_effort
			complete_national_focus = production_effort
		}
	}

	IF = { #Adding Pierlot as per Adriaan Martens Crisis!
		limit = {
			has_dlc = "Gotterdammerung"
		}
		add_country_leader_role = {
		    character = BEL_hubert_pierlot
		    promote_leader = yes
		    country_leader = {
		        ideology = conservatism
		        expire = "1965.1.1.1"
		        traits = { BEL_determined_prime_minister }
		    }
		}

		set_party_name = {
			ideology = democratic
			long_name = BEL_democratic_party_long
			name = BEL_democratic_party
		}
	}

	IF = {
		limit = { 
			has_dlc = "Gotterdammerung"
		}
		set_oob = "BEL_WW_1939"
	}
	IF = {
		limit = {
			NOT = {
				has_dlc = "Gotterdammerung"
			}
		}
		set_oob = "BEL_1939"
	}

	if = {
		limit = { has_dlc = "By Blood Alone" }
			set_air_oob = "BEL_1939_air_bba"
		else = {
			set_air_oob = "BEL_1939_air_legacy"
			set_technology = {
				fighter1 = 1
			}
		}
	}

	if = {
		limit = {
			has_dlc = "Gotterdammerung"
		}
		if = {
			limit = {
				has_guaranteed = FRA
			}
			diplomatic_relation = { 
				country = FRA
				relation = guarantee 
				active = no
			}
		}
		if = {
			limit = {
				has_guaranteed = ENG
			}
			diplomatic_relation = { 
				country = ENG
				relation = guarantee 
				active = no
			}
		}
	}
	set_technology = {
		gw_artillery = 1
		interwar_artillery = 1
		interwar_antitank = 1
		interwar_antiair = 1
		infantry_weapons2 = 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
		construction1 = 1
		construction2 = 1
		dispersed_industry = 1
		dispersed_industry2 = 1
		synth_oil_experiments = 1
		fuel_refining2 = 1
	}
	complete_special_project = {
		project = sp:sp_air_radar
	}
}


set_politics = {
	ruling_party = democratic
	last_election = "1932.11.27"
	election_frequency = 48
	elections_allowed = yes
}

set_popularities = {
	democratic = 83
	fascism = 11
	communism = 6
}

1939.1.1 = {
	set_politics = {
		ruling_party = democratic
		last_election = "1939.4.2"
		election_frequency = 48
		elections_allowed = yes
	}
	set_popularities = {
		democratic = 87
		fascism = 8
		communism = 5
	}
}

set_convoys = 80
set_stability = 0.75

IF = {
	limit = { has_dlc = "Gotterdammerung" }
	add_ideas = {
		BEL_language_barriers_ns
		BEL_chasseurs_ardennais_ns
	}
}

