Today I was playing with random events, decided to enhance that crap Devastating Fire event. And it works nicely! But well, I have noticed something.
Code:
event = {
id = 94356
name = "Devastating Fire!"
desc = "Due to lack of any effective firefighting techniques and frequent use of wood as building materials, sizable cities were often prone to outbreak of great fires. One of most famous fires of epoque was Great Fire of London from 1666 - overall it consumed 13,200 houses, 87 parish churches, St. Paul's Cathedral, most of the buildings of the City authorities and destroyed the homes of 70,000 of the City's 80,000 inhabitants. Unfortunately, one of our biggest cities indeed fell prey to a massive fire recently.."
action = {
name = "Rebuild the city!"
command = { type = provincetax which = -1 value = -3 }
command = { type = populationpercent which = -3 value = -5 }
command = { trigger = { random = 50 } type = fortress which = -3 value = -1 }
command = { trigger = { random = 50 } type = losebuilding which = -3 value = bailiff }
command = { trigger = { random = 50 } type = losebuilding which = -3 value = courthouse }
command = { trigger = { random = 50 } type = losebuilding which = -3 value = cityrights }
command = { trigger = { random = 50 } type = losebuilding which = -3 value = shipyard }
command = { trigger = { random = 50 } type = losebuilding which = -3 value = barrack }
command = { trigger = { random = 50 } type = losemanufactory which = -3 value = -1 }
command = { type = treasury value = -300 }
}
action = {
name = "Rebuild the city!"
command = { type = provincetax which = -3 value = -1 }
command = { type = populationpercent which = -3 value = -5 }
command = { trigger = { random = 50 } type = fortress which = -3 value = -1 }
command = { trigger = { random = 50 } type = losebuilding which = -3 value = bailiff }
command = { trigger = { random = 50 } type = losebuilding which = -3 value = courthouse }
command = { trigger = { random = 50 } type = losebuilding which = -3 value = cityrights }
command = { trigger = { random = 50 } type = losebuilding which = -3 value = shipyard }
command = { trigger = { random = 50 } type = losebuilding which = -3 value = barrack }
command = { trigger = { random = 50 } type = losemanufactory which = -3 value = -1 }
command = { type = inflation value = 3 }
}
action = {
name = "Unfortunately city has to do something on its own..."
command = { type = provincetax which = -3 value = -3 }
command = { type = populationpercent which = -3 value = -10 }
command = { trigger = { random = 90 } type = fortress which = -3 value = -1 }
command = { trigger = { random = 90 } type = losebuilding which = -3 value = bailiff }
command = { trigger = { random = 90 } type = losebuilding which = -3 value = courthouse }
command = { trigger = { random = 90 } type = losebuilding which = -3 value = cityrights }
command = { trigger = { random = 90 } type = losebuilding which = -3 value = shipyard }
command = { trigger = { random = 90 } type = losebuilding which = -3 value = barrack }
command = { trigger = { random = 90 } type = losemanufactory which = -3 value = -1 }
}
}
Apparently you can use "random" trigger to make actions pop up randomly. However, there's the catch: it seems that random = x used in actions affects not only whether action pops up, but also whether it works!
Before that I had randoms set to 10 in last action and 20 for manufactory - and even if any "Lose x in y" commands popped up, they rarely did their stuff and destroyed building they were meant to.
So that 20% affects not only whether command is selected via event, but also if it takes effect. Screenshot to prove it:
Now, if it's possible, maybe this could be twisted to our advantage? Well, it all depends on Michael obviously, he might not have enough time to do that or engine might not allow it.
However, if using random = x in action could make it show up every time and change tooltip to sth like: "90% chance that <ACTION> will happen", in this case "90% chance that lose manufactory in Barrois will happen". Something like in CK2, hell even in CK1, that could help a lot with events
Either way, if that won't happen, I'd simply like to let everyone know what I've found out today, as that's certainly something new(?)

.