Resource Re-sorts

Resource Re-sorts 2.0.1

I agree, I too find myself always cross checking that info before assigning the resource. In particular RURAL POPULATION as mentioned above, so I can assign food to lower rural pop town and cities where you get more incremental benefit.

Eg 2 towns both have +10 food and I have 1 fish. I usually assign fish to the one with 300 food to grow vs 3000. Resource screen doesn’t tell you that- additional two clicks to open town and growth tab
 
Last edited:
hey folks, this is a minimalistic mod that works within the existing structure of the resource allocation screen. the change i made today is about the limit of what i can cram in without completely redesigning the screen, which is not something i'm interested in doing. with five active mods, i'm also near the limit of what i can cram into my hobby time!
 
hey folks, this is a minimalistic mod that works within the existing structure of the resource allocation screen. the change i made today is about the limit of what i can cram in without completely redesigning the screen, which is not something i'm interested in doing. with five active mods, i'm also near the limit of what i can cram into my hobby time!
You've done so much, thank you for blessing us with such wonderful mods.
 
hi.
In languages that use UTF-8, such as Korean and Japanese, the issue shown in the screenshot occurs. Could you check this?
스크린샷 2025-04-24 182940.png
 
hi.
In languages that use UTF-8, such as Korean and Japanese, the issue shown in the screenshot occurs. Could you check this?
View attachment 729963
sorry about that! i'll take a look. i wasn't expecting any trouble with it, because i use a similar technique in Map Trix with no problems.
 
aha, i found the problem right away. i used a new method for changing the font that didn't require any UI code, and i didn't realize that i have to specify a list of fallback fonts for CJK compatibility. fixed by changing the font family from just BodyFont to this:
CSS:
font-family: "BodyFont", "BodyFont-JP", "BodyFont-KR", "BodyFont-SC", "BodyFont-TC";
testing it in the relevant languages now, should have an update shortly.

1745497020034.png
 
aha, i found the problem right away. i used a new method for changing the font that didn't require any UI code, and i didn't realize that i have to specify a list of fallback fonts for CJK compatibility. fixed by changing the font family from just BodyFont to this:
CSS:
font-family: "BodyFont", "BodyFont-JP", "BodyFont-KR", "BodyFont-SC", "BodyFont-TC";
testing it in the relevant languages now, should have an update shortly.

View attachment 729972
It works perfectly. Thank you.
 
It works perfectly. Thank you.
glad it's helping! unfortunately, i'll need to find a different fix for general release, because it's producing bad results with Simplified Chinese:

1745498261988.png

not sure why the vertical alignment is terrible. i'm going to try another approach which is more work but also more likely to fix it.
 
glad it's helping! unfortunately, i'll need to find a different fix for general release, because it's producing bad results with Simplified Chinese:

View attachment 729977
not sure why the vertical alignment is terrible. i'm going to try another approach which is more work but also more likely to fix it.
font-family: "BodyFont", "BodyFont-JP", "BodyFont-KR", "BodyFont-SC", "BodyFont-TC";
=>
font-family: "BodyFont", "BodyFont-SC", "BodyFont-TC", "BodyFont-JP", "BodyFont-KR";

I changed the order, and it seems to have resolved the issue. I hope this helps you.
1745500377447.png
 
font-family: "BodyFont", "BodyFont-JP", "BodyFont-KR", "BodyFont-SC", "BodyFont-TC";
=>
font-family: "BodyFont", "BodyFont-SC", "BodyFont-TC", "BodyFont-JP", "BodyFont-KR";

I changed the order, and it seems to have resolved the issue. I hope this helps you.
View attachment 729978
oh wow! i see now that the code uses a couple of different fallback orders. i thought i was using the same order as the vanilla styles, but i just found this note in one of the main theme scripts:
JavaScript:
// SC and TC fonts should be first in the default font ordering to lessen issues with font fallbacks as the JP/KR fonts have less coverage
const TITLE_FONTS = getOrderedFontFamily(["TitleFont", "TitleFont-SC", "TitleFont-TC", "TitleFont-JP", "TitleFont-KR"]);
const BODY_FONTS = getOrderedFontFamily(["BodyFont", "BodyFont-SC", "BodyFont-TC", "BodyFont-JP", "BodyFont-KR"]);
and on close reading of that script, i see that there's no single order that is correct for every locale. the game rearranges the fallback order to swap BodyFont-JP with the front of the list when you're in jp_JP locale, for example.

oh well, i already solved the problem another way, which is cleaner and better for future work.
thanks for your help!

(btw have you been sending me the ko_KR translations on Github? if so, which name should i use for you in the credits?)
 
Last edited:
oh wow! i see now that the code uses a couple of different fallback orders. i thought i was using the same order as the vanilla styles, but i just found this note in one of the main theme scripts:
JavaScript:
// SC and TC fonts should be first in the default font ordering to lessen issues with font fallbacks as the JP/KR fonts have less coverage
const TITLE_FONTS = getOrderedFontFamily(["TitleFont", "TitleFont-SC", "TitleFont-TC", "TitleFont-JP", "TitleFont-KR"]);
const BODY_FONTS = getOrderedFontFamily(["BodyFont", "BodyFont-SC", "BodyFont-TC", "BodyFont-JP", "BodyFont-KR"]);
and on close reading of that script, i see that there's no single order that is correct for every locale. the game rearranges the fallback order to swap BodyFont-JP with the front of the list when you're in jp_JP locale, for example.

oh well, i already solved the problem another way, which is cleaner and better for future work.
thanks for your help!

(btw have you been sending me the ko_KR translations on Github? if so, which name should i use for you in the credits?)
It's good to include my GitHub profile in the credits as it is now. Thank you!
 
when removing a resource from a city, the entire Resources box is a valid target area, highlighted when you mouse over it. no need to aim for the individual slots anymore! you can also middle-click the resources to unassign them (like middle-clicking browser tabs to close them), or middle-click the settlement name to unassign all of its resources.

re-sorts-bin.jpg
 
when removing a resource from a city, the entire Resources box is a valid target area, highlighted when you mouse over it. no need to aim for the individual slots anymore! you can also middle-click the resources to unassign them (like middle-clicking browser tabs to close them), or middle-click the settlement name to unassign all of its resources.

View attachment 730163
That middle mouse button actually has a purpose???? What else have I been missing out on, I feel reborn.

Awesome QoL , thank you!!
 
Back
Top Bottom