Losa10/PreTrain-HOI4-Modding-Assistant huggingface dataset:
### Entity: AI Strategy
Component: AFG_fascism_plan
Constructs: has_country_flag, has_dlc, has_game_rule, is_subject
Source: game
File: common/ai_strategy_plans/AFG_alternate_strategy_plan.txt

Code:
AFG_fascism_plan = {
	name = Afghanistan Fascist Plan
	desc = 
	allowed = {
		original_tag = AFG
		has_dlc = Graveyard of Empires
	}
	enable = {
		OR = {
			has_country_flag = AFG_AI_RANDOM_FASCISM
			has_game_rule = {
				rule = AFG_AI_BEHAVIOR
				option = FASCISM
			}
		}
	}
	abort = {
		is_subject = yes
	}
	ai_national_focuses = {
		SSB_expand_afghanistans_military_infrastructure AFG_expand_telegraph_network AFG_against_kabul AFG_sugar_processing SSB_baghlan_sugar_factory_branches AFG_fruit_packing AFG_expand_karakul_lambskin_industry AFG_clear_malarial_swamps AFG_contact_amanullah_loyalists AFG_contact_rural_loyalists AFG_request_german_support AFG_secure_army_support SSB_joint_military_exercises AFG_return_of_the_emir AFG_revive_the_1923_constitution AFG_adopt_nufus AFG_new_army AFG_expand_royal_guard AFG_expand_border_guards SSB_coordinate_military_production AFG_enforce_western_attire AFG_education_for_women_and_girls AFG_reinforce_the_royal_guard AFG_custail_pashtunwali_primacy AFG_expand_state_run_factories AFG_infrastructure_construction AFG_electrification SSB_combined_arms AFG_agreement_with_germany AFG_establish_radio_networks AFG_expand_kabul_university AFG_qargha_dam AFG_kajaki_dam AFG_iron_mines AFG_chromite_mines AFG_modern_economy AFG_alternative_partnerships AFG_eyes_on_the_north AFG_alliance_with_turkik_peoples AFG_permit_axis_airbases AFG_officer_training AFG_axis_equipment AFG_join_axis AFG_spinzar_cotton_factory AFG_purchase_tanks AFG_purchase_aircraft AFG_expand_equipment_purchases AFG_increase_air_purchases AFG_utilize_cameleers AFG_establish_camelry_regiments AFG_kabul_conference
	}
	focus_factors = {

	}
	research = {

	}
	ideas = {

	}
	weight = {
		factor = 1.0
		modifier = {
			factor = 1.0
		}
	}
}
### Entity: Character
Component: AST_motherland_advocate_pa
Constructs: war_support_factor, fascism_drift
Source: game
File: common/country_leader/taog_traits.txt

Code:
AST_motherland_advocate_pa = {
	random = no
	sprite = 13
	war_support_factor = 0.05
	fascism_drift = 0.1
}
### Entity: Idea
Component: AST_defying_american_interference_idea
Constructs: removal_cost
Source: game
File: common/ideas/australia.txt

Code:
AST_defying_american_interference_idea = {
	allowed = {
		always = no
	}
	allowed_civil_war = {
		always = yes
	}
	removal_cost = -1
	picture = generic_usa_conflict
	targeted_modifier = {
		tag = USA
		attack_bonus_against = 0.1
		defense_bonus_against = 0.1
	}
}
### Entity: Idea
Component: LIT_patriotic_socialism_idea
Constructs: industrial_capacity_factory, removal_cost, democratic_drift
Source: game
File: common/ideas/lithuania.txt

Code:
LIT_patriotic_socialism_idea = {
	picture = por_iberian_workers_united
	allowed = {
		always = no
	}
	allowed_civil_war = {
		always = yes
	}
	removal_cost = -1
	modifier = {
		democratic_drift = 0.05
		industrial_capacity_factory = 0.1
	}
}
### Entity: Technology
Component: sp_armored_maintenance_tech
Constructs: limit, is_major, is_special_project_completed, is_special_project_tech, research_cost, enable_subunits, has_dlc
Source: game
File: common/technologies/support.txt

