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

I was having difficulties with a small but somewhat important aspect of a personal mod I was working on. I created a historical characters document and was able to get all characters in game, with their appropriate titles and such, but I wasn't able to fully expand on the personal relationships of the characters as I would have liked to. I was unable to figure out how to add friends/rivals in the historical documents. I was wondering if
a) Such a thing is even possible? Is it possible to use the effects option of the character document to add friends or rivals?
b) If that is not possible, would the easiest solution to be to try to create an event that adds appropriate friendships and rivalries?
Attached is the characters document.
c) Is it possible to use the historical characters document to make a character join a society? I was hoping to have all the characters either in the Hermetic Society or Demon worshipers .
I'd rather make Weasleys welsh, not irish.
 
Exactly, but it doesn't work. For some reason all titular titles show up in the game without a prefix.

Funny thing is now I notice this has nothing to do with the custom title_prefix. When I put none, the titular titles also do not show up in the game as "duchy of" or "county of". I wonder if there is a way to fix it or if it is a bug.

Have you tried using the title_prefix thing for titular titles? Did it work?
Honestly, titular titles are an odd hack to the system. The system really isn't set up to do what you want. :oops:
 
Greetings,

I have the following problem:

Code:
alchemist = {
    opposites = {
        trait = master_alchemist
    }
    random = no
    opposite_opinion = -10 #Meisteralchemisten verachten niedere Alchemisten
    general_opinion = -5
    diplomacy = -1
    martial = -1
    cannot_marry = yes
    education = yes
    inherit_chance = 0
    same_opinion = 10
    liege_opinion = 10
}

This is a trait, that should only be given by event. But when I activate the vanilla-decision for getting a debutante to my court.

Code:
    present_debutante = {
        potential = {
            ai = no
        }
        allow = {
            scaled_wealth = 0.20
            NOT = {
                has_character_modifier = in_seclusion
            }
        }
        effect = {
            scaled_wealth = -0.20
            create_character = {
                random_traits = yes
                dynasty = random
                female = yes
                age = 17
            }
            new_character = {
                remove_trait = slow
                remove_trait = imbecile
                remove_trait = dull
               
                hidden_tooltip = {
                    if = {
                        limit = {
                            has_dharmic_religion_trigger = yes
                        }
                        add_trait = kshatriya
                        character_event = { id = RoI.30121 }
                    }
                }
                set_character_flag = debutante
                save_event_target_as = invited_character
            }
            character_event = { id = NE.1 }
        }
        revoke_allowed = {
            always = no
        }
        ai_will_do = {
            factor = 0
        }
    }

And that is only one possible way... how do I stop that trait to spread? I only want it to be given by event.
 
Quick question.

Is it possible to fire an event on a specific day, every year?

For example, let's say I make a decision to set Christmas as an official Holiday and I want an event to fire every year on the 25th of December. What should I do?

I have no problem firing it on a yearly basis. I can just use the yearly on_action or do character_event = { id = XXX.X days = 365 }. The issue is just getting it to start right.
 
I'd suggest this.

Code:
new_character = {
                 NOT = { 
                                add_trait = alchemist
                                add_trait = master_alchemist
                 }
                  remove_trait = slow
                  remove_trait = imbecile
                  remove_trait = dull
                 }

That should guarantee the trait never being given out randomly.
 
Quick question.

Is it possible to fire an event on a specific day, every year?

For example, let's say I make a decision to set Christmas as an official Holiday and I want an event to fire every year on the 25th of December. What should I do?

I have no problem firing it on a yearly basis. I can just use the yearly on_action or do character_event = { id = XXX.X days = 365 }. The issue is just getting it to start right.

look at some of the decisions for holidays there usually locked to a specific date within months from that you can probably create a scope to fire on a specific day each year
 
look at some of the decisions for holidays there usually locked to a specific date within months from that you can probably create a scope to fire on a specific day each year
You can actually not!
I mean, not a specific day - month at best.
Which I do find outright hilarious, and have already suggested as a modding improvement. But whether it'll get implemented idk.
The workaround I use is to fire an event at gamestart, and call another event repeatedly every single day and check which month it is, until it finds that it is now the next month. Then you know it must be the first of that new month, and from there on you can call delayed events to other dates of the year, and repeat these on a 356 day delay. Complicated workaround, but the only way if you want a specific day.
 
look at some of the decisions for holidays there usually locked to a specific date within months from that you can probably create a scope to fire on a specific day each year

