Losa10/PreTrain-HOI4-Modding-Assistant huggingface dataset:
### Entity: Event
Component: SEA_japan_popup_events.30
Constructs: is_triggered_only, ai_chance, has_country_flag, fire_only_once, has_game_rule, set_country_flag
Source: game
File: events/SEA_Japan.txt

Code:
country_event = {
	id = SEA_japan_popup_events.30
	title = SEA_japan_popup_events.30.t
	desc = SEA_japan_popup_events.30.desc
	picture = GFX_report_event_JAP_workers_celebrating
	is_triggered_only = yes
	fire_only_once = yes
	option = {
		name = SEA_japan_popup_events.30.a
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_country_flag = JAP_AI_RANDOM_COMMUNIST_2
					has_game_rule = {
						rule = JAP_ai_behavior
						option = COMMUNIST_2
					}
				}
			}
		}
		custom_effect_tooltip = JAP_supported_the_kozaha_idea_tt
		hidden_effect = {
			set_country_flag = JAP_supported_the_kozaha_idea_flag
		}
	} {
		name = SEA_japan_popup_events.30.b
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_country_flag = JAP_AI_RANDOM_COMMUNIST
					has_game_rule = {
						rule = JAP_ai_behavior
						option = COMMUNIST
					}
				}
			}
		}
		custom_effect_tooltip = JAP_supported_the_rounoha_idea_tt
		hidden_effect = {
			set_country_flag = JAP_supported_the_rounoha_idea_flag
		}
	}
}
### Entity: Character
Component: JAP_naoki_hoshino
Constructs: has_completed_focus
Source: game
File: common/characters/JAP.txt

Code:
JAP_naoki_hoshino = {
	name = JAP_naoki_hoshino
	portraits = {
		civilian = {
			small = GFX_portrait_JAP_naoki_hoshino_small
		}
	}
	advisor = {
		slot = political_advisor
		idea_token = JAP_naoki_hoshino
		allowed = {
			OR = {
				original_tag = JAP MAN
			}
		}
		visible = {
			NOT = {
				has_completed_focus = JAP_okadas_military_purge_speech JAP_revere_the_emperor_destroy_the_traitors
			}
		}
		available = {
			OR = {
				has_completed_focus = JAP_form_the_great_japan_industrial_patriotic_association
				tag = MAN
			}
		}
		traits = {
			FRA_national_syndicalist
		}
		ai_will_do = {
			base = 2
		}
	}
}
### Entity: State History
Component: 1030
Constructs: add_core_of
Source: game
File: history/states/1030 - Gyeongsang.txt

Code:
state = {
	id = 1030
	name = STATE_1030
	manpower = 4761368
	state_category = town
	resources = {

	}
	history = {
		owner = JAP
		add_core_of = KOR
		buildings = {
			infrastructure = 2
			dockyard = 1
			4056 = {
				naval_base = 4
			}
		}
		victory_points = {
			4056 5
		} {
			12089 1
		}
	}
	provinces = {
		1054 1081 4056 4086 7121 10085 12060 12089
	}
	local_supplies = 0.0
}
### Entity: Event
Component: cityfall.96
Constructs: is_triggered_only, set_state_flag, set_global_flag, save_event_target_as
Source: game
File: events/CFM_city_events.txt

Code:
news_event = {
	id = cityfall.96
	title = cityfall.96.t
	desc = cityfall.96.desc
	picture = GFX_news_event_fall_of_sevastopol
	major = yes
	is_triggered_only = yes
	immediate = {
		137 = {
			set_state_flag = state_has_fallen
		}
		set_global_flag = fall_of_sevastopol
		FROM.FROM = {
			save_event_target_as = old_controller
		}
		ROOT = {
			save_event_target_as = new_controller
		}
	}
	option = {
		name = cityfall.88.a
		trigger = {
			tag = event_target:old_controller
		}
	} {
		name = cityfall.88.b
		trigger = {
			tag = event_target:new_controller
		}
	} {
		name = cityfall.88.c
		trigger = {
			NOT = {
				tag = event_target:old_controller event_target:new_controller
			}
		}
	}
}
### Entity: Event
Component: kmt.14
Constructs: is_triggered_only, ai_chance, has_country_flag, fire_only_once, add_political_power, declare_war_on, annex_everything
Source: game
File: events/r56_KMT_events.txt

