capital = 613 # Nanjing

oob = "CHI_1936"
if = {
	limit = { has_dlc = "Man the Guns" }
		set_naval_oob = "CHI_1936_naval_mtg"
	else = {
		set_naval_oob = "CHI_1936_naval_legacy"
	}
}
if = {
	limit = { has_dlc = "By Blood Alone" }
		set_air_oob = "CHI_1936_air_bba"
	else = {
		set_air_oob = "CHI_1936_air_legacy"
		set_technology = {
			early_fighter = 1
			early_bomber = 1
		}
	}
}

recruit_character = CHI_chiang_kaishek
recruit_character = CHI_zhang_guotao
recruit_character = CHI_wang_jingwei
recruit_character = CHI_weng_wenhao
recruit_character = CHI_tu_yuming
recruit_character = CHI_hsueh_yueh
recruit_character = CHI_tai_anlan
recruit_character = CHI_wang_yaowu
recruit_character = CHI_sun_li_jen
recruit_character = CHI_hu_zongnan
recruit_character = CHI_gu_zhutong
recruit_character = CHI_wei_lihuang
recruit_character = CHI_fu_zuoyi
recruit_character = CHI_zhang_xueliang
recruit_character = CHI_fang_zeyi
recruit_character = CHI_zhu_de
recruit_character = CHI_chen_cheng
recruit_character = CHI_li_zongren
recruit_character = CHI_bo_yibo
recruit_character = CHI_huang_shen
recruit_character = CHI_chen_jitang
recruit_character = CHI_wang_shuming
recruit_character = CHI_bai_chongxi
recruit_character = CHI_zhou_zhirou
recruit_character = CHI_xiao_yisu
recruit_character = CHI_chen_shaokuan
recruit_character = CHI_xiao_jinguang
recruit_character = CHI_yu_hanmou
recruit_character = CHI_he_yingqin
recruit_character = CHI_gao_zhihang
recruit_character = CHI_h_h_kung
recruit_character = CHI_chen_guofu
recruit_character = CHI_chiang_ching_kuo
recruit_character = CHI_chen_yi
recruit_character = CHI_soong_mei_ling
recruit_character = CHI_random_prince_of_terror
recruit_character = CHI_lin_sen
recruit_character = CHI_wang_ganchang

set_stability = 0.2
set_war_support = 0.5
# Starting tech
set_technology = {
	infantry_weapons = 1
	gw_artillery = 1
	interwar_antiair = 1
	mass_assault = 1
	fleet_in_being = 1
	basic_train = 1
}
if = {
	limit = {
		has_dlc = "No Step Back"
	}
	set_technology = {
		gwtank_chassis = 1
	}
	else = {
		set_technology = {
			gwtank = 1
		}
	}
}
if = {
	limit = { not = { has_dlc = "Man the Guns" } }
	set_technology = {
		early_destroyer = 1
		early_light_cruiser = 1
	}
}
if = {
	limit = { has_dlc = "Man the Guns" }
	set_technology = {
		basic_naval_mines = 1
		early_ship_hull_light = 1
		early_ship_hull_cruiser = 1
		basic_battery = 1
		basic_torpedo = 1
		coastal_defense_ships = 1
	}
}

600 = { #Jiangxi
	add_dynamic_modifier = { modifier = dense_rural_infrastructure }
}
749 = { #Huangshan
	add_dynamic_modifier = { modifier = dense_rural_infrastructure }
}
606 = { #Anhui
	add_dynamic_modifier = { modifier = dense_rural_infrastructure }
}
607 = { #Henan
	add_dynamic_modifier = { modifier = dense_rural_infrastructure }
}
620 = { #Hubei
	add_dynamic_modifier = { modifier = dense_rural_infrastructure }
}
602 = { #Hunan
	add_dynamic_modifier = { modifier = dense_rural_infrastructure }
}
750 = { #Changde
	add_dynamic_modifier = { modifier = dense_rural_infrastructure }
}
744 = { #Xian
	add_dynamic_modifier = { modifier = dense_rural_infrastructure }
}
605 = { #Sichuan
	add_dynamic_modifier = { modifier = dense_rural_infrastructure }
}
748 = { #Zunyi
	add_dynamic_modifier = { modifier = dense_rural_infrastructure }
}
603 = { #Guizhu
	add_dynamic_modifier = { modifier = dense_rural_infrastructure }
}
615 = { #Shanxi
	add_dynamic_modifier = { modifier = dense_rural_infrastructure }
}
622 = { #Shaanxi
	add_dynamic_modifier = { modifier = dense_rural_infrastructure }
}
325 = { #Yunnan
	add_dynamic_modifier = { modifier = dense_rural_infrastructure }
}
325 = { #Dali
	add_dynamic_modifier = { modifier = dense_rural_infrastructure }
}

add_ideas = {
	CHI_nine_power_treaty
	CHI_army_corruption_1
	CHI_ineffective_bureaucracy
	CHI_incompetent_officers
	free_trade
	CHI_hyper_inflation_1
	german_advisors
}

save_global_event_target_as = WTT_current_china_leader

set_convoys = 40