Code:
technology = {
	allow = {
		ROOT = {
			is_special_project_completed = sp:sp_land_military_engineering_vehicles
		}
	}
	is_special_project_tech = yes
	research_cost = 2.0
	start_year = 1938
	folder = {
		name = support_folder
		position = {
			x = 7
			y = @1938
		}
	}
	categories = {
		support_tech maintenance_company_tech
	}
	enable_subunits = {
		armored_maintenance
	}
	on_research_complete = {
		if = {
			limit = {
				has_dlc = Gotterdammerung
			}
			SP_create_variant_based_on_country_armored_maintenance = yes
		}
	}
	ai_will_do = {
		base = 2
		modifier = {
			factor = 2
			is_major = yes
		} {
			factor = 1.5
			date = > 1940.1.1
		} {
			factor = 1.5
			date = > 1944.1.1
		}
	}
}
### Entity: Event
Component: CHI_warlords.23
Constructs: is_triggered_only, add_war_support, add_political_power
Source: game
File: events/r56_warlord_events.txt

Code:
country_event = {
	id = CHI_warlords.23
	title = CHI_warlords.23.t
	desc = CHI_warlords.23.desc
	picture = GFX_report_event_chinese_soldiers
	is_triggered_only = yes
	option = {
		name = It seems the writing ma well be on the wall now...
		add_war_support = -0.2
		add_political_power = -100
		transfer_units_fraction = {
			target = FROM.FROM
			size = 0.25
			stockpile_ratio = 0.3
		}
	}
}
### Entity: Opinion Modifier
Component: opinion_modifiers
Source: game
File: common/opinion_modifiers/RAJ_opinion_modifiers.txt

Code:
opinion_modifiers = {
	RAJ_mistreatment = {
		value = -100
	}
	RAJ_disloyal = {
		value = -50
	}
	RAJ_tampering_with_our_Administration = {
		value = -35
	}
	RAJ_Hardline_Colonialist_Stance = {
		value = -75
	}
	RAJ_Established_Embassy = {
		value = 50
	}
	RAJ_Weapon_Shipments = {
		value = 30
	}
	declined_offer = {
		value = -25
	}
	granted_food_aid = {
		value = 75
	}
	denied_food_aid = {
		value = -50
	}
	imperial_conference_attended = {
		value = 30
	}
	chi_aided_enemy = {
		value = -40
	}
	chi_sov_aided_enemy = {
		value = -20
	}
	RAJ_Indian_Subcontinent_Cooperation = {
		value = 100
		trade = yes
	}
	r56_raj_nuclear_tests = {
		value = -35
	}
	raj_free_floating_rupee = {
		value = 15
	}
	raj_resource_shipments = {
		value = 35
	}
	nam_founder = {
		value = 10
	}
	industrial_aid_delivered = {
		value = 25
	}
	indo_soviet_friendship_treaty = {
		value = 50
	}
}
### Entity: Event
Component: DOD_hungary.69
Constructs: is_triggered_only, ai_chance, remove_ideas, add_stability, set_country_flag
Source: game
File: events/DOD_Hungary.txt

Code:
country_event = {
	id = DOD_hungary.69
	title = DOD_hungary.69.t
	desc = DOD_hungary.69.desc
	picture = GFX_report_event_vienna_award_negotiations
	is_triggered_only = yes
	option = {
		name = DOD_hungary.69.a
		ai_chance = {
			base = 80
		}
		HUN = {
			country_event = {
				id = DOD_hungary.70
				hours = 6
			}
		}
		remove_ideas = ROM_war_preparation
		set_country_flag = second_vienna_accepted_north
	} {
		name = DOD_hungary.69.b
		ai_chance = {
			base = 20
		}
		add_stability = -0.05
		event_target:HUN_mediator = {
			country_event = {
				id = DOD_hungary.66
				hours = 6
			}
		}
	}
}
### Entity: Idea
Component: KMT_national_defense_fund
Constructs: removal_cost
Source: game
File: common/ideas/r56_china.txt

