Great Person error

Look in GreatPersonScreen.py for the interfaceScreen() function. A few lines into it szArtPath is set. My copy has this:

Code:
szArtPath = CvPath.getPath(os.path.join("art","GreatPeople"), "Great Person.dds")

Is that what yours looks like? That won't work because this needs to be the path to the folder as below this line it adds the person's name to it. If you have the above, change it to this:

Code:
szArtPath = CvPath.getPath("art", "GreatPeople")


Nope didnt work, i still get default GP screen.

Heres what i change to: (these are all the files that contain: szArtPath


00063: szArtPath = CvPath.getPath("art", "GreatPeople")
00064: #CvUtil.pyPrint("CvGreatPersonScreen: szArtPath: " + szArtPath)
00078: szImageFilename = os.path.join(szArtPath, szImageName + ".dds")
00083: szImageFilename = os.path.join(szArtPath, szImageName + ".dds")
 
I guess GP will NEVER be able to be used in my mod, its just like three other mods now, BUG, Mercenaries and the NEW Orions religion stuff, just cant get them to work.

But now to a different subject matter, cause i dont want to start another thread:

is there anyway to get either ONE of these to work with 3.19?

http://forums.civfanatics.com/showpost.php?p=8452377&postcount=2

or

http://forums.civfanatics.com/showpost.php?p=8452742&postcount=7

Heres my python with it working but the dds file is wrong when it shows??
 
As with the other code you posted, you probably just need to add a DirectionTypes constant at the end of each initUnit() call.
 
You want something like this:

Code:
szArtPath = BugPath.findAssetFile("Great Person.dds", os.path.join("Art","GreatPeople"))
 
Notice that I typed BugPath but you used cvGPArtPath. Also, you need to import BugPath at the top:

Code:
import BugPath
 
Oh ok, then change it back to what it was originally and I have no idea what is wrong. CvPath should have a function called getPath() according to your original code.
 
OK changed it back to original:
Code:
szArtPath = CvPath.getPath(os.path.join("art","GreatPeople"), "Great Person.dds")
but it doesNOT work correctly.

my CvPath says this:
Code:
filenames = [os.path.join(os.path.dirname(dir), fileName)
 
Is that the entire content of your CvPath? You need to grab a CVPath from some other mod, one that has a getPath() function.
 
Is that the entire content of your CvPath? You need to grab a CVPath from some other mod, one that has a getPath() function.

These are two getPaths that are in my CvPath??:confused:

Code:
def getPath(relPath, fileName):
    for filePath in [os.path.join(d, relPath) for d in assetsPath]:
        if os.path.isfile(os.path.join(filePath, fileName)):
            return filePath
    return ""

Code:
# YAUGM changes begin
    print "greatPeopleArtPath = " + getPath("art\\GreatPeople", "Great Person.dds")
    print "RuffMod.ini location: " + get_INI_File("RuffMod_2w.ini")
    configFilePath = getINIPathForCvConfigParser("")
    configFilePath.reverse()
    print "configFilePath = "
    for filePath in configFilePath:
    	print "  " + filePath
# YAUGM changes end
 
Near the top of that module that has the error, import CvPath

Code:
import CvPath

Yes its there:

Code:
## Sid Meier's Civilization 4
from CvPythonExtensions import *
import PyHelpers
import CvUtil
import ScreenInput
import CvScreenEnums
import string
[B]import CvPath[/B]
import os.path
import CvGreatPersonModEventManager

# ScS  import the new file that we created with the .bat file
# ScS  import os.path to deal with checking whether files exist.

PyPlayer = PyHelpers.PyPlayer
PyInfo = PyHelpers.PyInfo
 
Well, that's what the error is telling you. Wherever that bolded line "szArtPath = CvPath..." is located isn't importing CvPath.
 
Well, that's what the error is telling you. Wherever that bolded line "szArtPath = CvPath..." is located isn't importing CvPath.

Pls dont look at anything before post # 54, thx.:blush: I put it back the way it was before.
 
Back
Top Bottom