Losa10/PreTrain-HOI4-Modding-Assistant huggingface dataset:
### Entity: National Focus
Tree: sco_focus
Component: SCO_one_union_for_all_workers
Constructs: prerequisite, add_ideas, completion_reward, add_tech_bonus
Source: game
File: common/national_focus/scotland.txt

Code:
focus = {
	id = SCO_one_union_for_all_workers
	icon = GFX_goal_generic_karl_marx
	cost = 10
	prerequisite = {
		focus = SCO_the_scottish_workers_republican_party
	}
	x = 2
	y = 1
	relative_position_id = SCO_the_scottish_workers_republican_party
	available = {

	}
	completion_reward = {
		add_ideas = URG_one_union_for_all_workers
		add_tech_bonus = {
			name = ROM_civil_works
			bonus = 1.0
			uses = 1
			category = construction_tech
		}
	}
	search_filters = {
		FOCUS_FILTER_INDUSTRY
	}
}
### Entity: Character
Component: BRA_indigenous_council
Source: game
File: common/characters/BRA.txt

Code:
BRA_indigenous_council = {
	name = BRA_indigenous_council
	portraits = {
		civilian = {
			large = GFX_portrait_indigenous_brazil_council
		}
	}
}
### Entity: National Focus
Tree: raj_focus
Component: RAJ_halls_of_knowledge
Constructs: prerequisite, completion_reward, cancel_if_invalid, add_tech_bonus, add_research_slot
Source: game
File: common/national_focus/india_goe.txt

Code:
focus = {
	id = RAJ_halls_of_knowledge
	icon = GFX_focus_research
	prerequisite = {
		focus = RAJ_a_peacock_prince
	}
	x = -2
	y = 1
	relative_position_id = RAJ_a_peacock_prince
	cost = 10
	ai_will_do = {
		factor = 1
	}
	available = {
		num_of_factories = > 10
	}
	bypass = {

	}
	search_filters = {
		FOCUS_FILTER_RESEARCH
	}
	cancel_if_invalid = yes
	continue_if_invalid = no
	available_if_capitulated = no
	completion_reward = {
		add_tech_bonus = {
			name = RAJ_halls_of_knowledge
			uses = 1
			ahead_reduction = 1
			category = electronics
		} {
			name = RAJ_halls_of_knowledge
			bonus = 0.4
			uses = 2
			category = infantry_weapons
		}
		add_research_slot = 1
	}
}
### Entity: National Focus
Tree: afg_focus
Component: AFG_contact_rural_loyalists
Constructs: has_completed_focus, prerequisite, limit, completion_reward, add_political_power, add_to_variable
Source: game
File: common/national_focus/afghanistan.txt

Code:
focus = {
	id = AFG_contact_rural_loyalists
	icon = GFX_focus_AFG_contact_rural_loyalists
	prerequisite = {
		focus = AFG_contact_amanullah_loyalists AFG_remember_the_khost_rebellion
	}
	x = 6
	y = 1
	relative_position_id = AFG_contact_amanullah_loyalists
	cost = 10
	ai_will_do = {
		factor = 10
	}
	available = {
		NOT = {
			has_completed_focus = AFG_return_of_the_emir AFG_the_faqirs_revolt
		}
	}
	search_filters = {
		FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT
	}
	completion_reward = {
		custom_effect_tooltip = AFG_contact_rural_loyalists_tt generic_skip_one_line_tt generic_skip_one_line_tt
		IF = {
			limit = {
				has_completed_focus = AFG_contact_amanullah_loyalists
			}
			custom_effect_tooltip = AFG_modifiy_amanullah_insurrection_modifier_tt
			add_to_variable = {
				AFG_amanullah_modifier_fascism_drift = 0.05
				tooltip = fascism_drift_tt
			}
		}
		ELSE = {
			custom_effect_tooltip = AFG_modifiy_look_to_the_past_modifier_tt
			add_to_variable = {
				AFG_look_to_the_past_modifier_war_support_factor = 0.05
				tooltip = war_support_factor_tt
			}
		}
		add_political_power = 100
	}
}
### Entity: Character
Component: CHL_bartolome_blanche
Constructs: has_completed_focus, has_government, has_country_leader
Source: game
File: common/characters/CHL.txt

