決議修改

本頁面所適用的版本可能已經過時,最後更新於1.5

Decisions are national scripted effects which become visible under certain conditions and then available for selection when additional conditions are met.


Decision Script Layout

country_decisions = {
	decision name = {
		potential = {
			[triggers which determine the visibility of the decision]
		}
		highlight = {
			scope:province = {
				province_id = [province number]
			}
		}
		allow = {
			[triggers which allow the decision to be chosen]
		}
		effect = {
			[what the decision does upon selection]
		}
	}
}

Formable Country Example

Below is the script for forming Macedon. It becomes potentially available is a Macedonian culture nation has a capital in Macedonia or Greece and is not already Macedon or formable-Macedon. Then provinces are highlighted which, if owned, makes the decision available for selection. Selecting the decision then grants the effects of changing the country name, color, capital, and gives bonus effects.

country_decisions = {
	
	# Form Macedon
	form_macedon = {
		
		potential = {
			num_of_cities >= 1
			OR = {
				country_culture = macedonian
				AND = { # Non DLC Epirus trigger
					NOT = { has_dlc = "Epirus Flavor Pack" }
					has_variable = me_epirus_start_flag
				}
			}
			is_republic = no
			capital_scope = {
				OR = {
					is_in_region = macedonia_region
					is_in_region = greece_region
					ROOT = { country_culture = macedonian }
				}
			}
			NOT = {
				tag = MAC
			}
			NOT = {
				tag = MCD
			}
			OR = {
				is_ai = no
				num_of_cities >= 20
			}
			NOT = {
				is_endgame_tag_trigger = yes
				is_tier_2_formable_trigger = yes
			}
		}
		
		highlight = {
			scope:province = {
				OR = {
					province_id = 379 #Pella
					province_id = 428 #Aegae
					province_id = 365 #Amphipolis
					province_id = 394 #Pharsalos
					province_id = 3175 #Eratyra
				}
			}
		}
		
		allow = {
			custom_tooltip = {
				text = macedon_not_existing
				NOT = {
					any_country = {
						tag = MAC
					}
				}
				NOT = {
					any_country = {
						tag = MCD
					}
				}
			}
			can_form_nation_trigger = yes
			owns = 379 #Pella
			owns = 428 #Aegae
			owns = 365 #Amphipolis
			owns = 394 #Pharsalos
			owns = 3175 #Eratyra
			trigger_if = {
				limit = {
					is_ai = no #AI won't know to integrate this culture just for the decision
					NOT = { country_culture = macedonian }
					any_country_culture = {
						is_culture = macedonian
					}
				}
				any_country_culture = {
					is_integrated = yes
					is_culture = macedonian
				}
			}
		}
		
		
		effect = {
			custom_tooltip = "tier_2_formable_tooltip"
			monarchy_formable_government_change_effect = yes
			change_country_name = "MACEDONIA_NAME"
			hidden_effect = {
				change_country_adjective = "MACEDONIA_ADJECTIVE"
				change_country_color = "macedonian_blue"
				change_country_tag = MCD
				change_country_flag = MAC
			}
			if = {
				limit = {
					NOT = { country_culture = macedonian }
				}
				set_primary_culture_cleanup_effect = {
					NEW_PRIMARY_CULTURE = macedonian
					MAKE_OLD_CULTURE_INTEGRATED = yes
				}
			}
			if = {
				limit = {
					p:379 = { is_capital = no }
				}
				set_capital = 379
				hidden_effect = {
					p:379.state = {
						set_state_capital = 379
					}
				}
				capital_scope = {
					establish_city_effect = yes
				}
			}
			p:379 = {
				capital_formable_medium_effect = yes
				formable_capital_modifier_normal_effect = yes
			}
			custom_tooltip = macedon_claims_tooltip
			hidden_effect = {
				region:macedonia_region = { formable_region_province_effect = yes }
			}
			add_3_free_province_investments = yes
		}
		
		ai_will_do = {
			base = 1
		}
	}

}