Template talk:Event

From Stellaris Wiki
Jump to navigation Jump to search

Multiple / conditional descriptions[edit]

Unlike EU4 where event descriptions vary only by interpolating text snippets, in Stellaris the entire description can be conditional. For example, some use a switch:

on_action_events.txt

# White Peace
country_event = {
	id = action.39
	...
	desc = {
		trigger = {
			hidden:from = {
				switch = {
					trigger = has_ai_personality
					honorbound_warriors = { text = action.39.desc.hw }
					ruthless_capitalists = { text = action.39.desc.rc }
					peaceful_traders = { text = action.39.desc.pt }
					hegemonic_imperialists = { text = action.39.desc.hi }
					federation_builders = { text = action.39.desc.fb }
					xenophobic_isolationists = { text = action.39.desc.xi }
					hive_mind = { text = action.39.desc.hm }
					migrating_flock = { text = action.39.desc.mf }
					evangelising_zealots = { text = action.39.desc.ez }
					fanatic_purifiers = { text = action.39.desc.fp }
					democratic_crusaders = { text = action.39.desc.dc }
					slaving_despots = { text = action.39.desc.sd }
					decadent_hierarchy = { text = action.39.desc.dh }
					erudite_explorers = { text = action.39.desc.ee }
					spiritual_seekers = { text = action.39.desc.ss }
					harmonious_hierarchy = { text = action.39.desc.hc }
					fallen_empire_spiritualist = { text = action.39.desc.hg }
					fallen_empire_materialist = { text = action.39.desc.kk }
					fallen_empire_xenophobe = { text = action.39.desc.mi }
					fallen_empire_xenophile = { text = action.39.desc.eo }
					metalhead = { text = action.39.desc.mh }
					default = { text = action.39.desc.default }
				}
			}
		}
	}
	...
}

Some use multiple desc clauses with text and trigger sub-clauses:

pirate_events.txt

# Birth of Space Piracy
country_event = {
	id = pirate.1
	...
	desc = { # Spiritual
		text = pirate.1.desc_01
		trigger = {
			OR = {
				has_government = theocratic_republic
				has_government = transcendent_republic
				has_government = theocratic_oligarchy
				has_government = transcendent_oligarchy
				has_government = divine_mandate
				has_government = transcendent_empire
			}
		}
	}
	
	desc = { # Militarist
		text = pirate.1.desc_02
		trigger = {
			OR = {
				has_government = military_dictatorship
				has_government = martial_empire
				has_government = military_junta
				has_government = ordered_stratocracy
				has_government = military_republic
				has_government = martial_demarchy
			}
		}
	}
	
	desc = { # Materialist
		text = pirate.1.desc_03
		trigger = {
			OR = {
				has_government = despotic_hegemony
				has_government = ai_overlordship
				has_government = science_directorate
				has_government = illuminated_technocracy
				has_government = direct_democracy
				has_government = subconscious_consensus
			}
		}
	}
	
	desc = { # Pacifist
		text = pirate.1.desc_04
		trigger = {
			OR = {
				has_government = moral_democracy
				has_government = irenic_democracy
				has_government = peaceful_bureaucracy
				has_government = irenic_protectorate
				has_government = enlightened_monarchy
				has_government = irenic_monarchy
			}
		}
	}
	
	desc = { # Generic Autocracy
		text = pirate.1.desc_05
		trigger = {
			OR = {
				has_government = despotic_empire
				has_government = star_empire
			}
		}
	}
	
	desc = { # Generic Oligarchy
		text = pirate.1.desc_06
		trigger = {
			OR = {
				has_government = plutocratic_oligarchy
				has_government = mega_corporation
			}
		}
	}
	
	desc = { # Generic Democracy
		text = pirate.1.desc_07
		trigger = {
			OR = {
				has_government = indirect_democracy
				has_government = democratic_utopia
			}
		}
	}
	...
}

Some just have multiple descriptions (I'm not sure what this means? Random choice?)

pop_events.txt

# Mutant attack against Purebloods
planet_event = {
	id = pop.10
	title = "pop.10.name"
	desc = { text = pop.10a.desc }
	desc = { text = pop.10b.desc }
	picture = GFX_evt_cybernetics

	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = WORRYING
		FROM = { kill_pop = yes }
	}
}

Could these get special template support, like we have for conditional options? Hairy Dude (talk) 18:46, 26 May 2016 (CEST)