Code:
KMT_national_defense_fund = {
	removal_cost = -1
	picture = generic_economic_increase
	allowed = {
		always = no
	}
	allowed_civil_war = {
		always = yes
	}
	cancel = {

	}
	on_remove = {

	}
	modifier = {
		consumer_goods_factor = -0.1
		production_speed_arms_factory_factor = 0.075
	}
}
### Entity: Shared Focus
Tree: den_focus
Component: DEN_Battleship_Development
Constructs: shared_focus, prerequisite, limit, completion_reward, add_tech_bonus, has_dlc, add_mio_size, add_mio_funds_gain_factor
Source: game
File: common/national_focus/r56_denmark.txt

Code:
shared_focus = {
	id = DEN_Battleship_Development
	icon = GFX_focus_DEN_naval_power_projection
	cost = 10
	available_if_capitulated = yes
	prerequisite = {
		focus = DEN_Complete_Control_over_the_Baltic DEN_Keep_the_Sealanes_Open
	}
	ai_will_do = {
		factor = 0.1
	}
	search_filters = {
		FOCUS_FILTER_NAVY_XP FOCUS_FILTER_MILITARY_RESEARCH
	}
	x = 4
	y = 3
	relative_position_id = DEN_Retrofit_the_Royal_Navy
	completion_reward = {
		add_tech_bonus = {
			name = DEN_Battleship_Development
			uses = 1
			bonus = 1
			category = bb_tech
		}
		navy_experience = 25
		if = {
			limit = {
				has_dlc = Arms Against Tyranny
			}
			mio:DEN_burmeister_wain_organization = {
				add_mio_size = 1
				add_mio_funds_gain_factor = 0.2
				add_mio_research_bonus = 0.05
			}
			mio:DEN_orlogsvaerftet_organization = {
				unlock_mio_trait_tooltip = DEN_mio_trait_ship_production
			}
		}
	}
}
### Entity: Event
Component: r56i.event.21
Constructs: has_country_flag, set_country_flag, has_air_experience, is_ai
Source: game
File: events/r56i_events.txt

Code:
country_event = {
	id = r56i.event.21
	title = r56i.event.21.t
	desc = r56i.event.21.desc
	picture = GFX_CZKE_b135_report
	mean_time_to_happen = {
		days = 60
		modifier = {
			factor = 15
			has_country_flag = air_xp_alert
		}
	}
	immediate = {
		set_country_flag = air_xp_alert
	}
	trigger = {
		has_air_experience = > 950
		is_ai = no
		date = < 1947.01.01
	}
	option = {
		name = r56i.event.21.a
		air_experience = -1
	}
}
### Entity: Modifier Reference
Construct: army_infantry_defence_factor
Source: vanilla_docs
File: documentation/modifiers_documentation.md

Doc:
## army_infantry_defence_factor

* Number with 1 decimal places
* **Categories**: army, defensive
### Entity: Idea
Component: GUM_fascist_guy
Constructs: has_government
Source: game
File: common/ideas/guam.txt

Code:
GUM_fascist_guy = {
	picture = generic_political_advisor_asia_2
	allowed = {
		original_tag = GUM
	}
	traits = {
		fascist_demagogue
	}
	do_effect = {
		NOT = {
			has_government = fascism
		}
	}
	ai_will_do = {
		factor = 0
	}
}
### Entity: Country History
Country: SSI
Component: SSI_technology
Constructs: set_technology
Source: game
File: history/countries/SSI - Siak.txt

Code:
# Starting Technologies for SSI
set_technology = {
	infantry_weapons = 1
	tech_support = 1
}
{
	early_ship_hull_submarine = 1
	early_ship_hull_light = 1
	early_ship_hull_cruiser = 1
}
### Entity: Scripted Effect
Component: ITA_pope_takes_over
Constructs: limit, has_government, set_politics, has_global_flag, add_country_leader_role, set_party_name
Source: game
File: common/scripted_effects/ITA_scripted_effects.txt

