Losa10/PreTrain-HOI4-Modding-Assistant huggingface dataset:
### Entity: AI Strategy
Component: USA_cv_naval_bomber
Constructs: has_navy_size, any_of
Source: game
File: common/ai_equipment/USA_planes.txt

Code:
USA_cv_naval_bomber = {
	category = air
	available_for = {
		USA
	}
	roles = {
		air_cv_naval_bomber
	}
	priority = {
		factor = 500
		modifier = {
			has_navy_size = {
				unit = carrier
				size = < 1
			}
			factor = 0
		}
	}
	cv_naval_bomber_1 = {
		priority = {
			factor = 100
		}
		history = yes
		target_variant = {
			match_value = 1000
			type = cv_small_plane_naval_bomber_airframe_1
			modules = {
				fixed_main_weapon_slot = torpedo_mounting
				fixed_auxiliary_weapon_slot_1 = empty
				engine_type_slot = engine_2_1x
				special_type_slot_1 = empty
				special_type_slot_2 = empty
			}
		}
		allowed_modules = {
			torpedo_mounting engine_2_1x
		}
	}
	cv_naval_bomber_2 = {
		priority = {
			factor = 200
		}
		history = yes
		target_variant = {
			match_value = 1500
			type = cv_small_plane_naval_bomber_airframe_2
			modules = {
				fixed_main_weapon_slot = torpedo_mounting
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				engine_type_slot = engine_3_1x
				special_type_slot_1 = lmg_defense_turret
				special_type_slot_2 = empty
			}
		}
		allowed_modules = {
			torpedo_mounting bomb_locks engine_3_1x lmg_defense_turret
		}
	}
	cv_naval_bomber_3 = {
		priority = {
			factor = 200
		}
		history = yes
		target_variant = {
			match_value = 2000
			type = cv_small_plane_naval_bomber_airframe_3
			modules = {
				fixed_main_weapon_slot = torpedo_mounting
				fixed_auxiliary_weapon_slot_1 = small_bomb_bay
				fixed_auxiliary_weapon_slot_2 = {
					any_of = {
						rocket_rails bomb_locks
					}
				}
				engine_type_slot = engine_4_1x
				special_type_slot_1 = lmg_defense_turret
				special_type_slot_2 = empty
			}
		}
		allowed_modules = {
			torpedo_mounting bomb_locks small_bomb_bay rocket_rails engine_3_1x lmg_defense_turret
		}
	}
}
### Entity: Order of Battle
Component: 2 Ningsia Chingpei Lu
Constructs: division_template
Source: game
File: history/units/r56_XSM_1936.txt

Code:
division = {
	name = 2 Ningsia Chingpei Lu
	location = 10724
	division_template = Tuli Lü
	start_equipment_factor = 0.2
	start_experience_factor = 0.1
}
### Entity: Country History
Country: PAP
Component: PAP_politics
Constructs: set_stability, add_ideas, set_war_support, set_politics, set_popularities
Source: game
File: history/countries/PAP - Papal States.txt

Code:
# Politics & Parties for PAP
set_stability = 0.5
set_war_support = 0.5
add_ideas = {

}
set_politics = {
	ruling_party = neutrality
	last_election = 1934.3.26
	election_frequency = 60
	elections_allowed = no
}
set_popularities = {
	democratic = 10
	fascism = 10
	communism = 0
	neutrality = 80
}
### Entity: National Focus
Tree: cos_focus
Component: COS_cooperate_with_the_UFCo
Constructs: prerequisite, limit, has_war_with, add_stability, completion_reward, is_historical_focus_on, random_owned_controlled_state, add_extra_state_shared_building_slots
Source: game
File: common/national_focus/costa_rica.txt

