• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

ourg

Captain
Oct 29, 2019
403
1.418

Information​

I have verifed my game files (Steam only)​

Yes

I have disabled all mods​

Yes

I am running the latest game update​

Yes

Required​

Summary​

the kurultai succession UI show wrong number and chwrong character list

Description​

the kurultai succession ui that display obedient and disobedient sometime doesn't show the right number and character, expecially when some child are out of the realm

Steps to reproduce​

Get child out of realm and look at number , as you can see on the number the succession is stable but the ui says one is opposing

Game Version​

1.16.2.2

Platform​

Windows

Additional Information​

Affected Feature​

  • Interface

Save Game​



Other Attachments​

20250603111716_1.jpg

 
Upvote 0
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
 
I've also achieved to fix the character portrait list :

I've created a scripted gui to create the list :

Perl:
fix_kurultai_succession_character_list_gui = {
    scope = character

    effect = {
        clear_variable_list = fix_kurultai_succession_character_list
        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
                }
            }
            root = {
                add_to_variable_list = {
                    name = fix_kurultai_succession_character_list
                    target = prev
                }
            }
        }
        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
                            }
                        }
                        root = {
                            add_to_variable_list = {
                                name = fix_kurultai_succession_character_list
                                target = this
                            }
                        }
                    }
                }
            }
            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
                            }
                        }
                        root = {
                            add_to_variable_list = {
                                name = fix_kurultai_succession_character_list
                                target = prev
                            }
                        }
                    }
                }
            }
            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
                            }
                        }
                        root = {
                            add_to_variable_list = {
                                name = fix_kurultai_succession_character_list
                                target = prev
                            }
                        }
                    }
                }
            }
            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
                            }
                        }
                        root = {
                            add_to_variable_list = {
                                name = fix_kurultai_succession_character_list
                                target = prev
                            }
                        }
                    }
                }
            }
            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
                            }
                        }
                        root = {
                            add_to_variable_list = {
                                name = fix_kurultai_succession_character_list
                                target = prev
                            }
                        }
                    }
                }
            }
        }
    }
}


In the gui my_realm_window, i've set the effect on the on_clik for the succession button tab :

Perl:
### BOOKMARK TAB SUCCESSION
            button_tab_vertical_bookmark = {
                name = "tutorial_highlight_succession_tab"
                down = "[GetVariableSystem.Exists( 'bookmark_succession' )]"

                blockoverride "tab_button"
                {
                    onclick = "[GetVariableSystem.Clear( 'bookmark_domain' )]"
                    onclick = "[GetVariableSystem.Clear( 'bookmark_subjects' )]"
                    onclick = "[GetVariableSystem.Set( 'bookmark_succession', 'true' )]"
                    onclick = "[GetVariableSystem.Clear( 'bookmark_laws' )]"
                    onclick = "[MyRealmWindow.SetActiveTab( 'bookmark_succession' )]"
                    onclick = "[GetScriptedGui('fix_kurultai_succession_character_list_gui').Execute( GuiScope.SetRoot( GetPlayer.MakeScope ).End )]"

                    tooltip = "MY_REALM_WINDOW_BOOKMARK_SUCCESSION_TT"
                }
......


Then modified the datamodel for the list :

Perl:
type vbox_kurultai_group_foldout = vbox {
        layoutpolicy_horizontal = expanding
        margin = { 10 0 }

        oncreate = "[BindFoldOutContext]"
        oncreate = "[PdxGuiFoldOut.Unfold]"

        button_expandable_toggle_field = {
            blockoverride "text"
            {
                text = "MY_REALM_WINDOW_KURULTAI_ELECTORS"
                max_width = 510
            }
        }

        vbox = {
            visible = "[PdxGuiFoldOut.IsUnfolded]"
            layoutpolicy_horizontal = expanding
            margin_bottom = 5
         
            fixedgridbox = {
                layoutpolicy_horizontal = expanding
                layoutpolicy_vertical = expanding

                addcolumn = 85
                addrow = 90
                setitemsizefromcell = yes
                datamodel_wrap = 6
                flipdirection = yes

                datamodel = "[GetPlayer.MakeScope.GetList('fix_kurultai_succession_character_list')]"

                item = {
                    portrait_head_small = {
                        datacontext = "[Scope.Char]"  ### modif
                        blockoverride "glow_visible"
                        {
                            visible = no
                        }
                    }
                }
            }
        }
    }

now the gui work as intended.

I've made a mod : https://steamcommunity.com/sharedfiles/filedetails/?id=3492630131
 
Last edited: