Event
The Culling of the Sons of Old Ruler
The tradition of our people expects that only the best suited and more capable are the ones to rise to the throne, no matter the way they achieve it. This usually means that the sons of the old Ruler Title will kill each other until only one is left to rule unopposed.
But due to the waves of fate, all the remaining sons of Old Ruler are underage and unfit to rule
Definitionin_game/events/government/succession.txt:3
4type = country_event
6title = {
7first_valid = {
8triggered_desc = {
9trigger = {
10exists = scope:old_ruler
}
12desc = succession.1.title The Culling of the Sons of Old Ruler
}
14triggered_desc = {
15trigger = {
16NOT = {
16exists = scope:old_ruler
}
}
18desc = succession.1.title_fallback The Culling of the Sons
}
}
}
22desc = {
23first_valid = {
24triggered_desc = {
25trigger = {
28list_size = {
28name = rival_sons_list Number of Rival Sons
28value >= 2
}
30list_size = {
30name = adult_rival_sons_list Number of Adult Rival Sons
30value = 0
}
}
32desc = succession.1.desc.c The tradition of our people expects that only the best suited and more capable are the ones to rise to the throne, no matter the way they achieve it. This usually means that the sons of the old Ruler Title will kill each other until only one is left to rule unopposed.
But due to the waves of fate, all the remaining sons of Old Ruler are underage and unfit to rule
But due to the waves of fate, all the remaining sons of Old Ruler are underage and unfit to rule
}
34triggered_desc = {
35trigger = {
38list_size = {
38name = rival_sons_list Number of Rival Sons
38value >= 2
}
40list_size = {
40name = adult_rival_sons_list Number of Adult Rival Sons
40value >= 1
}
}
42desc = succession.1.desc.a The tradition of our people expects that only the best suited and more capable are the ones to rise to the throne, no matter the way they achieve it. This usually means that the sons of the old Ruler Title will kill each other until only one is left to rule unopposed.We are getting news that Killer has managed to eliminate Victim by having his men strangle him, in this way he has followed tradition and removed a dangerous rival without shedding kin's blood.
}
45triggered_desc = {
46desc = succession.1.desc.b The tradition of our people expects that only the best suited and more capable are the ones to rise to the throne, no matter the way they achieve it. This usually means that the sons of the old Ruler Title will kill each other until only one is left to rule unopposed.We are getting news that Killer has managed to eliminate Victim by having his men strangle him, in this way he has followed tradition and removed a dangerous rival without shedding kin's blood.
Finally Killer has become the last descendant of Old Ruler and is about to take back control of the Country
Finally Killer has become the last descendant of Old Ruler and is about to take back control of the Country
}
}
}
50outcome = neutral
52immediate = {
54every_in_list = {
55list = rival_sons_list Number of Rival Sons
56remove_from_list = rival_sons_list Number of Rival Sons
}
59every_in_list = {
60list = rival_sons_list Number of Rival Sons
61remove_from_list = adult_rival_sons_list Number of Adult Rival Sons
}
65previous_ruler ?= {
66save_scope_as = old_ruler
67every_child = {
68limit = {
69is_alive = yes
70is_female = no
}
72add_to_list = rival_sons_list Number of Rival Sons
}
75every_child = {
76limit = {
77is_alive = yes
78is_adult = yes
79is_female = no
}
81add_to_list = adult_rival_sons_list Number of Adult Rival Sons
}
}
86if = {
87limit = {
90list_size = {
90name = rival_sons_list Number of Rival Sons
90value >= 2
}
92list_size = {
92name = adult_rival_sons_list Number of Adult Rival Sons
92value = 0
}
}
95if = {
96limit = {
97previous_ruler = {
98save_temporary_scope_as = check
99dynasty = {
100any_character_in_dynasty = {
101is_alive = yes
102is_female = no
103is_adult = yes
104not = {
104this = scope:check
}
105is_close_relative = scope:check
}
}
}
}
111previous_ruler = {
112save_temporary_scope_as = check
113dynasty = {
114random_character_in_dynasty = {
115limit = {
116is_alive = yes
117is_female = no
118is_adult = yes
119not = {
119this = scope:check
}
120is_close_relative = scope:check
}
}
}
124save_scope_as = dynastyc_succesor_scope
}
}
129else_if = {
130limit = {
131previous_ruler = {
132save_temporary_scope_as = check
133dynasty = {
134any_character_in_dynasty = {
135is_alive = yes
136is_female = no
137is_adult = yes
138not = {
138this = scope:check
}
}
}
}
}
144previous_ruler = {
145save_temporary_scope_as = check
146dynasty = {
147random_character_in_dynasty = {
148limit = {
149is_alive = yes
150is_female = no
151is_adult = yes
152not = {
152this = scope:check
}
}
}
}
156save_scope_as = dynastyc_succesor_scope
}
}
}
161else_if = {
162limit = {
164list_size = {
164name = rival_sons_list Number of Rival Sons
164value >= 2
}
166list_size = {
166name = adult_rival_sons_list Number of Adult Rival Sons
166value >= 1
}
}
170random_in_list = {
171list = adult_rival_sons_list Number of Adult Rival Sons
172save_scope_as = fist_son_scope
}
175random_in_list = {
176list = rival_sons_list Number of Rival Sons
177limit = {
178this != scope:fist_son_scope
}
180save_scope_as = second_son_scope
}
184set_variable = {
186value = {
187add = {
188value = scope:fist_son_scope.mil
189multiply = 1.5
}
191add = {
192value = scope:fist_son_scope.dip
193multiply = 1.5
}
195add = {
196value = random_integer
197modulo = 20
}
199if = {
200limit = {
200scope:fist_son_scope = {
200is_adult = yes
}
}
201add = 100
}
}
}
205set_variable = {
207value = {
208add = {
209value = scope:second_son_scope.mil
210multiply = 1.5
}
212add = {
213value = scope:second_son_scope.dip
214multiply = 1.5
}
216add = {
217value = random_integer
218modulo = 20
}
220if = {
221limit = {
221scope:second_son_scope = {
221is_adult = yes
}
}
222add = 100
}
}
}
226if = {
230scope:fist_son_scope = {
231save_scope_as = killer_scope
}
233scope:second_son_scope = {
234save_scope_as = victim_scope
235remove_from_list = rival_sons_list Number of Rival Sons
236remove_from_list = adult_rival_sons_list Number of Adult Rival Sons
}
}
239else = {
240scope:fist_son_scope = {
241save_scope_as = victim_scope
242remove_from_list = rival_sons_list Number of Rival Sons
243remove_from_list = adult_rival_sons_list Number of Adult Rival Sons
}
245scope:second_son_scope = {
246save_scope_as = killer_scope
}
}
252scope:victim_scope ?= {
253kill_character = {
254target = this
255reason = strangling
256killer = scope:killer_scope
}
}
}
261else = {
262random_in_list = {
263list = adult_rival_sons_list Number of Adult Rival Sons
264save_scope_as = killer_scope
}
}
}