Losa10/PreTrain-HOI4-Modding-Assistant huggingface dataset:
### Entity: National Focus
Tree: ven_focus
Component: VEN_alternatives_to_oil
Constructs: prerequisite, limit, completion_reward, set_technology, swap_ideas, remove_idea, add_idea, has_tech
Source: game
File: common/national_focus/venezuela.txt

Code:
focus = {
	id = VEN_alternatives_to_oil
	icon = GFX_goal_generic_agriculture2
	x = 0
	y = 1
	relative_position_id = VEN_national_recovery_act
	cost = 10
	search_filters = {
		FOCUS_FILTER_INDUSTRY FOCUS_FILTER_STEEL
	}
	prerequisite = {
		focus = VEN_national_recovery_act
	}
	ai_will_do = {
		factor = 10
	}
	completion_reward = {
		swap_ideas = {
			remove_idea = VEN_oil_2
			add_idea = VEN_oil_3
		}
		custom_effect_tooltip = generic_skip_one_line_tt generic_skip_one_line_tt
		if = {
			limit = {
				has_tech = steel_production_1
			}
			add_tech_bonus = {
				name = industrial_bonus
				bonus = 1
				uses = 1
				category = steel_tech
			}
		}
		else = {
			set_technology = {
				steel_production_1 = 1
			}
		}
		random_owned_controlled_state = {
			prioritize = {
				307
			}
			add_extra_state_shared_building_slots = 3
			add_building_construction = {
				type = steel_mill
				level = 2
				instant_build = yes
			} {
				type = industrial_complex
				level = 1
				instant_build = yes
			}
		}
	}
}
### Entity: Country History
Country: GAB
Component: GAB_technology
Constructs: set_technology
Source: game
File: history/countries/GAB - Gabon.txt

Code:
# Starting Technologies for GAB
set_technology = {
	infantry_weapons = 1
}
### Entity: Character
Component: BRA_reluctant_integralist
Constructs: war_support_factor, fascism_drift
Source: game
File: common/country_leader/00_traits.txt

Code:
BRA_reluctant_integralist = {
	random = no
	political_power_factor = -0.1
	fascism_drift = 0.03
	war_support_factor = 0.1
	defensive_war_stability_factor = 0.1
	ai_will_do = {
		factor = 1
	}
}
### Entity: Order of Battle
Component: 13ya Donskaya Kazachya Div.
Constructs: division_template
Source: game
File: history/units/SOV_1939.txt

Code:
division = {
	name = 13ya Donskaya Kazachya Div.
	location = 3358
	division_template = Strelkovaya Diviziya
	start_experience_factor = 0.7
	start_equipment_factor = 1.0
}
### Entity: Event
Component: greece.25
Constructs: is_triggered_only, ai_chance, fire_only_once
Source: game
File: events/r56_Greece.txt

Code:
country_event = {
	id = greece.25
	title = greece.25.t
	desc = greece.25.d
	picture = GFX_report_event_polish_army
	fire_only_once = yes
	is_triggered_only = yes
	option = {
		name = greece.25.a
		ai_chance = {
			modifier = {
				factor = 45
			}
		}
		GRE = {
			transfer_state = 183
		}
	} {
		name = greece.25.b
		ai_chance = {
			modifier = {
				factor = 55
			}
		}
		GRE = {
			country_event = greece.7
		}
	}
}
### Entity: Event
Component: belgium.148
Constructs: is_triggered_only, ai_chance, add_opinion_modifier, add_political_power, set_country_flag
Source: game
File: events/BEL_additional_events.txt

