Losa10/PreTrain-HOI4-Modding-Assistant huggingface dataset:
### Entity: Event
Component: NSB_poland_communist_events.501
Constructs: is_triggered_only, ai_chance, fire_only_once, declare_war_on, annex_everything
Source: game
File: events/NSB_Poland.txt

Code:
country_event = {
	id = NSB_poland_communist_events.501
	title = NSB_poland_communist_events.501.t
	desc = NSB_poland_communist_events.501.desc
	picture = GFX_report_event_polish_tanks_01
	fire_only_once = yes
	is_triggered_only = yes
	option = {
		name = NSB_poland_communist_events.501.a
		ai_chance = {
			base = 50
		}
		leave_faction = yes
		FROM = {
			declare_war_on = {
				target = POL
				type = annex_everything
			}
		}
	}
}
### Entity: Scripted Effect
Component: DEN_remove_democratic_leader
Constructs: limit, has_country_leader, remove_country_leader_role
Source: game
File: common/scripted_effects/DEN_scripted_effects.txt

Code:
DEN_remove_democratic_leader = {
	if = {
		limit = {
			has_country_leader = {
				character = DEN_thorvald_stauning
				ruling_only = yes
			}
		}
		DEN_thorvald_stauning = {
			remove_country_leader_role = {
				ideology = socialism
			}
		}
	}
	else_if = {
		limit = {
			has_country_leader = {
				character = DEN_vilhelm_buhl
				ruling_only = yes
			}
		}
		remove_country_leader_role = {
			character = DEN_vilhelm_buhl
			ideology = socialism
		}
	} {
		limit = {
			has_country_leader = {
				character = DEN_knud_kristensen
				ruling_only = yes
			}
		}
		remove_country_leader_role = {
			character = DEN_knud_kristensen
			ideology = liberalism
		}
	} {
		limit = {
			has_country_leader = {
				character = DEN_christmas_moller
				ruling_only = yes
			}
		}
		remove_country_leader_role = {
			character = DEN_christmas_moller
			ideology = conservatism
		}
	}
}
### Entity: National Focus
Tree: par_focus
Component: PAR_assasinate_rafael_franco
Constructs: prerequisite, limit, add_ideas, has_government, has_war_with, completion_reward, add_political_power, has_civil_war
Source: game
File: common/national_focus/paraguay.txt

Code:
focus = {
	id = PAR_assasinate_rafael_franco
	available = {
		has_civil_war = yes
		NOT = {
			has_war_with = ENG
		}
	}
	bypass = {

	}
	mutually_exclusive = {
		focus = PAR_goad_bolivia
	}
	icon = GFX_focus_generic_conspiracy
	x = -1
	y = 1
	relative_position_id = PAR_by_all_means_which_to_win
	prerequisite = {
		focus = PAR_by_all_means_which_to_win
	}
	cost = 10
	search_filters = {

	}
	completion_reward = {
		random_other_country = {
			limit = {
				original_tag = PAR
				has_government = communism
			}
			kill_country_leader = yes
			add_ideas = idea_PAR_leaderless
		}
		if = {
			limit = {
				has_dlc = La Resistance
			}
			if = {
				limit = {
					NOT = {
						has_intelligence_agency = no
					}
				}
				create_intelligence_agency = yes
			} {
				limit = {
					NOT = {
						has_done_agency_upgrade = upgrade_army_department
					}
				}
				upgrade_intelligence_agency = upgrade_army_department
			} {
				limit = {
					NOT = {
						has_done_agency_upgrade = upgrade_plastic_explosives
					}
				}
				upgrade_intelligence_agency = upgrade_plastic_explosives
			} {
				limit = {
					NOT = {
						has_done_agency_upgrade = upgrade_commando_training
					}
				}
				upgrade_intelligence_agency = upgrade_commando_training
			}
		}
		else = {
			add_political_power = 150
		}
	}
}
### Entity: Idea
Component: KMT_powerful_blueshirts3
Constructs: stability_factor, has_government, removal_cost, fascism_drift
Source: game
File: common/ideas/r56_china.txt

Code:
KMT_powerful_blueshirts3 = {
	removal_cost = -1
	picture = generic_intel_bonus
	allowed = {
		always = no
	}
	allowed_civil_war = {
		always = yes
	}
	cancel = {
		NOT = {
			OR = {
				has_government = neutrality fascism
			}
		}
	}
	modifier = {
		stability_factor = -0.175
		political_power_factor = 0.075
		fascism_drift = 0.05
		resistance_damage_to_garrison = -0.25
		land_reinforce_rate = 0.075
	}
}
### Entity: Resistance
Component: sabotage_synthetic_refinery
Source: game
File: common/resistance_activity/resistance_activity.txt

Code:
sabotage_synthetic_refinery = {
	available = {
		non_damaged_building_level = {
			building = synthetic_refinery
			level = > 0
		}
	}
	weight = {
		base = 1
	}
	effect = {
		damage_building = {
			type = synthetic_refinery
			damage = 0.25
		}
	}
	alert_text = building_is_sabotaged
}
### Entity: National Focus
Tree: mex_focus
Component: MEX_focus_military_budget_review
Constructs: prerequisite, has_war, completion_reward, cancel_if_invalid, add_tech_bonus
Source: game
File: common/national_focus/mexico.txt

Code:
focus = {
	id = MEX_focus_military_budget_review
	icon = GFX_focus_generic_combined_arms
	prerequisite = {
		focus = MEX_focus_national_bank
	}
	x = -6
	y = 1
	relative_position_id = MEX_focus_national_bank
	cost = 10
	ai_will_do = {
		factor = 100
		modifier = {
			factor = 10
			has_war = yes
		}
	}
	available = {

	}
	bypass = {

	}
	cancel_if_invalid = yes
	continue_if_invalid = no
	available_if_capitulated = yes
	search_filters = {
		FOCUS_FILTER_RESEARCH
	}
	completion_reward = {
		add_tech_bonus = {
			name = tooltip_military_budget_review
			bonus = 1.0
			uses = 1
			category = infantry_weapons artillery
		}
		custom_effect_tooltip = available_political_advisor
		show_ideas_tooltip = MEX_manuel_avila
	}
}
### Entity: Event
Component: AAT_Sweden_communism.3
Constructs: is_triggered_only, swap_ideas, remove_idea, add_idea
Source: game
File: events/AAT_Sweden.txt

Code:
country_event = {
	id = AAT_Sweden_communism.3
	title = AAT_Sweden_communism.3.t
	desc = AAT_Sweden_communism.3.desc
	picture = GFX_report_event_canadian_soldiers
	is_triggered_only = yes
	option = {
		name = AAT_Sweden_communism.3.a
		swap_ideas = {
			remove_idea = SWE_fascist_counter_revolution_1
			add_idea = SWE_fascist_counter_revolution_2
		}
	}
}
### Entity: Modifier Reference
Construct: num_of_available_naval_factories
Source: vanilla_docs
File: documentation/dynamic_variables_documentation.md

Doc:
### num_of_available_naval_factories
* description: check amount of available naval factories
* (Auto generated using the trigger with same name)
### Entity: National Focus
Tree: spr_focus
Component: SPR_provide_for_the_people
Constructs: prerequisite, add_ideas, has_government, completion_reward, is_in_faction_with
Source: game
File: common/national_focus/spain.txt

Code:
focus = {
	id = SPR_provide_for_the_people
	available = {
		is_in_faction_with = SOV
		SOV = {
			has_government = communism
		}
	}
	bypass = {

	}
	prerequisite = {
		focus = SPR_soviet_recovery_aid
	}
	icon = GFX_focus_prc_agrarian_socialism
	x = 0
	y = 1
	relative_position_id = SPR_soviet_recovery_aid
	cost = 10
	available_if_capitulated = yes
	search_filters = {
		FOCUS_FILTER_INDUSTRY FOCUS_FILTER_STABILITY
	}
	completion_reward = {
		add_ideas = SPR_provide_for_the_people
	}
}
### Entity: National Focus
Tree: pal_focus
Component: PAL_artillery_developments
Constructs: prerequisite, completion_reward, add_tech_bonus
Source: game
File: common/national_focus/palestine.txt