I've taken a look at every decision inside all the files inside /decisions/ and none of them seem to do what I was asking.

All I could find in there were decisions to celebrate holidays on a specific month or period. Even if it was for a specific date, that is also not what I'm looking for. So, I appreciate it, but that's not what I wanted, if that's what you were suggesting :)

According to what I saw, a decision to celebrate Xmas on a specific date should look something like this.
Code:
allow = {
           month == 12
           day == 25 # Not sure if there is a day condition, like there is for month...
}

However, again, this is not what I was asking, here.

What I want, is to "enable" the holiday through a decision (law, actually), regardless of what date it is. Then, always get it automatically fired on a specific date, regardless if the ruler wants it or not. Pretty simple, uh? Oh.. and spamming the engine with inelegant checks every day is just not feasible to me :O

At this point, I assume there is no simple way to do it. I'll probably have to somehow use variables. Maybe to get the current day and month, if that's even possible. Then, calculate how many days are left and add the difference to a character_event = { id.x days = variable}...
 
I'd suggest this.

Code:
new_character = {
                 NOT = {
                                add_trait = alchemist
                                add_trait = master_alchemist
                 }
                  remove_trait = slow
                  remove_trait = imbecile
                  remove_trait = dull
                 }

That should guarantee the trait never being given out randomly.

I dont think, that this will work.

I hope to found a better solution:

Code:
alchemist = {
    potential = {
        has_character_flag = is_court_alchemist
    }
    opposites = {
        trait = master_alchemist
    }
    random = no
    opposite_opinion = -10 #Meisteralchemisten verachten niedere Alchemisten
    general_opinion = -5
    diplomacy = -1
    martial = -1
    cannot_marry = yes
    education = yes
    inherit_chance = 0
    same_opinion = 10
    liege_opinion = 10
}

The event that creates the alchemist has this flag and so only those who have that flag could have the trait. TADA! Will test this now...
 
@Salciano: You may have missed my post because i didn't reply to you directly.
You can actually not!
I mean, not a specific day - month at best.
Which I do find outright hilarious, and have already suggested as a modding improvement. But whether it'll get implemented idk.
The workaround I use is to fire an event at gamestart, and call another event repeatedly every single day and check which month it is, until it finds that it is now the next month. Then you know it must be the first of that new month, and from there on you can call delayed events to other dates of the year, and repeat these on a 356 day delay. Complicated workaround, but the only way if you want a specific day.
(TL;DR there is no "day" condition, for reasons beyond my comprehension, so you need to do crazy workarounds.)
 
Is there a conditional version of a scripted_effect? Like...
Code:
  if = {
     limit = {
        conditioned_scripted_effect = yes
     }
  }
?

I have a bunch of conditions that are the same, but if I change one I have to go through them all each time, and having one reusable block would be handy.
 
I've been trying to get an Expel Event to usurp titles from characters of a certain religion that are inside my real. I've tried everything I could think of. Does anyone have any ideas on how to do it?
 
I have created an event to rename a title on succession that behaves rather oddly.

