Losa10/PreTrain-HOI4-Modding-Assistant huggingface dataset:
### Entity: State History
Component: 1101
Constructs: add_core_of, add_to_array
Source: game
File: history/states/1101-East Punjab.txt

Code:
state = {
	id = 1101
	name = STATE_1101
	manpower = 16959758
	state_category = town
	resources = {

	}
	history = {
		owner = RAJ
		add_core_of = RAJ KHL
		add_to_array = {
			state_victory_points = 10729
		}
		buildings = {
			infrastructure = 1
		}
		victory_points = {
			10729 3
		}
	}
	provinces = {
		1129 2002 2076 7106 10729 12708 12868
	}
	local_supplies = 0.0
}
### Entity: Idea
Component: RCG_communist_guy
Constructs: has_government
Source: game
File: common/ideas/republic_of_congo.txt

Code:
RCG_communist_guy = {
	picture = generic_political_advisor_african_3
	allowed = {
		original_tag = RCG
	}
	traits = {
		communist_revolutionary
	}
	do_effect = {
		NOT = {
			has_government = communism
		}
	}
	ai_will_do = {
		factor = 0
	}
}
### Entity: National Focus
Tree: sov_focus
Component: SOV_follow_corportism_old
Constructs: prerequisite, add_ideas, completion_reward
Source: game
File: common/national_focus/soviet_old.txt

Code:
focus = {
	id = SOV_follow_corportism_old
	text = SOV_follow_corportism
	icon = GFX_goal_generic_fascist_bills
	prerequisite = {
		focus = SOV_promote_the_asno_detachment_old SOV_form_the_white_emigres_old
	}
	x = -1
	y = 1
	relative_position_id = SOV_promote_the_asno_detachment_old
	cost = 5
	ai_will_do = {
		factor = 5
	}
	available = {

	}
	bypass = {

	}
	completion_reward = {
		add_ideas = SOV_follow_corportism
	}
	search_filters = {
		FOCUS_FILTER_INDUSTRY
	}
}
### Entity: Event
Component: KMT_event.82
Constructs: is_triggered_only, limit, annex_country
Source: game
File: events/r56_KMT_events.txt

Code:
country_event = {
	id = KMT_event.82
	title = KMT_event.82.t
	desc = KMT_event.81.desc
	picture = GFX_report_event_chinese_soldiers
	is_triggered_only = yes
	option = {
		name = KMT_event.81.a
		IF = {
			limit = {
				original_tag = PRC
			}
			effect_tooltip = {
				annex_country = {
					target = XIC
					transfer_troops = yes
				}
			}
		}
		else = {
			effect_tooltip = {
				transfer_state = 744
			}
		}
	}
}
### Entity: Country History
Country: GRA
Component: GRA_misc
Constructs: set_research_slots, set_convoys, set_country_flag
Source: game
File: history/countries/GRA - Grenada.txt

Code:
# Misc for GRA
capital = 1085
set_research_slots = 2
set_convoys = 5
set_country_flag = monroe_doctrine
### Entity: National Focus
Tree: man_focus
Component: MAN_tsr_finish_off_the_japanese_threat
Constructs: prerequisite, completion_reward, cancel_if_invalid, add_timed_idea, create_wargoal, annex_everything
Source: game
File: common/national_focus/manchukuo_TSR.txt

Code:
focus = {
	id = MAN_tsr_finish_off_the_japanese_threat
	icon = GFX_focus_AST_war_japan
	prerequisite = {
		focus = MAN_tsr_proclaim_the_republic_of_china
	}
	x = 1
	y = 1
	relative_position_id = MAN_tsr_proclaim_the_republic_of_china
	cost = 10
	ai_will_do = {
		factor = 10
	}
	available = {

	}
	bypass = {

	}
	cancel_if_invalid = yes
	continue_if_invalid = no
	available_if_capitulated = no
	completion_reward = {
		add_timed_idea = {
			idea = MAN_finish_off_japan
			days = 365
		}
		create_wargoal = {
			type = annex_everything
			target = JAP
		}
	}
}
### Entity: Military Industrial Organization
Component: POR_fnmal_organization
Constructs: has_dlc
Source: game
File: common/military_industrial_organization/organizations/POR_organization.txt