Code:
CHL_bartolome_blanche = {
	name = CHL_bartolome_blanche
	portraits = {
		army = {
			large = GFX_portrait_CHL_bartolome_blanche
			small = GFX_portrait_CHL_bartolome_blanche_small
		}
	}
	advisor = {
		slot = army_chief
		idea_token = CHL_bartolome_blanche
		allowed = {
			original_tag = CHL
		}
		available = {
			OR = {
				has_government = neutrality democratic
				has_country_leader = {
					ruling_only = yes
					character = CHL_marmaduke_grove
				}
			}
			NOT = {
				has_completed_focus = CHL_address_the_mapuche_conflict
			}
		}
		visible = {
			NOT = {
				OR = {
					has_government = fascism
					AND = {
						has_government = communism
						NOT = {
							has_country_leader = {
								ruling_only = yes
								character = CHL_marmaduke_grove
							}
						}
					}
				}
			} {
				has_completed_focus = CHL_address_the_mapuche_conflict
			}
		}
		traits = {
			army_chief_old_guard
		}
	}
	corps_commander = {
		traits = {
			cavalry_leader old_guard
		}
		skill = 3
		attack_skill = 2
		defense_skill = 2
		planning_skill = 3
		logistics_skill = 3
		legacy_id = -1
		visible = {
			OR = {
				has_government = neutrality democratic
				has_country_leader = {
					ruling_only = yes
					character = CHL_marmaduke_grove
				}
			}
		}
	}
}
### Entity: National Focus
Tree: irq_focus
Component: IRQ_ministry_of_propaganda
Constructs: prerequisite, add_ideas, has_government, completion_reward, add_political_power
Source: game
File: common/national_focus/r56_iraq.txt

Code:
focus = {
	id = IRQ_ministry_of_propaganda
	icon = GFX_focus_propaganda_soviet
	prerequisite = {
		focus = IRQ_workers_culture
	}
	available = {
		has_government = communism
	}
	relative_position_id = IRQ_workers_revolution
	x = 1
	y = 3
	cost = 10
	ai_will_do = {
		factor = 10
	}
	available_if_capitulated = yes
	completion_reward = {
		add_political_power = 100
		add_ideas = SOV_collectivist_propaganda
	}
	search_filters = {
		FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL
	}
}
### Entity: National Focus
Tree: gre_focus
Component: GRE_metaxism_focus
Constructs: create_country_leader, prerequisite, add_ideas, completion_reward, retire_country_leader, set_party_name, set_politics, swap_ideas
Source: game
File: common/national_focus/greece.txt

Code:
focus = {
	id = GRE_metaxism_focus
	icon = GFX_focus_GRE_metaxism
	prerequisite = {
		focus = GRE_the_kings_government
	}
	mutually_exclusive = {
		focus = GRE_the_right_to_rule
	}
	x = 1
	y = 1
	relative_position_id = GRE_the_kings_government
	cost = 10
	ai_will_do = {
		base = 1
	}
	search_filters = {
		FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY
	}
	completion_reward = {
		effect_tooltip = {
			create_country_leader = {
				name = Ioannis Metaxas
				desc = POLITICS_IOANNIS_METAXAS_DESC
				picture = GFX_portrait_Ioannis_Metaxas
				expire = 1965.1.1
				ideology = despotism
				traits = {
					arkhigos
				}
			}
		}
		add_ideas = GRE_metaxism
		custom_effect_tooltip = GRE_metaxism_warning_tt
		hidden_effect = {
			retire_country_leader = yes
			promote_character = {
				character = GRE_ioannis_metaxas
				ideology = despotism
			}
			set_party_name = {
				ideology = neutrality
				long_name = GRE_metaxas_party_long
				name = GRE_metaxas_party
			}
			set_politics = {
				ruling_party = neutrality
				elections_allowed = no
			}
			swap_ideas = {
				remove_idea = GRE_political_instability
				add_idea = GRE_political_instability_metaxas
			}
			set_variable = {
				var = GRE_fascist_loyalty
				value = 0
			}
			GRE_political_instability_update_effect = yes
		}
	}
}
### Entity: Military Industrial Organization
Component: ITA_officine_meccaniche_reggiane_organization
Constructs: has_completed_focus, has_dlc, equipment_bonus, add_trait, production_bonus
Source: game
File: common/military_industrial_organization/organizations/ITA_organization_r56.txt