The first time the event fires, everything works out as expected, with the new emperor picking one of the options to rename e_china (or keeping the current name, I suppose, though as the probability for that is extremely low I haven't seen it yet). However, if I keep console-killing emperors until another dynasty takes over, they always end up somehow picking the first event option even though they shouldn't be allowed to pick it (due to no dynasty flag being set on their dynasty), which I can see since they get the old_china_name flag.

The event code (Note: Very long, but all event options aside from the first and the second-to-last are essentially the same):

Code:
character_event = {
   id = nameofchina.5
   is_triggered_only = yes
   title = EVTTILE_NAMEOFCHINA_5
   desc = EVTDESC_NAMEOFCHINA_5
   picture = GFX_evt_NAMEOFCHINA_golden_age
   border = GFX_event_normal_frame_diplomacy
   
   trigger = {
       FROM = {
           title = e_china
       }
       ROOT = {
           religion = taoist
       }
       FROMFROM = {
           NOT = {
               dynasty = ROOT
           }
           religion = taoist
       }
   }
   
   immediate = {
       clr_character_flag = new_china_name
       clr_character_flag = old_china_name
       clr_global_flag = formerly_tang_china
       clr_global_flag = formerly_jin_china
       clr_global_flag = formerly_wei_china
       clr_global_flag = formerly_qi_china
       clr_global_flag = formerly_zhou_china
       clr_global_flag = formerly_han_china
       clr_global_flag = formerly_qin_china
       clr_global_flag = formerly_yan_china
       clr_global_flag = formerly_zhao_china
       clr_global_flag = formerly_liao_china
       clr_global_flag = formerly_yuan_china
       clr_global_flag = formerly_xia_china
       clr_global_flag = formerly_qing_china
       clr_global_flag = formerly_dai_china
       clr_global_flag = formerly_cheng_china
       clr_global_flag = formerly_liang_china
       clr_global_flag = formerly_song_china
       clr_global_flag = formerly_ming_china
       clr_global_flag = formerly_shu_china
       clr_global_flag = formerly_wu_china
       clr_global_flag = formerly_chu_china
       clr_global_flag = formerly_yue_china
       clr_global_flag = formerly_yin_china
       clr_global_flag = formerly_shun_china
       if = {
           limit = {
               e_china = {
                   has_title_flag = tang_china
               }
           }
           set_global_flag = formerly_tang_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = jin_china
               }
           }
           set_global_flag = formerly_jin_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = wei_china
               }
           }
           set_global_flag = formerly_wei_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = qi_china
               }
           }
           set_global_flag = formerly_qi_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = han_china
               }
           }
           set_global_flag = formerly_han_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = qin_china
               }
           }
           set_global_flag = formerly_qin_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = yan_china
               }
           }
           set_global_flag = formerly_yan_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = zhao_china
               }
           }
           set_global_flag = formerly_zhao_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = liao_china
               }
           }
           set_global_flag = formerly_liao_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = yuan_china
               }
           }
           set_global_flag = formerly_yuan_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = xia_china
               }
           }
           set_global_flag = formerly_xia_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = qing_china
               }
           }
           set_global_flag = formerly_qing_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = dai_china
               }
           }
           set_global_flag = formerly_dai_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = cheng_china
               }
           }
           set_global_flag = formerly_cheng_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = liang_china
               }
           }
           set_global_flag = formerly_liang_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = song_china
               }
           }
           set_global_flag = formerly_song_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = ming_china
               }
           }
           set_global_flag = formerly_ming_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = shu_china
               }
           }
           set_global_flag = formerly_shu_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = wu_china
               }
           }
           set_global_flag = formerly_wu_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = chu_china
               }
           }
           set_global_flag = formerly_chu_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = yue_china
               }
           }
           set_global_flag = formerly_yue_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = yin_china
               }
           }
           set_global_flag = formerly_yin_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = shun_china
               }
           }
           set_global_flag = formerly_shun_china
       }
   }
   
   option = {
       trigger = {
           OR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
       }
       name = EVTOPTA_NAMEOFCHINA_5 # Use our old dynasty name!
       
       set_character_flag = old_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       if = {
           limit = {
               has_dynasty_flag = tang_china
           }
           e_china = {
               set_name = "Tang Empire"
               adjective = "Tang"
               set_title_flag = tang_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = jin_china
           }
           e_china = {
               set_name = "Jin Empire"
               adjective = "Jin"
               set_title_flag = jin_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = wei_china
           }
           e_china = {
               set_name = "Wei Empire"
               adjective = "Wei"
               set_title_flag = wei_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = qi_china
           }
           e_china = {
               set_name = "Qi Empire"
               adjective = "Qi"
               set_title_flag = qi_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = zhou_china
           }
           e_china = {
               set_name = "Zhou Empire"
               adjective = "Zhou"
               set_title_flag = zhou_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = han_china
           }
           e_china = {
               set_name = "Han Empire"
               adjective = "Han"
               set_title_flag = han_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = qin_china
           }
           e_china = {
               set_name = "Qin Empire"
               adjective = "Qin"
               set_title_flag = qin_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = yan_china
           }
           e_china = {
               set_name = "Yan Empire"
               adjective = "Yan"
               set_title_flag = yan_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = zhao_china
           }
           e_china = {
               set_name = "Zhao Empire"
               adjective = "Zhao"
               set_title_flag = zhao_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = liao_china
           }
           e_china = {
               set_name = "Liao Empire"
               adjective = "Liao"
               set_title_flag = liao_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = yuan_china
           }
           e_china = {
               set_name = "Yuan Empire"
               adjective = "Yuan"
               set_title_flag = yuan_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = xia_china
           }
           e_china = {
               set_name = "Xia Empire"
               adjective = "Xia"
               set_title_flag = xia_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = qing_china
           }
           e_china = {
               set_name = "Qing Empire"
               adjective = "Qing"
               set_title_flag = qing_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = dai_china
           }
           e_china = {
               set_name = "Dai Empire"
               adjective = "Dai"
               set_title_flag = dai_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = cheng_china
           }
           e_china = {
               set_name = "Cheng Empire"
               adjective = "Cheng"
               set_title_flag = cheng_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = liang_china
           }
           e_china = {
               set_name = "Liang Empire"
               adjective = "Liang"
               set_title_flag = liang_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = song_china
           }
           e_china = {
               set_name = "Song Empire"
               adjective = "Song"
               set_title_flag = song_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = ming_china
           }
           e_china = {
               set_name = "Ming Empire"
               adjective = "Ming"
               set_title_flag = ming_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = shu_china
           }
           e_china = {
               set_name = "Shu Empire"
               adjective = "Shu"
               set_title_flag = shu_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = wu_china
           }
           e_china = {
               set_name = "Wu Empire"
               adjective = "Wu"
               set_title_flag = wu_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = chu_china
           }
           e_china = {
               set_name = "Chu Empire"
               adjective = "Chu"
               set_title_flag = chu_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = yue_china
           }
           e_china = {
               set_name = "Yue Empire"
               adjective = "Yue"
               set_title_flag = yue_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = yin_china
           }
           e_china = {
               set_name = "Yin Empire"
               adjective = "Yin"
               set_title_flag = yin_china
           }
       }
       if = {
           limit = {
               has_dynasty_flag = shun_china
           }
           e_china = {
               set_name = "Shun Empire"
               adjective = "Shun"
               set_title_flag = shun_china
           }
       }
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
   }
   
   # Please select new China name!
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           NOR = {
               has_character_flag = china_name_repeat_1
               has_character_flag = china_name_repeat_2
               has_character_flag = china_name_repeat_3
               has_character_flag = china_name_repeat_4
               has_character_flag = china_name_repeat_5
               has_character_flag = china_name_repeat_6
               has_character_flag = china_name_repeat_7
               has_character_flag = china_name_repeat_8
           }
           NOT = {
               e_china = {
                   has_title_flag = tang_china
               }
           }
       }
       
       name = EVTOPTB_NAMEOFCHINA_5 # Tang!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Tang Empire"
           adjective = "Tang"
           set_title_flag = tang_china
       }
       
       set_dynasty_flag = tang_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 30
           modifier = {
               factor = 3
               OR = {
                   culture = karluk
                   culture = turkish
               }
           }
       }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           NOR = {
               has_character_flag = china_name_repeat_1
               has_character_flag = china_name_repeat_2
               has_character_flag = china_name_repeat_3
               has_character_flag = china_name_repeat_4
               has_character_flag = china_name_repeat_5
               has_character_flag = china_name_repeat_6
               has_character_flag = china_name_repeat_7
               has_character_flag = china_name_repeat_8
           }
           NOT = {
               e_china = {
                   has_title_flag = jin_china
               }
           }
       }
       
       name = EVTOPTC_NAMEOFCHINA_5 # Jin!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Jin Empire"
           adjective = "Jin"
           set_title_flag = jin_china
       }
       
       set_dynasty_flag = jin_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 30
           modifier = {
               factor = 3
               OR = {
                   culture = karluk
                   culture = turkish
               }
           }
           modifier = {
               factor = 3
               culture = jurchen
           }
       }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           NOR = {
               has_character_flag = china_name_repeat_1
               has_character_flag = china_name_repeat_2
               has_character_flag = china_name_repeat_3
               has_character_flag = china_name_repeat_4
               has_character_flag = china_name_repeat_5
               has_character_flag = china_name_repeat_6
               has_character_flag = china_name_repeat_7
               has_character_flag = china_name_repeat_8
           }
           NOT = {
               e_china = {
                   has_title_flag = wei_china
               }
           }
       }
       
       name = EVTOPTD_NAMEOFCHINA_5 # Wei!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Wei Empire"
           adjective = "Wei"
           set_title_flag = wei_china
       }
       
       set_dynasty_flag = wei_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 20
       }
   }
   
   option = {
       trigger = {
           ai = no
           NOR = {
               has_character_flag = china_name_repeat_1
               has_character_flag = china_name_repeat_2
               has_character_flag = china_name_repeat_3
               has_character_flag = china_name_repeat_4
               has_character_flag = china_name_repeat_5
               has_character_flag = china_name_repeat_6
               has_character_flag = china_name_repeat_7
               has_character_flag = china_name_repeat_8
           }
       }
       name = EVTOPTE_NAMEOFCHINA_5 # More options!
       set_character_flag = china_name_repeat_1
       repeat_event = { id = nameofchina.5 }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_1
           }
           NOT = {
               e_china = {
                   has_title_flag = qi_china
               }
           }
       }
       
       name = EVTOPTF_NAMEOFCHINA_5 # Qi!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Qi Empire"
           adjective = "Qi"
           set_title_flag = qi_china
       }
       
       set_dynasty_flag =  qi_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 20
       }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_1
           }
           NOT = {
               e_china = {
                   has_title_flag = zhou_china
               }
           }
       }
       
       name = EVTOPTG_NAMEOFCHINA_5 # Zhou!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Zhou Empire"
           adjective = "Zhou"
           set_title_flag = qi_china
       }
       
       set_dynasty_flag =  zhou_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 30
       }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_1
           }
           NOT = {
               e_china = {
                   has_title_flag = han_china
               }
           }
       }
       
       name = EVTOPTH_NAMEOFCHINA_5 # Han!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Han Empire"
           adjective = "Han"
           set_title_flag = han_china
       }
       
       set_dynasty_flag =  han_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 30
           modifier = {
               factor = 3
               OR = {
                   culture = karluk
                   culture = turkish
               }
           }
       }
   }
   
   option = {
       trigger = {
           ai = no
           has_character_flag = china_name_repeat_1
       }
       name = EVTOPTE_NAMEOFCHINA_5 # More options!
       clr_character_flag = china_name_repeat_1
       set_character_flag = china_name_repeat_2
       repeat_event = { id = nameofchina.5 }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_2
           }
           NOT = {
               e_china = {
                   has_title_flag = qin_china
               }
           }
       }
       
       name = EVTOPTI_NAMEOFCHINA_5 # Qin!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Qin Empire"
           adjective = "Qin"
           set_title_flag = qin_china
       }
       
       set_dynasty_flag =  qin_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 30
       }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_2
           }
           NOT = {
               e_china = {
                   has_title_flag = yan_china
               }
           }
       }
       
       name = EVTOPTJ_NAMEOFCHINA_5 # Yan!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Yan Empire"
           adjective = "Yan"
           set_title_flag = yan_china
       }
       
       set_dynasty_flag =  yan_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 30
       }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_2
           }
           NOT = {
               e_china = {
                   has_title_flag = zhao_china
               }
           }
       }
       
       name = EVTOPTK_NAMEOFCHINA_5 # Zhao!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Zhao Empire"
           adjective = "Zhao"
           set_title_flag = zhao_china
       }
       
       set_dynasty_flag =  zhao_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 20
       }
   }
   
   option = {
       trigger = {
           ai = no
           has_character_flag = china_name_repeat_2
       }
       name = EVTOPTE_NAMEOFCHINA_5 # More options!
       clr_character_flag = china_name_repeat_2
       set_character_flag = china_name_repeat_3
       repeat_event = { id = nameofchina.5 }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_3
           }
           NOT = {
               e_china = {
                   has_title_flag = liao_china
               }
           }
       }
       
       name = EVTOPTL_NAMEOFCHINA_5 # Liao!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Liao Empire"
           adjective = "Liao"
           set_title_flag = liao_china
       }
       
       set_dynasty_flag =  liao_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 100
           modifier = {
               factor = 0
               NOT = {
                   culture = khitan
               }
           }
       }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_3
           }
           NOT = {
               e_china = {
                   has_title_flag = yuan_china
               }
           }
       }
       
       name = EVTOPTM_NAMEOFCHINA_5 # Yuan!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Yuan Empire"
           adjective = "Yuan"
           set_title_flag = yuan_china
       }
       
       set_dynasty_flag =  yuan_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 100
           modifier = {
               factor = 0
               NOT = {
                   culture = mongol
               }
           }
           modifier = { #more likely if Borjigin
               factor = 100
               OR = {
                   dynasty = 11100
                   dynasty = 1051210
               }
           }
       }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_3
           }
           NOT = {
               e_china = {
                   has_title_flag = xia_china
               }
           }
       }
       
       name = EVTOPTN_NAMEOFCHINA_5 # Xia!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Xia Empire"
           adjective = "Xia"
           set_title_flag = xia_china
       }
       
       set_dynasty_flag =  xia_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 100
           modifier = {
               factor = 0
               NOR = {
                   culture = tangut
                   culture = jurchen
               }
           }
       }
   }
   
   option = {
       trigger = {
           ai = no
           has_character_flag = china_name_repeat_3
       }
       name = EVTOPTE_NAMEOFCHINA_5 # More options!
       clr_character_flag = china_name_repeat_3
       set_character_flag = china_name_repeat_4
       repeat_event = { id = nameofchina.5 }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_4
           }
           NOT = {
               e_china = {
                   has_title_flag = qing_china
               }
           }
       }
       
       name = EVTOPTO_NAMEOFCHINA_5 # Qing!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Qing Empire"
           adjective = "Qing"
           set_title_flag = qing_china
       }
       
       set_dynasty_flag =  qing_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 60
           modifier = {
               factor = 0
               NOT = {
                   culture = jurchen
               }
           }
           modifier = {
               factor = 0.1
               NOT = {
                   year = 1200
               }
           }
       }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_4
           }
           NOT = {
               e_china = {
                   has_title_flag = dai_china
               }
           }
       }
       
       name = EVTOPTP_NAMEOFCHINA_5 # Dai!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Dai Empire"
           adjective = "Dai"
           set_title_flag = dai_china
       }
       
       set_dynasty_flag =  dai_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 10
       }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_4
           }
           NOT = {
               e_china = {
                   has_title_flag = cheng_china
               }
           }
       }
       
       name = EVTOPTQ_NAMEOFCHINA_5 # Cheng!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Cheng Empire"
           adjective = "Cheng"
           set_title_flag = cheng_china
       }
       
       set_dynasty_flag =  cheng_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 10
       }
   }
   
   option = {
       trigger = {
           ai = no
           has_character_flag = china_name_repeat_4
       }
       name = EVTOPTE_NAMEOFCHINA_5 # More options!
       clr_character_flag = china_name_repeat_4
       set_character_flag = china_name_repeat_5
       repeat_event = { id = nameofchina.5 }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_5
           }
           NOT = {
               e_china = {
                   has_title_flag = liang_china
               }
           }
       }
       
       name = EVTOPTR_NAMEOFCHINA_5 # Liang!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Liang Empire"
           adjective = "Liang"
           set_title_flag = liang_china
       }
       
       set_dynasty_flag =  liang_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 5
           modifier = {
               factor = 0
               NOT = {
                   culture_group = chinese_group
               }
           }
       }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_5
           }
           NOT = {
               e_china = {
                   has_title_flag = song_china
               }
           }
       }
       
       name = EVTOPTS_NAMEOFCHINA_5 # Song!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Song Empire"
           adjective = "Song"
           set_title_flag = song_china
       }
       
       set_dynasty_flag =  song_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 10
           modifier = {
               factor = 0
               NOT = {
                   culture_group = chinese_group
               }
           }
           modifier = {
               factor = 1000
               dynasty = 1000027500 #Zhào
           }
       }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_5
           }
           NOT = {
               e_china = {
                   has_title_flag = ming_china
               }
           }
       }
       
       name = EVTOPTT_NAMEOFCHINA_5 # Ming!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Ming Empire"
           adjective = "Ming"
           set_title_flag = ming_china
       }
       
       set_dynasty_flag =  ming_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 5
           modifier = {
               factor = 0
               NOT = {
                   culture_group = chinese_group
               }
           }
           modifier = {
               factor = 0.1
               NOT = {
                   year = 1200
               }
           }
       }
   }
   
   option = {
       trigger = {
           ai = no
           has_character_flag = china_name_repeat_5
       }
       name = EVTOPTE_NAMEOFCHINA_5 # More options!
       clr_character_flag = china_name_repeat_5
       set_character_flag = china_name_repeat_6
       repeat_event = { id = nameofchina.5 }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_6
           }
           NOT = {
               e_china = {
                   has_title_flag = shu_china
               }
           }
       }
       
       name = EVTOPTU_NAMEOFCHINA_5 # Shu!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Shu Empire"
           adjective = "Shu"
           set_title_flag = shu_china
       }
       
       set_dynasty_flag =  shu_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 5
           modifier = {
               factor = 0
               NOT = {
                   culture_group = chinese_group
               }
           }
       }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_6
           }
           NOT = {
               e_china = {
                   has_title_flag = wu_china
               }
           }
       }
       
       name = EVTOPTV_NAMEOFCHINA_5 # Wu!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Wu Empire"
           adjective = "Wu"
           set_title_flag = wu_china
       }
       
       set_dynasty_flag = wu_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 5
           modifier = {
               factor = 0
               NOT = {
                   culture_group = chinese_group
               }
           }
       }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_6
           }
           NOT = {
               e_china = {
                   has_title_flag = chu_china
               }
           }
       }
       
       name = EVTOPTW_NAMEOFCHINA_5 # Chu!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Chu Empire"
           adjective = "Chu"
           set_title_flag = chu_china
       }
       
       set_dynasty_flag =  chu_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 5
           modifier = {
               factor = 0
               NOT = {
                   culture_group = chinese_group
               }
           }
       }
   }
   
   option = {
       trigger = {
           ai = no
           has_character_flag = china_name_repeat_6
       }
       name = EVTOPTE_NAMEOFCHINA_5 # More options!
       clr_character_flag = china_name_repeat_6
       set_character_flag = china_name_repeat_7
       repeat_event = { id = nameofchina.5 }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_7
           }
           NOT = {
               e_china = {
                   has_title_flag = yue_china
               }
           }
       }
       
       name = EVTOPTX_NAMEOFCHINA_5 # Yue!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Yue Empire"
           adjective = "Yue"
           set_title_flag = yue_china
       }
       
       set_dynasty_flag =  yue_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 5
           modifier = {
               factor = 0
               NOT = {
                   culture_group = chinese_group
               }
           }
       }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_7
           }
           NOT = {
               e_china = {
                   has_title_flag = yin_china
               }
           }
       }
       
       name = EVTOPTY_NAMEOFCHINA_5 # Yin!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Yin Empire"
           adjective = "Yin"
           set_title_flag = yin_china
       }
       
       set_dynasty_flag = yin_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 3
           modifier = {
               factor = 0
               NOT = {
                   culture_group = chinese_group
               }
           }
       }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           OR = {
               ai = yes
               has_character_flag = china_name_repeat_7
           }
           NOT = {
               e_china = {
                   has_title_flag = shun_china
               }
           }
       }
       
       name = EVTOPTZ_NAMEOFCHINA_5 # Shun!
       
       e_china = {
           clr_title_flag = tang_china
           clr_title_flag = jin_china
           clr_title_flag = wei_china
           clr_title_flag = qi_china
           clr_title_flag = zhou_china
           clr_title_flag = han_china
           clr_title_flag = qin_china
           clr_title_flag = yan_china
           clr_title_flag = zhao_china
           clr_title_flag = liao_china
           clr_title_flag = yuan_china
           clr_title_flag = xia_china
           clr_title_flag = qing_china
           clr_title_flag = dai_china
           clr_title_flag = cheng_china
           clr_title_flag = liang_china
           clr_title_flag = song_china
           clr_title_flag = ming_china
           clr_title_flag = shu_china
           clr_title_flag = wu_china
           clr_title_flag = chu_china
           clr_title_flag = yue_china
           clr_title_flag = yin_china
           clr_title_flag = shun_china
       }
       
       e_china = {
           set_name = "Shun Empire"
           adjective = "Shun"
           set_title_flag = shun_china
       }
       
       set_dynasty_flag =  shun_china
       set_character_flag = new_china_name
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.7 }
       }
       
       ai_chance = {
           factor = 3
           modifier = {
               factor = 0
               NOT = {
                   culture_group = chinese_group
               }
           }
           modifier = {
               factor = 0.1
               NOT = {
                   year = 1200
               }
           }
       }
   }
   
   option = {
       trigger = {
           ai = no
           has_character_flag = china_name_repeat_7
       }
       name = EVTOPTE_NAMEOFCHINA_5 # More options!
       clr_character_flag = china_name_repeat_7
       set_character_flag = china_name_repeat_8
       repeat_event = { id = nameofchina.5 }
   }
   
   option = {
       trigger = {
           NOR = {
               has_dynasty_flag = tang_china
               has_dynasty_flag = jin_china
               has_dynasty_flag = wei_china
               has_dynasty_flag = qi_china
               has_dynasty_flag = zhou_china
               has_dynasty_flag = han_china
               has_dynasty_flag = qin_china
               has_dynasty_flag = yan_china
               has_dynasty_flag = zhao_china
               has_dynasty_flag = liao_china
               has_dynasty_flag = yuan_china
               has_dynasty_flag = xia_china
               has_dynasty_flag = qing_china
               has_dynasty_flag = dai_china
               has_dynasty_flag = cheng_china
               has_dynasty_flag = liang_china
               has_dynasty_flag = song_china
               has_dynasty_flag = ming_china
               has_dynasty_flag = shu_china
               has_dynasty_flag = wu_china
               has_dynasty_flag = chu_china
               has_dynasty_flag = yue_china
               has_dynasty_flag = yin_china
               has_dynasty_flag = shun_china
           }
           has_character_flag = china_name_repeat_8
       }
       
       name = EVTOPTAA_NAMEOFCHINA_5 # Keep using the existing dynasty name!
       
       hidden_tooltip = {
           character_event = { id = grace.999 } # Chinese princess (and Grace) update
       }
       
       if = {
           limit = {
               e_china = {
                   has_title_flag = tang_china
               }
           }
           set_dynasty_flag = tang_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = jin_china
               }
           }
           set_dynasty_flag = jin_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = wei_china
               }
           }
           set_dynasty_flag = wei_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = qi_china
               }
           }
           set_dynasty_flag = qi_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = han_china
               }
           }
           set_dynasty_flag = han_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = qin_china
               }
           }
           set_dynasty_flag = qin_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = yan_china
               }
           }
           set_dynasty_flag = yan_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = zhao_china
               }
           }
           set_dynasty_flag = zhao_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = liao_china
               }
           }
           set_dynasty_flag = liao_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = yuan_china
               }
           }
           set_dynasty_flag = yuan_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = xia_china
               }
           }
           set_dynasty_flag = xia_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = qing_china
               }
           }
           set_dynasty_flag = qing_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = dai_china
               }
           }
           set_dynasty_flag = dai_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = cheng_china
               }
           }
           set_dynasty_flag = cheng_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = liang_china
               }
           }
           set_dynasty_flag = liang_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = song_china
               }
           }
           set_dynasty_flag = song_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = ming_china
               }
           }
           set_dynasty_flag = ming_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = shu_china
               }
           }
           set_dynasty_flag = shu_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = wu_china
               }
           }
           set_dynasty_flag = wu_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = chu_china
               }
           }
           set_dynasty_flag = chu_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = yue_china
               }
           }
           set_dynasty_flag = yue_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = yin_china
               }
           }
           set_dynasty_flag = yin_china
       }
       if = {
           limit = {
               e_china = {
                   has_title_flag = shun_china
               }
           }
           set_dynasty_flag = shun_china
       }
       
       any_player = {
           limit = {
               OR = {
                   is_within_diplo_range = ROOT
                   any_realm_province = {
                       trade_route = silk_road
                   }
               }
               NOT = {
                   character = ROOT
               }
           }
           narrative_event = { id = nameofchina.6 }
       }
   }
   
   option = {
       trigger = {
           ai = no
           has_character_flag = china_name_repeat_8
       }
       name = EVTOPTE_NAMEOFCHINA_5 # More options! (Restart)
       clr_character_flag = china_name_repeat_8
       repeat_event = { id = nameofchina.5 }
   }
}