Code:
POR_fnmal_organization = {
	include = generic_infantry_equipment_organization
	icon = GFX_idea_generic_infantry_equipment_manufacturer_2
	allowed = {
		has_dlc = La Resistance
		tag = POR
	}
}
### Entity: Trigger Reference
Construct: has_war
Source: vanilla_docs
File: documentation/triggers_documentation.md

Doc:
## has_war

* Supported Scopes: COUNTRY
* Supported Targets: THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

```
is country at war
```
### Entity: National Focus
Tree: tur_focus
Component: TUR_end_the_british_hegemony
Constructs: prerequisite, has_war_with, completion_reward, is_subject, has_capitulated, create_wargoal, puppet_wargoal_focus
Source: game
File: common/national_focus/turkey.txt

Code:
focus = {
	id = TUR_end_the_british_hegemony
	icon = GFX_focus_attack_britain
	mutually_exclusive = {
		focus = TUR_punish_french_weakness
	}
	prerequisite = {
		focus = TUR_court_the_spanish TUR_cleanse_iberia_of_bolshevism
	}
	x = 0
	y = 1
	relative_position_id = TUR_cleanse_iberia_of_bolshevism
	cost = 10
	ai_will_do = {
		base = 10
	}
	available = {
		is_subject = no
	}
	bypass = {
		ENG = {
			OR = {
				exists = no
				has_capitulated = yes
				is_subject = yes
				has_war_with = TUR
			}
		}
	}
	search_filters = {
		FOCUS_FILTER_ANNEXATION
	}
	completion_reward = {
		create_wargoal = {
			type = puppet_wargoal_focus
			target = ENG
		}
	}
}
### Entity: Order of Battle
Component: instant_effect
Constructs: add_equipment_production
Source: game
File: history/units/SWE_1936_naval_mtg.txt

Code:
instant_effect = {
	add_equipment_production = {
		equipment = {
			type = ship_hull_light_2
			creator = SWE
			version_name = Göteborg Class
		}
		name = HMS Göteborg
		requested_factories = 1
		progress = 0.5
		amount = 1
	} {
		equipment = {
			type = ship_hull_submarine_2
			creator = SWE
			version_name = Draken Class
		}
		name = HMS Delfinen
		requested_factories = 1
		progress = 0.8
		amount = 1
	} {
		equipment = {
			type = ship_hull_submarine_2
			creator = SWE
			version_name = Draken Class
		}
		name = HMS Nordkaparen
		requested_factories = 1
		progress = 0.6
		amount = 1
	} {
		equipment = {
			type = ship_hull_submarine_2
			creator = SWE
			version_name = Draken Class
		}
		name = HMS Springaren
		requested_factories = 1
		progress = 0.4
		amount = 1
	}
}
### Entity: Character
Component: CHI_chen_gongbo
Constructs: has_country_leader, has_dlc
Source: game
File: common/characters/CHI.txt

Code:
CHI_chen_gongbo = {
	name = CHI_chen_gongbo
	portraits = {
		civilian = {
			small = GFX_portrait_CHI_chen_gongbo_small
		}
	}
	gender = male
	advisor = {
		slot = political_advisor
		idea_token = CHI_chen_gongbo
		visible = {
			has_country_leader = {
				ruling_only = yes
				character = CHI_wang_jingwei
			}
		}
		allowed = {
			original_tag = CHI
			has_dlc = No Compromise, No Surrender
		}
		traits = {
			economist
		}
	}
}
### Entity: Event
Component: news.500
Constructs: is_triggered_only
Source: game
File: events/TNewsEvents.txt

Code:
news_event = {
	id = news.500
	title = news.500.t
	desc = news.500.desc
	picture = GFX_news_event_spr_spanish_civil_war
	major = yes
	is_triggered_only = yes
	option = {
		name = news.500.a
	}
}
### Entity: Idea
Component: ROOT_joint_economic_venture_effort
Constructs: political_power_gain, production_speed_buildings_factor, removal_cost
Source: game
File: common/ideas/r56_generic.txt

