Losa10/PreTrain-HOI4-Modding-Assistant huggingface dataset:
### Entity: Character
Component: GXC_chen_jitang
Constructs: has_dlc
Source: game
File: common/characters/GXC.txt

Code:
GXC_chen_jitang = {
	instance = {
		allowed = {
			NOT = {
				has_dlc = No Compromise, No Surrender
			}
		}
		name = GXC_chen_jitang
		portraits = {
			army = {
				large = gfx/leaders/GXC/r56_portrait_GXC_Chen_Jitang.dds
				small = GFX_idea_generic_army_asia_6
			}
		}
		field_marshal = {
			skill = 3
			attack_skill = 2
			defense_skill = 3
			planning_skill = 3
			logistics_skill = 2
			legacy_id = -1
			visible = {

			}
		}
		country_leader = {
			ideology = despotism
			traits = {
				GDC_king_of_the_southern_skies
			}
			expire = 1965.1.1.1
			id = -1
		}
	} {
		allowed = {
			has_dlc = No Compromise, No Surrender
		}
		name = GXC_chen_jitang
		portraits = {
			army = {
				large = GFX_portrait_GDC_chen_jitang
				small = GFX_portrait_GDC_chen_jitang_small
			}
		}
		field_marshal = {
			skill = 3
			attack_skill = 2
			defense_skill = 3
			planning_skill = 3
			logistics_skill = 2
			legacy_id = -1
			visible = {

			}
		}
		country_leader = {
			ideology = despotism
			traits = {
				GDC_king_of_the_southern_skies
			}
			expire = 1965.1.1.1
			id = -1
		}
	}
}
### Entity: National Focus
Tree: sco_focus
Component: SCO_free_bavaria
Constructs: prerequisite, limit, completion_reward, has_country_leader, is_subject, add_state_claim
Source: game
File: common/national_focus/scotland.txt

Code:
focus = {
	id = SCO_free_bavaria
	icon = GFX_focus_attack_germany
	prerequisite = {
		focus = SCO_demand_the_stone_of_scone
	} {
		focus = SCO_monarchist_officer_corps
	}
	relative_position_id = SCO_demand_the_stone_of_scone
	x = -1
	y = 1
	cost = 5
	ai_will_do = {
		factor = 2.5
	}
	available = {
		OR = {
			has_country_leader = {
				ruling_only = yes
				name = Rupprecht I
			} {
				ruling_only = yes
				name = Henry I
			}
		}
		is_subject = no
	}
	bypass = {
		BAY = {
			exists = yes
		}
		OR = {
			has_country_leader = {
				ruling_only = yes
				name = Rupprecht I
			} {
				ruling_only = yes
				name = Henry I
			}
		}
	}
	available_if_capitulated = yes
	search_filters = {
		FOCUS_FILTER_MANPOWER
	}
	completion_reward = {
		if = {
			limit = {
				BAY = {
					exists = no
				}
			}
			add_state_claim = 52 53 54
		}
	}
}
### Entity: National Focus
Tree: egy_focus
Component: EGY_move_back_to_the_ottomans
Constructs: prerequisite, completion_reward, swap_ruler_traits
Source: game
File: common/national_focus/egypt.txt

Code:
focus = {
	id = EGY_move_back_to_the_ottomans
	icon = GFX_focus_generic_befriend_turkey
	relative_position_id = EGY_restore_the_khedive
	x = 0
	y = 2
	cost = 5
	prerequisite = {
		focus = EGY_mobilize_the_fellahs
	} {
		focus = EGY_isolation_and_surveillance
	}
	search_filters = {
		FOCUS_FILTER_WAR_SUPPORT
	}
	ai_will_do = {
		factor = 10
	}
	completion_reward = {
		swap_ruler_traits = {
			remove = EGY_abbas_ii_of_egypt
			add = EGY_abbas_ii_of_egypt_2
		}
	}
}
### Entity: Event
Component: SEA_PRC_political_events.3
Constructs: is_triggered_only, fire_only_once, give_guarantee
Source: game
File: events/SEA_Communist_China.txt

