Resource Re-sorts

Resource Re-sorts 2.0.1

beezany

Trixie
Joined
Jan 4, 2009
Messages
737
Location
San Jose, CA

better resource screen organization
re-sorts-sorting.png

new sorting options for the resource allocation screen​

  • sort settlements by name, yield, or total resource slots
  • easily change sort order and direction
  • optionally separate cities and towns
each settlement also shows local conditions that affect resource bonuses, like Distant Lands in the Exploration age, or Port, Rail Station, and Factory buildings in the Modern age.

re-sorts-exploration.jpg

localization​

the mod is language-independent during play.
only the menu screens (Mods and Options) contain localized text.

supported languages:
  • French (translated by Somchai2548)
  • German (translated by Chr1Z93)
  • Italian (translated by leonardfactory)
  • Korean (translated by Hotsolidinfill)
thank you all for your help!
 
Last edited:
Another bz-mod! I'm trying this out now, just wanted to say that IMO your mods are the most consistently high-quality and most frequently updated on this site. I particularly appreciate that you break them out into components so one can pick and choose if they wish (even though I use them all). Thank you for improving the game so much!
 
I love your mod! I mainly wanted a mod like this for the sorting of resources and settlements. All the rest is nice-to-have fluff, but I prefer a mod that doesn't overwrite game files. So yours it is now :-)

One very tiny issue: some settlements names (or at least one) start with a lowercase letter, meaning they sort behind all uppercase settlements. I have a town called al-Fustāt, which shows in the resource allocation windows as AL-FUSTĀT but sorts at the bottom.
 
I love your mod! I mainly wanted a mod like this for the sorting of resources and settlements. All the rest is nice-to-have fluff, but I prefer a mod that doesn't overwrite game files. So yours it is now :-)

One very tiny issue: some settlements names (or at least one) start with a lowercase letter, meaning they sort behind all uppercase settlements. I have a town called al-Fustāt, which shows in the resource allocation windows as AL-FUSTĀT but sorts at the bottom.
ooh! thanks for the tip! i thought that using localeCompare would avoid that problem, but it requires some configuration that i'm looking into now. sorting and localization are passions of mine.
 
ooh! thanks for the tip! i thought that using localeCompare would avoid that problem, but it requires some configuration that i'm looking into now. sorting and localization are passions of mine.
I don't know much about Javascript, but is there a standard case-insensitive sorting method?

Edit: What I read is no case-insensitive sorting, but using .toUpperCase() while comparing seems to be the go to solution.
 
Last edited:
I don't know much about Javascript, but is there a standard case-insensitive sorting method?

Edit: What I read is no case-insensitive sorting, but using .toUpperCase() while comparing seems to be the go to solution.
there are options for different kinds of sensitivity in the Intl.Collator module. it looks like the default is variant which splits differences on base character, accents, and case. probably i want to change that to base sensitivity, which ignores differences in case & accent (except for certain special cases where an accent changes the base character). about to test whether the game engine supports all that.
 
the game engine doesn't seem to support the Intl.Collator options, so i'm doing it the hacky way with .toUpperCase() instead. that has some corner cases that don't work as well as a standard case-folding algorithm, but it'll at least work for the German ß=SS equivalence. i'm putting together a bugfix release now.
 
I love your mod! I mainly wanted a mod like this for the sorting of resources and settlements. All the rest is nice-to-have fluff, but I prefer a mod that doesn't overwrite game files. So yours it is now :-)

One very tiny issue: some settlements names (or at least one) start with a lowercase letter, meaning they sort behind all uppercase settlements. I have a town called al-Fustāt, which shows in the resource allocation windows as AL-FUSTĀT but sorts at the bottom.
new version should fix your problem, but i don't have a test case to verify. (if you're on Discord, you can say hi on the official Civ server and send me a saved game for future testing.)
 
new version should fix your problem, but i don't have a test case to verify. (if you're on Discord, you can say hi on the official Civ server and send me a saved game for future testing.)
It does fix the sorting, thanks!

I have a Discord account but hardly use it. Discord confuses and overwhelms me, as if I'm stepping into a room full of people all talking with everyone else at the same time. I'm too old (fashioned) for that, I guess. I prefer good old nineties-like forums like this (note to moderators: no offense :cool:).

I've attached a save with al-Fustāt in it.
 

Attachments

Amazing, wish the steam workshop was out so I could give more than just a thumbs up to this!
 
A really useful mod for keeping order on the resource screen. I'm looking forward to the patch allowing the renaming of cities, as then I can mark cities in the new world respectively those with a train station. Ideally, small icons behind the city name would give that info, but that's probably out of the range of modding.
 
A really useful mod for keeping order on the resource screen. I'm looking forward to the patch allowing the renaming of cities, as then I can mark cities in the new world respectively those with a train station. Ideally, small icons behind the city name would give that info, but that's probably out of the range of modding.
oh that's a cool idea!

if you like renaming cities for thematic/cultural reasons, i recommend the People Just Liked It Better That Way mod by @Lorizael.
 
If you are interested, I attach the "French translation" for this mod.
I like this mod :)
 

Attachments

Back
Top Bottom