Code:
ITA_officine_meccaniche_reggiane_organization = {
	include = generic_high_agility_fighter_aircraft_organization
	icon = GFX_idea_reggiane
	allowed = {
		tag = ITA
		has_dlc = Arms Against Tyranny
	}
	initial_trait = {
		name = generic_mio_initial_trait_high_agility_fighters_designer
		equipment_bonus = {
			air_agility = 0.1
			air_range = -0.1
		}
	}
	available = {
		FROM = {
			has_completed_focus = ITA_reggianes_exports
		}
	}
	add_trait = {
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_plane_fighter_production
		special_trait_background = yes
		position = {
			x = 9
			y = 0
		}
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program ITA_strengthen_northern_industry
			}
		}
		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}
		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}
### Entity: Idea
Component: WUR_ncdb
Source: game
File: common/ideas/wurtemberg.txt

Code:
WUR_ncdb = {
	picture = generic_navy_europe_1
	allowed = {
		original_tag = WUR
	}
	traits = {
		navy_chief_decisive_battle_2
	}
	ai_will_do = {
		factor = 1
	}
}
### Entity: State History
Component: 892
Constructs: add_core_of
Source: game
File: history/states/892-North Queensland.txt

Code:
state = {
	id = 892
	name = STATE_872
	provinces = {
		1501 1514 1644 2166 2187 4505 4520 4648 7506 7525 7538 8230 10338 10350 10365 10378 12354 12367 12957
	}
	history = {
		buildings = {
			infrastructure = 1
		}
		owner = AST
		add_core_of = AST
	}
	manpower = 100000
	state_category = rural
	buildings_max_level_factor = 1.0
	local_supplies = 0.0
}
### Entity: National Focus
Tree: chi_focus
Component: CHI_inspect_the_troops
Constructs: prerequisite, add_ideas, completion_reward, is_in_faction
Source: game
File: common/national_focus/china_nationalist_sea.txt

Code:
focus = {
	id = CHI_inspect_the_troops
	icon = GFX_focus_generic_manpower
	prerequisite = {
		focus = CHI_introduce_the_baojia_system CHI_expand_the_tongzi_jun
	}
	x = 1
	y = 1
	relative_position_id = CHI_introduce_the_baojia_system
	cost = 5
	available = {
		is_in_faction = yes
	}
	search_filters = {
		FOCUS_FILTER_ARMY_XP
	}
	ai_will_do = {
		factor = 10
	}
	completion_reward = {
		add_ideas = idea_CHI_troop_inspection
	}
}
### Entity: Event
Component: BBA_switzerland_fascist.2
Constructs: is_triggered_only, ai_chance
Source: game
File: events/BBA_Switzerland.txt

Code:
country_event = {
	id = BBA_switzerland_fascist.2
	title = BBA_switzerland_fascist.2.t
	desc = BBA_switzerland_fascist.2.desc
	picture = GFX_report_event_journalists_speech
	is_triggered_only = yes
	immediate = {
		hidden_effect = {

		}
	}
	option = {
		name = BBA_switzerland_fascist.2.a
		ai_chance = {
			base = 10
		}
		trigger = {

		}
	}
}
### Entity: Order of Battle
Component: Piazzafotre di Tobruch
Constructs: division_template, force_equipment_variants
Source: game
File: history/units/ITA_1939.txt

Code:
division = {
	name = Piazzafotre di Tobruch
	location = 1130
	division_template = Divisione Ascari Libica
	force_equipment_variants = {
		infantry_equipment_0 = {
			owner = ITA
		}
	}
	start_equipment_factor = 0.7
}
### Entity: Idea
Component: WES_acd2
Source: game
File: common/ideas/western_sahara.txt