Code:
country_event = {
	id = SEA_PRC_political_events.3
	title = SEA_PRC_political_events.3.t
	desc = SEA_PRC_political_events.3.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes
	fire_only_once = yes
	option = {
		name = SEA_PRC_political_events.3.a
		FROM = {
			give_guarantee = ROOT
		}
	}
}
### Entity: Character
Component: CHI_tsr_the_celestial_emperor
Constructs: army_defence_factor, army_attack_factor
Source: game
File: common/country_leader/00_traits.txt

Code:
CHI_tsr_the_celestial_emperor = {
	random = no
	sprite = 14
	drift_defence_factor = 0.5
	party_popularity_stability_factor = 0.15
	justify_war_goal_time = -0.25
	army_attack_factor = 0.05
	army_defence_factor = 0.05
}
### Entity: Scripted Effect
Component: BRA_mio_military_factory
Constructs: limit, random_core_state, is_owned_and_controlled_by, has_dynamic_modifier, add_extra_state_shared_building_slots, add_building_construction
Source: game
File: common/scripted_effects/TOA_scripted_effects.txt

Code:
BRA_mio_military_factory = {
	random_core_state = {
		limit = {
			free_building_slots = {
				building = arms_factory
				size = > 0
				include_locked = yes
			}
			is_owned_and_controlled_by = ROOT
			NOT = {
				has_dynamic_modifier = {
					modifier = BRA_neglected_state_dynamic_modifier
				}
				OR = {
					state = 961 962 963 964 965 966 967 968
				}
			}
		}
		add_extra_state_shared_building_slots = 1
		add_building_construction = {
			type = arms_factory
			level = 1
			instant_build = yes
		}
	}
}
### Entity: Achievement
Component: the_puppetmaster
Constructs: is_ironman, has_start_date, has_any_custom_difficulty_setting
Source: game
File: common/achievements.txt

Code:
the_puppetmaster = {
	id = 43
	possible = {
		is_ironman = yes
		difficulty = > 1
		has_start_date = < 1936.01.02
		has_any_custom_difficulty_setting = no
		game_rules_allow_achievements = yes
	}
	happened = {
		num_subjects = > 50
	}
}
### Entity: Idea
Component: SWE_motorization_idea
Constructs: removal_cost, equipment_bonus, build_cost_ic
Source: game
File: common/ideas/r56_sweden.txt

Code:
SWE_motorization_idea = {
	allowed = {
		always = no
	}
	removal_cost = -1
	picture = FRA_motorized_focus
	equipment_bonus = {
		motorized_equipment = {
			build_cost_ic = -0.1
			instant = yes
		}
	}
}
### Entity: Idea
Component: rt56_USA_advisory_committee_on_uranium
Constructs: has_completed_focus, has_government, is_special_project_completed, removal_cost
Source: game
File: common/ideas/r56_usa.txt

Code:
rt56_USA_advisory_committee_on_uranium = {
	picture = generic_research_bonus
	allowed = {
		always = no
	}
	available = {
		has_government = democratic
		NOT = {
			OR = {
				has_completed_focus = USA_manhattan_project
				is_special_project_completed = sp:sp_nuclear_reactor
			}
		}
	}
	allowed_civil_war = {
		always = no
	}
	removal_cost = -1
	modifier = {
		production_speed_nuclear_facility_factor = 0.05
	}
}
### Entity: National Focus
Tree: pol_focus
Component: POL_control_the_bosporus
Constructs: prerequisite, has_war_with, completion_reward, is_faction_leader, is_subject, is_in_faction, unlock_decision_tooltip
Source: game
File: common/national_focus/poland.txt

