Well, there's two ways of going about it, you can either trigger it on a yearly pulse by using on_yearly_pulse (found in the file in common/on_actions) or you do it through a normal mean time to happen (mtth) event. The second I would say is easier, but the first is more easy to average out to a specific percentage if that is what you want.
In general I'd recommend you go through the test events to familiarise yourself with the structure and syntax of events, as well as look at other events to see how they have solved the things they want to do.
To start you off, here's Test Event 1 that I'll go through and explain the parts, never mind the #, as that just means that the game won't read the lines, as these are just for demonstration from the vanilla files:
Code:
#country_event = {
# id = henrik.1
# title = OK
# desc = OK
#
# hide_window = yes
#
# mean_time_to_happen = {
# days = 1
# }
#
# trigger = {
# is_ai = no
# }
#
# immediate = {
# random_country = {
# limit = {
# NOT = { is_same_empire = ROOT }
# is_ai = yes
# }
# country_event = {
# id = henrik.2
# days = 3
# }
# }
# }
#}
country_event this is what type of event it is, in this case it means unsuprisingly that it will be executed in a country scope. For your event you'll likely want a planet_event.
id is the id of the event. At the beginning of each file you have to declare a namespace (not seen in this snippet), in this case henrik, and then ID each event with a unique number for that namespace. Mainly, ID is used for triggering other events inside an event or from an on_action.
title and desc are which string from the localisation files they will get. In this case both of them will just take the OK as this event is only for debugging purposes.
hide_window = yes this means that no window will pop up for the player, useful for hidden events and game mechanics. By default this is no, so you don't need to have hide_window = no on an event you want to pop up.
mean_time_to_happen there are two types of events broadly speaking, triggered events and mtth events. Triggered events will only happen if directly triggered (they are marked with triggered_only = yes ) by another event or on_action. mean_time_to_happen has a random chance to be triggered as long as the event trigger is true and will average out to happen after the time in the mtth. You don't need to use days here, but can also use months and years.
trigger this is one of the most important part of the events, as this tells the event when to fire. In this case it only checks if the country which the event would fire for is AI. For your event you'd most likely want to have a condition along the line of any_tile = { has_building = nuclear_plant }
immediate (also option and after, although not used in this event) is the way the event applies its effects. In this case the effect is that a random country, which is limited to any other country and is ai, gets another event after 3 days. It is in this bracket that the meat of your event will be. Immediate effects will happen as soon as the event fires, but you can also use after to have the effects apply after the pop up window closes.
option is used for choices and player interaction. For any event that pops up you'll want an option, if nothing else to just have the player confirm and get rid of the pop up. You can also add effects to options, which then take effect when you select it.