Cat Lord

Moderator
Moderator
64 Badges
May 13, 2002
10.842
11
www.revolutionundersiege.com
  • Stellaris: Galaxy Edition
  • Warlock 2: The Exiled
  • Warlock 2: Wrath of the Nagas
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Hearts of Iron II: Beta
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Sword of the Stars
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Europa Universalis 4: Emperor
  • Divine Wind
  • 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 III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Cities in Motion 2
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
Hello all,

as you may have read, 1.03 is out, and should be a dream for modders (well at least I ask a lot to Johan to make it become a dream :D).

It introduce a new but not straightforward possibility:

Context Switching Condition

And many many more things.

Please use this thread for your question specific to events scripting with the new 1.03 possibilty :)

Cat
 
Last edited:

unmerged(6777)

Field Marshal
Dec 10, 2001
12.470
5
Yep. There are 3 of us who wrote/rewrote the bulk of the events for 1.03 and we'd be happy to help you as needed.
 

richvh

Preserver of the Light
63 Badges
Dec 1, 2001
14.691
1.999
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
  • Crusader Kings III: Royal 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
A comprehensive list of new conditions and effects, and old conditions/effects that behave differently in 1.03 would, I believe, be greatly appreciated.
 

Cat Lord

Moderator
Moderator
64 Badges
May 13, 2002
10.842
11
www.revolutionundersiege.com
  • Stellaris: Galaxy Edition
  • Warlock 2: The Exiled
  • Warlock 2: Wrath of the Nagas
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Hearts of Iron II: Beta
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Sword of the Stars
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Europa Universalis 4: Emperor
  • Divine Wind
  • 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 III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Cities in Motion 2
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
richvh said:
A comprehensive list of new conditions and effects, and old conditions/effects that behave differently in 1.03 would, I believe, be greatly appreciated.
The file "event effect.txt" has been updated as much as I can. That's a start :)

Cat
 

unmerged(2456)

Pure Evil Genius
Mar 29, 2001
11.211
0
www.hero6.com
2 things:
1. How do you change the AI's chance of picking an option.
2. Did you change it so that bastards are linked to the character getting the event and not the ruler?
 

Cat Lord

Moderator
Moderator
64 Badges
May 13, 2002
10.842
11
www.revolutionundersiege.com
  • Stellaris: Galaxy Edition
  • Warlock 2: The Exiled
  • Warlock 2: Wrath of the Nagas
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Hearts of Iron II: Beta
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Sword of the Stars
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Europa Universalis 4: Emperor
  • Divine Wind
  • 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 III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Cities in Motion 2
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
Jinnai said:
2 things:
1. How do you change the AI's chance of picking an option.
Example:
Code:
	action_a = {
		ai_chance = 36
			#start AI modifier block
			modifier = {
				condition = { type = not value = { type = diplomacy value = 2 } }
				factor = 1.5
			}
			modifier = {
				condition = { type = not value = { type = diplomacy value = 4 } }
				factor = 1.5
			}
			#end AI modifier block
		effect = { type = prestige value = 10 }
	}
	action_b = {
		ai_chance = 50
			#start AI modifier block
			modifier = {
				condition = { type = not value = { type = diplomacy value = 4 } }
				factor = 0.75
			}
			modifier = { 
				condition = { type = diplomacy value = 7 }
				factor = 0.75
			}
			#end AI modifier block
		effect = { type = piety value = 10 }
	}
	action_c = {
		ai_chance = 32
			#start AI modifier block
			modifier = { 
				condition = { type = diplomacy value = 7 }
				factor = 1.5
			}
			modifier = { 
				condition = { type = diplomacy value = 9 }
				factor = 1.5
			}
			#end AI modifier block
		effect = { type = piety value = 5 }
		effect = { type = prestige value = 5 }
	}
In this example, the AI with a low diplomacy will have more chance to pick a, with a medium diplo to pick b, and with a high diplo, to pick c.

