Ket
Composite Of A Composite
Not being much of a python addict, I assume its something to do with building the path to the ini file and mod directory from Elmer's old code for this.
and the cvmodname workaround...
I tried to hardcode my way into the mod directory but that did not work at all. I get the screen to pop but exit does not seem to work LOL, ill wait for EF to take a look into it.
In totally unrelated good news, it seems that lunar mongoose and crew in the sevopedia thread have made major progress.
I also have regiments "modualized" if we want to use the extended formations.
Code:
activeModName = None
try:
import CvModName
activeModName = CvModName.modName
except:
pass
userDir = _getUserDir()
userAssetsDir = os.path.join(userDir, "CustomAssets")
userModsDir = os.path.join(userDir, "Mods")
userActiveModDir = None
userActiveModAssetsDir = None
installDir = _getInstallDir()
installAssetsDir = os.path.join(installDir, "Assets")
installModsDir = os.path.join(installDir, "Mods")
installActiveModDir = None
installActiveModAssetsDir = None
assetsPath = [userAssetsDir, installAssetsDir]
if (activeModName != None):
userActiveModDir = os.path.join(userModsDir, activeModName)
userActiveModAssetsDir = os.path.join(userActiveModDir, "Assets")
installActiveModDir = os.path.join(installModsDir, activeModName)
installActiveModAssetsDir = os.path.join(installActiveModDir, "Assets")
assetsPath.insert(0, userActiveModAssetsDir)
assetsPath.insert(1, installActiveModAssetsDir)
pythonPath = []
for dir in [os.path.join(d, "Python") for d in assetsPath]:
for root, subdirs, files in os.walk(dir):
if (len(files) > 0):
pythonPath.append(root)
def _test():
print "activeModName = " + str(activeModName)
print "userDir = " + userDir
print "userAssetsDir = " + userAssetsDir
print "userModsDir = " + userModsDir
print "userActiveModDir = " + str(userActiveModDir)
print "userActiveModAssetsDir = " + str(userActiveModAssetsDir)
print "installDir = " + installDir
print "installAssetsDir = " + installAssetsDir
print "installModsDir = " + installModsDir
print "installActiveModDir = " + str(installActiveModDir)
print "installActiveModAssetsDir = " + str(installActiveModAssetsDir)
print "assetsPath = "
for dir in assetsPath:
print " " + dir
print "pythonPath = "
for dir in pythonPath:
print " " + dir
if __name__ == "__main__":
_test()
and the cvmodname workaround...
I tried to hardcode my way into the mod directory but that did not work at all. I get the screen to pop but exit does not seem to work LOL, ill wait for EF to take a look into it.
In totally unrelated good news, it seems that lunar mongoose and crew in the sevopedia thread have made major progress.
I also have regiments "modualized" if we want to use the extended formations.