Code:
ITA_pope_takes_over = {
	if = {
		limit = {
			NOT = {
				has_government = neutrality
			}
		}
		set_politics = {
			ruling_party = neutrality
			elections_allowed = no
			long_name = PAP_neutrality_party
			name = PAP_neutrality_party
		}
	} {
		limit = {
			has_global_flag = ITA_pope_pio_xi_dead_flag
		}
		add_country_leader_role = {
			character = ITA_papa_pio_xii
			promote_leader = yes
			country_leader = {
				ideology = oligarchism
				expire = 1958.12.16
				traits = {
					supreme_pontiff grand_master_of_the_equestrian_order_of_the_holy_sepulcher_of_jerusalem
				}
			}
		}
	}
	else = {
		set_party_name = {
			ideology = neutrality
			name = PAP_neutrality_party
			long_name = PAP_neutrality_party
		}
	} {
		add_country_leader_role = {
			character = ITA_papa_pio_xi
			promote_leader = yes
			country_leader = {
				ideology = despotism
				expire = 1958.12.16
				traits = {
					supreme_pontiff temperamental
				}
			}
		}
	}
}
### Entity: National Focus
Tree: den_focus
Component: DEN_Crackdown_on_Extremism
Constructs: prerequisite, limit, add_stability, completion_reward, has_idea, modify_timed_idea, add_popularity, add_to_variable
Source: game
File: common/national_focus/r56_denmark.txt

Code:
focus = {
	id = DEN_Crackdown_on_Extremism
	icon = GFX_goal_generic_repeal_opressive_law
	cost = 5
	ai_will_do = {
		factor = 5
	}
	prerequisite = {
		focus = DEN_Dissolve_the_Folketing
	}
	x = -1
	y = 3
	search_filters = {
		FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY
	}
	relative_position_id = DEN_King_Christian_Coup
	completion_reward = {
		if = {
			limit = {
				has_idea = DEN_consoldiating_society
			}
			modify_timed_idea = {
				idea = DEN_consoldiating_society
				days = 50
			}
		}
		add_stability = 0.1
		add_popularity = {
			ideology = fascism
			popularity = -0.1
		} {
			ideology = communism
			popularity = -0.1
		}
		add_to_variable = {
			den_middle_equilibrium = 10
			tooltip = den_middle_equilibrium_tooltip
		}
		den_calculate_middle = yes
	}
}
### Entity: Event
Component: bftb_turkey.92
Constructs: is_triggered_only, add_political_power
Source: game
File: events/BFTB_Turkey.txt

Code:
country_event = {
	id = bftb_turkey.92
	title = bftb_turkey.92.t
	desc = bftb_turkey.92.desc
	picture = GFX_report_event_tur_the_saadabad_pact
	is_triggered_only = yes
	option = {
		name = bftb_turkey.92.a
		add_political_power = 25
		effect_tooltip = {
			diplomatic_relation = {
				country = FROM
				relation = non_aggression_pact
				active = yes
			}
		}
	}
}
### Entity: National Focus
Tree: r56_focus
Component: R56_persian_focus
Constructs: has_completed_focus, create_country_leader, add_equipment_to_stockpile, prerequisite, has_war, limit, add_ideas, remove_ideas
Source: game
File: common/national_focus/r56_persia.txt

Code:
focus_tree = {
	id = R56_persian_focus
	country = {
		factor = 0
		modifier = {
			add = 10
			tag = PER
		}
	}
	continuous_focus_position = {
		x = 45
		y = 725
	}
	default = no
	focus = {
		id = PER_continue_government_purges
		icon = GFX_goal_PER_shah_reza_pahlavi_1
		cost = 10
		mutually_exclusive = {
			focus = PER_appoint_zahedi PER_restore_constitutionalism PER_revive_the_jungle_movement
		}
		x = 22
		y = 0
		offset = {
			x = -13
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = PER_continue_government_purges
			}
		}
		allow_branch = {
			if = {
				limit = {
					has_game_rule = {
						rule = obsolete_focus_branches_visibility
						option = HIDE
					}
				}
				NOT = {
					has_completed_focus = PER_revive_the_jungle_movement PER_restore_constitutionalism PER_appoint_zahedi
				}
			}
		}
		ai_will_do = {
			factor = 75
		}
		completion_reward = {
			add_political_power = 150
			add_stability = 0.05
			mark_focus_tree_layout_dirty = yes
		}
		search_filters = {
			FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL
		}
	} {
		id = PER_restore_constitutionalism
		icon = GFX_goal_PER_reconstitute_the_guarded_domains
		cost = 10
		mutually_exclusive = {
			focus = PER_continue_government_purges PER_appoint_zahedi PER_revive_the_jungle_movement
		}
		x = 16
		y = 0
		offset = {
			x = -5
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = PER_restore_constitutionalism
			}
		}
		allow_branch = {
			if = {
				limit = {
					has_game_rule = {
						rule = obsolete_focus_branches_visibility
						option = HIDE
					}
				}
				NOT = {
					has_completed_focus = PER_revive_the_jungle_movement PER_continue_government_purges PER_appoint_zahedi
				}
			}
		}
		ai_will_do = {
			factor = 30
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		completion_reward = {
			add_ideas = PER_restore_constitutionalism
			add_stability = 0.1
			mark_focus_tree_layout_dirty = yes
		}
		search_filters = {
			FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL
		}
	} {
		id = PER_revive_the_jungle_movement
		icon = GFX_focus_generic_join_comintern
		cost = 10
		mutually_exclusive = {
			focus = PER_continue_government_purges PER_restore_constitutionalism PER_appoint_zahedi
		
# ... (truncated)
### Entity: National Focus
Tree: jap_focus
Component: JAP_sea_jet_prototypes
Constructs: prerequisite, completion_reward, cancel_if_invalid, add_breakthrough_progress, add_tech_bonus, add_to_variable
Source: game
File: common/national_focus/japan.txt

Code:
focus = {
	id = JAP_sea_jet_prototypes
	icon = GFX_focus_JAP_jet_prototypes
	prerequisite = {
		focus = JAP_sea_unify_the_air_forces JAP_the_divine_wind
	}
	relative_position_id = JAP_sea_unify_the_air_forces
	x = 1
	y = 1
	cost = 10
	ai_will_do = {
		factor = 3
	}
	available = {

	}
	bypass = {

	}
	cancel_if_invalid = yes
	continue_if_invalid = no
	available_if_capitulated = no
	search_filters = {
		FOCUS_FILTER_HISTORICAL FOCUS_FILTER_RESEARCH
	}
	completion_reward = {
		add_breakthrough_progress = {
			specialization = specialization_air
			value = 1
		}
		add_tech_bonus = {
			name = JAP_sea_jet_prototypes
			bonus = 0.33
			uses = 2
			category = jet_technology
		}
		custom_effect_tooltip = generic_skip_one_line_tt
		JAP_add_or_modify_advanced_weapon_projects = yes
		add_to_variable = {
			JAP_advanced_weapons_sp_tag_jet_speed_factor = 0.1
			tooltip = sp_tag_jet_speed_factor_tt
		}
	}
}
### Entity: Idea
Component: CHI_conf_dem_support
Constructs: has_government, removal_cost, democratic_drift
Source: game
File: common/ideas/r56_warlord_ideas.txt

Code:
CHI_conf_dem_support = {
	picture = generic_democratic_drift_bonus
	removal_cost = -1
	cancel = {
		NOT = {
			has_government = democratic
		}
	}
	modifier = {
		democratic_drift = 0.1
	}
	allowed = {
		always = no
	}
	allowed_civil_war = {
		always = yes
	}
}
### Entity: Unit Template
Component: NIC_SS_HISTORICAL
Source: game
File: common/units/names_ships/NIC_ship_names.txt

Code:
NIC_SS_HISTORICAL = {
	name = NAME_THEME_HISTORICAL_SUBMARINES
	for_countries = {
		NIC
	}
	type = ship
	ship_types = {
		ship_hull_submarine submarine
	}
	prefix = ARN 
	fallback_name = Submarino %d
	unique = {
		Managua Masaya Granada León Chinandega
	}
}
### Entity: AI Strategy
Component: GER_StrikeForce_1
Source: game
File: common/ai_navy/taskforce/GER_taskforce_templates.txt

Code:
GER_StrikeForce_1 = {
	allowed = {
		original_tag = GER
	}
	ai_will_do = {
		factor = 1
	}
	keep_updated = yes
	mission = {
		naval_strike
	}
	min_composition = {
		battleship = {
			amount = 1
		}
		heavy_cruiser = {
			amount = 1
		}
	}
	optimal_composition = {
		battleship = {
			amount = 4
		}
		battle_cruiser = {
			amount = 4
		}
		heavy_cruiser = {
			amount = 4
		}
		light_cruiser = {
			amount = 4
		}
		destroyer = {
			amount = 28
		}
	}
}
### Entity: Unit Template
Component: LUX_CA_HISTORICAL
Source: game
File: common/units/names_ships/LUX_ship_names.txt

Code:
LUX_CA_HISTORICAL = {
	name = NAME_THEME_HISTORICAL_CA
	for_countries = {
		LUX
	}
	type = ship
	ship_types = {
		ship_hull_cruiser heavy_cruiser
	}
	prefix = HMdS 
	fallback_name = Schwéier Cruiser %d
	unique = {
		Differdange Diddeleng
	}
}
### Entity: National Focus
Tree: por_focus
Component: POR_recover_brazil
Constructs: prerequisite, limit, random_country, owns_state, completion_reward, add_ai_strategy, add_state_claim, declare_war
Source: game
File: common/national_focus/portugal.txt

Code:
focus = {
	id = POR_recover_brazil
	will_lead_to_war_with = BRA
	select_effect = {
		random_country = {
			limit = {
				controls_state = 500
			}
			ROOT = {
				add_ai_strategy = {
					type = prepare_for_war
					id = PREV
					value = 100
				}
			}
		}
	}
	available = {

	}
	bypass = {
		owns_state = 500 501 944 503 502 504 496 943 280 505 499 941 942 936 937 498 935 497 938 939 495 940
	}
	prerequisite = {
		focus = POR_mapa_cor_de_rosa
	}
	mutually_exclusive = {
		focus = POR_the_kingdom_reunited
	}
	icon = GFX_focus_por_recover_brazil
	x = 1
	y = 2
	relative_position_id = POR_mapa_cor_de_rosa
	cost = 10
	completion_reward = {
		add_state_claim = 500 501 944 503 502 504 496 943 280 505 499 941 942 936 937 498 935 497 938 939 495 940
		hidden_effect = {
			random_country = {
				limit = {
					controls_state = 500
				}
				ROOT = {
					add_ai_strategy = {
						type = declare_war
						id = PREV
						value = 100
					}
				}
			}
		}
	}
}
### Entity: Character
Component: SIA_the_iron_willed
Source: game
File: common/country_leader/taog_traits.txt

Code:
SIA_the_iron_willed = {
	random = no
	sprite = 13
}
### Entity: National Focus
Tree: raj_focus
Component: RAJ_the_empires_workshop
Constructs: prerequisite, limit, completion_reward, add_autonomy_score, add_tech_bonus, random_core_state, is_fully_controlled_by, add_extra_state_shared_building_slots
Source: game
File: common/national_focus/india_goe.txt

Code:
focus = {
	id = RAJ_the_empires_workshop
	icon = GFX_goal_generic_construct_civ_factory
	prerequisite = {
		focus = RAJ_crown_commodities
	} {
		focus = RAJ_strengthen_ties_with_british_investors_GOE
	}
	x = -1
	y = 1
	relative_position_id = RAJ_strengthen_ties_with_british_investors_GOE
	cost = 10
	search_filters = {
		FOCUS_FILTER_TFV_AUTONOMY FOCUS_FILTER_RESEARCH FOCUS_FILTER_INDUSTRY
	}
	completion_reward = {
		add_autonomy_score = {
			value = 150
			localization = RAJ_the_empires_workshop
		}
		custom_effect_tooltip = generic_skip_one_line_tt generic_skip_one_line_tt
		add_tech_bonus = {
			name = RAJ_the_empires_workshop
			bonus = 0.75
			uses = 2
			category = industry
		}
		random_core_state = {
			limit = {
				is_fully_controlled_by = ROOT
				free_building_slots = {
					building = industrial_complex
					size = > 1
					include_locked = yes
				}
			}
			add_extra_state_shared_building_slots = 2
			add_building_construction = {
				type = industrial_complex
				level = 2
				instant_build = yes
			}
		}
		if = {
			limit = {
				is_ally_with = ENG
			}
			custom_effect_tooltip = generic_skip_one_line_tt RAJ_the_empires_workshop_civs_to_the_empire_subjects_tt
			every_subject_country = {
				limit = {
					NOT = {
						tag = ROOT
					}
				}
				event_option_tooltip = GOE_RAJ_loyalist.02.a
			}
			hidden_effect = {
				ENG = {
					if = {
						limit = {
							any_core_state = {
								is_fully_controlled_by = PREV
								free_building_slots = {
									building = industrial_complex
									size = > 1
									include_locked = yes
								}
							}
						}
						country_event = {
							id = GOE_RAJ_loyalist.02
							hours = 8
							random_hours = 4
						}
					}
					every_subject_country = {
						limit = {
							NOT = {
								tag = ROOT
							}
						}
						if = {
							limit = {
								any_core_state = {
									is_fully_controlled_by = PREV
									free_building_slots = {
										building = industrial_complex
										size = > 0
										include_locked = yes
									}
								}
							}
							country_event = {
								id = GOE_RAJ_loyalist.02
								hours = 8
								random_hours = 4
							}
						}
					}
				}
			}
		}
	}
}
### Entity: Character
Component: FRA_henri_marie_auguste_bineau
Constructs: has_capitulated
Source: game
File: common/characters/FRA.txt

Code:
FRA_henri_marie_auguste_bineau = {
	name = FRA_henri_marie_auguste_bineau
	portraits = {
		army = {
			small = GFX_idea_generic_army_europe_3
		}
	}
	advisor = {
		slot = army_chief
		idea_token = FRA_henri_marie_auguste_bineau
		allowed = {
			original_tag = FRA
		}
		traits = {
			army_chief_offensive_1
		}
		cost = 50
		ai_will_do = {
			factor = 1.0
			modifier = {
				factor = 2
				has_capitulated = yes
			}
		}
	}
}
### Entity: Scripted Effect
Component: EAI_ATTACHE_fix_attache_idea
Constructs: limit, add_ideas, remove_ideas, has_country_flag, has_idea, has_attache, check_variable, add_to_temp_array
Source: game
File: common/scripted_effects/EAI_COUNTRY_attache_effects.txt

Code:
EAI_ATTACHE_fix_attache_idea = {
	if = {
		limit = {
			has_idea = EAI_attache_received
			has_attache = yes
		}
		remove_ideas = EAI_attache_received
		if = {
			limit = {
				has_country_flag = EAI_attache_logging
			}
			log = [GetYear] [GetMonth] | AI | [Root.GetName] | ATTACHE: removed duplicate received idea
		}
	} {
		limit = {
			check_variable = {
				EAI_attache_senders^num = > 0
			}
		}
		for_each_scope_loop = {
			array = EAI_attache_senders
			if = {
				limit = {
					OR = {
						exists = no
					}
				}
				add_to_temp_array = {
					remove_senders = THIS.id
				}
				if = {
					limit = {
						has_country_flag = EAI_attache_logging
					}
					log = [GetYear] [GetMonth] | AI | [Root.GetName] | ATTACHE: removed invalid attache received idea
				}
			}
		}
		if = {
			limit = {
				check_variable = {
					remove_senders^num = > 0
				}
			}
			for_each_scope_loop = {
				array = remove_senders
				remove_from_array = {
					EAI_attache_senders = THIS.id
				}
			}
		}
	}
	else_if = {
		limit = {
			check_variable = {
				EAI_attache_senders^num = > 0
			}
			NOT = {
				has_idea = EAI_attache_received
			} {
				has_attache = yes
			}
		}
		add_ideas = EAI_attache_received
		if = {
			limit = {
				has_country_flag = EAI_attache_logging
			}
			log = [GetYear] [GetMonth] | AI | [Root.GetName] | ATTACHE: added missing received idea
		}
	}
}