Losa10/PreTrain-HOI4-Modding-Assistant huggingface dataset:
### Entity: National Focus
Tree: sov_focus
Component: SOV_brilliant_genius
Constructs: has_completed_focus, prerequisite, limit, completion_reward, check_variable, swap_ruler_traits
Source: game
File: common/national_focus/soviet.txt

Code:
focus = {
	id = SOV_brilliant_genius
	icon = GFX_focus_generic_socialist_science
	prerequisite = {
		focus = SOV_inheritor_of_the_mantle_of_lenin
	}
	x = -1
	y = 1
	relative_position_id = SOV_inheritor_of_the_mantle_of_lenin
	cost = 10
	available = {
		custom_trigger_tooltip = {
			tooltip = SOV_propaganda_campaigns_taken_10_or_greater_tt
			check_variable = {
				SOV_propaganda_campaigns_taken = 10
				compare = greater_than_or_equals
			}
		}
	}
	search_filters = {
		FOCUS_FILTER_RESEARCH
	}
	completion_reward = {
		divide_variable = {
			SOV_national_academy_of_sciences_construction_cost = 2
		}
		custom_effect_tooltip = SOV_brilliant_genius_academies_of_sciences_tt
		if = {
			limit = {
				has_completed_focus = SOV_leader_of_the_party_and_the_people
			}
			swap_ruler_traits = {
				remove = stalin_inheritor_of_lenin_leader
				add = stalin_inheritor_of_lenin_final
			}
		}
		else = {
			swap_ruler_traits = {
				remove = stalin_inheritor_of_lenin
				add = stalin_inheritor_of_lenin_genius
			}
		}
	}
}
### Entity: National Focus
Tree: ger_focus
Component: GER_see_to_the_eastern_front_ww
Constructs: prerequisite, limit, has_government, every_country, has_war_with, add_war_support, add_opinion_modifier, completion_reward
Source: game
File: common/national_focus/germany.txt

