Event
Rise of Target Character2

With turmoil in Country, new men have risen against us, ready to claim the throne. One of them is Target Character2, an ambitious and intelligent noble, who stands in direct opposition to Target Character. he/she has amassed several supporters and now demands the throne.
SonghaiCountrydynamic historical event.tag
MonarchyGovernment Typetriggeralready_supports_rebel_variableVariableimmediatecurrent_ruler_power_variableVariableimmediateDefinitionin_game/events/DHE/flavor_son.txt:236
237type = country_event
239title = flavor_son.5.title Rise of Target Character2
240desc = flavor_son.5.desc With turmoil in Country, new men have risen against us, ready to claim the throne. One of them is Target Character2, an ambitious and intelligent noble, who stands in direct opposition to Target Character. he/she has amassed several supporters and now demands the throne.
241outcome = neutral
242historical_info = flavor_son.5.historical_info The reign of Askia 'the Great' is regarded as the start of the Songhai Empire. While serving as a general of Sonni Ali, he frequently clashed against him, most likely due to their religious differences, and their treatment of the 'Ulamā' in Timbuktu. After Sonni Ali's death though, he launched a successful coup against his son, using the influence of those that were persecuted in Songhai to create his power base.
244illustration_tags = {
24510 = armed
24610 = interior
}
249fire_only_once = yes
257immediate = {
}
260ruler_or_regent ?= {
261save_scope_as = target_character
}
264location:gao = {
265create_dynasty_from_location = askia_dynasty
}
268create_character = {
269first_name = name_muhammad
270last_name = askia
271birth_date = 1420.6.1
272culture = root.culture
273birth_location = root.capital
274save_scope_as = target_character2
276dynasty = dynasty:askia_dynasty
}
279create_rebel = {
280category = pretender
281name = askia_rebels Muḥammad Askia's Rebellion
282save_scope_as = target_rebel
}
285set_variable = {
287value = {
288add = {
289value = "estate_power(estate_type:crown_estate)"
290multiply = 5
}
292add = {
293value = government_power
294divide = 2
}
}
}
302if = {
306while = {
308ordered_owned_location = {
313order_by = {
314value = population
315multiply = -1
}
317max = 1
318owner = {
}
332every_pop = {
333limit = {
334owner = root
}
337change_pop_allegiance = scope:target_rebel
}
}
}
}
342else = {
}
347scope:target_character2 = {
348change_character_allegiance = scope:target_rebel
}
}