There are many possibilities how to design it. For the start, have a look at the two on_actions "on_character_death" and "on_new_ruler". The first one would be the on_action you are searching for: each time a ruler dies, an event will trigger under certain circumstances, like, having the right variable (habsburg) or being the ruler of the right country (AUS, KUK). Just have a look at the file under "on_character_death" as an example how the event is triggered for Hawaii if the ruler dies. In this case, you won't need to kill the character yourself.
Considering the Meji-example, I think you may take inspiration by the election events in republics in EUIV when a ruler dies. However, you may hide a random list of different names with an equally high chance to get one of them, each with typical habsburg names like Franz, Ferdinand or Josef.
Actually, a follow-up. I wrote this, commented out for now in the file before it is ready for deployment. I have not yet added other
create_character
under
random_list
, as I wanted to get your input on this first before I go further with this.
Code:
# Root = Character
on_new_ruler = {
# if = {
# limit = {
# exists = c:AUS
# owner = c:AUS
# owner = {
# has_law = law_type:law_monarchy
# }
# NOR = {
# has_variable = lg-Var-Habsburg_ruler
# has_variable = lg-Var-Habsburg_heir
# }
# }
# random_list = {
# 20 = {
# create_character = {
# first_name = Franz_Josef
# last_name = von_Habsburg
# heir = yes
# noble = yes
# birth_date = 1830.8.18
# interest_group = ig_landowners
# ideology = ideology_moderate
# traits = {
# cautious
# }
# on_created = {
# set_variable = lg-Var-Habsburg_ruler
# }
# }
# }
# }
# }
}
But I am unclear what you mean exactly by
random_list
. I am assuming you meant like what I did above. Or do you mean putting
random_list
under first_name? For example:
Code:
create_character = {
first_name = {
random_list = {
20 = Franz_Josef
20 = Franz
}
}
last_name = von_Habsburg
heir = yes
noble = yes
birth_date = 1830.8.18
interest_group = ig_landowners
ideology = ideology_moderate
traits = {
cautious
}
on_created = {
set_variable = lg-Var-Habsburg_heir
}
}
Somehow, I doubt
random_list
would work that deep. I am fairly certain that, at best, the opening for
random_list
can only be placed above the create_character section.
However, digging further, it looks like you might potentially be able to specify more than one values for
first_name
as it seems to be suggested in
/game/events/test_events.txt
as shown here:
Code:
#test.61 = {
# type = country_event
# title = "Test create character effect"
# duration = 10
#
# option = {
# name = "Create Erwin"
# highlighted_option = yes
# show_as_unavailable = { always = yes }
#
# create_character = {
# #role = politician # Remove this line
# first_name = "Erwin" # "August" "Erwin"
# last_name = "Vogel_von_Falkenstein" # "von_Alten" "Vogel_von_Falkenstein"
# ruler = yes
# age = 42
# interest_group = ig:ig_rural_folk
# ideology = ideology_traditionalist
# culture = cu:brazilian
# religion = rel:theravada
# traits = {
# reserved
# }
# }
# }
#
# option = {
# name = "CANCEL"
# default_option = yes
# }
#
#}
Interesting. Since this is a test event that had been commented out, though, there is no guarantee this would work but it may be worth a try and see if it works. It may or may not achieve the desirable outcome.
However, I should also note that there is another
#
between first and second
first_name
/
last_name
values in this text. So this probably does not mean that
first_name
/
last_name
can take multiple values at all.
One other thing I wonder is whether it is possible to set a range for
age
. Otherwise, I will have to set the age somewhere above 18. Sure would not want an underage ruler for a Habsburg Restoration. That would be.... odd. ;P