• Civilization 7 has been announced. For more info please check the forum here .

Suggestion: Add filter to show only resource producing buildings

raxo2222

Time Traveller
Joined
Jun 10, 2011
Messages
9,752
Location
Poland
That would be pretty useful since there is over 400 both natural and manufactured resources.

And other filter to show only these buildings, that are required to build other buildings.
 
Would be nice. Doable if I could figure out how to interface with the python end. I may do something with this fairly soon as I work on some other aspects of programming RE manufactured resource buildings.
 
There has been a request in for a while to highlight buildings that can be built in the city and provide a resource you don't have eg a Culture or Manufactured good like honey.

The main difficulty is the way that the unit/building/wonder/process part of the screen is coded in the exe. Something we can't change.

It may be possible to add a special part in this region where we could place small buttons for those resource buildings and then program them to add the clicked building to the building list using the same keys as normal. Unfrotunatly we can't disable the whole thing and write our own as it (the units/buildings/wonder small buttons) are default part of the screen.
 
There has been a request in for a while to highlight buildings that can be built in the city and provide a resource you don't have eg a Culture or Manufactured good like honey.

The main difficulty is the way that the unit/building/wonder/process part of the screen is coded in the exe. Something we can't change.

It may be possible to add a special part in this region where we could place small buttons for those resource buildings and then program them to add the clicked building to the building list using the same keys as normal. Unfrotunatly we can't disable the whole thing and write our own as it (the units/buildings/wonder small buttons) are default part of the screen.
If we could add another filter widget I think I could work out the filter itself for 'Provides a resource you don't yet have access to' from the same region as where the rest of the filter conditions are established in the dll.
 
The problem with a filter is that you have to remember to turn it on and then off every turn. If we could just display a star or the icons off to the side whenever it is true it is just a bit more friendly.
 
The problem with a filter is that you have to remember to turn it on and then off every turn. If we could just display a star or the icons off to the side whenever it is true it is just a bit more friendly.
The filters remember by city what they were set to. You use the filters for production and food at least, right? Filters on page 2 are a little rough because paging up and down kinda sucks, but it could at least HELP when you're looking for only those resources you are still looking to provide yourself. And maybe another filter for buildings that produce manufactured resources at all.
 
The problem is that you have to turn it on and off every time you go into a city just to find if there are any buildings and it is rare that there will be any. Thus something that does it for you by putting something special up would improve things. It is basically an improved advisor notice.

I have no problems with there also being a filter for anything that produces resources, buildings or the units. In the units it would allow you to turn off Tamed Animals and Great Farmer in a city list for example.

Having a new filter is going to be a problem for those of us playing at the default screen size. :lol:
 
Having a new filter is going to be a problem for those of us playing at the default screen size.
That's what I mean about page 2. You do realize there's a second page of filter icons right?
 
If we could add another filter widget I think I could work out the filter itself for 'Provides a resource you don't yet have access to' from the same region as where the rest of the filter conditions are established in the dll.
It is quite easy. Just search for one of the filter enum values like BUILDING_FILTER_SHOW_FOOD. It will lead you to all places where a new one has to be added.

There has been a request in for a while to highlight buildings that can be built in the city and provide a resource you don't have eg a Culture or Manufactured good like honey.

The main difficulty is the way that the unit/building/wonder/process part of the screen is coded in the exe. Something we can't change.

It may be possible to add a special part in this region where we could place small buttons for those resource buildings and then program them to add the clicked building to the building list using the same keys as normal. Unfrotunatly we can't disable the whole thing and write our own as it (the units/buildings/wonder small buttons) are default part of the screen.
The exe is not involved much beyond providing the basic widget types that are used. So pretty much anything can be changed. Most of it just hides in that ugly huge main interface Python file. And a lot of the effects of the widgets are handled directly in the DLL.
 
You can't change the three greyish buttons that move you to units/buildings/wonders that is displayed in the exe not the python. The screen layout, ie grey borders, for both screens are also provided by the exe.

I am fairly sure that you can't change the way the lines of icons behave ie they go back to the first unit/building/wonder once you select one to be built. If it was I am sure Pie_At and team would have fixed it in their mod as they have(had?) more groupings than three.
 
You can't change the three greyish buttons that move you to units/buildings/wonders that is displayed in the exe not the python. The screen layout, ie grey borders, for both screens are also provided by the exe.
The buttons you mean are named "CityTab0", "CityTab1" and "CityTab2" in CvMainInterface.py I think. Should be quite normal buttons. The effect of clicking them is handled in the DLL but actually sets a value in the exe which in turn is read by the Python. I don't think the value in the exe has any side effects so it is not a must to use it in the first place.

I am fairly sure that you can't change the way the lines of icons behave ie they go back to the first unit/building/wonder once you select one to be built. If it was I am sure Pie_At and team would have fixed it in their mod as they have(had?) more groupings than three.
The problem is that they are redrawn and iirc the MultiList widget only allows you to select a row which in this case means a grouping. One solution would be to calculate how many buttons you can get in a row yourself and then using that as the MultiList row. That way the right row can be selected. Some DLL work is needed though.
 
A reset button for all city filters would be nice, even more so if one button resets filters in all cities.

Speaking of filters, a "hide all red items" in the trade screen would save a lot of scrolling, too.
 
How would such a filter behave if your city is cut off from your trade network?
Detection of access would have to be local to the city. So it would show a lot of options if you were cut off from your network.
It is quite easy. Just search for one of the filter enum values like BUILDING_FILTER_SHOW_FOOD. It will lead you to all places where a new one has to be added.
Yeah, I wasn't meaning to say I didn't know how on that. It's just... fiddly to add a widget. Lots of little stuff to attend to in that process. At least, in the DLL. What has to happen in python is a 'who knows' kind of thing for me. Are you saying this is the step to take for the python files as well using grep? Or did you set things up so that the widgets would be displayed properly in a manner all controlled in the DLL?

A reset button for all city filters would be nice, even more so if one button resets filters in all cities.
A 'return all filters to default' button? Would be nice. I'd have to look into that.
 
Yeah, I wasn't meaning to say I didn't know how on that. It's just... fiddly to add a widget. Lots of little stuff to attend to in that process. At least, in the DLL. What has to happen in python is a 'who knows' kind of thing for me. Are you saying this is the step to take for the python files as well using grep? Or did you set things up so that the widgets would be displayed properly in a manner all controlled in the DLL?
Yes to the first question. The enum value is used where you have to add in the Python as well. Of course you still need some art to reference for the icon.
 
Yes to the first question. The enum value is used where you have to add in the Python as well. Of course you still need some art to reference for the icon.
Sounds like it should be fairly easy. I'll have to see what I can do for this soon then.
 
Top Bottom