On ActionChanged this version
on_new_ruler
root = country; scope:old_ruler and scope:new_ruler are supplied
CastileCountryeffect
RomeCountryeffect
PortugalCountryeffect
Guelphs and GhibellinesSituationeffect
Nanbokuchō JidaiSituationeffectAppointed HeirStatic ModifiereffectPretender to the ThroneStatic ModifiereffectErraticStatic ModifiereffectPlotting a RebellionStatic Modifiereffect
AppanageSubject Typeeffectchoosing_new_pretenderVariableeffectfavored_heirVariableeffectDefinitionin_game/common/on_action/_hardcoded.txt:3248
3249events = {
3261delay = {
3261days = {
30
80
}
}
}
3274effect = {
3276if = {
3277limit = {
3278has_game_rule = ai_personalities_random_per_ruler
3279is_ai = yes
}
3281random_list = {
32821 = {
3282set_personality = ai_personality:ai_aggressive
}
32831 = {
3283set_personality = ai_personality:ai_expansionist
}
32841 = {
3284set_personality = ai_personality:ai_defensive
}
32851 = {
3285set_personality = ai_personality:ai_cautious
}
32861 = {
3286set_personality = ai_personality:ai_opportunistic
}
32871 = {
3287set_personality = ai_personality:ai_isolationist
}
32881 = {
3288set_personality = ai_personality:ai_friendly
}
}
}
3293if = {
}
3297if = {
}
3306if = {
3307limit = {
3308exists = scope:new_ruler
}
}
3321if = {
3322limit = {
3323root = {
3324has_game_rule = change_countries_dynastic_naming
3325OR = {
3326has_reform = government_reform:japanese_imperial_family
3327has_reform = government_reform:japanese_clan
3328has_reform = government_reform:shogunate
3329has_reform = government_reform:daimyo
}
3331has_regent = no
}
3333scope:old_ruler ?= {
3334has_dynasty = yes
3337scope:new_ruler ?= {
3338OR = {
3339has_dynasty = no
3340dynasty != scope:old_ruler.dynasty
}
3342trigger_if = {
3343limit = {
3344dynasty ?= dynasty:yamato_dynasty
}
}
}
}
3351NAND = {
3352is_subject = yes
3353overlord ?= {
3354ruler ?= {
3355this = scope:new_ruler
}
}
}
3360NOT = {
3361any_union_partner = {
3362ruler ?= {
3363this = scope:new_ruler
}
}
}
}
3368if = {
3372change_country_dynastic_name = {
}
}
}
3378if = {
3379limit = {
3379scope:new_ruler = {
}
}
}
3382if = {
}
3386if = {
3387limit = {
3388exists = scope:new_ruler
3390capital ?= {
3391region = region:italy_region
}
}
3397scope:new_ruler = {
3398random_list = {
33991 = {
3399add_character_modifier = {
}
}
34001 = {
3400add_character_modifier = {
}
}
34011 = {
}
}
}
}
3405if = {
3406limit = {
3409dynasty_exists = avis_dynasty
3410scope:new_ruler = {
3411dynasty ?= dynasty:avis_dynasty
}
3413scope:old_ruler = {
3414NOT = {
3415dynasty ?= dynasty:avis_dynasty
}
}
3418OR = {
}
}
}
3429scope:new_ruler = {
3430if = {
}
}
3435if = {
}
}