For those trying to come up with custom events, I've run into two issues you should be aware of.
First, if you use the TotalPopulation trigger
<TriggerType>TotalPopulation</TriggerType>
<TriggerData>400</TriggerData>>
<TriggerOrigin>EventLocation</TriggerOrigin>
<SpawnRating>1</SpawnRating>
<TriggerChance>4</TriggerChance>
then the event has a 4 in 10 000 turns to trigger each turn (modify 10 000 for option selected when starting game). The flip side is this event can trigger for AI as well. So if you make, say a unique monster spawn from an event, don't be surprised if you run into the monster even if the event didn't trigger for the player. This effectively means that the chance for events of this type to trigger is multiplied by the number of players in the game when it comes to monster spawns. Obviously the AI isn't going to start playing quests or such.
The AI can get abilitybonus modifiers though, such as boosting all growth by 100%. This is good to know because it means the AI can get positive/negative modifier events just as you can.
edit: Also note TriggerChance works on a per-turn basis here. If you give it 4 TriggerChance and roll against a 10 000 chance, every turn the roll is re-done if your population is above TriggerData.
Second, if you use the TurnNumber trigger
<TriggerType>TurnNumber</TriggerType>
<TriggerData>5</TriggerData>
<TriggerOrigin>EventLocation</TriggerOrigin>
<SpawnRating>1</SpawnRating>
<TriggerChance>10</TriggerChance>
<PostTriggerChance>4</PostTriggerChance>
it will straight up bug out and instead of the appropriate quest, you'll get some "Bandits on the loose!" quest pop-up. Why? I don't know.

Edit: Note the different use of TriggerChance and PostTriggerChance here. Triggerchance is a roll-once check on the specific turn, PostTriggerChance is the re-roll chance.