Losa10/PreTrain-HOI4-Modding-Assistant huggingface dataset:
### Entity: National Focus
Component: armenian_focus
Constructs: shared_focus, division_template, add_equipment_to_stockpile, prerequisite, limit, add_ideas, remove_ideas, has_government
Source: game
File: common/national_focus/armenia.txt

Code:
focus_tree = {
	id = armenian_focus
	country = {
		factor = 0
		modifier = {
			add = 30
			tag = ARM
		}
	}
	default = no
	shared_focus = ABC_establish_a_general_staff GEN_Aviation_Effort GEN_Naval_Effort CAU_caucasus_unification
	continuous_focus_position = {
		x = 15
		y = 900
	}
	focus = {
		id = ARM_improve_construction_methods
		icon = GFX_focus_generic_industry_2
		x = 38
		y = 0
		cost = 5
		ai_will_do = {
			factor = 10
		}
		available = {
			controls_state = 230
		}
		completion_reward = {
			add_stability = 0.05
			random_owned_controlled_state = {
				prioritize = {
					230
				}
				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
				}
			}
		}
		search_filters = {
			FOCUS_FILTER_RESEARCH
		}
	} {
		id = ARM_start_the_rare_minerals_program
		icon = GFX_goal_excavation
		prerequisite = {
			focus = ARM_improve_construction_methods
		}
		relative_position_id = ARM_improve_construction_methods
		x = 3
		y = 1
		cost = 5
		ai_will_do = {
			factor = 10
		}
		available = {
			controls_state = 230
		}
		completion_reward = {
			random_owned_controlled_state = {
				prioritize = {
					230
				}
				add_extra_state_shared_building_slots = 1
			}
			add_tech_bonus = {
				name = excavation_tech_bonus_name
				bonus = 0.5
				ahead_reduction = 0.5
				uses = 1
				category = excavation_tech
			}
		}
		search_filters = {
			FOCUS_FILTER_INDUSTRY
		}
	} {
		id = ARM_plan_the_kajaran_mine
		icon = GFX_focus_generic_steel
		prerequisite = {
			focus = ARM_start_the_rare_minerals_program
		}
		relative_position_id = ARM_start_the_rare_minerals_program
		x = -1
		y = 1
		cost = 10
		ai_will_do = {
			factor = 4
		}
		available = {
			controls_state = 230
			has_tech = excavation2
		}
		completion_reward = {
			random_owned_controlled_state = {
				prioritize = {
					230
				}
				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_resource = {
				type = steel
				amount = 6
				sta
# ... (truncated)
### Entity: Idea
Component: fratelli_nardi
Constructs: research_bonus
Source: game
File: common/ideas/r56_italy.txt

Code:
fratelli_nardi = {
	allowed = {
		original_tag = ITA
	}
	research_bonus = {
		air_equipment = 0.15
	}
	traits = {
		fighter_producer_mass_1
	}
	ai_will_do = {
		factor = 1
	}
}
### Entity: Decision
Component: debug_decisions
Constructs: has_country_flag, is_debug, is_ai
Source: game
File: common/decisions/categories/00_decision_categories.txt

Code:
debug_decisions = {
	icon = generic_research
	visible = {
		is_debug = yes
		is_ai = no
		OR = {
			AND = {
				has_country_flag = NOR_vanilla_debug_tack
				tag = NOR
			}
			NOT = {
				tag = NOR
			}
		}
	}
}
### Entity: National Focus
Tree: raj_focus
Component: RAJ_royal_indian_air_force
Constructs: has_completed_focus, prerequisite, completion_reward, cancel_if_invalid, add_breakthrough_progress, add_doctrine_cost_reduction
Source: game
File: common/national_focus/india.txt

Code:
focus = {
	id = RAJ_royal_indian_air_force
	icon = GFX_goal_generic_air_doctrine
	prerequisite = {
		focus = RAJ_air_support_effort RAJ_fighter_effort
	}
	x = 0
	y = 3
	relative_position_id = RAJ_british_pilot_training
	cost = 10
	ai_will_do = {
		factor = 25
		modifier = {
			factor = 3
			OR = {
				has_completed_focus = RAJ_institute_of_fundamental_research RAJ_indian_institute_of_science
			}
		}
	}
	available = {

	}
	bypass = {

	}
	cancel_if_invalid = yes
	continue_if_invalid = no
	available_if_capitulated = no
	search_filters = {
		FOCUS_FILTER_RESEARCH
	}
	completion_reward = {
		air_experience = 25
		add_breakthrough_progress = {
			specialization = specialization_air
			value = 0.25
		}
		add_doctrine_cost_reduction = {
			name = RAJ_royal_indian_air_force
			cost_reduction = 0.5
			uses = 1
			category = air_doctrine
		}
	}
}
### Entity: National Focus
Tree: sov_focus
Component: SOV_keep_commissars_organization
Constructs: has_completed_focus, prerequisite, limit, has_government, completion_reward, allow_branch, has_idea, swap_ideas
Source: game
File: common/national_focus/soviet.txt

Code:
focus = {
	id = SOV_keep_commissars_organization
	icon = GFX_SOV_keep_commissars_organization_ccp_2d_sov_compatibility
	prerequisite = {
		focus = SOV_military_reorganization
	} {
		focus = SOV_lessons_of_war
	}
	x = 1
	y = 1
	relative_position_id = SOV_military_reorganization
	cost = 10
	mutually_exclusive = {
		focus = SOV_swap_to_political_advisors
	}
	allow_branch = {
		NOT = {
			has_government = fascism neutrality
		}
	}
	available = {

	}
	bypass = {
		has_completed_focus = SOV_depoliticize_the_military
	}
	search_filters = {

	}
	completion_reward = {
		if = {
			limit = {
				has_idea = SOV_politicized_military
			}
			swap_ideas = {
				remove_idea = SOV_politicized_military
				add_idea = SOV_politicized_military_keep
			}
		}
		else_if = {
			limit = {
				has_idea = SOV_politicized_military_humanism
			}
			swap_ideas = {
				remove_idea = SOV_politicized_military_humanism
				add_idea = SOV_politicized_military_keep_humanism
			}
		}
	}
}
### Entity: Idea
Component: SIA_natl_banking_bureau_r56
Constructs: has_completed_focus, production_speed_buildings_factor, has_global_flag, research_bonus
Source: game
File: common/ideas/siam_r56.txt

Code:
SIA_natl_banking_bureau_r56 = {
	cost = 75
	picture = EST_exploit_the_banks
	allowed = {
		original_tag = SIA
	}
	visible = {
		NOT = {
			has_global_flag = sia_dlc_focus_tree
			has_completed_focus = SIA_songsuradets_ascendency_r56
		}
	}
	available = {
		has_completed_focus = SIA_siamese_national_banking_bureau_r56
	}
	research_bonus = {
		industry = 0.08
	}
	traits = {
		industrial_concern
	}
	modifier = {
		consumer_goods_factor = -0.08
		production_speed_buildings_factor = 0.12
	}
}
### Entity: Scripted Effect
Component: SWE_is_finland_mostly_occupied
Constructs: limit, has_country_flag, set_temp_variable, add_to_temp_variable, check_variable
Source: game
File: common/scripted_effects/SWE_scripted_effects.txt

Code:
SWE_is_finland_mostly_occupied = {
	if = {
		limit = {
			FIN = {
				NOT = {
					has_country_flag = SWE_already_capped_once
				}
			}
		}
		set_temp_variable = {
			occupation_counter = 0
		}
		if = {
			limit = {
				148 = {
					SWE_the_cross_we_bear_am_i_occupied_by_fascists_or_communists = yes
				}
			}
			add_to_temp_variable = {
				occupation_counter = 1
			}
		} {
			limit = {
				722 = {
					SWE_the_cross_we_bear_am_i_occupied_by_fascists_or_communists = yes
				}
			}
			add_to_temp_variable = {
				occupation_counter = 1
			}
		} {
			limit = {
				929 = {
					SWE_the_cross_we_bear_am_i_occupied_by_fascists_or_communists = yes
				}
			}
			add_to_temp_variable = {
				occupation_counter = 1
			}
		} {
			limit = {
				150 = {
					SWE_the_cross_we_bear_am_i_occupied_by_fascists_or_communists = yes
				}
			}
			add_to_temp_variable = {
				occupation_counter = 1
			}
		} {
			limit = {
				149 = {
					SWE_the_cross_we_bear_am_i_occupied_by_fascists_or_communists = yes
				}
			}
			add_to_temp_variable = {
				occupation_counter = 1
			}
		} {
			limit = {
				926 = {
					SWE_the_cross_we_bear_am_i_occupied_by_fascists_or_communists = yes
				}
			}
			add_to_temp_variable = {
				occupation_counter = 1
			}
		} {
			limit = {
				927 = {
					SWE_the_cross_we_bear_am_i_occupied_by_fascists_or_communists = yes
				}
			}
			add_to_temp_variable = {
				occupation_counter = 1
			}
		} {
			limit = {
				930 = {
					SWE_the_cross_we_bear_am_i_occupied_by_fascists_or_communists = yes
				}
			}
			add_to_temp_variable = {
				occupation_counter = 1
			}
		} {
			limit = {
				928 = {
					SWE_the_cross_we_bear_am_i_occupied_by_fascists_or_communists = yes
				}
			}
			add_to_temp_variable = {
				occupation_counter = 1
			}
		} {
			limit = {
				111 = {
					SWE_the_cross_we_bear_am_i_occupied_by_fascists_or_communists = yes
				}
			}
			add_to_temp_variable = {
				occupation_counter = 1
			}
		} {
			limit = {
				check_variable = {
					occupation_counter = > 2
				}
			}
			FIN = {
				SWE_increase_the_cross_we_bear = yes
			}
		}
	}
}
### Entity: Character
Component: THU_erwin_baum
Source: game
File: common/characters/THU.txt

Code:
THU_erwin_baum = {
	name = THU_erwin_baum
	portraits = {
		civilian = {
			large = GFX_portrait_THU_erwin_baum
		}
	}
	country_leader = {
		ideology = conservatism
		traits = {

		}
		expire = 1960.1.1.1
		id = -1
	}
}
### Entity: Scripted Effect
Component: GER_monarchist_bop_very_low_increase_effect
Constructs: add_power_balance_value
Source: game
File: common/scripted_effects/r56_GER_scripted_effects.txt

Code:
GER_monarchist_bop_very_low_increase_effect = {
	add_power_balance_value = {
		id = GER_monarchist_power_balance
		value = 0.05
	}
}
### Entity: Shared Focus
Component: BALTIC_arm_the_nation
Constructs: shared_focus, prerequisite, limit, completion_reward, cancel_if_invalid, random_owned_controlled_state, is_core_of, add_extra_state_shared_building_slots
Source: game
File: common/national_focus/baltic_shared.txt

Code:
shared_focus = {
	id = BALTIC_arm_the_nation
	icon = GFX_goal_generic_construct_mil_factory
	prerequisite = {
		focus = BALTIC_rebuild_forts
	}
	x = 0
	y = 1
	relative_position_id = BALTIC_rebuild_forts
	cost = 10
	ai_will_do = {
		factor = 1
	}
	available = {

	}
	bypass = {

	}
	cancel_if_invalid = yes
	continue_if_invalid = no
	available_if_capitulated = no
	search_filters = {
		FOCUS_FILTER_INDUSTRY
	}
	completion_reward = {
		random_owned_controlled_state = {
			limit = {
				is_core_of = ROOT
			}
			prioritize = {
				11 12 13
			}
			add_extra_state_shared_building_slots = 1
			add_building_construction = {
				type = arms_factory
				level = 1
				instant_build = yes
			}
		} {
			limit = {
				is_core_of = ROOT
			}
			prioritize = {
				814 808 811
			}
			add_extra_state_shared_building_slots = 1
			add_building_construction = {
				type = arms_factory
				level = 1
				instant_build = yes
			}
		} {
			limit = {
				is_core_of = ROOT
			}
			prioritize = {
				188 810 813
			}
			add_extra_state_shared_building_slots = 1
			add_building_construction = {
				type = arms_factory
				level = 1
				instant_build = yes
			}
		}
	}
}
### Entity: Event
Component: JUNO_brazil_events.10
Constructs: is_triggered_only, ai_chance, add_popularity, clr_country_flag
Source: game
File: events/TOA_Brazil.txt

Code:
country_event = {
	id = JUNO_brazil_events.10
	title = JUNO_brazil_events.10.t
	desc = JUNO_brazil_events.10.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.10.a
		ai_chance = {
			base = 10
		}
		add_popularity = {
			ideology = fascism
			popularity = 0.01
		}
		clr_country_flag = BRA_gaining_support_in_progress
	}
}
### Entity: Event
Component: news.138
Constructs: has_war_with, is_controlled_by, is_owned_by, has_global_flag, set_global_flag
Source: game
File: events/NewsEvents.txt

Code:
news_event = {
	id = news.138
	title = news.100.t
	desc = news.138.d
	picture = GFX_news_event_067
	major = yes
	trigger = {
		10 = {
			is_controlled_by = SOV
		} {
			is_owned_by = POL
		}
		SOV = {
			has_war_with = POL
		}
		NOT = {
			has_global_flag = fall_of_warsaw_sov
		}
	}
	immediate = {
		set_global_flag = fall_of_warsaw_sov
	}
	mean_time_to_happen = {
		days = 2
	}
	option = {
		name = news.100.a
		trigger = {
			NOT = {
				TAG = SOV POL
			}
		}
	} {
		name = news.138.b
		trigger = {
			TAG = SOV
		}
	} {
		name = news.100.c
		trigger = {
			TAG = POL
		}
	}
}
### Entity: Unit Leader
Component: infantry_expert
Constructs: gain_xp
Source: game
File: common/unit_leader/00_traits.txt

Code:
infantry_expert = {
	type = corps_commander
	gain_xp = {
		always = no
	}
	cost = 500
	modifier = {
		army_infantry_attack_factor = 0.1
	}
	ai_will_do = {
		factor = 1
	}
	mutually_exclusive = ambusher
	trait_type = assignable_trait
	any_parent = {
		infantry_leader
	}
	gui_row = 6
}
### Entity: Country History
Country: LEB
Component: LEB_technology
Constructs: set_technology
Source: game
File: history/countries/LEB - Lebanon.txt

Code:
# Starting Technologies for LEB
set_technology = {
	infantry_weapons = 1
	tech_trucks = 1
}
### Entity: Event
Component: sweden_nap.11
Constructs: is_triggered_only, add_ai_strategy
Source: game
File: events/SWE_sweden.txt

Code:
country_event = {
	id = sweden_nap.11
	title = sweden_nap.11.t
	desc = sweden_nap.11.d
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes
	option = {
		name = excellent
		diplomatic_relation = {
			country = FROM
			relation = non_aggression_pact
			active = yes
		} {
			country = FROM
			relation = guarantee
			active = yes
		}
		FROM = {
			diplomatic_relation = {
				country = SWE
				relation = guarantee
				active = yes
			}
		}
		hidden_effect = {
			FROM = {
				add_ai_strategy = {
					type = antagonize
					id = ROOT
					value = -100
				}
			}
			add_ai_strategy = {
				type = antagonize
				id = FROM
				value = -100
			}
		}
	}
}
### Entity: AI Strategy
Component: r56_TIB_stop_china_from_falling_CHI_side
Constructs: has_war, has_government, has_war_with, is_in_faction_with, has_capitulated
Source: game
File: common/ai_strategy/r56_TIB.txt

Code:
r56_TIB_stop_china_from_falling_CHI_side = {
	allowed = {
		original_tag = CHI
	}
	enable = {
		has_war = no
		ROOT = {
			NOT = {
				has_government = fascism
			} {
				is_in_faction_with = JAP
			} {
				has_war_with = TIB
			}
		}
		JAP = {
			has_war_with = CHI
			has_government = fascism
		}
		CHI = {
			surrender_progress = > 0.1
			has_capitulated = no
		}
	}
	abort_when_not_enabled = yes
	ai_strategy = {
		type = ignore_claim
		id = TIB
		value = 1
	} {
		type = befriend
		id = TIB
		value = 10
	}
}
### Entity: National Focus
Tree: ven_focus
Component: VEN_logistical_brigades
Constructs: prerequisite, completion_reward, add_tech_bonus
Source: game
File: common/national_focus/venezuela.txt

Code:
focus = {
	id = VEN_logistical_brigades
	icon = GFX_goal_ammunitions
	relative_position_id = VEN_modernize_our_weaponry
	x = -1
	y = 2
	cost = 10
	prerequisite = {
		focus = VEN_modernize_our_weaponry
	}
	search_filters = {
		FOCUS_FILTER_RESEARCH
	}
	ai_will_do = {
		factor = 10
	}
	completion_reward = {
		add_tech_bonus = {
			name = VEN_logistical_brigades
			bonus = 1
			uses = 2
			category = logistics_tech hospital_tech
		}
	}
}
### Entity: National Focus
Tree: chi_focus
Component: CHI_conserve_our_pilots
Constructs: prerequisite, completion_reward, cancel_if_invalid, complete_tooltip, add_to_variable
Source: game
File: common/national_focus/china_nationalist_sea.txt

Code:
focus = {
	id = CHI_conserve_our_pilots
	icon = GFX_focus_generic_pilot_training
	prerequisite = {
		focus = CHI_formalise_training_regime
	} {
		focus = CHI_controlling_our_skies
	}
	x = 0
	y = 1
	relative_position_id = CHI_formalise_training_regime
	cost = 10
	ai_will_do = {
		factor = 4
	} {
		factor = 10
	}
	available = {

	}
	bypass = {

	}
	cancel_if_invalid = yes
	continue_if_invalid = no
	available_if_capitulated = no
	complete_tooltip = {

	}
	search_filters = {

	}
	completion_reward = {
		custom_effect_tooltip = CHI_modify_ROCAF_tt
		add_to_variable = {
			CHI_ROCAF_air_accidents_factor = -0.1
			tooltip = naval_accidents_chance_tt
		} {
			CHI_ROCAF_air_wing_xp_loss_when_killed_factor = -0.2
			tooltip = air_wing_xp_loss_when_killed_factor_tt
		}
	}
}
### Entity: Event
Component: r56_iraq.17
Constructs: is_triggered_only, ai_chance
Source: game
File: events/r56_iraq.txt

Code:
country_event = {
	id = r56_iraq.17
	title = r56_iraq.17.t
	desc = r56_iraq.17.d
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = r56_iraq.17.a
		ai_chance = {
			base = 75
		}
		IRQ = {
			country_event = {
				id = r56_iraq.19
			}
		}
	} {
		name = r56_iraq.17.b
		ai_chance = {
			base = 25
		}
		IRQ = {
			country_event = {
				id = r56_iraq.18
			}
		}
	}
}
### Entity: National Focus
Tree: por_focus
Component: POR_government_of_national_consensus
Constructs: prerequisite, add_ideas, completion_reward, has_idea
Source: game
File: common/national_focus/r56_portugal.txt

Code:
focus = {
	id = POR_government_of_national_consensus
	prerequisite = {
		focus = POR_modernize_our_security_apparatus
	} {
		focus = POR_strengthen_the_portuguese_youth
	}
	icon = GFX_goal_fatima
	cost = 5
	ai_will_do = {
		base = 99
	}
	x = 1
	y = 1
	relative_position_id = POR_modernize_our_security_apparatus
	available = {
		custom_trigger_tooltip = {
			tooltip = POR_does_not_have_national_spirit_disgruntled_republicans_tt
			NOT = {
				has_idea = POR_disgruntled_republicans POR_disgruntled_republicans2 POR_disgruntled_republicans3
			}
		}
	}
	available_if_capitulated = yes
	completion_reward = {
		add_ideas = POR_government_of_national_consensus_idea
	}
	search_filters = {
		FOCUS_FILTER_POLITICAL
	}
}
### Entity: Event
Component: bftb_greece.22
Constructs: limit, has_country_flag, fire_only_once, check_variable, set_country_flag, clr_country_flag, clear_variable, give_guarantee
Source: game
File: events/BFTB_Greece.txt

Code:
country_event = {
	id = bftb_greece.22
	title = bftb_greece.22.t
	desc = bftb_greece.22.desc
	picture = GFX_report_event_gre_diplomacy
	fire_only_once = yes
	trigger = {
		original_tag = GRE
		has_country_flag = GRE_deciding_on_antalya
		check_variable = {
			var = global.convention_ayes
			value = 2
			compare = greater_than_or_equals
		}
	}
	mean_time_to_happen = {
		days = 7
	}
	immediate = {
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = GRE_britain_attending_convention
					NOT = {
						has_country_flag = GRE_france_attending_convention
					}
				}
				country_event = {
					id = bftb_greece.24
					days = 14
				}
				ENG = {
					country_event = {
						id = bftb_greece.225
						days = 7
					}
				}
				ITA = {
					country_event = {
						id = bftb_greece.225
						days = 7
					}
				}
			}
			else_if = {
				limit = {
					has_country_flag = GRE_france_attending_convention
					NOT = {
						has_country_flag = GRE_britain_attending_convention
					}
				}
				country_event = {
					id = bftb_greece.24
					days = 14
				}
				FRA = {
					country_event = {
						id = bftb_greece.225
						days = 7
					}
				}
				ITA = {
					country_event = {
						id = bftb_greece.225
						days = 7
					}
				}
			}
			else = {
				country_event = {
					id = bftb_greece.24
					days = 14
				}
				ENG = {
					country_event = {
						id = bftb_greece.225
						days = 7
					}
				}
				FRA = {
					country_event = {
						id = bftb_greece.225
						days = 7
					}
				}
				ITA = {
					country_event = {
						id = bftb_greece.225
						days = 7
					}
				}
			}
		}
	}
	option = {
		name = bftb_greece.22.a
		hidden_effect = {
			set_country_flag = GRE_italian_antalya
			clr_country_flag = GRE_deciding_on_antalya
			clear_variable = global.convention_ayes global.convention_nays
			hidden_effect = {
				ITA = {
					give_guarantee = GRE
					diplomatic_relation = {
						country = GRE
						relation = non_aggression_pact
						active = yes
					}
				}
			}
		}
	}
}
### Entity: Idea
Component: EAI_DD_19/heavy_tank_destroyer_chassis_bonus
Constructs: equipment_bonus, build_cost_ic
Source: game
File: common/ideas/EAI_difficulty_ideas.txt

