Losa10/PreTrain-HOI4-Modding-Assistant huggingface dataset:
### Entity: National Focus
Tree: bel_focus
Component: BEL_technology_sharing_communism
Constructs: prerequisite, has_war, has_government, completion_reward, is_in_faction, is_in_faction_with, add_tech_bonus, electronics_bonus
Source: game
File: common/national_focus/r56_belgium.txt

Code:
focus = {
	id = BEL_technology_sharing_communism
	icon = GFX_goal_communist_brain
	prerequisite = {
		focus = BEL_independent_revolution BEL_sign_pact_with_soviets
	}
	available = {
		has_government = communism
		has_war = yes
		is_in_faction = yes
		OR = {
			num_of_factories = > 30
			any_country = {
				is_in_faction_with = ROOT
				num_of_factories = > 30
			}
		}
	}
	relative_position_id = BEL_sign_pact_with_soviets
	x = 1
	y = 1
	cost = 10
	ai_will_do = {
		base = 5
	}
	completion_reward = {
		add_tech_bonus = {
			name = electronics_bonus
			bonus = 1
			uses = 1
			category = electronics
		} {
			name = industrial_bonus
			bonus = 1
			uses = 1
			category = industry
		} {
			name = infantry_weapons_bonus
			bonus = 1
			uses = 1
			category = infantry_weapons artillery
		}
	}
	search_filters = {
		FOCUS_FILTER_RESEARCH
	}
}
### Entity: AI Strategy
Component: ITA_template_design_1
Source: game
File: common/ai_strategy/ITA.txt

Code:
ITA_template_design_1 = {
	allowed = {
		original_tag = ITA
	}
	enable = {
		date = < 1940.1.1
	}
	abort = {
		date = > 1940.1.1
	}
	ai_strategy = {
		type = template_prio
		id = motorized
		value = 10
	} {
		type = template_prio
		id = cavalry
		value = -100
	} {
		type = template_prio
		id = light_armor
		value = 40
	} {
		type = template_prio
		id = medium_armor
		value = 10
	} {
		type = template_prio
		id = heavy_armor
		value = -50
	} {
		type = template_prio
		id = paratroopers
		value = -50
	} {
		type = role_ratio
		id = garrison
		value = 5
	} {
		type = role_ratio
		id = militias
		value = 5
	}
}
### Entity: Modifier Reference
Component: SWE_ball_bearing_food_exchange
Constructs: stability_factor
Source: game
File: common/dynamic_modifiers/aat_dynamic_modifiers.txt

Code:
SWE_ball_bearing_food_exchange = {
	icon = GFX_idea_generic_agrarian_society
	stability_factor = SWE_ball_bearing_food_exchange_stab_factor
	weekly_manpower = SWE_ball_bearing_food_exchange_weekly_manpower
}
### Entity: Country History
Country: XIC
Component: XIC_army
Source: game
File: history/countries/XIC - Xi'An.txt

Code:
# OOB & Army Setup for XIC
oob = XIC_1936_sea
### Entity: Character
Component: XSM_zhang_zhongliang
Source: game
File: common/characters/XSM.txt

Code:
XSM_zhang_zhongliang = {
	name = XSM_zhang_zhongliang
	portraits = {
		civilian = {
			large = gfx/leaders/Asia/Portrait_Asia_Generic_1.dds
		}
	}
	country_leader = {
		ideology = marxism
		traits = {
			smooth_talking_charmer armaments_organizer
		}
		expire = 1956.1.1.12
		id = -1
	}
}
### Entity: Character
Component: GER_all_round_expert
Source: game
File: common/country_leader/r56_traits.txt

Code:
GER_all_round_expert = {
	sprite = 12
	random = no
	army_armor_attack_factor = 0.05
	army_armor_defence_factor = 0.05
	army_artillery_attack_factor = 0.05
	army_artillery_defence_factor = 0.05
	army_infantry_attack_factor = 0.05
	army_infantry_defence_factor = 0.05
}
### Entity: Idea
Component: mutiny_2
Constructs: army_attack_factor, removal_cost
Source: game
File: common/ideas/zzz_generic.txt

