• Pre order now!

    Paradox Development Studio brings you the sequel to one of the most popular strategy games ever made! Crusader Kings III is soon upon us and you can pre order it today!


    Releasing September 1st 2020

Captain Gars

Lead AI Programmer
Super Moderator
Oct 4, 2010
5.887
901
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
As some of you might have seen on the Eu4 mod forum, I have added code support for saving dynamic event targets. Since this feature is rather large, both in significance and the time it took to add, I will use this post to go into some details about it, and answer potential questions here rather than bloating the Captain's Log thread.

I have added a new effect called save_event_target_as. It means that anytime you want you can save the current scope's character, title or province number as a variable named by you, and then use it whenever you need as an event target (for either an effect or trigger) or as a right-side argument. It is also possible to use in localization.

Code:
character_event = {
	id = test.1
	
	is_triggered_only = yes
	
	option = {
		random_courtier = {
			limit = {
				is_landed = no
				is_female = no
				age = 15
			}
			save_event_target_as = my_courtier
		}
		random_vassal = {
			limit = {
				any_child = {
					vassal_of = PREV
					is_landed = yes
					age = 15
				}
			}
			save_event_target_as = my_vassal
			random_child = {
				limit = {
					vassal_of = PREV
					is_landed = yes
					age = 15
				}
				save_event_target_as = my_vassals_son
				primary_title = {
					save_event_target_as = vassal_sons_title_to_give_away
				}
			}
		}
		event_target:my_courtier = {
			treasury = 500
		}
		random_courtier = {
			limit = {
				is_landed = no
				is_female = yes
			}
			save_event_target_as = my_courtier
		}
		event_target:my_courtier = {
			treasury = 250
		}
		character_event = { id = test.2 days = 3 }
	}
}

character_event = {
	id = test.2
	desc = "test.2.DESC"
	
	is_triggered_only = yes
	
	option = {
		event_target:vassal_sons_title_to_give_away = {
			grant_title = event_target:my_courtier
		}
		event_target:my_vassals_son = {
			opinion = {
				who = ROOT
				years = 50
				modifier = opinion_furious
			}
			opinion = {
				who = event_target:my_courtier
				years = 50
				modifier = opinion_furious
			}
		}
	}
}
When using the variable as an event target or as a right-side argument it needs to be prefaced by event_target: (in order for the parser to work). In the localization however you can use just the variable name.

Code:
test.2.DESC;For some reason I have decided to punish my vassal [Root.my_vassal.GetFullName]! I will appropriate his son [Root.my_vassals_son.GetFullName]'s primary title, [Root.vassal_sons_title_to_give_away.GetFullName], and award it to my faithful courtier [Root.my_courtier.GetFullName]! [Root.my_vassals_son.GetFirstName] is furious and has sworn to exact revenge on me and [Root.my_courtier.GetFirstName].
The saved event targets will persist as long as an event chain is alive, and are freely accessed from anywhere within it, meaning you can save an event target in the first event and use it 15 events down the line.

In the first event above (test.1), you can see that I re-use the variable my_courtier twice. Normally this wouldn't work when it comes to the tooltip as the effect saving those new targets haven't been executed when the tooltip is built, and thus would not show the target as ever pointing to the second courtier. But I have solved that for this particular effect, so if you want to show these effects for the player and re-use a variable as I've done above, you can.


I've also added save_global_event_target_as, clear_global_event_target and clear_global_event_targets effects. Unlike the other effect, these event targets are not saved in an event chain but in the game state - which means that they work as global variables and that they are persistent. The two clear functions are there so that you can do a little house cleaning and avoid bloating the game state/savegame.

And of course, these saved event targets are also accessible from the localization.

Unfortunately, this will not be in the release version of Charlemagne - but I will try to get it out with the first patch.
 

richvh

Preserver of the Light
Dec 1, 2001
14.690
1.996
Visit site
  • Stellaris: Leviathans Story Pack
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Age of Wonders: Shadow Magic
  • Age of Wonders
  • Age of Wonders II
  • Crusader Kings II: Jade Dragon
  • Surviving Mars: First Colony Edition
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2 Collection
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
This will make many things possible that weren't before, good work!
 

mjohnson85

Keeper of Western Europe
Apr 12, 2012
2.153
2.260
  • Crusader Kings II: Charlemagne
  • Heir to the Throne
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Imperator: Rome
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • 500k Club
  • Europa Universalis III Complete
  • Europa Universalis III Complete
This is...awesome.
 

Maarten99

Major
Jun 4, 2013
718
448
  • Magicka 2
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Crusader Kings II
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Cities: Skylines - Parklife
  • Steel Division: Normandy 44
  • BATTLETECH
  • Surviving Mars
  • Steel Division: Normand 44 Sign-up
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Cities: Skylines - Parklife Pre-Order
  • Prison Architect
  • Shadowrun Returns
  • Imperator: Rome Sign Up
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Hearts of Iron IV: La Resistance
  • Crusader Kings II: Holy Fury
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Conclave
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Monks and Mystics
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • BATTLETECH: Flashpoint
Great ! Awesome ! Perfect ! Genius ! I don't know enough adjectives in English to continue, but you got the idea : I love you ! :happy:
 

