• 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(229589)

Second Lieutenant
1 Badges
Oct 3, 2010
148
0
  • Arsenal of Democracy
Okay folks,

Have a look at this code:

event = {
id = 360362
random = no
country = FRA

trigger = {
flag = Isolated_FRA_Mod
exists = ROM
NOT = { war = { country = ROM country = FRA } }
NOT = { flag = FRA_mainland_occuppied } # France lost mainland
random = 50
}

name = "Romania wants to purchase the Potez 633. Isolated"
desc = "Romania has approached us and inquired about the possibility....months."

style = 0
picture = "MS406_Fin" # New pic needed

date = { hour = 14 day = 0 month = february year = 1936 }
offset = 2
deathdate = { hour = 14 day = 29 month = december = 1940 }

etc.

Now I have tested this to death and I can guarrantee that at 14 on 1 February 1936, if I set the random to 100, the event fires perfectly.
If I set random to 50, it may fire within a couple of days (the offset is 2 so it should check every 2 days from start date) but if it doesnt start in a week or less it will never trigger.

I have trialled this with various numbers from 10 to 95 (and 100) as the random value. Based on several data sets it appears as if the computer simply stops checking when the random% times the number of check cycles is about 200%.

So if the percent is 50%, then it will stop checking after 4 cycles (or 8 days).
If the percent is 10%, than it will stop checking after 20 cycles, or 40 days
and if the percent is 20% and the offset is 7 days, the computer stops checking after 5 cycles or 35 days.

This doesn't seem to apply when using the "random = yes" trigger - AFAIK that is handled very differently.

For fun I set up 6 triggers in an event file like above. All fired with random = 100, but if random was < 100 then if the trigger did not fire within (cycles x random =< 200) (roughly) then that trigger did not fire even if I waited for months...

And yes the other trigger conditions were satisfied!

Weird.