Code:
focus = {
	id = COS_cooperate_with_the_UFCo
	icon = GFX_goal_HON_bannana_takeover
	prerequisite = {
		focus = COS_ban_the_PVP
	}
	available = {
		controls_state = 316
		NOT = {
			has_war_with = USA
		}
	}
	cost = 5
	search_filters = {
		FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY
	}
	x = -2
	y = 2
	relative_position_id = COS_approach_the_nazistas
	ai_will_do = {
		factor = 5
		modifier = {
			factor = 0
			is_historical_focus_on = yes
		}
	}
	completion_reward = {
		random_owned_controlled_state = {
			prioritize = {
				316
			}
			limit = {
				free_building_slots = {
					building = industrial_complex
					size = > 1
					include_locked = yes
				}
			}
			add_extra_state_shared_building_slots = 1
			add_building_construction = {
				type = industrial_complex
				level = 1
				instant_build = yes
			}
		}
		add_popularity = {
			ideology = fascism
			popularity = 0.05
		}
		add_stability = -0.05
	}
}
### Entity: Event
Component: BBA_ethiopia_communist_events.18
Constructs: is_triggered_only, ai_chance
Source: game
File: events/BBA_Ethiopia.txt

Code:
country_event = {
	id = BBA_ethiopia_communist_events.18
	title = BBA_ethiopia_communist_events.18.t
	desc = BBA_ethiopia_communist_events.18.desc
	picture = GFX_report_event_generic_lend_lease
	is_triggered_only = yes
	option = {
		name = BBA_ethiopia_communist_events.18.a
		ai_chance = {
			base = 10
		}
	}
}
### Entity: Unit Template
Component: URG_CV_HISTORICAL
Source: game
File: common/units/names_ships/URG_ship_names.txt

Code:
URG_CV_HISTORICAL = {
	name = NAME_THEME_HISTORICAL_CARRIERS
	for_countries = {
		URG
	}
	type = ship
	ship_types = {
		ship_hull_carrier carrier
	}
	prefix = ROU 
	fallback_name = Portaaviones %d
	unique = {
		República Oriental Montevideo
	}
}
### Entity: National Focus
Tree: cog_focus
Component: COG_continue_the_armament_modernization_program
Constructs: prerequisite, completion_reward, add_tech_bonus
Source: game
File: common/national_focus/r56_congo.txt

Code:
focus = {
	id = COG_continue_the_armament_modernization_program
	icon = GFX_goal_generic_small_arms
	prerequisite = {
		focus = COG_engineers_corps
	}
	x = 35
	y = 3
	cost = 10
	ai_will_do = {
		factor = 2
	}
	available_if_capitulated = yes
	completion_reward = {
		add_tech_bonus = {
			name = infantry_artillery_bonus
			bonus = 1
			uses = 1
			category = infantry_weapons artillery
		}
	}
	search_filters = {
		FOCUS_FILTER_RESEARCH
	}
}
### Entity: Decision
Component: INS_realign_supply_chains_cat
Constructs: has_completed_focus, add_equipment_to_stockpile, limit, has_country_flag, fire_only_once, add_political_power, has_resources_in_country, complete_effect
Source: game
File: common/decisions/INS.txt