Code:
focus = {
	id = POL_control_the_bosporus
	icon = GFX_focus_generic_befriend_turkey
	prerequisite = {
		focus = POL_protect_yugoslavia
	}
	mutually_exclusive = {
		focus = POL_invite_greece
	}
	available = {
		is_faction_leader = yes
		TUR = {
			exists = yes
			is_subject = no
			is_in_faction = no
			NOT = {
				has_war_with = ROOT
			}
		}
	}
	bypass = {
		GRE = {
			OR = {
				is_subject = yes
				exists = no
				is_in_faction = yes
				has_war_with = ROOT
			}
		}
		TUR = {
			OR = {
				is_subject = yes
				exists = no
				is_in_faction = yes
				has_war_with = ROOT
			}
		}
	}
	x = 2
	y = 1
	relative_position_id = POL_protect_yugoslavia
	cost = 5
	ai_will_do = {
		factor = 10
	}
	completion_reward = {
		TUR = {
			country_event = {
				id = poland.16
				days = 1
			}
		}
		unlock_decision_tooltip = POL_diplomatic_mission_to_ITA
	}
}
### Entity: National Focus
Component: why_we_fight
Constructs: prerequisite, limit, add_ideas, completion_reward, has_defensive_war, has_idea, set_rule
Source: game
File: common/national_focus/generic.txt

Code:
focus = {
	id = why_we_fight
	icon = GFX_goal_generic_propaganda
	prerequisite = {
		focus = foreign_expeditions deterrence
	}
	available = {
		OR = {
			threat = > 0.75
			has_defensive_war = yes
		}
	}
	continue_if_invalid = yes
	x = -2
	y = 1
	relative_position_id = foreign_expeditions
	cost = 10
	search_filters = {
		FOCUS_FILTER_POLITICAL
	}
	available_if_capitulated = yes
	completion_reward = {
		add_ideas = why_we_fight_focus
		custom_effect_tooltip = why_we_fight_effect
		hidden_effect = {
			if = {
				limit = {
					NOT = {
						has_idea = neutrality_idea
					}
				}
				set_rule = {
					can_create_factions = yes
				}
			}
		}
	}
}
### Entity: Effect Reference
Construct: retire
Source: vanilla_docs
File: documentation/effects_documentation.md

Doc:
## retire

* Supported Scopes: CHARACTER
* Supported Targets: none

```
Retires character, use in character scope
```
### Entity: Event
Component: bftb_bulgaria_balkan_federation.13
Constructs: is_triggered_only, limit, has_state_flag, every_controlled_state, is_controlled_by, every_state, clr_state_flag
Source: game
File: events/BFTB_Bulgaria.txt

Code:
country_event = {
	id = bftb_bulgaria_balkan_federation.13
	title = bftb_bulgaria_balkan_federation.13.t
	desc = bftb_bulgaria_balkan_federation.13.desc
	picture = GFX_report_event_bul_italian_equipment
	is_triggered_only = yes
	option = {
		name = bftb_bulgaria_balkan_federation.13.a
		effect_tooltip = {
			if = {
				limit = {
					any_controlled_state = {
						has_state_flag = BUL_italy_yields_state_flag
					}
				}
				custom_effect_tooltip = BUL_italy_yields_states_to_root_tt
				every_controlled_state = {
					limit = {
						has_state_flag = BUL_italy_yields_state_flag
					}
				}
			} {
				limit = {
					any_state = {
						has_state_flag = BUL_italy_yields_state_flag
						NOT = {
							is_controlled_by = ROOT
						}
					}
				}
				custom_effect_tooltip = BUL_italy_yields_states_to_others_tt
				every_state = {
					limit = {
						has_state_flag = BUL_italy_yields_state_flag
						NOT = {
							is_controlled_by = ROOT
						}
					}
				}
			}
		}
		hidden_effect = {
			every_state = {
				limit = {
					has_state_flag = BUL_italy_yields_state_flag
				}
				clr_state_flag = BUL_italy_yields_state_flag
			}
		}
	}
}
### Entity: Modifier Reference
Construct: num_of_military_factories
Source: vanilla_docs
File: documentation/dynamic_variables_documentation.md

Doc:
### num_of_military_factories
* description: check amount of military factories
* (Auto generated using the trigger with same name)
### Entity: Character
Component: ITA_giuseppe_bottai
Constructs: has_completed_focus, has_country_leader_with_trait
Source: game
File: common/characters/ITA.txt