Code:
mutiny_2 = {
	allowed = {
		always = no
	}
	removal_cost = -1
	allowed_civil_war = {
		always = yes
	}
	picture = generic_army_problems
	modifier = {
		army_morale_factor = -0.35
		training_time_factor = 0.35
		army_attack_factor = -0.5
		experience_gain_army = -0.2
		army_org_factor = -0.2
	}
}
### Entity: Idea
Component: r56_CAN_conscription_forced
Constructs: stability_factor, war_support_factor, removal_cost
Source: game
File: common/ideas/r56_canada.txt

Code:
r56_CAN_conscription_forced = {
	name = r56_CAN_conscription_forced
	allowed = {
		always = no
	}
	allowed_civil_war = {

	}
	picture = tfv_can_conscription_crisis
	removal_cost = -1
	modifier = {
		stability_factor = -0.05
		war_support_factor = -0.05
		army_morale_factor = -0.02
	}
}
### Entity: Character
Component: URG_gervasio_de_posadas_belgrano
Source: game
File: common/characters/URG.txt

Code:
URG_gervasio_de_posadas_belgrano = {
	advisor = {
		slot = political_advisor
		idea_token = URG_gervasio_de_posadas_belgrano
		allowed = {
			original_tag = URG
		}
		available = {

		}
		traits = {
			conservative_grandee
		}
	}
	portraits = {
		army = {
			small = GFX_idea_generic_political_advisor_south_america_3
		}
	}
}
### Entity: Scripted Effect
Component: SWI_adjust_gold_market_after_seizing_gold
Constructs: limit, check_variable, remove_dynamic_modifier, set_variable, clear_variable
Source: game
File: common/scripted_effects/SWI_scripted_effects.txt

Code:
SWI_adjust_gold_market_after_seizing_gold = {
	if = {
		limit = {
			check_variable = {
				SWI.SWI_gold_trade = SWI_country_gold_trading_level
			}
		}
		SWI = {
			remove_dynamic_modifier = {
				modifier = SWI_swiss_gold_market
			}
			set_variable = {
				SWI.SWI_gold_trade = 0
			}
		}
	}
	else = {
		subtract_from_variable = {
			SWI.SWI_gold_trade_consumer_goods_factor = SWI_gold_trade_consumer_goods_factor
		} {
			SWI.SWI_gold_trade_building_speed_factor = SWI_gold_trade_building_speed_factor
		} {
			SWI.SWI_gold_trade_research_speed_factor = SWI_gold_trade_research_speed_factor
		} {
			SWI.SWI_gold_trade_lack_of_resource_penalty_factor = SWI_gold_trade_lack_of_resource_penalty_factor
		} {
			SWI.SWI_gold_trade_factory_max_efficiency_factor = SWI_gold_trade_factory_max_efficiency_factor
		} {
			SWI.SWI_gold_trade = SWI_country_gold_trading_level
		}
		custom_Effect_tooltip = SWI_reducing_effects_from_seizing_gold_TT
	}
	clear_variable = SWI_gold_trade_consumer_goods_factor SWI_gold_trade_building_speed_factor SWI_gold_trade_research_speed_factor SWI_gold_trade_lack_of_resource_penalty_factor SWI_gold_trade_factory_max_efficiency_factor
}
### Entity: State History
Component: 514
Constructs: force_link_ownership_to, add_core_of
Source: game
File: history/states/514-North Africa.txt

Code:
state = {
	id = 514
	name = STATE_514
	manpower = 207733
	state_category = wasteland
	impassable = yes
	force_link_ownership_to = 513
	history = {
		owner = FRA
		add_core_of = ALG
		buildings = {
			infrastructure = 0
		}
	}
	provinces = {
		1043 1095 1901 1958 2049 4903 5035 5095 7041 8061 8077 8088 10731 10749 12711 12842 12849
	}
	local_supplies = 0.0
}
### Entity: Military Industrial Organization
Component: HUN_mwg_raba_organization
Constructs: has_dlc
Source: game
File: common/military_industrial_organization/organizations/HUN_organization.txt