Code:
ROOT_joint_economic_venture_effort = {
	picture = BUL_shared_manufacturing_experience
	removal_cost = -1
	modifier = {
		political_power_gain = -0.25
		production_speed_buildings_factor = 0.25
	}
}
### Entity: Character
Component: improved_railway_company
Constructs: equipment_bonus, build_cost_ic
Source: game
File: common/country_leader/00_traits.txt

Code:
improved_railway_company = {
	random = no
	production_speed_rail_way_factor = 0.25
	production_speed_supply_node_factor = 0.3
	equipment_bonus = {
		train_equipment = {
			instant = yes
			build_cost_ic = -0.25
			reliability = 0.15
		}
	}
	ai_will_do = {
		factor = 1
	}
}
### Entity: Unit Template
Component: POR_CA_HISTORICAL
Source: game
File: common/units/names_ships/POR_ship_names.txt

Code:
POR_CA_HISTORICAL = {
	name = NAME_THEME_HISTORICAL_CA
	for_countries = {
		POR
	}
	type = ship
	ship_types = {
		ship_hull_cruiser heavy_cruiser
	}
	prefix = NRP 
	fallback_name = Cruzador Pesado %d
	unique = {
		Matosinhos Vila Nova de Gaia Mira Figueira da Foz Marinha Granda Nazare
	}
}
### Entity: Event
Component: israel.30
Constructs: is_triggered_only, ai_chance, has_country_flag, set_country_flag, add_to_variable, has_game_rule
Source: game
File: events/israel.txt

Code:
country_event = {
	id = israel.30
	title = israel.30.t
	desc = israel.30.d
	is_triggered_only = yes
	option = {
		name = israel.30.a
		set_country_flag = ISR_holding_west_bank_elections
		custom_effect_tooltip = ISR_marginally_strengthen_mapai ISR_moderately_strengthen_hashomer ISR_significantly_strengthen_maki
		add_to_variable = {
			ISR_maki_max_seats = 5
		} {
			ISR_maki_min_seats = 5
		} {
			ISR_hashomer_max_seats = 3
		} {
			ISR_hashomer_min_seats = 3
		} {
			ISR_mapai_max_seats = 2
		} {
			ISR_mapai_min_seats = 2
		}
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				original_tag = ISR
				OR = {
					has_country_flag = ISR_AI_RANDOM_MAKI
					has_game_rule = {
						rule = ISR_AI_BEHAVIOR
						option = ISR_general_zionists
					}
				}
			} {
				factor = 0
				original_tag = ISR
				OR = {
					has_country_flag = ISR_AI_RANDOM_HASHOMER
					has_game_rule = {
						rule = ISR_AI_BEHAVIOR
						option = ISR_hatzohar
					}
				}
			}
		}
	} {
		name = israel.30.b
		custom_effect_tooltip = ISR_marginally_strengthen_general ISR_moderately_strengthen_hatzohar
		add_to_variable = {
			ISR_hatzohar_max_seats = 3
		} {
			ISR_hatzohar_min_seats = 5
		}
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				original_tag = ISR
				OR = {
					has_country_flag = ISR_AI_RANDOM_MAKI
					has_game_rule = {
						rule = ISR_AI_BEHAVIOR
						option = ISR_MAKI
					}
				}
			} {
				factor = 0
				original_tag = ISR
				OR = {
					has_country_flag = ISR_AI_RANDOM_HASHOMER
					has_game_rule = {
						rule = ISR_AI_BEHAVIOR
						option = ISR_HASHOMER
					}
				}
			} {
				factor = 0
				original_tag = ISR
				OR = {
					has_country_flag = ISR_AI_RANDOM_MAPAI
					has_game_rule = {
						rule = ISR_AI_BEHAVIOR
						option = ISR_MAPAI
					}
				}
			}
		}
	}
}
### Entity: Idea
Component: MEX_church_power_2
Constructs: industrial_capacity_factory, removal_cost
Source: game
File: common/ideas/mexico_mtg_placeholder.txt