Code:
ITA_giuseppe_bottai = {
	name = ITA_giuseppe_bottai
	portraits = {
		army = {
			small = GFX_portrait_ITA_giuseppe_botai_small
		}
	}
	advisor = {
		slot = political_advisor
		idea_token = ITA_giuseppe_bottai
		allowed = {
			ITA_is_italian_tag = yes
		}
		available = {
			has_completed_focus = ITA_legge_bottai
			NOT = {
				has_country_leader_with_trait = mussolini_minister_of_education
			}
		}
		cost = 75
		traits = {
			hierarch_minister_of_education
		}
		on_add = {
			owner = {
				hidden_effect = {
					ITA_bop_medium_decrease_effect = yes
				}
			}
		}
		on_remove = {
			owner = {
				hidden_effect = {
					ITA_bop_medium_increase_effect = yes
				}
			}
		}
		ai_will_do = {
			base = 0.3
			modifier = {
				factor = 0
				OR = {
					ITA_is_communist_ai = yes
					ITA_is_socialist_ai = yes
				}
			}
		}
	}
}
### Entity: National Focus
Tree: tur_focus
Component: TUR_learning_from_the_tripolitanian_war
Constructs: prerequisite, completion_reward, add_tech_bonus
Source: game
File: common/national_focus/turkey.txt

Code:
focus = {
	id = TUR_learning_from_the_tripolitanian_war
	icon = GFX_goal_generic_position_armies
	prerequisite = {
		focus = TUR_avenge_the_treaty_of_sevres TUR_strike_at_the_fascist_menace
	}
	x = 0
	y = 2
	relative_position_id = TUR_strengthening_our_navies
	cost = 10
	ai_will_do = {
		base = 10
	}
	completion_reward = {
		add_tech_bonus = {
			name = TUR_learning_from_tripolitania
			bonus = 1.0
			uses = 1
			category = engineers_tech
		} {
			name = TUR_learning_from_tripolitania
			bonus = 1.0
			uses = 1
			category = recon_tech
		}
	}
}
### Entity: Event
Component: bftb_greece.40
Constructs: is_triggered_only, add_timed_idea, declare_war_on, take_state_focus, add_to_faction
Source: game
File: events/BFTB_Greece.txt

Code:
country_event = {
	id = bftb_greece.40
	title = bftb_greece.40.t
	desc = bftb_greece.40.desc
	picture = GFX_report_event_gre_parade
	is_triggered_only = yes
	option = {
		name = bftb_greece.40.a
		add_timed_idea = {
			idea = GRE_battle_for_the_bosporus
			days = 30
		}
		declare_war_on = {
			type = take_state_focus
			target = TUR
			generator = {
				341 347 340 339
			}
		}
		hidden_effect = {
			SOV = {
				add_to_faction = GRE
			}
		}
	}
}
### Entity: Country History
Country: NIR
Component: NIR_misc
Constructs: set_technology, add_political_power, set_research_slots, set_convoys, add_command_power, complete_national_focus, set_grand_doctrine, complete_special_project
Source: game
File: history/countries/NIR - Northern Ireland.txt

Code:
# Misc for NIR
capital = 119
set_research_slots = 3
set_convoys = 10
1939.1.1 = {
	add_political_power = 1198
	add_command_power = 100
	complete_national_focus = army_effort equipment_effort motorization_effort aviation_effort naval_effort large_navy industrial_effort construction_effort production_effort
	oob = IRE_1939
	set_technology = {
		gw_artillery = 1
		interwar_antiair = 1
		infantry_weapons2 = 1
		electronic_mechanical_engineering = 1
		radio = 1
		mechanical_computing = 1
		computing_machine = 1
		basic_machine_tools = 1
		improved_machine_tools = 1
		advanced_machine_tools = 1
		fuel_silos = 1
		construction1 = 1
		construction2 = 1
		dispersed_industry = 1
		dispersed_industry2 = 1
	}
	set_grand_doctrine = grand_battleplan new_fleet_in_being new_strategic_destruction
	complete_special_project = {
		project = sp:sp_air_radar
	}
}
{
	set_politics = {
		ruling_party = democratic
		last_election = 1938.6.17
		election_frequency = 48
		elections_allowed = yes
	}
}
### Entity: National Focus
Tree: arg_focus
Component: ARG_support_the_spanish_coup
Constructs: prerequisite, has_country_flag, add_stability, completion_reward, add_political_power, add_relation_modifier, add_relation_rule_override
Source: game
File: common/national_focus/argentina.txt

