Losa10/PreTrain-HOI4-Modding-Assistant huggingface dataset:
### Entity: Scripted Effect
Component: ENG_imperial_conference_defense_level_up
Constructs: limit, has_idea, swap_ideas, remove_idea, add_idea, add_timed_idea
Source: game
File: common/scripted_effects/ENG_scripted_effects.txt

Code:
ENG_imperial_conference_defense_level_up = {
	if = {
		limit = {
			has_idea = ENG_imperial_conference_defense_4
		}
		swap_ideas = {
			remove_idea = ENG_imperial_conference_defense_4
			add_idea = ENG_imperial_conference_defense_5
		}
	}
	else_if = {
		limit = {
			has_idea = ENG_imperial_conference_defense_3
		}
		swap_ideas = {
			remove_idea = ENG_imperial_conference_defense_3
			add_idea = ENG_imperial_conference_defense_4
		}
	} {
		limit = {
			has_idea = ENG_imperial_conference_defense_2
		}
		swap_ideas = {
			remove_idea = ENG_imperial_conference_defense_2
			add_idea = ENG_imperial_conference_defense_3
		}
	} {
		limit = {
			has_idea = ENG_imperial_conference_defense_1
		}
		swap_ideas = {
			remove_idea = ENG_imperial_conference_defense_1
			add_idea = ENG_imperial_conference_defense_2
		}
	} {
		limit = {
			NOT = {
				has_idea = ENG_imperial_conference_defense_1
			} {
				has_idea = ENG_imperial_conference_defense_2
			} {
				has_idea = ENG_imperial_conference_defense_3
			} {
				has_idea = ENG_imperial_conference_defense_4
			} {
				has_idea = ENG_imperial_conference_defense_5
			}
		}
		add_timed_idea = {
			idea = ENG_imperial_conference_defense_1
			days = 365
		}
	}
}
### Entity: AI Strategy
Component: ai_focus_military_equipment_SOV
Source: game
File: common/ai_focuses/SOV.txt

Code:
ai_focus_military_equipment_SOV = {
	research = {
		infantry_weapons = 50.0
		infantry_tech = 15.0
		artillery = 8.0
		support_tech = 6.5
	}
}
### Entity: Scripted Trigger
Component: has_not_initiated_border_incident_with_ROOT
Constructs: check_variable
Source: game
File: common/scripted_triggers/00_scripted_triggers.txt

Code:
has_not_initiated_border_incident_with_ROOT = {
	custom_trigger_tooltip = {
		tooltip = not_initiated_border_incident_with_ROOT
		NOT = {
			any_state = {
				check_variable = {
					ROOT.defender_state_vs_@PREV = id
				}
			}
		}
	}
}
### Entity: National Focus
Tree: usa_focus
Component: USA_war_plan_orange
Constructs: prerequisite, add_opinion_modifier, completion_reward, unlock_decision_tooltip
Source: game
File: common/national_focus/usa.txt

Code:
focus = {
	id = USA_war_plan_orange
	icon = GFX_focus_attack_japan
	prerequisite = {
		focus = USA_intervention_in_asia
	}
	available = {

	}
	continue_if_invalid = yes
	available_if_capitulated = yes
	x = -1
	y = 1
	relative_position_id = USA_intervention_in_asia
	cost = 10
	completion_reward = {
		JAP = {
			add_opinion_modifier = {
				target = USA
				modifier = war_plan_orange
			}
		}
		unlock_decision_tooltip = {
			decision = USA_execute_war_plan_orange
			show_effect_tooltip = yes
			show_modifiers = yes
		}
	}
}
### Entity: State History
Component: 985
Constructs: add_core_of
Source: game
File: history/states/985-South West Angola.txt

Code:
state = {
	id = 985
	name = STATE_892
	manpower = 960000
	state_category = pastoral
	history = {
		owner = ANG
		buildings = {
			infrastructure = 1
			industrial_complex = 1
		}
		victory_points = {
			10966 1
		}
		add_core_of = ANG
	}
	provinces = {
		8138 8202 10966 12391 12958 12985
	}
	buildings_max_level_factor = 1.0
	local_supplies = 0.0
}
### Entity: Character
Component: COR_arthur_giovoni
Source: game
File: common/characters/COR.txt