Code:
MEX_church_power_2 = {
	name = MEX_church_power_2
	picture = chi_war_of_resistance2
	allowed = {
		always = no
	}
	removal_cost = -1
	allowed_civil_war = {
		always = yes
	}
	modifier = {
		industrial_capacity_factory = 0.1
	}
}
### Entity: Character
Component: NEN_ath
Source: game
File: common/characters/NEN.txt

Code:
NEN_ath = {
	advisor = {
		slot = theorist
		idea_token = NEN_ath
		cost = 100
		allowed = {
			original_tag = NEN
		}
		traits = {
			air_warfare_theorist
		}
	}
	portraits = {
		army = {
			small = GFX_portrait_generic_sami_army_general_1_small
		}
	}
}
### Entity: Country History
Country: TOS
Component: TOS_politics
Constructs: set_stability, add_ideas, set_war_support, set_politics, set_popularities
Source: game
File: history/countries/TOS - Tuscany.txt

Code:
# Politics & Parties for TOS
set_stability = 0.5
set_war_support = 0.5
add_ideas = {

}
set_politics = {
	ruling_party = neutrality
	last_election = 1934.3.26
	election_frequency = 60
	elections_allowed = no
}
set_popularities = {
	democratic = 30
	fascism = 5
	communism = 5
	neutrality = 60
}
### Entity: Idea
Component: PAL_resistance_idea
Constructs: removal_cost
Source: game
File: common/ideas/palestine.txt

Code:
PAL_resistance_idea = {
	picture = generic_research_bonus
	allowed = {
		tag = PAL
	}
	available = {

	}
	cancel = {

	}
	allowed_civil_war = {
		always = yes
	}
	removal_cost = -1
	modifier = {
		resistance_damage_to_garrison_on_our_occupied_states = 0.1
		resistance_growth_on_our_occupied_states = 0.15
	}
}
### Entity: Order of Battle
Component: Pelotão de Cavalaria de Fronteira
Constructs: division_template
Source: game
File: history/units/TML_1936.txt

Code:
division_template = {
	name = Pelotão de Cavalaria de Fronteira
	division_names_group = TML_CAV_01
	regiments = {
		cavalry = {
			x = 0
			y = 0
		} {
			x = 0
			y = 1
		}
	}
}
### Entity: Scripted Effect
Component: EAI_RESEARCH_naval_doctrine_switch_fix
Constructs: limit, has_country_flag, set_temp_variable, add_to_temp_variable, check_variable, has_doctrine, set_grand_doctrine, clr_country_flag
Source: game
File: common/scripted_effects/EAI_RESEARCH_effects.txt

Code:
EAI_RESEARCH_naval_doctrine_switch_fix = {
	if = {
		limit = {
			has_country_flag = EAI_fix_naval_doctrine_switch
			NOT = {
				EAI_naval_doctrine_progress_limit = yes
			}
		}
		set_temp_variable = {
			_xp_cost = 100
		} {
			xp_cost_reduction_modifier = modifier@naval_doctrine_cost_factor
		}
		add_to_temp_variable = {
			xp_cost_reduction_modifier = 1
		}
		multiply_temp_variable = {
			_xp_cost = xp_cost_reduction_modifier
		}
		if = {
			limit = {
				set_temp_variable = {
					_check_xp = _xp_cost
				}
				EAI_XP_has_navy_check_xp = yes
			}
			if = {
				limit = {
					check_variable = {
						EAI_FOCUS/NAVY/naval_doctrine = global.EAI_FIB_DOCTRINE
					}
					NOT = {
						has_doctrine = new_fleet_in_being
					}
				}
				set_grand_doctrine = new_fleet_in_being
				EAI_XP_pay_navy_xp_cost = yes
			} {
				limit = {
					has_country_flag = EAI_research_logging
				}
				log = [GetYear] [GetMonth] | AI | [Root.GetName] | RESEARCH: fixed naval doctrine switch
			}
			else_if = {
				limit = {
					check_variable = {
						EAI_FOCUS/NAVY/naval_doctrine = global.EAI_TI_DOCTRINE
					}
					NOT = {
						has_doctrine = new_convoy_raiding
					}
				}
				set_grand_doctrine = new_convoy_raiding
				EAI_XP_pay_navy_xp_cost = yes
			} {
				limit = {
					check_variable = {
						EAI_FOCUS/NAVY/naval_doctrine = global.EAI_BS_DOCTRINE
					}
					NOT = {
						has_doctrine = new_base_strike
					}
				}
				set_grand_doctrine = new_base_strike
				EAI_XP_pay_navy_xp_cost = yes
			}
			clr_country_flag = EAI_fix_naval_doctrine_switch
		}
	}
}
### Entity: Unit Template
Component: SNG_CAV_01
Source: game
File: common/units/names_divisions/SNG_names_divisions.txt