Code:
focus = {
	id = ARG_support_the_spanish_coup
	icon = GFX_focus_intervention_spain_nationalists
	prerequisite = {
		focus = ARG_cut_ties_with_britain
	}
	x = 10
	y = 1
	relative_position_id = ARG_cut_ties_with_britain
	cost = 5
	available = {
		SPR_scw_in_progress = yes
		SPR = {
			exists = yes
			hidden_trigger = {
				has_country_flag = SPR_nationalist_spain_flag
			}
		}
	}
	ai_will_do = {
		factor = 10
	}
	search_filters = {
		FOCUS_FILTER_POLITICAL
	}
	completion_reward = {
		add_political_power = 50
		add_stability = -0.05
		add_relation_modifier = {
			target = SPA
			modifier = ETH_support_spain_static_modifier
		}
		add_relation_rule_override = {
			target = SPA
			can_send_volunteers = yes
		}
	}
}
### Entity: AI Strategy
Component: EAI_MILITARY_COMBINED_target_country_C0Y
Constructs: check_variable
Source: game
File: common/ai_strategy/EAI_MILITARY_strategies.txt

Code:
EAI_MILITARY_COMBINED_target_country_C0Y = {
	enable = {
		check_variable = {
			EAI_MILITARY_COMBINED_target_countries^num = > 0
		}
		NOT = {
			check_variable = {
				EAI_MILITARY_COMBINED_target_countries^34 = 0
			}
		}
	}
	abort_when_not_enabled = yes
	ai_strategy = {
		type = invade
		id = C0Y
		value = 15000
	} {
		type = invade
		id = C0Y
		value = 200
	}
}
### Entity: Idea
Component: KMT_strengthened_minorities
Constructs: stability_factor, has_government, production_speed_buildings_factor, removal_cost
Source: game
File: common/ideas/r56_china.txt

Code:
KMT_strengthened_minorities = {
	removal_cost = -1
	picture = ARG_social_welfare_fund_ns
	allowed = {
		always = no
	}
	allowed_civil_war = {
		always = yes
	}
	cancel = {
		NOT = {
			has_government = democratic
		}
	}
	on_remove = {

	}
	modifier = {
		political_power_factor = -0.1
		stability_factor = 0.05
		production_speed_buildings_factor = 0.05
	}
}
### Entity: Idea
Component: POL_pzinz
Constructs: has_dlc, research_bonus
Source: game
File: common/ideas/poland.txt

Code:
POL_pzinz = {
	allowed = {
		original_tag = POL
		has_dlc = Poland: United and Ready
	}
	research_bonus = {
		armor = 0.15
	}
	traits = {
		tank_manufacturer
	}
	modifier = {

	}
}
### Entity: Wiki Documentation
Construct: overview
Source: wiki
File: wiki/Empire_of_Japan.html

Doc:
This article is considered accurate for the current version of the game.

Japan

Capital provinceTokyo

Government typeImperial Monarchy

FactionAxis

Japan was leader of the Axis powers in the Pacific Theatre. Some people consider that World War II actually began with the invasion of China by Japan. At August 6, 1945, the Americans dropped a nuclear bomb on Hiroshima. Late in the evening of August 8, according to the Yalta agreements, the Soviet Union declared war on Japan, and shortly after midnight on August 9 attacked Manchukuo. The total shock of these events forced Emperor Hirohito to intervene and compel the big six to agree on the terms of ending the war, taken by the Allies in the Potsdam Conference. After several days of backroom negotiations and failed attempts to repel the stockpiles of biological weapons of Unit 731 in Manchuria, captured by Soviet paratroopers, and the collapse of the Kwantung Army, at August 15 Hirohito addressed the nation by radio and announced the surrender of Japan. The signing ceremony of Act of Capitulation took place on September 2 aboard the United States Navy battleship "Missouri".

Contents

1 Technology

2 Diplomacy

2.1 Alliances

2.2 National Focus

2.2.1 Reinforce the Soviet Border

2.2.2 Chinese Border Incident

2.2.3 Army Primacy

2.2.4 Navy Primacy