Code:
WES_acd2 = {
	picture = generic_army_african_1
	allowed = {
		original_tag = WES
	}
	traits = {
		army_chief_defensive_2
	}
	ai_will_do = {
		factor = 1
	}
}
### Entity: Event
Component: lithuania.10
Constructs: is_triggered_only, add_political_power, add_command_power
Source: game
File: events/r56_lithuania.txt

Code:
country_event = {
	id = lithuania.10
	title = lithuania.10.t
	desc = lithuania.10.desc
	picture = GFX_report_event_ast_navy
	is_triggered_only = yes
	option = {
		name = lithuania.10.a
		add_command_power = -15
		hidden_effect = {
			country_event = {
				id = lithuania.13
				days = 2
			}
		}
	} {
		name = lithuania.10.b
		add_political_power = -30
		hidden_effect = {
			country_event = {
				id = lithuania.12
				days = 2
			}
		}
	}
}
### Entity: National Focus
Tree: ita_focus
Component: ITA_convene_the_grand_council
Constructs: has_completed_focus, prerequisite, limit, add_stability, completion_reward, add_political_power, allow_branch, has_dlc
Source: game
File: common/national_focus/italy.txt

Code:
focus = {
	id = ITA_convene_the_grand_council
	icon = GFX_focus_generic_military_dictatorship
	prerequisite = {
		focus = ITA_triumph_in_africa_bba ITA_conspiracies_in_the_shadows
	}
	mutually_exclusive = {
		focus = ITA_culto_del_duce ITA_defy_the_duce
	}
	allow_branch = {
		has_dlc = By Blood Alone
		if = {
			limit = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
			}
			NOT = {
				has_completed_focus = ITA_defy_the_duce
			}
		}
	}
	x = 20
	y = 2
	relative_position_id = ITA_triumph_in_africa_bba
	offset = {
		x = -12
		y = 0
		trigger = {
			has_game_rule = {
				rule = obsolete_focus_branches_visibility
				option = HIDE
			}
			has_completed_focus = ITA_culto_del_duce
		}
	} {
		x = -12
		y = 0
		trigger = {
			has_game_rule = {
				rule = obsolete_focus_branches_visibility
				option = HIDE
			}
			has_completed_focus = ITA_convene_the_grand_council
		}
	}
	cost = 5
	available = {
		is_at_peace_exiled_countries_excluded = yes
		power_balance_value = {
			id = ITA_power_balance
			value = < 0.01
		}
	}
	search_filters = {
		FOCUS_FILTER_POLITICAL FOCUS_FILTER_BALANCE_OF_POWER
	}
	completion_reward = {
		add_stability = -0.05
		add_political_power = 25
		custom_effect_tooltip = available_political_advisor
		show_ideas_tooltip = ITA_pietro_d_acquarone
		ITA_bop_low_decrease_effect = yes
		if = {
			limit = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
			}
			mark_focus_tree_layout_dirty = yes
		}
	}
}
### Entity: Idea
Component: LIE_hilti
Constructs: research_bonus
Source: game
File: common/ideas/liechtenstein.txt

Code:
LIE_hilti = {
	picture = hilti
	allowed = {
		original_tag = LIE
	}
	research_bonus = {
		infantry_weapons = 0.15
	}
	traits = {
		infantry_equipment_manufacturer
	}
	ai_will_do = {
		factor = 1
	}
}
### Entity: AI Strategy
Component: EAI_SOV_defense_in_depth_218
Constructs: has_war_with
Source: game
File: common/ai_strategy/SOV_EAI.txt

Code:
EAI_SOV_defense_in_depth_218 = {
	allowed = {
		tag = SOV
	}
	enable = {
		any_of_scopes = {
			array = global.EAI_MAP_SOV_garrison_strategy_218
			CONTROLLER = {
				has_war_with = ROOT
			}
		}
	}
	abort_when_not_enabled = yes
	ai_strategy = {
		type = put_unit_buffers
		ratio = 0.02
		order_id = 218
		states = {
			218
		}
		subtract_invasions_from_need = no
		subtract_fronts_from_need = no
	}
}
### Entity: National Focus
Tree: chl_focus
Component: CHL_promote_broad_anti_americansim
Constructs: prerequisite, add_ideas, has_government, completion_reward
Source: game
File: common/national_focus/chile.txt