Code:
SNG_CAV_01 = {
	name = Cavalry Division
	for_countries = {
		SNG
	}
	can_use = {
		always = yes
	}
	division_types = {
		cavalry
	}
	fallback_name = %dth Cavalry Division
	ordered = {
		1 = {
			%dst Cavalry Division
		}
		2 = {
			%dnd Cavalry Division
		}
		3 = {
			%drd Cavalry Division
		}
		4 = {
			%dth Cavalry Division
		}
		5 = {
			%dth Cavalry Division
		}
		22 = {
			%dnd Cavalry Division
		}
		32 = {
			%dnd Cavalry Division
		}
		42 = {
			%dnd Cavalry Division
		}
		52 = {
			%dnd Cavalry Division
		}
		62 = {
			%dnd Cavalry Division
		}
		72 = {
			%dnd Cavalry Division
		}
		82 = {
			%dnd Cavalry Division
		}
		92 = {
			%dnd Cavalry Division
		}
	}
}
### Entity: Decision
Component: BHU_bhutan_diplomacy
Constructs: has_completed_focus, has_war, limit, remove_ideas, has_government, has_country_flag, add_opinion_modifier, fire_only_once
Source: game
File: common/decisions/Bhutan_decisions.txt

Code:
BHU_bhutan_diplomacy = {
	BHU_denounce_the_treaty_of_punakha = {
		icon = generic_break_treaty
		allowed = {
			tag = BHU
		}
		available = {
			has_completed_focus = BHU_new_ideas
			has_war = no
			or = {
				is_subject_of = ENG
				is_puppet = no
			}
			OR = {
				fascism = > 0.5
				communism = > 0.5
				democratic = > 0.5
			}
		}
		fire_only_once = yes
		ai_will_do = {
			factor = 10
		}
		days_remove = 10
		cost = 100
		visible = {
			tag = BHU
		}
		remove_effect = {
			end_puppet = ENG
			leave_faction = yes
			set_country_flag = denounced_punakha_treaty
			if = {
				limit = {
					has_idea = BHU_treaty_with_britain
				}
				remove_ideas = BHU_treaty_with_britain
			} {
				limit = {
					is_puppet = no
				}
				add_political_power = 50
			}
		}
	}
	BHU_improve_relations = {
		icon = generic_political_discourse
		allowed = {
			tag = BHU
		}
		available = {
			tag = BHU
			OR = {
				has_completed_focus = BHU_the_quiet_strength BHU_aristocratic_regime BHU_overthrow_the_feudals BHU_spread_aggressive_attitude
			} {
				BHU = {
					has_government = FROM
				}
				AND = {
					BHU = {
						OR = {
							has_government = neutrality democratic
						}
					}
					FROM = {
						OR = {
							has_government = neutrality democratic
						}
					}
				}
			}
			FROM = {
				is_puppet = no
				exists = yes
			}
		}
		target_trigger = {
			FROM = {
				is_neighbor_of = ROOT
				has_opinion = {
					target = ROOT
					value = > 19
				}
			}
		}
		cost = 50
		fire_only_once = yes
		ai_will_do = {
			factor = 10
		}
		days_remove = 30
		visible = {
			FROM = {
				is_puppet = no
				exists = yes
			}
		}
		remove_effect = {
			add_opinion_modifier = {
				target = FROM
				modifier = large_increase
			}
		}
	}
	BHU_establish_an_army_under_foreign_supervision = {
		icon = generic_army_support
		allowed = {
			tag = BHU
		}
		available = {
			tag = BHU
			NOT = {
				OR = {
					has_completed_focus = BHU_create_an_army
					has_country_flag = army_establishment_decision
				}
			}
			FROM = {
				is_puppet = no
			}
			OR = {
				BHU = {
					has_government = FROM
				}
				AND = {
					BHU = {
						OR = {
							has_government = neutrality democratic
						}
					}
					FROM = {
						OR = {
							has_government = neutrality democratic
						}
					}
				}
			}
		}
		target_trigger = {
			FROM = {
				OR = {
					is_neighbor_of = ROOT
					AND = {
						
# ... (truncated)
### Entity: Order of Battle
Component: 52a Brigada Legionario
Constructs: division_template
Source: game
File: history/units/SPA_Civil_War.txt

Code:
division = {
	name = 52a Brigada Legionario
	location = 3874
	division_template = Brigada Legionario
}
### Entity: Decision
Component: AST_australia_formables_category
Constructs: has_dlc
Source: game
File: common/decisions/categories/00_formable_categories.txt

Code:
AST_australia_formables_category = {
	icon = generic_formable_nations
	visible_when_empty = no
	allowed = {
		original_tag = AST
		has_dlc = Thunder at Our Gates
	}
}
### Entity: Character
Component: maronite_nationalist
Constructs: war_support_factor
Source: game
File: common/country_leader/r56_traits.txt

Code:
maronite_nationalist = {
	random = no
	party_popularity_stability_factor = -0.1
	conscription = 0.01
	war_support_factor = 0.1
}
### Entity: National Focus
Tree: bel_focus
Component: BEL_royal_intervention
Constructs: prerequisite, completion_reward, has_idea
Source: game
File: common/national_focus/belgium.txt

Code:
focus = {
	id = BEL_royal_intervention
	icon = GFX_focus_rom_royal_dictatorship
	prerequisite = {
		focus = BEL_investigate_bribery_charges
	} {
		focus = BEL_government_of_national_unity
	} {
		focus = BEL_repudiate_treaty_with_france
	}
	relative_position_id = BEL_government_of_national_unity
	search_filters = {
		FOCUS_FILTER_HISTORICAL
	}
	x = 0
	y = 2
	cost = 5
	available = {
		has_idea = BEL_collapsing_government_ns
	}
	available_if_capitulated = yes
	completion_reward = {
		country_event = {
			id = ww_BEL_event_political.3
		}
		custom_effect_tooltip = BEL_royal_intervention_tt
	}
}
### Entity: Idea
Component: the_long_lance
Constructs: removal_cost
Source: game
File: common/ideas/japan.txt

Code:
the_long_lance = {
	allowed = {
		always = no
	}
	allowed_civil_war = {
		always = yes
	}
	removal_cost = -1
	modifier = {
		naval_torpedo_screen_penetration_factor = 0.1
	}
}
### Entity: National Focus
Tree: ger_focus
Component: GER_ally_chiang_kai_shek
Constructs: prerequisite, limit, has_war_with, completion_reward, is_faction_leader, is_subject, is_subject_of, has_country_leader
Source: game
File: common/national_focus/germany.txt

Code:
focus = {
	id = GER_ally_chiang_kai_shek
	icon = GFX_focus_GER_ally_chiang_kai_shek
	prerequisite = {
		focus = GER_re_establish_german_control_over_qingdao
	} {
		focus = GER_claim_old_colonies_in_the_east
	}
	x = 1
	y = 1
	relative_position_id = GER_re_establish_german_control_over_qingdao
	cost = 10
	bypass = {
		NOT = {
			country_exists = CHI
		}
	}
	available = {
		is_faction_leader = yes
		is_subject = no
		NOT = {
			has_war_with = CHI
		}
		CHI = {
			OR = {
				is_subject = no
				is_subject_of = ROOT
			}
		}
	}
	search_filters = {
		FOCUS_FILTER_POLITICAL FOCUS_FILTER_MANPOWER
	}
	completion_reward = {
		IF = {
			limit = {
				CHI = {
					has_country_leader = {
						ruling_only = yes
						character = CHI_chiang_kaishek
					}
				}
			}
			add_ai_strategy = {
				type = alliance
				id = CHI
				value = 100
			}
			CHI = {
				add_ai_strategy = {
					type = alliance
					id = GER
					value = 100
				}
			} {
				country_event = {
					id = generic.5
					hours = 12
				}
			}
			ROOT = {
				hidden_effect = {
					save_event_target_as = alliance_inviter
				}
			}
		}
		326 = {
			add_claim_by = ROOT
		}
		729 = {
			add_claim_by = ROOT
		}
		728 = {
			add_claim_by = ROOT
		}
		custom_effect_tooltip = generic_skip_one_line_tt GER_asia_revive_the_schutztruppe_tt
	}
}
### Entity: Effect Reference
Construct: Outcomes
Constructs: Outcomes, add_relation_modifier, add_divisional_commander_xp, destroy_additional_equipment
Source: vanilla_docs
File: common/raids/_documentation.md

Doc:
# Raid Outcomes

These are defined in the *success_levels* part of the RaidType.

There are four levels: *failure*, *limited_success*, *success*, and *critical_success*.

The following effects are supported, taking *failure* as an example:

```
failure = {
    # Effects that should be listed as affecting the raiding country
    # Raid instance scope
    actor_effects = {
        # Can run raid instance scope effects
        raid_add_unit_experience = 100

        # And also use the dynamic variables to change scope (see the variable list below)
		var:actor_country = {
			air_experience = 10
		}
    }

    # Effects that should be listed as affecting the raided country
    # Raid instance scope
    victim_effects = {
        var:victim_country = {
            add_relation_modifier = {
                target = var:ROOT.actor_country
                modifier = [...]
            }
        }

        var:target_state = {
            damage_building = {
                type = dam
                damage = 1 # levels of damage
                province = var:ROOT.target_province
            }
        }
    }

    # Division (unit) scope
    division_effects = {
        add_divisional_commander_xp = 10
    }

	# The percentage of additional equipment that gets destroyed
	# Default is 100%
	destroy_additional_equipment = 0.25
    custom_sound = SFX_ref [Optional] Custom sound effect to play for this outcome

    # Visual effect to spawn on the target province
    visual_effect = {
        entity = "nuke_entity" # name of the entity to spawn
        animation = "attack" # name of the entity animation state
    }
}

```

Note that *actor_effects* and *victim_effects* both use the same scope, but separating them allows for
easily separating them for UI purposes (showing separate lists of how the actor and victim country were affected by the outcome)

As another note on the terminology of these outcomes, unfortunately there were some changes to the naming during development which were not properly consolidated in time. 
**Failure**, **Critical Failure** and **Disaster** all refer to the same thing (the worst outcome).
### Entity: Character
Component: fighter_producer_defense_1
Constructs: equipment_bonus, maximum_speed
Source: game
File: common/country_leader/r56_companies_traits.txt

Code:
fighter_producer_defense_1 = {
	random = no
	equipment_bonus = {
		small_plane_airframe = {
			air_defence = 0.1
			maximum_speed = 0.1
			reliability = 0.05
		}
		cv_small_plane_airframe = {
			air_defence = 0.1
			maximum_speed = 0.1
			reliability = 0.05
		}
		medium_plane_fighter_airframe = {
			air_defence = 0.1
			maximum_speed = 0.1
			reliability = 0.05
		}
	}
	ai_will_do = {
		factor = 1
	}
}
### Entity: National Focus
Tree: vin_focus
Component: VIN_the_vnqdd_in_power
Constructs: has_government, completion_reward, add_political_power
Source: game
File: common/national_focus/Vietnam.txt

Code:
focus = {
	id = VIN_the_vnqdd_in_power
	icon = GFX_goal_vietnam_vnqdd_victorious
	cost = 1
	x = 27
	y = 0
	available = {
		has_government = democratic
	}
	completion_reward = {
		add_political_power = 50
	}
	search_filters = {
		FOCUS_FILTER_POLITICAL
	}
}
### Entity: Modifier Reference
Construct: command_abilities_cost_factor
Source: vanilla_docs
File: documentation/modifiers_documentation.md

Doc:
## command_abilities_cost_factor

* Number with 2 decimal places
* **Categories**: country, army