2.2.5 Increase Naval Production

2.2.6 Spiritual Mobilization

2.3 Events

3 Politics

3.1 Laws

3.2 Ministers

4 Intelligence

5 Economy

5.1 Industrial Production

5.1.1 Resources

6 Military

6.1 Army

6.2 Tanks

7 Naval Units

7.1 Air Force

8 Strategies and Guides

8.1 Example Strategy

8.2 Miscellaneous tips
### Entity: AI Strategy
Component: FIN_alone_in_the_north
Constructs: has_war_with, is_historical_focus_on, has_global_flag
Source: game
File: common/ai_strategy/FIN.txt

Code:
FIN_alone_in_the_north = {
	enable = {
		original_tag = FIN
		is_historical_focus_on = yes
	}
	abort = {
		has_global_flag = SOV_winter_war_flag
		GER = {
			has_war_with = SOV
		}
	}
	ai_strategy = {
		type = pp_spend_priority
		id = relation
		value = -200
	}
}
### Entity: National Focus
Tree: ger_focus
Component: GER_form_agricultural_cooperatives
Constructs: prerequisite, limit, completion_reward, random_core_state, is_fully_controlled_by, add_extra_state_shared_building_slots, random_owned_controlled_state, add_building_construction
Source: game
File: common/national_focus/germany.txt

Code:
focus = {
	id = GER_form_agricultural_cooperatives
	icon = GFX_focus_generic_farmland
	prerequisite = {
		focus = GER_nationalize_industries
	}
	x = 1
	y = 1
	relative_position_id = GER_nationalize_industries
	cost = 10
	available = {

	}
	search_filters = {

	}
	completion_reward = {
		random_core_state = {
			limit = {
				is_fully_controlled_by = ROOT
			}
			add_extra_state_shared_building_slots = 2
		} {
			limit = {
				is_fully_controlled_by = ROOT
			}
			add_extra_state_shared_building_slots = 2
		} {
			limit = {
				is_fully_controlled_by = ROOT
			}
			add_extra_state_shared_building_slots = 2
		}
		random_owned_controlled_state = {
			limit = {
				is_fully_controlled_by = ROOT
				free_building_slots = {
					building = infrastructure
					size = > 0
				}
			}
			prioritize = {
				50 59 63 66 67 68
			}
			add_building_construction = {
				type = infrastructure
				level = 1
				instant_build = yes
			}
		} {
			limit = {
				is_fully_controlled_by = ROOT
				free_building_slots = {
					building = infrastructure
					size = > 0
				}
			}
			prioritize = {
				50 59 63 66 67 68
			}
			add_building_construction = {
				type = infrastructure
				level = 1
				instant_build = yes
			}
		} {
			limit = {
				is_fully_controlled_by = ROOT
				free_building_slots = {
					building = infrastructure
					size = > 0
				}
			}
			prioritize = {
				50 59 63 66 67 68
			}
			add_building_construction = {
				type = infrastructure
				level = 1
				instant_build = yes
			}
		}
	}
}
### Entity: Idea
Component: SWI_standing_army
Source: game
File: common/ideas/r56_switzerland.txt

Code:
SWI_standing_army = {
	allowed_civil_war = {
		tag = SWI
	}
	picture = generic_manpower_bonus
	modifier = {
		conscription = -0.002
		army_org = -10
	}
}
### Entity: Idea
Component: SIK_soviet_pilot_schools
Constructs: has_war_with, removal_cost
Source: game
File: common/ideas/sinkiang.txt

Code:
SIK_soviet_pilot_schools = {
	allowed = {
		always = no
	}
	picture = SOV_scientist_defect
	removal_cost = -1
	cancel = {
		has_war_with = SOV
	}
	modifier = {
		experience_gain_air = 0.05
		air_advisor_cost_factor = -0.25
		air_range_factor = 0.1
		custom_modifier_tooltip = SIK_if_war_with_sov_this_disappears_tt
	}
}
### Entity: Shared Focus
Tree: gen_focus
Component: GEN_expand_military_capacity
Constructs: shared_focus, prerequisite, has_war, limit, completion_reward, has_tech, random_owned_controlled_state, is_core_of
Source: game
File: common/national_focus/r56_gen_shared.txt