Code:
focus = {
	id = CHL_promote_broad_anti_americansim
	icon = GFX_focus_ARG_anti_american_propaganda
	relative_position_id = CHL_enforce_the_chilean_identity
	x = 0
	y = 1
	cost = 5
	prerequisite = {
		focus = CHL_enforce_the_chilean_identity
	}
	mutually_exclusive = {

	}
	available = {
		has_government = fascism
	}
	search_filters = {
		FOCUS_FILTER_WAR_SUPPORT
	}
	completion_reward = {
		add_ideas = CHL_anti_americanism
	}
}
### Entity: Scripted Effect
Component: SIA_reduce_traditionalist_opposition_r56
Constructs: has_completed_focus, limit, remove_ideas, add_stability, has_idea, swap_ideas, remove_idea, add_idea
Source: game
File: common/scripted_effects/SIA_scripted_effects_r56.txt

Code:
SIA_reduce_traditionalist_opposition_r56 = {
	if = {
		limit = {
			has_idea = SIA_traditionalist_opposition_2_r56
		}
		remove_ideas = SIA_traditionalist_opposition_2_r56
		custom_effect_tooltip = generic_skip_one_line_tt
	}
	else_if = {
		limit = {
			has_idea = SIA_traditionalist_opposition_r56
			has_completed_focus = SIA_pridis_premiership_r56
		}
		swap_ideas = {
			remove_idea = SIA_traditionalist_opposition_r56
			add_idea = SIA_traditionalist_opposition_2_r56
		}
	}
	else = {
		add_stability = 0.05
		add_popularity = {
			ideology = ROOT
			popularity = 0.05
		}
		custom_effect_tooltip = generic_skip_one_line_tt
	}
}
### Entity: Scripted Localization
Component: defined_text
Constructs: has_dynamic_modifier
Source: game
File: common/scripted_localisation/AST_scripted_localisation.txt

Code:
defined_text = {
	name = GetASTCurrentEconomyName
	text = {
		trigger = {
			has_dynamic_modifier = AST_australian_economy_dm
		}
		localization_key = AST_economy_recovered_name
	} {
		trigger = {
			has_dynamic_modifier = AST_recovery_economy_dm
		}
		localization_key = AST_economy_recovery_name
	} {
		trigger = {
			has_dynamic_modifier = AST_depression_economy_dm
		}
		localization_key = AST_economy_depression_name
	}
}
### Entity: Technology
Component: artillery2
Constructs: research_cost
Source: game
File: common/technologies/artillery.txt

Code:
technology = {
	artillery = {
		soft_attack = 0.05
	}
	artillery_brigade = {
		soft_attack = 0.1
	}
	mot_artillery_brigade = {
		soft_attack = 0.1
	}
	category_self_propelled_artillery = {
		soft_attack = 0.1
	}
	path = {
		leads_to_tech = artillery3
		research_cost_coeff = 1
	} {
		leads_to_tech = rocket_artillery
		research_cost_coeff = 1
	}
	research_cost = 1
	start_year = 1940
	folder = {
		name = artillery_folder
		position = {
			x = 0
			y = 6
		}
	}
	categories = {
		artillery mio_cat_all_artillery_equipment mio_cat_artillery
	}
	special_project_specialization = {
		specialization_land
	}
	ai_will_do = {
		factor = 2
		modifier = {
			factor = 2
			date = > 1940.1.6
		} {
			factor = 2
			date = > 1941.1.1
		} {
			factor = 5
			date = > 1942.1.1
		}
	}
}
### Entity: Event
Component: sweden_aland.12
Constructs: is_triggered_only, add_core_of, remove_core_of
Source: game
File: events/SWE_sweden.txt

