Losa10/PreTrain-HOI4-Modding-Assistant huggingface dataset:
### Entity: Event
Component: AAT_Sweden_BoP.13
Constructs: is_triggered_only, ai_chance, limit, has_country_flag, set_variable, add_to_variable, add_trait, set_party_name
Source: game
File: events/AAT_Sweden.txt

Code:
country_event = {
	id = AAT_Sweden_BoP.13
	title = AAT_Sweden_BoP.13.t
	desc = AAT_Sweden_BoP.13.desc
	picture = GFX_report_event_election_vote
	is_triggered_only = yes
	hidden = yes
	immediate = {
		hidden_effect = {
			set_variable = {
				SWE_combined_left_support = 0
			} {
				SWE_combined_right_support = 0
			}
			add_to_variable = {
				SWE_combined_left_support = party_popularity@communism
			} {
				SWE_combined_left_support = party_popularity@democratic
			} {
				SWE_combined_right_support = party_popularity@fascism
			} {
				SWE_combined_right_support = party_popularity@neutrality
			}
		}
		IF = {
			limit = {
				OR = {
					has_country_flag = SWE_1936_fallen_riksdag SWE_1936_axel_pehrssonbramstorp_is_pm
				}
			}
			promote_character = SWE_per_albin_hansson
			SWE_per_albin_hansson = {
				add_trait = {
					trait = SWE_solidified_mandate
					ideology = socialism
				} {
					trait = SWE_reluctant_towards_rearmament
					ideology = socialism
				}
			}
			set_party_name = {
				ideology = democratic
				name = SWE_democratic_party
				long_name = SWE_democratic_party_long
			}
		}
	}
	option = {
		name = AAT_Sweden_BoP.13.a
		ai_chance = {
			base = 10
		}
		IF = {
			limit = {
				communism = > 0.5
			}
			set_power_balance = {
				id = SWE_riksdag_political_balance
				set_value = -0.8
			}
			set_country_flag = SWE_socialist_victory
			country_event = {
				id = AAT_Sweden_BoP.14
				hours = 1
			}
		}
		ELSE_IF = {
			limit = {
				democratic = > 0.5
			}
			set_power_balance = {
				id = SWE_riksdag_political_balance
				set_value = -0.3
			}
			set_country_flag = SWE_democratic_victory
			country_event = {
				id = AAT_Sweden_BoP.14
				hours = 1
			}
		} {
			limit = {
				neutrality = > 0.5
			}
			set_power_balance = {
				id = SWE_riksdag_political_balance
				set_value = 0.3
			}
			set_country_flag = SWE_non_aligned_victory
			country_event = {
				id = AAT_Sweden_BoP.14
				hours = 1
			}
		} {
			limit = {
				fascism = > 0.5
			}
			set_power_balance = {
				id = SWE_riksdag_political_balance
				set_value = 0.9
			}
			set_country_flag = SWE_fascist_victory
			country_event = {
				id = AAT_Sweden_BoP.14
				hours = 1
			}
		} {
			limit = {
				check_variable = {
					var = SWE_combined_left_support
					value = 0.5
					compare = greater_than_or_equals
				}
			}
			set_power_balance = {
				id = SWE_riksdag_political_bala
# ... (truncated)
### Entity: Idea
Component: SAX_fascist_guy
Constructs: has_government
Source: game
File: common/ideas/saxony.txt

Code:
SAX_fascist_guy = {
	picture = generic_political_advisor_europe_2
	allowed = {
		original_tag = SAX
	}
	traits = {
		fascist_demagogue
	}
	do_effect = {
		NOT = {
			has_government = fascism
		}
	}
	ai_will_do = {
		factor = 0
	}
}
### Entity: National Focus
Tree: lit_focus
Component: LIT_state_media
Constructs: prerequisite, add_ideas, completion_reward
Source: game
File: common/national_focus/lithuania.txt

Code:
focus = {
	id = LIT_state_media
	icon = GFX_goal_generic_radar
	prerequisite = {
		focus = LIT_the_nation_and_its_power
	}
	x = -1
	y = 1
	relative_position_id = LIT_the_nation_and_its_power
	cost = 10
	ai_will_do = {
		factor = 1
	}
	available = {

	}
	bypass = {

	}
	available_if_capitulated = no
	search_filters = {
		FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT
	}
	completion_reward = {
		add_ideas = {
			LIT_state_media
		}
	}
}
### Entity: Idea
Component: KMT_military_planning_SIC
Constructs: removal_cost
Source: game
File: common/ideas/r56_china.txt

Code:
KMT_military_planning_SIC = {
	picture = chi_wargaming_division
	cancel = {
		SIC = {
			exists = no
		}
	}
	removal_cost = -1
	allowed_civil_war = {
		always = yes
	}
	targeted_modifier = {
		tag = SIC
		attack_bonus_against = 0.1
	}
}
### Entity: Idea
Component: gotaverken
Constructs: research_bonus, equipment_bonus
Source: game
File: common/ideas/sweden.txt

Code:
gotaverken = {
	picture = generic_naval_manufacturer_2
	allowed = {
		original_tag = SWE
	}
	research_bonus = {
		naval_equipment = 0.15
	}
	equipment_bonus = {

	}
	traits = {
		atlantic_fleet_naval_manufacturer
	}
	modifier = {

	}
}
### Entity: National Focus
Tree: per_focus
Component: PER_increase_education_funds
Constructs: prerequisite, add_ideas, completion_reward
Source: game
File: common/national_focus/r56_persia.txt

Code:
focus = {
	id = PER_increase_education_funds
	icon = GFX_goal_generic_scientific_exchange
	cost = 10
	prerequisite = {
		focus = PER_align_the_army
	}
	x = 1
	y = 1
	relative_position_id = PER_align_the_army
	ai_will_do = {
		factor = 56
	}
	completion_reward = {
		add_ideas = PER_increase_education_funds
	}
	search_filters = {
		FOCUS_FILTER_RESEARCH
	}
}
### Entity: Character
Component: r56w_trait_minister_barry_white
Source: game
File: common/country_leader/r56_WHY_characters_traits.txt

Code:
r56w_trait_minister_barry_white = {
	random = no
	sprite = 9
	army_speed_factor = 0.05
	army_org_factor = 0.05
	training_time_army_factor = -0.05
}
### Entity: Event
Component: bftb_bulgaria_soviet_influence.2
Constructs: is_triggered_only, limit, every_country, add_opinion_modifier, fire_only_once, give_guarantee, is_in_faction_with
Source: game
File: events/BFTB_Bulgaria.txt

Code:
country_event = {
	id = bftb_bulgaria_soviet_influence.2
	title = bftb_bulgaria_soviet_influence.2.t
	desc = bftb_bulgaria_soviet_influence.2.desc
	picture = GFX_report_event_bul_dimitrov_with_stalin
	is_triggered_only = yes
	fire_only_once = yes
	option = {
		name = bftb_bulgaria_soviet_influence.2.a
		effect_tooltip = {
			add_opinion_modifier = {
				target = FROM
				modifier = BUL_strengthened_relations_with_us
			}
			FROM = {
				hidden_effect = {
					country_event = bftb_bulgaria_soviet_influence.3
				}
				add_opinion_modifier = {
					target = ROOT
					modifier = BUL_strengthened_relations_with_us
				}
				give_guarantee = ROOT
				diplomatic_relation = {
					country = ROOT
					relation = non_aggression_pact
					active = yes
				}
			}
			every_country = {
				limit = {
					OR = {
						tag = ENG FRA GER
					}
					NOT = {
						is_in_faction_with = FROM
					}
				}
				add_opinion_modifier = {
					target = ROOT
					modifier = BUL_approached_the_ussr
				}
			}
		}
	}
}
### Entity: National Focus
Tree: pru_focus
Component: PRU_industrial_modernization
Constructs: has_completed_focus, prerequisite, completion_reward, add_tech_bonus, industrial_bonus, random_owned_controlled_state, add_extra_state_shared_building_slots, swap_ideas
Source: game
File: common/national_focus/peru.txt

Code:
focus = {
	id = PRU_industrial_modernization
	icon = GFX_goal_generic_production
	x = 1
	y = 1
	cost = 5
	prerequisite = {
		focus = PRU_compania_minera_atacocha
	} {
		focus = PRU_plan_limas_expansion
	}
	relative_position_id = PRU_plan_limas_expansion
	ai_will_do = {
		factor = 5
	}
	available = {
		OR = {
			has_completed_focus = PRU_mediate_between_the_parties PRU_empower_benavides PRU_legacy_of_sachez_cerro PRU_look_to_the_past
		}
	}
	completion_reward = {
		add_tech_bonus = {
			name = industrial_bonus
			bonus = 1
			uses = 2
			category = industry
		}
		random_owned_controlled_state = {
			add_extra_state_shared_building_slots = 4
		}
		swap_ideas = {
			remove_idea = PRU_stagnant_economy_1
			add_idea = PRU_stagnant_economy_2
		}
		custom_effect_tooltip = available_political_advisor
		show_ideas_tooltip = PRU_belaunde
	}
	search_filters = {
		FOCUS_FILTER_RESEARCH
	}
}
### Entity: Event
Component: lithuania.35
Constructs: is_triggered_only
Source: game
File: events/r56_lithuania.txt

Code:
country_event = {
	id = lithuania.35
	title = lithuania.35.t
	desc = lithuania.35.desc
	picture = GFX_report_event_ast_navy
	is_triggered_only = yes
	option = {
		name = lithuania.35.a
		hidden_effect = {
			country_event = {
				id = lithuania.37
				days = 30
			}
		}
	} {
		name = lithuania.35.b
		hidden_effect = {
			ITA = {
				country_event = {
					id = lithuania.36
				}
			}
		}
	}
}
### Entity: Event
Component: AFG_industrial_events.31
Constructs: is_triggered_only, ai_chance, random_days, is_in_faction_with
Source: game
File: events/GOE_Afghanistan.txt

Code:
country_event = {
	id = AFG_industrial_events.31
	title = AFG_industrial_events.31.t
	desc = AFG_industrial_events.31.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes
	option = {
		name = AFG_industrial_events.31.a
		ai_chance = {
			base = 10
		}
		FROM = {
			country_event = {
				id = AFG_industrial_events.32
				days = 7
				random_days = 4
			}
		}
	} {
		name = AFG_industrial_events.31.b
		ai_chance = {
			base = 5
			modifier = {
				factor = 0
				is_in_faction_with = FROM
			}
		}
		FROM = {
			country_event = {
				id = AFG_industrial_events.33
				days = 7
				random_days = 4
			}
		}
		custom_effect_tooltip = AFG_industrial_events_31_tt
	}
}
### Entity: Scorer
Component: EAI_SCORER_operation_steal_tech_army
Constructs: has_government, has_war_with, has_country_flag, is_major, check_variable, is_running_operation_steal_tech_army_, has_token_army_, set_temp_variable
Source: game
File: common/scorers/country/EAI_operation_target_scorers.txt

Code:
EAI_SCORER_operation_steal_tech_army = {
	targets = {
		target_array = potential_and_current_enemies enemies_of_allies neighbors global.majors
		target_root_trigger = {
			check_variable = {
				EAI_ESP_available_operatives = > 2
			}
		}
		score = {
			base = 300
			modifier = {
				factor = 0.01
				has_country_flag = EAI_operation_timeout_@FROM
			} {
				factor = 0
				FROM = {
					has_country_flag = is_running_operation_steal_tech_army_@PREV
				}
			} {
				factor = 0
				NOT = {
					FROM = {
						has_country_flag = has_token_army_@PREV
					}
				}
			} {
				factor = 0
				tag = FROM
			} {
				factor = 0
				NOT = {
					num_of_controlled_states = > 0
				}
			} {
				factor = 1.25
				is_major = yes
			} {
				factor = 1.25
				has_war_with = FROM
			} {
				set_temp_variable = {
					division_factor = num_divisions
				}
				divide_temp_variable = {
					division_factor = 250
				}
				factor = division_factor
			} {
				factor = 1.25
				FROM = {
					network_strength = {
						target = PREV
						value = > 10
					}
				}
			} {
				factor = 1.25
				FROM = {
					network_strength = {
						target = PREV
						value = > 25
					}
				}
			} {
				factor = 1.25
				FROM = {
					network_strength = {
						target = PREV
						value = > 50
					}
				}
			} {
				factor = 0.1
				has_war_together_with = FROM
			} {
				set_temp_variable = {
					temp = EAI_espionage_operation_risk_@FROM
				} {
					risk_factor = 1
				}
				divide_temp_variable = {
					temp = 4
				}
				clamp_temp_variable = {
					var = temp
					min = 0
					max = 1
				}
				subtract_from_temp_variable = {
					risk_factor = temp
				}
				factor = risk_factor
			} {
				factor = 0
				OR = {
					exists = no
					has_capitulated = yes
					is_ally_with = FROM
				}
			} {
				factor = 0.25
				has_government = FROM
				NOT = {
					has_war_with = FROM
				}
			}
		}
	}
}
### Entity: Order of Battle
Component: 3rd Infantry Division
Constructs: division_template
Source: game
File: history/units/PER_1936.txt

Code:
division = {
	name = 3rd Infantry Division
	location = 10913
	division_template = Infantry Division
	start_experience_factor = 0.2
	start_equipment_factor = 0.7
}
### Entity: Event
Component: wtt_news.17
Constructs: is_triggered_only
Source: game
File: events/WTT_NewsEvents.txt

Code:
news_event = {
	id = wtt_news.17
	title = wtt_news.17.t
	desc = wtt_news.17.desc
	picture = GFX_news_event_sign_treaty3
	major = yes
	is_triggered_only = yes
	option = {
		name = wtt_news.16.a
		trigger = {
			original_tag = GER
		}
	} {
		name = wtt_news.17.b
		trigger = {
			original_tag = CHI
		}
	} {
		name = wtt_news.17.c
		trigger = {
			original_tag = JAP
		}
	} {
		name = wtt_news.16.d
		trigger = {
			NOT = {
				original_tag = GER CHI JAP
			}
		}
	}
}
### Entity: Character
Component: LIE_karl_aloys_von_liechtenstein
Source: game
File: common/characters/LIE.txt

Code:
LIE_karl_aloys_von_liechtenstein = {
	name = Karl Aloys von Liechtenstein
	portraits = {
		army = {
			large = gfx/leaders/LUX/r56_portrait_portrait_LUX_Felix_de_Bourbon_Parma.dds
			small = GFX_idea_LUX_felix_de_bourbon_parma
		}
	}
	advisor = {
		slot = high_command
		idea_token = LIE_karl_aloys_von_liechtenstein
		ledger = army
		allowed = {
			original_tag = LIE
		}
		visible = {
			LIE_has_haus_liechtenstein = yes
		}
		traits = {
			army_cavalry_2
		}
		cost = 100
		ai_will_do = {
			factor = 1.0
		}
	}
}
### Entity: Character
Component: TAH_fascist_guy
Constructs: has_government
Source: game
File: common/characters/TAH.txt

Code:
TAH_fascist_guy = {
	advisor = {
		slot = political_advisor
		idea_token = TAH_fascist_guy
		allowed = {
			original_tag = TAH
		}
		traits = {
			fascist_demagogue
		}
		do_effect = {
			not = {
				has_government = fascism
			}
		}
		ai_will_do = {
			factor = 0.0
		}
	}
	portraits = {
		army = {
			small = GFX_idea_generic_political_advisor_asia_2
		}
	}
}
### Entity: Event
Component: LIT_monarchy_events.1
Constructs: is_triggered_only, ai_chance, limit, owns_state, has_country_flag, set_country_flag, save_event_target_as, create_faction_from_template
Source: game
File: events/NSB_Lithuania.txt

Code:
country_event = {
	id = LIT_monarchy_events.1
	title = LIT_monarchy_events.1.t
	desc = LIT_monarchy_events.1.desc
	picture = GFX_report_event_por_return_of_the_monarchy
	is_triggered_only = yes
	immediate = {
		hidden_effect = {
			set_country_flag = LIT_already_decided_monarchy_flag
		}
	}
	option = {
		name = LIT_monarchy_events.1.a
		ai_chance = {
			factor = 10
		}
		hidden_effect = {
			save_event_target_as = POL_or_LIT_target
		}
		if = {
			limit = {
				FROM = {
					NOT = {
						original_tag = ROOT
					}
					has_country_flag = LIT_already_decided_monarchy_flag
				}
			}
			FROM = {
				create_faction_from_template = {
					template = faction_template_POL_baltic_alliance
					name = COMMONWEALTH_FACTION
				}
				add_to_faction = ROOT
			}
			if = {
				limit = {
					POL = {
						owns_state = 784
					}
				}
				LIT = {
					transfer_state = 784
				}
			}
			hidden_effect = {
				save_event_target_as = alliance_applicant
				FROM = {
					save_event_target_as = alliance_inviter
				} {
					set_country_flag = alliance_applicant@ROOT
				}
				set_country_flag = alliance_inviter@ROOT
				news_event = {
					id = news.289
					hours = 12
				}
			}
		}
		else = {
			if = {
				limit = {
					original_tag = LIT
				}
				POL = {
					country_event = {
						id = LIT_monarchy_events.1
						days = 2
					}
				}
				custom_effect_tooltip = if_they_accept_tt
				effect_tooltip = {
					create_faction_from_template = {
						template = faction_template_POL_baltic_alliance
						name = COMMONWEALTH_FACTION
					}
					add_to_faction = POL
					if = {
						limit = {
							POL = {
								owns_state = 784
							}
						}
						transfer_state = 784
					}
				}
			} {
				limit = {
					original_tag = POL
				}
				LIT = {
					country_event = {
						id = LIT_monarchy_events.1
						days = 2
					}
				}
				custom_effect_tooltip = if_they_accept_tt
				effect_tooltip = {
					create_faction_from_template = {
						template = faction_template_POL_baltic_alliance
						name = COMMONWEALTH_FACTION
					}
					add_to_faction = LIT
					if = {
						limit = {
							POL = {
								owns_state = 784
							}
						}
						LIT = {
							transfer_state = 784
						}
					}
				}
			}
		}
	} {
		name = LIT_monarchy_events.1.b
		ai_chance = {
			factor = 10
		}
		set_country_flag = LIT_Monarchy_events_declared_war
		if = {
			limit = {
				original_tag = L
# ... (truncated)
### Entity: Scripted Effect
Component: EAI_biyearly_update
Constructs: limit, has_country_flag, has_global_flag, set_global_flag, is_ai, check_variable, every_other_country, clear_variable
Source: game
File: common/scripted_effects/EAI_UPDATE_effects.txt

Code:
EAI_biyearly_update = {
	if = {
		limit = {
			NOT = {
				has_global_flag = EAI_global_biyearly_update
			}
		}
		if = {
			limit = {
				has_country_flag = EAI_update_logging
			}
			log = [GetYear] [GetMonth] | AI | [Root.GetName] | UPDATE: EAI_biyearly_update global
		}
		set_global_flag = {
			flag = EAI_global_biyearly_update
			value = 1
			days = 2
		}
	} {
		limit = {
			is_ai = yes
		}
		if = {
			limit = {
				has_country_flag = EAI_update_logging
			}
			log = [GetYear] [GetMonth] | AI | [Root.GetName] | UPDATE: EAI_biyearly_update
		} {
			limit = {
				check_variable = {
					EAI_espionage_risk_decay = 2
				}
			}
			every_other_country = {
				limit = {
					check_variable = {
						ROOT.EAI_espionage_operation_risk_@THIS = > 0
					}
				}
				subtract_from_variable = {
					ROOT.EAI_espionage_operation_risk_@THIS = 1
				}
				clamp_variable = {
					var = ROOT.EAI_espionage_operation_risk_@THIS
					min = 0
				}
			}
			clear_variable = EAI_espionage_risk_decay
		} {
			limit = {
				is_ai = yes
				OR = {
					check_variable = {
						BA_active_friendly_country_rules^num = > 0
					} {
						BA_active_other_country_rules^num = > 0
					} {
						BA_active_state_rules^num = > 0
					}
				}
				NOT = {
					any_country = {
						is_ai = no
						OR = {
							is_in_faction_with = PREV
							is_subject_of = PREV
							PREV = {
								is_subject_of = PREV
							} {
								has_military_access_to = PREV
							}
						}
					}
				}
			}
			for_each_scope_loop = {
				array = BA_active_friendly_country_rules
				PREV = {
					add_ai_strategy = {
						type = dont_defend_ally_borders
						id = PREV
						value = -5000
					}
				}
			}
			clear_array = BA_active_friendly_country_rules BA_active_other_country_rules BA_active_state_rules
		} {
			limit = {
				is_ai = yes
				OR = {
					check_variable = {
						IC_active_other_country_rules^num = > 0
					} {
						IC_active_state_rules^num = > 0
					}
				}
				NOT = {
					any_country = {
						is_ai = no
						OR = {
							is_in_faction_with = PREV
							is_subject_of = PREV
							PREV = {
								is_subject_of = PREV
							} {
								has_military_access_to = PREV
							}
						}
					}
				}
			}
			clear_array = IC_active_other_country_rules IC_active_state_rules
		}
		else = {
			add_to_variable = {
				EAI_espionage_risk_decay = 1
			}
		}
		set_country_flag = {
			flag = IC
# ... (truncated)
### Entity: Event
Component: axis_minors_vichy_france.5
Constructs: is_triggered_only, limit, fire_only_once, is_unit_leader, remove_unit_leader_role
Source: game
File: events/r56_vichy_france.txt

Code:
country_event = {
	id = axis_minors_vichy_france.5
	title = axis_minors_vichy_france.5.t
	desc = axis_minors_vichy_france.5.desc
	picture = GFX_report_event_french_liberation
	is_triggered_only = yes
	fire_only_once = yes
	option = {
		name = axis_minors_vichy_france.5.a
		VIC = {
			army_experience = -5
			if = {
				limit = {
					FRA_alphonse_juin = {
						is_unit_leader = yes
					}
				}
				remove_unit_leader_role = FRA_alphonse_juin
			}
		}
	}
}
### Entity: Scripted Effect
Component: add_or_modify_AST_imperial_pressure_spirit
Constructs: limit, has_dynamic_modifier
Source: game
File: common/scripted_effects/AST_scripted_effects.txt

Code:
add_or_modify_AST_imperial_pressure_spirit = {
	IF = {
		limit = {
			NOT = {
				has_dynamic_modifier = {
					modifier = AST_imperial_pressure_spirit
				}
			}
		}
		hidden_effect = {
			country_event = {
				id = AST_political_events.7
				days = 1
			}
		}
	}
	ELSE = {
		custom_effect_tooltip = AST_imperial_pressure_spirit_tt
	}
}
### Entity: Idea
Component: SWE_hosting_exiled_european_fascists_level_3
Constructs: stability_factor, communism_drift
Source: game
File: common/ideas/r56_sweden.txt

Code:
SWE_hosting_exiled_european_fascists_level_3 = {
	picture = chi_army_corruption3
	allowed = {
		always = no
	}
	modifier = {
		communism_drift = -0.05
		stability_factor = -0.05
		weekly_manpower = 150
		stability_weekly = -0.01
	}
}
### Entity: Idea
Component: acf
Constructs: research_bonus
Source: game
File: common/ideas/france.txt

Code:
acf = {
	picture = FRA_acf
	allowed = {
		original_tag = FRA
	}
	research_bonus = {
		naval_equipment = 0.15
	}
	traits = {
		raiding_fleet_naval_manufacturer
	}
}
### Entity: Idea
Component: POR_renewing_the_portuguese_armada
Constructs: removal_cost
Source: game
File: common/ideas/r56_portugal.txt

Code:
POR_renewing_the_portuguese_armada = {
	picture = generic_navy_bonus
	allowed = {
		original_tag = POR
	}
	allowed_civil_war = {
		original_tag = POR
	}
	removal_cost = -1
	modifier = {
		industrial_capacity_dockyard = 0.15
	}
}
### Entity: Idea
Component: CAN_swastika_clubs_2
Constructs: war_support_factor, has_government, removal_cost, democratic_drift, fascism_drift
Source: game
File: common/ideas/canada.txt

Code:
CAN_swastika_clubs_2 = {
	allowed = {
		always = no
	}
	allowed_civil_war = {
		has_government = fascism
	}
	removal_cost = -1
	picture = generic_fascism_drift_bonus
	modifier = {
		democratic_drift = -0.1
		fascism_drift = 0.2
		war_support_factor = 0.05
		conscription = 0.02
	}
}
### Entity: Modifier Reference
Construct: army_claim_attack_factor
Source: vanilla_docs
File: documentation/modifiers_documentation.md

Doc:
## army_claim_attack_factor

* Number with 1 decimal places
* **Categories**: army, aggressive
### Entity: Character
Component: SPR_janos_galicz
Constructs: has_completed_focus, has_dlc, has_global_flag
Source: game
File: common/characters/SPR.txt

Code:
SPR_janos_galicz = {
	name = SPR_janos_galicz
	portraits = {
		army = {
			large = GFX_portrait_SPR_janos_galicz
			small = GFX_portrait_SPR_janos_galicz_small
		}
	}
	advisor = {
		slot = high_command
		idea_token = SPR_janos_galicz
		ledger = army
		allowed = {
			has_dlc = La Resistance
			original_tag = SPR
		}
		visible = {
			NOT = {
				tag = SPA SPB
			}
		}
		available = {
			has_completed_focus = SPR_demand_ministerial_positions
			NOT = {
				has_completed_focus = SPR_crush_the_revolution
			}
			custom_trigger_tooltip = {
				tooltip = SPR_not_nationalist_spain_tt
				NOT = {
					tag = SPA
				}
			}
		}
		traits = {
			army_logistics_1
		}
		cost = 50
	}
	corps_commander = {
		traits = {
			trait_reckless
		}
		skill = 1
		attack_skill = 1
		defense_skill = 1
		planning_skill = 1
		logistics_skill = 1
		legacy_id = 1107
		visible = {
			OR = {
				NOT = {
					has_global_flag = spanish_civil_war
				}
				AND = {
					tag = SPD
					has_global_flag = spanish_civil_war
					NOT = {
						has_global_flag = SPR_anarchist_uprising_flag
					}
				} {
					tag = SPC
					has_global_flag = spanish_civil_war SPR_anarchist_uprising_flag
				}
			}
		}
	}
}
### Entity: National Focus
Tree: eth_focus
Component: ETH_the_new_administration
Constructs: prerequisite, has_government, completion_reward, set_character_flag
Source: game
File: common/national_focus/ethiopia.txt

Code:
focus = {
	id = ETH_the_new_administration
	prerequisite = {
		focus = ETH_raise_from_the_ranks
	}
	icon = GFX_focus_eng_concessions_to_the_trade_unions
	relative_position_id = ETH_raise_from_the_ranks
	x = 0
	y = 1
	cost = 10
	available = {
		has_government = communism
	}
	search_filters = {
		FOCUS_FILTER_POLITICAL
	}
	completion_reward = {
		custom_effect_tooltip = ETH_the_new_administration_tt
		hidden_effect = {
			ETH_senedu_gebru = {
				set_character_flag = ETH_visible_advisor_flag
			}
			ETH_random_character = yes yes
		}
	}
}