Code:
country_event = {
	id = kmt.14
	title = kmt.14.t
	picture = GFX_report_event_generic_read_write
	desc = {
		text = kmt.14.d_1
		trigger = {
			CHI = {
				NOT = {
					has_country_flag = mcmahon_case_to_ENG
				}
			}
		}
	} {
		text = kmt.14.d_2
		trigger = {
			CHI = {
				has_country_flag = mcmahon_case_to_ENG
			}
		}
	}
	is_triggered_only = yes
	fire_only_once = yes
	option = {
		ai_chance = {
			base = 50
		}
		name = kmt.14.a
		add_political_power = -250
	} {
		ai_chance = {
			base = 50
		}
		name = kmt.14.b
		CHI = {
			declare_war_on = {
				target = RAJ
				type = annex_everything
			}
		}
	}
}
### Entity: Event
Component: naw_norway.24
Constructs: is_triggered_only
Source: game
File: events/NaW_Norway.txt

Code:
country_event = {
	id = naw_norway.24
	title = naw_norway.24.t
	desc = naw_norway.24.d
	picture = GFX_report_event_finnish_letter
	is_triggered_only = yes
	option = {
		name = naw_norway.24.a
	}
}
### Entity: Technology
Component: streamlined_line
Constructs: research_cost
Source: game
File: common/technologies/industry.txt

Code:
technology = {
	production_factory_max_efficiency_factor = 0.1
	production_factory_efficiency_gain_factor = 0.1
	research_cost = 2.5
	start_year = 1943
	XOR = {
		flexible_line
	}
	folder = {
		name = industry_folder
		position = {
			x = 1
			y = 10
		}
	}
	ai_will_do = {
		factor = 15
		modifier = {
			factor = 10
			date = > 1943.1.1
		}
	}
	categories = {
		industry cat_production
	}
}
### Entity: Order of Battle
Component: air_wing_307
Source: game
File: history/units/VEN_1939_air_legacy.txt

Code:
air_wings = {
	307 = {
		fighter_equipment_0 = {
			owner = VEN
			amount = 12
		}
	}
}
### Entity: National Focus
Tree: arg_focus
Component: ARG_the_clean_election
Constructs: has_completed_focus, limit, completion_reward, add_political_power, allow_branch, has_game_rule, swap_ideas, remove_idea
Source: game
File: common/national_focus/argentina.txt

Code:
focus = {
	id = ARG_the_clean_election
	icon = GFX_focus_ARG_the_clean_election
	x = 0
	y = 0
	cost = 10
	mutually_exclusive = {
		focus = ARG_a_call_to_reform ARG_roberto_maria_ortiz
	}
	available = {

	}
	allow_branch = {
		IF = {
			limit = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
			}
			NOT = {
				has_completed_focus = ARG_roberto_maria_ortiz
			} {
				has_completed_focus = ARG_a_call_to_reform
			}
		}
	}
	ai_will_do = {
		factor = 15
	}
	search_filters = {

	}
	completion_reward = {
		add_political_power = 120
		swap_ideas = {
			remove_idea = ARG_infamous_decade_idea
			add_idea = ARG_infamous_decade_3_idea
		}
		if = {
			limit = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
			}
			mark_focus_tree_layout_dirty = yes
		}
	}
}
### Entity: Unit Leader
Component: 1
Source: game
File: common/unit_leader/00_attack_skills.txt

Code:
1 = {
	cost = 100
	type = field_marshal
	modifier = {
		offence = 0.025
	}
}
### Entity: National Focus
Tree: swi_focus
Component: SWI_choose_cons
Constructs: prerequisite, has_government, completion_reward, has_offensive_war, swap_ideas, remove_idea, add_idea, add_to_variable
Source: game
File: common/national_focus/r56_switzerland.txt

Code:
focus = {
	id = SWI_choose_cons
	icon = GFX_focus_generic_little_entente
	cost = 10
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0.5
			OR = {
				has_government = fascism communism
			}
		} {
			factor = 0.2
			has_offensive_war = yes
		} {
			factor = 10
			NOT = {
				has_government = fascism communism
			}
			has_offensive_war = no
			threat = > 0.3
		}
	}
	prerequisite = {
		focus = SWI_update_army
	} {
		focus = SWI_modern_arty
	}
	mutually_exclusive = {
		focus = SWI_end_con
	}
	available_if_capitulated = yes
	x = 37
	y = 2
	completion_reward = {
		custom_effect_tooltip = SWI_choose_cons_tt
		swap_ideas = {
			remove_idea = SWI_special_conscription_1
			add_idea = SWI_special_conscription_2
		}
		hidden_effect = {
			add_to_variable = {
				var = SWI_manpower_pool
				value = 150000
			}
		}
	}
}
### Entity: Effect Reference
Construct: get_supply_vehicles
Source: vanilla_docs
File: documentation/effects_documentation.md

Doc:
## get_supply_vehicles

* Supported Scopes: COUNTRY
* Supported Targets: none

```
sets a variable to the number of supply vehicles in stockpile or that are needed. example 
get_supply_vehicles = { 
	var = num_vehicles #variable to set 
	type = truck #can be truck or train 
	need = yes #default no. If yes, gets the number of needed vehicles 
} 

```
### Entity: Event
Component: r56.news_event.9
Constructs: is_triggered_only
Source: game
File: events/r56_news_events.txt

Code:
news_event = {
	id = r56.news_event.9
	title = r56.news_event.9.t
	desc = r56.news_event.9.d
	picture = GFX_news_event_south_america_soviet_advisor
	is_triggered_only = yes
	option = {
		name = r56.news_event.9.a
		trigger = {
			NOT = {
				tag = PAR
			}
		}
	} {
		name = r56.news_event.9.b
		trigger = {
			tag = PAR
		}
	}
}
### Entity: Event
Component: india.4270
Constructs: is_triggered_only, ai_chance, set_variable, random_list
Source: game
File: events/India.txt

Code:
country_event = {
	id = india.4270
	title = india.4270.t
	desc = india.4270.desc
	picture = GFX_report_event_picture_RAJ_Railway
	is_triggered_only = yes
	immediate = {
		set_variable = {
			current_state = 1013
		}
	} {
		var:current_state = {
			set_variable = {
				temp_calc_chance = 100
			}
			subtract_from_variable = {
				temp_calc_chance = voting_chance
			}
		}
	}
	option = {
		ai_chance = {
			base = 20
		}
		name = india.4270.a
		427 = {
			prince_independence_effect = yes
		}
		var:current_state = {
			random_list = {
				0 = {
					modifier = {
						add = var:temp_calc_chance
						always = yes
					}
					RAJ = {
						country_event = {
							id = india.10130
							hours = 48
						}
					}
				} {
					modifier = {
						add = var:voting_chance
						always = yes
					}
					RAJ = {
						country_event = {
							id = india.10131
							hours = 48
						}
					}
				}
			}
		}
	}
}
### Entity: National Focus
Tree: nor_focus
Component: NOR_print_more_money
Constructs: prerequisite, has_government, completion_reward, add_timed_idea
Source: game
File: common/national_focus/norway.txt

Code:
focus = {
	id = NOR_print_more_money
	icon = GFX_focus_hol_abandon_the_gold_standard
	prerequisite = {
		focus = NOR_leaving_the_hard_thirties_behind
	}
	x = 0
	y = 2
	relative_position_id = NOR_leaving_the_hard_thirties_behind
	cost = 10
	available = {
		has_government = democratic
	}
	search_filters = {
		FOCUS_FILTER_INDUSTRY
	}
	completion_reward = {
		NOR_reduce_hard_thirties_ns = yes
		add_timed_idea = {
			idea = NOR_printing_money_ns
			days = 365
		}
	}
}
### Entity: Idea
Component: TUR_turkish_interventionism
Constructs: removal_cost, send_volunteers_tension, send_volunteer_size
Source: game
File: common/ideas/turkey.txt

Code:
TUR_turkish_interventionism = {
	allowed = {
		always = no
	}
	allowed_civil_war = {
		always = yes
	}
	picture = generic_flexible_foreign_policy
	removal_cost = -1
	modifier = {
		lend_lease_tension = -0.4
		send_volunteers_tension = -0.4
		send_volunteer_size = 6
		justify_war_goal_time = -0.6
		generate_wargoal_tension = -0.4
	}
}
### Entity: Character
Component: NEP_w_r_parker_gill
Source: game
File: common/characters/NEP.txt

Code:
NEP_w_r_parker_gill = {
	advisor = {
		slot = political_advisor
		idea_token = NEP_w_r_parker_gill
		allowed = {
			original_tag = NEP
		}
		traits = {
			backroom_backstabber
		}
		ai_will_do = {
			factor = 0.0
		}
	}
	name = NEP_w_r_parker_gill
	portraits = {
		army = {
			small = GFX_idea_generic_political_advisor_asia_2
		}
	}
}
### Entity: National Focus
Tree: egy_focus
Component: EGY_commonwealth_air_training_plan
Constructs: has_completed_focus, prerequisite, add_ideas, completion_reward, is_ally_with
Source: game
File: common/national_focus/egypt.txt

Code:
focus = {
	id = EGY_commonwealth_air_training_plan
	icon = GFX_goal_generic_air_fighter2
	relative_position_id = EGY_the_nile_strategy
	x = 1
	y = 2
	cost = 5
	available = {
		is_ally_with = ENG
		ENG = {
			has_completed_focus = ENG_british_commonwealth_air_training_plan
		}
	}
	prerequisite = {
		focus = EGY_imperial_air_bases
	} {
		focus = EGY_cairo_logistics
	}
	search_filters = {
		FOCUS_FILTER_AIR_XP
	}
	ai_will_do = {
		factor = 10
	}
	completion_reward = {
		air_experience = 10
		add_ideas = ENG_joint_air_training_scheme
	}
}
### Entity: Idea
Component: CHI_christian_democracy
Constructs: has_government, industrial_capacity_factory, removal_cost, democratic_drift
Source: game
File: common/ideas/r56_warlord_ideas.txt

Code:
CHI_christian_democracy = {
	picture = MEX_church_power_2
	cancel = {
		NOT = {
			has_government = democratic
		}
	}
	removal_cost = -1
	available = {

	}
	modifier = {
		democratic_drift = 0.03
		industrial_capacity_factory = 0.05
	}
	allowed = {
		always = no
	}
	allowed_civil_war = {
		always = yes
	}
}
### Entity: National Focus
Tree: kal_focus
Component: KAL_modern_logistics
Constructs: prerequisite, add_ideas, completion_reward, has_tech, cancel_if_invalid, every_army_leader, add_logistics, add_tech_bonus
Source: game
File: common/national_focus/kalmykia.txt

Code:
focus = {
	id = KAL_modern_logistics
	icon = GFX_goal_ammunitions
	text = ABC_modern_logistics
	prerequisite = {
		focus = KAL_field_hospitals
	} {
		focus = KAL_mechanization_effort
	} {
		focus = KAL_signal_companies
	}
	x = 0
	y = 1
	relative_position_id = KAL_mechanization_effort
	cost = 10
	ai_will_do = {
		factor = 1
	}
	available = {
		has_tech = motorised_infantry
	}
	cancel_if_invalid = yes
	completion_reward = {
		every_army_leader = {
			add_logistics = 1
		}
		add_ideas = ABC_modern_logistics_idea
		add_tech_bonus = {
			name = motorized_bonus
			bonus = 3
			uses = 1
			category = logistics_tech
		}
	}
	search_filters = {
		FOCUS_FILTER_MILITARY_IMPROVEMENT FOCUS_FILTER_RESEARCH
	}
}
### Entity: Decision
Component: INS_pacific_revolution_cat
Constructs: has_completed_focus, add_equipment_to_stockpile, limit, has_government, has_country_flag, add_stability, fire_only_once, is_owned_by
Source: game
File: common/decisions/INS.txt