Maarten99

Major
Jun 4, 2013
718
448
  • Magicka 2
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Crusader Kings II
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Cities: Skylines - Parklife
  • Steel Division: Normandy 44
  • BATTLETECH
  • Surviving Mars
  • Steel Division: Normand 44 Sign-up
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Cities: Skylines - Parklife Pre-Order
  • Prison Architect
  • Shadowrun Returns
  • Imperator: Rome Sign Up
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Hearts of Iron IV: La Resistance
  • Crusader Kings II: Holy Fury
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Conclave
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Monks and Mystics
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • BATTLETECH: Flashpoint
You can hardly scope to someone in particular with a normal flag, unless you make that flag unique (which, more often than not, is less than ideal). Only solution I had so far was launching an event to my target every so often so I could find him back with PREV's.

Take two courtier, who you assign the "favored_courtier" and "despised_courtier" flags. You launch a chain of events to their liege about them. How do you scope back to that exact couple of courtiers later ?
 

richvh

Preserver of the Light
Dec 1, 2001
14.690
1.996
Visit site
  • Stellaris: Leviathans Story Pack
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Age of Wonders: Shadow Magic
  • Age of Wonders
  • Age of Wonders II
  • Crusader Kings II: Jade Dragon
  • Surviving Mars: First Colony Edition
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2 Collection
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
You'll be able to use this in contexts where you'd have had to use complicated scope nesting and use of multiple layers of PREVs, or setting and testing of flags, with simpler code. It will also permit simpler event chains in some cases, since ping pong events to preserve FROM chains won't be necessary.
 

Captain Gars

Lead AI Programmer
Super Moderator
Oct 4, 2010
5.887
901
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
And no matter how much scope-switching or ping-ponging of events you do, you just can't easily refer to half a dozen characters in the localization.
 

Jorlem

Field Marshal
May 9, 2012
4.392
3.453
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Mandate of Heaven
  • Humble Paradox Bundle
  • Crusader Kings II: Way of Life
  • Surviving Mars
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Hearts of Iron IV: Field Marshal
  • War of the Roses
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Conclave
  • Tyranny: Archon Edition
  • Stellaris
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Holy Fury Pre-order
  • Europa Universalis III
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Prison Architect
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Shadowrun Returns
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Europa Universalis III Complete
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Parklife
  • Europa Universalis III Complete
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • The Showdown Effect
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Cradle of Civilization
This is stupendous! This will make that "time capsule event I had planned so much easier to do, since I just need to maintain the chain of events, instead of keeping it close enough to the start be able to use FROMFROMFROM. Thanks!

Also, as a question: will we be able to use this in place where we could previously only use referral scopes like FROM, ROOT, and so on? Because that would make this perfect.
 

Captain Gars

Lead AI Programmer
Super Moderator
Oct 4, 2010
5.887
901
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
This is stupendous! This will make that "time capsule event I had planned so much easier to do, since I just need to maintain the chain of events, instead of keeping it close enough to the start be able to use FROMFROMFROM. Thanks!

Also, as a question: will we be able to use this in place where we could previously only use referral scopes like FROM, ROOT, and so on? Because that would make this perfect.
First of all, with the addition of the globally saved event targets you don't need to keep an event chain alive - you can just set it, forget it, and then use it at some later point. Secondly, as I said above - and showed in the example - you can use these targets as the right-side argument in all placed you previously were able to use ROOT/FROM/CAPITAL etc.
 

richvh

