Resource icon

Resource Screen Improvements 1.23

Smayo

Warlord
Joined
Mar 1, 2019
Messages
158
Heres a simple mod I plan to expand on. It adds a filter to the Trade Panel that shows up when you click a trader, letting you sort the list by a certain resource you want (say you want Fish for your factory in the Modern era, you could sort for the trade route with the most Fish):

1740871548826.png



I have some plans for updates, namely making a better interface, someone (@MiRai) on the Discord suggested this mockup, and I like the idea, although I dont yet know how to implement it:
1740871291115.png
I also want to add a toggle to include untradeables in the list, so you could know someone you maxed out trade routes too should be increased, since he has 5 fish in one city!!

I also might do sort by Yields, so like, a count of Happiness resources if you are desperate for them. I dont see the need for a Strategic one, since you know what strategic you want. And actually with a better selector, you could just sort for happiness resources manually.

There are some hinky bits I think I have sorted out, but maybe are a little buggy, around Silver and Gold, since there are two separate versions of them in the Modern age, despite the fact they do the same thing. I think Ive combined them correctly for sorting now, and the Distant Lands version shouldnt show up on the list.

In future, I also plan to adjust the Resources Screen (ironically not ready yet, despite the mod name), so the town and city order made more sense (probably sorting by summed yields for city size, or just population). Also planning some sort methods there, maybe a Happiness sort, thats most often why Im in there. Also an empty Capacity sort, and a Factory sort in the modern age.

Also some changes that just make sense, like why is your civ name and logo up on the screen, I know that? Why are resources that are the same adjacent to one another? Why is the "you cant move resources" popup in the top right corner and easy to miss?
 

Attachments

1740951854545.png


1740951898036.png


Updated with icons selectors and a toggle to include untradable cities in the initial first sort. Should be flexible enough to accomadate any new resources added by mods, assuming they use roughly the same approach as Firaxis
 
Is possible add CLOSE button to panel?
I use MOD with TRADE FILTER, and when i use this mod, i cant close panel when i dont use Trader to open panel :(
 
Hmm I can look into it! That’s a problem with the base game it not having a close button, I have to go find another unit to click on.

I’ve also noticed the Show All button is pushed off too far right in all but modern, and it starts with untradeables showing, will fix that up too
 
When I tried to Download it, this File name comes up (its another Mod?):
 

Attachments

  • Bildschirmfoto 2025-03-08 um 15.34.40.png
    Bildschirmfoto 2025-03-08 um 15.34.40.png
    115.5 KB · Views: 18
Hi! I've noticed resource-allocation folder in the mod directory - is it necessary? I've also made a Russian translation, please see attached. I've uncommented
Code:
" this.checkBoxText.innerHTML = Locale.compose('LOC_SLTH_TRADE_TICKBOX');
so it's taken from locale file. However position of the filter chooser is highly dependent on the length of this string - if it's too long it's going out og the window. Would be nice to fix it with CSS.

Also would be awesome to put "All" to the locale file, so it can be translated too. (description.innerHTML)
 

Attachments

Last edited:
Hi! I've noticed resource-allocation folder in the mod directory - is it necessary? I've also made a Russian translation, please see attached. I've uncommented
Code:
" this.checkBoxText.innerHTML = Locale.compose('LOC_SLTH_TRADE_TICKBOX');
so it's taken from locale file. However position of the filter chooser is highly dependent on the length of this string - if it's too long it's going out og the window. Would be nice to fix it with CSS.

Also would be awesome to put "All" to the locale file, so it can be translated too. (description.innerHTML)
Hi, its not, that was back when I was ambitious and thought i could do some stuff with that screen too. It shouldnt cause any issues though, as the modinfo doesnt reference it. I'll remove it for next version.

Yes I can change the All to locale, I'm just suprised/happy that someone already wants to translate!

I am a bit inept with CSS, but yeah I need to look into dealing with long text issues. Can probably resize, but its end up looking not that nice.
 
Back
Top Bottom