Losa10/PreTrain-HOI4-Modding-Assistant huggingface dataset:
### Entity: Character
Component: UAE_pot
Source: game
File: common/characters/UAE.txt

Code:
UAE_pot = {
	advisor = {
		slot = political_advisor
		idea_token = UAE_pot
		allowed = {
			original_tag = UAE
		}
		traits = {
			prince_of_terror
		}
	}
	portraits = {
		army = {
			small = GFX_idea_generic_political_advisor_arab_2
		}
	}
}
### Entity: Scripted Effect
Component: NORDIC_airforce_originator_to_member
Constructs: limit, has_dynamic_modifier, remove_dynamic_modifier, add_dynamic_modifier, swap_ideas, remove_idea, add_idea
Source: game
File: common/scripted_effects/NORDIC_scripted_effects.txt

Code:
NORDIC_airforce_originator_to_member = {
	if = {
		limit = {
			has_dynamic_modifier = {
				modifier = NORDIC_airforces_originator_dmod
			}
		}
		custom_effect_tooltip = NORDIC_becomes_airforce_member_tooltip
		hidden_effect = {
			remove_dynamic_modifier = {
				modifier = NORDIC_airforces_originator_dmod
			}
			add_dynamic_modifier = {
				modifier = NORDIC_airforces_member_dmod
			}
			swap_ideas = {
				remove_idea = NORDIC_hidden_airforces_originator_dmod
				add_idea = NORDIC_hidden_airforces_member_dmod
			} {
				remove_idea = NORDIC_hidden_airforces_naval_originator_dmod
				add_idea = NORDIC_hidden_airforces_naval_member_dmod
			}
		}
	}
}
### Entity: Character
Component: EQG_ar
Source: game
File: common/characters/EQG.txt

Code:
EQG_ar = {
	advisor = {
		slot = high_command
		idea_token = EQG_ar
		ledger = army
		allowed = {
			original_tag = EQG
		}
		traits = {
			army_regrouping_2
		}
		ai_will_do = {
			factor = 1.0
		}
	}
	portraits = {
		army = {
			small = GFX_idea_generic_army_african_5
		}
	}
}
### Entity: Decision
Component: MPL_stabilize_syria_category
Source: game
File: common/decisions/categories/MPL_decision_categories.txt

Code:
MPL_stabilize_syria_category = {
	icon = GFX_decision_category_eng_move_to_secure_the_dominions
	priority = 200
}
### Entity: Idea
Component: bra_antropofagia_dem_3
Constructs: stability_factor, war_support_factor, has_government, is_subject, is_puppet, removal_cost, autonomy_gain, guarantee_cost
Source: game
File: common/ideas/r56_brazil.txt

Code:
bra_antropofagia_dem_3 = {
	allowed = {
		original_tag = BRA
		always = no
	}
	allowed_civil_war = {
		always = yes
	}
	picture = generic_reserve_divisions
	cancel = {
		OR = {
			is_subject = yes
			is_puppet = yes
		}
		NOT = {
			has_government = democratic
		}
	}
	removal_cost = -1
	modifier = {
		non_core_manpower = 0.05
		trade_opinion_factor = 0.2
		min_export = 0.05
		foreign_subversive_activites = -0.75
		autonomy_gain = 1
		opinion_gain_monthly_factor = 0.2
		ai_focus_aggressive_factor = -0.2
		ai_get_ally_desire_factor = -10
		ai_call_ally_desire_factor = -10
		ai_join_ally_desire_factor = -10
		war_support_factor = -0.1
		guarantee_cost = 1
		generate_wargoal_tension = 0.25
		subjects_autonomy_gain = -0.2
		opinion_gain_monthly_same_ideology_factor = -0.1
		democratic_drift = 0.1
		stability_factor = 0.05
		lend_lease_tension = -0.2
		political_power_factor = 0.25
		conscription = 0.02
		training_time_factor = -0.05
		army_org = 7
	}
}
### Entity: Character
Component: MLW_mt
Source: game
File: common/characters/MLW.txt

Code:
MLW_mt = {
	advisor = {
		slot = theorist
		idea_token = MLW_mt
		ledger = army
		allowed = {
			original_tag = MLW
		}
		traits = {
			military_theorist
		}
	}
	portraits = {
		army = {
			small = GFX_idea_generic_army_african_6
		}
	}
}
### Entity: National Focus
Tree: cos_focus
Component: COS_comunismo_a_la_tica
Constructs: prerequisite, limit, add_ideas, has_war_with, add_opinion_modifier, completion_reward, add_popularity, set_rule
Source: game
File: common/national_focus/costa_rica.txt

