[1.0.0.56] the score panel is not sorted

slightlycynical

Chieftain
Joined
Jan 11, 2017
Messages
6
The score panel is not ordered by score but by id (inconvenient and stupid).

INB4 the are never going to fix this, the fix works like this:

Fixed version of the function "ViewScore()" in "Sid Meier's Civilization VI\Base\Assets\UI\PartialScreens\WorldRankings.lua" (line 788)
Code:
function ViewScore()
    ResetState(ViewScore);
    Controls.ScoreView:SetHide(false);

    ChangeActiveHeader("VICTORY_SCORE", m_GenericHeaderIM, Controls.ScoreViewHeader);
    local subTitle:string = Locale.Lookup("LOC_WORLD_RANKINGS_SCORE_CONDITION", Game.GetMaxGameTurns());
    PopulateGenericHeader(RealizeScoreStackSize, SCORE_TITLE, subTitle, SCORE_DETAILS, ICON_GENERIC);

    m_ScoreIM:ResetInstances();

    local playersScore = {};
    for i = 0, PlayerManager.GetWasEverAliveCount() - 1 do
        local pPlayer = Players;
        if (pPlayer:IsAlive() == true and pPlayer:IsMajor() == true) then
            table.insert(playersScore, pPlayer);
        end
    end
    -- Sort players by Score, including tiebreaker
    table.sort(playersScore, function(a, b)
        local aScore = a:GetScore();
        local bScore = b:GetScore();
        if aScore == bScore then
            return a:GetID() < b:GetID(); -- lower id first
        end
        return aScore > bScore; -- higher score first
    end);
    for _, scoringPlayer in pairs(playersScore) do
        PopulateScoreInstance(m_ScoreIM:GetInstance(), scoringPlayer);
    end

    RealizeScoreStackSize();
end

edit: code-tags eingebaut
 
Last edited:
Are you referring to the Victory Panel or the Score tab WITHIN the Victory Panel?

Throughout my 1st .56 game there WAS NO Score tab (where you could click a checkbox and get an itemization of the scores).
I miss the Score tab. :cry:

EDIT: In my 2nd game my Score tab returned. :)
 
Last edited:
I meant the tab 'score' on the 'World rankings' panel in game. (the screenshot shows my fixed version)
 

Attachments

  • civ6-world_rankings-score.jpg
    civ6-world_rankings-score.jpg
    482.9 KB · Views: 102
Yes, this is a serious oversight. (Especially considering they had an obvious template in CiV.) And not a bug, since there's no coding error.
 
huh? of course is missing code a bug.

an unsorted score board is indeed so broken, no one sell/delivers/designs them like that.
 
Back
Top Bottom