Code:
country_event = {
	id = sweden_aland.12
	title = sweden_aland.12.t
	desc = sweden_aland.12.d
	picture = GFX_report_event_generic_sign_treaty1
	is_triggered_only = yes
	option = {
		name = sweden_aland.12.a
		transfer_state = 145
		145 = {
			add_core_of = SWE
		} {
			remove_core_of = FIN
		}
	}
}
### Entity: Idea
Component: FRA_worker_shortage
Constructs: industrial_capacity_factory, removal_cost, conscription_factor
Source: game
File: common/ideas/france.txt

Code:
FRA_worker_shortage = {
	picture = FRA_factory_strikes
	allowed = {
		original_tag = FRA
		always = no
	}
	allowed_civil_war = {
		tag = FRA
	}
	removal_cost = -1
	modifier = {
		conscription_factor = -0.25
		industrial_capacity_factory = -0.1
		industrial_capacity_dockyard = -0.1
	}
}
### Entity: AI Strategy
Component: USA_min_tank_production
Source: game
File: common/ai_strategy/USA.txt

Code:
USA_min_tank_production = {
	allowed = {
		original_tag = USA
	}
	enable = {
		num_of_military_factories = > 9
	}
	abort_when_not_enabled = yes
	ai_strategy = {
		type = equipment_production_min_factories_archetype
		id = light_tank_chassis
		value = 1
	} {
		type = equipment_production_min_factories_archetype
		id = medium_tank_chassis
		value = 1
	}
}
### Entity: Idea
Component: EAI_DD_9/modern_tank_aa_chassis_bonus
Constructs: equipment_bonus, build_cost_ic
Source: game
File: common/ideas/EAI_difficulty_ideas.txt

Code:
EAI_DD_9/modern_tank_aa_chassis_bonus = {
	allowed = {
		always = no
	}
	equipment_bonus = {
		modern_tank_aa_chassis = {
			build_cost_ic = -0.225
			instant = yes
		}
	}
}
### Entity: Scripted Effect
Component: CZE_make_weapons_payment
Constructs: limit, set_country_flag, has_idea, modify_timed_idea, add_timed_idea, add_to_variable
Source: game
File: common/scripted_effects/CZE_scripted_effects.txt

Code:
CZE_make_weapons_payment = {
	set_country_flag = achievement_bought_cze_weapons
	if = {
		limit = {
			has_idea = CZE_skoda_weapons_buyer_idea
		}
		modify_timed_idea = {
			idea = CZE_skoda_weapons_buyer_idea
			days = 60
		}
	}
	else = {
		add_timed_idea = {
			idea = CZE_skoda_weapons_buyer_idea
			days = 60
		}
	}
	CZE = {
		add_to_variable = {
			weapon_sales_industry_points = 4
		}
		set_country_flag = CZE_update_weapon_sales
	}
}
### Entity: Unit Template
Component: SAU_CAV_01
Source: game
File: common/units/names_divisions/SAU_names_divisions.txt

Code:
SAU_CAV_01 = {
	name = Cavalry Divisions
	for_countries = {
		SAU
	}
	can_use = {
		always = yes
	}
	division_types = {
		cavalry
	}
	fallback_name = Alfursan Almalika al-%dr
	ordered = {
		1 = {
			Alfursan Almalika 'Medina'
		}
		2 = {
			Alfursan Almalika al-%di
		}
		3 = {
			Alfursan Almalika al-%di
		}
		4 = {
			Alfursan Almalika al-%di
		}
		5 = {
			Alfursan Almalika al-%di
		}
		6 = {
			Alfursan Almalika al-%di
		}
		7 = {
			Alfursan Almalika al-%di
		}
		8 = {
			Alfursan Almalika al-%di
		}
		9 = {
			Alfursan Almalika al-%di
		}
		10 = {
			Alfursan Almalika al-%di
		}
		11 = {
			Alfursan Almalika al-%dr
		}
		12 = {
			Alfursan Almalika al-%dr
		}
		13 = {
			Alfursan Almalika al-%dr
		}
		14 = {
			Alfursan Almalika al-%dr
		}
		15 = {
			Alfursan Almalika al-%dr
		}
		16 = {
			Alfursan Almalika al-%dr
		}
		17 = {
			Alfursan Almalika al-%dr
		}
		18 = {
			Alfursan Almalika al-%dr
		}
		19 = {
			Alfursan Almalika al-%dr
		}
		20 = {
			Alfursan Almalika al-%dr
		}
	}
}
### Entity: National Focus
Tree: ita_focus
Component: ITA_modernize_ansaldo_facilities
Constructs: prerequisite, limit, completion_reward, add_to_variable, has_full_control_of_state, add_extra_state_shared_building_slots, add_building_construction, has_dlc
Source: game
File: common/national_focus/italy.txt

