#############################
# Malaya Focus Tree         #
# By Cazadorian             # from Kaiserreich
#############################

focus_tree = {
	id = malaya_focus

	country = {
		factor = 0
		modifier = {
			add = 30
			tag = MLY
		}
	}
	default = no
	continuous_focus_position = { x = 2000 y = 500 }

	focus = {
		id = MLY_perjuangan_melayu
		icon = GFX_goal_TUR_modernise_islam
		cost = 7

		x = 5
		y = 0

		ai_will_do = { factor = 100 }

		available = {
			has_authoritarian_government = yes
		}

		mutually_exclusive = {
			focus = MLY_bersekutu_bertambah_mutu
			focus = MLY_satu_untuk_semua_semua_untuk_satu
		}

		on_uncomplete = {
			remove_ideas = {
				MLY_perjuangan_melayu_idea0
				MLY_perjuangan_melayu_idea1
				MLY_perjuangan_melayu_idea2
			}
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_perjuangan_melayu"
			add_ideas = MLY_perjuangan_melayu_idea0
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY }
	}

	focus = {
		id = MLY_malay_economic_patronage
		icon = GFX_goal_generic_union_agreement
		cost = 7

		relative_position_id = MLY_perjuangan_melayu
		x = -1
		y = 1

		ai_will_do = { factor = 50 }

		prerequisite = {
			focus = MLY_perjuangan_melayu
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_malay_economic_patronage"
			swap_ideas = {
				remove_idea = MLY_perjuangan_melayu_idea0
				add_idea = MLY_perjuangan_melayu_idea1
			}
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_PRODUCTION }
	}

	focus = {
		id = MLY_peoples_islamic_education_institutions
		icon = GFX_goal_OTT_Islamic_Education
		cost = 7

		relative_position_id = MLY_perjuangan_melayu
		x = -1
		y = 2

		ai_will_do = { factor = 50 }

		prerequisite = {
			focus = MLY_malay_economic_patronage
		}
		bypass = {
			has_country_flag = MLY_political_research_slot
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_peoples_islamic_education_institutions"
			add_research_slot_until_five = yes
			set_country_flag = MLY_political_research_slot
		}
		search_filters = { FOCUS_FILTER_RESEARCH }
	}

	focus = {
		id = MLY_enforcement_of_sharia_law
		icon = GFX_goal_islamic_government
		cost = 7

		relative_position_id = MLY_perjuangan_melayu
		x = -0
		y = 3

		ai_will_do = { factor = 50 }

		prerequisite = {
			focus = MLY_malay_economic_patronage
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_enforcement_of_sharia_law"
			swap_ideas = {
				remove_idea = MLY_perjuangan_melayu_idea1
				add_idea = MLY_perjuangan_melayu_idea2
			}
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_INDUSTRY }
	}

	focus = {
		id = MLY_strengthen_islamic_malay_identity
		icon = GFX_focus_TUR_loosen_the_laws_on_secularism
		cost = 7

		relative_position_id = MLY_perjuangan_melayu
		x = 1
		y = 1

		ai_will_do = { factor = 50 }

		prerequisite = {
			focus = MLY_perjuangan_melayu
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_strengthen_islamic_malay_identity"
			set_temp_variable = { ideology_change_var = 0.05 }
			change_ruling_party_popularity = yes
			add_war_support = 0.05
		}
		search_filters = { FOCUS_FILTER_POLITICAL }
	}

	focus = {
		id = MLY_bersekutu_bertambah_mutu
		icon = GFX_goal_generic_parliament2
		cost = 7

		x = 9
		y = 0

		ai_will_do = { factor = 100 }

		available = {
			has_elected_government = yes
		}

		mutually_exclusive = {
			focus = MLY_perjuangan_melayu
			focus = MLY_satu_untuk_semua_semua_untuk_satu
		}

		on_uncomplete = {
			remove_ideas = {
				MLY_malaya_merdeka_idea0
				MLY_malaya_merdeka_idea1
				MLY_malaya_merdeka_idea2
				MLY_the_six_pillars_idea0
				MLY_the_six_pillars_idea1
				MLY_the_six_pillars_idea3
				MLY_the_six_pillars_idea_oversight2
				MLY_the_six_pillars_idea_economy2
			}
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_bersekutu_bertambah_mutu"
			if = {
				limit = {
					has_government = social_democrat
				}
				add_ideas = MLY_the_six_pillars_idea0
			}
			else = {
				add_ideas = MLY_malaya_merdeka_idea0
			}
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY }
	}

	focus = {
		id = MLY_formation_of_the_legislative_council
		icon = GFX_focus_ETH_re-convene_the_parliament
		cost = 7

		relative_position_id = MLY_bersekutu_bertambah_mutu
		x = 0
		y = 1

		ai_will_do = { factor = 50 }

		available = {
			NOT = {
				has_government = social_democrat
			}
		}

		prerequisite = {
			focus = MLY_bersekutu_bertambah_mutu
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_formation_of_the_legislative_council"
			swap_ideas = {
				remove_idea = MLY_malaya_merdeka_idea0
				add_idea = MLY_malaya_merdeka_idea1
			}
			if = {
				limit = {
					NOT = { has_government = social_democrat }
				}
				set_temp_variable = { coalition_partner_var = token:social_democrat }
				add_to_coalition = yes
			}
			if = {
				limit = {
					NOT = { has_government = social_conservative }
				}
				set_temp_variable = { coalition_partner_var = token:social_conservative }
				add_to_coalition = yes
			}
			if = {
				limit = {
					NOT = { has_government = social_liberal }
				}
				set_temp_variable = { coalition_partner_var = token:social_liberal }
				add_to_coalition = yes
			}
			if = {
				limit = {
					NOT = { has_government = market_liberal }
				}
				set_temp_variable = { coalition_partner_var = token:market_liberal }
				add_to_coalition = yes
			}
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY }
	}

	focus = {
		id = MLY_the_malay_confederation
		icon = GFX_goal_OTT_constitution
		cost = 7

		relative_position_id = MLY_bersekutu_bertambah_mutu
		x = -2
		y = 2

		ai_will_do = { factor = 50 }

		available = {
			OR = {
				has_authoritarian_government = yes
				has_government = social_conservative
			}
		}

		mutually_exclusive = {
			focus = MLY_federal_reformation
		}

		prerequisite = {
			focus = MLY_formation_of_the_legislative_council
			focus = MLY_strengthen_islamic_malay_identity
		}

		on_uncomplete = {
			remove_ideas = {
				MLY_malay_confederation_idea0
				MLY_malay_confederation_idea1
			}
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_the_malay_confederation"
			add_ideas = MLY_malay_confederation_idea0
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_INDUSTRY }
	}

	focus = {
		id = MLY_enforcing_ketuanan_melayu
		icon = GFX_goal_Centralised_Government
		cost = 7

		relative_position_id = MLY_bersekutu_bertambah_mutu
		x = -2
		y = 3

		ai_will_do = { factor = 50 }

		prerequisite = {
			focus = MLY_the_malay_confederation
		}

		on_uncomplete = {
			remove_ideas = {
				MLY_reformed_federation_idea0
				MLY_reformed_federation_idea1
			}
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_enforcing_ketuanan_melayu"
			swap_ideas = {
				remove_idea = MLY_malay_confederation_idea0
				add_idea = MLY_malay_confederation_idea1
			}
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_INDUSTRY FOCUS_FILTER_PRODUCTION FOCUS_FILTER_MANPOWER }
	}

	focus = {
		id = MLY_federal_reformation
		icon = GFX_MLY_coat_of_arms
		cost = 7

		relative_position_id = MLY_bersekutu_bertambah_mutu
		x = 1
		y = 2

		ai_will_do = { factor = 50 }

		available = {
			OR = {
				has_liberal_government = yes
				has_government = radical_socialist
			}
		}

		mutually_exclusive = {
			focus = MLY_the_malay_confederation
		}
		prerequisite = {
			focus = MLY_satu_negara
			focus = MLY_formation_of_the_legislative_council
		}

		on_uncomplete = {
			remove_ideas = {
				MLY_reformed_federation_idea0
				MLY_reformed_federation_idea1
			}
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_federal_reformation"
			add_ideas = MLY_reformed_federation_idea0
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY FOCUS_FILTER_STABILITY }
	}

	focus = {
		id = MLY_enshrinement_of_multiethnicism
		icon = GFX_goal_INS_focus_malphilinsul
		cost = 7

		relative_position_id = MLY_bersekutu_bertambah_mutu
		x = 0
		y = 3

		ai_will_do = { factor = 50 }

		prerequisite = {
			focus = MLY_federal_reformation
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_enshrinement_of_multiethnicism"
			swap_ideas = {
				remove_idea = MLY_reformed_federation_idea0
				add_idea = MLY_reformed_federation_idea1
			}
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY FOCUS_FILTER_MANPOWER }
	}

	focus = {
		id = MLY_dual_justice_system
		icon = GFX_focus_generic_court
		cost = 7

		relative_position_id = MLY_bersekutu_bertambah_mutu
		x = 3
		y = 2

		ai_will_do = { factor = 50 }

		available = {
			NOT = {
				has_government = radical_socialist
			}
		}

		prerequisite = {
			focus = MLY_satu_negara
			focus = MLY_formation_of_the_legislative_council
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_dual_justice_system"
			add_stability = 0.05
			add_political_power = 75
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY }
	}

	focus = {
		id = MLY_national_schooling
		icon = GFX_goal_KTG_Educate_natives
		cost = 7

		relative_position_id = MLY_bersekutu_bertambah_mutu
		x = 2
		y = 3

		ai_will_do = { factor = 50 }

		prerequisite = {
			focus = MLY_dual_justice_system
		}
		bypass = {
			has_country_flag = MLY_political_research_slot
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_national_schooling"
			add_research_slot_until_five = yes
			set_country_flag = MLY_political_research_slot
		}
		search_filters = { FOCUS_FILTER_RESEARCH }
	}

	focus = {
		id = MLY_ensure_constitutional_oversight
		icon = GFX_focus_BRA_tribunal
		cost = 7

		relative_position_id = MLY_bersekutu_bertambah_mutu
		x = 3
		y = 4

		ai_will_do = { factor = 50 }

		prerequisite = {
			focus = MLY_dual_justice_system
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_ensure_constitutional_oversight"
			if = {
				limit = {
					has_idea = MLY_the_six_pillars_idea1
				}
				swap_ideas = {
					remove_idea = MLY_the_six_pillars_idea1
					add_idea = MLY_the_six_pillars_idea_oversight2
				}
			}
			else_if = {
				limit = {
					has_idea = MLY_the_six_pillars_idea_economy2
				}
				swap_ideas = {
					remove_idea = MLY_the_six_pillars_idea_economy2
					add_idea = MLY_the_six_pillars_idea3
				}
			}
			else = {
				swap_ideas = {
					remove_idea = MLY_malaya_merdeka_idea1
					add_idea = MLY_malaya_merdeka_idea2
				}
			}
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY }
	}

	focus = {
		id = MLY_satu_untuk_semua_semua_untuk_satu
		icon = GFX_goal_syndicalist_workers
		cost = 7

		x = 15
		y = 0

		ai_will_do = { factor = 100 }

		available = {
			has_socialist_government = yes
		}

		mutually_exclusive = {
			focus = MLY_perjuangan_melayu
			focus = MLY_bersekutu_bertambah_mutu
		}

		on_uncomplete = {
			remove_ideas = {
				MLY_satu_untuk_semua_semua_untuk_satu_idea0
				MLY_satu_untuk_semua_semua_untuk_satu_idea1
				MLY_satu_untuk_semua_semua_untuk_satu_idea2
				MLY_merdeka_dengan_darah_idea0
				MLY_merdeka_dengan_darah_idea1
				MLY_merdeka_dengan_darah_idea3
				MLY_merdeka_dengan_darah_idea_culture2
				MLY_merdeka_dengan_darah_idea_reliance2
			}
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_satu_untuk_semua_semua_untuk_satu"
			if = {
				limit = {
					has_government = radical_socialist
				}
				add_ideas = MLY_satu_untuk_semua_semua_untuk_satu_idea0
			}
			else = {
				add_ideas = MLY_merdeka_dengan_darah_idea0
			}
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_ARMY_BONUS FOCUS_FILTER_INDUSTRY }
	}

	focus = {
		id = MLY_satu_negara
		icon = GFX_goal_ideology_radical_socialist
		cost = 7

		relative_position_id = MLY_satu_untuk_semua_semua_untuk_satu
		x = -2
		y = 1

		ai_will_do = { factor = 50 }

		prerequisite = {
			focus = MLY_bersekutu_bertambah_mutu
			focus = MLY_satu_untuk_semua_semua_untuk_satu
		}

		available = {
			OR = {
				has_government = social_democrat
				has_government = radical_socialist
			}
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_satu_negara"
			if = {
				limit = {
					has_idea = MLY_the_six_pillars_idea0
				}
				swap_ideas = {
					remove_idea = MLY_the_six_pillars_idea0
					add_idea = MLY_the_six_pillars_idea1
				}
			}
			else = {
				swap_ideas = {
					remove_idea = MLY_satu_untuk_semua_semua_untuk_satu_idea0
					add_idea = MLY_satu_untuk_semua_semua_untuk_satu_idea1
				}
			}
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_MANPOWER FOCUS_FILTER_PRODUCTION }
	}

	focus = {
		id = MLY_cooperative_economy
		icon = GFX_goal_agrarian_reform
		cost = 7

		relative_position_id = MLY_satu_untuk_semua_semua_untuk_satu
		x = -2
		y = 3

		ai_will_do = { factor = 50 }

		prerequisite = {
			focus = MLY_satu_negara
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_cooperative_economy"
			if = {
				limit = {
					has_idea = MLY_the_six_pillars_idea1
				}
				swap_ideas = {
					remove_idea = MLY_the_six_pillars_idea1
					add_idea = MLY_the_six_pillars_idea_economy2
				}
			}
			else_if = {
				limit = {
					has_idea = MLY_the_six_pillars_idea_oversight2
				}
				swap_ideas = {
					remove_idea = MLY_the_six_pillars_idea_oversight2
					add_idea = MLY_the_six_pillars_idea3
				}
			}
			else = {
				swap_ideas = {
					remove_idea = MLY_satu_untuk_semua_semua_untuk_satu_idea1
					add_idea = MLY_satu_untuk_semua_semua_untuk_satu_idea2
				}
			}
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY }
	}

	focus = {
		id = MLY_towards_new_consciousness
		icon = GFX_focus_generic_socialist_science
		cost = 7

		relative_position_id = MLY_satu_untuk_semua_semua_untuk_satu
		x = -1
		y = 2

		ai_will_do = { factor = 50 }

		prerequisite = {
			focus = MLY_satu_negara
			focus = MLY_adopt_political_tutelage
		}
		bypass = {
			has_country_flag = MLY_political_research_slot
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_towards_new_consciousness"
			add_research_slot_until_five = yes
			set_country_flag = MLY_political_research_slot
		}
		search_filters = { FOCUS_FILTER_RESEARCH }
	}

	focus = {
		id = MLY_islamic_socialism
		icon = GFX_goal_INS_focus_islamic_socialism
		cost = 7

		relative_position_id = MLY_satu_untuk_semua_semua_untuk_satu
		x = 0
		y = 3

		ai_will_do = { factor = 50 }

		prerequisite = {
			focus = MLY_satu_negara
			focus = MLY_adopt_political_tutelage
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_islamic_socialism"
			add_stability = 0.05
			random_owned_controlled_state = {
				limit = {
					is_core_of = ROOT
					impassable = no
				}
				add_extra_state_shared_building_slots = 1
			}
		}
		search_filters = { FOCUS_FILTER_STABILITY FOCUS_FILTER_INDUSTRY }
	}

	focus = {
		id = MLY_adopt_political_tutelage
		icon = GFX_socialist_constitution
		cost = 7

		relative_position_id = MLY_satu_untuk_semua_semua_untuk_satu
		x = 1
		y = 1

		ai_will_do = { factor = 50 }

		available = {
			OR = {
				has_government = syndicalist
				has_government = totalist
			}
		}

		prerequisite = {
			focus = MLY_satu_untuk_semua_semua_untuk_satu
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_adopt_political_tutelage"
			swap_ideas = {
				remove_idea = MLY_merdeka_dengan_darah_idea0
				add_idea = MLY_merdeka_dengan_darah_idea1
			}
			if = {
				limit = {
					NOT = { has_government = radical_socialist }
				}
				set_temp_variable = { coalition_partner_var = token:radical_socialist }
				add_to_coalition = yes
			}
			if = {
				limit = {
					NOT = { has_government = syndicalist }
				}
				set_temp_variable = { coalition_partner_var = token:syndicalist }
				add_to_coalition = yes
			}
			if = {
				limit = {
					NOT = { has_government = totalist }
				}
				set_temp_variable = { coalition_partner_var = token:totalist }
				add_to_coalition = yes
			}
			if = {
				limit = {
					has_government = radical_socialist
				}
				set_temp_variable = { coalition_partner_var = token:social_democrat }
				add_to_coalition = yes
			}
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY }
	}

	focus = {
		id = MLY_national_self_reliance
		icon = GFX_goal_generic_autarky
		cost = 7

		relative_position_id = MLY_satu_untuk_semua_semua_untuk_satu
		x = 1
		y = 2

		ai_will_do = { factor = 50 }

		prerequisite = {
			focus = MLY_adopt_political_tutelage
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_national_self_reliance"
			if = {
				limit = {
					has_idea = MLY_merdeka_dengan_darah_idea_culture2
				}
				swap_ideas = {
					remove_idea = MLY_merdeka_dengan_darah_idea_culture2
					add_idea = MLY_merdeka_dengan_darah_idea3
				}
			}
			else = {
				swap_ideas = {
					remove_idea = MLY_merdeka_dengan_darah_idea1
					add_idea = MLY_merdeka_dengan_darah_idea_reliance2
				}
			}
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY }
	}

	focus = {
		id = MLY_reject_racial_division
		icon = GFX_goal_generic_national_unity
		cost = 7

		relative_position_id = MLY_satu_untuk_semua_semua_untuk_satu
		x = 3
		y = 2

		ai_will_do = { factor = 50 }

		prerequisite = {
			focus = MLY_adopt_political_tutelage
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_reject_racial_division"
			add_manpower = 10000
			set_temp_variable = { ideology_change_var = 0.025 }
			change_ruling_party_popularity = yes
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_MANPOWER }
	}

	focus = {
		id = MLY_encourage_cultural_unity
		icon = GFX_goal_generic_culture2
		cost = 7

		relative_position_id = MLY_satu_untuk_semua_semua_untuk_satu
		x = 3
		y = 3

		ai_will_do = { factor = 50 }

		prerequisite = {
			focus = MLY_reject_racial_division
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_encourage_cultural_unity"
			if = {
				limit = {
					has_idea = MLY_merdeka_dengan_darah_idea_reliance2
				}
				swap_ideas = {
					remove_idea = MLY_merdeka_dengan_darah_idea_reliance2
					add_idea = MLY_merdeka_dengan_darah_idea3
				}
			}
			else = {
				swap_ideas = {
					remove_idea = MLY_merdeka_dengan_darah_idea1
					add_idea = MLY_merdeka_dengan_darah_idea_culture2
				}
			}
		}
		search_filters = { FOCUS_FILTER_MANPOWER }
	}

	focus = {
		id = MLY_salvaging_german_industry
		icon = GFX_goal_generic_industry_reallocation
		cost = 7

		x = 5
		y = 5

		ai_will_do = { factor = 100 }

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_salvaging_german_industry"
			add_one_random_civilian_factory = yes
			add_tech_bonus = {
				name = SAR_subsidisation_of_forestry
				bonus = 0.25
				uses = 2
				category = industry
			}
		}
		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH }
	}

	focus = {
		id = MLY_integration_of_singapore
		icon = GFX_goal_INS_focus_merdeka
		cost = 7

		relative_position_id = MLY_salvaging_german_industry
		x = -2
		y = 2

		ai_will_do = { factor = 100 }

		available = {
			336 = { is_owned_and_controlled_by = ROOT }
		}

		prerequisite = {
			focus = MLY_salvaging_german_industry
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_integration_of_singapore"
			336 = {
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
				add_extra_state_shared_building_slots = 1
			}

			add_popularity = {
				ideology = market_liberal
				popularity = 0.05
			}
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY }
	}

	focus = {
		id = MLY_union_with_sarawak
		icon = GFX_SAR_kingdom
		cost = 7

		relative_position_id = MLY_salvaging_german_industry
		x = -3
		y = 1

		ai_will_do = { factor = 100 }

		available = {
			333 = { is_owned_and_controlled_by = ROOT }
		}

		prerequisite = {
			focus = MLY_salvaging_german_industry
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_union_with_sarawak"
			333 = {
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
				add_extra_state_shared_building_slots = 1
			}
			if = {
				limit = {
					828 = { is_owned_and_controlled_by = ROOT }
				}
				828 = {
					add_extra_state_shared_building_slots = 1
				}
			}
		}
		search_filters = { FOCUS_FILTER_INDUSTRY }
	}

	focus = {
		id = MLY_reclamation_of_north_malaya
		icon = GFX_goal_JAP_target_siam
		cost = 7

		relative_position_id = MLY_salvaging_german_industry
		x = -1
		y = 1

		ai_will_do = { factor = 100 }

		available = {
			830 = { is_owned_and_controlled_by = ROOT }
			999 = { is_owned_and_controlled_by = ROOT }
			751 = { is_owned_and_controlled_by = ROOT }
		}

		prerequisite = {
			focus = MLY_salvaging_german_industry
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_reclamation_of_north_malaya"
			add_resource = {
				type = tungsten
				amount = 6
				state = 830
			}
			751 = {
				add_extra_state_shared_building_slots = 1
			}

			add_political_power = 50
		}
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY }
	}

	focus = {
		id = MLY_develop_kuala_lumpur
		icon = GFX_goal_generic_build_housing
		cost = 7

		relative_position_id = MLY_salvaging_german_industry
		x = 0
		y = 2

		ai_will_do = { factor = 50 }

		available = {
			846 = { is_owned_and_controlled_by = ROOT }
		}

		prerequisite = {
			focus = MLY_salvaging_german_industry
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_develop_kuala_lumpur"
			random_owned_controlled_state = {
				prioritize = { 846 }
				limit = {
					is_core_of = ROOT
					impassable = no
					free_building_slots = { building = infrastructure size > 0 }
				}
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
				add_extra_state_shared_building_slots = 1
			}
		}
		search_filters = { FOCUS_FILTER_INDUSTRY }
	}

	focus = {
		id = MLY_malacca_dockyards
		icon = GFX_goal_generic_shipyard
		cost = 7

		relative_position_id = MLY_salvaging_german_industry
		x = -1
		y = 3

		ai_will_do = { factor = 50 }

		available = {
			846 = { is_owned_and_controlled_by = ROOT }
		}

		prerequisite = {
			focus = MLY_develop_kuala_lumpur
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_malacca_dockyards"
			random_owned_controlled_state = {
				prioritize = { 846 }
				limit = {
					is_core_of = ROOT
					impassable = no
				}
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
				add_extra_state_shared_building_slots = 1
			}
		}
		search_filters = { FOCUS_FILTER_NAVY_BONUS FOCUS_FILTER_INDUSTRY }
	}

	focus = {
		id = MLY_johor_factories
		icon = GFX_goal_construction_engineering
		cost = 7

		relative_position_id = MLY_salvaging_german_industry
		x = 1
		y = 3

		ai_will_do = { factor = 50 }

		available = {
			846 = { is_owned_and_controlled_by = ROOT }
		}

		prerequisite = {
			focus = MLY_develop_kuala_lumpur
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_johor_factories"
			random_owned_controlled_state = {
				prioritize = { 846 }
				limit = {
					is_core_of = ROOT
					impassable = no
				}
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
				add_extra_state_shared_building_slots = 1
			}
		}
		search_filters = { FOCUS_FILTER_INDUSTRY }
	}

	focus = {
		id = MLY_support_rubber_plantation_expansion
		icon = GFX_goal_KTG_Rubber_Farming
		cost = 7

		relative_position_id = MLY_salvaging_german_industry
		x = 1
		y = 1

		ai_will_do = { factor = 60 }

		available = {
			846 = { is_owned_and_controlled_by = ROOT }
		}

		prerequisite = {
			focus = MLY_salvaging_german_industry
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_support_rubber_plantation_expansion"
			add_ideas = MLY_rubber_plantation_idea
		}
		search_filters = { FOCUS_FILTER_INDUSTRY }
	}

	focus = {
		id = MLY_pahang_bauxite_mining
		icon = GFX_focus_generic_mining_industry
		cost = 7

		relative_position_id = MLY_salvaging_german_industry
		x = 2
		y = 2

		ai_will_do = { factor = 60 }

		available = {
			1002 = { is_owned_and_controlled_by = ROOT }
		}

		prerequisite = {
			focus = MLY_support_rubber_plantation_expansion
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_pahang_bauxite_mining"
			add_resource = {
				type = aluminium
				amount = 8
				state = 1002
			}
		}
		search_filters = { FOCUS_FILTER_INDUSTRY }
	}

	focus = {
		id = MLY_reform_the_malay_regiments
		icon = GFX_goal_army_guy_2
		cost = 7

		x = 12
		y = 5

		ai_will_do = {
			factor = 35
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_reform_the_malay_regiments"
			if = {
				limit = {
					NOT = { has_template = "Malay Regiment" }
				}
				division_template = {
					name = "Malay Regiment"
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 0 y = 3 }
						infantry = { x = 1 y = 0 }
					}
				}
			}
			random_owned_controlled_state = {
				limit = { valid_state_for_spawning_friendly_unit = yes }
				create_unit = {
					division = "name = \"1st Malay Regiment\" division_template = \"Malay Regiment\" start_experience_factor = 0.1"
					owner = PREV
				}
				create_unit = {
					division = "name = \"2nd Malay Regiment\" division_template = \"Malay Regiment\" start_experience_factor = 0.1"
					owner = PREV
				}
			}
		}
		search_filters = { FOCUS_FILTER_ARMY_BONUS }
	}

	focus = {
		id = MLY_scavenge_abandoned_equipment
		icon = GFX_focus_ETH_scavenging_tactics
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = 2
		y = 0

		ai_will_do = {
			factor = 35
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_scavenge_abandoned_equipment"
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = 2000
				producer = GEA
			}
		}
		search_filters = { FOCUS_FILTER_ARMY_BONUS }
	}

	focus = {
		id = MLY_learning_from_our_liberators
		icon = GFX_goal_officers
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = 4
		y = 0

		ai_will_do = { factor = 100 }

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_learning_from_our_liberators"
			army_experience = 25
			add_doctrine_cost_reduction = {
				name = MLY_learning_from_our_liberators
				cost_reduction = 0.25
				uses = 1
				category = land_doctrine
			}
		}
		search_filters = { FOCUS_FILTER_ARMY_BONUS FOCUS_FILTER_RESEARCH }
	}

	focus = {
		id = MLY_establish_the_malay_army
		icon = GFX_MLY_army
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = 2
		y = 1

		ai_will_do = {
			factor = 35
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		prerequisite = {
			focus = MLY_reform_the_malay_regiments
		}
		prerequisite = {
			focus = MLY_scavenge_abandoned_equipment
		}
		prerequisite = {
			focus = MLY_learning_from_our_liberators
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_establish_the_malay_army"
			add_ideas = MLY_army_idea0
		}
		search_filters = { FOCUS_FILTER_ARMY_BONUS }
	}

	focus = {
		id = MLY_incorporate_the_rangers
		icon = GFX_SIA_jungletraining
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = 2
		y = 2

		ai_will_do = {
			factor = 35
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		prerequisite = {
			focus = MLY_establish_the_malay_army
		}
		available = {
			owns_state = 333
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_incorporate_the_rangers"
			hidden_effect = { set_technology = { jungle_warfare = 1 } }
			custom_effect_tooltip = SIA_jungle_warfare_effect

			add_tech_bonus = {
				name = MLY_incorporate_the_rangers
				bonus = 0.5
				uses = 1
				category = cat_special_forces_generic
			}
		}
		search_filters = { FOCUS_FILTER_ARMY_BONUS FOCUS_FILTER_RESEARCH }
	}

	focus = {
		id = MLY_engineer_regiments
		icon = GFX_goal_generic_barricades
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = 0
		y = 2

		ai_will_do = {
			factor = 35
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		prerequisite = {
			focus = MLY_establish_the_malay_army
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_engineer_regiments"
			add_tech_bonus = {
				name = MLY_engineer_regiments
				bonus = 1
				uses = 1
				category = engineers_tech
			}
		}
		search_filters = { FOCUS_FILTER_RESEARCH }
	}

	focus = {
		id = MLY_malay_armoured_corp
		icon = GFX_goal_generic_army_tanks2
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = 2
		y = 3

		ai_will_do = {
			factor = 35
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		prerequisite = {
			focus = MLY_engineer_regiments
		}
		available = {
			is_subject = yes
			if = {
				limit = {
					is_subject = yes
				}
				overlord = { has_tech = basic_medium_tank_chassis }
			}
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_malay_armoured_corp"
			if = {
				limit = {
					is_subject = yes
					overlord = { has_tech = basic_medium_tank_chassis }
				}
				add_equipment_to_stockpile = {
					type = medium_tank_chassis
					amount = 100
					producer = overlord
				}
			}
		}
		search_filters = { FOCUS_FILTER_ARMY_BONUS FOCUS_FILTER_RESEARCH }
	}

	focus = {
		id = MLY_native_rifle_development
		icon = GFX_focus_generic_military_equipment
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = 1
		y = 4

		ai_will_do = {
			factor = 35
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		prerequisite = {
			focus = MLY_engineer_regiments
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_native_rifle_development"
			add_tech_bonus = {
				name = MLY_native_rifle_development
				bonus = 0.5
				uses = 2
				category = infantry_weapons
			}
		}
		search_filters = { FOCUS_FILTER_RESEARCH }
	}

	focus = {
		id = MLY_expand_the_training_depot
		icon = GFX_focus_generic_military_academy
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = 0
		y = 3

		ai_will_do = {
			factor = 35
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		prerequisite = {
			focus = MLY_engineer_regiments
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_expand_the_training_depot"
			add_research_slot_until_five = yes
		}
		search_filters = { FOCUS_FILTER_RESEARCH }
	}

	focus = {
		id = MLY_organised_command_structure
		icon = GFX_goal_generic_army_command_power
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = 4
		y = 2

		ai_will_do = {
			factor = 35
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		prerequisite = {
			focus = MLY_establish_the_malay_army
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_organised_command_structure"
			swap_ideas = {
				remove_idea = MLY_army_idea0
				add_idea = MLY_army_idea1
			}
		}
		search_filters = { FOCUS_FILTER_ARMY_BONUS }
	}

	focus = {
		id = MLY_multiracial_recruitment
		icon = GFX_goal_conscription
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = 4
		y = 3

		ai_will_do = {
			factor = 35
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		prerequisite = {
			focus = MLY_organised_command_structure
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_multiracial_recruitment"
			if = {
				limit = {
					has_idea = MLY_army_idea_territorial2
				}
				swap_ideas = {
					remove_idea = MLY_army_idea_territorial2
					add_idea = MLY_army_idea3
				}
			}
			else = {
				swap_ideas = {
					remove_idea = MLY_army_idea1
					add_idea = MLY_army_idea_recruitment2
				}
			}
		}
		search_filters = { FOCUS_FILTER_ARMY_BONUS FOCUS_FILTER_MANPOWER }
	}

	focus = {
		id = MLY_territorial_army_regiment
		icon = GFX_EGY_Palestine_Defence
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = 3
		y = 4

		ai_will_do = {
			factor = 35
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		prerequisite = {
			focus = MLY_organised_command_structure
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_territorial_army_regiment"
			if = {
				limit = {
					has_idea = MLY_army_idea_recruitment2
				}
				swap_ideas = {
					remove_idea = MLY_army_idea_recruitment2
					add_idea = MLY_army_idea3
				}
			}
			else = {
				swap_ideas = {
					remove_idea = MLY_army_idea1
					add_idea = MLY_army_idea_territorial2
				}
			}
		}
		search_filters = { FOCUS_FILTER_ARMY_BONUS }
	}

	focus = {
		id = MLY_warriors_in_the_skies
		icon = GFX_MLY_union_airforce
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = -2
		y = 2

		ai_will_do = {
			factor = 25
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		prerequisite = {
			focus = MLY_establish_the_malay_army
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_warriors_in_the_skies"
			air_experience = 25
			add_tech_bonus = {
				name = MLY_warriors_in_the_skies
				bonus = 0.5
				uses = 1
				category = light_fighter
			}
		}
		search_filters = { FOCUS_FILTER_AIRFORCE_BONUS FOCUS_FILTER_RESEARCH }
	}

	focus = {
		id = MLY_simpang_airport
		icon = GFX_focus_generic_air_bases
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = -1
		y = 4

		ai_will_do = {
			factor = 25
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		prerequisite = {
			focus = MLY_warriors_in_the_skies
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_simpang_airport"
			random_owned_controlled_state = {
				prioritize = { 846 }
				limit = {
					is_core_of = ROOT
					impassable = no
					free_building_slots = { building = air_base size > 1 }
				}
				add_building_construction = {
					type = air_base
					level = 2
					instant_build = yes
				}
			}
		}
		search_filters = { FOCUS_FILTER_AIRFORCE_BONUS }
	}

	focus = {
		id = MLY_importation_of_aircraft
		icon = GFX_goal_ELS_Plane_Lease
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = -2
		y = 3

		ai_will_do = {
			factor = 25
			modifier = {
				factor = 2
				has_war = yes
			}
		}
		prerequisite = {
			focus = MLY_warriors_in_the_skies
		}
		available = {
			is_subject = yes
			if = {
				limit = {
					is_subject = yes
				}
				overlord = { has_design_based_on = small_plane_airframe }
			}
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_importation_of_aircraft"
			if = {
				limit = {
					is_subject = yes
					overlord = { has_design_based_on = small_plane_airframe }
				}
				add_equipment_to_stockpile = {
					type = small_plane_airframe
					amount = 25
					producer = overlord
				}
			}
		}
		search_filters = { FOCUS_FILTER_AIRFORCE_BONUS }
	}

	focus = {
		id = MLY_on_the_great_ocean
		icon = GFX_MLY_union_navy
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = 6
		y = 2

		ai_will_do = {
			factor = 25
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		prerequisite = {
			focus = MLY_establish_the_malay_army
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_on_the_great_ocean"
			navy_experience = 25
			add_tech_bonus = {
				name = MLY_warriors_in_the_skies
				bonus = 0.5
				uses = 2
				category = naval_doctrine
			}
		}
		search_filters = { FOCUS_FILTER_NAVY_BONUS FOCUS_FILTER_RESEARCH }
	}

	focus = {
		id = MLY_defending_the_straits
		icon = GFX_goal_generic_coastal_navy2
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = 6
		y = 3

		ai_will_do = {
			factor = 25
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		prerequisite = {
			focus = MLY_on_the_great_ocean
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_defending_the_straits"
			add_tech_bonus = {
				name = MLY_defending_the_straits
				bonus = 1
				uses = 1
				category = dd_tech
			}
		}
		search_filters = { FOCUS_FILTER_RESEARCH FOCUS_FILTER_NAVY_BONUS }
	}

	focus = {
		id = MLY_disrupt_enemy_shipping
		icon = GFX_goal_generic_navy_submarine
		cost = 7

		relative_position_id = MLY_reform_the_malay_regiments
		x = 5
		y = 4

		ai_will_do = {
			factor = 25
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		prerequisite = {
			focus = MLY_on_the_great_ocean
		}

		completion_reward = {
			log = "[GetLogRoot]: Focus Completed MLY_disrupt_enemy_shipping"
			add_tech_bonus = {
				name = MLY_disrupt_enemy_shipping
				bonus = 1
				uses = 1
				category = ss_tech
			}
		}
		search_filters = { FOCUS_FILTER_RESEARCH FOCUS_FILTER_NAVY_BONUS }
	}

}
