Group Leaders By Civilization

If you liked this item, please rate it up on Steam Workshop page.

Author: Dazz Aephiex

Last revision: 18 May, 2021 at 14:30 UTC

File size: 3.07 KB

On Steam Workshop

Description:

It always annoyed me that leaders of the same civ are scattered all around. They need to be grouped together based on their civ, I think.

Sort leaders in leader selection view by their civilizations, to make sure leaders of the same civilizations will be placed near each other.

Mod added civilizations and leaders will be supported too.

It’s a complicated sql, but I confirmed that it works.

UPDATE Players SET SortIndex = ( SELECT SortIndex * 100 FROM ( SELECT Domain, CivilizationIcon, ( SELECT 1 + COUNT(*) FROM Players c WHERE b.Domain=c.Domain AND b.CivilizationIcon > c.CivilizationIcon ) AS SortIndex FROM Players b GROUP BY Domain, CivilizationIcon ) t0 WHERE t0.Domain=Players.Domain AND t0.CivilizationIcon=Players.CivilizationIcon );

All civ & leader combinations will first be sorted by civilization icon, and then leader, by alphabet order respectively. Note that these are sorted by data tags, not localization texts.

The vanilla multi-civ leaders Eleanor and Kublai are sorted below mono-civ leaders of their respective civ, regardless of alphabet order. For example. Eleanor of England is sorted beneath Victoria. This is the only exception of the rule.