Losa10/PreTrain-HOI4-Modding-Assistant huggingface dataset:
### Entity: Event
Component: denmark_overlord_events.24
Constructs: is_triggered_only, ai_chance, has_completed_focus, limit, has_government, add_political_power, has_opinion, is_historical_focus_on
Source: game
File: events/AAT_Denmark.txt

Code:
country_event = {
	id = denmark_overlord_events.24
	title = denmark_overlord_events.24.t
	desc = denmark_overlord_events.24.desc
	picture = GFX_report_event_DEN_danish_politics
	is_triggered_only = yes
	option = {
		name = denmark_overlord_events.24.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_government = FROM
			} {
				factor = 5
				has_opinion = {
					target = FROM
					value = > 49
				}
			}
		}
		add_political_power = -50
	} {
		name = denmark_overlord_events.24.a
		ai_chance = {
			base = 5
			modifier = {
				factor = 2
				FROM = {
					power_balance_value = {
						id = DEN_occupation_balance
						value = > 0.6
					}
				}
			} {
				factor = 2
				has_opinion = {
					target = FROM
					value = < 25
				}
			} {
				factor = 2
				is_historical_focus_on = yes
			}
		}
		effect_tooltip = {
			if = {
				limit = {
					ROOT = {
						has_government = fascism
					}
				}
				set_politics = {
					ruling_party = fascism
				}
			}
			else_if = {
				limit = {
					ROOT = {
						has_government = communism
					}
				}
				set_politics = {
					ruling_party = communism
				}
			} {
				limit = {
					ROOT = {
						has_government = neutrality
						has_elections = no
					}
				}
				DEN_the_king_takes_over = yes
			} {
				limit = {
					ROOT = {
						has_government = neutrality
						has_elections = yes
					}
				}
				if = {
					limit = {
						has_completed_focus = DEN_king_assumes_power
					}
					promote_character = DEN_knud_bach
					set_party_name = {
						ideology = neutrality
						name = DEN_neutrality_party
						long_name = DEN_neutrality_party_long
					}
				}
				else = {
					set_politics = {
						ruling_party = neutrality
						elections_allowed = yes
					}
				}
			} {
				limit = {
					ROOT = {
						has_government = democratic
					}
				}
				DEN_erik_scavenius_takes_over = yes
			}
		}
		FROM = {
			country_event = {
				id = denmark_overlord_events.25
				days = 1
			}
		}
	}
}
### Entity: Character
Component: EGY_mahmoud_hamza_pasha
Source: game
File: common/characters/EGY.txt

Code:
EGY_mahmoud_hamza_pasha = {
	name = Mahmoud Hamza Pasha
	portraits = {
		army = {
			large = gfx/leaders/EGY/r56_portrait_EGY_Mahmoud_Hamza_Pasha.dds
			small = GFX_idea_EGY_mahmoud_hamza_pasha
		}
	}
	advisor = {
		slot = navy_chief
		idea_token = EGY_mahmoud_hamza_pasha
		allowed = {
			original_tag = EGY
		}
		traits = {
			navy_chief_decisive_battle_1
		}
		cost = 50
		ai_will_do = {
			factor = 1.0
		}
	}
	navy_leader = {
		traits = {
			gentlemanly
		}
		skill = 2
		attack_skill = 1
		defense_skill = 3
		maneuvering_skill = 2
		coordination_skill = 2
		legacy_id = -1
	}
}
### Entity: Order of Battle
Component: division_unit
Constructs: division_template, is_name_ordered
Source: game
File: history/units/ARG_1936.txt

Code:
division = {
	division_name = {
		is_name_ordered = yes
		name_order = 2
	}
	location = 10953
	division_template = División de Infanteria
	start_experience_factor = 0.1
	start_equipment_factor = 0.5
}
### Entity: Order of Battle
Component: division_unit
Constructs: division_template, is_name_ordered
Source: game
File: history/units/KPA_1936.txt