Code:
INS_realign_supply_chains_cat = {
	INS_rubber_for_civ = {
		days_remove = var:INS_realign_supply_chains_time
		icon = GFX_decision_generic_industry
		visible = {

		}
		available = {
			NOT = {
				has_country_flag = INS_selling_resource_flag
			}
		}
		custom_cost_trigger = {
			has_resources_in_country = {
				resource = rubber
				amount = > 39
				extracted = no
			}
		}
		ai_will_do = {
			base = 3
		}
		custom_cost_text = INS_cost_text_rubber_40
		complete_effect = {
			set_country_flag = {
				flag = INS_selling_resource_flag
				value = 1
			}
		}
		remove_effect = {
			custom_effect_tooltip = INS_great_depression_tt INS_resources_refunded_in_24_months_tt
			add_to_variable = {
				var = INS_great_depression_country_resource_cost_rubber
				value = 40
				tooltip = country_resource_cost_rubber_tt
			}
			hidden_effect = {
				country_event = {
					id = INS_industrial_events.23
					months = 24
				} {
					id = INS_industrial_events.28
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size = > 0
						include_locked = yes
					}
					INS_only_militia_states_if_possible_and_needed = yes
					impassable = no
				}
				prioritize = {

				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}
	}
	INS_rubber_for_mil = {
		days_remove = var:INS_realign_supply_chains_time
		icon = GFX_decision_generic_tank
		visible = {

		}
		available = {
			NOT = {
				has_country_flag = INS_selling_resource_flag
			}
		}
		custom_cost_trigger = {
			has_resources_in_country = {
				resource = rubber
				amount = > 23
				extracted = no
			}
		}
		custom_cost_text = INS_cost_text_rubber_24
		ai_will_do = {
			base = 3
		}
		complete_effect = {
			set_country_flag = {
				flag = INS_selling_resource_flag
				value = 1
			}
		}
		remove_effect = {
			custom_effect_tooltip = INS_great_depression_tt INS_resources_refunded_in_24_months_tt
			add_to_variable = {
				var = INS_great_depression_country_resource_cost_rubber
				value = 24
				tooltip = country_resource_cost_rubber_tt
			}
			hidden_effect = {
				country_event = {
					id = INS_industrial_events.21
					months = 24
				} {
					id = INS_industrial_events.29
				}
			}
			random_owned_controlled_state = {
				limit = {

# ... (truncated)
### Entity: Character
Component: ZIM_fascist_guy
Constructs: has_government
Source: game
File: common/characters/ZIM.txt

Code:
ZIM_fascist_guy = {
	advisor = {
		slot = political_advisor
		idea_token = ZIM_fascist_guy
		allowed = {
			original_tag = ZIM
		}
		traits = {
			fascist_demagogue
		}
		do_effect = {
			not = {
				has_government = fascism
			}
		}
		ai_will_do = {
			factor = 0.0
		}
	}
	portraits = {
		army = {
			small = GFX_idea_generic_political_advisor_african_2
		}
	}
}
### Entity: Idea
Component: EAI_DD_19/medium_plane_scout_plane_airframe_bonus
Constructs: equipment_bonus, build_cost_ic
Source: game
File: common/ideas/EAI_difficulty_ideas.txt

Code:
EAI_DD_19/medium_plane_scout_plane_airframe_bonus = {
	allowed = {
		always = no
	}
	equipment_bonus = {
		medium_plane_scout_plane_airframe = {
			build_cost_ic = -0.19
			instant = yes
		}
	}
}
### Entity: Shared Focus
Component: MICRO_develop_indigenous_models
Constructs: shared_focus, prerequisite, completion_reward, add_tech_bonus, dd_bonus
Source: game
File: common/national_focus/r56_microstate_shared.txt

Code:
shared_focus = {
	id = MICRO_develop_indigenous_models
	text = MNC_develop_indigenous_models
	icon = GFX_focus_generic_destroyer
	prerequisite = {
		focus = MICRO_develop_our_dockyards
	}
	relative_position_id = MICRO_develop_our_dockyards
	cost = 10
	x = -1
	y = 1
	completion_reward = {
		add_tech_bonus = {
			name = dd_bonus
			bonus = 1
			uses = 1
			category = dd_tech
		} {
			name = dd_bonus
			bonus = 1
			uses = 1
			category = ss_tech
		}
	}
	search_filters = {
		FOCUS_FILTER_RESEARCH
	}
}
### Entity: Order of Battle
Component: Cank
Constructs: division_template
Source: game
File: history/units/WAF_1936.txt

Code:
division = {
	name = Cank
	location = 8118
	division_template = Armeowr Brigade
	start_experience_factor = 0.3
}
### Entity: Idea
Component: GYA_ar
Source: game
File: common/ideas/guyana.txt

Code:
GYA_ar = {
	ledger = army
	picture = generic_army_african_5
	allowed = {
		original_tag = GYA
	}
	traits = {
		army_regrouping_2
	}
	ai_will_do = {
		factor = 1
	}
}
### Entity: Character
Component: HUN_sandor_magyarossy
Constructs: has_completed_focus, has_dlc
Source: game
File: common/characters/HUN.txt

Code:
HUN_sandor_magyarossy = {
	instance = {
		allowed = {
			NOT = {
				has_dlc = Gotterdammerung
			}
		}
		name = HUN_sandor_magyarossy
		portraits = {
			army = {
				small = GFX_idea_HUN_sandor_magyarossy
			}
		}
		advisor = {
			slot = high_command
			idea_token = HUN_sandor_magyarossy
			allowed = {
				original_tag = HUN
			}
			traits = {
				air_air_combat_training_1
			}
			cost = 50
			ai_will_do = {
				base = 1
			}
		}
	} {
		allowed = {
			has_dlc = Gotterdammerung
		}
		name = HUN_sandor_magyarossy
		portraits = {
			army = {
				small = GFX_idea_HUN_sandor_magyarossy
			}
		}
		advisor = {
			slot = high_command
			idea_token = HUN_sandor_magyarossy
			allowed = {
				original_tag = HUN
			}
			available = {
				OR = {
					has_completed_focus = wuw_HUN_undercover_air_maneuvers
					wuw_HUN_does_not_have_trianon = yes
				}
			}
			traits = {
				air_air_combat_training_2
			}
			cost = 100
			ai_will_do = {
				base = 1
			}
		}
	}
}
### Entity: Order of Battle
Component: air_wing_524
Source: game
File: history/units/JAP_1936_air_legacy.txt

Code:
air_wings = {
	524 = {
		cv_fighter_equipment_0 = {
			owner = JAP
			amount = 72
		}
		cv_nav_bomber_equipment_1 = {
			owner = JAP
			amount = 48
		}
	}
}
### Entity: Event
Component: BBA_ethiopia_fascist_events.01
Constructs: is_triggered_only, ai_chance, random_hours, set_country_flag
Source: game
File: events/BBA_Ethiopia.txt

Code:
country_event = {
	id = BBA_ethiopia_fascist_events.01
	title = BBA_ethiopia_fascist_events.01.t
	desc = BBA_ethiopia_fascist_events.01.desc
	picture = GFX_report_event_ETH_ethiopian_warriors
	is_triggered_only = yes
	option = {
		name = BBA_ethiopia_fascist_events.01.a
		ai_chance = {
			base = 10
		}
		ITA = {
			country_event = {
				id = BBA_ethiopia_fascist_events.02
				hours = 4
				random_hours = 4
			}
		}
		custom_effect_tooltip = if_they_accept_tt ETH_start_civil_war ETH_cede_states_tt ETH_cede_south_tt ETH_ethiopia_italian_puppet_tt if_they_refuse_tt ETH_italy_refuse_cooperation
		set_country_flag = gugsa_rising_planned_flag
		mark_focus_tree_layout_dirty = yes
	} {
		name = BBA_ethiopia_fascist_events.01.b
		ai_chance = {
			base = 5
		}
		ITA = {
			country_event = {
				id = BBA_ethiopia_fascist_events.03
				hours = 4
				random_hours = 4
			}
		}
		custom_effect_tooltip = if_they_accept_tt ETH_start_civil_war_gojjam ETH_cede_states_tt ETH_cede_south_west_tt ETH_gojjam_italian_puppet_tt
		set_country_flag = hayamot_rising_planned_flag
		mark_focus_tree_layout_dirty = yes
	} {
		name = BBA_ethiopia_fascist_events.01.c
		ai_chance = {
			base = 5
		}
		ITA = {
			country_event = {
				id = BBA_ethiopia_fascist_events.04
				hours = 4
				random_hours = 4
			}
		}
		custom_effect_tooltip = if_they_accept_tt ETH_start_civil_war_jimma ETH_cede_states_tt ETH_cede_north_tt ETH_jimma_italian_puppet_tt
		set_country_flag = jofir_rising_planned_flag
		mark_focus_tree_layout_dirty = yes
	}
}
### Entity: AI Strategy
Component: EAI_ESPIONAGE_counterintelligence_mission_2
Constructs: check_variable
Source: game
File: common/ai_strategy/EAI_ESPIONAGE_strategies.txt

Code:
EAI_ESPIONAGE_counterintelligence_mission_2 = {
	enable = {
		check_variable = {
			EAI_ESP_available_operatives = > 5
		}
	}
	abort_when_not_enabled = yes
	ai_strategy = {
		type = operative_mission
		mission = counter_intelligence
		value = 50000
		mission_target = ROOT
		num_operatives = 1
	}
}
### Entity: Event
Component: bulgaria.5
Constructs: is_triggered_only
Source: game
File: events/Bulgaria.txt

Code:
country_event = {
	id = bulgaria.5
	title = bulgaria.5.t
	desc = bulgaria.5.d
	picture = GFX_report_event_vienna_award_negotiations
	is_triggered_only = yes
	option = {
		name = bulgaria.5.a
	}
}
### Entity: National Focus
Tree: efr_focus
Component: EFR_rationing
Constructs: prerequisite, add_ideas, completion_reward
Source: game
File: common/national_focus/r56_vichy_france.txt

Code:
focus = {
	id = EFR_rationing
	icon = GFX_FRA_VIC_rationing
	prerequisite = {
		focus = EFR_famille
	} {
		focus = EFR_travail
	}
	relative_position_id = EFR_marechal_nous_voila
	x = -2
	y = 2
	cost = 10
	available_if_capitulated = yes
	ai_will_do = {
		factor = 2
	}
	completion_reward = {
		add_ideas = idea_EFR_rationing
	}
	search_filters = {
		FOCUS_FILTER_INDUSTRY
	}
}
### Entity: State History
Component: 728
Constructs: add_core_of
Source: game
File: history/states/728-Guangzhouwan.txt

Code:
state = {
	id = 728
	name = STATE_728
	manpower = 200000
	resources = {
		coal = 6
	}
	state_category = enclave
	history = {
		owner = FRA
		add_core_of = CHI PRC
		victory_points = {
			11981 1
		}
		buildings = {
			infrastructure = 2
			11981 = {
				naval_base = 1
			}
		}
	}
	provinces = {
		11981
	}
	local_supplies = 0.0
}
### Entity: Order of Battle
Component: air_wing_367
Source: game
File: history/units/USA_tuskegee_airmen_bba.txt

Code:
air_wings = {
	367 = {
		small_plane_airframe_0 = {
			owner = USA
			amount = 40
			version_name = P-26
		}
		name = 332nd Fighter Group 477th Bombardment Group (Medium)
		ace = {
			modifier = fighter_unique
			name = Lee
			surname = Archer
			callsign = Buddy
			portrait = 1
		}
		medium_plane_airframe_0 = {
			owner = USA
			amount = 40
			version_name = P2Y
		}
	}
}
### Entity: AI Strategy
Component: ai_focus_defense_ENG
Source: game
File: common/ai_focuses/ENG.txt

Code:
ai_focus_defense_ENG = {
	research = {
		defensive = 5.0
		radar_tech = 1.0
		construction_tech = 2.0
		artillery = 2.0
	}
}
### Entity: Event
Component: BBA_italy_purge_the_party.1
Constructs: is_triggered_only, ai_chance, limit, has_country_flag, add_political_power, has_character_flag, set_country_flag, random_days
Source: game
File: events/BBA_Italy.txt

Code:
country_event = {
	id = BBA_italy_purge_the_party.1
	title = BBA_italy_purge_the_party.1.t
	desc = BBA_italy_purge_the_party.1.desc
	picture = GFX_report_event_generic_italian_fascists
	is_triggered_only = yes
	immediate = {
		hidden_effect = {
			ITA_characters_to_purge_effect = yes
		}
	}
	option = {
		name = BBA_italy_purge_the_party.1.a
		ai_chance = {
			base = 10
		}
		custom_effect_tooltip = SOV_characters_will_be_purged_tt
		character_list_tooltip = {
			limit = {
				has_character_flag = ITA_purge_advisor
			}
		}
		add_political_power = 50
		ITA_bop_very_low_increase_effect = yes
		hidden_effect = {
			ITA_purge_advisors_effect = yes
			ITA_clear_purge_flag_effect = yes
			if = {
				limit = {
					NOT = {
						has_country_flag = ITA_some_fascists_purged
					}
				}
				set_country_flag = ITA_some_fascists_purged
			} {
				limit = {
					NOT = {
						has_country_flag = ITA_first_purge_happened_flag
					}
				}
				set_country_flag = ITA_first_purge_happened_flag
				country_event = {
					id = BBA_italy_purge_the_party.1
					days = 7
					random_days = 3
				}
			}
			else = {
				country_event = {
					id = bba_news.100
					hours = 12
					random_hours = 8
				}
			}
		}
	} {
		name = BBA_italy_purge_the_party.1.b
		ai_chance = {
			base = 10
		}
		custom_effect_tooltip = SOV_characters_will_be_purged_tt
		character_list_tooltip = {
			limit = {
				has_character_flag = ITA_purge_general
			}
		}
		add_political_power = 50
		ITA_bop_very_low_increase_effect = yes
		hidden_effect = {
			ITA_purge_generals_effect = yes
			ITA_clear_purge_flag_effect = yes
			if = {
				limit = {
					NOT = {
						has_country_flag = ITA_no_fascists_purged
					}
				}
				set_country_flag = ITA_some_fascists_purged
			} {
				limit = {
					NOT = {
						has_country_flag = ITA_first_purge_happened_flag
					}
				}
				set_country_flag = ITA_first_purge_happened_flag
				country_event = {
					id = BBA_italy_purge_the_party.1
					days = 7
					random_days = 3
				}
			}
			else = {
				country_event = {
					id = bba_news.100
					hours = 12
					random_hours = 8
				}
			}
		}
	} {
		name = BBA_italy_purge_the_party.1.c
		ai_chance = {
			base = 10
		}
		custom_effect_tooltip = ITA_characters_will_be_spared_tt
		character_list_tooltip = {
			limit = {
				has_character_flag = ITA_purge_advisor
			}
		} {
			limit = {
				has_character_flag = ITA_purge_gener
# ... (truncated)
### Entity: Character
Component: TAN_konstantinov
Source: game
File: common/characters/TAN.txt

Code:
TAN_konstantinov = {
	advisor = {
		slot = army_chief
		idea_token = TAN_konstantinov
		allowed = {
			original_tag = TAN
		}
		traits = {
			army_chief_maneuver_2
		}
		cost = 100
		ai_will_do = {
			factor = 1.0
		}
	}
	name = Konstantinov
	portraits = {
		army = {
			small = GFX_idea_generic_army_asia_1
		}
	}
}
### Entity: Idea
Component: AST_voluntary_foreign_service_idea
Constructs: removal_cost, send_volunteer_divisions_required, send_volunteers_tension, send_volunteer_size
Source: game
File: common/ideas/australia.txt

Code:
AST_voluntary_foreign_service_idea = {
	allowed = {
		always = no
	}
	allowed_civil_war = {
		always = yes
	}
	removal_cost = -1
	picture = ast_volunteer_defence_corps
	modifier = {
		send_volunteer_divisions_required = -0.5
		send_volunteers_tension = -0.4
		send_volunteer_size = 4
	}
}
### Entity: State History
Component: 1130
Constructs: add_core_of
Source: game
File: history/states/1130 - Pahang.txt

Code:
state = {
	id = 1130
	name = STATE_1130
	manpower = 623100
	state_category = town
	resources = {
		tungsten = 30
		rubber = 85
	}
	history = {
		owner = MAL
		add_core_of = MAL
		victory_points = {
			10297 5
		}
		buildings = {
			4412 = {
				naval_base = 2
			}
			industrial_complex = 1
			infrastructure = 1
		}
	}
	provinces = {
		4412 10297 13526
	}
	local_supplies = 0.0
}
### Entity: National Focus
Tree: spr_focus
Component: SPR_improve_military_infrastructure
Constructs: prerequisite, limit, add_ideas, completion_reward, random_owned_controlled_state, is_core_of, set_state_flag, add_building_construction
Source: game
File: common/national_focus/spain.txt

Code:
focus = {
	id = SPR_improve_military_infrastructure
	available = {

	}
	bypass = {

	}
	prerequisite = {
		focus = SPR_the_inevitable_counterblow
	}
	icon = GFX_goal_generic_construct_infrastructure
	x = -2
	y = 1
	relative_position_id = SPR_the_inevitable_counterblow
	cost = 10
	available_if_capitulated = yes
	search_filters = {
		FOCUS_FILTER_INDUSTRY
	}
	completion_reward = {
		add_ideas = SPR_improve_military_infrastructure
		random_owned_controlled_state = {
			limit = {
				is_core_of = ROOT
				free_building_slots = {
					building = infrastructure
					size = > 1
				}
			}
			set_state_flag = SPR_improve_military_infrastructure_1inf
			add_building_construction = {
				type = infrastructure
				level = 1
				instant_build = yes
			}
		} {
			limit = {
				is_core_of = ROOT
				NOT = {
					has_state_flag = SPR_improve_military_infrastructure_1inf
				}
				free_building_slots = {
					building = infrastructure
					size = > 1
				}
			}
			set_state_flag = SPR_improve_military_infrastructure_1inf
			add_building_construction = {
				type = infrastructure
				level = 1
				instant_build = yes
			}
		} {
			limit = {
				is_core_of = ROOT
				NOT = {
					has_state_flag = SPR_improve_military_infrastructure_1inf
				}
				free_building_slots = {
					building = infrastructure
					size = > 1
				}
			}
			set_state_flag = SPR_improve_military_infrastructure_1inf
			add_building_construction = {
				type = infrastructure
				level = 1
				instant_build = yes
			}
		} {
			limit = {
				is_core_of = ROOT
				NOT = {
					has_state_flag = SPR_improve_military_infrastructure_1inf
				}
				free_building_slots = {
					building = infrastructure
					size = > 1
				}
			}
			set_state_flag = SPR_improve_military_infrastructure_1inf
			add_building_construction = {
				type = infrastructure
				level = 1
				instant_build = yes
			}
		}
	}
}
### Entity: Character
Component: CHL_pedro_dartnell
Constructs: has_government, has_country_flag, has_country_leader
Source: game
File: common/characters/CHL.txt

Code:
CHL_pedro_dartnell = {
	name = CHL_pedro_dartnell
	portraits = {
		army = {
			large = GFX_portrait_CHL_pedro_dartnell
			small = GFX_portrait_CHL_pedro_dartnell_small
		}
	}
	corps_commander = {
		traits = {
			brilliant_strategist old_guard
		}
		skill = 3
		attack_skill = 3
		defense_skill = 2
		planning_skill = 1
		logistics_skill = 1
		legacy_id = -1
		visible = {
			OR = {
				has_government = neutrality democratic
				has_country_leader = {
					ruling_only = yes
					character = CHL_marmaduke_grove
				}
			}
			has_country_flag = CHL_recalled_pedro_dartnell_flag
		}
	}
}
### Entity: Event
Component: KMT_event.81
Constructs: is_triggered_only, annex_country, create_wargoal, annex_everything, set_nationality
Source: game
File: events/r56_KMT_events.txt

Code:
country_event = {
	id = KMT_event.81
	title = KMT_event.81.t
	desc = KMT_event.81.desc
	picture = GFX_report_event_chinese_officers
	is_triggered_only = yes
	option = {
		name = KMT_event.81.a
		FROM = {
			country_event = CHI_warlords.20
		} {
			annex_country = {
				target = ROOT
				transfer_troops = yes
			}
		}
	} {
		name = KMT_event.81.b
		FROM = {
			country_event = CHI_warlords.19
		} {
			create_wargoal = {
				target = ROOT
				type = annex_everything
			}
		}
	} {
		name = KMT_event.81.c
		trigger = {
			PRC = {
				exists = yes
			}
			controls_state = 744
		}
		FROM = {
			country_event = KMT_event.82
		}
		PRC = {
			country_event = KMT_event.82
		} {
			annex_country = {
				target = ROOT
				transfer_troops = yes
			}
		}
		744 = {
			transfer_state_to = CHI
		}
		CHI_zhang_xueliang = {
			set_nationality = PRC
		}
		transfer_units_fraction = {
			target = FROM
			size = 0.5
			stockpile_ratio = 0.75
		}
	}
}