1939.1.1 = {

	add_political_power = 1198
	add_command_power = 100
	set_stability = 0.5
	set_war_support = 0.7
	
	if = {
		limit = { has_dlc = "Waking the Tiger" }
		complete_national_focus = CHI_unified_industrial_planning
		complete_national_focus = CHI_mission_to_germany
		complete_national_focus = CHI_rural_reconstruction_movement
		complete_national_focus = CHI_invite_foreign_investors
		complete_national_focus = CHI_british_cooperation
		unlock_national_focus = CHI_fighter_purchases
		complete_national_focus = CHI_mission_to_the_us
		complete_national_focus = CHI_mission_to_the_soviet_union
		complete_national_focus = CHI_hire_chennault
		complete_national_focus = CHI_rapprochement_with_soviet_union
		complete_national_focus = CHI_invite_soviet_advisers
		complete_national_focus = CHI_military_affairs_commission
		complete_national_focus = CHI_burma_road
		unlock_national_focus = CHI_the_soviet_volunteer_group
		complete_national_focus = CHI_bureau_of_investigation_and_statistics
		complete_national_focus = CHI_camco
		complete_national_focus = CHI_three_principles_of_the_people
		complete_national_focus = CHI_army_reform
		complete_national_focus = CHI_nationalism
		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 = flexible_navy
			complete_national_focus = industrial_effort
			complete_national_focus = construction_effort
			complete_national_focus = production_effort
		}
	}

	add_ideas = {
		#laws
		war_economy
		service_by_requirement
		closed_economy

		#ministers
		CHI_bo_yibo
		CHI_xiao_yisu
		CHI_chen_shaokuan
		jiangnan_shipyard_group
		camco

	}
	if = {
		limit = {
			has_dlc = "Waking the Tiger"
		}
		remove_ideas = CHI_army_corruption_1
		add_ideas = {
			#national spirits
			CHI_hyper_inflation_1
			CHI_nine_power_treaty
			CHI_army_corruption_2
			CHI_ineffective_bureaucracy
			CHI_incompetent_officers
			free_trade
			CHI_military_affairs_commission
		}
	}
	
	set_global_flag = fall_of_nanjing
	create_faction = chinese_united_front
	add_to_faction = PRC
	remove_opinion_modifier = { target = PRC modifier = hostile_status }
	#load_oob = "CHI_united_front"
	set_global_flag = CHI_unite
	
	oob = "CHI_1939"
	if = {
		limit = { has_dlc = "By Blood Alone" }
			set_air_oob = "CHI_1939_air_bba"
		else = {
			set_air_oob = "CHI_1939_air_legacy"
		}
	}
	if = {
		limit = { has_dlc = "Man the Guns" }
			set_naval_oob = "CHI_1939_naval_mtg"
		else = {
			set_naval_oob = "CHI_1939_naval_legacy"
		}
	}
	set_technology = {

		#PLACEHOLDER techs for vehicles
		motorised_infantry = 1
		tech_support = 1		
		tech_recon = 1
		tech_engineers = 1
		tech_trucks = 1

		#doctrines
		air_superiority = 1
		pocket_defence = 1
		defence_in_depth = 1
		battlefleet_concentration = 1
		convoy_sailing = 1

		#electronics
		electronic_mechanical_engineering = 1
		radio = 1
		mechanical_computing = 1
		computing_machine = 1
		basic_encryption = 1
		basic_decryption = 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
		construction3 = 1
		concentrated_industry = 1
		concentrated_industry2 = 1
		concentrated_industry3 = 1
	}
	complete_special_project = {
		project = sp:sp_air_radar
	}
}

set_politics = {
	ruling_party = neutrality
	last_election = "1936.1.1"
	election_frequency = 48
	elections_allowed = no
}

set_popularities = {
	neutrality = 100
}

add_opinion_modifier = { target = PRC modifier = hostile_status }

### VARIANTS ###
# 1936 Start #
if = {
	limit = { not = { has_dlc = "Man the Guns" } }
}
if = {
	limit = { has_dlc = "Man the Guns" }
	# Destroyers #
	create_equipment_variant = {
		name = "Jianwei Class"			
		type = ship_hull_light_1
		name_group = CHI_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 = empty
			mid_1_custom_slot = empty
			rear_1_custom_slot = empty
		}
	}
	# Light Cruisers #
	create_equipment_variant = {
		name = "Hairong Class"					# Hairong protected cruisers and Zhaohe, Yingrui training cruisers
		type = ship_hull_cruiser_coastal_defense_ship
		name_group = CHI_CL_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_medium_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 = cruiser_ship_engine_1
			fixed_ship_armor_slot = ship_armor_cruiser_1
			mid_1_custom_slot = empty
			mid_2_custom_slot = empty
			rear_1_custom_slot = empty
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Haiqi Class"
		type = ship_hull_cruiser_coastal_defense_ship
		name_group = CHI_CL_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_medium_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 = cruiser_ship_engine_1
			fixed_ship_secondaries_slot = ship_secondaries_1
			fixed_ship_armor_slot = ship_armor_cruiser_1
			mid_1_custom_slot = empty
			mid_2_custom_slot = empty
			rear_1_custom_slot = empty
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Ninghai Class"
		type = ship_hull_cruiser_1
		name_group = CHI_CL_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
			mid_1_custom_slot = ship_torpedo_1
			mid_2_custom_slot = empty
			rear_1_custom_slot = empty
		}
	}
}