Code:
country_event = {
	id = belgium.148
	title = belgium.148.t
	desc = belgium.148.desc
	picture = GFX_report_event_leopold_britain
	is_triggered_only = yes
	option = {
		name = belgium.148.a
		ai_chance = {
			base = 98
		}
		diplomatic_relation = {
			country = BEL
			relation = non_aggression_pact
		}
		add_opinion_modifier = {
			target = BEL
			modifier = ENG_BEL_non_aggression_pact_signed
		}
		set_country_flag = ENG_BEL_non_aggression_pact_signed {
			flag = ENG_BEL_non_aggression_pact_time_limit
			days = 365
			value = 1
		}
	} {
		name = belgium.148.b
		ai_chance = {
			base = 2
		}
		add_political_power = -20
		BEL = {
			country_event = {
				days = 1
				id = belgium.149
			}
		}
	}
}
### Entity: Modifier Reference
Construct: Modifiers_for_scope_ai
Source: vanilla_docs
File: documentation/modifiers_documentation.md

Doc:
## Modifiers for scope ai

* [ai_badass_factor](#ai_badass_factor)
* [ai_call_ally_desire_factor](#ai_call_ally_desire_factor)
* [ai_desired_divisions_factor](#ai_desired_divisions_factor)
* [ai_focus_aggressive_factor](#ai_focus_aggressive_factor)
* [ai_focus_aviation_factor](#ai_focus_aviation_factor)
* [ai_focus_defense_factor](#ai_focus_defense_factor)
* [ai_focus_military_advancements_factor](#ai_focus_military_advancements_factor)
* [ai_focus_military_equipment_factor](#ai_focus_military_equipment_factor)
* [ai_focus_naval_air_factor](#ai_focus_naval_air_factor)
* [ai_focus_naval_factor](#ai_focus_naval_factor)
* [ai_focus_peaceful_factor](#ai_focus_peaceful_factor)
* [ai_focus_war_production_factor](#ai_focus_war_production_factor)
* [ai_get_ally_desire_factor](#ai_get_ally_desire_factor)
* [ai_join_ally_desire_factor](#ai_join_ally_desire_factor)
* [ai_license_acceptance](#ai_license_acceptance)
### Entity: Event
Component: CZE.309
Constructs: is_triggered_only, limit, has_government, fire_only_once, create_wargoal
Source: game
File: events/CZE_Czechoslovakia.txt

Code:
country_event = {
	id = CZE.309
	title = CZE.309.t
	desc = CZE.309.d
	picture = GFX_report_event_german_reichstag_bombed
	fire_only_once = yes
	is_triggered_only = yes
	option = {
		name = CZE.309.a
		if = {
			limit = {
				OR = {
					has_government = democratic neutrality communism
				}
			}
			create_wargoal = {
				type = topple_government
				target = GER
			}
		} {
			limit = {
				has_government = fascism
			}
			create_wargoal = {
				type = topple_government
				target = D01
			}
		}
	} {
		name = CZE.309.b
	}
}
### Entity: National Focus
Tree: alg_focus
Component: ALG_federalize_nation
Constructs: prerequisite, remove_ideas, add_stability, completion_reward, add_political_power
Source: game
File: common/national_focus/algeria.txt

Code:
focus = {
	id = ALG_federalize_nation
	icon = GFX_focus_SOV_military_purge
	x = 10
	y = 3
	cost = 10
	prerequisite = {
		focus = ALG_the_peasants_republic
	}
	search_filters = {
		FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY
	}
	ai_will_do = {
		factor = 95
	}
	completion_reward = {
		add_stability = -0.1
		add_political_power = 200
		remove_ideas = ALG_pieds_noir
	}
}
### Entity: Event
Component: mtg_britain.202
Constructs: is_triggered_only, add_war_support
Source: game
File: events/MTG_Britain.txt

Code:
country_event = {
	id = mtg_britain.202
	title = mtg_britain.202.t
	desc = mtg_britain.202.d
	picture = GFX_report_event_generic_sign_treaty3
	is_triggered_only = yes
	option = {
		name = mtg_britain.202.a
		add_war_support = 0.2
	}
}
### Entity: Event
Component: germany.200
Constructs: ai_chance, has_war, limit, add_ideas, has_government, add_stability, fire_only_once, add_political_power
Source: game
File: events/Germany.txt

Code:
country_event = {
	id = germany.200
	title = germany.200.t
	desc = germany.200.desc
	picture = GFX_report_event_german_reichstag_gathering
	fire_only_once = yes
	mean_time_to_happen = {
		days = 10
	}
	trigger = {
		has_global_flag = yalta_agreed_flag
		has_government = democratic
		has_war = no
		SOV = {
			has_government = communism
		}
		IF = {
			limit = {
				GER = {
					is_subject = yes
					has_government = democratic
				}
			}
			any_subject_country = {
				tag = GER
				has_government = democratic
			}
		}
		ELSE = {
			any_subject_country = {
				original_tag = GER
				has_government = democratic
			}
		}
	}
	option = {
		name = germany.200.a
		ai_chance = {
			base = 100
		}
		add_stability = 0.1
		add_political_power = 100
		add_ideas = GER_western_trade_cooperation
		random_subject_country = {
			limit = {
				original_tag = GER
				has_government = democratic
			}
			ROOT = {
				set_autonomy = {
					target = PREV
					autonomy_state = autonomy_free
				}
			}
			add_ideas = GER_western_trade_cooperation
			IF = {
				limit = {
					ROOT = {
						is_faction_leader = yes
					}
				}
				ROOT = {
					add_to_faction = PREV
				}
			}
			set_cosmetic_tag = WGR
			every_other_country = {
				limit = {
					any_subject_country = {
						original_tag = GER
						has_government = democratic
					}
					NOT = {
						tag = ROOT
					}
				}
				country_event = {
					id = germany.201
					hours = 4
					random_hours = 12
				}
			}
		}
		IF = {
			limit = {
				NOT = {
					any_country = {
						original_tag = GER
						has_government = democratic
						is_subject = yes
						exists = yes
					}
				}
				SOV = {
					any_subject_country = {
						original_tag = GER
					}
				}
			}
			SOV = {
				country_event = {
					id = germany.202
					days = 14
					random_days = 20
				}
			}
		}
	} {
		name = germany.200.b
		ai_chance = {
			base = 0
		}
	}
}
### Entity: National Focus
Tree: ita_focus
Component: ITA_the_fight_overseas
Constructs: prerequisite, limit, completion_reward, add_to_variable, is_on_continent, is_fully_controlled_by, every_controlled_state, add_building_construction
Source: game
File: common/national_focus/italy.txt

Code:
focus = {
	id = ITA_the_fight_overseas
	icon = GFX_focus_generic_africa_defense
	prerequisite = {
		focus = ITA_cooperatives_for_intensive_exploitation ITA_the_italian_confederation
	}
	x = 2
	y = 2
	relative_position_id = ITA_cooperatives_for_intensive_exploitation
	cost = 10
	available = {

	}
	search_filters = {

	}
	completion_reward = {
		add_to_variable = {
			ITA_re_supply_consumption_factor = -0.05
		} {
			ITA_re_acclimatization_hot_climate_gain_factor = 0.15
		} {
			ITA_re_heat_attrition_factor = -0.1
		} {
			ITA_rm_naval_invasion_prep_speed = 0.1
		} {
			ITA_rm_naval_invasion_capacity = 10
		}
		custom_effect_tooltip = ITA_the_fight_overseas_re_tt ITA_the_fight_overseas_rm_tt ITA_the_fight_overseas_bunkers_tt
		if = {
			limit = {
				any_controlled_state = {
					is_on_continent = africa
					is_fully_controlled_by = ROOT
					OR = {
						supply_node = > 0
						naval_base = > 0
					}
				}
			}
			custom_effect_tooltip = generic_current_effects
			every_controlled_state = {
				limit = {
					is_on_continent = africa
					is_fully_controlled_by = ROOT
				}
				add_building_construction = {
					type = bunker
					level = 2
					instant_build = yes
					province = {
						all_provinces = yes
						limit_to_supply_node = yes
					}
				} {
					type = coastal_bunker
					level = 2
					instant_build = yes
					province = {
						all_provinces = yes
						limit_to_naval_base = yes
					}
				} {
					type = bunker
					level = 2
					instant_build = yes
					province = {
						all_provinces = yes
						limit_to_naval_base = yes
					}
				}
				if = {
					limit = {
						OR = {
							supply_node = > 0
							naval_base = > 0
						}
					}
					add_building_construction = {
						type = anti_air_building
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}
}
### Entity: National Focus
Tree: eth_focus
Component: ETH_reinforce_dynamic_identity
Constructs: prerequisite, limit, add_war_support, add_stability, completion_reward, add_political_power, is_subject, add_autonomy_ratio
Source: game
File: common/national_focus/ethiopia.txt

Code:
focus = {
	id = ETH_reinforce_dynamic_identity
	icon = GFX_goal_generic_propaganda
	prerequisite = {
		focus = ETH_assertiveness
	}
	dynamic = yes
	x = 1
	y = 1
	relative_position_id = ETH_assertiveness
	cost = 10
	available = {

	}
	search_filters = {
		FOCUS_FILTER_POLITICAL FOCUS_FILTER_BALANCE_OF_POWER
	}
	completion_reward = {
		ETH_BOP_centralization_large_effect = yes
		add_political_power = 100
		add_war_support = 0.1
		add_stability = 0.05
		IF = {
			limit = {
				is_subject = yes
			}
			add_autonomy_ratio = {
				value = 0.2
				localization = ETH_reinforced_identity
			}
		}
	}
}
### Entity: Event
Component: egypt.15
Constructs: is_triggered_only, fire_only_once
Source: game
File: events/egypt.txt

Code:
country_event = {
	id = egypt.15
	picture = GFX_report_event_EGY_anglo_egyptian_conference_3
	title = egypt.15.t
	desc = egypt.15.d
	fire_only_once = yes
	is_triggered_only = yes
	option = {
		name = egypt.15.a
	}
}
### Entity: Event
Component: bftb_turkey.7
Constructs: is_triggered_only, set_demilitarized_zone
Source: game
File: events/BFTB_Turkey.txt

Code:
country_event = {
	id = bftb_turkey.7
	title = bftb_turkey.7.t
	desc = bftb_turkey.7.desc
	picture = GFX_report_event_tur_the_montreux_convention
	is_triggered_only = yes
	option = {
		name = bftb_turkey.7.a
		hidden_effect = {
			341 = {
				set_demilitarized_zone = no
			}
			797 = {
				set_demilitarized_zone = no
			}
			340 = {
				set_demilitarized_zone = no
			}
		}
	}
}
### Entity: Event
Component: bftb_greece.55
Constructs: is_triggered_only
Source: game
File: events/BFTB_Greece.txt

Code:
country_event = {
	id = bftb_greece.55
	title = bftb_greece.55.t
	desc = bftb_greece.55.desc
	picture = GFX_report_event_gre_enosis
	is_triggered_only = yes
	option = {
		name = bftb_greece.55.a
		GRE = {
			country_event = {
				id = bftb_greece.56
				days = 1
			}
		}
		custom_effect_tooltip = end_of_cyprus_tt
	} {
		name = bftb_greece.55.b
		GRE = {
			country_event = {
				id = bftb_greece.57
				days = 1
			}
		}
	}
}
### Entity: Character
Component: infantry_officer_political
Source: game
File: common/country_leader/r56_traits.txt

Code:
infantry_officer_political = {
	random = no
	army_infantry_attack_factor = 0.05
	army_infantry_defence_factor = 0.1
}
### Entity: Idea
Component: EAI_DD_8/cv_small_plane_suicide_airframe_bonus
Constructs: equipment_bonus, build_cost_ic
Source: game
File: common/ideas/EAI_difficulty_ideas.txt

Code:
EAI_DD_8/cv_small_plane_suicide_airframe_bonus = {
	allowed = {
		always = no
	}
	equipment_bonus = {
		cv_small_plane_suicide_airframe = {
			build_cost_ic = -0.08
			instant = yes
		}
	}
}
### Entity: AI Strategy
Component: ITA_garrison_north_africa
Source: game
File: common/ai_strategy/r56_ITA.txt

Code:
ITA_garrison_north_africa = {
	allowed = {
		tag = ITA
	}
	enable = {
		ROOT = {
			exists = yes
			date = > 1938.1.1
		}
	}
	abort_when_not_enabled = yes
	ai_strategy = {
		type = put_unit_buffers
		ratio = 0.15
		states = {
			448 449 450 451 661 662 663
		}
		subtract_invasions_from_need = no
		subtract_fronts_from_need = no
	}
}
### Entity: Scripted Effect
Component: USA_congress_medium_support
Source: game
File: common/scripted_effects/USA_scripted_effects.txt

Code:
USA_congress_medium_support = {
	custom_effect_tooltip = mtg_usa_congress_medium_support_tt
	hidden_effect = {
		USA_senate_medium_support = yes
		USA_house_medium_support = yes
	}
}
### Entity: Character
Component: GRE_markos_vafiadis
Constructs: has_dlc, check_variable
Source: game
File: common/characters/GRE.txt

Code:
GRE_markos_vafiadis = {
	instance = {
		allowed = {
			has_dlc = Battle for the Bosporus
		}
		name = GRE_markos_vafiadis
		portraits = {
			army = {
				large = GFX_portrait_GRE_markos_vafiadis
				small = GFX_portrait_GRE_markos_vafiadis_small
			}
			civilian = {
				large = GFX_portrait_GRE_markos_vafiadis
			}
		}
		advisor = {
			slot = political_advisor
			idea_token = GRE_markos_vafiadis
			allowed = {
				OR = {
					original_tag = GRE SWE CHL
				}
				has_dlc = Battle for the Bosporus
			}
			available = {
				OR = {
					AND = {
						custom_trigger_tooltip = {
							tooltip = GRE_communists_friendly_or_loyal
							check_variable = {
								var = GRE_communist_loyalty
								value = 1.0
								compare = greater_than_or_equals
							}
						}
					}
					SWE_refuge_for_revolutionaries_trigger = yes
					CHL_hub_of_the_revolution_trigger = yes
				}
			}
			traits = {
				guerilla_warfare_expert
			}
		}
	} {
		allowed = {
			NOT = {
				has_dlc = Battle for the Bosporus
			}
		}
		name = GRE_markos_vafiadis
		portraits = {
			civilian = {
				large = GFX_portrait_GRE_markos_vafiadis
			}
		}
		country_leader = {
			ideology = marxism
			expire = 1965.1.1.1
			id = -1
		}
	}
}
### Entity: On Action
Component: on_actions
Constructs: has_completed_focus, limit, random_country, remove_ideas, has_government, owns_state, has_war_with, has_country_flag
Source: game
File: common/on_actions/03_wtt_on_actions.txt

Code:
on_actions = {
	on_state_control_changed = {
		effect = {
			if = {
				limit = {
					FROM.FROM = {
						has_state_flag = CHI_needed_for_burma_road
					}
					ROOT = {
						OR = {
							has_war_with = FROM
							FROM = {
								any_enemy_country = {
									OR = {
										is_in_faction_with = ROOT
										is_subject_of = ROOT
									}
								}
							}
						}
					}
				}
				FROM.FROM = {
					save_event_target_as = state_occupied
					set_state_flag = CHI_burma_road_closed_state
				}
				ROOT = {
					save_event_target_as = occupying_country
				}
				random_country = {
					limit = {
						check_variable = {
							CHI_burma_road_current_level = > 0
						}
					}
					set_variable = {
						tempvar = 0
					} {
						CHI_burma_road_closed_level = CHI_burma_road_current_level
					} {
						CHI_burma_road_current_level = 0
					}
					subtract_from_variable = {
						var = tempvar
						value = CHI_burma_road_current_level
					}
					add_offsite_building = {
						type = arms_factory
						level = tempvar
					}
					clear_variable = tempvar
					country_event = {
						id = wtt_burma_road.1
					}
				}
			} {
				limit = {
					FROM.FROM = {
						has_state_flag = CHI_needed_for_ledo_road
					}
					ROOT = {
						OR = {
							has_war_with = FROM
							FROM = {
								any_enemy_country = {
									OR = {
										is_in_faction_with = ROOT
										is_subject_of = ROOT
									}
								}
							}
						}
					}
				}
				FROM.FROM = {
					save_event_target_as = state_occupied
					set_state_flag = CHI_ledo_road_closed_state
				}
				ROOT = {
					save_event_target_as = occupying_country
				}
				random_country = {
					limit = {
						check_variable = {
							CHI_ledo_road_current_level = > 0
						}
					}
					set_variable = {
						tempvar = 0
					} {
						CHI_ledo_road_closed_level = CHI_ledo_road_current_level
					} {
						CHI_ledo_road_current_level = 0
					}
					subtract_from_variable = {
						var = tempvar
						value = CHI_ledo_road_current_level
					}
					add_offsite_building = {
						type = arms_factory
						level = tempvar
					}
					clear_variable = tempvar
					country_event = {
						id = wtt_ledo_road.1
					}
				}
			} {
				limit = {
					FROM.FROM = {
						has_state_flag = CHI_needed_for_hanoi_route
					}
					ROOT = {
						OR = {
							has_war_with = FROM
							FROM = {
								any_enem
# ... (truncated)
### Entity: Decision
Component: INS_realign_supply_chains_cat
Constructs: has_completed_focus, has_dlc
Source: game
File: common/decisions/categories/INS_decision_categories.txt

Code:
INS_realign_supply_chains_cat = {
	icon = GFX_decision_category_generic_foreign_policy
	priority = 4
	allowed = {
		original_tag = INS
		has_dlc = Thunder at Our Gates
	}
	visible = {
		has_completed_focus = INS_realign_supply_chains
	}
}
### Entity: Character
Component: KAZ_democratic_guy
Constructs: has_government
Source: game
File: common/characters/KAZ.txt

Code:
KAZ_democratic_guy = {
	advisor = {
		slot = political_advisor
		idea_token = KAZ_democratic_guy
		allowed = {
			original_tag = KAZ
		}
		traits = {
			democratic_reformer
		}
		do_effect = {
			not = {
				has_government = democratic
			}
		}
		ai_will_do = {
			factor = 0.0
		}
	}
	portraits = {
		army = {
			small = GFX_idea_generic_political_advisor_asia_1
		}
	}
}
### Entity: Decision
Component: TUR_kurdish_state_management_category
Source: game
File: common/decisions/categories/TUR_decision_categories.txt

Code:
TUR_kurdish_state_management_category = {
	priority = 4
	icon = tur_unifying_the_country
	visible_when_empty = yes
	on_map_area = {
		targets = {
			350 352 353 800
		}
		name = TUR_kurdish_state_management_map_category_name
		zoom = 150
	}
	allowed = {
		original_tag = TUR
	}
}
### Entity: Event
Component: india.406
Constructs: is_triggered_only, limit, add_stability, every_state, is_core_of, is_owned_and_controlled_by, add_compliance, add_resistance
Source: game
File: events/India.txt

Code:
country_event = {
	id = india.406
	title = india.406.t
	desc = india.406.desc
	picture = GFX_report_event_india_protests
	is_triggered_only = yes
	option = {
		name = india.406.a
		effect_tooltip = {
			RAJ = {
				add_stability = 0.05
				every_state = {
					limit = {
						is_core_of = BRM
						is_owned_and_controlled_by = FROM
					}
					add_compliance = 25
					add_resistance = -10
				}
			}
			custom_effect_tooltip = india_remains_united_tt
		}
	}
}
### Entity: Idea
Component: academy_scholarships_spirit
Constructs: has_government, has_military_academy, has_dlc
Source: game
File: common/ideas/army_spirits.txt

Code:
academy_scholarships_spirit = {
	ledger = army
	visible = {
		AND = {
			has_military_academy = yes
			has_government = communism
		}
	}
	modifier = {
		army_leader_start_level = 1
		army_leader_cost_factor = -0.3
		unit_leader_as_advisor_cp_cost_factor = -0.75
		custom_modifier_tooltip = academy_scholarships_spirit_tt
	}
	ai_will_do = {
		base = 1
		modifier = {
			factor = 0
			OR = {
				NOT = {
					has_dlc = No Step Back
				} {
					has_government = communism
				}
			}
		} {
			factor = 2
			has_government = communism
		}
	}
}
### Entity: Event
Component: siam_r56.18
Constructs: is_triggered_only, add_opinion_modifier
Source: game
File: events/r56_SIA_events.txt

Code:
country_event = {
	id = siam_r56.18
	title = belgium.2.t
	desc = siam_r56.18.desc
	picture = GFX_report_event_siamese_soldiers_2
	is_triggered_only = yes
	option = {
		name = DOD_romania.22.a
		add_opinion_modifier = {
			target = FROM
			modifier = refused_alliance
		}
	}
}
### Entity: Effect Reference
Construct: add_to_war
Source: vanilla_docs
File: documentation/effects_documentation.md

Doc:
## add_to_war

* Supported Scopes: COUNTRY
* Supported Targets: none

```
adds country to the specified war:
ENG = {
	add_to_war = {
	  targeted_alliance = SOV # Country to which side we want to join
	  enemy = PER # Which country we want to declare war on
	  hostility_reason = asked_to_join # The reason for joining the war
	  single_target_only = yes # yes if we want to target only the given country and not all enemies of targeted_alliance
  }
}
```
### Entity: National Focus
Tree: chi_focus
Component: CHI_taiyuan_arsenal
Constructs: prerequisite, completion_reward, has_idea, cancel_if_invalid, add_extra_state_shared_building_slots, add_building_construction
Source: game
File: common/national_focus/china_nationalist.txt

Code:
focus = {
	id = CHI_taiyuan_arsenal
	icon = GFX_goal_generic_construct_mil_factory
	prerequisite = {
		focus = CHI_mining_commission
	}
	x = -2
	y = 1
	relative_position_id = CHI_mining_commission
	cost = 10
	ai_will_do = {
		factor = 1
	}
	available = {
		controls_state = 615
		NOT = {
			has_idea = CHI_hyper_inflation_5
		}
	}
	bypass = {

	}
	cancel_if_invalid = yes
	continue_if_invalid = no
	available_if_capitulated = no
	search_filters = {
		FOCUS_FILTER_INDUSTRY
	}
	completion_reward = {
		CHI_hyper_inflation_level_up = yes
		615 = {
			add_extra_state_shared_building_slots = 3
			add_building_construction = {
				type = arms_factory
				level = 3
				instant_build = yes
			}
		}
	}
}
### Entity: Scripted Trigger
Component: DIPLOMACY_INCOMING_LEND_LEASE_ENABLE_TRIGGER
Constructs: limit, has_government, has_game_rule, allow_lend_lease, is_in_faction_with
Source: game
File: common/scripted_triggers/diplomacy_scripted_triggers.txt

Code:
DIPLOMACY_INCOMING_LEND_LEASE_ENABLE_TRIGGER = {
	if = {
		limit = {
			has_game_rule = {
				rule = allow_lend_lease
				option = FREE
			}
		}
		always = yes
	} {
		limit = {
			has_game_rule = {
				rule = allow_lend_lease
				option = LIMITED
			}
		}
		always = yes
	} {
		limit = {
			has_game_rule = {
				rule = allow_lend_lease
				option = SAME_IDEOLOGY
			}
		}
		custom_trigger_tooltip = {
			tooltip = RULE_ALLOW_LEND_LEASE_SAME_IDEOLOGY_TT
			has_government = FROM
		}
	} {
		limit = {
			has_game_rule = {
				rule = allow_lend_lease
				option = SAME_FACTION
			}
		}
		custom_trigger_tooltip = {
			tooltip = RULE_ALLOW_LEND_LEASE_SAME_FACTION_TT
			is_in_faction_with = FROM
		}
	} {
		limit = {
			has_game_rule = {
				rule = allow_lend_lease
				option = BLOCKED
			}
		}
		custom_trigger_tooltip = {
			tooltip = RULE_ALLOW_LEND_LEASE_BLOCKED_TT
			always = no
		}
	}
}