Code:
Diplo value     a     b     c
     1          72   37.5  32
     3          48   37.5  32
     5          32   50    32
     8          32   37.5  48
    10          32   37.5  72
Jinnai said:
2. Did you change it so that bastards are linked to the character getting the event and not the ruler?
No.

Cat
 
Last edited:

unmerged(6777)

Field Marshal
Dec 10, 2001
12.470
5
Jinnai said:
another related question

can you use the CSC checks for ai chance (not effects)?
CSC checks will work in any context when a trigger condition or modifier condition applies so if you're working with ai_chance effects you can modify that with csc's.

Example:

Say you wanted to add a modifier to the AI choosing how it educates it children in a court where the demesne capital has a cathedral (something you couldn't do in 1.02). You could do this:

Code:
	action_c = {
		ai_chance = 30
			modifier = {
				condition = { 
					type = capital
						condition = { 
							type = has_improvement
							value = { type = cathedral value = yes }
						}
				}
				factor = 1.5
			}
		effect = blahblahblah
	}
The above would change the ai's chance of choosing action c from 30% to 45% if the demesne capital has a cathedral. Note that the modifier isn't enclosed at all (i.e you don't put {} around it) and of course it is ignored for players.

I hope that answers your question since I wasn't 100% clear on what you were asking.
 

richvh

Preserver of the Light
63 Badges
Dec 1, 2001
14.691
1.999
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
  • Crusader Kings III: Royal 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
event_effects.txt still says you can use the syntax
Code:
condition = {
  type = has_improvement
  value = {cathedral = no }
}
Has this actually been fixed, or is event_effects.txt inaccurate again on this point?
 

unmerged(6777)

Field Marshal
Dec 10, 2001
12.470
5
richvh said:
event_effects.txt still says you can use the syntax
Code:
condition = {
  type = has_improvement
  value = {cathedral = no }
}
Has this actually been fixed, or is event_effects.txt inaccurate again on this point?
AFAIK it could easily still be broken. It's the sort of syntax I wouldn't normally use simply because so few others allow it and it would lead me into all sorts of (potentially) bad habits. I would recommend sticking with the assumption that it hasn't been fixed and continue to NOT it instead, just to be safe.
Code:
condition = {
        type = not
        value = { type = has_improvement value = {cathedral = no } }
}
 

richvh

Preserver of the Light
63 Badges
Dec 1, 2001
14.691
1.999
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
  • Crusader Kings III: Royal 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
As I understand what MrT and Cat Lord have written, if you want a character effect (ruler trait added), you have to write a character event, that can use context switching to check province conditions. There is no way to have character effects and province effects in the same event.
 

Cat Lord

Moderator
Moderator
64 Badges
May 13, 2002
10.842
11
www.revolutionundersiege.com
  • Stellaris: Galaxy Edition
  • Warlock 2: The Exiled
  • Warlock 2: Wrath of the Nagas
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Hearts of Iron II: Beta
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Sword of the Stars
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Europa Universalis 4: Emperor
  • Divine Wind
  • 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 III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Cities in Motion 2
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
Richard is correct.

These are Context Switching CONDITIONS. Not context switching effect...

Cat
 

richvh

Preserver of the Light
63 Badges
Dec 1, 2001
14.691
1.999
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
  • Crusader Kings III: Royal 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
I note that the province condition
Code:
type = capital value = yes
used in the advance discovery series is still not documented in event_effects.txt. Now there is a csc type of realm_capital. Can realm_capital be used as a province condition to test if a province is the top level capital?
 

Cat Lord

Moderator
Moderator
64 Badges
May 13, 2002
10.842
11
www.revolutionundersiege.com
  • Stellaris: Galaxy Edition
  • Warlock 2: The Exiled
  • Warlock 2: Wrath of the Nagas
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Hearts of Iron II: Beta
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Sword of the Stars
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Europa Universalis 4: Emperor
  • Divine Wind
  • 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 III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Cities in Motion 2
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
richvh said:
Now there is a csc type of realm_capital. Can realm_capital be used as a province condition to test if a province is the top level capital?
No.

Cat
 

Cat Lord

Moderator
Moderator
64 Badges
May 13, 2002
10.842
11
www.revolutionundersiege.com
  • Stellaris: Galaxy Edition
  • Warlock 2: The Exiled
  • Warlock 2: Wrath of the Nagas
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Hearts of Iron II: Beta
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Sword of the Stars
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Europa Universalis 4: Emperor
  • Divine Wind
  • 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 III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Cities in Motion 2
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
Note: You can nest different csc

Examples:

A check on the steward of the ruler for a province event:

Code:
#####
# Arbitrary Steward: Upset the population

[B]province_event[/B] = {
	id = 7500
	
	picture = "event_intrigue"
	
	trigger = {
		condition = { type = not value = { type = ai } }
[B]		condition = {
			type = owner
			condition = {
				type = steward_csc
				condition = { type = trait value = arbitrary }
			}
		}[/B]
	}

	mean_time_to_happen = {
		months = 480

		# Ruler trait modifiers:

		modifier = {
			condition = {
				type = owner
				condition = { type = trait value = trusting }
			}
			factor = 0.75
		}

		modifier = {
			condition = {
				type = owner
				condition = { type = trait value = suspicious }
			}
			factor = 1.25
		}

	}

And the contrary:

An example of a check on a province for a steward event.

Code:
[B]character_event [/B]= {
	id = 7514
	
	picture = "event_crime"
	
	trigger = {
		condition = { type = not value = { type = ai } }
		condition = { type = steward }
		condition = { type = trait value = deceitful }
[B]		condition = {
			type = ruler_csc
			condition = {
				type = any_province
				condition = {
					type = or
					condition = { type = has_improvement value = { thieves_guild = yes } }
					condition = { type = has_improvement value = { smugglers_ring = yes } }
					condition = { type = has_improvement value = { highway_robber_band = yes } }
				}
			}
		}[/B]
	}

	mean_time_to_happen = {
		months = 480

		# Ruler trait modifiers:

		modifier = {
			condition = {
				type = ruler_csc
				condition = { type = trait value = trusting }
			}
			factor = 0.8
		}

		modifier = {
			condition = {
				type = ruler_csc
				condition = { type = trait value = suspicious }
			}
			factor = 1.25
		}

	}

	immidiate = {#Dirty money
		effect = { type = gold scale = 0.25 }
		effect = { type = piety value = -10 }
	}

}

Cat
 

unmerged(6777)

Field Marshal
Dec 10, 2001
12.470
5
Note also:

If you use a csc for someone who doesn't exist then it will always return as false.

Example:

If you use the steward_csc and the court does not have a steward appointed, this will return as false no matter what condition(s) is nested inside it. When you're using these it doesn't hurt to double check that you haven't forgotten a trigger condition that should be included to avoid strange results. (Cat Lord and I learned that lesson the hard way :eek:o :D )
 

richvh

Preserver of the Light
63 Badges
Dec 1, 2001
14.691
1.999
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
  • Crusader Kings III: Royal 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
Cat Lord said:
richvh said:
Now there is a csc type of realm_capital. Can realm_capital be used as a province condition to test if a province is the top level capital?
No.

Cat
So is there any way for a province event to check if the selected province is the top-level capital?
 

Cat Lord

Moderator
Moderator
64 Badges
May 13, 2002
10.842
11
www.revolutionundersiege.com
  • Stellaris: Galaxy Edition
  • Warlock 2: The Exiled
  • Warlock 2: Wrath of the Nagas
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Hearts of Iron II: Beta
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Sword of the Stars
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Europa Universalis 4: Emperor
  • Divine Wind
  • 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 III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Cities in Motion 2
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
richvh said:
So is there any way for a province event to check if the selected province is the top-level capital?
"type = capital" + CSC "type = owner + type = is_independent" ?

Cat