Losa10/PreTrain-HOI4-Modding-Assistant huggingface dataset:
### Entity: Scripted Effect
Component: EAI_MILITARY_SECTOR_select_sector
Constructs: limit, has_country_flag, check_variable, set_temp_variable, random_index_, set_variable, add_to_temp_variable, add_to_temp_array
Source: game
File: common/scripted_effects/EAI_MILITARY_strategy_SECTOR_effects.txt

Code:
EAI_MILITARY_SECTOR_select_sector = {
	if = {
		limit = {
			has_country_flag = EAI_sector_operations_logging
		}
		log = [GetYear] [GetMonth] | AI | [This.GetName] | EAI_MILITARY_SECTOR_select_sector
	} {
		limit = {
			NOT = {
				AND = {
					check_variable = {
						_num_sectors = > 0
					} {
						_sector_trend_scores_^num = > 0
					} {
						_sector_control_scores_^num = > 0
					}
				}
			}
		}
		log = EAI_MILITARY_SECTOR_select_sector ERROR _num_sectors=[?_num_sectors] _sector_trend_scores_^num=[?_sector_trend_scores_^num] _sector_control_scores_^num=[?_sector_control_scores_^num]
	} {
		limit = {
			has_country_flag = EAI_sector_operations_logging
		}
		log = best_sector_id=[?best_sector_id] best_sector_score=[?best_sector_score]
	} {
		limit = {
			has_country_flag = EAI_sector_operations_logging
		}
		log = select_top_min_score=[?select_top_min_score] min_score=[?min_score]
	} {
		limit = {
			check_variable = {
				candidates^num = > 0
			}
		}
		set_temp_variable = {
			_array_len = candidates^num
		} {
			_assign_sector_ = candidates^random_index_
		} {
			selected_sector_ = 1
		}
		EAI_MATH_get_random_index_in_array_len = yes
		set_variable = {
			EAI_MILITARY_SECTOR_select_sector_num_failed_select = 0
		}
	}
	resize_temp_array = {
		sector_scores = _num_sectors
	}
	set_temp_variable = {
		best_sector_id = 0
	} {
		best_sector_score = 0
	} {
		_val_ = 0.15
	} {
		_scale = best_sector_score
	} {
		select_top_min_score = _val_
	} {
		min_score = @EAI_MILITARY_SECTOR_select_sector_min_score
	} {
		_min = 0
	} {
		_max = 10
	} {
		_val_ = EAI_MILITARY_SECTOR_select_sector_num_failed_select
	} {
		_scale = @EAI_MILITARY_SECTOR_select_sector_min_score_reduce_over_time
	} {
		selected_sector_ = 0
	}
	for_each_loop = {
		array = sector_scores
		if = {
			limit = {
				check_variable = {
					EAI_MILITARY_SECTOR_cooldown^i = 0
				}
			}
			set_temp_variable = {
				sector_score = _sector_trend_scores_^i
			} {
				sector_scores^i = sector_score
			}
			add_to_temp_variable = {
				sector_score = _sector_control_scores_^i
			}
			if = {
				limit = {
					check_variable = {
						sector_score = > best_sector_score
					}
				}
				set_temp_variable = {
					best_sector_id = i
				} {
					best_sector_score = sector_score
				}
			}
		}
	} {
		array = sector_scores
		if = {
			limit = {
				NOT = {
					check_variable = {
						v = < select_top_min_s
# ... (truncated)
### Entity: State History
Component: 117
Constructs: add_core_of
Source: game
File: history/states/117-Napoli.txt

Code:
state = {
	id = 117
	name = STATE_117
	manpower = 4240000
	state_category = city
	resources = {
		aluminium = 10
		steel = 15
	}
	history = {
		owner = ITA
		victory_points = {
			819 20
		}
		buildings = {
			infrastructure = 3
			arms_factory = 1
			industrial_complex = 2
			dockyard = 1
			air_base = 3
			819 = {
				naval_base = 6
			}
		}
		add_core_of = ITA TTS
		1939.1.1 = {
			buildings = {
				arms_factory = 2
				industrial_complex = 3
			}
		}
	}
	provinces = {
		819 851 955 3958 3968 6972 9826 11803 9856
	}
	local_supplies = 13.0
}
### Entity: National Focus
Tree: chl_focus
Component: CHL_joint_development_and_research
Constructs: prerequisite, limit, has_government, every_country, has_war_with, completion_reward, is_faction_leader, is_in_faction_with
Source: game
File: common/national_focus/chile.txt

Code:
focus = {
	id = CHL_joint_development_and_research
	icon = GFX_goal_generic_construction2
	relative_position_id = CHL_the_hispanic_alliance
	x = 0
	y = 2
	cost = 10
	prerequisite = {
		focus = CHL_the_hispanic_alliance
	}
	mutually_exclusive = {

	}
	ai_will_do = {
		base = 2
	}
	search_filters = {
		FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH
	}
	available = {
		has_government = fascism
		is_faction_leader = yes
		any_country = {
			NOT = {
				original_tag = CHL
			}
			is_in_faction_with = CHL
		}
	}
	completion_reward = {
		custom_effect_tooltip = CHL_joint_research_initiatives_tt CHL_skip_one_line_tt
		every_country = {
			limit = {
				has_government = fascism
				NOT = {
					has_war_with = ROOT
				}
				OR = {
					tag = CHL
					is_in_faction_with = ROOT
					is_subject_of = ROOT
				}
			}
			add_to_tech_sharing_group = CHL_fascist_tech_sharing_group
		} {
			limit = {
				NOT = {
					original_tag = CHL
				}
				is_in_faction_with = CHL
				has_government = fascism
			}
			random_state = {
				limit = {
					is_owned_and_controlled_by = PREV
					is_core_of = PREV
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}
		random_state = {
			limit = {
				is_capital = yes
				is_owned_and_controlled_by = ROOT
				is_core_of = ROOT
			}
			add_extra_state_shared_building_slots = 2
			add_building_construction = {
				type = industrial_complex
				level = 1
				instant_build = yes
			} {
				type = arms_factory
				level = 1
				instant_build = yes
			}
		}
	}
}
### Entity: Country History
Country: HAW
Component: HAW_misc
Constructs: set_technology, set_convoys, complete_national_focus, set_grand_doctrine, complete_special_project
Source: game
File: history/countries/HAW - Hawaii.txt

Code:
# Misc for HAW
capital = 629
set_convoys = 20
1939.1.1 = {
	complete_national_focus = army_effort equipment_effort motorization_effort aviation_effort naval_effort flexible_navy industrial_effort construction_effort production_effort
	set_technology = {
		electronic_mechanical_engineering = 1
		radio = 1
		mechanical_computing = 1
		basic_machine_tools = 1
		improved_machine_tools = 1
		advanced_machine_tools = 1
		construction1 = 1
		construction2 = 1
		dispersed_industry = 1
		dispersed_industry2 = 1
	}
	set_grand_doctrine = grand_battleplan
	complete_special_project = {
		project = sp:sp_air_radar
	}
}
### Entity: Idea
Component: PRE_arg
Source: game
File: common/ideas/prussia.txt

Code:
PRE_arg = {
	ledger = army
	picture = generic_army_europe_4
	allowed = {
		original_tag = PRE
	}
	traits = {
		army_regrouping_2
	}
	ai_will_do = {
		factor = 1
	}
}
### Entity: Event
Component: bra.15
Constructs: is_triggered_only, add_ideas, fire_only_once, add_political_power, set_party_name, add_popularity
Source: game
File: events/Brazil.txt

Code:
country_event = {
	id = bra.15
	title = bra.15.t
	desc = bra.15.d
	picture = GFX_bra.15
	is_triggered_only = yes
	fire_only_once = yes
	option = {
		name = bra.15.a
		add_ideas = BRA_filinto_muller
		set_party_name = {
			ideology = neutrality
			long_name = Estado Novo
			name = Estado Novo
		}
		add_popularity = {
			ideology = neutrality
			popularity = 0.125
		}
		add_political_power = 150
	}
}
### Entity: Country History
Country: COL
Component: COL_misc
Constructs: recruit_character, limit, set_technology, add_political_power, has_dlc, set_naval_oob, set_air_oob, create_equipment_variant
Source: game
File: history/countries/COL - Colombia.txt

Code:
# Misc for COL
capital = 306
if = {
	limit = {
		has_dlc = Man the Guns
	}
	set_naval_oob = COL_1936_naval_mtg
	else = {
		set_naval_oob = COL_1936_naval_legacy
	}
}
{
	limit = {
		has_dlc = By Blood Alone
	}
	set_air_oob = COL_1936_air_bba
	else = {
		set_air_oob = COL_1936_air_legacy
		set_technology = {
			early_fighter = 1
			cv_early_fighter = 1
		}
	}
}
{
	limit = {
		not = {
			has_dlc = Man the Guns
		}
	}
	set_technology = {
		early_destroyer = 1
	}
}
{
	limit = {
		has_dlc = Man the Guns
	}
	set_technology = {
		basic_naval_mines = 1
		early_ship_hull_light = 1
		basic_ship_hull_light = 1
		basic_battery = 1
		basic_torpedo = 1
		basic_depth_charges = 1
	}
}
{
	limit = {
		not = {
			has_dlc = Man the Guns
		}
	}
}
{
	limit = {
		has_dlc = Man the Guns
	}
	create_equipment_variant = {
		name = Antioquia Class
		type = ship_hull_light_1
		name_group = COL_DD_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_battery_2
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = light_ship_engine_2
			fixed_ship_torpedo_slot = ship_torpedo_1
			mid_1_custom_slot = ship_mine_layer_1
			rear_1_custom_slot = ship_depth_charge_1
		}
	}
}
set_country_flag = monroe_doctrine
set_convoys = 10 5
1939.1.1 = {
	add_political_power = 1198
	add_command_power = 100
	complete_national_focus = army_effort equipment_effort motorization_effort aviation_effort naval_effort large_navy industrial_effort construction_effort production_effort
	oob = COL_1939
	if = {
		limit = {
			has_dlc = Man the Guns
		}
		set_naval_oob = COL_1939_naval_mtg
		else = {
			set_naval_oob = COL_1939_naval_legacy
		}
	} {
		limit = {
			has_dlc = By Blood Alone
		}
		set_air_oob = COL_1939_air_bba
		else = {
			set_air_oob = COL_1939_air_legacy
		}
	}
	set_technology = {
		interwar_artillery = 1
		infantry_weapons1 = 1
		infantry_weapons2 = 1
		support_weapons = 1
		electronic_mechanical_engineering = 1
		radio = 1
		mechanical_computing = 1
		basic_machine_tools = 1
		improved_machine_tools = 1
		advanced_machine_tools = 1
		synth_oil_experiments = 1
		fuel_silos = 1
		oil_processing = 1
		improved_oil_processing = 1
		construction1 = 1
		construction2 = 1
		dispersed_industry = 1
		dispersed_industry2 = 1
	}
	set_grand_doctrine = grand_battlep
# ... (truncated)
### Entity: Decision
Component: BUL_rearmament
Constructs: has_completed_focus, has_war, limit, remove_ideas, has_government, has_country_flag, fire_only_once, is_historical_focus_on
Source: game
File: common/decisions/BUL.txt

Code:
BUL_rearmament = {
	BUL_demonstrate_our_policies_of_peace = {
		icon = GFX_decision_generic_form_nation
		ai_will_do = {
			base = 100
			modifier = {
				factor = 100
				is_historical_focus_on = yes
			} {
				factor = 0
				has_government = fascism
			}
		}
		cancel_trigger = {
			focus_progress = {
				focus = BUL_support_macedonian_organizations
				progress = > 0
			}
		}
		cancel_effect = {
			clr_country_flag = BUL_rearmament_negotiations_ongoing_flag
		}
		allowed = {
			original_tag = BUL
		}
		available = {
			has_war = no
			NOT = {
				has_country_flag = BUL_rearmament_negotiations_ongoing_flag
			}
			custom_trigger_tooltip = {
				tooltip = BUL_not_justifying_wargoals_tt
				NOT = {
					any_country = {
						BUL = {
							is_justifying_wargoal_against = PREV
						}
					}
				}
			}
		}
		days_remove = 90
		fire_only_once = yes
		visible = {
			OR = {
				has_idea = BUL_army_restrictions_aat BUL_army_restrictions
			}
			NOT = {
				has_completed_focus = BUL_support_macedonian_organizations
			}
			has_completed_focus = BUL_negotiate_bulgarian_rearmament
		}
		cost = 50
		complete_effect = {
			set_country_flag = BUL_rearmament_negotiations_ongoing_flag
		}
		remove_effect = {
			unlock_decision_tooltip = BUL_negotiate_bulgarian_rearmament
			clr_country_flag = BUL_rearmament_negotiations_ongoing_flag
			set_country_flag = {
				flag = BUL_rearmament_flag
				value = 1
			}
		}
	}
	BUL_negotiate_bulgarian_rearmament = {
		icon = GFX_decision_generic_industry
		ai_will_do = {
			base = 100
			modifier = {
				factor = 100
				is_historical_focus_on = yes
			} {
				factor = 0.5
				has_government = fascism
			}
		}
		allowed = {
			original_tag = BUL
		}
		available = {
			has_war = no
			NOT = {
				has_country_flag = BUL_rearmament_negotiations_ongoing_flag
			}
			custom_trigger_tooltip = {
				tooltip = BUL_not_justifying_wargoals_tt
				NOT = {
					any_country = {
						BUL = {
							is_justifying_wargoal_against = PREV
						}
					}
				}
			}
		}
		days_remove = 30
		fire_only_once = yes
		visible = {
			OR = {
				has_idea = BUL_army_restrictions_aat BUL_army_restrictions
			}
			NOT = {
				has_completed_focus = BUL_support_macedonian_organizations
			}
			has_country_flag = {
				flag = BUL_rearmament_flag
				value = 1
			}
		}
		cost = 50
		complete_effect = {
			set_country_flag = BUL_rearmament_negotiations_ongoing_flag {
		
# ... (truncated)
### Entity: Order of Battle
Component: Independent Guards Brigade
Constructs: division_template
Source: game
File: history/units/GDC_1936_sea.txt

Code:
division = {
	name = Independent Guards Brigade
	location = 1047
	division_template = Juntuán
	start_equipment_factor = 0.2
	officer = {
		name = GDC_chen_hanguang
	}
}
### Entity: Order of Battle
Component: air_wing_54
Source: game
File: history/units/GER_1939_air_legacy.txt

Code:
air_wings = {
	54 = {
		fighter_equipment_1 = {
			owner = GER
			amount = 24
		}
	}
}
### Entity: Event
Component: ww_BEL_event_diplomatic.19
Constructs: is_triggered_only, ai_chance
Source: game
File: events/WUW_Belgium.txt

Code:
country_event = {
	id = ww_BEL_event_diplomatic.19
	title = ww_BEL_event_diplomatic.19.t
	desc = ww_BEL_event_diplomatic.19.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes
	option = {
		name = ww_BEL_event_diplomatic.19.a
		ai_chance = {
			base = 10
		}
	}
}
### Entity: Unit Template
Component: USA_MNT_01
Source: game
File: common/units/names_divisions/USA_names_divisions.txt

Code:
USA_MNT_01 = {
	name = Mountain Division
	for_countries = {
		USA
	}
	can_use = {
		always = yes
	}
	division_types = {
		mountaineers
	}
	link_numbering_with = {
		USA_INF_01
	}
	fallback_name = %d Mountain Division
	ordered = {
		10 = {
			%dth Mountain Division
		}
		14 = {
			%dth Mountain Division
		}
		22 = {
			%dnd Mountain Division
		}
		50 = {
			%dth Mountain Division
		}
		55 = {
			%dth Mountain Division
		}
		12 = {
			%dth 'Rocky Mountain' Division
		}
		15 = {
			%dth 'Appalachia' Division
		}
		16 = {
			%dth 'Smoky Mountains' Division
		}
		19 = {
			%dth 'Cold Mountain' Division
		}
		20 = {
			%dth 'Sierra Nevada' Division
		}
		48 = {
			%dth 'Stone Mountain' Division
		}
		49 = {
			%dth 'Granite' Division
		}
		51 = {
			%dst Mountain Division
		}
		52 = {
			%dnd 'Catskills' Division
		}
		53 = {
			%drd Mountain Division
		}
		54 = {
			%dth 'Wasatch Mountains' Division
		}
		56 = {
			%dth 'Yellowstone' Division
		}
		57 = {
			%dth Mountain Division
		}
		58 = {
			%dth 'Yosemite' Division
		}
		59 = {
			%dth Mountain Division
		}
		204 = {
			%dth 'Mountain Lions' Division
		}
		279 = {
			%dth Mountain Division
		}
		280 = {
			%dth Mountain Division
		}
		281 = {
			%dst Mountain Division
		}
		282 = {
			%dnd Mountain Division
		}
		283 = {
			%drd Mountain Division
		}
		284 = {
			%dth Mountain Division
		}
		285 = {
			%dth Mountain Division
		}
		286 = {
			%dth Mountain Division
		}
		287 = {
			%dth Mountain Division
		}
		288 = {
			%dth Mountain Division
		}
	}
}
### Entity: AI Strategy
Component: generic_strategic_bomber
Constructs: any_of
Source: game
File: common/ai_equipment/generic_planes.txt

Code:
generic_strategic_bomber = {
	category = air
	blocked_for = {
		GER ENG USA SOV
	}
	available_for = {

	}
	roles = {
		air_strategic_bomber
	}
	priority = {
		factor = 200
		modifier = {
			num_of_factories = < 50
			factor = 0
		}
	}
	strat_bomber_0_default = {
		priority = {
			factor = 5
		}
		history = yes
		target_variant = {
			match_value = 500
			type = large_plane_airframe_0
			modules = {
				fixed_main_weapon_slot = large_bomb_bay
				engine_type_slot = engine_1_4x
				special_type_slot_1 = {
					any_of = {
						lmg_defense_turret lmg_defense_turret_2x
					}
				}
			}
		}
		allowed_modules = {
			large_bomb_bay engine_1_4x lmg_defense_turret_2x lmg_defense_turret
		}
	}
	strat_bomber_1_default = {
		priority = {
			factor = 10
		}
		history = yes
		target_variant = {
			match_value = 1000
			type = large_plane_airframe_1
			modules = {
				fixed_main_weapon_slot = large_bomb_bay
				fixed_auxiliary_weapon_slot_1 = empty
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = engine_2_4x
				special_type_slot_1 = lmg_defense_turret_2x
				special_type_slot_2 = lmg_defense_turret
			}
		}
		allowed_modules = {
			large_bomb_bay engine_2_4x lmg_defense_turret_2x lmg_defense_turret
		}
	}
	strat_bomber_2_default = {
		priority = {
			factor = 10
		}
		history = yes
		target_variant = {
			match_value = 2000
			type = large_plane_airframe_2
			modules = {
				fixed_main_weapon_slot = large_bomb_bay
				fixed_auxiliary_weapon_slot_1 = large_bomb_bay
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = engine_3_4x
				special_type_slot_1 = hmg_defense_turret_2x
				special_type_slot_2 = lmg_defense_turret_2x
			}
		}
		allowed_modules = {
			large_bomb_bay engine_3_4x hmg_defense_turret_2x lmg_defense_turret_2x
		}
	}
	strat_bomber_3_default = {
		priority = {
			factor = 10
		}
		history = yes
		target_variant = {
			match_value = 4000
			type = large_plane_airframe_3
			modules = {
				fixed_main_weapon_slot = large_bomb_bay
				fixed_auxiliary_weapon_slot_1 = large_bomb_bay
				fixed_auxiliary_weapon_slot_2 = large_bomb_bay
				engine_type_slot = engine_4_4x
				special_type_slot_1 = cannon_defense_turret_2x
				special_type_slot_2 = hmg_defense_turret_2x
				special_type_slot_3 = empty
			}
		}
		allowed_modules = {
			large_bomb_bay engine_4_4x cannon_defense_turret_2x hmg_defense_turret_2x
		}
	}
}
### Entity: Wiki Documentation
Construct: Usage
Source: wiki
File: wiki/Template%3AAdd.html

Doc:
Usage

```
{{Add|Strategy}}
```
generates a strategy section-specific addbox.

```
{{Add|Background}}
```
generates a background information specific addbox.

```
{{Add}}
```
generates a generic 'add to article' box.

Retrieved from "http://www.hoi4wiki.com/index.php?title=Template:Add&oldid=1916"
### Entity: Idea
Component: SPR_hispano_suiza
Constructs: has_dlc, research_bonus, has_global_flag
Source: game
File: common/ideas/spain_republic.txt

Code:
SPR_hispano_suiza = {
	picture = SPR_hispano_suiza
	allowed = {
		OR = {
			AND = {
				has_dlc = La Resistance
				original_tag = SPR
			}
			SWI_bba_lar = yes
		}
	}
	available = {
		OR = {
			custom_trigger_tooltip = {
				tooltip = SPR_scw_not_in_progress_tt
				NOT = {
					SPR_scw_in_progress = yes
				}
			}
			controls_state = 165
		}
	}
	research_bonus = {
		motorized_equipment = 0.15
	}
	traits = {
		motorized_equipment_manufacturer
	}
	modifier = {

	}
	ai_will_do = {
		factor = 1
		modifier = {
			factor = 0
			SWI_bba_lar = yes
			NOT = {
				has_global_flag = scw_over
			}
		}
	}
}
### Entity: Wiki Documentation
Construct: Original_content
Source: wiki
File: wiki/Hearts_of_Iron_4_Wiki%3ACopyrights.html

Doc:
Original content
All editors publish their contributions under the Creative Commons Attribution-Share Alike 3.0 license. In short, this means that content from Paradox Wikis may be copied and adapted by others, provided that such usage includes an attribution and link to the specific wiki, and that any resulting derivative works are published under an equivalent license. This license applies to articles as a whole; copyright to individual pieces of an article (such as an image) may be held by someone else and governed by a different license.
### Entity: Idea
Component: POL_royal_guard
Constructs: has_government, removal_cost
Source: game
File: common/ideas/poland.txt

Code:
POL_royal_guard = {
	allowed = {
		always = no
	}
	allowed_civil_war = {
		has_government = neutrality
	}
	picture = generic_infantry_bonus
	removal_cost = -1
	modifier = {
		special_forces_cap = 0.05
		special_forces_training_time_factor = -0.1
	}
}
### Entity: National Focus
Tree: pol_focus
Component: POL_adaptive_designs
Constructs: prerequisite, limit, has_country_flag, completion_reward, has_dlc, has_idea, add_mio_funds, add_mio_funds_gain_factor
Source: game
File: common/national_focus/poland.txt

Code:
focus = {
	id = POL_adaptive_designs
	icon = GFX_goal_generic_production2
	prerequisite = {
		focus = POL_attract_foreign_motors
	} {
		focus = POL_anti_tank_guns
	}
	x = 1
	y = 1
	relative_position_id = POL_attract_foreign_motors
	cost = 10
	ai_will_do = {
		factor = 10
	}
	available = {
		has_country_flag = invited_motor_co
		IF = {
			limit = {
				NOT = {
					has_dlc = Arms Against Tyranny
				}
			}
			OR = {
				has_idea = POL_vauxhall POL_ford POL_somua
			}
		}
	}
	available_if_capitulated = yes
	search_filters = {
		FOCUS_FILTER_INDUSTRY
	}
	completion_reward = {
		IF = {
			limit = {
				has_dlc = Arms Against Tyranny
			}
			IF = {
				limit = {
					has_country_flag = POL_somua_motors
				}
				mio:FRA_somua_organization = {
					add_mio_funds = 500
					add_mio_funds_gain_factor = 0.1
				}
			} {
				limit = {
					has_country_flag = POL_vauxhall_motors
				}
				mio:ENG_vauxhall_organization = {
					add_mio_funds = 500
					add_mio_funds_gain_factor = 0.1
				}
			} {
				limit = {
					has_country_flag = POL_ford_motors
				}
				mio:USA_ford_motor_company_organization = {
					add_mio_funds = 500
					add_mio_funds_gain_factor = 0.1
				}
			}
		}
		ELSE = {
			if = {
				limit = {
					has_idea = POL_vauxhall
				}
				swap_ideas = {
					remove_idea = POL_vauxhall
					add_idea = POL_vauxhall_free
				}
			}
			else_if = {
				limit = {
					has_idea = POL_somua
				}
				swap_ideas = {
					remove_idea = POL_somua
					add_idea = POL_somua_free
				}
			} {
				limit = {
					has_idea = POL_ford
				}
				swap_ideas = {
					remove_idea = POL_ford
					add_idea = POL_ford_free
				}
			}
			else = {
				custom_effect_tooltip = POL_motors_become_free_tt
			}
		}
	}
}
### Entity: Character
Component: GER_socialist_visionary
Constructs: research_speed_factor, stability_factor, industrial_capacity_factory, production_speed_buildings_factor, communism_drift
Source: game
File: common/country_leader/r56_traits.txt

Code:
GER_socialist_visionary = {
	sprite = 13
	random = no
	communism_drift = 0.03
	industrial_capacity_factory = 0.025
	production_speed_buildings_factor = 0.05
	research_speed_factor = 0.05
	stability_factor = 0.05
}
### Entity: National Focus
Tree: spr_focus
Component: SPR_exploit_spains_riches
Constructs: prerequisite, limit, remove_ideas, completion_reward, has_idea, swap_ideas, remove_idea, add_idea
Source: game
File: common/national_focus/spain.txt

Code:
focus = {
	id = SPR_exploit_spains_riches
	available = {

	}
	bypass = {

	}
	prerequisite = {
		focus = SPR_beacon_of_socialism
	} {
		focus = SPR_increase_arms_production
	}
	icon = GFX_goal_generic_construction2
	x = 1
	y = 1
	relative_position_id = SPR_beacon_of_socialism
	cost = 10
	available_if_capitulated = yes
	search_filters = {

	}
	completion_reward = {
		if = {
			limit = {
				has_idea = SPA_recovering_from_civil_war_3
			}
			remove_ideas = SPA_recovering_from_civil_war_3
		}
		else_if = {
			limit = {
				has_idea = SPA_recovering_from_civil_war_2
			}
			swap_ideas = {
				remove_idea = SPA_recovering_from_civil_war_2
				add_idea = SPA_recovering_from_civil_war_3
			}
		} {
			limit = {
				has_idea = SPA_recovering_from_civil_war
			}
			swap_ideas = {
				remove_idea = SPA_recovering_from_civil_war
				add_idea = SPA_recovering_from_civil_war_2
			}
		} {
			limit = {
				NOT = {
					has_global_flag = scw_over
				}
			}
			effect_tooltip = {
				swap_ideas = {
					remove_idea = SPA_recovering_from_civil_war
					add_idea = SPA_recovering_from_civil_war_2
				}
			}
		}
		custom_effect_tooltip = SPA_reduce_reliance_on_foreign_resources_tt
	}
}