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

The Swert

Yours Swertically
51 Badges
Jan 28, 2007
1.626
55
  • Europa Universalis IV: Mandate of Heaven
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Europa Universalis IV: Golden Century
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - Natural Disasters
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Cities: Skylines Industries
  • Europa Universalis IV: Conquest of Paradise
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Legacy of Rome
  • Victoria 3 Sign Up
  • Europa Universalis 4: Emperor
  • Crusader Kings III
  • Stellaris: Federations
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Cities: Skylines - Campus
  • Europa Universalis IV: Res Publica
  • 500k Club
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Cities: Skylines
  • For The Glory
  • Europa Universalis III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Crusader Kings II
Would it be possible to make one-time-only events which may or may not fire even if triggers are met?

I'm thinking of the use of multiple events with the same triggers and timeframe but using the randomness of offsets to create a probability as to which event fires first and having an action of the first firing event to sleep the other event.

For example, using the Reformation event, could you do something like this:

Code:
event = { 

	id = 100
	name = "EVENTNAME101"
	desc = "EVENTHIST101"
	style = 1
	date = { year = 1515 }
	offset = 4000
	action_a = {
			name = "OK"
			command = { type = flag which = 1 }
                        command = { type = sleepevent   which = 12345678 }
		}

	}

event = { 

	id = 12345678
	name = "EVENTNAME12345678"
	desc = "EVENTHIST12345678"
	style = 1
	date = { year = 1515 }
	offset = 4000
	action_a = {
			command = { type = sleepevent   which = 100 }
		}

	}

Would this create a 50% chance of Reformation occuring (the first event) and 50% chance of the second event occuring and thereby sleeping the Reformation event?
 
The offset you got the wrong impretion of. Offset just means the interval that goes on untill the event will check triggers again. You should do say 5 events like this:

Code:
event = { 

	id = 12345678
	name = "EVENTNAME12345678"
	desc = "EVENTHIST12345678"
	style = 1
	date = { year = 1515 }

	action_a = {
			command = { type = trigger which = 12345679 }
		}

	action_b = {
			command = { }
		}

	action_c = {
			command = { }
		}

	action_d = {
			command = { }
		}

	} 

And the last:

event = { 

	id = 12345682
	name = "EVENTNAME12345682"
	desc = "EVENTHIST12345682"
	style = 1
	date = { year = 1515 }

	action_a = {
			command = { type = trigger which = 100 }
		}

	action_b = {
			command = { }
		}

	action_c = {
			command = { }
		}

	action_d = {
			command = { }
		}

	}
 
cool-toxic said:
The offset you got the wrong impretion of. Offset just means the interval that goes on untill the event will check triggers again.

It seems i must have. Havard's bible says offset "means that the event may happen on any of these days from the time specified in date" as well as the triggering interval. Since the Reformation has no triggers i figured that for the two events i had, offset would randomly pick a day for each event to fire on out of the 4000 days following Jan 1 1515.

Does your set of events work by using the AI selection percentages; an 85% chance that action_a is chosen?
 
The Swert said:
It seems i must have. Havard's bible says offset "means that the event may happen on any of these days from the time specified in date" as well as the triggering interval. Since the Reformation has no triggers i figured that for the two events i had, offset would randomly pick a day for each event to fire on out of the 4000 days following Jan 1 1515.

Does your set of events work by using the AI selection percentages; an 85% chance that action_a is chosen?

Hmm.. well then it should work but I just think I read it somewhere.. Maybe not. :p And yeah my example is for AI.