Code:
EAI_DD_19/heavy_tank_destroyer_chassis_bonus = {
	allowed = {
		always = no
	}
	equipment_bonus = {
		heavy_tank_destroyer_chassis = {
			build_cost_ic = -0.475
			instant = yes
		}
	}
}
### Entity: Character
Component: NZL_bernard_freyberg
Source: game
File: common/characters/NZL.txt

Code:
NZL_bernard_freyberg = {
	name = NZL_bernard_freyberg
	portraits = {
		army = {
			large = GFX_NZL_bernard_freyberg
			small = GFX_portrait_NZL_bernard_freyberg_small
		}
	}
	corps_commander = {
		skill = 4
		attack_skill = 2
		defense_skill = 4
		planning_skill = 4
		logistics_skill = 3
		legacy_id = -1
	}
}
### Entity: Shared Focus
Tree: raj_focus
Component: RAJ_diversify_the_fleet_r56
Constructs: shared_focus, prerequisite, completion_reward, set_technology
Source: game
File: common/national_focus/r56_india_shared.txt

Code:
shared_focus = {
	id = RAJ_diversify_the_fleet_r56
	icon = GFX_focus_generic_cruiser_submarines
	cost = 5
	x = 1
	y = 1
	relative_position_id = RAJ_kickstart_a_submarine_program_r56
	mutually_exclusive = {
		focus = RAJ_bring_terror_to_the_vital_trade_routes_r56
	}
	prerequisite = {
		focus = RAJ_kickstart_a_submarine_program_r56 RAJ_towards_an_economical_merchant_fleet_r56
	}
	search_filters = {
		FOCUS_FILTER_RESEARCH
	}
	completion_reward = {
		set_technology = {
			cruiser_submarines = 1
		} {
			midget_submarines = 1
		}
	}
}
### Entity: Scripted Trigger
Component: SWI_is_country_to_balance
Constructs: has_war_with, is_major, is_in_faction_with, is_neighbor_of, is_in_faction, is_faction_leader
Source: game
File: common/scripted_triggers/SWI_scripted_triggers.txt

Code:
SWI_is_country_to_balance = {
	custom_trigger_tooltip = {
		tooltip = SWI_country_to_balance_TT
	}
	hidden_trigger = {
		NOT = {
			has_war_with = SWI
			is_in_faction_with = SWI
		}
		OR = {
			AND = {
				is_neighbor_of = SWI
				OR = {
					is_in_faction = no
					is_faction_leader = yes
				}
			} {
				SWI_is_faction_leader_of_neighbor = yes
				NOT = {
					is_neighbor_of = SWI
				}
			}
			SWI_is_at_war_with_neighbor = yes
		}
		is_major = yes
	}
}
### Entity: National Focus
Tree: chi_focus
Component: CHI_championing_the_cause_of_liberty
Constructs: prerequisite, limit, add_ideas, add_war_support, add_stability, completion_reward, is_subject, add_research_slot
Source: game
File: common/national_focus/china_nationalist_sea.txt

Code:
focus = {
	id = CHI_championing_the_cause_of_liberty
	icon = GFX_focus_ARG_defense_and_democracy
	prerequisite = {
		focus = CHI_spreading_the_light_of_freedom
	} {
		focus = CHI_correct_a_historical_wrong
	}
	x = 1
	y = 1
	relative_position_id = CHI_spreading_the_light_of_freedom
	cost = 10
	available = {
		surrender_progress = < 0.01
		democratic = > 0.95
		is_subject = no
	}
	search_filters = {
		FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_MANPOWER
	}
	ai_will_do = {
		factor = 10
	}
	completion_reward = {
		add_research_slot = 1
		custom_effect_tooltip = generic_skip_one_line_tt generic_skip_one_line_tt
		add_war_support = 0.1
		add_stability = 0.1
		IF = {
			limit = {
				is_in_faction = yes
			}
			add_faction_initiative = 1
			custom_effect_tooltip = generic_skip_one_line_tt
		}
		add_ideas = CHI_asian_bastion_of_liberty_idea
	}
}
### Entity: Scripted Effect
Component: CZE_vtlu_idea_go_up
Constructs: limit, add_ideas, has_idea, swap_ideas, remove_idea, add_idea
Source: game
File: common/scripted_effects/CZE_scripted_effects.txt