Code:
INS_pacific_revolution_cat = {
	INS_instigate_in_country = {
		icon = GFX_decision_eng_propaganda_campaigns
		allowed = {
			original_tag = INS
		}
		highlight_states = {
			highlight_states_trigger = {
				is_owned_by = FROM
			}
		}
		target_root_trigger = {
			has_completed_focus = INS_pacific_revolution
		}
		visible = {
			NOT = {
				has_country_flag = INS_coup_in_progress
			}
		}
		target_trigger = {
			FROM = {
				OR = {
					tag = MAL SIA PHI AST NZL BRM VIN LAO CAM GDC GXC YUN PNG WPG SRL SAR BRN SAB SNG TML BOU CHM CPS
				}
				NOT = {
					is_subject_of = ROOT
					has_government = communism
					has_country_flag = INS_has_already_done_revolution
				}
			}
		}
		cost = 25
		fire_only_once = no
		on_map_mode = map_and_decisions_view
		ai_will_do = {
			base = 5
			modifier = {
				factor = 10
				FROM = {
					OR = {
						tag = MAL SIA PHI AST NZL
					}
				}
			}
		}
		complete_effect = {
			FROM = {
				save_global_event_target_as = INS_revolution_target
				country_event = {
					id = INS_communist_events.6
					hours = 12
				}
				if = {
					limit = {
						is_subject = yes
					}
					overlord = {
						country_event = {
							id = INS_communist_events.7
							hours = 12
						}
					}
				}
			}
			set_country_flag = INS_coup_in_progress
		}
	}
	INS_abandon_mission = {
		icon = GFX_decision_BOL_reintegrate_litoral_department
		visible = {
			has_country_flag = INS_coup_in_progress
		}
		priority = 15
		complete_effect = {
			clr_country_flag = INS_coup_in_progress
			clear_global_event_target = INS_revolution_target
		}
	}
	INS_launch_revolution = {
		icon = GFX_decision_revolt
		visible = {
			has_country_flag = INS_coup_in_progress
		}
		target_root_trigger = {
			has_country_flag = INS_coup_in_progress
		}
		highlight_states = {
			highlight_states_trigger = {
				is_owned_by = FROM
			}
		}
		target_trigger = {
			FROM = {
				tag = event_target:INS_revolution_target
			}
		}
		ai_will_do = {
			base = 100
		}
		available = {
			if = {
				limit = {
					NOT = {
						has_completed_focus = INS_purge_oppurtunists INS_musso_ascends
					}
				}
				OR = {
					AND = {
						has_completed_focus = INS_purge_oppurtunists
						FROM = {
							communism = > 0.6
						}
					} {
						has_completed_focus = INS_musso_ascends
						FROM = {
							communism = > 0.3
						}
					}
				}
			}
			else_if = {
				limit = {
					has_complete
# ... (truncated)
### Entity: State History
Component: 865
Constructs: add_core_of
Source: game
File: history/states/865-Northern Saskatchewan.txt

Code:
state = {
	id = 865
	name = STATE_865
	provinces = {
		1671 3800 4695 6779 12682 13168 13183 13185 13187
	}
	history = {
		owner = CAN
		add_core_of = CAN
		buildings = {
			infrastructure = 1
		}
	}
	manpower = 65605
	state_category = pastoral
	buildings_max_level_factor = 1.0
	local_supplies = 0.0
}
### Entity: Character
Component: RAJ_GOE_subcontinent_chaos
Source: game
File: common/characters/RAJ.txt

Code:
RAJ_GOE_subcontinent_chaos = {
	name = RAJ_GOE_subcontinent_chaos
	portraits = {
		civilian = {
			small = GFX_portrait_SWE_fallen_riksdag_small
			large = GFX_portrait_SWE_fallen_riksdag
		}
	}
}
### Entity: Scripted Effect
Component: EAI_FOCUS_CONFIG_types
Constructs: set_variable
Source: game
File: common/scripted_effects/EAI_MILITARY_FOCUS_config_effects.txt

Code:
EAI_FOCUS_CONFIG_types = {
	set_variable = {
		global.EAI_OFF = 1
	} {
		global.EAI_ON = 2
	} {
		global.EAI_HISTORICAL = 9999
	} {
		global.EAI_MW_DOCTRINE = 1
	} {
		global.EAI_SF_DOCTRINE = 2
	} {
		global.EAI_GB_DOCTRINE = 3
	} {
		global.EAI_MA_DOCTRINE = 4
	} {
		global.EAI_LEFT_PATH = 1
	} {
		global.EAI_RIGHT_PATH = 2
	} {
		global.EAI_20W_INF_WIDTH = 1
	} {
		global.EAI_26W_INF_WIDTH = 2
	} {
		global.EAI_40W_INF_WIDTH = 3
	} {
		global.EAI_10W_INF_WIDTH = 4
	} {
		global.EAI_A_INF_DESIGN = 1
	} {
		global.EAI_B_INF_DESIGN = 2
	} {
		global.EAI_C_INF_DESIGN = 3
	} {
		global.EAI_LARM_FOCUS = 1
	} {
		global.EAI_MARM_FOCUS = 2
	} {
		global.EAI_HARM_FOCUS = 3
	} {
		global.EAI_AT_FOCUS = 4
	} {
		global.EAI_MOT_FOCUS = 5
	} {
		global.EAI_A_ARM_DESIGN = 1
	} {
		global.EAI_B_ARM_DESIGN = 2
	} {
		global.EAI_C_ARM_DESIGN = 3
	} {
		global.EAI_A_MARM_DESIGN = 1
	} {
		global.EAI_B_MARM_DESIGN = 2
	} {
		global.EAI_C_MARM_DESIGN = 3
	} {
		global.EAI_A_HARM_DESIGN = 1
	} {
		global.EAI_B_HARM_DESIGN = 2
	} {
		global.EAI_C_HARM_DESIGN = 3
	} {
		global.EAI_20W_ARM_WIDTH = 1
	} {
		global.EAI_26W_ARM_WIDTH = 2
	} {
		global.EAI_40W_ARM_WIDTH = 3
	} {
		global.EAI_MOT_ATTACHMENT = 1
	} {
		global.EAI_LARM_ATTACHMENT = 2
	} {
		global.EAI_MARM_ATTACHMENT = 3
	} {
		global.EAI_HARM_ATTACHMENT = 4
	} {
		global.EAI_NO_ATTACHMENT = 5
	} {
		global.EAI_LINE_AT_DESIGN = 1
	} {
		global.EAI_MTD_AT_DESIGN = 2
	} {
		global.EAI_HTD_AT_DESIGN = 3
	} {
		global.EAI_A_MOT_DESIGN = 1
	} {
		global.EAI_B_MOT_DESIGN = 2
	} {
		global.EAI_C_MOT_DESIGN = 3
	} {
		global.EAI_NO_SPEC_OPS = 1
	} {
		global.EAI_MNT_SPEC_OPS = 2
	} {
		global.EAI_MAR_SPEC_OPS = 3
	} {
		global.EAI_SD_DOCTRINE = 1
	} {
		global.EAI_BFS_DOCTRINE = 2
	} {
		global.EAI_OI_DOCTRINE = 3
	} {
		global.EAI_NO_GROUND_AIR = 3
	} {
		global.EAI_CAS_AIR = 1
	} {
		global.EAI_TAC_AIR = 2
	} {
		global.EAI_BOTH_GROUND_AIR = 4
	} {
		global.EAI_FTR_A = 2
	} {
		global.EAI_FTR_B = 3
	} {
		global.EAI_FIGHTER_VARIANT_A = 0
	} {
		global.EAI_FIGHTER_VARIANT_B = 1
	} {
		global.EAI_FIGHTER_VARIANT_C = 2
	} {
		global.EAI_FIGHTER_VARIANT_D = 3
	} {
		global.EAI_FIGHTER_VARIANT_E = 4
	} {
		global.EAI_HFTR_A = 2
	} {
		global.EAI_HFTR_B = 3
	} {
		global.EAI_FIB_DOCTRINE = 1
	} {
		global.EAI_TI_DOCTRINE = 2
	} {
		global.EAI_BS_DOCTRINE = 3
	} {
		global.EAI_A_BB_DESIGN = 2
	} {
		global.EAI_B_BB_DESIGN = 3
	} {

# ... (truncated)
### Entity: Scripted Effect
Component: EAI_MATH_square
Constructs: limit
Source: game
File: common/scripted_effects/EAI_MATH_effects.txt

Code:
EAI_MATH_square = {
	if = {
		limit = {
			EAI_MATH_TRIGGER_square = yes
		}
	}
}
### Entity: Scripted Effect
Component: SWI_give_wargoal_to_angriest_country
Constructs: limit, has_variable, create_wargoal
Source: game
File: common/scripted_effects/SWI_scripted_effects.txt

Code:
SWI_give_wargoal_to_angriest_country = {
	if = {
		limit = {
			SWI = {
				has_variable = SWI_angriest_country
			}
		}
		var:SWI.SWI_angriest_country = {
			create_wargoal = {
				type = topple_government
				target = SWI
			}
		}
	}
}
### Entity: Event
Component: rt56.rom_general_election.4
Constructs: is_triggered_only, add_stability, add_political_power, add_popularity
Source: game
File: events/r56_romania.txt

Code:
country_event = {
	id = rt56.rom_general_election.4
	title = rt56.rom_general_election.4.t
	desc = rt56.rom_general_election.4.d
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = rt56.rom_general_election.4.a
		add_political_power = -100
		add_popularity = {
			ideology = communism
			popularity = 0.05
		} {
			ideology = fascism
			popularity = 0.05
		} {
			ideology = democratic
			popularity = -0.1
		}
		add_stability = -0.3
	}
}
### Entity: Event
Component: bftb_bulgaria_factions.05
Constructs: is_triggered_only, has_completed_focus, has_country_flag, random_list, check_variable, has_stability, random_days
Source: game
File: events/BFTB_Bulgaria.txt

Code:
country_event = {
	id = bftb_bulgaria_factions.05
	hidden = yes
	is_triggered_only = yes
	immediate = {
		random_list = {
			10 = {
				modifier = {
					add = 30
					has_country_flag = BUL_zveno_dissident_event_flag
				} {
					add = 30
					has_country_flag = {
						flag = BUL_zveno_dissident_event_flag
						value = > 1
					}
				} {
					add = 40
					has_country_flag = {
						flag = BUL_zveno_dissident_event_flag
						value = > 2
					}
				} {
					add = 80
					has_country_flag = {
						flag = BUL_zveno_dissident_event_flag
						value = > 3
					}
				} {
					add = 20
					check_variable = {
						BUL_zveno_popularity = 25
						compare = greater_than_or_equals
					}
				} {
					add = 30
					check_variable = {
						BUL_zveno_popularity = 50
						compare = greater_than_or_equals
					}
				} {
					add = 40
					check_variable = {
						BUL_zveno_popularity = 75
						compare = greater_than_or_equals
					}
				} {
					add = 20
					has_completed_focus = BUL_dissolve_the_military_union
				} {
					add = 20
					has_stability = < 0.5
				} {
					add = 25
					has_stability = < 0.25
				} {
					add = 30
					has_stability = < 0.15
				} {
					add = -30
					check_variable = {
						BUL_zveno_loyalty = 75
						compare = greater_than_or_equals
					}
				} {
					add = -15
					check_variable = {
						BUL_zveno_loyalty = 50
						compare = greater_than_or_equals
					}
				} {
					add = -5
					check_variable = {
						BUL_zveno_loyalty = 25
						compare = greater_than_or_equals
					}
				} {
					add = -10
					has_completed_focus = BUL_cooperate_with_the_zveno
				} {
					add = -10
					has_country_flag = BUL_zveno_repressed_flag
				} {
					add = -10
					has_country_flag = BUL_disposed_of_zveno_generals_flag
				} {
					add = -20
					has_country_flag = BUL_zveno_leaders_imprisoned_flag
				} {
					add = -20
					has_country_flag = BUL_raided_zveno_supporters_flag
				}
				country_event = {
					id = bftb_bulgaria_factions.12
					days = 15
					random_days = 10
				}
			}
			90 = {

			}
		}
	}
}