Code:
focus = {
	id = COS_comunismo_a_la_tica
	icon = GFX_goal_generic_communist_pride
	prerequisite = {
		focus = COS_revolution_in_san_jose
	}
	mutually_exclusive = {
		focus = COS_follow_moscow
	}
	cost = 10
	search_filters = {
		FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_INDUSTRY
	}
	x = 1
	y = 3
	relative_position_id = COS_ally_the_pvp
	ai_will_do = {
		factor = 10
	}
	completion_reward = {
		add_popularity = {
			ideology = democratic
			popularity = 0.05
		}
		set_rule = {
			can_create_factions = yes
		}
		add_ideas = COS_comunismo_a_la_tica
		if = {
			limit = {
				country_exists = USA
				NOT = {
					has_war_with = USA
				}
			}
			SOV = {
				add_opinion_modifier = {
					target = ROOT
					modifier = betrayed_our_cause
				}
			}
		}
	}
}
### Entity: Shared Focus
Component: CONGO_symbiotic_industrialization
Constructs: shared_focus, prerequisite, limit, has_war_with, completion_reward, allow_branch, has_subject, has_global_flag
Source: game
File: common/national_focus/congo_shared.txt

Code:
shared_focus = {
	id = CONGO_symbiotic_industrialization
	dynamic = yes
	icon = GFX_goal_generic_construct_civ_factory
	prerequisite = {
		focus = CONGO_societe_generale_de_belgique
	} {
		focus = BEL_railway_expansion
	}
	relative_position_id = CONGO_societe_generale_de_belgique
	x = -1
	y = 1
	cost = 10
	text_icon = CONGO_BEL_focus_style
	allow_branch = {
		OR = {
			original_tag = BEL COG
		}
	}
	available = {
		original_tag = BEL
		has_subject = COG
		NOT = {
			OR = {
				has_war_with = BEL COG
				has_global_flag = CONGO_independence_war_ongoing
			}
		}
	}
	available_if_capitulated = yes
	search_filters = {
		FOCUS_FILTER_INDUSTRY
	}
	completion_reward = {
		IF = {
			limit = {
				original_tag = COG
			}
			effect_tooltip = {
				BEL = {
					random_state = {
						limit = {
							is_core_of = BEL
							is_owned_by = BEL
							is_controlled_by = BEL
							free_building_slots = {
								building = industrial_complex
								size = > 1
								include_locked = yes
							}
						}
						prioritize = {
							977
						}
						add_extra_state_shared_building_slots = 2
						add_building_construction = {
							type = industrial_complex
							level = 2
							instant_build = yes
						}
					}
				}
				custom_effect_tooltip = generic_skip_one_line_tt
				random_controlled_state = {
					limit = {
						is_core_of = COG
						is_owned_by = COG
						is_fully_controlled_by = COG
						free_building_slots = {
							building = industrial_complex
							size = > 1
							include_locked = yes
						}
					}
					prioritize = {
						295
					}
					add_extra_state_shared_building_slots = 2
					add_building_construction = {
						type = industrial_complex
						level = 2
						instant_build = yes
					}
				}
			}
		}
		ELSE_IF = {
			limit = {
				original_tag = BEL
				COG = {
					is_subject_of = BEL
				}
			}
			random_controlled_state = {
				limit = {
					is_core_of = BEL
					is_owned_by = BEL
					is_controlled_by = BEL
					free_building_slots = {
						building = industrial_complex
						size = > 1
						include_locked = yes
					}
				}
				prioritize = {
					977
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			custom_effect_tooltip = generic_skip_one_line_tt
			random_state = {
				limit = {
					is_core_of = COG
				
# ... (truncated)
### Entity: Country History
Country: GRA
Component: GRA_characters
Constructs: recruit_character
Source: game
File: history/countries/GRA - Grenada.txt

Code:
# Leaders & Characters for GRA
recruit_character = GRA_theophilus_albert_marryshow
### Entity: Idea
Component: SIA_sluggish_industrialization_improved_r56
Constructs: removal_cost
Source: game
File: common/ideas/siam_r56.txt

Code:
SIA_sluggish_industrialization_improved_r56 = {
	name = SIA_sluggish_industrialization_r56
	allowed_civil_war = {
		original_tag = SIA
	}
	removal_cost = -1
	picture = usa_great_depression
	modifier = {
		consumer_goods_factor = 0.1
		local_resources_factor = 0.1
	}
}
### Entity: Idea
Component: CHL_banco_central_de_chile
Constructs: has_completed_focus, has_dlc, research_bonus
Source: game
File: common/ideas/chile.txt

Code:
CHL_banco_central_de_chile = {
	picture = CHL_bcc
	allowed = {
		original_tag = CHL
		has_dlc = Trial of Allegiance
	}
	available = {
		OR = {
			has_completed_focus = CHL_strengthen_the_central_bank CHL_inflation_control_by_the_central_bank
		}
	}
	visible = {
		NOT = {
			has_completed_focus = CHL_inflation_control_by_the_central_bank
		}
	}
	research_bonus = {

	}
	traits = {
		central_bank
	}
	modifier = {
		consumer_goods_factor = -0.15
	}
}
### Entity: National Focus
Tree: sia_focus
Component: SIA_prepare_for_a_long_war
Constructs: prerequisite, completion_reward, add_to_variable
Source: game
File: common/national_focus/siam.txt

Code:
focus = {
	id = SIA_prepare_for_a_long_war
	icon = GFX_focus_SIA_prepare_for_a_long_war
	x = 2
	y = 0
	relative_position_id = SIA_intermediate_war_preparation
	prerequisite = {
		focus = SIA_the_army_of_siam
	}
	mutually_exclusive = {
		focus = SIA_plan_for_a_short_war SIA_intermediate_war_preparation
	}
	cost = 5
	ai_will_do = {
		factor = 10
	}
	available = {

	}
	search_filters = {
		FOCUS_FILTER_ARMY_XP FOCUS_FILTER_RESEARCH
	}
	completion_reward = {
		custom_effect_tooltip = idea_SIA_the_army_of_siam_tt
		add_to_variable = {
			SIA_army_of_siam_line_change_production_efficiency_factor = 0.1
			tooltip = line_change_production_efficiency_factor_tt
		} {
			SIA_army_of_siam_production_factory_max_efficiency_factor = 0.05
			tooltip = production_factory_max_efficiency_factor_tt
		} {
			SIA_army_of_siam_research_speed_factor = 0.06
			tooltip = research_speed_factor_tt
		} {
			SIA_army_of_siam_land_mastery_gain_factor = 0.1
			tooltip = land_mastery_gain_factor_tt
		}
	}
}
### Entity: State History
Component: 1139
Constructs: add_core_of
Source: game
File: history/states/1139 - Marlborough.txt

Code:
state = {
	id = 1139
	name = STATE_1139
	manpower = 127198
	resources = {
		tungsten = 2
	}
	state_category = rural
	history = {
		owner = NZL
		add_core_of = NZL
		buildings = {
			infrastructure = 2
		}
		victory_points = {
			12632 1
		}
	}
	provinces = {
		12632 10650 4819 8204 7839
	}
	local_supplies = 0.0
}
### Entity: Idea
Component: taiwan_returned
Constructs: stability_factor, has_government, removal_cost
Source: game
File: common/ideas/r56_japan.txt

Code:
taiwan_returned = {
	name = taiwan_returned
	picture = FRA_matignon_agreements
	allowed = {
		always = no
	}
	allowed_civil_war = {
		NOT = {
			has_government = democratic
		}
	}
	removal_cost = -1
	modifier = {
		stability_factor = -0.3
		political_power_factor = -0.5
	}
}
### Entity: Effect Reference
Construct: construct_building_in_random_province
Source: vanilla_docs
File: documentation/effects_documentation.md

Doc:
## construct_building_in_random_province

* Supported Scopes: STATE
* Supported Targets: none

```
Set facility level in a random province of state and country scope.
	ex:
    GER = {
        65 = {
			construct_building_in_random_province = {
				land_facility = 1
			}
		}
	}

```
### Entity: Idea
Component: EAI_desperate_defense_13
Source: game
File: common/ideas/EAI_difficulty_ideas.txt

Code:
EAI_desperate_defense_13 = {
	picture = air_war_plans_division_focus
	allowed = {
		always = no
	}
	modifier = {
		training_time_army_factor = -0.72
		industrial_capacity_dockyard = 0.65
		production_factory_efficiency_gain_factor = 1.3
	}
}
### Entity: Decision
Component: form_turkestan_category
Constructs: add_ideas, has_global_flag, complete_effect, set_cosmetic_tag, add_core_of, set_global_flag
Source: game
File: common/decisions/formable_nation_decisions.txt

Code:
form_turkestan_category = {
	form_turkestan = {
		icon = generic_form_nation
		allowed = {
			OR = {
				original_tag = TAN KAZ UZB KYR TAJ TMS SIK BUK KHI KKP KUM
			}
		}
		on_map_mode = decision_view_only
		highlight_states = {
			highlight_state_targets = {
				state = 402 404 406 407 583 586 587 588 589 590 881 882 405 585 831 823 830 732 742 584 832 881 882
			}
		}
		available = {
			custom_trigger_tooltip = {
				tooltip = form_country_kazakhstan_required_states
				controls_state = 402 404 406 407 583 586 587 588 589 590 881 882
			} {
				tooltip = form_country_uzbekistan_required_states
				controls_state = 405 585 831
			}
			controls_state = 823 830 732 742 584 832 881 882
		}
		visible = {
			OR = {
				original_tag = TAN KAZ UZB KYR TAJ TMS SIK BUK KHI KKP KUM
			}
			NOT = {
				has_global_flag = form_turkestan_flag
			}
		}
		complete_effect = {
			set_cosmetic_tag = turkestan_united
			custom_effect_tooltip = form_country_kazakhstan_coring_states_tt form_country_uzbekistan_coring_states_tt form_country_sinkiang_coring_states_tt
			hidden_effect = {
				402 = {
					add_core_of = ROOT
				}
				404 = {
					add_core_of = ROOT
				}
				406 = {
					add_core_of = ROOT
				}
				407 = {
					add_core_of = ROOT
				}
				583 = {
					add_core_of = ROOT
				}
				586 = {
					add_core_of = ROOT
				}
				587 = {
					add_core_of = ROOT
				}
				588 = {
					add_core_of = ROOT
				}
				589 = {
					add_core_of = ROOT
				}
				590 = {
					add_core_of = ROOT
				}
				881 = {
					add_core_of = ROOT
				}
				882 = {
					add_core_of = ROOT
				}
			} {
				405 = {
					add_core_of = ROOT
				}
				585 = {
					add_core_of = ROOT
				}
				830 = {
					add_core_of = ROOT
				}
				823 = {
					add_core_of = ROOT
				}
				831 = {
					add_core_of = ROOT
				}
			} {
				287 = {
					add_core_of = ROOT
				}
				617 = {
					add_core_of = ROOT
				}
				618 = {
					add_core_of = ROOT
				}
				619 = {
					add_core_of = ROOT
				}
				759 = {
					add_core_of = ROOT
				}
				760 = {
					add_core_of = ROOT
				}
			} {
				news_event = {
					id = nsb_news.3
					hours = 6
				}
				set_global_flag = form_turkestan_flag
			}
			584 = {
				add_core_of = ROOT
			}
			832 = {
				add_core_of = ROOT
			}
			732 = {
				add_core_of = ROOT
			}
			742 = {
				add_core_of = ROOT
			}
			329 = {
				add_core_of = ROOT
			}
			654 = {
				add_core_of 
# ... (truncated)
### Entity: Modifier Reference
Component: idea_RAJ_five_year_plan
Constructs: research_speed_factor, stability_factor, industrial_capacity_factory, production_speed_buildings_factor
Source: game
File: common/dynamic_modifiers/GoE_dynamic_modifiers.txt

Code:
idea_RAJ_five_year_plan = {
	icon = GFX_idea_man_five_year_plan_industry
	stability_factor = RAJ_fyp_stability_factor
	production_speed_buildings_factor = RAJ_fyp_production_speed_buildings_factor
	consumer_goods_factor = RAJ_fyp_consumer_goods_factor
	research_speed_factor = RAJ_fyp_research_speed_factor
	production_speed_industrial_complex_factor = RAJ_fyp_production_speed_industrial_complex_factor
	production_speed_arms_factory_factor = RAJ_fyp_production_speed_arms_factory_factor
	production_speed_dockyard_factor = RAJ_fyp_production_speed_dockyard_factor
	production_factory_efficiency_gain_factor = RAJ_fyp_production_factory_efficiency_gain_factor
	production_factory_max_efficiency_factor = RAJ_fyp_production_factory_max_efficiency_factor
	local_resources_factor = RAJ_fyp_local_resources_factor
	production_lack_of_resource_penalty_factor = RAJ_fyp_production_lack_of_resource_penalty_factor
	line_change_production_efficiency_factor = RAJ_fyp_line_change_production_efficiency_factor
	production_factory_start_efficiency_factor = RAJ_fyp_production_factory_start_efficiency_factor
	industry_air_damage_factor = RAJ_fyp_industry_air_damage_factor
	global_building_slots_factor = RAJ_fyp_global_building_slots_factor
	industrial_capacity_factory = RAJ_fyp_industrial_capacity_factory
	compliance_growth = RAJ_fyp_compliance_growth
	supply_consumption_factor = RAJ_fyp_supply_consumption_factor
}
### Entity: Country History
Country: CIN
Component: CIN_misc
Constructs: limit, set_technology, set_research_slots, set_grand_doctrine, has_dlc
Source: game
File: history/countries/CIN - Chechnya-Ingushetia.txt

Code:
# Misc for CIN
capital = 821
set_research_slots = 3
set_grand_doctrine = mass_assault new_fleet_in_being
if = {
	limit = {
		NOT = {
			has_dlc = By Blood Alone
		}
	}
	set_technology = {
		early_fighter = 1
		fighter1 = 1
		early_bomber = 1
		strategic_bomber1 = 1
		naval_bomber1 = 1
	}
}
{
	limit = {
		NOT = {
			has_dlc = No Step Back
		}
	}
	set_technology = {
		gwtank = 1
		basic_light_tank = 1
	}
}
{
	limit = {
		has_dlc = No Step Back
	}
	set_technology = {
		gwtank_chassis = 1
		basic_light_tank_chassis = 1
	}
}
{
	limit = {
		not = {
			has_dlc = Man the Guns
		}
	}
	set_technology = {
		early_submarine = 1
		basic_submarine = 1
		early_destroyer = 1
		early_light_cruiser = 1
		early_heavy_cruiser = 1
		early_battleship = 1
		early_battlecruiser = 1
		transport = 1
	}
}
{
	limit = {
		has_dlc = Man the Guns
	}
	set_technology = {
		early_ship_hull_submarine = 1
		basic_ship_hull_submarine = 1
		early_ship_hull_light = 1
		early_ship_hull_cruiser = 1
		early_ship_hull_heavy = 1
		mtg_transport = 1
		basic_battery = 1
		basic_torpedo = 1
	}
}
### Entity: Decision
Component: ITA_missiolinis
Source: game
File: common/decisions/categories/ITA_decision_categories.txt

Code:
ITA_missiolinis = {
	icon = decision_category_ITA_missiolinis
	picture = GFX_decision_cat_picture_ITA_missiolinis
	allowed = {
		original_tag = ITA
	}
	priority = 100
	visible_when_empty = yes
	visible = {
		ITA_missiolinis_system_available = yes
	}
}
### Entity: Scripted Effect
Component: EAI_BUILDING_FACTORY_set_building_target_flags
Constructs: limit, has_country_flag, set_temp_variable, add_to_temp_variable, check_variable, set_variable, add_to_variable, set_country_flag
Source: game
File: common/scripted_effects/EAI_CONSTRUCTION_NORMAL_effects.txt

Code:
EAI_BUILDING_FACTORY_set_building_target_flags = {
	set_temp_variable = {
		EAI_total_building_weight = EAI_BUILDING_target_weight_CIC
	} {
		EAI_BUILDING_target_ratio_CIC = EAI_BUILDING_target_weight_CIC
	} {
		EAI_BUILDING_target_ratio_MIC = EAI_BUILDING_target_weight_MIC
	} {
		EAI_BUILDING_target_ratio_NIC = EAI_BUILDING_target_weight_NIC
	} {
		EAI_BUILDING_target_num_CIC = EAI_BUILDING_target_ratio_CIC
	} {
		EAI_BUILDING_target_num_MIC = EAI_BUILDING_target_ratio_MIC
	} {
		EAI_BUILDING_target_num_NIC = EAI_BUILDING_target_ratio_NIC
	} {
		EAI_BUILDING_num_slots_assigned = EAI_BUILDING_num_free_slots
	} {
		EAI_BUILDING_num_build_extra_CIC = EAI_BUILDING_target_num_CIC
	} {
		EAI_BUILDING_num_build_extra_MIC = EAI_BUILDING_target_num_MIC
	} {
		EAI_BUILDING_num_build_extra_NIC = EAI_BUILDING_target_num_NIC
	} {
		EAI_BUILDING_num_build_extra_total = EAI_BUILDING_num_build_extra_CIC
	}
	add_to_temp_variable = {
		EAI_total_building_weight = EAI_BUILDING_target_weight_MIC
	} {
		EAI_total_building_weight = EAI_BUILDING_target_weight_NIC
	} {
		EAI_BUILDING_num_build_extra_total = EAI_BUILDING_num_build_extra_MIC
	} {
		EAI_BUILDING_num_build_extra_total = EAI_BUILDING_num_build_extra_NIC
	}
	divide_temp_variable = {
		EAI_BUILDING_target_ratio_CIC = EAI_total_building_weight
	} {
		EAI_BUILDING_target_ratio_MIC = EAI_total_building_weight
	} {
		EAI_BUILDING_target_ratio_NIC = EAI_total_building_weight
	}
	multiply_temp_variable = {
		EAI_BUILDING_target_num_CIC = EAI_BUILDING_num_total_slots
	} {
		EAI_BUILDING_target_num_MIC = EAI_BUILDING_num_total_slots
	} {
		EAI_BUILDING_target_num_NIC = EAI_BUILDING_num_total_slots
	} {
		EAI_BUILDING_num_slots_assigned = 0.25
	}
	if = {
		limit = {
			has_country_flag = EAI_building_logging
		}
		log =   special_building_target_modifiers:  
	} {
		limit = {
			has_country_flag = EAI_building_logging
		}
		log =    
		if = {
			limit = {
				has_country_flag = EAI_building_logging
			}
			log = END modifiers
		}
	} {
		limit = {
			check_variable = {
				_lock_target_num_CIC = 0
			}
		}
		set_temp_variable = {
			EAI_BUILDING_num_build_extra_ratio_CIC = EAI_BUILDING_num_build_extra_CIC
		}
		divide_temp_variable = {
			EAI_BUILDING_num_build_extra_ratio_CIC = EAI_BUILDING_num_build_extra_total
		}
	} {
		limit = {
			check_variable = {
				_lock_target_num_MIC = 0
			}
		}
		set_temp_variable = {
			EAI_BUILDING
# ... (truncated)
### Entity: National Focus
Tree: nor_focus
Component: NOR_german_technology_sharing
Constructs: prerequisite, limit, has_war_with, completion_reward, is_in_faction_with
Source: game
File: common/national_focus/r56_norway.txt

Code:
focus = {
	id = NOR_german_technology_sharing
	icon = GFX_goal_tfv_generic_tech_sharing
	prerequisite = {
		focus = NOR_join_axis NOR_german_puppet
	}
	x = 0
	y = 2
	relative_position_id = NOR_support_radical_nationalism
	cost = 5
	ai_will_do = {
		base = 25
	}
	available = {
		NOT = {
			has_war_with = GER
		}
		is_in_faction_with = GER
	}
	available_if_capitulated = yes
	completion_reward = {
		custom_effect_tooltip = NOR_german_technology_sharing_tt
		if = {
			limit = {
				GER = {
					is_in_faction_with = NOR
				}
			}
			GER = {
				country_event = naw_norway.16
			}
		}
	}
	search_filters = {
		FOCUS_FILTER_RESEARCH
	}
}
### Entity: National Focus
Tree: por_focus
Component: POR_a_new_industry
Constructs: prerequisite, limit, add_ideas, completion_reward, has_tech, has_full_control_of_state, add_extra_state_shared_building_slots, add_building_construction
Source: game
File: common/national_focus/portugal.txt

Code:
focus = {
	id = POR_a_new_industry
	available = {
		has_tech = advanced_machine_tools
	}
	bypass = {

	}
	prerequisite = {
		focus = POR_industrial_modernization
	}
	icon = GFX_focus_generic_industry_3
	x = 0
	y = 1
	relative_position_id = POR_industrial_modernization
	cost = 10
	search_filters = {
		FOCUS_FILTER_INDUSTRY
	}
	completion_reward = {
		if = {
			limit = {
				has_full_control_of_state = 112
			}
			112 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		} {
			limit = {
				has_full_control_of_state = 795
			}
			795 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}
		else = {
			random_owned_state = {
				limit = {
					is_controlled_by = ROOT
					is_core_of = ROOT
					free_building_slots = {
						building = industrial_complex
						size = > 2
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}
		add_ideas = POR_a_new_industry
	}
}