Code:
CZE_vtlu_idea_go_up = {
	if = {
		limit = {
			has_idea = CZE_vtlu_idea_3
		}
		swap_ideas = {
			remove_idea = CZE_vtlu_idea_3
			add_idea = CZE_vtlu_idea_4
		}
	}
	else_if = {
		limit = {
			has_idea = CZE_vtlu_idea_2
		}
		swap_ideas = {
			remove_idea = CZE_vtlu_idea_2
			add_idea = CZE_vtlu_idea_3
		}
	} {
		limit = {
			has_idea = CZE_vtlu_idea
		}
		swap_ideas = {
			remove_idea = CZE_vtlu_idea
			add_idea = CZE_vtlu_idea_2
		}
	}
	else = {
		add_ideas = CZE_vtlu_idea
	}
}
### Entity: Scripted Trigger
Component: EAI_THIS_is_strong_vs_PREV
Constructs: limit, is_major
Source: game
File: common/scripted_triggers/EAI_DIPLOMACY_triggers.txt

Code:
EAI_THIS_is_strong_vs_PREV = {
	NOT = {
		EAI_is_not_independent = yes
	}
	surrender_progress = < 0.05
	strength_ratio = {
		tag = PREV
		ratio = > 1.0
	}
	if = {
		limit = {
			PREV = {
				is_major = yes
			}
		}
		is_major = yes
	}
}