Announcement

Collapse
No announcement yet.

Help! I'm at my Wit's End: How to Present City Screen Bonus Icons?!

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

  • Help! I'm at my Wit's End: How to Present City Screen Bonus Icons?!

    This is regarding the tiny resource icons visable in the city detail screen. My resource modification (http://apolyton.net/forums/showthrea...hreadid=144131) has been lacking these icons despite defining the art file references and creating new DDS art files for the resources themselves (which work fine in the 'pedia and on the map with resources toggled).

    This is not a complicated issue but I have now spent about ten hours of my life trying to figure it out. I am assuming it is a Python adjustment since none of the standard XML files seem to effect it (with one exception I'll get to in a moment).

    Here's a screenshot before I continue:


    I have adjusted several XML files for the resource mod, including and most importantly, .../_CIV4CustomAssets/xml/terrain/CIV4BonusInfos.xml. This file is the only XML file which seems to interact with the city screen resource icons: when I inserted my new resources in alphabetical order the icons were shifted. In other words, everything from Coffee on had the wrong icon. I moved my customized resources to the end of the XML code to fix this, but since then have had no city screen resource icons for my new resources despite defining the art file locations.

    No other XML file seems relevant to this particular problem during my subsequent review. (The one that defines the art files for the resources is in good working order, BTW, and--with few adjustments for specificity--defines the art files just as the other resources are defined by Firaxis.)

    I have little experience with Python, but suspect there is an adjustment which needs to be made in one of the Python files. This is what most of the ten hours have been spent on--picking through dozens of PY files in search of the simple answer to my problem.

    In PyHelpers.py I found the following lines of code under the CLASS “BonusInfo”:
    def getResourceSymbolList(self):
    lBonus = self.getBonusList()
    lBonusFound = []
    lBonusString = ""
    for i in range(len(lBonus)):
    loopBonus = lBonus[i]
    if loopBonus in lBonusFound:
    continue
    else:
    lBonusString += "%s" %(PyInfo.BonusInfo(lBonus[i]).getSymbol())

    return lBonusString
    And
    def getDescription(self):
    "str - description of Bonus"
    return self.info.getDescription()

    def getButton(self):
    return CyArtFileMgr().getBonusArtInfo(self.info.getArtDef ineTag()).getButton()

    def getSymbol(self):
    "unicode - iChar Symbol"
    return u"%c" %(self.info.getChar(),)
    I am guessing that what I’m looking for relates to “getResourceSymbolList ...” or “CyArtFileMgr().getBonusArtInfo(self.info.getArtDe fineTag()).getButton()”, but I have not been able to find a solution by tracking down either the “CyArtFileMgr” or the “ResourceSymbolList.” I can find neither.

    I have also looked through every single DDS file included in the CIV4 Art FPKs in order to find miniature versions of the resource icons. I have not found them. It is logical therefore to assume that the city screen resource icons are simply the standard art files presented in a smaller scale. This reinforces my suspicion that these icons are defined somehow in the Python files.

    My instincts tell me this should be easy to solve. Any help is most appreciated (I’ll be happy to give credit on my mod to whoever helps me solve this).

    Thanks in advance.
    Last edited by rjwoer; December 16, 2005, 02:53.
    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?"

  • #2
    I'm selfishly bumping this thread because I'm working on refining my resource mod and posting a new version in 24 hours. If anyone can help with this city bonus icon issue now's the time.

    Maybe a simple question will get the conversation going: Does anyone know what/where the CyArtFileMgr is? This could be the path to me solution.
    Last edited by rjwoer; December 18, 2005, 17:24.
    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


    • #3
      I believe that you will have to wait until the SDK is released before you can change CyArtFileMgr. I'm not sure, but it looks like it gets the art info from the artdefinestag. There doesn't seem to be much more to it.

      I don't know if this helps you but the city screen is set up from the CvMainInterface.py file in the Assets\Python\Screens directory.

      I'm thinking that the icons must be hard coded somewhere. I painted aluminum red in the unit_resource_atlas.dds file, and it still showed up normal in the city screen.
      ----------------------------------------------------------------

      I may have just found it. In the C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Resource\Civ4\ folder there are gamefont.tga and gamefont75.tga files. Check them out.

      Comment


      • #4
        Many thanks, Tywiggins. What you've said is helpful if only to confirm that I'm not missing something simple. Your experience with painting the aluminum red coincides with mine.

        I have pawed through CvMainInterface.py fairly thoroughly--and did find a few lines of code which seemed to handle the resource bonus icons (the maximum number of lines to present these icons, etc.,) but without any concrete success.

        I will check those files out immediately (I noticed them before but don't think I viewed them).
        Last edited by rjwoer; December 19, 2005, 14:21.
        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


        • #5
          I may have just found it. In the C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Resource\Civ4\ folder there are gamefont.tga and gamefont75.tga files. Check them out.
          Bingo. Tywiggins, did you ever know that you're my hero? You're everything I wish that I could be.

          Those are they! Now to see if it is simply a matter of including new icons at the end (to coincide with the order the bonus items are listed in the xml) or if they are defined somehow. I'm thinking it's the former.

          Many thanks. I'll give you credit in the mod, tywiggins.
          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


          • #6
            Looks like there's still some code that defines the icons for the bonuses. I've added icons to both .tga files but they are still not showing up in the game. I will futz with this a bit longer and then will resign myself to waiting for the SDK release.

            -----------------------
            edit: Upon furthur review, I don't think the game is even using those .tga files for the bonus icons. I adjusted the appearance of the stock icons in both files and tested to see if the changes would appear in the game. They didn't. Hmmmm . . .
            Last edited by rjwoer; December 19, 2005, 16:20.
            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

            Working...
            X