• 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.

MattyG

Attention is love.
15 Badges
Mar 23, 2003
3.690
1
  • Crusader Kings II: The Old Gods
  • Deus Vult
  • Diplomacy
  • Europa Universalis III
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis III Complete
  • 500k Club
  • Europa Universalis III: Collection
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings III
  • Europa Universalis 4: Emperor
I know could write events and run tests for myself, but I suspect it has already been done and asking for help is so much quicker ... :D


Random events can trigger any number of times, but can triggered events also occur more than once?

Can one have, for example, and event that is random which has in its commands trigger which = xxxxxx and have that triggered event trigger each and every time the random event happens?


Here's a somewhat meaningless example:
Code:
event = {
	id = whatever
	random = yes
	trigger = {
		neighbour = BRI
	}
	name = "Do Something Nasty to Brittany"
	desc = "Some cool text"

	action_a = {
		name = "Mess with Brittany"
		command = { type = trigger which = 322100 }
		command = { type = badboy value = 1 }
		command = { type = relation which = BRI value = -50 }
		command = { type = cash value = -50 }
	}
	action_b = {
		name = "Don't mes with Brittany"
		command = { type = relation which = BRI value = 25 }
	}
}

event = {
	id = 322100
	random = no
	country = BRI
	name = "Somebody is Messing With Us"
	desc = "This is not a happy situation"

	action_a = {
		name = "Curses"
		command = { type = stability value = -1 }
		command = { type = revolt which = -1 }
		command = { type = revoltrisk which = 6 value = 3 }
	}
}

I basically want to have events like these, perhaps as a replacement for the current generic Foreign Dissident type events.
 
Well your first event will fire like any other random event if the trigger is correct. So that won't work. Unless you really want it to fire like random events.

For the second event I would make it random which would enable it to fire more than once. But then to prevent it from randomly happen without being triggered I would use a trigger like it has to have a flag that is not used ingame. (This flag could in your case be used for some kind of internal messing maybe?)
 
cool-toxic said:
Well your first event will fire like any other random event if the trigger is correct. So that won't work. Unless you really want it to fire like random events.

For the second event I would make it random which would enable it to fire more than once. But then to prevent it from randomly happen without being triggered I would use a trigger like it has to have a flag that is not used ingame. (This flag could in your case be used for some kind of internal messing maybe?)


I think that providing a mock, irrelevant example I have detracted from the actual quation I had. I shall restate it.

These things are true:

1. Random events can happen many times.

2. Random events can use the trigger command to trigger another event

But ...

Does anyone know if a random event can trigger another event more than once, or whether triggered events can only happen a single time?
 
So I tested it out myself.

No, doesn't work.

An event can only ever happen once, even through triggering, unless the event itself is a random event, because random events are not entered in the "events all done" registry.

However, if the event-that-you-want-to-be-triggered is a random event itself, then it will also trigger 'naturally'. Which, for any non-time-specific event ideas is probably not so good.

Flags won't work, cool-toxic. The event to be triggered off the flag might not trigger ever, and certainly not within the basically-instant timeframe I wanted for such an event idea. Thanks anyway. ;)
 
Okay I think you misunderstood me then...

What I meant was that in order to have the triggered event to happen more than once you need to set it also to be random. (As you wrote yourself. ;))
Then you need to give that second event a trigger = { flag = Thisflagwillneveroccur }. This will do so that the second event can't happen if it's not triggered. Thus you can control it. Now you got an event that can fire more than once and will only fire when triggered by that first random event. Understand? :)
 
cool-toxic said:
Okay I think you misunderstood me then...

What I meant was that in order to have the triggered event to happen more than once you need to set it also to be random. (As you wrote yourself. ;))
Then you need to give that second event a trigger = { flag = Thisflagwillneveroccur }. This will do so that the second event can't happen if it's not triggered. Thus you can control it. Now you got an event that can fire more than once and will only fire when triggered by that first random event. Understand? :)

Yes, now I get you.

But it still doesn't work because triggered events also check to ensure that all of their conditions are met.
 
Last edited: