1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Suggestion: Add filter to show only resource producing buildings

Discussion in 'Civ4 - Caveman 2 Cosmos' started by raxo2222, Jul 17, 2017.

  1. raxo2222

    raxo2222 Chieftain

    Joined:
    Jun 10, 2011
    Messages:
    707
    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.
     
  2. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    20,141
    Gender:
    Male
    Location:
    Las Vegas
    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.
     
  3. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    21,365
    Gender:
    Male
    Location:
    Canberra, Australia
    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.
     
  4. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    20,141
    Gender:
    Male
    Location:
    Las Vegas
    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.
     
  5. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    21,365
    Gender:
    Male
    Location:
    Canberra, Australia
    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.
     
  6. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    20,141
    Gender:
    Male
    Location:
    Las Vegas
    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.
     
  7. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    21,365
    Gender:
    Male
    Location:
    Canberra, Australia
    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:
     
  8. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    20,141
    Gender:
    Male
    Location:
    Las Vegas
    That's what I mean about page 2. You do realize there's a second page of filter icons right?
     
  9. AIAndy

    AIAndy Chieftain

    Joined:
    Jun 8, 2011
    Messages:
    3,352
    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.

    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.
     
  10. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    21,365
    Gender:
    Male
    Location:
    Canberra, Australia
    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.
     
  11. tmv

    tmv Chieftain

    Joined:
    Nov 24, 2015
    Messages:
    629
    Location:
    Germany
    How would such a filter behave if your city is cut off from your trade network?
     
  12. AIAndy

    AIAndy Chieftain

    Joined:
    Jun 8, 2011
    Messages:
    3,352
    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.

    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.
     
  13. Noriad2

    Noriad2 Chieftain

    Joined:
    Oct 23, 2014
    Messages:
    756
    Location:
    Netherlands
    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.
     
  14. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    20,141
    Gender:
    Male
    Location:
    Las Vegas
    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.
    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 'return all filters to default' button? Would be nice. I'd have to look into that.
     
  15. AIAndy

    AIAndy Chieftain

    Joined:
    Jun 8, 2011
    Messages:
    3,352
    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.
     
  16. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    20,141
    Gender:
    Male
    Location:
    Las Vegas
    Sounds like it should be fairly easy. I'll have to see what I can do for this soon then.
     

Share This Page