Code:
focus = {
	id = GER_see_to_the_eastern_front_ww
	icon = GFX_focus_GER_the_eastern_border
	prerequisite = {
		focus = GER_realpolitik
	}
	mutually_exclusive = {
		focus = GER_restore_the_brest_litovsk_borders
	}
	x = -2
	y = 1
	relative_position_id = GER_realpolitik
	cost = 5
	available = {
		is_subject = no
		OR = {
			EST = {
				exists = yes
				is_subject = no
				NOT = {
					is_in_faction_with = SOV
					has_war_with = ROOT
				}
			}
			LAT = {
				exists = yes
				is_subject = no
				NOT = {
					is_in_faction_with = SOV
					has_war_with = ROOT
				}
			}
			LIT = {
				exists = yes
				is_subject = no
				NOT = {
					is_in_faction_with = SOV
					has_war_with = ROOT
				}
			}
			POL = {
				exists = yes
				is_subject = no
				NOT = {
					is_in_faction_with = SOV
					has_war_with = ROOT
				}
			}
		}
	}
	dynamic = yes
	search_filters = {
		FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT
	}
	completion_reward = {
		add_political_power = 75
		add_war_support = 0.05
		custom_effect_tooltip = generic_skip_one_line_tt generic_skip_one_line_tt generic_skip_one_line_tt
		every_country = {
			limit = {
				exists = yes
				NOT = {
					has_war_with = ROOT
					is_subject_of = SOV
					is_in_faction_with = SOV
				}
				OR = {
					original_tag = POL EST LAT LIT UBD BLR
				}
			}
			add_opinion_modifier = {
				target = ROOT
				modifier = guardian_against_the_eastern_threat
			}
		}
		add_named_threat = {
			threat = 2
			name = GER_the_eastern_threat
		}
		SOV = {
			country_event = {
				id = wtt_germany.19
				days = 4
			}
		}
		hidden_effect = {
			news_event = {
				id = wtt_news.21
				days = 2
			}
		} {
			SOV = {
				add_opinion_modifier = {
					target = GER
					modifier = embargo
				}
			}
		}
		IF = {
			limit = {
				SOV = {
					has_government = communism
				}
				ROOT = {
					has_government = democratic
				}
			}
			every_other_country = {
				limit = {
					any_owned_state = {
						is_on_continent = europe
					}
					NOT = {
						original_tag = ENG FRA SWI ITA IRE TUR ALB SPR POR GRE
						has_government = communism fascism
					}
				}
				country_event = {
					id = wtt_germany.24
					days = 1
				}
				custom_effect_tooltip = if_they_accept_tt
				effect_tooltip = {
					add_timed_idea = {
						idea = GER_the_great_red_menace
						days = 1095
					}
				}
				add_ai_strategy = {
					type = befriend
					id = GER
					va
# ... (truncated)
### Entity: National Focus
Tree: ast_focus
Component: AST_introduce_unconventional_warfare
Constructs: prerequisite, limit, completion_reward, cancel_if_invalid, has_dlc, add_potential_special_forces_tree, add_doctrine_cost_reduction
Source: game
File: common/national_focus/australia.txt

Code:
focus = {
	id = AST_introduce_unconventional_warfare
	icon = GFX_goal_generic_army_doctrines
	prerequisite = {
		focus = AST_sentinel_tank_project AST_airborne_defence
	}
	x = 0
	y = 5
	relative_position_id = AST_additional_militia_training
	cost = 10
	ai_will_do = {
		factor = 1
	}
	available = {

	}
	bypass = {

	}
	cancel_if_invalid = yes
	continue_if_invalid = no
	available_if_capitulated = yes
	search_filters = {
		FOCUS_FILTER_RESEARCH
	}
	completion_reward = {
		army_experience = 35
		navy_experience = 35
		if = {
			limit = {
				has_dlc = Arms Against Tyranny
			}
			custom_effect_tooltip = CHL_skip_one_line_tt CHL_skip_one_line_tt
			add_potential_special_forces_tree = yes
			add_doctrine_cost_reduction = {
				name = AST_introduce_unconventional_warfare
				cost_reduction = 0.5
				uses = 1
				category = special_forces_doctrine
			}
		}
		else = {
			add_doctrine_cost_reduction = {
				name = AST_introduce_unconventional_warfare
				cost_reduction = 0.5
				uses = 1
				category = land_doctrine
			} {
				name = AST_introduce_unconventional_warfare
				cost_reduction = 0.5
				uses = 1
				category = naval_doctrine
			}
		}
	}
}
### Entity: Event
Component: kmt.326
Constructs: is_triggered_only, add_to_war
Source: game
File: events/r56_KMT_events.txt

Code:
country_event = {
	id = kmt.326
	title = kmt.326.t
	desc = kmt.326.d
	picture = GFX_report_event_chinese_soldiers_fighting
	is_triggered_only = yes
	option = {
		name = kmt.325.a
		FROM = {
			add_to_war = {
				targeted_alliance = ROOT
				enemy = JAP
			}
		}
	}
}
### Entity: Scripted Effect
Component: KMT_reduce_corruption_2
Constructs: limit, remove_ideas, has_idea, swap_ideas, remove_idea, add_idea
Source: game
File: common/scripted_effects/r56_scripted_effects.txt

Code:
KMT_reduce_corruption_2 = {
	IF = {
		limit = {
			has_idea = KMT_corrupted_regime
		}
		swap_ideas = {
			remove_idea = KMT_corrupted_regime
			add_idea = KMT_corrupted_regime_3
		}
	}
	else_if = {
		limit = {
			has_idea = KMT_corrupted_regime_2
		}
		swap_ideas = {
			remove_idea = KMT_corrupted_regime_2
			add_idea = KMT_corrupted_regime_4
		}
	} {
		limit = {
			has_idea = KMT_corrupted_regime_3
		}
		swap_ideas = {
			remove_idea = KMT_corrupted_regime_3
			add_idea = KMT_corrupted_regime_5
		}
	} {
		limit = {
			has_idea = KMT_corrupted_regime_4
		}
		swap_ideas = {
			remove_idea = KMT_corrupted_regime_4
			add_idea = KMT_corrupted_regime_6
		}
	} {
		limit = {
			has_idea = KMT_corrupted_regime_5
		}
		swap_ideas = {
			remove_idea = KMT_corrupted_regime_5
			add_idea = KMT_corrupted_regime_7
		}
	} {
		limit = {
			has_idea = KMT_corrupted_regime_6
		}
		swap_ideas = {
			remove_idea = KMT_corrupted_regime_6
			add_idea = KMT_corrupted_regime_8
		}
	} {
		limit = {
			has_idea = KMT_corrupted_regime_7
		}
		swap_ideas = {
			remove_idea = KMT_corrupted_regime_7
			add_idea = KMT_corrupted_regime_9
		}
	} {
		limit = {
			has_idea = KMT_corrupted_regime_8
		}
		swap_ideas = {
			remove_idea = KMT_corrupted_regime_8
			add_idea = KMT_corrupted_regime_10
		}
	} {
		limit = {
			has_idea = KMT_corrupted_regime_9
		}
		remove_ideas = KMT_corrupted_regime_9
	} {
		limit = {
			has_idea = KMT_corrupted_regime_10
		}
		remove_ideas = KMT_corrupted_regime_10
	}
}
### Entity: Idea
Component: SOV_poor_railnetworks_2
Constructs: removal_cost, mobilization_speed
Source: game
File: common/ideas/r56_soviet.txt

Code:
SOV_poor_railnetworks_2 = {
	removal_cost = -1
	allowed = {
		always = no
	}
	allowed_civil_war = {
		always = yes
	}
	picture = generic_bad_railnetwork
	modifier = {
		mobilization_speed = -0.1
		production_speed_infrastructure_factor = -0.05
		production_speed_rail_way_factor = -0.05
		custom_modifier_tooltip = SOV_poor_railnetworks_tt
	}
}
### Entity: Event
Component: r56w.event.33
Constructs: is_triggered_only, fire_only_once
Source: game
File: events/r56w_events.txt

Code:
news_event = {
	id = r56w.event.33
	title = r56w.event.33.t
	desc = r56w.event.33.d
	picture = GFX_r56w_news_event_01
	fire_only_once = yes
	is_triggered_only = yes
	major = yes
	option = {
		name = r56w.event.33.a
		hidden_effect = {
			country_event = {
				id = r56w.event.34
				days = 2
			}
		}
	}
}
### Entity: Event
Component: mtg_netherlands.14
Constructs: is_triggered_only, limit, remove_ideas, add_popularity, retire_country_leader, has_idea
Source: game
File: events/MTG_Netherlands.txt

Code:
country_event = {
	id = mtg_netherlands.14
	title = mtg_netherlands.14.t
	desc = mtg_netherlands.14.d
	picture = GFX_report_event_hol_cabinet_gerbrandy
	is_triggered_only = yes
	option = {
		name = mtg_netherlands.14.a
		add_popularity = {
			ideology = democratic
			popularity = -0.05
		}
		retire_country_leader = yes
		promote_character = {
			character = HOL_pieter_sjoerds_gerbrandy
			ideology = conservatism
		}
		if = {
			limit = {
				has_idea = HOL_weak_government
			}
			remove_ideas = HOL_weak_government
		}
	}
}
### Entity: Character
Component: emperor_of_ethiopia
Constructs: stability_factor
Source: game
File: common/country_leader/00_traits.txt

Code:
emperor_of_ethiopia = {
	random = no
	stability_factor = 0.02
	party_popularity_stability_factor = 0.1
	compliance_growth = 0.1
	non_core_manpower = 0.025
}
### Entity: Idea
Component: MAC_acas
Source: game
File: common/ideas/macedonia.txt

Code:
MAC_acas = {
	ledger = air
	picture = generic_air_europe_2
	allowed = {
		original_tag = MAC
	}
	traits = {
		air_close_air_support_2
	}
	ai_will_do = {
		factor = 1
	}
}
### Entity: National Focus
Tree: chi_focus
Component: CHI_reach_out_for_help
Constructs: prerequisite, has_war, has_government, has_war_with, add_opinion_modifier, completion_reward, is_subject, add_timed_idea
Source: game
File: common/national_focus/china_nationalist_sea.txt

Code:
focus = {
	id = CHI_reach_out_for_help
	icon = GFX_focus_generic_concessions
	prerequisite = {
		focus = CHI_leverage_contacts
	}
	x = 1
	y = 2
	relative_position_id = CHI_leverage_contacts
	cost = 5
	dynamic = yes
	available = {
		is_subject = no
		has_war = yes
		USA = {
			exists = yes
			is_subject = no
			has_government = democratic
			NOT = {
				has_war_with = ROOT
			}
		}
	}
	bypass = {

	}
	search_filters = {

	}
	ai_will_do = {
		factor = 10
	}
	completion_reward = {
		USA = {
			add_timed_idea = {
				idea = CHI_american_aid
				days = 730
			}
			add_opinion_modifier = {
				target = ROOT
				modifier = CHI_USA_aid_for_republic
			}
			add_ai_strategy = {
				type = send_lend_lease_desire
				id = ROOT
				value = 250
			}
		}
		custom_effect_tooltip = CHI_reach_out_for_help_tt
	}
}
### Entity: AI Strategy
Component: GER_we_are_bad_at_espionage_because_it_is_expensive_and_not_tanks
Constructs: has_government, has_dlc
Source: game
File: common/ai_strategy/GER.txt

Code:
GER_we_are_bad_at_espionage_because_it_is_expensive_and_not_tanks = {
	allowed = {
		original_tag = GER
		has_dlc = La Resistance
	}
	enable = {
		has_government = fascism
		num_of_civilian_factories = < 90 > 30
	}
	abort = {
		num_of_civilian_factories = > 90
	}
	ai_strategy = {
		type = intelligence_agency_usable_factories
		value = -20
	}
}
### Entity: State History
Component: 227
Constructs: add_core_of
Source: game
File: history/states/227-Stalino.txt

Code:
state = {
	id = 227
	name = STATE_227
	manpower = 3767336
	resources = {
		coal = 82
	}
	state_category = city
	history = {
		owner = SOV
		buildings = {
			infrastructure = 3
		}
		victory_points = {
			6474 10
		}
		add_core_of = SOV UKR
	}
	provinces = {
		502 3421 3449 3466 3479 3491 6420 6474 6493 6776
	}
	local_supplies = 10.0
}
### Entity: Event
Component: kmt.299
Constructs: is_triggered_only, ai_chance, fire_only_once, add_timed_idea
Source: game
File: events/r56_KMT_events.txt

Code:
country_event = {
	id = kmt.299
	title = kmt.299.t
	desc = kmt.299.d
	picture = GFX_report_event_dead_soldiers
	is_triggered_only = yes
	fire_only_once = yes
	option = {
		name = kmt.299.a
		add_timed_idea = {
			idea = KMT_sichuan_famine_no_aid
			days = 900
		}
	} {
		name = kmt.299.b
		ai_chance = {
			base = 100
		}
		add_timed_idea = {
			idea = KMT_sichuan_famine_aid
			days = 350
		}
	}
}
### Entity: Event
Component: SEA_japan_foreign_policy.104
Constructs: is_triggered_only, swap_ideas, remove_idea, add_idea
Source: game
File: events/SEA_Japan.txt

Code:
country_event = {
	id = SEA_japan_foreign_policy.104
	title = SEA_japan_foreign_policy.104.t
	desc = SEA_japan_foreign_policy.104.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes
	option = {
		name = SEA_japan_foreign_policy.104.a
		effect_tooltip = {
			FROM = {
				swap_ideas = {
					remove_idea = JAP_pacific_customs_union_member
					add_idea = JAP_pacific_integrated_customs_union_member
				}
			}
		}
	}
}
### Entity: Character
Component: small_ship_producer_defense_1
Constructs: equipment_bonus, naval_speed
Source: game
File: common/country_leader/r56_companies_traits.txt

Code:
small_ship_producer_defense_1 = {
	random = no
	equipment_bonus = {
		ship_hull_light = {
			sub_detection = 0.1
			naval_speed = 0.1
			surface_visibility = -0.1
		}
		ship_hull_submarine = {
			surface_visibility = -0.1
			sub_visibility = -0.1
			naval_speed = 0.05
		}
	}
	ai_will_do = {
		factor = 1
	}
}
### Entity: Character
Component: SIA_wan_waithayakon
Constructs: has_completed_focus, limit, has_dlc
Source: game
File: common/characters/SIA.txt

Code:
SIA_wan_waithayakon = {
	advisor = {
		slot = political_advisor
		idea_token = SIA_wan_waithayakon
		allowed = {
			original_tag = SIA
		}
		available = {
			has_completed_focus = SIA_the_provincial_council_of_state
		}
		traits = {
			SIA_renowned_ambassador
		}
		cost = 100
		ai_will_do = {
			factor = 1.0
		}
		on_add = {
			if = {
				limit = {
					has_dlc = Thunder at Our Gates
				}
				SIA_increase_civilian_approval = yes
			}
		}
		on_remove = {
			if = {
				limit = {
					has_dlc = Thunder at Our Gates
				}
				SIA_decrease_civilian_approval = yes
			}
		}
	}
	name = SIA_wan_waithayakon
	portraits = {
		civilian = {
			small = GFX_portrait_SIA_wan_waithayakon_small
		}
	}
}
### Entity: Scripted Effect
Component: EAI_monthly_update
Constructs: division_template, limit, every_country, has_country_flag, has_global_flag, set_temp_variable, check_variable, add_to_variable
Source: game
File: common/scripted_effects/EAI_UPDATE_effects.txt

Code:
EAI_monthly_update = {
	IF = {
		limit = {
			NOT = {
				has_global_flag = EAI_global_yearly_update
			}
		}
		set_temp_variable = {
			EAI_month_modulo = global.EAI_months_elapsed_corrected
		}
		modulo_temp_variable = {
			EAI_month_modulo = 12
		}
		if = {
			limit = {
				check_variable = {
					EAI_month_modulo = 0
				} {
					global.EAI_months_elapsed = > 0
				}
			}
			add_to_variable = {
				global.EAI_years_elapsed = 1
			}
			set_global_flag = {
				flag = EAI_global_yearly_update
				value = 1
				days = 2
			}
		} {
			limit = {
				check_variable = {
					EAI_month_modulo = 8
				}
			}
			every_country = {
				EAI_armor_production_design_upgrade_fix = yes
			}
		}
	}
	set_global_flag = {
		flag = EAI_global_yearly_update
		value = 1
		days = 2
	}
	if = {
		limit = {
			NOT = {
				has_global_flag = EAI_global_monthly_update
			}
		}
		set_global_flag = {
			flag = EAI_global_monthly_update
			value = 1
			days = 2
		}
		add_to_variable = {
			global.EAI_months_elapsed = 1
		}
		every_country = {
			EAI_num_fighters_deployed = yes
		}
		EAI_MAP_save_original_capital_location = yes
		if = {
			limit = {
				NOT = {
					has_global_flag = EAI_delayed_startup_effects
				}
				check_variable = {
					global.EAI_months_elapsed = 2
				}
			}
			set_global_flag = EAI_delayed_startup_effects
			EAI_delayed_startup_effects = yes
		}
	} {
		limit = {
			is_ai = yes
		}
		if = {
			limit = {
				has_country_flag = EAI_update_logging
			}
			log = [GetYear] [GetMonth] | AI | [Root.GetName] | UPDATE: monthly country
		} {
			limit = {
				check_variable = {
					EAI_biyearly_update = 0
				}
			}
			EAI_biyearly_update = yes
			set_variable = {
				EAI_biyearly_update = 5
			}
		} {
			limit = {
				tag = SOV
				EAI_MODE_challenging = yes
				NOT = {
					check_variable = {
						EAI_FOCUS/LAND/armor_focus = global.EAI_LARM_FOCUS
					}
				} {
					has_country_flag = EAI_SOV_CHL_deleted_tanks
				}
			}
			set_country_flag = EAI_SOV_CHL_deleted_tanks
			SOV = {
				delete_unit_template_and_units = {
					division_template = Mekhanizirovaniy Korpus
					disband = yes
				} {
					division_template = Motostrelkovaya Diviziya
					disband = yes
				}
			}
		} {
			limit = {
				EAI_mobilize_army = yes
			}
			if = {
				limit = {
					NOT = {
						has_country_flag = EAI_mobilize_army
					}
				}
				set_country_flag = EAI_mobilize_army
				if = {
					
# ... (truncated)
### Entity: Character
Component: LIE_gustav_schadler
Source: game
File: common/characters/LIE.txt

Code:
LIE_gustav_schadler = {
	name = Gustav Schädler
	portraits = {
		civilian = {
			small = GFX_idea_LIE_gustav_schaedler
		}
	}
	advisor = {
		slot = political_advisor
		idea_token = LIE_gustav_schadler
		allowed = {
			original_tag = LIE
		}
		available = {

		}
		traits = {
			editor
		}
		cost = 150
		ai_will_do = {
			factor = 1.0
		}
	}
}
### Entity: Character
Component: PER_mohammad_mosaddegh
Constructs: has_country_leader
Source: game
File: common/characters/PER.txt

Code:
PER_mohammad_mosaddegh = {
	name = PER_mohammad_mosaddegh
	portraits = {
		civilian = {
			small = GFX_portrait_PER_mohammad_mosaddegh_small
			large = GFX_portrait_PER_mohammad_mosaddegh
		}
	}
	country_leader = {
		ideology = conservatism
		expire = 1965.1.1.1
		id = -1
		traits = {
			anti_shah_democrat
		}
	}
	advisor = {
		slot = political_advisor
		idea_token = PER_mohammad_mosaddegh
		allowed = {
			original_tag = PER
		}
		visible = {

		}
		available = {
			NOT = {
				has_country_leader = {
					ruling_only = yes
					character = PER_mohammad_mosaddegh
				} {
					ruling_only = yes
					character = PER_reza_shah_pahlavi
				}
			}
		}
		traits = {
			silent_workhorse
		}
	}
}
### Entity: Event
Component: bftb_turkey.73
Constructs: is_triggered_only, ai_chance, has_war_with, add_opinion_modifier
Source: game
File: events/BFTB_Turkey.txt

Code:
country_event = {
	id = bftb_turkey.73
	title = bftb_turkey.73.t
	desc = bftb_turkey.73.desc
	picture = GFX_report_event_tur_military_affair
	is_triggered_only = yes
	option = {
		name = bftb_turkey.73.a
		ai_chance = {
			base = 5
			modifier = {
				add = 15
				NOT = {
					has_war_with = ENG
				}
			}
		}
		FROM = {
			add_opinion_modifier = {
				target = ITA
				modifier = GRE_left_us_to_fight_alone
			}
		}
		hidden_effect = {
			ENG = {
				country_event = {
					id = bftb_turkey.75
				}
			}
		}
	} {
		name = bftb_turkey.73.b
		ai_chance = {
			base = 15
		}
		diplomatic_relation = {
			country = IRQ
			relation = guarantee
			active = yes
		}
		IRQ = {
			country_event = {
				id = bftb_turkey.74
			}
		}
	}
}
### Entity: Order of Battle
Component: 1st Mau Unit
Constructs: division_template
Source: game
File: history/units/SAM_1936.txt

Code:
division = {
	name = 1st Mau Unit
	location = 7290
	division_template = Mau Men
	start_experience_factor = 0.8
	start_equipment_factor = 0.2
}
### Entity: Scripted Effect
Component: EAI_calculate_fielded_eq_ratio
Constructs: limit, has_country_flag, set_temp_variable, add_to_temp_variable, set_variable, check_variable, set_country_flag, clr_country_flag
Source: game
File: common/scripted_effects/EAI_MISC_effects.txt

Code:
EAI_calculate_fielded_eq_ratio = {
	set_temp_variable = {
		equipment_count = 0
	} {
		tot_fielded_eq_ratio = 0
	} {
		fielded_eq_ratio = num_equipment_in_armies_k@infantry_equipment
	}
	divide_temp_variable = {
		fielded_eq_ratio = num_target_equipment_in_armies_k@infantry_equipment
	} {
		tot_fielded_eq_ratio = equipment_count
	}
	add_to_temp_variable = {
		tot_fielded_eq_ratio = fielded_eq_ratio
	} {
		equipment_count = 1
	}
	set_variable = {
		EAI_fielded_eq_ratio = tot_fielded_eq_ratio
	}
	if = {
		limit = {
			has_country_flag = EAI_equipment_logging
		}
		log = [GetYear] [GetMonth] | AI | [Root.GetName] | EQUIPMENT: EAI_fielded_eq_ratio = [?EAI_fielded_eq_ratio|%0]
	} {
		limit = {
			check_variable = {
				deployed_army_manpower_k = > 0
			}
		}
		set_temp_variable = {
			tmp = num_target_equipment_in_armies_k@artillery_equipment
		}
		multiply_temp_variable = {
			tmp = 1000
		}
		divide_temp_variable = {
			tmp = deployed_army_manpower_k
		}
		if = {
			limit = {
				check_variable = {
					tmp = > 0.8
				} {
					num_equipment@artillery_equipment = < 1000
				}
			}
			set_country_flag = EAI_fielded_eq_ratio_artillery_wanted
		}
		else = {
			clr_country_flag = EAI_fielded_eq_ratio_artillery_wanted
		}
	} {
		limit = {
			check_variable = {
				num_target_equipment_in_armies_k@artillery_equipment = > 0
			}
		}
		set_variable = {
			EAI_fielded_eq_ratio_artillery = num_equipment_in_armies_k@artillery_equipment
		}
		divide_variable = {
			EAI_fielded_eq_ratio_artillery = num_target_equipment_in_armies_k@artillery_equipment
		}
	} {
		limit = {
			check_variable = {
				deployed_army_manpower_k = > 0
			}
		}
		set_temp_variable = {
			tmp = num_target_equipment_in_armies_k@support_equipment
		}
		multiply_temp_variable = {
			tmp = 1000
		}
		divide_temp_variable = {
			tmp = deployed_army_manpower_k
		}
		if = {
			limit = {
				check_variable = {
					tmp = > 1.0
				} {
					num_equipment@support_equipment = < 1000
				}
			}
			set_country_flag = EAI_fielded_eq_ratio_support_wanted
		}
		else = {
			clr_country_flag = EAI_fielded_eq_ratio_support_wanted
		}
	} {
		limit = {
			check_variable = {
				num_target_equipment_in_armies_k@support_equipment = > 0
			}
		}
		set_variable = {
			EAI_fielded_eq_ratio_support = num_equipment_in_armies_k@support_equipment
		}
		divide_variable = {
			EAI_fielded_eq_ratio_support = num_target_equipment_in_
# ... (truncated)
### Entity: National Focus
Tree: prc_focus
Component: PRC_sino_allied_pact_of_non_aggression
Constructs: prerequisite, limit, has_government, completion_reward, cancel_if_invalid
Source: game
File: common/national_focus/china_communist_sea.txt

Code:
focus = {
	id = PRC_sino_allied_pact_of_non_aggression
	icon = GFX_focus_ARG_join_the_allies
	prerequisite = {
		focus = PRC_soviet_technological_cooperation
	}
	x = -1
	y = 1
	relative_position_id = PRC_soviet_technological_cooperation
	cost = 10
	ai_will_do = {
		factor = 1
	}
	available = {
		OR = {
			USA = {
				exists = yes
				has_government = democratic
			}
			ENG = {
				exists = yes
				has_government = democratic
			}
			FRA = {
				exists = yes
				has_government = democratic
			}
		}
	}
	bypass = {

	}
	cancel_if_invalid = yes
	continue_if_invalid = no
	available_if_capitulated = no
	search_filters = {
		FOCUS_FILTER_POLITICAL
	}
	completion_reward = {
		if = {
			limit = {
				USA = {
					exists = yes
					has_government = democratic
				}
			}
			USA = {
				country_event = {
					id = SEA_PRC_political_events.8
				}
			}
		} {
			limit = {
				ENG = {
					exists = yes
					has_government = democratic
				}
			}
			ENG = {
				country_event = {
					id = SEA_PRC_political_events.8
				}
			}
		} {
			limit = {
				FRA = {
					exists = yes
					has_government = democratic
				}
			}
			FRA = {
				country_event = {
					id = SEA_PRC_political_events.8
				}
			}
		}
		custom_effect_tooltip = if_they_accept_tt PRC_sino_allied_pact_of_non_aggression_accept_tt
	}
}