What is wrong, and how can I fix it?

Another, most likely related, problem I have noticed is that the dynasty flags do not appear to be set in the save file for any dynasty that the event fires for. Any idea what is up with that?
 
What would be the best way to check if the player's realm borders the European seas?

Either check for any realm province matching the ID of any coastal province in Europe, or check if any realm province borders any of the sea province IDs in Europe. The former likely requires more IDs in the check, but since you need to check all neighbours of all provinces in the realm in the second case it probably is more computationally expensive as realm size grows.
 
Hello

I'm sure this as probably been asked and answered numerous times but I couldn't find any mention of it when I searched.

I'm editing the culture file to create a custom culture and am creating my own name list. What i'm wondering is where you have two names joined by an _ will both names have a chance of showing up?

So for instance if I had "Robert_Bob" would both Robert and Bob have an equal chance of being used?

Thanks for any help!
 
What would be the best way to check if the player's realm borders the European seas?

Either check for any realm province matching the ID of any coastal province in Europe, or check if any realm province borders any of the sea province IDs in Europe. The former likely requires more IDs in the check, but since you need to check all neighbours of all provinces in the realm in the second case it probably is more computationally expensive as realm size grows.

Better to define a region in map/geographical_region.txt, including all the provinces you like. Then simply check any_realm_province = { region = your_region }. This should be *much* more efficient.