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”:
And
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.
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
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
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(),)
"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 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.
Comment