Announcement

Collapse
No announcement yet.

How to see units in city when building list pops up?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to see units in city when building list pops up?

    When the build popup appears, prompting me for a selection of the next thing to build, I sorely miss the list of units in a city . It's the same list you get when clicking on a city (lower left, a row of small icons). I can't mouse over the city when that build popup is showing, so the only way to get it currently is to choose Examine city (thus wasting time). I need that list to decide if building a unit is necessary, and if so what unit I need in that city.

    I'm tempted to look for
    1. The place in the code where the appearance of the popup is scripted
    2. The place in the code where the disappearance of the popup is scripted
    3. What (method) to call to make the list of units appear
    4. What (method) to call to make the list of units disappear

    but I can't find them. This may be because the code is structured in a way that I'm unfamiliar with. I've checked the Python and xml files (but not in excruciating detail).

    Can someone direct me in the proper direction?

    Just for the record: I'm using the Plot list enhancement mod which modifies that list of unit graphics, but that shouldn't change the answers to my questions above if this is proper object oriented code.
    Enjoy,

    Robert

  • #2
    Have a look in "CvAdvisorUtils.py" for the function "cityAdvise". Its called from "CvEventManger.py" on the event "onCityDoTurn".
    This function seems to control the complete popup including the advises.

    By the way, I like your idea and added it to my ToDo list of the next release for the Plot List Enhancements.
    Have a look on my mods :
    Modified Special Domestic Advisor 1.8b !!! UPDATE !!!
    Plot List Enhancement
    Restart interceptor animation after game load

    Comment


    • #3
      Thx, 12monkeys, that gives me a handle on 1. and perhaps 2. above. But my CvAdvisorUtils.py file looks like it is cut off (the one in the game install ditectory). It has 890 lines and the last two are inside of an if statement that does not appear to be closed. The last line reads
      Code:
      popupInfo.addPopup(iPlayer)
      g_iAdvisorNags += 1
      (and there's an empty line after that. The size is 43kb. Does that match your file?

      I guess the game would abort if the file really was cut short - but it does look weird. Perhaps what I'm looking for (in 1. above) is right there at the end and I just need to check up on how Python closes an if statement and a file.
      Enjoy,

      Robert

      Comment


      • #4
        You can just choose "Examine city" and that will show you the list of units inside the city.
        (\__/) 07/07/1937 - Never forget
        (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
        (")_(") "Starting the fire from within."

        Comment


        • #5
          Originally posted by RO
          Thx, 12monkeys, that gives me a handle on 1. and perhaps 2. above. But my CvAdvisorUtils.py file looks like it is cut off (the one in the game install ditectory). It has 890 lines and the last two are inside of an if statement that does not appear to be closed. The last line reads
          Code:
          popupInfo.addPopup(iPlayer)
          g_iAdvisorNags += 1
          (and there's an empty line after that. The size is 43kb. Does that match your file?

          I guess the game would abort if the file really was cut short - but it does look weird. Perhaps what I'm looking for (in 1. above) is right there at the end and I just need to check up on how Python closes an if statement and a file.
          Hmm. I couldn't check right now cause I'm at work, but as I remember my function looks the same.
          But anyway, this shoud no problem, because the if statements (there are more on that level) do certain things dependant on the game progress (number of turns, aso..). That, what looks strange for you is simply the end of the function. Cause its the last funtion of the file, its also the end of the file.
          So, everythings should be fine!
          Have a look on my mods :
          Modified Special Domestic Advisor 1.8b !!! UPDATE !!!
          Plot List Enhancement
          Restart interceptor animation after game load

          Comment


          • #6
            Originally posted by Urban Ranger
            You can just choose "Examine city" and that will show you the list of units inside the city.
            Originally posted by RO
            so the only way to get it currently is to choose Examine city (thus wasting time).
            He knows this, and he doesn't like it.
            I watched you fall. I think I pushed.

            Comment


            • #7
              I'd also like a way to see the units WITHOUT having to choose the "Examine city" option.
              I watched you fall. I think I pushed.

              Comment


              • #8
                Yes, this has frustrated me too. It seems like a small thing, but it doesn't make sense that I can't see the units in a city (even by simply mousing-over) when I'm being asked what to build. And we shouldn't have to "examine city"--especially in a game which (for the most part, rightfully) brags about how much game information is available right on the main screen/interface.
                One of these days I'll make 501 posts, and you won't have to look at my silly little diplomat anymore.
                "Oh my God, what a fabulous room. Are all these your guitars?"

                Comment


                • #9
                  Originally posted by 12monkeys
                  Have a look in "CvAdvisorUtils.py" for the function "cityAdvise". Its called from "CvEventManger.py" on the event "onCityDoTurn".
                  This function seems to control the complete popup including the advises.

                  By the way, I like your idea and added it to my ToDo list of the next release for the Plot List Enhancements.
                  OK, cityAdvise calls popupInfo.addPopup, ie. it probably sets up a popup dialog. But I can't find popupInfo.addPopup anywhere, nor do I know what actually makes the popup appear, nor how to make the unit list appear at the same time. And that does not answer point 2. and 4. above either.

                  12monkeys, you seem to know a good deal about this code. Can you point me to a good source of information?
                  Enjoy,

                  Robert

                  Comment


                  • #10
                    Well, I investigated a bit and found out, that this particular popup is called from within the c++ code (CvGameCoreDLL.dll). That means, there is no chance to modify that part.

                    The function I told before, is only used for those useless "Due-To-Any-Reason-You-Should-Change-Production-And-Build-This-Or-That" dialogs which pop up from time to time (I think you can switch 'em off in the options dialog).

                    Sorry guys, but this topic we may solve first when the SDK is released. Maybe!
                    Have a look on my mods :
                    Modified Special Domestic Advisor 1.8b !!! UPDATE !!!
                    Plot List Enhancement
                    Restart interceptor animation after game load

                    Comment


                    • #11
                      Originally posted by 12monkeys
                      Sorry guys, but this topic we may solve first when the SDK is released. Maybe!

                      That's too bad. Have to wait, then.
                      Enjoy,

                      Robert

                      Comment

                      Working...
                      X