Code:
focus = {
	id = ITA_modernize_ansaldo_facilities
	icon = GFX_focus_ITA_modernize_ansaldo_facilities
	prerequisite = {
		focus = ITA_self_propelled_guns
	}
	mutually_exclusive = {
		focus = ITA_end_fiat_ansaldo_duopoly
	}
	x = 1
	y = 1
	relative_position_id = ITA_self_propelled_guns
	cost = 5
	available = {

	}
	search_filters = {
		FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH
	}
	completion_reward = {
		add_to_variable = {
			ITA_military_industry_dm_equipment_upgrade_xp_cost = -0.15
		} {
			ITA_military_industry_dm_industrial_capacity_factory = 0.05
		} {
			ITA_military_industry_dm_industrial_capacity_dockyard = 0.05
		} {
			ITA_iri_consumer_goods_factor = 0.02
		}
		custom_effect_tooltip = ITA_modernize_ansaldo_facilities_military_industry_tt ITA_ricostruzione_industriale_cg_penalty_tt
		if = {
			limit = {
				has_full_control_of_state = 158
				158 = {
					free_building_slots = {
						building = arms_factory
						size = > 1
						include_locked = yes
					}
				}
			}
			158 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		} {
			limit = {
				has_dlc = No Step Back
			}
			if = {
				limit = {
					has_tech = improved_medium_tank_chassis
				}
				ITA_add_improved_medium_tank_templates = yes
			} {
				limit = {
					has_tech = improved_heavy_tank_chassis
				}
				ITA_add_improved_heavy_tank_templates = yes
			}
			else = {
				custom_effect_tooltip = ITA_end_fiat_ansaldo_duopoly_medium_templates_tt
				effect_tooltip = {
					ITA_add_improved_medium_tank_templates = yes
				}
			} {
				custom_effect_tooltip = ITA_end_fiat_ansaldo_duopoly_heavy_templates_tt
				effect_tooltip = {
					ITA_add_improved_heavy_tank_templates = yes
				}
			}
		}
		else = {
			random_core_state = {
				limit = {
					is_controlled_by = ROOT
					free_building_slots = {
						building = arms_factory
						size = > 1
						include_locked = yes
					}
				}
				prioritize = {
					162 161 157
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
		ITA_improve_regio_esercito_dm_effect = yes
	}
}
### Entity: Event
Component: poland.213
Constructs: is_triggered_only, add_ideas, fire_only_once
Source: game
File: events/r56_Poland.txt

Code:
country_event = {
	id = poland.213
	title = poland.213.t
	desc = poland.213.d
	picture = GFX_report_event_generic_strike
	fire_only_once = yes
	is_triggered_only = yes
	option = {
		name = poland.213.a
		add_ideas = POL_bop_sanation_left_unrest_idea
		activate_mission = POL_bop_impending_sanation_left_uprising
	}
}
### Entity: Scripted Effect
Component: EAI_PP_pay_pp_cost
Constructs: limit, has_country_flag, add_political_power, check_variable
Source: game
File: common/scripted_effects/EAI_COUNTRY_pp_management_effects.txt

Code:
EAI_PP_pay_pp_cost = {
	EAI_PP_return_stored = yes
	if = {
		limit = {
			check_variable = {
				_pp_cost = > 0
			}
		}
		multiply_temp_variable = {
			_pp_cost = -1
		}
	} {
		limit = {
			has_country_flag = EAI_pp_logging
		}
		log = [GetYear] [GetMonth] | AI | [Root.GetName] | EAI_PP_pay_pp_cost: _pp_cost=[?_pp_cost]
	}
	add_political_power = _pp_cost
	EAI_PP_store = yes
}