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

unmerged(29041)

Amnistiado por viejuno
May 12, 2004
5.496
0
I have an important event that involves change of tag, so preferible it should happen while at peace, but upon reaching a certain date, it should happen regardless of anything.

The way I scripted it is:

Code:
	trigger = { 
		OR = { atwar = no 
			year = 1490 }
	}


	date = { day = 16 month = january year = 1479 }
	offset = 60
	deathdate = { day = 1 month = january year = 1491 }

But when the country is at peace during the period the event does not trigger. I have checked the Harvard bible but don't find anything wrong with it.

Anybody knows how to make it work? Any help is apreciated.
 

Hallsten

Hairloss Ninja
36 Badges
Mar 17, 2001
5.274
119
  • Crusader Kings II
  • 500k Club
  • Europa Universalis: Rome
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Heir to the Throne
  • Hearts of Iron III
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Deus Vult
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • 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: Charlemagne
  • Europa Universalis III
  • Hearts of Iron II: Armageddon
  • Crusader Kings II: Horse Lords
  • 200k Club
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Way of Life
  • Europa Universalis: Rome Collectors Edition
  • Europa Universalis III: Collection
  • Crusader Kings II: Holy Knight (pre-order)
  • Rome: Vae Victis
  • Europa Universalis IV
Fodoron said:
I have an important event that involves change of tag, so preferible it should happen while at peace, but upon reaching a certain date, it should happen regardless of anything.

The way I scripted it is:

Code:
	trigger = { 
		OR = { atwar = no 
			year = 1490 }
	}


	date = { day = 16 month = january year = 1479 }
	offset = 60
	deathdate = { day = 1 month = january year = 1491 }

But when the country is at peace during the period the event does not trigger. I have checked the Harvard bible but don't find anything wrong with it.

Anybody knows how to make it work? Any help is apreciated.

Strange, your trigger acts as if the OR was an XOR-operator. Try this and see if it works:

Code:
	trigger = { 
		OR = { 
			OR = { 	
				atwar = no 
				year = 1490 
			}
			AND = {
				atwar = no
				year = 1490
			}
		}
	}


	date = { day = 16 month = january year = 1479 }
	offset = 60
	deathdate = { day = 1 month = january year = 1491 }
 

unmerged(40707)

Just call me Yoda in private!
Mar 1, 2005
20.187
5
Is it a random event?

If no, I simply propose :
Code:
	trigger = { atwar = no }

	date = { day = 16 month = january year = 1479 }
	offset = 60
	deathdate = { day = 1 month = january year = 1491 }
year trigger isn't necessary in this case and I think it should only be used for random events.
Btw, in random events, date, offset and deathdate are note taken in account (that's what I realised in debugging Petty Kingdoms of the Barbary Coast).
 
Last edited:

unmerged(29041)

Amnistiado por viejuno
May 12, 2004
5.496
0
I tried your suggestion Hallsten, and it did not work either, nor did another variation of it that occured to me from reading it:

Code:
	trigger = {
		OR = { atwar = no 
			AND = { atwar = yes 
			year = 1490 }
		}
	}

Yodamaster the event has to take place even if at war. If at peace should take place in 1479. If at war it can wait until 1491.
The sloppy solution would be to duplicate the event, one with the range of dates and atwar=no, and another if the first fails without a war command. But I rather get the trigger working if possible.

But you might be right that a date in the trigger overrides any date in the event. I have no experience with that.
 
Jun 28, 2005
6.697
0
Then, delete the date, offset and deathdate.

New trigger :
Code:
trigger = {
	OR = {
		AND = {
			atwar = no
			year = 1479
			}
		year = 1491
		}
	}
If I'm right, the event should try (first possibility) as soon as it's at peace after 1479, or (second possibility) in any case after 1491.
 

unmerged(29041)

Amnistiado por viejuno
May 12, 2004
5.496
0
Ambassador, that is still suboptimal, since it would only work for 1479 or 1491. There could be war at both with a peace in between, and having it triggering at peace is much preferred.
 
Jun 28, 2005
6.697
0
YodaMaster said:
Just a precision : year = xxx in trigger means "Checks if the year is xxx or later"
Exactly what I was going to add. :)
 

unmerged(40707)

Just call me Yoda in private!
Mar 1, 2005
20.187
5
If I understand correctly, event must fire in 1479 if not at war or between 1480 and 1490 included at war or not :
Code:
trigger = {
	OR = {
		AND = {
			atwar = no
			year = 1479
			NOT = { year = 1480 }
			}
		AND = {
			year = 1480
			NOT = { year = 1491 }
			}
		}
	}
This should work.

EDIT : Keep date, offset and deathdate as they are to check event's trigger every 60 days.
 
Last edited:

unmerged(29041)

Amnistiado por viejuno
May 12, 2004
5.496
0
I am a little bit embarrashed, so to speak :eek:o :eek:o :eek:o

When I made several events, I copy pasted the date and modified it to make the deathdate. I changed the date and wrote deathdate in all of them but one. This event wasn't working because the actual conditions were:


date = { day = 16 month = january year = 1479 }
offset = 30
date = { day = 1 month = january year = 1490 }

When corrected it works :p

In any way thanks to all. I have learned more about triggers and conditions. Let's just hope this thread sinks soon into oblivion :eek:o
 
Jun 28, 2005
6.697
0
YodaMaster said:
No, really? (and... on the top of the list for one more - last - day) :D :p ;)
That's really not nice from you. He just don't deserve this. :D