Code:
COR_arthur_giovoni = {
	name = COR_arthur_giovoni
	portraits = {
		civilian = {
			large = gfx/leaders/FRA/Portrait_France_Generic_1.dds
		}
	}
	country_leader = {
		ideology = marxism
		expire = 1960.1.1.1
		id = -1
		traits = {
			popular_figurehead2
		}
	}
}
### Entity: Character
Component: MON_olziytrygyn_badrak
Source: game
File: common/characters/MON.txt

Code:
MON_olziytrygyn_badrak = {
	advisor = {
		slot = army_chief
		idea_token = MON_olziytrygyn_badrak
		allowed = {
			original_tag = MON
		}
		traits = {
			army_chief_defensive_2
		}
		cost = 100
		ai_will_do = {
			factor = 1.0
		}
	}
	name = MON_olziytrygyn_badrak
	portraits = {
		army = {
			small = GFX_idea_generic_army_asia_4
		}
	}
}
### Entity: Event
Component: hon.2
Constructs: is_triggered_only, add_core_of, annex_country
Source: game
File: events/honduras.txt

Code:
country_event = {
	id = hon.2
	title = hon.2.t
	desc = hon.2.d
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = hon.2.a
		313 = {
			add_core_of = ROOT
		}
		annex_country = {
			target = GUA
		}
	}
}
### Entity: Event
Component: AFG_political_events.160
Constructs: is_triggered_only, ai_chance, set_country_flag
Source: game
File: events/GOE_Afghanistan.txt

Code:
country_event = {
	id = AFG_political_events.160
	title = AFG_political_events.160.t
	desc = AFG_political_events.160.desc
	is_triggered_only = yes
	picture = GFX_report_event_spr_anarchists2
	option = {
		name = AFG_political_events.160.a
		ai_chance = {
			base = 10
		}
		custom_effect_tooltip = AFG_political_events_53_tt
		set_country_flag = AFG_germany_will_aid_rebels
	}
}
### Entity: Event
Component: greece.18
Constructs: is_triggered_only, fire_only_once, declare_war_on, annex_everything
Source: game
File: events/r56_Greece.txt

Code:
country_event = {
	id = greece.18
	title = greece.18.t
	desc = greece.18.d
	picture = GFX_report_event_gre_greek_cavalry
	is_triggered_only = yes
	fire_only_once = yes
	option = {
		name = greece.18.a
		declare_war_on = {
			target = TUR
			type = annex_everything
		}
	}
}
### Entity: Idea
Component: EAI_DD_12/small_plane_airframe_bonus
Constructs: equipment_bonus, build_cost_ic
Source: game
File: common/ideas/EAI_difficulty_ideas.txt

Code:
EAI_DD_12/small_plane_airframe_bonus = {
	allowed = {
		always = no
	}
	equipment_bonus = {
		small_plane_airframe = {
			build_cost_ic = -0.12
			instant = yes
		}
	}
}
### Entity: Character
Component: BIA_akenzua_ii
Source: game
File: common/characters/BIA.txt

Code:
BIA_akenzua_ii = {
	name = BIA_akenzua_ii
	portraits = {
		civilian = {
			large = GFX_portrait_BIA_akenzua_ii
			small = GFX_portrait_BIA_akenzua_ii_small
		}
	}
	country_leader = {
		ideology = despotism
		traits = {

		}
		expire = 1959.1.1.1
		id = -1
	}
}
### Entity: Scripted Effect
Component: PRC_execute_infiltration_effects_for_PREV
Constructs: division_template, limit, has_state_flag, set_state_controller, create_unit
Source: game
File: common/scripted_effects/PRC_scripted_effects.txt