Code:
division = {
	division_name = {
		is_name_ordered = yes
		name_order = 1
	}
	location = 9981
	division_template = Subidae Yeodan
	start_experience_factor = 0.3
	start_equipment_factor = 0.7
}
### Entity: National Focus
Tree: nor_focus
Component: NOR_baltic_anti-communist_league
Constructs: prerequisite, limit, has_government, has_war_with, add_opinion_modifier, completion_reward, has_civil_war, is_subject
Source: game
File: common/national_focus/r56_norway.txt

Code:
focus = {
	id = NOR_baltic_anti-communist_league
	icon = GFX_focus_generic_polish_deal
	prerequisite = {
		focus = NOR_a_piece_in_the_greater_game
	}
	mutually_exclusive = {
		focus = NOR_the_british_empire
	} {
		focus = NOR_the_german_kaiserreich
	}
	x = 3
	y = 2
	relative_position_id = NOR_the_european_policy
	cost = 10
	ai_will_do = {
		base = 10
	}
	available = {
		has_civil_war = no
		is_subject = no
		is_faction_leader = yes
		OR = {
			is_in_faction_with = SWE FIN
		} {
			EST = {
				exists = yes
				has_capitulated = no
				NOT = {
					has_war_with = ROOT
				} {
					has_government = communism
				}
			}
			LAT = {
				exists = yes
				has_capitulated = no
				NOT = {
					has_war_with = ROOT
				} {
					has_government = communism
				}
			}
			LIT = {
				exists = yes
				has_capitulated = no
				NOT = {
					has_war_with = ROOT
				} {
					has_government = communism
				}
			}
			POL = {
				exists = yes
				has_capitulated = no
				NOT = {
					has_war_with = ROOT
				} {
					has_government = communism
				}
			}
		}
	}
	search_filters = {
		FOCUS_FILTER_POLITICAL
	}
	completion_reward = {
		add_opinion_modifier = {
			target = EST
			modifier = POL_the_baltic_alliance
		} {
			target = LAT
			modifier = POL_the_baltic_alliance
		} {
			target = LIT
			modifier = POL_the_baltic_alliance
		} {
			target = POL
			modifier = POL_the_baltic_alliance
		}
		add_ai_strategy = {
			type = alliance
			id = EST
			value = 125
		} {
			type = alliance
			id = LAT
			value = 125
		} {
			type = alliance
			id = LIT
			value = 125
		} {
			type = alliance
			id = POL
			value = 125
		}
		EST = {
			add_opinion_modifier = {
				target = ROOT
				modifier = POL_the_baltic_alliance
			}
			add_ai_strategy = {
				type = befriend
				id = NOR
				value = 125
			} {
				type = alliance
				id = NOR
				value = 125
			}
		}
		LAT = {
			add_opinion_modifier = {
				target = ROOT
				modifier = POL_the_baltic_alliance
			}
			add_ai_strategy = {
				type = befriend
				id = NOR
				value = 125
			} {
				type = alliance
				id = NOR
				value = 125
			}
		}
		LIT = {
			add_opinion_modifier = {
				target = ROOT
				modifier = POL_the_baltic_alliance
			}
			add_ai_strategy = {
				type = befriend
				id = NOR
				value = 125
			} {
				type = alliance
				id = NOR
				value = 125
			}
		}
		POL = {
			add_opinion_modifier = {
				target = ROOT
				modifier = 
# ... (truncated)
### Entity: National Focus
Tree: hon_focus
Component: HON_invite_carlists
Constructs: prerequisite, completion_reward, has_global_flag, random_unit_leader, set_nationality
Source: game
File: common/national_focus/honduras.txt

Code:
focus = {
	id = HON_invite_carlists
	icon = GFX_goal_generic_major_alliance
	prerequisite = {
		focus = HON_continue_the_fight
	}
	x = 35
	y = 10
	cost = 5
	ai_will_do = {
		factor = 10
	}
	available = {
		has_global_flag = scw_over
		SPB = {
			exists = no
		}
	}
	completion_reward = {
		SPB = {
			random_unit_leader = {
				set_nationality = HON
			} {
				set_nationality = HON
			} {
				set_nationality = HON
			}
		}
	}
	search_filters = {
		FOCUS_FILTER_MANPOWER
	}
}
### Entity: National Focus
Tree: cze_focus
Component: CZE_exchange_military_expertise
Constructs: prerequisite, limit, has_government, has_war_with, completion_reward, set_technology, has_tech, has_power_balance
Source: game
File: common/national_focus/czechoslovakia_mu.txt

Code:
focus = {
	id = CZE_exchange_military_expertise
	icon = GFX_focus_generic_combined_arms
	cost = 10
	prerequisite = {
		focus = CZE_cooperation_with_the_ussr
	}
	relative_position_id = CZE_cooperation_with_the_ussr
	x = 0
	y = 1
	available = {
		SOV = {
			exists = yes
			has_government = communism
			NOT = {
				has_war_with = ROOT
			}
		}
	}
	completion_reward = {
		if = {
			limit = {
				NOT = {
					has_tech = engine_tech_1
				}
			}
			set_technology = {
				engine_tech_1 = 1
			}
		} {
			limit = {
				NOT = {
					has_tech = engine_tech_2
				}
			}
			set_technology = {
				engine_tech_2 = 1
			}
		} {
			limit = {
				has_power_balance = {
					id = CZE_bop_army_readiness
				}
			}
			custom_effect_tooltip = generic_skip_one_line_tt
			CZE_bop_low_increase_effect = yes
		}
		custom_effect_tooltip = generic_skip_one_line_tt generic_skip_one_line_tt
		add_doctrine_cost_reduction = {
			name = CZE_exchange_military_expertise
			cost_reduction = 0.5
			uses = 2
			category = land_doctrine
		}
		IF = {
			limit = {
				70 = {
					can_construct_building = land_facility
					is_fully_controlled_by = ROOT
					air_facility = < 1
					land_facility = < 1
					naval_facility = < 1
					nuclear_facility = < 1
				}
			}
			custom_effect_tooltip = {
				localization_key = CZE_facility_in_state_tt
				STATE = [70.GetName]
				FACILITY_TYPE = {
					localization_key = land_facility
				}
			}
			hidden_effect = {
				70 = {
					add_building_construction = {
						type = land_facility
						level = 1
						instant_build = yes
						province = 541
					}
				}
			}
		}
		else = {
			random_owned_controlled_state = {
				limit = {
					can_construct_building = land_facility
					air_facility = < 1
					land_facility = < 1
					naval_facility = < 1
					nuclear_facility = < 1
				}
				hidden_effect = {
					construct_building_in_random_province = {
						land_facility = 1
					}
				}
				custom_effect_tooltip = {
					localization_key = CZE_facility_in_state_tt
					STATE = [THIS.GetName]
					FACILITY_TYPE = {
						localization_key = land_facility
					}
				}
			}
		}
	}
	search_filters = {
		FOCUS_FILTER_RESEARCH FOCUS_FILTER_BALANCE_OF_POWER
	}
}
### Entity: National Focus
Tree: sia_focus
Component: SIA_fulfill_domestic_consumption_r56
Constructs: prerequisite, limit, completion_reward, random_owned_controlled_state, add_extra_state_shared_building_slots, add_dynamic_modifier
Source: game
File: common/national_focus/siam_r56.txt

Code:
focus = {
	id = SIA_fulfill_domestic_consumption_r56
	icon = GFX_goal_generic_civilian_production
	cost = 8
	x = 1
	y = 1
	relative_position_id = SIA_begin_the_national_industrial_plan_r56
	prerequisite = {
		focus = SIA_begin_the_national_industrial_plan_r56
	}
	ai_will_do = {
		base = 4
	}
	search_filters = {
		FOCUS_FILTER_INDUSTRY
	}
	completion_reward = {
		random_owned_controlled_state = {
			limit = {
				free_building_slots = {
					building = industrial_complex
					size = > 2
					include_locked = yes
				}
			}
			prioritize = {
				1134
			}
			add_extra_state_shared_building_slots = 3
			add_dynamic_modifier = {
				modifier = SIA_local_industrial_boom_r56
			}
		}
	}
}
### Entity: Scripted Effect
Component: r56_ger_nraf_35
Constructs: limit, has_active_mission, add_days_mission_timeout
Source: game
File: common/scripted_effects/r56_GER_scripted_effects.txt

Code:
r56_ger_nraf_35 = {
	IF = {
		limit = {
			has_active_mission = GER_nraf_demands_action
		}
		add_days_mission_timeout = {
			mission = GER_nraf_demands_action
			days = 150
		}
	}
}
### Entity: National Focus
Tree: por_focus
Component: POR_nation_in_arms
Constructs: prerequisite, add_ideas, add_war_support, completion_reward, add_popularity
Source: game
File: common/national_focus/portugal.txt

Code:
focus = {
	id = POR_nation_in_arms
	available = {

	}
	bypass = {

	}
	prerequisite = {
		focus = POR_popular_front
	}
	icon = GFX_focus_generic_attack_portugal
	x = -5
	y = 1
	relative_position_id = POR_popular_front
	cost = 10
	search_filters = {
		FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_MANPOWER
	}
	completion_reward = {
		add_popularity = {
			ideology = communism
			popularity = 0.1
		}
		add_war_support = 0.1
		add_ideas = POR_nation_in_arms
	}
}
### Entity: Scripted Effect
Component: BUL_zveno_low_loyalty_decrease_effect
Constructs: add_to_variable
Source: game
File: common/scripted_effects/BUL_scripted_effects.txt

Code:
BUL_zveno_low_loyalty_decrease_effect = {
	custom_effect_tooltip = BUL_zveno_tt BUL_low_loyalty_decrease_tt
	add_to_variable = {
		BUL_zveno_loyalty = BUL_faction_low_decrease
	}
	clamp_variable = {
		var = BUL_zveno_loyalty
		min = 0
		max = 100
	}
}
### Entity: Idea
Component: idea_RAJ_permit_opium_trade
Constructs: stability_factor, removal_cost
Source: game
File: common/ideas/british_raj_goe.txt

Code:
idea_RAJ_permit_opium_trade = {
	picture = prc_permit_opium_trade
	allowed = {
		original_tag = RAJ
	}
	removal_cost = -1
	modifier = {
		consumer_goods_factor = -0.25
		stability_factor = -0.2
	}
}
### Entity: National Focus
Tree: ast_focus
Component: AST_domestic_industry
Constructs: prerequisite, limit, completion_reward, random_owned_controlled_state, add_extra_state_shared_building_slots, add_building_construction
Source: game
File: common/national_focus/australia_taog.txt

Code:
focus = {
	id = AST_domestic_industry
	icon = GFX_focus_generic_modernize_industry
	prerequisite = {
		focus = AST_war_is_coming
	}
	relative_position_id = AST_war_is_coming
	x = -3
	y = 1
	cost = 5
	available = {

	}
	bypass = {

	}
	available_if_capitulated = no
	completion_reward = {
		random_owned_controlled_state = {
			limit = {
				impassable = no
				free_building_slots = {
					building = industrial_complex
					size = > 1
					include_locked = yes
				}
			}
			prioritize = {
				521
			}
			add_extra_state_shared_building_slots = 2
			add_building_construction = {
				type = industrial_complex
				level = 1
				instant_build = yes
			}
		} {
			limit = {
				impassable = no
				free_building_slots = {
					building = industrial_complex
					size = > 1
					include_locked = yes
				}
			}
			prioritize = {
				285
			}
			add_extra_state_shared_building_slots = 2
			add_building_construction = {
				type = industrial_complex
				level = 1
				instant_build = yes
			}
		}
	}
	search_filters = {
		FOCUS_FILTER_INDUSTRY
	}
}
### Entity: Idea
Component: ENG_dominion_fascist_propaganda
Constructs: fascism_drift, removal_cost
Source: game
File: common/ideas/britain.txt

Code:
ENG_dominion_fascist_propaganda = {
	allowed = {
		always = no
	}
	allowed_civil_war = {
		always = yes
	}
	modifier = {
		fascism_drift = 0.3
	}
	picture = ast_abandon_the_westminster_system_fascism
	removal_cost = -1
}
### Entity: National Focus
Tree: pru_focus
Component: PRU_give_arms_to_the_people
Constructs: has_completed_focus, prerequisite, limit, completion_reward, swap_ideas, remove_idea, add_idea
Source: game
File: common/national_focus/peru.txt

Code:
focus = {
	id = PRU_give_arms_to_the_people
	prerequisite = {
		focus = PRU_sons_of_the_conquistador PRU_defend_our_empire
	}
	icon = GFX_goal_PRU_brigadas_de_cristo
	relative_position_id = PRU_look_to_the_past
	x = -4
	y = 10
	cost = 5
	ai_will_do = {
		factor = 10
	}
	completion_reward = {
		if = {
			limit = {
				has_completed_focus = PRU_invite_carlos PRU_sons_of_the_conquistador
			}
			swap_ideas = {
				remove_idea = PRU_royal_army_3
				add_idea = PRU_royal_army_4
			}
		} {
			limit = {
				has_completed_focus = PRU_invite_carlos PRU_defend_our_empire
			}
			swap_ideas = {
				remove_idea = PRU_royal_army_3_d
				add_idea = PRU_royal_army_4_d
			}
		} {
			limit = {
				has_completed_focus = PRU_appoint_a_peruvian_monarch PRU_sons_of_the_conquistador
			}
			swap_ideas = {
				remove_idea = PRU_imperial_army_3
				add_idea = PRU_imperial_army_4
			}
		} {
			limit = {
				has_completed_focus = PRU_appoint_a_peruvian_monarch PRU_defend_our_empire
			}
			swap_ideas = {
				remove_idea = PRU_imperial_army_3_d
				add_idea = PRU_imperial_army_4_d
			}
		}
		army_experience = 20
		PRU_increase_army_10_percent = yes
	}
	search_filters = {
		FOCUS_FILTER_MANPOWER
	}
}
### Entity: Event
Component: south_american_events.14
Constructs: ai_chance, has_completed_focus, limit, add_ideas, has_government, has_country_flag, add_stability, fire_only_once
Source: game
File: events/TOA_Generic_Events.txt

Code:
country_event = {
	id = south_american_events.14
	title = south_american_events.14.t
	desc = south_american_events.14.d
	picture = GFX_report_event_election_vote
	trigger = {
		original_tag = CHL
		date = > 1938.10.20
		has_government = democratic
		NOT = {
			OR = {
				has_completed_focus = CHL_denounce_the_anarchy CHL_look_to_tradition
				has_country_flag = CHL_1939_flag
			}
		} {
			has_country_flag = CHL_demanded_snap_election_flag
		}
		has_dlc = Trial of Allegiance
	}
	mean_time_to_happen = {
		days = 2
	}
	hidden = no
	fire_only_once = yes
	option = {
		name = south_american_events.14.a
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_country_flag = CHL_AI_RANDOM_COMMUNIST
					has_game_rule = {
						rule = CHL_ai_behavior
						option = COMMUNIST
					}
				}
			}
		}
		IF = {
			limit = {
				NOT = {
					has_completed_focus = CHL_endorse_the_constitution
				}
			}
			complete_national_focus = CHL_endorse_the_constitution
		}
		hidden_effect = {
			IF = {
				limit = {
					NOT = {
						has_completed_focus = CHL_policies_of_arturo_alessandri
					}
				}
				unlock_national_focus = CHL_policies_of_arturo_alessandri
			} {
				limit = {
					NOT = {
						has_completed_focus = CHL_inflation_control_by_the_central_bank
					}
				}
				unlock_national_focus = CHL_inflation_control_by_the_central_bank
			}
		} {
			set_party_name = {
				ideology = democratic
				name = CHL_frente_popular_party
				long_name = CHL_frente_popular_party_long
			}
		}
		complete_national_focus = CHL_1938_chilean_presidential_election
		custom_effect_tooltip = CHL_skip_one_line_tt left_wing_tt
		add_ideas = CHL_popular_front_in_power
		add_country_leader_role = {
			character = CHL_pedro_aguirre_cerda
			promote_leader = yes
			country_leader = {
				ideology = socialism
				expire = 1965.1.1.1
				traits = {
					JUNO_gobernar_es_educar
				}
			}
		}
		retire_character = CHL_arturo_alessandri
		country_event = {
			id = CHL_political_events.18
			days = 1
			random_days = 3
		}
	} {
		name = south_american_events.14.b
		ai_chance = {
			base = 0
			modifier = {
				add = 100
				is_historical_focus_on = no
			}
		}
		IF = {
			limit = {
				NOT = {
					has_completed_focus = CHL_endorse_the_constitution
				}
			}
			complete_national_focus = CHL_endorse_the_constitution
		} {
			limit = {
				has_completed_focus = CHL_prop_up_gustav
# ... (truncated)
### Entity: Event
Component: chile.13
Constructs: is_triggered_only
Source: game
File: events/Chile.txt

Code:
country_event = {
	id = chile.13
	title = Offer turned down
	desc = Perhaps our diplomacy should take a more bitter tone.
	picture = GFX_CZKE_karel_palecek_report
	is_triggered_only = yes
	option = {
		name = We shall see what becomes of this.
	}
}
### Entity: Scripted Trigger
Component: BUL_is_democratic_socialist_ai
Constructs: has_country_flag, has_game_rule
Source: game
File: common/scripted_triggers/BUL_scripted_triggers.txt

Code:
BUL_is_democratic_socialist_ai = {
	OR = {
		has_country_flag = BUL_AI_RANDOM_DEMOCRATIC_SOCIALIST
		has_game_rule = {
			rule = BUL_ai_behavior
			option = DEMOCRATIC_SOCIALIST
		}
	}
}
### Entity: Event
Component: new_ger.104
Constructs: is_triggered_only, ai_chance, limit, add_political_power, create_wargoal, take_state_focus, clr_country_flag, every_state
Source: game
File: events/r56_Germany.txt

Code:
country_event = {
	id = new_ger.104
	title = new_ger.104.t
	desc = new_ger.104.d
	picture = GFX_report_event_german_troops
	is_triggered_only = yes
	option = {
		name = new_ger.104.a
		FROM = {
			create_wargoal = {
				target = ROOT
				type = take_state_focus
			}
			clr_country_flag = GER_colony_active
		} {
			country_event = CHI_warlords.19
		}
	} {
		name = new_ger.104.b
		ai_chance = {
			base = 0
			modifier = {
				add = 10000
				surrender_progress = > 0.1
			}
		}
		FROM = {
			clr_country_flag = GER_colony_active
		} {
			country_event = CHI_warlords.20
		}
		every_state = {
			limit = {
				OR = {
					state = 773 777 546 768 769 895 894 541 893 743 647 1096 737 1138 684 633 634 646 726 725
				} {
					is_controlled_by = ROOT
					controller = {
						is_subject_of = ROOT
					}
				}
			}
			transfer_state_to = FROM
		}
		add_political_power = -50
	}
}
### Entity: Character
Component: BRN_ahmad_tajuddin_trait
Source: game
File: common/country_leader/r56_traits.txt

Code:
BRN_ahmad_tajuddin_trait = {
	random = no
	political_power_factor = 0.15
	fascism_acceptance = 15
	neutrality_acceptance = 15
	consumer_goods_factor = 0.08
}
### Entity: National Focus
Tree: sia_focus
Component: SIA_push_for_universal_education_r56
Constructs: prerequisite, completion_reward, add_research_slot
Source: game
File: common/national_focus/siam_r56.txt

Code:
focus = {
	id = SIA_push_for_universal_education_r56
	prerequisite = {
		focus = SIA_siamese_national_banking_bureau_r56
	}
	icon = GFX_focus_research2
	cost = 10
	ai_will_do = {
		base = 1
	}
	x = 0
	y = 1
	relative_position_id = SIA_siamese_national_banking_bureau_r56
	search_filters = {
		FOCUS_FILTER_STABILITY FOCUS_FILTER_RESEARCH
	}
	completion_reward = {
		SIA_improve_illiteracy_r56 = yes
		add_research_slot = 1
	}
}
### Entity: National Focus
Tree: sia_focus
Component: SIA_achieve_foreign_legitimacy
Constructs: prerequisite, limit, add_stability, completion_reward, has_opinion, complete_tooltip, has_variable, random_core_state
Source: game
File: common/national_focus/siam.txt

Code:
focus = {
	id = SIA_achieve_foreign_legitimacy
	icon = GFX_focus_AFG_telegraph
	x = 1
	y = 2
	relative_position_id = SIA_end_military_grift
	prerequisite = {
		focus = SIA_end_military_grift SIA_rebuild_the_war_torn_economy
	}
	cost = 10
	ai_will_do = {
		factor = 50
	}
	available = {
		custom_trigger_tooltip = {
			tooltip = SIA_achieve_foreign_legitimacy_trigger
			any_of_scopes = {
				array = global.majors
				has_opinion = {
					target = ROOT
					value = > 75
				}
			}
		}
	}
	search_filters = {
		FOCUS_FILTER_INDUSTRY FOCUS_FILTER_STABILITY
	}
	complete_tooltip = {
		add_stability = var:SIA_countries_that_like_me_stab
		if = {
			limit = {
				has_variable = SIA_achieve_foreign_legitimacy_state
			}
			var:SIA_achieve_foreign_legitimacy_state = {
				random_core_state = {
					limit = {
						is_controlled_by = ROOT
					}
					add_extra_state_shared_building_slots = 2
					add_building_construction = {
						type = industrial_complex
						level = 2
						instant_build = yes
					}
				}
			}
		}
		custom_effect_tooltip = SIA_countries_that_like_me_doctrine_tt
	}
	completion_reward = {
		custom_effect_tooltip = SIA_achieve_foreign_legitimacy_tt
		hidden_effect = {
			set_variable = {
				SIA_countries_that_like_me = 0
			} {
				SIA_countries_that_like_me_stab = SIA_countries_that_like_me
			}
			for_each_scope_loop = {
				array = global.majors
				if = {
					limit = {
						has_opinion = {
							target = ROOT
							value = > 75
						}
					}
					add_to_variable = {
						ROOT.SIA_countries_that_like_me = 1
					}
				}
			}
			multiply_variable = {
				SIA_countries_that_like_me_stab = var:SIA_achieve_foreign_legitimacy_base_stab_gain
			}
			add_stability = var:SIA_countries_that_like_me_stab
			if = {
				limit = {
					check_variable = {
						SIA_countries_that_like_me = > 5
					}
				}
				random_core_state = {
					limit = {
						is_controlled_by = ROOT
					}
					set_variable = {
						SIA_achieve_foreign_legitimacy_state = THIS
					}
					add_extra_state_shared_building_slots = 2
					add_building_construction = {
						type = industrial_complex
						level = 2
						instant_build = yes
					}
				}
			} {
				limit = {
					check_variable = {
						SIA_countries_that_like_me = > 3
					}
				}
				subtract_from_variable = {
					SIA_countries_that_like_me = 3
				}
				for_loop_effect = {
					start = 0
					end = var:SIA_countr
# ... (truncated)