Code:
HUN_mwg_raba_organization = {
	include = generic_motorized_mechanized_organization
	icon = GFX_idea_HUN_mwg_raba
	allowed = {
		original_tag = HUN
		has_dlc = Arms Against Tyranny Gotterdammerung
	}
}
### Entity: National Focus
Tree: ita_focus
Component: ITA_fanti_dell_aria
Constructs: division_template, prerequisite, limit, completion_reward, has_tech, add_to_variable, has_template, load_oob
Source: game
File: common/national_focus/italy.txt

Code:
focus = {
	id = ITA_fanti_dell_aria
	icon = GFX_focus_generic_paratrooper
	prerequisite = {
		focus = ITA_bersaglieri
	}
	x = 0
	y = 2
	relative_position_id = ITA_bersaglieri
	cost = 10
	available = {
		has_tech = paratroopers
	}
	search_filters = {
		FOCUS_FILTER_RESEARCH FOCUS_FILTER_ARMY_XP FOCUS_FILTER_MANPOWER
	}
	completion_reward = {
		add_to_variable = {
			ITA_re_special_forces_cap = 0.02
		} {
			ITA_re_special_forces_out_of_supply_factor = -0.1
		} {
			ITA_re_modifier_army_sub_unit_paratrooper_max_org_factor = 0.05
		}
		custom_effect_tooltip = ITA_fanti_dell_aria_re_tt
		army_experience = 15
		hidden_effect = {
			if = {
				limit = {
					NOT = {
						has_template = Paratroopers
					}
				}
				load_oob = unlock_paratroopers
			}
		}
		random_owned_controlled_state = {
			limit = {
				is_core_of = ROOT
				is_fully_controlled_by = ROOT
			}
			prioritize = {
				2 162 117 158
			}
			custom_effect_tooltip = ITA_fanti_dell_aria_spawn_divs_tt
			hidden_effect = {
				create_unit = {
					division = division_template = "Paratroopers" start_experience_factor = 0.4 start_equipment_factor = 1.0
					owner = ROOT
					count = 3
				}
			}
		}
		if = {
			limit = {
				any_owned_state = {
					is_core_of = LBA
					is_fully_controlled_by = ROOT
				}
			}
			random_owned_controlled_state = {
				limit = {
					is_core_of = LBA
					is_fully_controlled_by = ROOT
				}
				prioritize = {
					448 450
				}
				custom_effect_tooltip = ITA_fanti_dell_aria_spawn_divs_libya_tt
				hidden_effect = {
					create_unit = {
						division = name = "Ascari del Cielo" division_template = "Paratroopers" start_experience_factor = 0.4 start_equipment_factor = 1.0
						owner = ROOT
						count = 1
					}
				}
			}
		}
		else_if = {
			limit = {
				any_subject_country = {
					any_controlled_state = {
						is_core_of = LBA
						is_fully_controlled_by = PREV
					}
				}
			}
			random_subject_country = {
				limit = {
					any_controlled_state = {
						is_core_of = LBA
						is_fully_controlled_by = PREV
					}
				}
				random_owned_controlled_state = {
					limit = {
						is_core_of = LBA
						is_fully_controlled_by = ROOT
					}
					prioritize = {
						448 450
					}
					custom_effect_tooltip = ITA_fanti_dell_aria_spawn_divs_libya_tt
					hidden_effect = {
						create_unit = {
							division = name = "Ascari del Cielo" division_template = "Paratrooper
# ... (truncated)
### Entity: Event
Component: NSB_soviet_civil_war_common.004
Constructs: is_triggered_only, limit, has_global_flag, random_list, random_army_leader, has_trait, set_variable, random_navy_leader
Source: game
File: events/NSB_Soviet.txt

Code:
country_event = {
	id = NSB_soviet_civil_war_common.004
	title = NSB_soviet_civil_war_common.004.t
	desc = NSB_soviet_civil_war_common.004.desc
	is_triggered_only = yes
	hidden = yes
	trigger = {
		SOV_soviet_civil_war_not_started = yes
	}
	option = {
		name = NSB_soviet_civil_war_common.004.a
		IF = {
			limit = {
				NOT = {
					has_global_flag = SOV_soviet_civil_war_over
				}
			}
			random_list = {
				10 = {
					random_army_leader = {
						limit = {
							NOT = {
								has_trait = trait_SOV_stalinist
							} {
								has_trait = trait_SOV_bukharinist
							} {
								has_trait = trait_SOV_trotskyist
							} {
								has_trait = trait_SOV_monarchist_sympathizer
							}
						}
						set_variable = {
							SOV.SOV_selected_general_stalin = THIS
						}
					}
					activate_mission = SOV_align_general_stalin
				} {
					random_navy_leader = {
						limit = {
							NOT = {
								has_trait = trait_SOV_stalinist
							} {
								has_trait = trait_SOV_bukharinist
							} {
								has_trait = trait_SOV_trotskyist
							} {
								has_trait = trait_SOV_monarchist_sympathizer
							}
						}
						set_variable = {
							SOV.SOV_selected_admiral_stalin = THIS
						}
					}
					activate_mission = SOV_align_admiral_stalin
				}
			}
		}
	}
}
### Entity: Wiki Documentation
Construct: html
Source: wiki
File: wiki/File%3AItaly_political.jpeg.html

Doc:
File

File history

File usage
Size of this preview: 1,280 × 800 pixels. Other resolution: 1,680 × 1,050 pixels.
Original file &#8206;(1,680 × 1,050 pixels, file size: 281 KB, MIME type: image/jpeg)
### Entity: National Focus
Tree: arg_focus
Component: ARG_a_true_democracy
Constructs: prerequisite, limit, add_stability, completion_reward, random_core_state, is_fully_controlled_by, add_extra_state_shared_building_slots, add_building_construction
Source: game
File: common/national_focus/argentina.txt

Code:
focus = {
	id = ARG_a_true_democracy
	icon = GFX_goal_support_democracy
	prerequisite = {
		focus = ARG_anti_corruption_policies
	}
	x = 0
	y = 1
	relative_position_id = ARG_anti_corruption_policies
	cost = 10
	available = {

	}
	ai_will_do = {
		factor = 5
	}
	search_filters = {
		FOCUS_FILTER_STABILITY FOCUS_FILTER_INDUSTRY FOCUS_FILTER_POLITICAL
	}
	completion_reward = {
		add_stability = 0.02
		random_core_state = {
			limit = {
				is_fully_controlled_by = ROOT
			}
			add_extra_state_shared_building_slots = 1
			add_building_construction = {
				type = industrial_complex
				level = 1
				instant_build = yes
			}
		}
		add_popularity = {
			ideology = democratic
			popularity = 0.05
		}
	}
}
### Entity: Country History
Country: BAR
Component: BAR_technology
Constructs: set_technology
Source: game
File: history/countries/BAR - Barotseland.txt

Code:
# Starting Technologies for BAR
set_technology = {
	infantry_weapons = 1
}
### Entity: National Focus
Tree: chl_focus
Component: CHL_sell_arica_to_peru
Constructs: has_completed_focus, prerequisite, has_government, owns_state, has_war_with, has_country_flag, completion_reward, is_owned_and_controlled_by
Source: game
File: common/national_focus/chile.txt

Code:
focus = {
	id = CHL_sell_arica_to_peru
	icon = GFX_focus_CHL_sell_arica_to_peru
	relative_position_id = CHL_seek_foreign_investments
	x = -2
	y = 1
	cost = 5
	prerequisite = {
		focus = CHL_rule_by_decree
	}
	mutually_exclusive = {

	}
	ai_will_do = {
		base = 1.5
	}
	available = {
		has_government = neutrality
		951 = {
			is_owned_and_controlled_by = ROOT
		}
		PRU = {
			exists = yes
			NOT = {
				has_war_with = ROOT
			}
			owns_state = 947
		}
		NOT = {
			OR = {
				has_completed_focus = CHL_crown_antoine_as_sovereign_king
				has_country_flag = CHL_fascist_and_communist_joint_civil_war_started
			}
		}
	}
	bypass = {
		OR = {
			951 = {
				NOT = {
					is_owned_and_controlled_by = ROOT
				}
			}
			PRU = {
				OR = {
					exists = no
					has_war_with = ROOT
					NOT = {
						owns_state = 947
					}
				}
			}
		}
	}
	search_filters = {
		FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY
	}
	completion_reward = {
		PRU = {
			country_event = {
				id = CHL_political_events.75
				days = 1
			}
		}
		custom_effect_tooltip = if_they_accept_tt CHL_sell_arica_to_peru_civil_war_tt
		event_option_tooltip = CHL_political_events.76.a
	}
}
### Entity: Unit Leader
Component: cavalry_officer
Constructs: has_idea, has_dlc
Source: game
File: common/unit_leader/00_traits.txt

Code:
cavalry_officer = {
	type = land
	trait_type = personality_trait
	unit_type = {
		type = cavalry camelry motorized mechanized
	}
	unit_trigger = {
		OR = {
			division_has_majority_template = cavalry camelry motorized mechanized
		}
		owner = {
			NOT = {
				OR = {
					has_idea = best_of_the_best_spirit academy_scholarships_spirit SOV_purged_junior_army_officers_3
				}
			}
		}
	}
	trait_xp_factor = {
		cavalry_leader = 1
	}
	new_commander_weight = {
		factor = 1
		modifier = {
			FROM = {
				has_idea = best_of_the_best_spirit
			}
			factor = 0
		} {
			FROM = {
				has_idea = academy_scholarships_spirit
			}
			factor = 0
		} {
			FROM = {
				has_idea = SOV_purged_junior_army_officers_3
			}
			factor = 0
		} {
			FROM = {
				has_dlc = By Blood Alone
			}
			factor = 0
		}
	}
	attack_skill_factor = 1
	logistics_skill_factor = 1
}
### Entity: Decision
Component: HUN_gyor_program_decision_category
Constructs: has_completed_focus
Source: game
File: common/decisions/categories/HUN_old_decision_categories.txt

Code:
HUN_gyor_program_decision_category = {
	icon = generic_industry
	picture = GFX_decision_cat_generic_mefo_bills
	allowed = {
		tag = HUN
	}
	available = {
		has_completed_focus = HUN_announce_the_gyor_program
	}
	visible = {
		has_completed_focus = HUN_announce_the_gyor_program
	}
}
### Entity: Technology
Component: early_ship_hull_heavy
Constructs: is_major, enable_equipments, enable_equipment_modules, research_cost
Source: game
File: common/technologies/MTG_naval.txt

Code:
technology = {
	enable_equipments = {
		ship_hull_heavy_1
	}
	enable_equipment_modules = {
		ship_armor_bb_1 heavy_ship_engine_1 ship_armor_bc_1
	}
	path = {
		leads_to_tech = basic_ship_hull_heavy
		research_cost_coeff = 1
	}
	on_research_complete = {
		custom_effect_tooltip = {
			localization_key = SP_UNLOCK_PROJECT
			PROJECT = sp_naval_super_heavy_battleship
		}
	}
	research_cost = 1.75
	start_year = 1922
	folder = {
		name = mtgnavalfolder
		position = {
			x = 0
			y = 2
		}
	}
	ai_will_do = {
		factor = 1
		modifier = {
			factor = 2
			OR = {
				tag = ENG JAP USA
			}
		} {
			is_major = yes
			factor = 2
		} {
			is_major = no
			factor = 0
		}
	}
	categories = {
		naval_equipment bb_tech bc_tech mio_cat_tech_all_capital_ship_and_modules
	}
	special_project_specialization = {
		specialization_naval
	}
}
### Entity: Event
Component: congo_independence_struggle.4
Constructs: is_triggered_only, ai_chance, add_ideas, add_war_support, add_stability, complete_national_focus, add_timed_idea
Source: game
File: events/WUW_Congo.txt

Code:
country_event = {
	id = congo_independence_struggle.4
	title = congo_independence_struggle.4.t
	desc = congo_independence_struggle.4.d
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = congo_independence_struggle.4.a
		ai_chance = {
			base = 50
		}
		add_stability = 0.05
		add_war_support = -0.05
		custom_effect_tooltip = generic_skip_one_line_tt
		effect_tooltip = {
			ROOT = {
				complete_national_focus = CONGO_republic_of_congo
				custom_effect_tooltip = generic_skip_one_line_tt
				add_ideas = COG_long_term_debt_payment
				add_timed_idea = {
					idea = COG_short_term_massive_debt_payment
					days = 180
				}
			}
			custom_effect_tooltip = generic_skip_one_line_tt
			FROM = {
				add_ideas = COG_long_term_debt_recieved
				add_timed_idea = {
					idea = COG_short_term_massive_debt_recieved
					days = 180
				}
			}
		}
		FROM = {
			country_event = {
				id = congo_independence_struggle.7
				days = 7
			}
		}
	} {
		name = congo_independence_struggle.4.b
		ai_chance = {
			base = 50
		}
		add_stability = -0.05
		add_war_support = 0.05
		FROM = {
			country_event = {
				id = congo_independence_struggle.6
				days = 7
			}
		}
	}
}
### Entity: Event
Component: south_american_events.22
Constructs: is_triggered_only, add_political_power
Source: game
File: events/TOA_Generic_Events.txt

Code:
country_event = {
	id = south_american_events.22
	title = south_american_events.22.t
	desc = south_american_events.22.desc
	picture = GFX_report_event_chinese_soldiers_running
	is_triggered_only = yes
	option = {
		name = south_american_events.22.a
		add_political_power = -50
	}
}
### Entity: Scripted Effect
Component: SIA_refresh_indochina_controllers
Constructs: limit, clear_array, is_in_array, add_to_array
Source: game
File: common/scripted_effects/SIA_scripted_effects.txt

Code:
SIA_refresh_indochina_controllers = {
	clear_array = SIA.indochina_controllers
	for_each_scope_loop = {
		array = SIA.indochina_states
		if = {
			limit = {
				NOT = {
					controller = {
						is_in_array = {
							array = SIA.indochina_controllers
							value = THIS
						}
					}
				}
			}
			controller = {
				add_to_array = {
					array = SIA.indochina_controllers
					value = THIS
				}
			}
		}
	}
}
### Entity: Character
Component: PAL_harold_macmichael
Source: game
File: common/characters/PAL.txt

Code:
PAL_harold_macmichael = {
	name = PAL_harold_macmichael
	portraits = {
		civilian = {
			large = GFX_portrait_PAL_harold_macmichael
			small = GFX_portrait_PAL_harold_macmichael_small
		}
	}
	country_leader = {
		ideology = oligarchism
		traits = {
			PAL_experienced_high_commissioner
		}
		expire = 1969.1.1.1
		id = -1
	}
}
### Entity: National Focus
Tree: nic_focus
Component: NIC_the_somoza_family_fortune
Constructs: prerequisite, add_ideas, completion_reward, add_political_power, swap_ideas, remove_idea, add_idea
Source: game
File: common/national_focus/Nicaragua.txt

Code:
focus = {
	id = NIC_the_somoza_family_fortune
	icon = GFX_goal_generic_coffee_plantations
	x = 0
	y = 4
	relative_position_id = NIC_president_Somoza_Garcia
	prerequisite = {
		focus = NIC_control_immigration
	} {
		focus = NIC_regulate_the_national_railroads
	} {
		focus = NIC_health_services
	}
	cost = 10
	search_filters = {
		FOCUS_FILTER_STABILITY FOCUS_FILTER_RESEARCH FOCUS_FILTER_INDUSTRY FOCUS_FILTER_POLITICAL FOCUS_FILTER_MANPOWER
	}
	ai_will_do = {
		factor = 10
	}
	completion_reward = {
		add_political_power = 120
		add_ideas = NIC_trade
		swap_ideas = {
			remove_idea = NIC_industrial_control2
			add_idea = NIC_industrial_control3
		} {
			remove_idea = NIC_social_reforms2
			add_idea = NIC_social_reforms3
		}
	}
}
### Entity: National Focus
Tree: mex_focus
Component: MEX_focus_smash_the_bureaucrats
Constructs: prerequisite, limit, add_ideas, completion_reward, is_subject, has_country_leader, cancel_if_invalid, is_faction_leader
Source: game
File: common/national_focus/mexico.txt

Code:
focus = {
	id = MEX_focus_smash_the_bureaucrats
	icon = GFX_focus_attack_soviet
	prerequisite = {
		focus = MEX_focus_bolivarian_alliance
	}
	x = 0
	y = 1
	relative_position_id = MEX_focus_bolivarian_alliance
	cost = 10
	ai_will_do = {
		factor = 100
	}
	available = {
		is_subject = no
		OR = {
			has_country_leader = {
				character = MEX_leon_trotsky
				ruling_only = yes
			} {
				character = MEX_hernan_laborde
				ruling_only = yes
			} {
				character = MEX_valentin_campa
				ruling_only = yes
			}
		} {
			NOT = {
				SOV_is_left_opposition = yes
			}
			SOV = {
				exists = no
			}
		}
	}
	bypass = {

	}
	cancel_if_invalid = yes
	continue_if_invalid = no
	available_if_capitulated = no
	search_filters = {
		FOCUS_FILTER_MANPOWER FOCUS_FILTER_RESEARCH
	}
	completion_reward = {
		add_ideas = MEX_idea_vanguard_of_the_4th_international
		if = {
			limit = {
				is_faction_leader = yes
			}
			set_faction_name = faction_mexico_4th_international
		} {
			limit = {
				NOT = {
					is_in_faction_with = SOV
				}
			}
			create_wargoal = {
				type = puppet_wargoal_focus
				target = SOV
				expire = 0
			}
		}
		add_tech_bonus = {
			name = tooltip_socialist_marine_corps
			bonus = 1.0
			uses = 1
			category = tp_tech marine_tech
		}
	}
}
### Entity: National Focus
Tree: raj_focus
Component: RAJ_strengthen_ties_with_british_investors
Constructs: prerequisite, limit, completion_reward, is_subject_of, has_global_flag, is_in_faction_with, cancel_if_invalid, complete_tooltip
Source: game
File: common/national_focus/india.txt

Code:
focus = {
	id = RAJ_strengthen_ties_with_british_investors
	icon = GFX_focus_RAJ_british_investors
	prerequisite = {
		focus = RAJ_ishapore_arsenal
	}
	x = 0
	y = 1
	relative_position_id = RAJ_ishapore_arsenal
	cost = 10
	ai_will_do = {
		factor = 30
	}
	available = {
		OR = {
			AND = {
				compare_autonomy_progress_ratio = > 0.4
				compare_autonomy_state = > autonomy_puppet
				is_subject_of = ENG
			} {
				has_global_flag = ENG_decolonized
				is_in_faction_with = ENG
			}
		}
	}
	bypass = {

	}
	cancel_if_invalid = yes
	continue_if_invalid = no
	available_if_capitulated = no
	search_filters = {
		FOCUS_FILTER_INDUSTRY
	}
	complete_tooltip = {
		add_autonomy_ratio = {
			value = -0.15
			localization = RAJ_strengthen_ties_with_british_investors
		}
		random_state = {
			limit = {
				has_state_flag = RAJ_strengthen_ties_with_british_investors_AF1
			}
			add_extra_state_shared_building_slots = 1
			add_building_construction = {
				type = arms_factory
				level = 1
				instant_build = yes
			}
		} {
			limit = {
				has_state_flag = RAJ_strengthen_ties_with_british_investors_AF2
			}
			add_extra_state_shared_building_slots = 1
			add_building_construction = {
				type = arms_factory
				level = 1
				instant_build = yes
			}
		}
	}
	completion_reward = {
		add_autonomy_ratio = {
			value = -0.15
			localization = RAJ_strengthen_ties_with_british_investors
		}
		random_owned_controlled_state = {
			prioritize = {

			}
			limit = {
				free_building_slots = {
					building = arms_factory
					size = > 0
					include_locked = yes
				}
			}
			add_extra_state_shared_building_slots = 1
			add_building_construction = {
				type = arms_factory
				level = 1
				instant_build = yes
			}
			set_state_flag = RAJ_strengthen_ties_with_british_investors_AF1
		} {
			prioritize = {

			}
			limit = {
				free_building_slots = {
					building = arms_factory
					size = > 0
					include_locked = yes
				}
			}
			add_extra_state_shared_building_slots = 1
			add_building_construction = {
				type = arms_factory
				level = 1
				instant_build = yes
			}
			set_state_flag = RAJ_strengthen_ties_with_british_investors_AF2
		}
	}
}