Code:
PRC_execute_infiltration_effects_for_PREV = {
	if = {
		limit = {
			has_state_flag = {
				flag = PRC_infiltration_@PREV
				value = 1
			}
		}
		damage_building = {
			type = infrastructure
			damage = 2
		} {
			type = arms_factory
			damage = 2
		}
	} {
		limit = {
			has_state_flag = {
				flag = PRC_infiltration_@PREV
				value = 2
			}
		}
		damage_building = {
			type = infrastructure
			damage = 4
		} {
			type = arms_factory
			damage = 4
		}
	} {
		limit = {
			has_state_flag = {
				flag = PRC_infiltration_@PREV
				value = 3
			}
		}
		PREV = {
			set_state_controller = PREV
			division_template = {
				name = Communist Militia
				priority = 2
				division_names_group = PRC_GAR_01
				regiments = {
					infantry = {
						x = 0
						y = 0
					} {
						x = 0
						y = 1
					} {
						x = 1
						y = 0
					} {
						x = 1
						y = 1
					}
				}
				support = {

				}
			}
		}
		custom_effect_tooltip = PRC_infiltrate_uprising_effect_3
		hidden_effect = {
			create_unit = {
				division = name = "Communist Militia" division_template = "Communist Militia" start_experience_factor = 0.0
				owner = PREV
			} {
				division = name = "Communist Militia" division_template = "Communist Militia" start_experience_factor = 0.0
				owner = PREV
			} {
				division = name = "Communist Militia" division_template = "Communist Militia" start_experience_factor = 0.0
				owner = PREV
			}
		}
	} {
		limit = {
			has_state_flag = {
				flag = PRC_infiltration_@PREV
				value = 4
			}
		}
		PREV = {
			set_state_controller = PREV
			division_template = {
				name = Communist Elite
				priority = 2
				division_names_group = PRC_INF_01
				regiments = {
					infantry = {
						x = 0
						y = 0
					} {
						x = 0
						y = 1
					} {
						x = 0
						y = 2
					} {
						x = 1
						y = 0
					} {
						x = 1
						y = 1
					} {
						x = 1
						y = 2
					}
				}
				support = {

				}
			}
		}
		custom_effect_tooltip = PRC_infiltrate_uprising_effect_4
		hidden_effect = {
			create_unit = {
				division = name = "Communist Elite" division_template = "Communist Elite" start_experience_factor = 0.3
				owner = PREV
			} {
				division = name = "Communist Elite" division_template = "Communist Elite" start_experience_factor = 0.3
				owner = PREV
			} {
				division = name = "Communist Elite" division_template = "Communist Elite" start_experience_factor = 0.3
# ... (truncated)
### Entity: National Focus
Tree: afg_focus
Component: AFG_raise_lashkar_regiments
Constructs: prerequisite, add_ideas, completion_reward
Source: game
File: common/national_focus/afghanistan.txt

Code:
focus = {
	id = AFG_raise_lashkar_regiments
	icon = GFX_focus_IRQ_approach_tribes_for_support
	prerequisite = {
		focus = AFG_crown_the_golden_emir
	}
	x = -3
	y = 1
	relative_position_id = AFG_crown_the_golden_emir
	cost = 5
	ai_will_do = {
		factor = 10
	}
	available = {

	}
	bypass = {

	}
	search_filters = {
		FOCUS_FILTER_MANPOWER
	}
	completion_reward = {
		add_ideas = AFG_lashkar_regiments_idea
	}
}
### Entity: Event
Component: wuw_GER_uncertain_future.01
Constructs: has_completed_focus, fire_only_once, has_dlc, has_country_leader, has_civil_war
Source: game
File: events/WUW_Germany.txt

Code:
country_event = {
	id = wuw_GER_uncertain_future.01
	title = wuw_GER_uncertain_future.01.t
	desc = wuw_GER_uncertain_future.01.desc
	picture = GFX_report_event_gathering_protest
	fire_only_once = yes
	trigger = {
		has_dlc = Gotterdammerung
		original_tag = GER
		has_country_leader = {
			ruling_only = yes
			character = GER_august_von_mackensen
		}
		has_completed_focus = GER_oppose_hitler_ww
		has_civil_war = no
		NOT = {
			OR = {
				focus_progress = {
					focus = GER_start_the_proletarian_revolution
					progress = > 0
				} {
					focus = GER_re_establish_free_elections_ww
					progress = > 0
				} {
					focus = GER_return_of_the_kaiser_ww
					progress = > 0
				} {
					focus = GER_military_dictatorship
					progress = > 0
				}
			}
		}
	}
	mean_time_to_happen = {
		days = 30
	}
	option = {
		name = wuw_GER_uncertain_future.01.a
		activate_mission = GER_growing_public_dissent_mission
	}
}
### Entity: AI Strategy
Component: mexico_communism_ussr
Constructs: has_government, has_country_flag, has_dlc, has_game_rule, is_historical_focus_on
Source: game
File: common/ai_strategy_plans/MEX.txt

Code:
mexico_communism_ussr = {
	name = Mexican Soviet Republic
	desc = Mexico will align itself towards the Soviet Union, spreading the Revolution into Latin America at the tip of a bayonet.
	allowed = {
		original_tag = MEX
		has_dlc = Man the Guns
	}
	enable = {
		OR = {
			has_country_flag = MEX_AI_SOVIET_REPUBLIC
			has_game_rule = {
				rule = MEX_ai_behavior
				option = SOVIET_REPUBLIC
			}
			AND = {
				is_historical_focus_on = yes
				has_government = communism
			}
		}
	}
	ai_national_focuses = {
		MEX_focus_plan_of_agua_prieta MEX_focus_legacy_of_revolution MEX_focus_the_red_shirts MEX_focus_communist_revolution MEX_focus_exile_calles MEX_focus_purge_the_bureaucracy MEX_focus_arrest_general_cedillo MEX_focus_control_the_army MEX_focus_enforce_the_calles_law MEX_focus_triumph_over_the_cristeros MEX_focus_state_education MEX_focus_national_bank MEX_focus_agricultural_credit_bank MEX_focus_confederation_of_mexican_workers MEX_focus_rent_freeze MEX_focus_ejido_worker_militias MEX_focus_rural_infrastructure MEX_focus_peripheral_infrastructure MEX_focus_rural_schools MEX_focus_oil_field_expansion MEX_focus_nationalize_the_oil_fields MEX_focus_oppose_yanqui_imperialism MEX_focus_international_proletarianism MEX_focus_interior_defence_plan MEX_focus_northern_steel_plants MEX_focus_engineering_school MEX_focus_march_southwards MEX_focus_military_budget_review MEX_focus_heroic_military_college MEX_focus_television_innovators MEX_focus_unify_centroamerica MEX_focus_revolutionary_women MEX_focus_soldaderas MEX_focus_integrate_the_south MEX_focus_xefo MEX_focus_law_on_industrial_promotion MEX_focus_nafinsa MEX_focus_spanish_civil_war_refugees MEX_focus_support_spains_loyalists MEX_focus_bolivarian_alliance MEX_focus_coastal_defence_plan MEX_focus_realpolitik MEX_focus_push_past_the_darien_gap MEX_focus_aviation_workshops MEX_focus_pacific_coast_naval_yards MEX_focus_gulf_coast_naval_yards MEX_focus_liberate_the_caribbean MEX_focus_brown_water_navy MEX_focus_integrate_the_caribbean MEX_focus_weapons_modernisation MEX_focus_tank_workshops MEX_focus_seize_the_panama_canal MEX_focus_military_aviation_specialists MEX_focus_rescind_the_mexican_cession MEX_focus_army_expansion_programme MEX_focus_heavy_artillery MEX_focus_redeem_aztlan
	}
	ideas = {
		MEX_vicente_lombardo = 10
	}
}
### Entity: National Focus
Tree: bul_focus
Component: BUL_heavy_industry
Constructs: prerequisite, limit, completion_reward, random_owned_state, is_fully_controlled_by, add_extra_state_shared_building_slots, add_building_construction, swap_ideas
Source: game
File: common/national_focus/bulgaria.txt

Code:
focus = {
	id = BUL_heavy_industry
	prerequisite = {
		focus = BUL_collectivization_of_the_countryside
	}
	icon = GFX_goal_generic_soviet_construction
	relative_position_id = BUL_collectivization_of_the_countryside
	x = 0
	y = 1
	cost = 10
	available = {
		num_of_factories = > 30
	}
	search_filters = {
		FOCUS_FILTER_INDUSTRY
	}
	completion_reward = {
		random_owned_state = {
			limit = {
				is_fully_controlled_by = ROOT
				free_building_slots = {
					building = arms_factory
					size = > 1
					include_locked = yes
				}
			}
			add_extra_state_shared_building_slots = 2
			add_building_construction = {
				type = arms_factory
				level = 2
				instant_build = yes
			}
		}
		swap_ideas = {
			remove_idea = BUL_government_reforms_communists_01
			add_idea = BUL_government_reforms_communists_02
		}
	}
}
### Entity: Unit Template
Component: YUG
Source: game
File: common/units/names/00_names.txt

Code:
YUG = {
	submarine = {
		prefix = KB
		generic = {
			Podmornica
		}
		unique = {
			Hrabri Nebojsa Smeli Osvetnik Malisan Tara Sava Sutjeska Neretva Heroj Junak Drava Tisa Una Zeta Soca Kupa Vardar
		}
	}
	destroyer = {
		prefix = KB
		generic = {
			Razarac
		}
		unique = {
			Dubrovnik Split Beograd Zagreb Ljubljana Kotor Pula Triglav Biokovo Durmitor Ucka Koper Nada Golesnica Cer
		}
	}
	light_cruiser = {
		prefix = KB
		generic = {
			Svetlo Krstarica
		}
		unique = {
			Dalmacija Sarajevo Brus Nis Smederovo Manasija Vrsac Ljubljana
		}
	}
	heavy_cruiser = {
		prefix = KB
		generic = {
			Teska Krstarica
		}
		unique = {
			Belgrade Zagreb Novi Sad Budva Cetinje Dubrovnik Pec Pizren Pristina
		}
	}
	battle_cruiser = {
		prefix = KB
		generic = {
			Bojna Krstarica
		}
		unique = {
			Brus Nis
		}
	}
	battleship = {
		prefix = KB
		generic = {
			Vojni Brod
		}
		unique = {
			Belgrade Zagreb Novi Sad Budva Cetinje Dubrovnik Pec Pizren Pristina Sarajevo
		}
	}
	carrier = {
		prefix = KB
		generic = {
			Nosac Aviona
		}
		unique = {
			Smederovo Manasija Vrsac Ljubljana Brus Ljubljana Belgrade Zagreb Novi Sad Budva
		}
	}
	air_wing_names_template = AIR_WING_NAME_YUG_FALLBACK
	small_plane_airframe = {
		prefix = 
		generic = {
			Vazduhoplovni Puk
		}
		generic_pattern = AIR_WING_NAME_YUG_GENERIC
		unique = {

		}
	}
	jet_fighter_equipment = {
		prefix = 
		generic = {
			Vazduhoplovni Puk
		}
		generic_pattern = AIR_WING_NAME_YUG_GENERIC
		unique = {

		}
	}
	medium_plane_fighter_airframe = {
		prefix = 
		generic = {
			Vazduhoplovni Puk
		}
		generic_pattern = AIR_WING_NAME_YUG_GENERIC
		unique = {

		}
	}
	small_plane_cas_airframe = {
		prefix = 
		generic = {
			Bombarderski Puk
		}
		generic_pattern = AIR_WING_NAME_YUG_GENERIC
		unique = {

		}
	}
	cv_small_plane_airframe = {
		prefix = 
		generic = {
			Vazduhoplovni Puk
		}
		generic_pattern = AIR_WING_NAME_YUG_GENERIC
		unique = {

		}
	}
	cv_small_plane_cas_airframe = {
		prefix = 
		generic = {
			Bombarderski Puk
		}
		generic_pattern = AIR_WING_NAME_YUG_GENERIC
		unique = {

		}
	}
	cv_small_plane_naval_bomber_airframe = {
		prefix = 
		generic = {
			Torpedo Komanda
		}
		generic_pattern = AIR_WING_NAME_YUG_GENERIC
		unique = {

		}
	}
	medium_plane_airframe = {
		prefix = 
		generic = {
			Bombarderski Puk
		}
		generic_pattern = AIR_WING_NAME_YUG_GENERIC
		unique = {

		}
	}
	jet_tac_bombe
# ... (truncated)
### Entity: National Focus
Tree: eth_focus
Component: ETH_improve_the_administration
Constructs: prerequisite, has_war, completion_reward, add_to_variable
Source: game
File: common/national_focus/ethiopia.txt

Code:
focus = {
	id = ETH_improve_the_administration
	icon = GFX_focus_generic_improve_the_administration
	prerequisite = {
		focus = ETH_university_of_capital
	}
	x = 0
	y = 1
	relative_position_id = ETH_university_of_capital
	cost = 10
	available = {

	}
	ai_will_do = {
		base = 1
		modifier = {
			factor = 0.5
			has_war = yes
		}
	}
	search_filters = {

	}
	completion_reward = {
		custom_effect_tooltip = ETH_improve_the_administration_tt
		add_to_variable = {
			ETH_bureaucracy_research_speed_factor = 0.05
		} {
			ETH_bureaucracy_production_speed_buildings_factor = 0.05
		} {
			ETH_bureaucracy_production_factory_max_efficiency_factor = 0.05
		}
		ETH_check_remove_corrupt_bureaucracy = yes
	}
}
### Entity: National Focus
Tree: arg_focus
Component: ARG_fleet_modernization
Constructs: prerequisite, completion_reward, add_doctrine_cost_reduction
Source: game
File: common/national_focus/r56_argentina.txt

Code:
focus = {
	id = ARG_fleet_modernization
	icon = GFX_goal_generic_large_fleet
	prerequisite = {
		focus = ARG_navy_reform
	}
	x = 19
	y = 1
	cost = 10
	completion_reward = {
		add_doctrine_cost_reduction = {
			name = ARG_fleet_modernization
			cost_reduction = 0.5
			uses = 1
			category = naval_doctrine
		}
	}
	search_filters = {
		FOCUS_FILTER_RESEARCH
	}
}
### Entity: Character
Component: JAP_yoshio_kodama
Source: game
File: common/characters/JAP.txt

Code:
JAP_yoshio_kodama = {
	name = JAP_yoshio_kodama
	portraits = {
		civilian = {
			large = GFX_portrait_JAP_yoshio_kodama_civilian
			small = GFX_portrait_JAP_yoshio_kodama_small
		}
	}
}
### Entity: National Focus
Tree: eth_focus
Component: ETH_red_army_engineers
Constructs: prerequisite, limit, add_ideas, has_government, completion_reward, set_technology, has_tech, add_tech_bonus
Source: game
File: common/national_focus/ethiopia.txt

Code:
focus = {
	id = ETH_red_army_engineers
	prerequisite = {
		focus = ETH_soviet_mediation
	}
	icon = GFX_focus_SOV_organize_wreckers
	relative_position_id = ETH_soviet_mediation
	x = 0
	y = 1
	cost = 10
	available = {

	}
	bypass = {
		SOV = {
			NOT = {
				has_government = communism
			}
		}
	}
	search_filters = {
		FOCUS_FILTER_INDUSTRY
	}
	completion_reward = {
		add_ideas = ETH_red_army_engineers
		if = {
			limit = {
				NOT = {
					has_tech = tech_engineers
				}
			}
			set_technology = {
				tech_engineers = 1
			} {
				tech_support = 1
			}
		}
		else = {
			add_tech_bonus = {
				name = ETH_red_army_engineers
				bonus = 0.5
				uses = 2
				category = support_tech
			}
		}
		IF = {
			limit = {
				is_subject_of = SOV
			}
			add_autonomy_score = {
				value = -20
				localization = ETH_red_army_engineers
			}
		}
	}
}
### Entity: Idea
Component: EAI_DD_20/medium_tank_destroyer_chassis_bonus
Constructs: equipment_bonus, build_cost_ic
Source: game
File: common/ideas/EAI_difficulty_ideas.txt

Code:
EAI_DD_20/medium_tank_destroyer_chassis_bonus = {
	allowed = {
		always = no
	}
	equipment_bonus = {
		medium_tank_destroyer_chassis = {
			build_cost_ic = -0.5
			instant = yes
		}
	}
}
### Entity: National Focus
Tree: waf_focus
Component: WAF_join_the_comintern
Constructs: prerequisite, limit, has_government, has_war_with, is_major, add_opinion_modifier, completion_reward, is_subject
Source: game
File: common/national_focus/r56_west_african_shared.txt

Code:
focus = {
	id = WAF_join_the_comintern
	icon = GFX_focus_chi_mission_to_the_soviet_union
	prerequisite = {
		focus = WAF_political_batallions WAF_seize_the_means_of_production
	}
	mutually_exclusive = {
		focus = WAF_lead_the_african_communist_movements
	}
	relative_position_id = WAF_political_batallions
	x = -1
	y = 1
	cost = 5
	available = {
		is_subject = no
		is_in_faction = no
		has_government = communism
		any_other_country = {
			is_major = yes
			has_government = communism
			is_faction_leader = yes
			NOT = {
				has_war_with = ROOT
			}
		}
	}
	completion_reward = {
		if = {
			limit = {
				SOV = {
					has_government = communism
					is_faction_leader = yes
					has_capitulated = no
					NOT = {
						has_war_with = ROOT
					}
				}
				NOT = {
					any_other_country = {
						is_in_faction_with = SOV
						has_war_with = ROOT
					}
				}
			}
			SOV = {
				country_event = {
					days = 1
					id = generic.2
				}
			} {
				add_opinion_modifier = {
					target = ROOT
					modifier = bra_amigo_outro_modifier
				}
			}
			add_opinion_modifier = {
				target = SOV
				modifier = bra_comercio_modifier
			} {
				target = SOV
				modifier = bra_amigo_modifier
			}
		}
		else = {
			get_best_alliance_match_communism_effect = yes
			var:best_leader = {
				country_event = generic.2
			}
		}
	}
	search_filters = {
		FOCUS_FILTER_ALLIANCE FOCUS_FILTER_POLITICAL
	}
}
### Entity: Event
Component: india.4411
Constructs: is_triggered_only, ai_chance, set_variable, add_extra_state_shared_building_slots, add_building_construction, random_list
Source: game
File: events/India.txt

Code:
country_event = {
	id = india.4411
	title = india.4411.t
	desc = india.4411.desc
	picture = GFX_report_event_picture_RAJ_Kashmir_Palace
	is_triggered_only = yes
	immediate = {
		set_variable = {
			current_state = 444
		}
	} {
		var:current_state = {
			set_variable = {
				temp_calc_chance = 100
			}
			subtract_from_variable = {
				temp_calc_chance = voting_chance
			}
		}
	}
	option = {
		ai_chance = {
			base = 20
		}
		name = india.4411.a
		441 = {
			prince_integration = yes
			add_extra_state_shared_building_slots = 1
			add_building_construction = {
				type = industrial_complex
				level = 1
				instant_build = yes
			}
		}
		var:current_state = {
			random_list = {
				0 = {
					modifier = {
						add = var:temp_calc_chance
						always = yes
					}
					RAJ = {
						country_event = {
							id = india.4440
							hours = 48
						}
					}
				} {
					modifier = {
						add = var:voting_chance
						always = yes
					}
					RAJ = {
						country_event = {
							id = india.4441
							hours = 48
						}
					}
				}
			}
		}
	}
}
### Entity: National Focus
Tree: chi_focus
Component: CHI_sea_rural_militias
Constructs: prerequisite, add_ideas, completion_reward, cancel_if_invalid
Source: game
File: common/national_focus/china_warlord_sea.txt

Code:
focus = {
	id = CHI_sea_rural_militias
	icon = GFX_goal_generic_military_sphere
	prerequisite = {
		focus = CHI_sea_public_works
	}
	x = 1
	y = 1
	relative_position_id = CHI_sea_public_works
	cost = 10
	ai_will_do = {
		base = 1
	}
	available = {

	}
	bypass = {

	}
	cancel_if_invalid = yes
	continue_if_invalid = no
	available_if_capitulated = no
	search_filters = {
		FOCUS_FILTER_MANPOWER
	}
	completion_reward = {
		add_ideas = CHI_rural_militias
	}
}