Code:
shared_focus = {
	id = GEN_expand_military_capacity
	icon = GFX_goal_generic_munitions_factories
	prerequisite = {
		focus = GEN_begin_industrial_buildup
	}
	x = 3
	y = 1
	relative_position_id = GEN_begin_industrial_buildup
	cost = 10
	available_if_capitulated = yes
	ai_will_do = {
		factor = 2.5
		modifier = {
			add = 7.5
			ROOT = {
				has_war = yes
			}
		} {
			factor = 0
			date = < 1939.1.1
			OR = {
				tag = GXC YUN SHX SIC XSM DEN
				num_of_controlled_states = < 3
			}
		}
	}
	available = {
		num_of_controlled_states = > 0
		has_tech = basic_machine_tools
	}
	completion_reward = {
		random_owned_controlled_state = {
			limit = {
				is_core_of = ROOT
				free_building_slots = {
					building = industrial_complex
					size = > 1
					include_locked = yes
				}
			}
			add_extra_state_shared_building_slots = 2
			add_building_construction = {
				type = arms_factory
				level = 2
				instant_build = yes
			}
		}
		if = {
			limit = {
				num_of_controlled_states = > 0
				NOT = {
					any_owned_state = {
						is_core_of = ROOT
					}
				}
			}
			add_offsite_building = {
				type = arms_factory
				level = 1
			}
		}
	}
	search_filters = {
		FOCUS_FILTER_INDUSTRY
	}
}
### Entity: Scripted Effect
Component: EAI_FOCUS_UPDATE/LAND/spec_ops
Constructs: limit, has_country_flag, check_variable, set_variable
Source: game
File: common/scripted_effects/EAI_MILITARY_FOCUS_update.txt

Code:
EAI_FOCUS_UPDATE/LAND/spec_ops = {
	if = {
		limit = {
			NOT = {
				has_country_flag = EAI_FOCUS/LAND/spec_ops_OVERRIDE
			}
		}
		if = {
			limit = {
				NOT = {
					check_variable = {
						EAI_FOCUS/LAND/spec_ops = global.EAI_MAR_SPEC_OPS
					}
				}
				always = no
			}
			if = {
				limit = {
					has_country_flag = EAI_FOCUS_UPDATE_update_logging
				}
				log = [GetDate] | AI | [Root.GetName] | FOCUS UPDATE: EAI_FOCUS/LAND/spec_ops = FROM: [?EAI_FOCUS/LAND/spec_ops] TO global.EAI_MAR_SPEC_OPS
			}
			set_variable = {
				EAI_FOCUS/LAND/spec_ops = global.EAI_MAR_SPEC_OPS
			}
		} {
			limit = {
				NOT = {
					check_variable = {
						EAI_FOCUS/LAND/spec_ops = global.EAI_MNT_SPEC_OPS
					}
				}
				always = no
			}
			if = {
				limit = {
					has_country_flag = EAI_FOCUS_UPDATE_update_logging
				}
				log = [GetDate] | AI | [Root.GetName] | FOCUS UPDATE: EAI_FOCUS/LAND/spec_ops = FROM: [?EAI_FOCUS/LAND/spec_ops] TO global.EAI_MNT_SPEC_OPS
			}
			set_variable = {
				EAI_FOCUS/LAND/spec_ops = global.EAI_MNT_SPEC_OPS
			}
		} {
			limit = {
				NOT = {
					check_variable = {
						EAI_FOCUS/LAND/spec_ops = global.EAI_NO_SPEC_OPS
					}
				}
				always = no
			}
			if = {
				limit = {
					has_country_flag = EAI_FOCUS_UPDATE_update_logging
				}
				log = [GetDate] | AI | [Root.GetName] | FOCUS UPDATE: EAI_FOCUS/LAND/spec_ops = FROM: [?EAI_FOCUS/LAND/spec_ops] TO global.EAI_NO_SPEC_OPS
			}
			set_variable = {
				EAI_FOCUS/LAND/spec_ops = global.EAI_NO_SPEC_OPS
			}
		}
	}
}