Code:
focus = {
	id = PAL_artillery_developments
	icon = GFX_goal_generic_combined_arms_artillery_antiair_antitank
	prerequisite = {
		focus = PAL_fine_tune_hierarchical_production
	}
	x = 0
	y = 2
	cost = 7.2
	relative_position_id = PAL_fine_tune_hierarchical_production
	completion_reward = {
		add_tech_bonus = {
			name = PAL_artillery_developments
			bonus = 0.5
			ahead_reduction = 1
			uses = 2
			category = artillery
		} {
			name = PAL_artillery_developments
			bonus = 1
			uses = 2
			category = rocketry
		}
	}
}
### Entity: Character
Component: minister_of_railways
Source: game
File: common/country_leader/r56_traits.txt

Code:
minister_of_railways = {
	random = no
	sprite = 13
	production_speed_infrastructure_factor = 0.1
	production_speed_rail_way_factor = 0.15
	army_speed_factor = 0.02
}
### Entity: Decision
Component: form_pru_hispanoamerica_category
Constructs: has_completed_focus, limit, add_ideas, fire_only_once, is_core_of, complete_effect, set_cosmetic_tag, every_state
Source: game
File: common/decisions/r56_formable_nations_decisions.txt

Code:
form_pru_hispanoamerica_category = {
	form_pru_hispanoamerica = {
		icon = generic_form_nation
		allowed = {
			original_tag = PRU
		}
		fire_only_once = yes
		available = {
			OR = {
				has_completed_focus = PRU_hispanism PRU_our_revolution
			}
			any_controlled_state = {
				is_core_of = ARG
			} {
				is_core_of = ECU
			} {
				is_core_of = CHL
			} {
				is_core_of = COL
			} {
				is_core_of = PRU
			} {
				is_core_of = BOL
			} {
				is_core_of = URG
			} {
				is_core_of = VEN
			} {
				is_core_of = PAR
			}
		}
		complete_effect = {
			set_cosmetic_tag = HIS_UNIFIED_PRU
			every_state = {
				limit = {
					OR = {
						is_core_of = ARG ECU PAR CHL COL PAN PRU BOL URG VEN ELS COS GUA HON NIC MEX CUB DOM
						state = 311 686 695
					}
				}
				add_core_of = PREV
			} {
				limit = {
					OR = {
						region = 53
						is_core_of = BAH
						state = 366 375 376 377 378 379 380 382 687 299 720 502 503
					}
					NOT = {
						is_core_of = ROOT
					}
				}
				add_claim_by = ROOT
			}
			hidden_effect = {
				news_event = {
					id = r56.news_event.18
					hours = 6
				}
				set_global_flag = form_hispanomerica_flag
			}
			add_ideas = generic_recent_political_unification generic_recent_army_unification generic_recent_economic_unification
		}
		ai_will_do = {
			factor = 200
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
}
### Entity: Event
Component: r56.ger.19
Constructs: is_triggered_only, fire_only_once
Source: game
File: events/r56_Germany.txt

Code:
country_event = {
	id = r56.ger.19
	title = r56.ger.19.t
	desc = r56.ger.19.d
	picture = GFX_report_event_generic_sign_treaty2
	fire_only_once = yes
	is_triggered_only = yes
	option = {
		name = r56.ger.19.a
	}
}
### Entity: Idea
Component: SWE_revolutionary_attache_spain
Constructs: has_global_flag
Source: game
File: common/ideas/r56_sweden.txt

Code:
SWE_revolutionary_attache_spain = {
	picture = SPR_nationalist_remnants
	allowed = {
		always = no
	}
	cancel = {
		has_global_flag = scw_over
	}
	modifier = {
		experience_gain_army = 0.05
	}
}
### Entity: Decision
Component: SAF_support_colonial_seperatists
Constructs: has_completed_focus
Source: game
File: common/decisions/categories/SAF_decision_categories.txt

Code:
SAF_support_colonial_seperatists = {
	icon = GFX_decision_category_generic_political_actions
	allowed = {
		original_tag = SAF
	}
	visible = {
		has_completed_focus = SAF_support_african_seperatists
	}
}
### Entity: Game Rule
Component: peace_score_to_overlord
Constructs: allow_achievements
Source: game
File: common/game_rules/00_game_rules.txt

Code:
peace_score_to_overlord = {
	name = PEACE_SCORE_TO_OVERLORD
	group = RULE_GROUP_PEACE_SCORE
	default = {
		name = YES
		text = RULE_OPTION_YES
		desc = RULE_OPTION_PEACE_SCORE_TO_OVERLORD_YES_DESC
		allow_achievements = yes
	}
	option = {
		name = NO
		text = RULE_OPTION_NO
		desc = RULE_OPTION_PEACE_SCORE_TO_OVERLORD_NO_DESC
	}
}
### Entity: Idea
Component: GUM_aco2
Source: game
File: common/ideas/guam.txt

Code:
GUM_aco2 = {
	picture = generic_army_asia_4
	allowed = {
		original_tag = GUM
	}
	traits = {
		army_chief_organizational_2
	}
	ai_will_do = {
		factor = 1
	}
}
### Entity: Idea
Component: MOR_pot
Source: game
File: common/ideas/morocco.txt

Code:
MOR_pot = {
	picture = generic_political_advisor_arab_2
	allowed = {
		original_tag = MOR
	}
	traits = {
		prince_of_terror
	}
}
### Entity: Idea
Component: idea_SIA_short_war_temp_buff
Constructs: army_attack_factor, removal_cost, breakthrough_factor, add_timed_idea
Source: game
File: common/ideas/siam.txt

Code:
idea_SIA_short_war_temp_buff = {
	picture = generic_morale_bonus
	allowed_civil_war = {
		always = yes
	}
	allowed = {
		original_tag = SIA
	}
	removal_cost = -1
	modifier = {
		army_attack_factor = 0.1
		breakthrough_factor = 0.1
	}
	on_remove = {
		add_timed_idea = {
			idea = idea_SIA_short_war_temp_debuff
			days = 180
		}
	}
}
### Entity: Character
Component: WHY_foxhound
Source: game
File: common/characters/WHY.txt

Code:
WHY_foxhound = {
	name = Comrade Foxhound
	portraits = {
		civilian = {
			large = gfx/leaders/WHY/r56w_portrait_WHY_foxhound.dds
		}
	}
	corps_commander = {
		traits = {
			r56w_trait_army_saw_a_squirrel
		}
		skill = 5
		attack_skill = 5
		defense_skill = 5
		planning_skill = 5
		logistics_skill = 4
		legacy_id = -1
	}
}
### Entity: Idea
Component: MOR_ncm
Source: game
File: common/ideas/morocco.txt

Code:
MOR_ncm = {
	picture = generic_navy_arab_3
	allowed = {
		original_tag = MOR
	}
	traits = {
		navy_chief_maneuver_2
	}
	ai_will_do = {
		factor = 1
	}
}
### Entity: Scripted Trigger
Component: ITA_missiolinis_system_available
Constructs: has_country_flag, has_country_leader
Source: game
File: common/scripted_triggers/ITA_scripted_triggers.txt

Code:
ITA_missiolinis_system_available = {
	hidden_trigger = {
		has_country_flag = ITA_missiolinis_system_active_flag
	}
	has_country_leader = {
		character = ITA_benito_mussolini
		ruling_only = yes
	}
}
### Entity: Idea
Component: home_defence_spirit
Constructs: has_air_force_command, has_dlc
Source: game
File: common/ideas/air_spirits.txt

Code:
home_defence_spirit = {
	ledger = air
	available = {
		has_air_force_command = yes
	}
	modifier = {
		ace_effectiveness_factor = 0.5
	}
	ai_will_do = {
		factor = 1
		modifier = {
			factor = 0
			NOT = {
				has_dlc = No Step Back
			}
		}
	}
}
### Entity: Idea
Component: EAI_DD_7/cv_small_plane_naval_bomber_airframe_bonus
Constructs: equipment_bonus, build_cost_ic
Source: game
File: common/ideas/EAI_difficulty_ideas.txt

Code:
EAI_DD_7/cv_small_plane_naval_bomber_airframe_bonus = {
	allowed = {
		always = no
	}
	equipment_bonus = {
		cv_small_plane_naval_bomber_airframe = {
			build_cost_ic = -0.07
			instant = yes
		}
	}
}
### Entity: National Focus
Tree: que_focus
Component: QUE_align_with_mexico
Constructs: prerequisite, has_government, has_war_with, completion_reward, is_subject, is_in_faction, is_faction_leader, is_subject_of
Source: game
File: common/national_focus/quebec.txt

Code:
focus = {
	id = QUE_align_with_mexico
	icon = GFX_goal_mexico_mexico_first
	prerequisite = {
		focus = QUE_aspirations_of_new_france
	}
	relative_position_id = QUE_abandon_ultramontanism
	x = 7
	y = 6
	cost = 10
	available_if_capitulated = yes
	available = {
		is_subject = no
		is_in_faction = no
		has_government = fascism
		MEX = {
			is_subject = no
			is_faction_leader = yes
			has_government = fascism
			NOT = {
				has_war_with = QUE
			}
		}
	}
	bypass = {
		OR = {
			is_subject_of = MEX
			is_in_faction_with = MEX
		}
	}
	mutually_exclusive = {
		focus = QUE_approach_rome QUE_our_own_way QUE_approach_berlin QUE_approach_paris
	}
	ai_will_do = {
		factor = 8
	}
	completion_reward = {
		set_rule = {
			can_create_factions = yes
		}
		add_ai_strategy = {
			type = build_army
			id = infantry
			value = 30
		}
		MEX = {
			country_event = {
				id = generic.2
				days = 1
			}
		}
	}
	search_filters = {
		FOCUS_FILTER_POLITICAL
	}
}
### Entity: Order of Battle
Component: Marinha de Portugal
Source: game
File: history/units/POR_1939_naval_legacy.txt

Code:
fleet = {
	name = Marinha de Portugal
	naval_base = 11805
	task_force = {
		name = Flotilha 'Viana do Castelo'
		location = 11805
		ship = {
			name = NRP Tamega
			definition = destroyer
			equipment = {
				destroyer_1 = {
					amount = 1
					owner = POR
				}
			}
		} {
			name = NRP Dão
			definition = destroyer
			equipment = {
				destroyer_1 = {
					amount = 1
					owner = POR
				}
			}
		} {
			name = NRP Douro
			definition = destroyer
			equipment = {
				destroyer_1 = {
					amount = 1
					owner = POR
				}
			}
		} {
			name = NRP Lima
			definition = destroyer
			equipment = {
				destroyer_1 = {
					amount = 1
					owner = POR
				}
			}
		} {
			name = NRP Vouga
			definition = destroyer
			equipment = {
				destroyer_1 = {
					amount = 1
					owner = POR
				}
			}
		} {
			name = NRP Tejo
			definition = destroyer
			equipment = {
				destroyer_1 = {
					amount = 1
					owner = POR
				}
			}
		}
	} {
		name = Flotilha Delfim
		location = 11805
		ship = {
			name = NRP Delfim
			definition = submarine
			equipment = {
				submarine_2 = {
					amount = 1
					owner = POR
				}
			}
		} {
			name = NRP Espadarte
			definition = submarine
			equipment = {
				submarine_2 = {
					amount = 1
					owner = POR
				}
			}
		} {
			name = NRP Golfinho
			definition = submarine
			equipment = {
				submarine_2 = {
					amount = 1
					owner = POR
				}
			}
		}
	}
}
### Entity: Idea
Component: MAC_ar
Source: game
File: common/ideas/macedonia.txt

Code:
MAC_ar = {
	ledger = army
	picture = generic_army_europe_5
	allowed = {
		original_tag = MAC
	}
	traits = {
		army_regrouping_2
	}
	ai_will_do = {
		factor = 1
	}
}
### Entity: National Focus
Tree: lie_focus
Component: LIE_coup_the_government
Constructs: prerequisite, add_stability, completion_reward
Source: game
File: common/national_focus/liechtenstein.txt

Code:
focus = {
	id = LIE_coup_the_government
	icon = GFX_goal_generic_revolt
	prerequisite = {
		focus = LIE_the_rotter_opportunity
	}
	x = 0
	y = 1
	relative_position_id = LIE_the_rotter_opportunity
	cost = 10
	ai_will_do = {
		factor = 1
	}
	available = {
		fascism = > 0.4
	}
	search_filters = {
		FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY
	}
	completion_reward = {
		add_stability = -0.1
		country_event = {
			id = liechtenstein.31
			hours = 6
		}
		custom_effect_tooltip = generic_skip_one_line_tt LIE_coup_the_government_tt
	}
}
### Entity: Music Config
Component: base_music/warofresistance
Source: game
File: music/wtt_songs.txt

Code:
music = {
	song = warofresistance
	chance = {
		factor = 1
		modifier = {
			factor = 0.05
			NOT = {
				OR = {
					original_tag = CHI PRC GXC YUN SHX XSM SIK GDC KHM GSM NXM SND SIC XIC KUM HBC
				}
			}
		} {
			factor = 3
			OR = {
				original_tag = CHI PRC GXC YUN SHX XSM SIK GDC KHM GSM NXM SND SIC XIC KUM HBC
			}
		}
	}
}
### Entity: National Focus
Tree: pru_focus
Component: PRU_strengthen_nationalist_rhetoric
Constructs: prerequisite, remove_ideas, completion_reward, set_country_flag, add_popularity, set_politics, swap_ideas, remove_idea
Source: game
File: common/national_focus/peru.txt

Code:
focus = {
	id = PRU_strengthen_nationalist_rhetoric
	prerequisite = {
		focus = PRU_the_inca_congress
	}
	mutually_exclusive = {
		focus = PRU_red_pachamama
	} {
		focus = PRU_crown_an_inca
	}
	icon = GFX_goal_PRU_coper_race
	x = 2
	y = 6
	relative_position_id = PRU_look_to_the_past
	cost = 5
	search_filters = {
		FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY
	}
	ai_will_do = {
		factor = 10
	}
	completion_reward = {
		custom_effect_tooltip = available_political_advisor available_political_advisor
		show_ideas_tooltip = PRU_Riva_aguero PRU_saturnino_huillca
		remove_ideas = HON_monarch_influence
		hidden_effect = {
			set_country_flag = PRU_no_inca_peru_bolivia
		} {
			news_event = {
				id = r56.news_event.inc
				hours = 6
			}
			country_event = {
				hours = 4
				id = peru.49
			}
		}
		add_popularity = {
			ideology = fascism
			popularity = 0.1
		}
		set_politics = {
			ruling_party = fascism
		}
		swap_ideas = {
			remove_idea = PRU_inca_army
			add_idea = PRU_inca_army_1_f
		}
		set_cosmetic_tag = INC
		set_party_name = {
			ideology = neutrality
			long_name = Royal Panaca
			name = Royal Panaca
		} {
			ideology = communism
			long_name = Tupac Amaru Union
			name = Tupac Amaru Union
		} {
			ideology = fascism
			long_name = Etnocacerism Party
			name = Etnocarism Party
		} {
			ideology = democratic
			long_name = New tahuantinsuyo Party
			name = New tahuantinsuyo Party
		}
		add_country_leader_role = {
			character = PRU_bustamante_y_rivero
			promote_leader = yes
			country_leader = {
				ideology = absolute_monarchism
				expire = 1965.1.1.1
				traits = {
					r56_trait_opposed_to_communism son_of_the_sun
				}
			}
		} {
			character = PRU_arturo_peralta
			promote_leader = yes
			country_leader = {
				ideology = marxism
				expire = 1965.1.1.1
				traits = {
					son_of_the_sun protector_of_the_campesinos
				}
			}
		} {
			character = PRU_saturnino_huillca_leader
			promote_leader = yes
			country_leader = {
				ideology = ultranationalism
				expire = 1965.1.1.1
				traits = {
					JUNO_military_sapa_inca
				}
			}
		}
	}
}
### Entity: Modding Documentation
Construct: An_example:
Source: vanilla_docs
File: common/ai_navy/_documentation.md

Doc:
### An example:

* The **naval invasion support** goal has a priority range of **5-10**
  * There is an objective targeting **Iwo Jima** with an importance of **0.8**
  * There is an objective targeting **Okinawa** with an importance of **0.4**
* The **convoy protection** goal has a priority range of **3-8**
  * There is an objective targeting a trade route with **France** with an importance of **0.9**
  * There is an objective targeting a trade route with **Spain** with an importance of **0.4**

The AI will score the objectives as follows:
* Naval invasion support on Iwo Jima: **9.0** ( 5 + (10-5) * 0.8 )
* Convoy protection with France: **7.5** ( 3 + (8-3) * 0.9 )
* Naval invasion support on Okinawa: **7.0** ( 5 + (10-5) * 0.4 )
* Convoy protection with Spain: **5.0** ( 3 + (8-3) * 0.4 )

As illustrated, this results in a priority order where objectives from different goals are mixed. The idea is that the **goal priority** makes sure that the most relevant goals are always more favored, while the **objective importance** prioritizes objectives within goals. This system also allows high-value objectives from lower-prio goals to still have a chance to be prioritized over low-value objectives from higher-prio goals, as can be seen from the example above.
### Entity: AI Strategy
Component: PAR_cw_VEN_helps
Constructs: has_war, has_government, has_global_flag, has_civil_war, send_volunteers_desire
Source: game
File: common/ai_strategy/r56_PAR.txt

Code:
PAR_cw_VEN_helps = {
	allowed = {
		original_tag = VEN
	}
	enable = {
		has_global_flag = pcw_fired
		VEN = {
			has_government = fascism
			has_war = no
		}
		country_exists = PAF
	}
	abort = {
		PAR = {
			has_civil_war = no
		}
	}
	ai_strategy = {
		type = support
		id = PAF
		value = 201
	} {
		type = befriend
		id = PAF
		value = 101
	} {
		type = send_volunteers_desire
		id = PAF
		value = -100
	}
}
### Entity: Idea
Component: EAI_DD_3/rocket_artillery_equipment_bonus
Constructs: equipment_bonus, build_cost_ic
Source: game
File: common/ideas/EAI_difficulty_ideas.txt

Code:
EAI_DD_3/rocket_artillery_equipment_bonus = {
	allowed = {
		always = no
	}
	equipment_bonus = {
		rocket_artillery_equipment = {
			build_cost_ic = -0.075
			instant = yes
		}
	}
}
### Entity: Event
Component: bftb_bulgaria_german_influence.4
Constructs: is_triggered_only, ai_chance, add_ideas, remove_ideas, has_government, add_opinion_modifier, fire_only_once, add_political_power
Source: game
File: events/BFTB_Bulgaria.txt

Code:
country_event = {
	id = bftb_bulgaria_german_influence.4
	title = bftb_bulgaria_german_influence.4.t
	desc = bftb_bulgaria_german_influence.4.desc
	picture = GFX_report_event_generic_sign_treaty1
	is_triggered_only = yes
	fire_only_once = yes
	option = {
		name = bftb_bulgaria_german_influence.4.a
		ai_chance = {
			base = 5
			modifier = {
				factor = 10
				is_historical_focus_on = yes
			} {
				factor = 10
				is_in_faction_with = GER
			} {
				factor = 100
				has_government = GER
			}
		}
		add_political_power = 50
		remove_ideas = BUL_georgi_ivanov_kyoseivanov
		add_ideas = BUL_bogdan_filov
		GER = {
			add_opinion_modifier = {
				target = BUL
				modifier = BUL_complied_with_our_demands
			}
		} {
			country_event = {
				id = bftb_bulgaria_german_influence.5
				hours = 2
				random_hours = 1
			}
		}
		modify_country_flag = {
			flag = BUL_german_influence_flag
			value = 1
		}
	} {
		name = bftb_bulgaria_german_influence.4.b
		ai_chance = {
			base = 5
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		GER = {
			add_opinion_modifier = {
				target = BUL
				modifier = BUL_rejected_our_demands
			}
		} {
			country_event = {
				id = bftb_bulgaria_german_influence.6
				hours = 2
				random_hours = 1
			}
		}
	}
}