The succession seems to work corretly, just the number and character list is wrong on the ui, that could be disturbing.
I've fixed the progress bar and numbers displayed on each side :
I've set scripted value :
For the max number of character count in the succession (for the progress bar) :
Perl:
fix_succession_mpo_current_max_kurultai_value = {
value = 4
switch = {
trigger = has_realm_law
nomadic_authority_5 = {
ordered_child = {
order_by = age
max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_5
check_range_bounds = no
limit = {
age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE
obedience_target = root
}
if = {
limit = {
NOR = {
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
}
add = 1
}
}
}
nomadic_authority_4 = {
ordered_child = {
order_by = age
max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_4
check_range_bounds = no
limit = {
age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE
obedience_target = root
}
if = {
limit = {
NOR = {
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
}
add = 1
}
}
}
nomadic_authority_3 = {
ordered_child = {
order_by = age
max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_3
check_range_bounds = no
limit = {
age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE
obedience_target = root
}
if = {
limit = {
NOR = {
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
}
add = 1
}
}
}
nomadic_authority_2 = {
ordered_child = {
order_by = age
max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_2
check_range_bounds = no
limit = {
age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE
obedience_target = root
}
if = {
limit = {
NOR = {
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
}
add = 1
}
}
}
nomadic_authority_1 = {
ordered_child = {
order_by = age
max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_1
check_range_bounds = no
limit = {
age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE
obedience_target = root
}
if = {
limit = {
NOR = {
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
}
add = 1
}
}
}
}
}
the current number of obedient in the elector list :
Perl:
fix_succession_mpo_current_obedient_kurultai_value = {
value = 0
every_councillor = {
limit = {
OR = {
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
is_obedient = yes
}
add = 1
}
switch = {
trigger = has_realm_law
nomadic_authority_5 = {
ordered_child = {
order_by = age
max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_5
check_range_bounds = no
limit = {
age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE
obedience_target = root
}
if = {
limit = {
is_obedient_to = root
NOR = {
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
}
add = 1
}
}
}
nomadic_authority_4 = {
ordered_child = {
order_by = age
max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_4
check_range_bounds = no
limit = {
age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE
obedience_target = root
}
if = {
limit = {
is_obedient_to = root
NOR = {
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
}
add = 1
}
}
}
nomadic_authority_3 = {
ordered_child = {
order_by = age
max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_3
check_range_bounds = no
limit = {
age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE
obedience_target = root
}
if = {
limit = {
is_obedient_to = root
NOR = {
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
}
add = 1
}
}
}
nomadic_authority_2 = {
ordered_child = {
order_by = age
max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_2
check_range_bounds = no
limit = {
age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE
obedience_target = root
}
if = {
limit = {
is_obedient_to = root
NOR = {
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
}
add = 1
}
}
}
nomadic_authority_1 = {
ordered_child = {
order_by = age
max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_1
check_range_bounds = no
limit = {
age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE
obedience_target = root
}
if = {
limit = {
is_obedient_to = root
NOR = {
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
}
add = 1
}
}
}
}
}
the current number of disobedient in the elector list :
Perl:
fix_succession_mpo_current_disobedient_kurultai_value = {
value = 0
every_councillor = {
limit = {
OR = {
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
is_obedient = no
}
add = 1
}
if = {
limit = {
NOT = { exists = root.cp:councillor_kurultai_1 }
}
add = 1
}
if = {
limit = {
NOT = { exists = root.cp:councillor_kurultai_2 }
}
add = 1
}
if = {
limit = {
NOT = { exists = root.cp:councillor_kurultai_3 }
}
add = 1
}
if = {
limit = {
NOT = { exists = root.cp:councillor_kurultai_4 }
}
add = 1
}
switch = {
trigger = has_realm_law
nomadic_authority_5 = {
ordered_child = {
order_by = age
max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_5
check_range_bounds = no
limit = {
age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE
obedience_target = root
}
if = {
limit = {
NOR = {
is_obedient_to = root
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
}
add = 1
}
}
}
nomadic_authority_4 = {
ordered_child = {
order_by = age
max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_4
check_range_bounds = no
limit = {
age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE
obedience_target = root
}
if = {
limit = {
NOR = {
is_obedient_to = root
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
}
add = 1
}
}
}
nomadic_authority_3 = {
ordered_child = {
order_by = age
max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_3
check_range_bounds = no
limit = {
age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE
obedience_target = root
}
if = {
limit = {
NOR = {
is_obedient_to = root
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
}
add = 1
}
}
}
nomadic_authority_2 = {
ordered_child = {
order_by = age
max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_2
check_range_bounds = no
limit = {
age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE
obedience_target = root
}
if = {
limit = {
NOR = {
is_obedient_to = root
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
}
add = 1
}
}
}
nomadic_authority_1 = {
ordered_child = {
order_by = age
max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_1
check_range_bounds = no
limit = {
age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE
obedience_target = root
}
if = {
limit = {
NOR = {
is_obedient_to = root
root.cp:councillor_kurultai_1 ?= this
root.cp:councillor_kurultai_2 ?= this
root.cp:councillor_kurultai_3 ?= this
root.cp:councillor_kurultai_4 ?= this
}
}
add = 1
}
}
}
}
}
the in gui/window_my_realm.gui
I've modified the max and value of the progressbar_standard for ### KURULTAI PROGRESS BAR :
Perl:
max = "[GetPlayer.MakeScope.ScriptValue( 'fix_succession_mpo_current_max_kurultai_value' )]"
value = "[GetPlayer.MakeScope.ScriptValue( 'fix_succession_mpo_current_obedient_kurultai_value' )]"
and modified the localization for the number opposes and approves in localization/english/my_realm_window_I_english.yml
Perl:
MY_REALM_WINDOW_KURULTAI_APPROVES: "[GetPlayer.MakeScope.ScriptValue('fix_succession_mpo_current_obedient_kurultai_value')] Approves"
MY_REALM_WINDOW_KURULTAI_OPPOSES: "[GetPlayer.MakeScope.ScriptValue('fix_succession_mpo_current_disobedient_kurultai_value')] #X Opposes#!"
now it correctly display.
but for the character list I'don't fix it's possible via modding because it's hardcoded