• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

performer

Colonel
74 Badges
Aug 26, 2006
943
32
  • Stellaris: Galaxy Edition
  • Warlock 2: The Exiled
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: El Dorado
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Warlock: Master of the Arcane
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Stellaris: Necroids
  • Europa Universalis IV: Conquest of Paradise
  • 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
  • Deus Vult
  • Europa Universalis III
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • For The Glory
  • King Arthur II
  • Magicka
  • March of the Eagles
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Rome Gold
  • Sengoku
  • Victoria 2
Hi,

working on my own small event series, I have some questions to the modders who are already experienced in event scripting. Is there any way to

- change the religion of a province or a character (not to realm-religion, but to specific religion like pagan, orthodox, catholic jewish ...)? I just found the effect "set_to_realm_religion", but this is too restricted.

- trigger an event for a specific character, eg for William the Conqueror in the 1066-scenario (I found him in the file: id = { type = 10 id = 140 })

- trigger a sound file when an event pops up?

I would be glad if someone has time to answer the questions ...

Performer
 
And another question:

- Can events be triggered for dead characters? I want to trigger an event for a saint (the ruler of the realm in which the saint is burried should get a piety bonus.) I tried it with the following rough structure, but it was never triggered by the program.


Code:
character_event = {
	id = xx
	
	picture = "event_religion"        

	trigger = {           # Saint and dead

                condition = { type = trait value = saint }  
                condition = { type = not value = { type = is_alive } }
        }
	mean_time_to_happen = { # triggers often just for testing
		days = 1
	}

	action_a = {   #  trigger the next event for the ruler
                effect = { type = trigger for = ruler_csc value = xx}
        }
}
 
I think none of the things in your first post are possible. Certainly not firing events for specific characters, or triggering soundfiles.
You /can/ use special event pics.

As for the bottom event, what do you get if you fire it for a dead character in the console?
 
Events won't fire normally for dead people. You might get it to fire with the console for a dead man or you might get a crash instead.
 
jordarkelf said:
I think none of the things in your first post are possible. Certainly not firing events for specific characters, or triggering soundfiles.
You /can/ use special event pics.

As for the bottom event, what do you get if you fire it for a dead character in the console?

It would make sense for the saint and the canonized trait. You can fire it for the dead saints, then fire another event for the ruler of the land in which the saint lived and died. He may get a special bonus ...

Eventually, i can rework this event with the condition type = any_precursor, max = n (as printed in the event effects-file), but then the game crashes. How does this condition work? What is meant by "max=n"?

I tried it this way - the event is loaded, but never fired for my char ruler (and his holy grandfather), and the CPU becomes very slow:

Code:
character_event = {   #My precursor was a saint!
	id = xx
	picture = "event_religion"        
	trigger = {           # condition
                condition = { type = ruler }  # char is a ruler
                condition = { type = any_precursor  # ... and his precursor 
                          condition = { type = trait value = saint } }  # ... was a saint
        }
	mean_time_to_happen = {
		days = 1 # just for testing
	}
	action_a = {   #  Praise our holy precursor
                effect = { type = piety value = 50 }
        }
}
 
Last edited:
The reason why your computer becomes very slow is that you're having "any_precursor" condition checked very often and as all "any" conditions, it is very CPU intensive. Now, I have no idea whether or not "any_precursor" works and if it does, how, so you're rather on your own there. :(