
############################################
### THE GREAT EMPIRE OF MING FOCUS TREE ####
############################################

focus_tree = {
    id = ming_focustree

    country = {
        factor = 0
        modifier = {
            add = 10
            tag = MIG
        }
    }

    default = no

    ####################################
    #### THE MANDATE OF HEAVEN PATH ####
    ####################################

    focus = {
        id = MIG_mandate_of_heaven
        icon =  GFX_MIG_mandate_of_heaven
        x = 38
        y = 0
        cost = 10
        completion_reward = {
			add_political_power = 75
			army_experience = 5
			add_stability = 0.05
        }
    }

    focus = {
        id = MIG_secure_the_court
        icon =  GFX_focus_generic_court
		relative_position_id = MIG_mandate_of_heaven
        x = -1
        y = 1
        cost = 5
		prerequisite = { focus = MIG_mandate_of_heaven }
        completion_reward = {
			swap_ideas = {
				remove_idea = MIG_a_fractured_mandate
				add_idea = MIG_a_fractured_mandate2
			}
        }
    }
    focus = {
        id = MIG_rebuilding_efforts
        icon =  GFX_SOV_rebuild_the_nation_ccp_2d_sov_compatibility
		relative_position_id = MIG_mandate_of_heaven
        x = 1
        y = 1
        cost = 5
		prerequisite = { focus = MIG_mandate_of_heaven }
        completion_reward = {
			add_war_support = 0.1
			add_timed_idea = { idea = MING_rebuilding_efforts days = 232 } ### Consumer goods 0.05 and output -0.05
        }
    }
    focus = {
        id = MIG_mandate_reaffirmed
        icon =  GFX_MIG_mandate_reaffirmed
		relative_position_id = MIG_secure_the_court
        x = 1
        y = 1
        cost = 5
		prerequisite = { focus = MIG_secure_the_court }
		prerequisite = { focus = MIG_rebuilding_efforts }
        completion_reward = {
			add_stability = 0.1
			add_timed_idea = { idea = MING_mandate_reaffirmed days = 565 }

			news_event = ming.200 ### Mandate Reaffirmed
        }
    }


    ###############################################
    #### THE PATH TO THE SECOND REPUBLICAN WAR ####
    ###############################################

    focus = {
        id = MIG_purge_the_reformists
        icon =  GFX_MIG_purge_the_reformists
		relative_position_id = MIG_mandate_reaffirmed
		mutually_exclusive = { focus = MIG_coorperate_with_the_republicans }
        x = -5
        y = 1
        cost = 10
		prerequisite = { focus = MIG_mandate_reaffirmed}
        completion_reward = {
			country_event = ming.1 ### Execute or Trials
			custom_effect_tooltip = tooltipwhitelinelol
			custom_effect_tooltip = historicalpath_tt
        }
    }

    focus = {
        id = MIG_placate_the_assembly
        icon =  GFX_SOV_expand_aviation_institutes_ccp_2d_sov_compatibility
		relative_position_id = MIG_purge_the_reformists
        x = 0
        y = 1
        cost = 5
		prerequisite = { focus = MIG_purge_the_reformists}
        completion_reward = {
			add_stability = 0.1
			add_timed_idea = { idea = MING_placated_assembly days = 255 } ### decrease stability but political power gain
        }
    }

    focus = {
        id = MIG_lessons_of_the_revolution
        icon =  GFX_SOV_lessons_of_war_ccp_2d_sov_compatibility
		relative_position_id = MIG_placate_the_assembly
        x = 0
        y = 1
        cost = 5
		prerequisite = { focus = MIG_placate_the_assembly}
        completion_reward = {
			army_experience = 25
			add_ideas = MING_lessons_of_the_revolution
        }
    }

    focus = {
        id = MIG_a_chinese_economy
        icon =  GFX_focus_POL_warsaw_main_station
		relative_position_id = MIG_placate_the_assembly
        x = 2
        y = 1
        cost = 10
		prerequisite = { focus = MIG_placate_the_assembly}
        completion_reward = {
			add_timed_idea = { idea = MING_a_chinese_economy days = 638 }
        }
    }

    focus = {
        id = MIG_mobilise_all_layers_of_the_population
        icon =  GFX_focus_RAJ_union_busting
		relative_position_id = MIG_placate_the_assembly
        x = -2
        y = 1
        cost = 5
		prerequisite = { focus = MIG_placate_the_assembly}
        completion_reward = {
			add_manpower = 50000

			if = {
				limit = {
					OR = {
						has_idea = disarmed_nation
						has_idea = volunteer_only
					}
				}
				add_ideas = limited_conscription
			}
        }
    }

    focus = {
        id = MIG_redirect_rebuilding_toward_militarisation
        icon =  GFX_focus_AUS_raid_military_storages
		relative_position_id = MIG_mobilise_all_layers_of_the_population
        x = 0
        y = 1
        cost = 5
		prerequisite = { focus = MIG_mobilise_all_layers_of_the_population}
        completion_reward = {
			add_ideas = MING_militarisation
        }
    }

    focus = {
        id = MIG_anti_republicanism
        icon =  GFX_focus_RAJ_military_into_the_workforce
		relative_position_id = MIG_mobilise_all_layers_of_the_population
        x = -2
        y = 1
        cost = 5
		prerequisite = { focus = MIG_mobilise_all_layers_of_the_population}
        completion_reward = {
			add_ideas = MING_antirepublicans
        }
    }

    focus = {
        id = MIG_change_tianming_principles
        icon =  GFX_MIG_change_tianming_principles
		relative_position_id = MIG_placate_the_assembly
        x = 4
        y = 1
        cost = 5
		prerequisite = { focus = MIG_placate_the_assembly }
        completion_reward = {
			country_event = ming.7
        }
    }

    focus = {
        id = MIG_strengthen_roman_support
        icon =  GFX_focus_GER_demonstration_of_military_achievements
		relative_position_id = MIG_change_tianming_principles
        x = -1
        y = 1
        cost = 5
		prerequisite = { focus = MIG_change_tianming_principles }
        completion_reward = {
			swap_ideas = {
				remove_idea = MIG_eastromansupport
				add_idea = MIG_eastromansupport2
			}
        }
    }

    focus = {
        id = MIG_joint_research
        icon =  GFX_goal_continuous_research
		relative_position_id = MIG_change_tianming_principles
        x = 1
        y = 1
        cost = 5
		prerequisite = { focus = MIG_change_tianming_principles }
        completion_reward = {
			add_research_slot = 1 
        }
    }

    focus = {
        id = MIG_acquire_roman_tank_designs
        icon =  GFX_focus_generic_tank_assembly
		relative_position_id = MIG_strengthen_roman_support
		mutually_exclusive = { focus = MIG_acquire_roman_plane_designs }
        x = 0
        y = 1
        cost = 5
		prerequisite = { focus = MIG_strengthen_roman_support focus = MIG_joint_research }
        completion_reward = {
			army_experience = 20
			if = {
				limit = { 
					has_dlc = "No Step Back"
				}
				create_equipment_variant = {
					name = "Type 612"
					type = medium_tank_chassis_3
					modules = {
						main_armament_slot = tank_high_velocity_cannon
						turret_type_slot = tank_medium_three_man_tank_turret
						suspension_type_slot = tank_interleaved_suspension
						armor_type_slot = tank_welded_armor
						engine_type_slot = tank_gasoline_engine
						special_type_slot_1 = tank_radio_1
						special_type_slot_2 = sloped_armor
						special_type_slot_3 = smoke_launchers
					}
					upgrades = {
						tank_nsb_engine_upgrade = 6
						tank_nsb_armor_upgrade = 4
					}
				}
				create_equipment_variant = {
					name = "Type H. 771"
					type = heavy_tank_chassis_2
					modules = {
						main_armament_slot = tank_heavy_cannon
						turret_type_slot = tank_heavy_three_man_tank_turret
						suspension_type_slot = tank_interleaved_suspension
						armor_type_slot = tank_welded_armor
						engine_type_slot = tank_gasoline_engine
						special_type_slot_1 = tank_radio_1
						special_type_slot_2 = smoke_launchers
						special_type_slot_3 = additional_machine_guns
					}
					upgrades = {
						tank_nsb_engine_upgrade = 8
						tank_nsb_armor_upgrade = 6
					}
				}
			}
        }
    }

    focus = {
        id = MIG_acquire_roman_plane_designs
        icon =  GFX_focus_generic_copy_plane_designs
		relative_position_id = MIG_strengthen_roman_support
		mutually_exclusive = { focus = MIG_acquire_roman_tank_designs }
        x = 2
        y = 1
        cost = 5
		prerequisite = { focus = MIG_strengthen_roman_support focus = MIG_joint_research }
        completion_reward = {
			air_experience = 20
			if = {
				limit = {
					has_dlc = "By Blood Alone"
				}
				create_equipment_variant = { 
					name = "Shenyang 190" 
					type = small_plane_airframe_2
					allow_without_tech = no
					modules = {
						fixed_main_weapon_slot = light_mg_4x
						fixed_auxiliary_weapon_slot_1 = aircraft_cannon_1_2x
						engine_type_slot = engine_3_1x
						special_type_slot_1 = armor_plate_small
						special_type_slot_2 = drop_tanks	
					}
				}
			}
        }
    }



    focus = {
        id = MIG_future_of_the_empire
        icon =  GFX_MIG_future_of_the_empire
		relative_position_id = MIG_lessons_of_the_revolution
        x = 0
        y = 1
        cost = 5
		prerequisite = { focus = MIG_lessons_of_the_revolution}
        completion_reward = {
			add_war_support = 0.1
			create_faction = "Chinese Imperial Bloc"
			set_faction_leader = yes 

			add_to_faction = JKK
        }
    }

    focus = {
        id = MIG_path_to_unification
        icon =  GFX_SOV_fascist_youth_union_ccp_2d_sov_compatibility
		relative_position_id = MIG_future_of_the_empire
        x = 0
        y = 1
        cost = 5
		prerequisite = { focus = MIG_future_of_the_empire}
        completion_reward = {
			news_event = ming.201 ### An incident at the border
        }
    }

    focus = {
        id = MIG_destroy_the_republicans_once_and_for_all
        icon =  GFX_SOV_intervention_in_china_ccp_2d_sov_compatibility
		relative_position_id = MIG_path_to_unification
        x = 0
        y = 1
        cost = 5
		prerequisite = { focus = MIG_path_to_unification}
        completion_reward = {
			CRP = { country_event = ming.4 days = 1 } ### Give In Or War
        }
    }

    focus = {
        id = MIG_thexinjiangmenance
        icon =  GFX_goal_generic_occupy_states_ongoing_war
		relative_position_id = MIG_path_to_unification
        x = -2
        y = 1
        cost = 5
		prerequisite = { focus = MIG_path_to_unification}
        completion_reward = {
			XJX = { country_event = { id = ming.8 days = 1 }}
        }
    }

    focus = {
        id = MIG_cross_into_tibet
        icon =  GFX_SOV_experts_in_camouflage_ccp_2d_sov_compatibility
		relative_position_id = MIG_path_to_unification
        x = 2
        y = 1
        cost = 5
		prerequisite = { focus = MIG_path_to_unification}
        completion_reward = {
			TIB = { country_event = { id = ming.11 days = 1 }}
        }
    }

    focus = {
        id = MIG_china_united
        icon =  GFX_focus_chi_legislative_yuan
		relative_position_id = MIG_destroy_the_republicans_once_and_for_all
		available = {
		if = {
			AND = {
				OR = {
					NOT = { country_exists = CRP }
					CRP = { is_puppet = yes }
				}
				OR = {
					NOT = { country_exists = TIB }
					TIB = { is_puppet = yes }
				}
				OR = {
					NOT = { country_exists = XJX }
					XJX = { is_puppet = yes }
				}
			}
		}
		}
        x = 0
        y = 1
        cost = 5
		prerequisite = { focus = MIG_destroy_the_republicans_once_and_for_all}
		prerequisite = { focus = MIG_thexinjiangmenance }
		prerequisite = { focus = MIG_cross_into_tibet }
        completion_reward = {

			country_event = ming.25

			add_ideas = achinaunited
        }
    }

    ###############################################
    #### COORPERATE WITH DAMNED REPUBLICANS??? ####
    ###############################################

    focus = {
        id = MIG_coorperate_with_the_republicans
        icon =  GFX_SOV_autonomous_soviet_republics_ccp_2d_sov_compatibility
		relative_position_id = MIG_mandate_reaffirmed
		mutually_exclusive = { focus = MIG_purge_the_reformists }
        x = 7
        y = 1
        cost = 10
		prerequisite = { focus = MIG_mandate_reaffirmed}
        completion_reward = {
			add_stability = 0.05
			add_war_support = -0.1

			CRP = { country_event = { id = ming.14 days = 1 }}

			custom_effect_tooltip = tooltipwhitelinelol
			custom_effect_tooltip = unhistoricalpath_tt
        }
    }

    focus = {
        id = MIG_renew_the_treaty_of_nanjing
        icon =  GFX_focus_generic_treaty
		relative_position_id = MIG_coorperate_with_the_republicans
		mutually_exclusive = { focus = MIG_open_arms_policy }
        x = -2
        y = 1
        cost = 5
		prerequisite = { focus = MIG_coorperate_with_the_republicans }
        completion_reward = {
			diplomatic_relation = {
				country = CRP
				relation = non_aggression_pact
				active = yes
			}
        }
    }

    focus = {
        id = MIG_open_arms_policy
        icon =  GFX_SOV_collectivist_propaganda_ccp_2d_sov_compatibility
		relative_position_id = MIG_coorperate_with_the_republicans
		mutually_exclusive = { focus = MIG_renew_the_treaty_of_nanjing }
        x = 2
        y = 1
        cost = 5
		prerequisite = { focus = MIG_coorperate_with_the_republicans }
        completion_reward = {
			country_event = ming.17
        }
    }

    focus = {
        id = MIG_jingyiwei
        icon =  GFX_SOV_muster_the_old_guard_ccp_2d_sov_compatibility
		relative_position_id = MIG_coorperate_with_the_republicans
        x = -5
        y = 2
        cost = 5
		prerequisite = { focus = MIG_coorperate_with_the_republicans focus = MIG_placate_the_assembly }
        completion_reward = {
			### load oob and div template, prob imperial guard
        }
    }

    focus = {
        id = MIG_distribute_real_country
        icon =  GFX_focus_RAJ_institutional_money_laundering
		relative_position_id = MIG_renew_the_treaty_of_nanjing 
        x = -1
        y = 1
        cost = 5
		prerequisite = { focus = MIG_renew_the_treaty_of_nanjing }
        completion_reward = {
			add_timed_idea = { 
				idea = distributed_real_country
				days = 636
			}
        }
    }

    focus = {
        id = MIG_coorperate_with_the_teutons
        icon =  GFX_MIG_cooperatewithteutons
		relative_position_id = MIG_renew_the_treaty_of_nanjing 
        x = 1
        y = 1
        cost = 5
		prerequisite = { focus = MIG_renew_the_treaty_of_nanjing }
        completion_reward = {
			GEM={country_event={id=ming.18 days=1}}
        }
    }

    focus = {
        id = MIG_strengthening_of_the_civilian_adminstration
        icon =  GFX_focus_ARG_strengthening_the_concordancia
		relative_position_id = MIG_coorperate_with_the_teutons 
        x = 0
        y = 1
        cost = 5
		prerequisite = { focus = MIG_coorperate_with_the_teutons }
        completion_reward = {
			add_ideas = strengtheningcivilianadminstration
        }
    }

    focus = {
        id = MIG_attempt_at_unification
        icon =  GFX_goal_generic_national_unity
		relative_position_id = MIG_strengthening_of_the_civilian_adminstration 
        x = 1.5
        y = 1
        cost = 5
		prerequisite = { focus = MIG_strengthening_of_the_civilian_adminstration focus = MIG_pardon_republican_officers}
        completion_reward = {
			CRP = { country_event = { id = ming.21 days = 1 }} ### Puppet?
        }
    }

    focus = {
        id = MIG_one_china_two_systems
        icon =  GFX_focus_chi_one_china_policy
		relative_position_id = MIG_attempt_at_unification 
        x = 0
        y = 1
        cost = 5
		prerequisite = { focus = MIG_attempt_at_unification }
        completion_reward = {
			CRP = { country_event = { id = ming.40 days = 1 }}
        }
    }

    focus = {
        id = MIG_the_dragon_emperor
        icon =  GFX_focus_HUN_uplift_the_dragon_movement
		relative_position_id = MIG_jingyiwei
        x = 1
        y = 1
        cost = 5
		prerequisite = { focus = MIG_jingyiwei focus = MIG_distribute_real_country }
        completion_reward = {
			add_ideas = thedragonemperor
        }
    }

    focus = {
        id = MIG_revive_confucian_bureacracy
        icon =  GFX_focus_chi_examination_yuan
		relative_position_id = MIG_the_dragon_emperor
        x = 0
        y = 1
        cost = 5
		prerequisite = { focus = MIG_the_dragon_emperor}
        completion_reward = {
			remove_ideas = MIG_a_fractured_mandate2
        }
    }

    focus = {
        id = MIG_master_of_the_east
        icon =  GFX_focus_GER_the_proud_eagle_and_the_rising_dragon
		relative_position_id = MIG_revive_confucian_bureacracy
        x = 0
        y = 1
        cost = 5
		prerequisite = { focus = MIG_revive_confucian_bureacracy}
        completion_reward = {
			swap_ideas = {
				remove_idea = thedragonemperor
				add_idea = thedragonemperor2
			}
        }
    }

    focus = {
        id = MIG_consolidate_international_industries
        icon =  GFX_focus_BRA_ethical_internationalism
		relative_position_id = MIG_open_arms_policy 
        x = 0
        y = 1
        cost = 5
		prerequisite = { focus = MIG_open_arms_policy }
        completion_reward = {
			add_ideas = consolidatedinternationalindustries ### decrease stability more consumer goods
        }
    }

    focus = {
        id = MIG_pardon_republican_officers
        icon =  GFX_focus_AUS_bring_generals_out_of_retirement
		relative_position_id = MIG_consolidate_international_industries 
        x = 0
        y = 1
        cost = 5
		prerequisite = { focus = MIG_consolidate_international_industries }
        completion_reward = {
			### unlock a few republican officers upon unification tooltip
        }
    }

    focus = {
        id = MIG_fate_of_joseon
        icon =  GFX_focus_GER_afrikakorps
		relative_position_id = MIG_master_of_the_east
        x = 2
        y = 1
        cost = 5
		prerequisite = { focus = MIG_master_of_the_east focus = MIG_one_china_two_systems }
        completion_reward = {
			country_event = ming.27
        }
    }


    ###############################################
    #### CONQUER THE J*PS AND FOREIGN AFFAIRS! ####
    ###############################################


    focus = {
        id = MIG_look_to_the_east
        icon =  GFX_SOV_into_central_asia_ccp_2d_sov_compatibility
		relative_position_id = MIG_china_united
        x = 5
        y = 1
        cost = 5
		prerequisite = { focus = MIG_china_united }
		prerequisite = { focus = MIG_fate_of_joseon }
        completion_reward = {
			add_political_power = 50
			add_manpower = 500000
			add_war_support = 0.25
			add_threat = 5
        }
    }

    focus = {
        id = MIG_take_direct_control_over_concession_cities
        icon =  GFX_focus_eng_concessions_to_the_trade_unions
		relative_position_id = MIG_look_to_the_east
        x = -1
        y = 1
        cost = 5
		prerequisite = { focus = MIG_look_to_the_east }
        completion_reward = {
			JCC = { country_event = { id = ming.28 days = 1 }}
        }
    }

    focus = {
        id = MIG_take_dainam
        icon =  GFX_SOV_offer_autonomy_to_former_soviet_republics_ccp_2d_sov_compatibility
		relative_position_id = MIG_look_to_the_east
        x = 1
        y = 1
        cost = 5
		prerequisite = { focus = MIG_look_to_the_east }
        completion_reward = {
			DAM = { country_event = { id = ming.35 days = 1 }}
        }
    }

    focus = {
        id = MIG_the_japanese_question
        icon =  GFX_focus_generic_japanese_imperial_glory
		relative_position_id = MIG_look_to_the_east
        x = 0
        y = 2
        cost = 5
		prerequisite = { focus = MIG_take_direct_control_over_concession_cities }
		prerequisite = { focus = MIG_take_dainam }
        completion_reward = {
			add_ideas = anti_japanese_warriors ### anti-japanese buffs

			create_wargoal = {
				target = JFZ
				type = annex_everything
			}
        }
    }

    focus = {
        id = MIG_liberate_indonesia
        icon =  GFX_focus_GER_south_east_asian_natural_wealth
		relative_position_id = MIG_the_japanese_question
        x = 0
        y = 1
        cost = 5
		prerequisite = { focus = MIG_the_japanese_question }
        completion_reward = {
			add_ideas = indonesianliberationcampaign 
			create_wargoal = {
				target = TEI 
				type = annex_everything
			}
			create_wargoal = {
				target = BEI 
				type = annex_everything
			}
			create_wargoal = {
				target = RIN
				type = annex_everything
			}
        }
    }


    ###############################
    #### INDUSTRY CHINESE TREE ####
    ###############################


	focus = {
		id = MIG_invest_in_foreign_industries
		icon = GFX_focus_generic_industry_3
		cost = 8
		relative_position_id = MIG_mandate_reaffirmed

		x = -27
		y = 1

		prerequisite = { focus = MIG_mandate_reaffirmed }

		completion_reward = {
			add_stability = -0.05

			add_timed_idea = {
				idea = MIG_foreign_investors
				days = 280
			}
		}
	}

	focus = {
		id = MIG_import_roman_steel
		icon = GFX_focus_generic_steel
		cost = 7

		relative_position_id = MIG_invest_in_foreign_industries
		x = -2
		y = 1

		prerequisite = { focus = MIG_invest_in_foreign_industries }

		completion_reward = {
			add_tech_bonus = {
				name = MIG_import_roman_steel
				bonus = 0.75
				uses = 2
				category = industry
			}

			random_core_state = {
				limit = {
					is_fully_controlled_by = ROOT
				}
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = industrial_complex
					level = 3
					instant_build = yes
				}
			}

			random_core_state = {
				limit = {
					is_fully_controlled_by = ROOT
				}
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = industrial_complex
					level = 3
					instant_build = yes
				}
			}

		}
	}

	focus = {
		id = MIG_western_rail_engineers
		icon = GFX_focus_generic_railway_gun
		cost = 7

		relative_position_id = MIG_invest_in_foreign_industries
		x = -2
		y = 2

		prerequisite = {
			focus = MIG_import_roman_steel
			focus = MIG_modernising_synthetic
			focus = MIG_shenyang_manufacturing_firms
		}

		completion_reward = {
			add_timed_idea = {
				idea = MIG_western_railways
				days = 200
			}

		}
	}

	focus = {
		id = MIG_shenyang_manufacturing_firms
		icon = GFX_SOV_move_industry_to_the_urals_ccp_2d_sov_compatibility
		cost = 7

		relative_position_id = MIG_invest_in_foreign_industries
		x = 0
		y = 1

		prerequisite = { focus = MIG_invest_in_foreign_industries }

		completion_reward = {

			add_tech_bonus = {
				bonus = 0.5
				uses = 1
				category = industry
			}

			random_core_state = {
				limit = {
					is_fully_controlled_by = ROOT
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}

			random_core_state = {
				limit = {
					is_fully_controlled_by = ROOT
				}
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = arms_factory
					level = 3
					instant_build = yes
				}
			}

		}
	}

	focus = {
		id = MIG_advanced_equipment
		icon = GFX_goal_generic_radar
		cost = 7

		relative_position_id = MIG_invest_in_foreign_industries
		x = 0
		y = 2

		prerequisite = {
			focus = MIG_foreign_expertise
			focus = MIG_western_rail_engineers
			focus = MIG_shenyang_manufacturing_firms
		}

		completion_reward = {
			add_timed_idea = {
				idea = MIG_foreign_contracts
				days = 250
			}
			add_tech_bonus = {
				bonus = 0.5
				uses = 2
				category = electronics
			}

		}
	}

	focus = {
		id = MIG_modernising_synthetic
		icon = GFX_SOV_synthetic_rubber_ccp_2d_sov_compatibility
		cost = 7

		relative_position_id = MIG_invest_in_foreign_industries
		x = 2
		y = 1

		prerequisite = { focus = MIG_invest_in_foreign_industries }

		completion_reward = {
			if = {
				limit = { NOT = { has_tech = fuel_silos } }
				set_technology = { fuel_silos = 1 }
			}
			add_tech_bonus = {
				bonus = 1
				uses = 1
				category = synth_resources
			}

			modify_building_resources = {
				building = synthetic_refinery
				resource = rubber
				amount = 2
			}
		if = {
				limit = {
					check_variable = { temp_targets_index = 3 compare = less_than }
					any_owned_state = {
						infrastructure < 3
						free_building_slots = {
							building = fuel_silo
							size > 0
							include_locked = yes
						}
					}
				}
				if = { #If possible, prio low-infrastructure states for silos
					limit = {
						any_owned_state = {
							infrastructure < 3
							free_building_slots = {
								building = fuel_silo
								size > 0
								include_locked = yes
							}
						}
					}
					random_owned_controlled_state = {
						limit = {
							infrastructure < 3
							free_building_slots = {
								building = fuel_silo
								size > 0
								include_locked = yes
							}
						}
						add_extra_state_shared_building_slots = 3
						add_building_construction = {
							type = fuel_silo
							level = 3
							instant_build = yes
						}
					}
				}
				else = {
					random_owned_controlled_state = {
						limit = {
							free_building_slots = {
								building = fuel_silo
								size > 0
								include_locked = yes
							}
						}
						add_extra_state_shared_building_slots = 3
						add_building_construction = {
							type = fuel_silo
							level = 3
							instant_build = yes
						}
        }
				}
		}
	
		}
	}

	focus = {
		id = MIG_foreign_expertise
		icon = GFX_SOV_foreign_experts_ccp_2d_sov_compatibility
		cost = 7

		relative_position_id = MIG_invest_in_foreign_industries
		x = 2
		y = 2

		prerequisite = {
			focus = MIG_modernising_synthetic
			focus = MIG_import_roman_steel
			focus = MIG_shenyang_manufacturing_firms
		}

		completion_reward = {
			add_timed_idea = {
				idea = MIG_foreign_production
				days = 365
			}
		}
	}

	focus = {
		id = MIG_university_exchange
		icon = GFX_focus_generic_university_2
		cost = 7

		relative_position_id = MIG_invest_in_foreign_industries
		x = 0
		y = 3

		prerequisite = { focus = MIG_western_rail_engineers }
		prerequisite = { focus = MIG_advanced_equipment }
		prerequisite = { focus = MIG_foreign_expertise }

		completion_reward = {
			add_research_slot = 1
		}
	}

	focus = {
		id = MIG_central_china_development
		icon = GFX_focus_AUS_osterreichische_gebirgsjager
		cost = 7
		relative_position_id = MIG_invest_in_foreign_industries

		x = -5
		y = 1
		prerequisite = { focus = MIG_invest_in_foreign_industries }

		completion_reward = {
			add_ideas = kaiping_mines
		}
	}

	focus = {
		id = MIG_expand_the_kailuan_mines
		icon = GFX_focus_generic_mining_industry
		cost = 6

		relative_position_id = MIG_central_china_development
		x = 1
		y = 1

		prerequisite = { focus = MIG_central_china_development }

		completion_reward = {

				614 = {
					add_resource = {
						type = steel
						amount = 8
					}
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
				}

				615 = {
					add_resource = {
						type = steel
						amount = 8
					}
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
				}

				if = {
					limit = { has_idea = kaiping_mines }
					add_ideas = kaiping_mines_2
				}

		}
	}

	focus = {
		id = QIE_expanding_our_shanxi_spoils
		icon = GFX_focus_generic_railroad
		cost = 6

		relative_position_id = MIG_expand_the_kailuan_mines
		x = 0
		y = 1

		prerequisite = { focus = MIG_expand_the_kailuan_mines }

		completion_reward = {

			build_railway = {
				path = { 4190 4093 12078 12344 }
				start_state = 1062
				target_state = 615
				level = 1
				fallback = yes
			}

		}
	}

	focus = {
		id = MIG_daye_hanyang
		icon = GFX_focus_generic_industry_2
		cost = 6

		relative_position_id = MIG_central_china_development
		x = -1
		y = 1

		prerequisite = { focus = MIG_central_china_development }

		completion_reward = {
			750 = {
				limit = {
					is_fully_controlled_by = ROOT
				}
				add_extra_state_shared_building_slots = 4
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			add_timed_idea = {
				idea = daye_hanyang
				days = 365
			}
		}
	}

	focus = {
		id = MIG_expand_arsenals_of_war
		icon = GFX_goal_generic_occupy_start_war
		cost = 6

		relative_position_id = MIG_daye_hanyang
		x = 0
		y = 1

		prerequisite = { focus = MIG_daye_hanyang }

		completion_reward = {

			random_core_state = {
				limit = {
					is_fully_controlled_by = ROOT
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}

			random_core_state = {
				limit = {
					is_fully_controlled_by = ROOT
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}

			
		add_tech_bonus = {
			bonus = 1
			uses = 2
			category = support_tech
		}
		}
	}


    ##################################
    #### THE GUANZIYING ARMY TREE ####
    ##################################

	focus = {
		id = MIG_the_guanziying_army
		icon = GFX_MIG_theguanziyingarmy
		cost = 8
		relative_position_id = MIG_mandate_reaffirmed

		x = -19
		y = 1

		prerequisite = { focus = MIG_mandate_reaffirmed }

		completion_reward = {
			army_experience = 20
			add_command_power = 20
		}
	}

	focus = {
		id = MIG_the_imperial_army_of_china
		icon = GFX_focus_NORDIC_com_selector_army
		cost = 8
		relative_position_id = MIG_the_guanziying_army
        mutually_exclusive = { focus = MIG_the_ming_new_army }
		x = -2
		y = 1

		prerequisite = { focus = MIG_the_guanziying_army }

		completion_reward = {
			army_experience = 15

			add_doctrine_cost_reduction = {
				cost_reduction = 0.5
				uses = 1
				category = land_doctrine
			}

			add_tech_bonus = {
				uses = 2
				bonus = 1.0
				category = artillery
				category = support_tech
			}

			### event to recruit character + tooltip
		}
	}

	focus = {
		id = MIG_a_traditional_fighting_doctrine
		icon = GFX_MIG_atraditionalfightingdoctrine
		cost = 8
		relative_position_id = MIG_the_imperial_army_of_china
		x = -1
		y = 1

		prerequisite = { focus = MIG_the_imperial_army_of_china }

		completion_reward = {
			add_doctrine_cost_reduction = {
				cost_reduction = 0.5
				uses = 1
				category = land_doctrine
			}

			swap_ideas = { 
				remove_idea = theguanziyingarmy
				add_idea = theguanziyingarmytraditional
			}
		}
	}

	focus = {
		id = MIG_goals_of_the_imperial_army
		icon = GFX_SOV_claims_in_baltic_ccp_2d_sov_compatibility
		cost = 8
		relative_position_id = MIG_the_imperial_army_of_china
		x = 1
		y = 1

		prerequisite = { focus = MIG_the_imperial_army_of_china }

		completion_reward = {
			add_timed_idea = { idea = goals_of_the_imperial_chinese_army days = 656 }
		}
	}

	focus = {
		id = MIG_overwhelming_strength
		icon = GFX_SOV_japanese_overtures_ccp_2d_sov_compatibility
		cost = 8
		relative_position_id = MIG_goals_of_the_imperial_army
		x = -1
		y = 1

		prerequisite = { focus = MIG_goals_of_the_imperial_army focus = MIG_a_traditional_fighting_doctrine }

		completion_reward = {
			swap_ideas = {
				remove_idea = theguanziyingarmytraditional
				add_idea = theguanziyingarmyoverwhelm
			}
		}
	}

	focus = {
		id = MIG_the_ming_new_army
		icon = GFX_focus_ARG_the_war_machine
		cost = 8
		relative_position_id = MIG_the_guanziying_army
        mutually_exclusive = { focus = MIG_the_imperial_army_of_china }
		x = 2
		y = 1

		prerequisite = { focus = MIG_the_guanziying_army }

		completion_reward = {
			add_doctrine_cost_reduction = {
				cost_reduction = 0.5
				uses = 1
				category = land_doctrine
			}

			add_tech_bonus = {
				uses = 1
				bonus = 0.5
				category = armor
			}

			### event to recruit character + tooltip
		}
	}

	focus = {
		id = MIG_expanding_the_baoding_arsenal
		icon = GFX_focus_generic_naval_invasion_tank
		cost = 8
		relative_position_id = MIG_the_ming_new_army
		x = -1
		y = 1

		prerequisite = { focus = MIG_the_ming_new_army }

		completion_reward = {
			add_doctrine_cost_reduction = {
				cost_reduction = 0.5
				uses = 1
				category = land_doctrine
			}

			add_tech_bonus = {
				uses = 1
				bonus = 0.5
				category = armor
			}

			swap_ideas = {
				remove_idea = theguanziyingarmy
				add_idea = theguanziyingarmyexpansion
			}
		}
	}

	focus = {
		id = MIG_new_armoured_divisions
		icon = GFX_focus_generic_tank_assault
		cost = 8
		relative_position_id = MIG_the_ming_new_army
		x = 1
		y = 1

		prerequisite = { focus = MIG_the_ming_new_army }

		completion_reward = {
			### spawn oob of tanks

			add_tech_bonus = {
				uses = 2
				bonus = 0.25
				category = armor
			}

			add_ideas = new_armoured_divisions

		}
	}

	focus = {
		id = MIG_the_green_standards
		icon = GFX_focus_PER_stand_with_giants
		cost = 8
		relative_position_id = MIG_new_armoured_divisions
		x = -1
		y = 1

		prerequisite = { focus = MIG_new_armoured_divisions focus = MIG_expanding_the_baoding_arsenal }

		completion_reward = {
			swap_ideas = {
				remove_idea = theguanziyingarmyexpansion
				add_idea = theguanziyingarmygreenstandards
			}
		}
	}

	focus = {
		id = MIG_superiority_of_the_chinese_army
		icon = GFX_SOV_capital_of_the_tsars_ccp_2d_sov_compatibility
		cost = 8
		relative_position_id = MIG_the_guanziying_army
		x = 0
		y = 4

		prerequisite = { focus = MIG_overwhelming_strength focus = MIG_the_green_standards }

		completion_reward = {
			if = {
				limit = { has_idea = theguanziyingarmyoverwhelm }
				swap_ideas = {
					remove_idea = theguanziyingarmyoverwhelm
					add_idea = theguanziyingarmysuperior1
				}
			}
			else = {
				swap_ideas = {
					remove_idea = theguanziyingarmygreenstandards
					add_idea = theguanziyingarmysuperior2
				}
			}
		}
	}

    #########################################
    #### THE MING IMPERIAL AIRFORCE PATH ####
    #########################################

	focus = {
		id = MIG_the_imperial_airforce
		icon = GFX_MIG_theimperialairforce
		cost = 8
		relative_position_id = MIG_mandate_reaffirmed

		x = -12
		y = 1

		prerequisite = { focus = MIG_mandate_reaffirmed }

		completion_reward = {
			air_experience = 25
			add_command_power = 10
			add_ideas = imperial_airforce_of_china ### air xp 0.02 daily

			749 = { 
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = air_base
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}

			750 = { 
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = air_base
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = MIG_kongjun_xueyuan
		icon = GFX_focus_PER_perfect_iranian_airforce
		cost = 8
		relative_position_id = MIG_the_imperial_airforce

		x = -1
		y = 1

		prerequisite = { focus = MIG_the_imperial_airforce }

		completion_reward = {
			swap_ideas = {
				remove_idea = imperial_airforce_of_china
				add_idea = imperial_airforce_of_china2
			}
		}
	}

	focus = {
		id = MIG_new_airbases
		icon = GFX_focus_NORDIC_dem_airforce
		cost = 8
		relative_position_id = MIG_the_imperial_airforce

		x = 1
		y = 1

		prerequisite = { focus = MIG_the_imperial_airforce }

		completion_reward = {
			753 = { 
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = air_base
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}

			596 = { 
				add_extra_state_shared_building_slots = 5
				add_building_construction = {
					type = air_base
					level = 3
					instant_build = yes
				}
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = MIG_domestic_designs
		icon = GFX_focus_IRQ_airforce
		cost = 8
		relative_position_id = MIG_new_airbases

		x = -2
		y = 1

		prerequisite = { focus = MIG_new_airbases focus = MIG_kongjun_xueyuan }

		completion_reward = {
			swap_ideas = {
				remove_idea = imperial_airforce_of_china2
				add_idea = imperial_airforce_of_china3
			}
		}
	}

	focus = {
		id = MIG_foreign_aircraft
		icon = GFX_focus_chi_flying_tigers
		cost = 8
		relative_position_id = MIG_new_airbases

		x = 0
		y = 1

		prerequisite = { focus = MIG_new_airbases focus = MIG_kongjun_xueyuan }

		completion_reward = {
			add_equipment_subsidy = {
				cic = 500
				equipment_type = small_plane_airframe
				seller_tags = { ERE WRE GEM LSA GBB RSF FAC NSR } 
			}
			add_equipment_subsidy = {
				cic = 500
				equipment_type = large_plane_airframe
				seller_tags = { ERE WRE GEM LSA GBB RSF FAC NSR } 
			}
			add_equipment_subsidy = {
				cic = 500
				equipment_type = medium_plane_airframe
				seller_tags = { ERE WRE GEM LSA GBB RSF FAC NSR } 
			}
		}
	}

	focus = {
		id = MIG_domestic_aircraft_industry
		icon = GFX_focus_BEL_legacy_of_the_belgian_airforce
		cost = 8
		relative_position_id = MIG_foreign_aircraft

		x = -1
		y = 1

		prerequisite = { focus = MIG_foreign_aircraft focus = MIG_domestic_designs }

		completion_reward = {
			607 = { 
				add_extra_state_shared_building_slots = 6
				add_building_construction = {
					type = air_base
					level = 3
					instant_build = yes
				}
				add_building_construction = {
					type = arms_factory
					level = 3
					instant_build = yes
				}
			}

			605 = { 
				add_extra_state_shared_building_slots = 6
				add_building_construction = {
					type = air_base
					level = 3
					instant_build = yes
				}
				add_building_construction = {
					type = arms_factory
					level = 3
					instant_build = yes
				}
			}
		}
	}



	focus = {
		id = MIG_the_chinese_imperial_navy
		icon = GFX_goal_generic_build_navy

		x = 55
		y = 3
		cost = 5
		prerequisite = { focus = MIG_mandate_reaffirmed }

		completion_reward = {
			navy_experience = 25
			random_owned_controlled_state = {
				limit = {
					dockyard > 0
					free_building_slots = {
						building = dockyard
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					dockyard > 0
					free_building_slots = {
						building = dockyard
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
			}

			if = {
				limit = {
					NOT = {
						any_owned_state = {
							dockyard > 0
							free_building_slots = {
								building = dockyard
								size > 0
								include_locked = yes
							}
						}
					}
				}
				random_owned_controlled_state = {
					limit = {
						free_building_slots = {
							building = dockyard
							size > 1
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = dockyard
						level = 1
						instant_build = yes
					}
				}
				random_owned_controlled_state = {
					limit = {
						free_building_slots = {
							building = dockyard
							size > 1
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = dockyard
						level = 1
						instant_build = yes
					}
				}				
			}

			add_doctrine_cost_reduction = {
				cost_reduction = 0.5
				uses = 1
				category = naval_doctrine
			}
		}
	}

	focus = {
		id = MIG_torpedo_production
		icon = GFX_focus_generic_torpedo_production
		prerequisite = { focus = MIG_the_chinese_imperial_navy }

		x = -2
		y = 1
		relative_position_id = MIG_the_chinese_imperial_navy
		cost = 10

		completion_reward = {
			if = {
				limit = {
					has_dlc = "Man the Guns"
				}
				add_tech_bonus = {
					bonus = 1.0
					uses = 1
					category = cat_torpedoes
				}
			}
			else = {
				add_doctrine_cost_reduction = {
					cost_reduction = 0.5
					uses = 2
					category = cat_trade_interdiction
				}
			}
		}
	}

	focus = {
		id = MIG_expand_naval_facilities
		icon = GFX_goal_generic_construct_naval_dockyard
		prerequisite = { focus = MIG_the_chinese_imperial_navy }

		x = 0
		y = 1
		relative_position_id = MIG_the_chinese_imperial_navy
		cost = 5

		completion_reward = {
			if = {
				limit = {
					743 = {
						is_fully_controlled_by = ROOT
						free_building_slots = {
							building = dockyard
							size > 0
							include_locked = yes
						}
					}
				}
				743 = { 
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = dockyard
						level = 1
						instant_build = yes
					}
				}
			}
			else = {
				random_core_state = {
					limit = {
						is_fully_controlled_by = ROOT
						free_building_slots = {
							building = dockyard
							size > 0
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = dockyard
						level = 1
						instant_build = yes
					}
				}
			}

			if = {
				limit = {
					613 = {
						is_fully_controlled_by = ROOT
						free_building_slots = {
							building = dockyard
							size > 0
							include_locked = yes
						}
					}
				}
				613 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = dockyard
						level = 1
						instant_build = yes
					}
				}
			}
			else = {
				random_core_state = {
					limit = {
						is_fully_controlled_by = ROOT
						free_building_slots = {
							building = dockyard
							size > 0
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = dockyard
						level = 1
						instant_build = yes
					}
				}
			}

			596 = {
				add_building_construction = {
					type = naval_base
					level = 2
					instant_build = yes
					province = 7191 
				}
				add_building_construction = {
					type = naval_base
					level = 2
					instant_build = yes
					province = 9974
				}
			}

			608 = { 
				add_building_construction = {
					type = naval_base
					level = 2
					instant_build = yes
					province = 4137
				}
			}
		}
	}

	focus = {
		id = MIG_naval_guns
		icon = GFX_goal_generic_occupy_states_coastal
		prerequisite = { focus = MIG_the_chinese_imperial_navy }

		x = 2
		y = 1
		relative_position_id = MIG_the_chinese_imperial_navy
		cost = 5


		completion_reward = {

			if = {
				limit = {
					745 = {
						free_building_slots = {
							building = dockyard
							size > 0
							include_locked = yes
						}
					}
				}
				745 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = dockyard
						level = 1
						instant_build = yes
					}
				}
			}
			else = {
				random_core_state = {
					limit = {
						is_controlled_by = ROOT
						free_building_slots = {
							building = dockyard
							size > 0
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = dockyard
						level = 1
						instant_build = yes
					}
				}
			}
			if = {
				limit = { has_dlc = "Man the Guns" }
				add_tech_bonus = {
					bonus = 1.0
					uses = 2
					category = cat_ship_heavy_battery
				}
				add_tech_bonus = {
					bonus = 1.0
					uses = 2
					category = cat_ship_medium_battery
				}
			} 
			else = {
				navy_experience = 15
			}
		}
	}

	focus = {
		id = MIG_strengthen_coastline
		icon = GFX_focus_generic_coastal_fort
		prerequisite = { focus = MIG_expand_naval_facilities }

		x = -4
		y = 1
		relative_position_id = MIG_expand_naval_facilities
		cost = 10

		completion_reward = {
			if = {
				limit = {
					has_full_control_of_state = 608
				}
				608 = { 
					add_building_construction = {
						type = naval_base
						level = 1
						instant_build = yes
						province = 4137
					}
					add_building_construction = {
						type = coastal_bunker
						level = 1
						instant_build = yes
						province = 4137
					}
				}
			}

			if = {
				limit = {
					has_full_control_of_state = 524
				}
				524 = { 
					add_building_construction = {
						type = naval_base
						level = 1
						instant_build = yes
						province = 7186
					}
					add_building_construction = {
						type = coastal_bunker
						level = 1
						instant_build = yes
						province = 7186
					}
				}
			}

			if = {
				limit = {
					has_full_control_of_state = 743
				}
				743 = {
					add_building_construction = {
						type = naval_base
						level = 1
						instant_build = yes
						province = 10000
					}
					add_building_construction = {
						type = coastal_bunker
						level = 1
						instant_build = yes
						province = 10000
					}
				}
			}





		}
	}

	focus = {
		id = MIG_maritime_artillery
		icon = GFX_focus_BEL_antwerp_maritime_academy
		prerequisite = { focus = MIG_expand_naval_facilities }

		x = -2
		y = 1
		relative_position_id = MIG_expand_naval_facilities
		cost = 10

		completion_reward = {
			add_tech_bonus = {
				bonus = 1.0
				uses = 1
				category = artillery
			}

			every_owned_state = {
				limit = {
					is_fully_controlled_by = ROOT
					naval_base > 0
				}
				add_building_construction = {
					type = coastal_bunker
					level = 2
					instant_build = yes
					province = {
						all_provinces = yes
						limit_to_naval_base = yes
					}
				}
			}
		}
	}

	focus = {
		id = MIG_superior_navy
		icon = GFX_goal_generic_navy_doctrines_tactics
		prerequisite = { focus = MIG_expand_naval_facilities }

		x = 0
		y = 2
		relative_position_id = MIG_expand_naval_facilities
		cost = 5


		completion_reward = {

			add_ideas = MIG_superior_navy

			navy_experience = 50
		}
	}

	focus = {
		id = MIG_stockpile_fuel
		icon = GFX_focus_generic_stockpile_fuel
		prerequisite = { focus = MIG_expand_naval_facilities }

		x = 2
		y = 1
		relative_position_id = MIG_expand_naval_facilities
		cost = 5


		completion_reward = {
			add_timed_idea = { idea = MIG_stockpiling_fuel days = 730 }

			if = {
				limit = {
					615 = {
						is_controlled_by = ROOT
						free_building_slots = {
							building = fuel_silo
							size > 0
							include_locked = yes
						}
					}
				}
				615 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = fuel_silo
						level = 1
						instant_build = yes
					}
				}
			}
			else = {
				random_core_state = {
					limit = {
						is_controlled_by = ROOT
						free_building_slots = {
							building = fuel_silo
							size > 0
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = fuel_silo
						level = 1
						instant_build = yes
					}
				}
			}

			if = {
				limit = {
					622 = {
						is_controlled_by = ROOT
						free_building_slots = {
							building = fuel_silo
							size > 0
							include_locked = yes
						}
					}
				}
				622 = { 
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = fuel_silo
						level = 1
						instant_build = yes
					}
				}
			}
			else = {
				random_core_state = {
					limit = {
						is_controlled_by = ROOT
						free_building_slots = {
							building = fuel_silo
							size > 0
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = fuel_silo
						level = 1
						instant_build = yes
					}
				}
			}

			if = {
				limit = {
					715 = {
						is_controlled_by = ROOT
						free_building_slots = {
							building = fuel_silo
							size > 0
							include_locked = yes
						}
					}
				}
				715 = { 
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = fuel_silo
						level = 1
						instant_build = yes
					}
				}
			}
			else = {
				random_core_state = {
					limit = {
						is_controlled_by = ROOT
						free_building_slots = {
							building = fuel_silo
							size > 0
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = fuel_silo
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}

	focus = {
		id = MIG_imperial_marines
		icon = GFX_goal_generic_amphibious_assault
		prerequisite = { focus = MIG_expand_naval_facilities }

		x = 4
		y = 1
		relative_position_id = MIG_expand_naval_facilities
		cost = 10
		available = {
			has_tech = marines
		}
		completion_reward = {

			add_ideas = MIG_imperial_marines

			add_tech_bonus = {
				bonus = 1.0
				uses = 1
				
				category = tp_tech
			}
			add_tech_bonus = {
				bonus = 1.0
				uses = 1
				
				category = marine_tech
			}

		}
	}


	focus = {
		id = MIG_chinese_flotilla
		icon = GFX_focus_generic_military_dictatorship
		prerequisite = { focus = MIG_superior_navy }

		x = -4
		y = 1
		relative_position_id = MIG_superior_navy
		cost = 5
		available = {
		}

		completion_reward = {

			add_ideas = MIG_chinese_flotilla

			navy_experience = 25
		}
	}

	focus = {
		id = MIG_light_crusiers
		icon = GFX_focus_generic_cruiser2
		prerequisite = { focus = MIG_superior_navy }
		mutually_exclusive = { focus = MIG_heavy_crusiers }
		x = -2
		y = 2
		relative_position_id = MIG_superior_navy
		cost = 5
		available = {
		}

		completion_reward = {

			swap_ideas = {
				remove_idea = MIG_superior_navy
				add_idea = MIG_superior_navy2
			}

			navy_experience = 25

			add_doctrine_cost_reduction = {
				cost_reduction = 0.75
				uses = 2
				category = cat_trade_interdiction
			}

			add_tech_bonus = {
				bonus = 1
				uses = 1
				category = cl_tech
			}

		}
	}

	focus = {
		id = MIG_heavy_crusiers
		icon = GFX_focus_generic_navy_battleship2
		prerequisite = { focus = MIG_superior_navy }
		mutually_exclusive = { focus = MIG_light_crusiers }
		x = 2
		y = 2
		relative_position_id = MIG_superior_navy
		cost = 5
		available = {
		}

		completion_reward = {

			swap_ideas = {
				remove_idea = MIG_superior_navy
				add_idea = MIG_superior_navy3
			}

			navy_experience = 25

			add_doctrine_cost_reduction = {
				cost_reduction = 0.75
				uses = 2
				category = cat_fleet_in_being
			}

			add_tech_bonus = {
				bonus = 1
				uses = 1
				category = ca_tech
			}


		}
	}

	focus = {
		id = MIG_naval_intelligence
		icon = GFX_goal_generic_navy_cruiser
		prerequisite = { focus = MIG_superior_navy }

		x = 4
		y = 1
		relative_position_id = MIG_superior_navy
		cost = 5
		available = {
		}

		completion_reward = {
			add_ideas = MIG_naval_intelligence

			navy_experience = 25
		}
	}


	focus = {
		id = MIG_escort_destroyers
		icon = GFX_focus_generic_destroyer
		prerequisite = { focus = MIG_light_crusiers }

		x = 0
		y = 1
		relative_position_id = MIG_light_crusiers
		cost = 5
		available = {
			if = {
				limit = {
					has_dlc = "Man the Guns"
				}
				has_tech = improved_ship_hull_light
				has_tech = sonar
			}
			else = {
				has_tech = improved_destroyer
			}
			has_tech = cavity_magnatron
		}


		completion_reward = {
			navy_experience = 15
			add_doctrine_cost_reduction = {
				cost_reduction = 0.50
				uses = 2
				category = convoy_defense_tree
			}

			add_tech_bonus = {
				bonus = 1.0
				uses = 1
				category = dd_tech
			}

			random_owned_controlled_state = {
				limit = {
					is_fully_controlled_by = ROOT
					is_coastal = yes
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = MIG_superior_subs
		icon = GFX_goal_generic_navy_submarine
		prerequisite = { focus = MIG_light_crusiers focus = MIG_heavy_crusiers }

		x = 2
		y = 1
		relative_position_id = MIG_light_crusiers
		cost = 5
		available = {
			IF = {
				limit = {
					has_dlc = "Man the Guns"
				}
				has_tech = improved_depth_charges
				has_tech = sonar
			}
			ELSE = {
				has_tech = basic_destroyer
			}
		}

		completion_reward = {

			navy_experience = 15

			add_tech_bonus = {
				ahead_reduction = 2
				uses = 1
				category = asw_tech
			}

			random_owned_controlled_state = {
				limit = {
					is_fully_controlled_by = ROOT
					is_coastal = yes
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = MIG_battleships
		icon = GFX_goal_generic_navy_battleship
		prerequisite = { focus = MIG_heavy_crusiers }

		x = 0
		y = 1
		relative_position_id = MIG_heavy_crusiers
		cost = 5
		available = {
		}

		completion_reward = {
			navy_experience = 15
			add_doctrine_cost_reduction = {
				cost_reduction = 0.50
				uses = 2
				category = fleet_in_being_tree
			}

			add_tech_bonus = {
				bonus = 1
				uses = 1
				category = bb_tech
			}


			random_owned_controlled_state = {
				limit = {
					is_fully_controlled_by = ROOT
					is_coastal = yes
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = MIG_proper_carriers
		icon = GFX_goal_generic_navy_carrier
		prerequisite = { focus = MIG_heavy_crusiers }
		mutually_exclusive = { focus = MIG_refit_civilian_ships }
		x = 2
		y = 1
		relative_position_id = MIG_heavy_crusiers
		cost = 10
		available = {
			if = { # MTG tech
				limit = {
					has_dlc = "Man the Guns"
				}
				has_tech = early_ship_hull_carrier
			}
			else = { #Non-MTG tech
				has_tech = early_carrier
			}
		}

		completion_reward = {
			navy_experience = 15
			add_tech_bonus = {
				bonus = 1.0
				uses = 1
				category = cv_tech
			}

			###########
			### MTG ###
			###########
			if = { #MTG 
				limit = {
					has_dlc = "Man the Guns"
				}
				if = {
					limit = {
						NOT = { has_tech = basic_ship_hull_carrier }
					}
					set_technology = { basic_ship_hull_carrier = 1 }
				}

				#Equipment Variant
				create_equipment_variant = {
					name = "Liaoning Class"
					type = ship_hull_carrier_1
					name_group = ITA_CV_HISTORICAL
					parent_version = 0
					allow_without_tech = yes #Makes no difference since focus grants appropriate tech (above), but it improves tooltip
					modules = {
						fixed_ship_deck_slot_1 = ship_deck_space
						fixed_ship_deck_slot_2 = ship_deck_space
						fixed_ship_anti_air_slot = ship_anti_air_2
						fixed_ship_radar_slot = empty
						fixed_ship_engine_slot = carrier_ship_engine_2
						fixed_ship_secondaries_slot = ship_secondaries_2
						front_1_custom_slot = ship_deck_space
					}
				}
				#Line Production
				add_equipment_production = {
					equipment = {
						type = ship_hull_carrier_1
						creator = "MIG"
						version_name = "Liaoning Class"
					}
					name = "Liaoning"
					requested_factories = 2
					progress = 0.45
					amount = 1
				}
			}

			##############
			### NO MTG ###
			##############
			else = {
				if = {
					limit = {
						NOT = { has_tech = basic_carrier }
					}
					set_technology = { basic_carrier = 1 }
				}
				create_equipment_variant = {
					name = "Liaoning Class"
					type = carrier_2
					allow_without_tech = yes #Makes no difference since focus grants appropriate tech (above), but it improves tooltip
					upgrades = {
						ship_deckspace_upgrade = 3
						carrier_armor_upgrade = 2
						ship_engine_upgrade = 2
						ship_reliability_upgrade = 2
					}
				}
				add_equipment_production = {
					equipment = {
						type = carrier_2
						creator = "MIG"
						version_name = "Liaoning Class"
					}
					requested_factories = 2
					progress = 0.45
					amount = 1
				}
			}
			
			random_owned_controlled_state = {
				limit = {
					is_fully_controlled_by = ROOT
					is_coastal = yes
				}
				prioritize = { 158 } #PIEDMONT (Genoa)
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = MIG_refit_civilian_ships
		icon = GFX_focus_generic_refit_civilian_ships
		prerequisite = { focus = MIG_heavy_crusiers }
		mutually_exclusive = { focus = MIG_proper_carriers }
		x = 4
		y = 1
		relative_position_id = MIG_heavy_crusiers
		cost = 10
		available = {
		}

		completion_reward = {
			add_ideas = ITA_hidden_deck_conversion_production_ns


			navy_experience = 15

			###########
			### MTG ###
			###########
			if = { #MTG
				limit = {
					has_dlc = "Man the Guns"
				}
				if = {
					limit = {
						NOT = { has_tech = early_ship_hull_carrier }
					}
					set_technology = { early_ship_hull_carrier = 1 }
				}
				#Equipment Variant
				create_equipment_variant = {
					name = "Yening - Converted Liner"
					type = ship_hull_carrier_conversion_ca
					name_group = ITA_CV_HISTORICAL
					parent_version = 0
					allow_without_tech = yes #Makes no difference since focus grants appropriate tech (above), but it improves tooltip
					modules = {
						fixed_ship_deck_slot_1 = ship_deck_space
						fixed_ship_deck_slot_2 = ship_deck_space
						fixed_ship_anti_air_slot = ship_anti_air_2
						fixed_ship_radar_slot = empty
						fixed_ship_engine_slot = carrier_ship_engine_1
						fixed_ship_secondaries_slot = ship_secondaries_1
					}
				}

				#Line Production
				add_equipment_production = {
					equipment = {
						type = ship_hull_carrier_conversion_ca
						creator = "MIG"
						version_name = "Yening Class - Converted Liner"
					}
					name = "Yening"
					requested_factories = 1
					progress = 0.65
					amount = 1
				}
				#Line Production
				add_equipment_production = {
					equipment = {
						type = ship_hull_carrier_conversion_ca
						creator = "MIG"
						version_name = "Yening Class - Converted Liner"
					}
					name = "Yening II"
					requested_factories = 1
					progress = 0.65
					amount = 1
				}
			}
	
			
			random_owned_controlled_state = {
				limit = {
					is_fully_controlled_by = ROOT
					is_coastal = yes
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = MIG_top_of_the_line_navy
		icon = GFX_focus_NORDIC_com_navy
		prerequisite = { focus = MIG_superior_subs focus = MIG_escort_destroyers focus = MIG_battleships }

		x = 0
		y = 1
		relative_position_id = MIG_superior_subs
		cost = 10
		available = {
			if = {
				limit = {
					has_dlc = "Man the Guns"
				}
				has_tech = basic_ship_hull_cruiser
			}
			else = {
				has_tech = basic_light_cruiser
			}
		}

		completion_reward = {
			hidden_effect = {
				if = {
					limit = {
						any_navy_leader = {
							NOT = {
								has_trait = bold
							}
							skill > 3
						}
					}
					random_navy_leader = {
						limit = {
							NOT = {
								has_trait = bold
							}
							skill > 3
						}
						add_unit_leader_trait = bold
					}
				}
				else_if = {
					limit = {
						any_navy_leader = {
							NOT = {
								has_trait = bold
							}
						}
					}
					random_navy_leader = {
						limit = {
							NOT = {
								has_trait = bold
							}
						}
						add_unit_leader_trait = bold
					}
				}

				if = {
					limit = {
						any_navy_leader = {
							NOT = {
								has_trait = bold
							}
							skill > 3
						}
					}
					random_navy_leader = {
						limit = {
							NOT = {
								has_trait = bold
							}
							skill > 3
						}
						add_unit_leader_trait = bold
					}
				}
				else_if = {
					limit = {
						any_navy_leader = {
							NOT = {
								has_trait = bold
							}
						}
					}
					random_navy_leader = {
						limit = {
							NOT = {
								has_trait = bold
							}
						}
						add_unit_leader_trait = bold
					}
				}
			}
			
			navy_experience = 50

			###########
			### MTG ###
			###########
			if = { #MTG
				limit = {
					has_dlc = "Man the Guns"
				}
				if = { #CRUISER HULL III
					limit = {
						has_tech = improved_ship_hull_cruiser
					}
					if = {
						limit = {
							has_tech = basic_dp_light_battery
						}
						#Equipment Variant
						create_equipment_variant = {
							name = "Shandong Class"
							type = ship_hull_cruiser_3
							name_group = CHI_CL_HISTORICAL
							parent_version = 0
							allow_without_tech = yes #Makes no difference since focus requires appropriate tech (above), but it improves tooltip
							modules = {
								front_1_custom_slot = ship_light_medium_battery_3
								mid_1_custom_slot = ship_torpedo_2
								mid_2_custom_slot = dp_ship_secondaries_2
								rear_1_custom_slot = ship_anti_air_3
								rear_2_custom_slot = ship_airplane_launcher_2
								fixed_ship_battery_slot = ship_light_medium_battery_3
								fixed_ship_anti_air_slot = ship_anti_air_3
								fixed_ship_fire_control_system_slot = ship_fire_control_system_1
								fixed_ship_radar_slot = ship_sonar_1
								fixed_ship_engine_slot = cruiser_ship_engine_3
								fixed_ship_secondaries_slot = dp_ship_secondaries_2
								fixed_ship_armor_slot = ship_armor_cruiser_3
							}
						}
					}
					else = {
						#Equipment Variant
						create_equipment_variant = {
							name = "Shandong Class"
							type = ship_hull_cruiser_3
							name_group = CHI_CL_HISTORICAL
							parent_version = 0
							allow_without_tech = yes #Makes no difference since focus requires appropriate tech (above), but it improves tooltip
							modules = {
								front_1_custom_slot = ship_light_medium_battery_3
								mid_1_custom_slot = ship_torpedo_2
								mid_2_custom_slot = ship_secondaries_2
								rear_1_custom_slot = ship_anti_air_3
								rear_2_custom_slot = ship_airplane_launcher_2
								fixed_ship_battery_slot = ship_light_medium_battery_3
								fixed_ship_anti_air_slot = ship_anti_air_3
								fixed_ship_fire_control_system_slot = ship_fire_control_system_1
								fixed_ship_radar_slot = ship_sonar_1
								fixed_ship_engine_slot = cruiser_ship_engine_3
								fixed_ship_secondaries_slot = ship_secondaries_2
								fixed_ship_armor_slot = ship_armor_cruiser_3
							}
						}
					}

					#Line Production
					add_equipment_production = {
						equipment = {
							type = ship_hull_cruiser_3
							creator = "MIG"
							version_name = "Shandong Class"
						}
						name = "Shandong"
						requested_factories = 1
						progress = 0.5
						amount = 1
					}
					#Line Production
					add_equipment_production = {
						equipment = {
							type = ship_hull_cruiser_3
							creator = "MIG"
							version_name = "Shandong Class"
						}
						name = "Shandong II"
						requested_factories = 1
						progress = 0.35
						amount = 1
					}
				}
				else = { #CRUISER HULL II
					if = {
						limit = {
							has_tech = basic_dp_light_battery
						}
						#Equipment Variant
						create_equipment_variant = {
							name = "Shandong II Class"
							type = ship_hull_cruiser_2
							name_group = CHI_CL_HISTORICAL
							parent_version = 0
							allow_without_tech = yes #Makes no difference since focus requires appropriate tech (above), but it improves tooltip
							modules = {
								front_1_custom_slot = ship_anti_air_2
								mid_1_custom_slot = ship_torpedo_1
								mid_2_custom_slot = ship_airplane_launcher_2
								rear_1_custom_slot = ship_light_medium_battery_2
								fixed_ship_battery_slot = ship_light_medium_battery_2
								fixed_ship_anti_air_slot = ship_anti_air_2
								fixed_ship_fire_control_system_slot = ship_fire_control_system_1
								fixed_ship_radar_slot = empty
								fixed_ship_engine_slot = cruiser_ship_engine_2
								fixed_ship_secondaries_slot = dp_ship_secondaries_2
								fixed_ship_armor_slot = ship_armor_cruiser_2
							}
						}
					}
					else = {
						#Equipment Variant
						create_equipment_variant = {
							name = "Shandong II Class"
							type = ship_hull_cruiser_2
							name_group = CHI_CL_HISTORICAL
							parent_version = 0
							allow_without_tech = yes #Makes no difference since focus requires appropriate tech (above), but it improves tooltip
							modules = {
								front_1_custom_slot = ship_anti_air_2
								mid_1_custom_slot = ship_torpedo_1
								mid_2_custom_slot = ship_airplane_launcher_2
								rear_1_custom_slot = ship_light_medium_battery_2
								fixed_ship_battery_slot = ship_light_medium_battery_2
								fixed_ship_anti_air_slot = ship_anti_air_2
								fixed_ship_fire_control_system_slot = ship_fire_control_system_1
								fixed_ship_radar_slot = empty
								fixed_ship_engine_slot = cruiser_ship_engine_2
								fixed_ship_secondaries_slot = ship_secondaries_2
								fixed_ship_armor_slot = ship_armor_cruiser_2
							}
						}
					}

					#Line Production
					add_equipment_production = {
						equipment = {
							type = ship_hull_cruiser_2
							creator = "MIG"
							version_name = "Shandong II Class"
						}
						name = "Shengli"
						requested_factories = 1
						progress = 0.5
						amount = 1
					}
					#Line Production
					add_equipment_production = {
						equipment = {
							type = ship_hull_cruiser_2
							creator = "MIG"
							version_name = "Shandong II Class"
						}
						name = "Zhongguo"
						requested_factories = 1
						progress = 0.35
						amount = 1
					}
				}
			}

			### CORES

			if = {
				limit = {
					has_full_control_of_state = 598
				}
				598 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = dockyard
						level = 1
						instant_build = yes
					}
				}
			}

			if = {
				limit = {
					has_full_control_of_state = 597
				}
				597 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = dockyard
						level = 1
						instant_build = yes
					}
				}
			}

			if = {
				limit = {
					has_full_control_of_state = 614
				}
				614 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = dockyard
						level = 1
						instant_build = yes
					}
				}
			}



		}
	}

}