Preserver of the Light
Dec 1, 2001
14.690
1.996
Visit site
  • Stellaris: Leviathans Story Pack
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Age of Wonders: Shadow Magic
  • Age of Wonders
  • Age of Wonders II
  • Crusader Kings II: Jade Dragon
  • Surviving Mars: First Colony Edition
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2 Collection
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
will we be able to use this in place where we could previously only use referral scopes like FROM, ROOT, and so on? Because that would make this perfect.
Code:
		[COLOR="#FF0000"]event_target:my_vassals_son[/COLOR] = {
			opinion = {
				who = ROOT
				years = 50
				modifier = opinion_furious
			}
			opinion = {
				who = [COLOR="#FF0000"]event_target:my_courtier[/COLOR]
				years = 50
				modifier = opinion_furious
(Just a couple of usage examples from the Captain's example.) Certainly looks that way.
 

Jorlem

Field Marshal
May 9, 2012
4.392
3.453
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Mandate of Heaven
  • Humble Paradox Bundle
  • Crusader Kings II: Way of Life
  • Surviving Mars
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Hearts of Iron IV: Field Marshal
  • War of the Roses
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Conclave
  • Tyranny: Archon Edition
  • Stellaris
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Holy Fury Pre-order
  • Europa Universalis III
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Prison Architect
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Shadowrun Returns
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Europa Universalis III Complete
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Parklife
  • Europa Universalis III Complete
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • The Showdown Effect
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Cradle of Civilization
First of all, with the addition of the globally saved event targets you don't need to keep an event chain alive - you can just set it, forget it, and then use it at some later point. Secondly, as I said above - and showed in the example - you can use these targets as the right-side argument in all placed you previously were able to use ROOT/FROM/CAPITAL etc.
Derp. Missed that somehow. Thanks!

(Also, with my "keep event chain alive" comment, I was thinking more of being able to let the AI have some events I'm working on, which would have had to have been player specific otherwise, or let the events work better in MP. But yeah, now I have some great options to decide between.)

Hmm... Speaking of MP, how would you suggest going about using long term global saved event targets, for events that are supposed to be player only? Is there a way to differentiate between players easily, or will I just need to build a series of checks for seeing if certain saved variables are already assigned, then have them assign different ones? Though that raises the question of how to determine who gets which variable in the events that pick them back up...
 

Galle

Lt. General
Apr 20, 2009
1.662
1.048
  • Hearts of Iron II: Armageddon
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Sword of the Stars II
  • Sword of the Stars
  • Sengoku
  • Rome Gold
  • Victoria: Revolutions
  • Ancient Space
  • Majesty 2
  • Magicka
  • Europa Universalis III Complete
  • Heir to the Throne
  • Europa Universalis IV
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Hearts of Iron III
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • Europa Universalis III Complete
  • Tyranny: Gold Edition
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Age of Wonders: Planetfall - Revelations
  • BATTLETECH
  • Crusader Kings II: Jade Dragon
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Tyranny: Archon Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Warlock: Master of the Arcane
  • Victoria 2
Hell yes.

Are the global event targets on a character-by-character basis like the ordinary event targets apparently are, or are they global in the global flag sense? The former seems like it would be more useful.
 
Last edited:

Meneth

Crusader Kings 3 Programmer
Feb 9, 2011
9.989
3.405
www.paradoxwikis.com
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Holy Knight (pre-order)
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Magicka: Wizard Wars Founder Wizard
  • Teleglitch: Die More Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Death or Dishonor
  • Crusader Kings II: Conclave
  • 500k Club
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Mandate of Heaven
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Stellaris: Digital Anniversary Edition
  • Age of Wonders III
  • Hearts of Iron IV: Field Marshal
  • Cities: Skylines - Parklife
  • Crusader Kings II: The Old Gods
  • Hearts of Iron IV: Cadet
  • Steel Division: Normand 44 Sign-up
  • Crusader Kings Complete
  • Stellaris Sign-up
  • Hearts of Iron IV: Expansion Pass
  • Prison Architect
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV Sign-up
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Surviving Mars
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Magicka 2 - Signup Campaign
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Mare Nostrum
  • Knights of Honor
  • Deus Vult
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Europa Universalis IV: Call to arms event
Hell yes.

Are the global event targets on a character-by-character basis like the ordinary event targets apparently are, or are they global in the global flag sense? The former seems like it would be more useful.
Especially since the former can be used as the latter by having an immortal character maintain the target. While there's clearly no way for the latter to do the former.
 

Captain Gars

Lead AI Programmer
Super Moderator
Oct 4, 2010
5.887
901
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
Hell yes.

Are the global event targets on a character-by-character basis like the ordinary event targets apparently are, or are they global in the global flag sense? The former seems like it would be more useful.
I'm not really sure what you mean. A saved event target consists of a name and a character id OR a title OR a province number. That is all. The local variation is saved in the original scope of an event chain and thus "lives" as long as the event chain does, while the global variation is stored in the game state and thus exists as long as you leave it there.
 

Jorlem

Field Marshal
May 9, 2012
4.392
3.453
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Mandate of Heaven
  • Humble Paradox Bundle
  • Crusader Kings II: Way of Life
  • Surviving Mars
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Hearts of Iron IV: Field Marshal
  • War of the Roses
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Conclave
  • Tyranny: Archon Edition
  • Stellaris
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Holy Fury Pre-order
  • Europa Universalis III
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Prison Architect
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Shadowrun Returns
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Europa Universalis III Complete
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Parklife
  • Europa Universalis III Complete
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • The Showdown Effect
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Cradle of Civilization
I'm not really sure what you mean. A saved event target consists of a name and a character id OR a title OR a province number. That is all. The local variation is saved in the original scope of an event chain and thus "lives" as long as the event chain does, while the global variation is stored in the game state and thus exists as long as you leave it there.
So, the global variation hangs around in the same way a global flag does, and can be referenced by any event, decision, or whatnot? I'd imagine that when using the global variation, it would be a good idea to have a check built in to the event saving/setting the variable, to ensure that that saved global event target name isn't set to someone or something else.

Say, what would happen, if that sort of conflict arose? Would the new one just overwrite the older one that has the same name?
 

Captain Gars

Lead AI Programmer
Super Moderator
Oct 4, 2010
5.887
901
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
So, the global variation hangs around in the same way a global flag does, and can be referenced by any event, decision, or whatnot?
Yup.

I'd imagine that when using the global variation, it would be a good idea to have a check built in to the event saving/setting the variable, to ensure that that saved global event target name isn't set to someone or something else.

Say, what would happen, if that sort of conflict arose? Would the new one just overwrite the older one that has the same name?
Yes. Both the local and global variables for event targets will just be overwritten if you save it with a name already used.
 
Last edited: