First: Not every error with no interface is related to this. The guy, who has the problem with Thomas' War, has the same effect, but it seem's, that his problem is an other one.
Source of the error: CvPath.py
Reason of the error: Reading in the registry.
Solution: Change the CvPath.py
Steam:
Instead of
PHP:
def __getRegValue(root, subkey, name):
key = _winreg.OpenKey(root, subkey)
try:
value = _winreg.QueryValueEx(key, name)
return value[0]
finally:
key.Close()
use this:
PHP:
def __getRegValue(root, subkey, name):
key = _winreg.OpenKey(root, subkey)
try:
value = "C:\program files (x86)\steam\steamapps\common\sid meier's civilization iv beyond the sword\Beyond the Sword"
return value[0]
finally:
key.Close()
------------------------------------------
For CivComplete:
Instead of :
PHP:
def _getInstallDir():
gc = CyGlobalContext()
subkey = r"Software\Firaxis Games\Sid Meier's Civilization 4"
print "Civ4 version: ", gc.getDefineINT("CIV4_VERSION")
#if ((gc.getDefineINT("CIV4_VERSION") / 100) == 2):
subkey += r" - Beyond the Sword"
return __getRegValue(_winreg.HKEY_LOCAL_MACHINE, subkey, "INSTALLDIR")
use this:
PHP:
def _getInstallDir():
gc = CyGlobalContext()
subkey = r"Software\Firaxis Games\Sid Meier's Civilization 4 Complete"
print "Civ4 version: ", gc.getDefineINT("CIV4_VERSION")
#if ((gc.getDefineINT("CIV4_VERSION") / 100) == 2):
#subkey += r" - Beyond the Sword"
return __getRegValue(_winreg.HKEY_LOCAL_MACHINE, subkey, "INSTALLDIR")
Both are the simplest replacements, with redundant code remaining, which could be changed, but it's not necessary.
Some components in some mods need the total mod-path, which they gain through the registry-key. If the reading fails, the file crashes, which causes an crash in the CvMainInterface, which is the real reason for the missing interface.
This happens, when someone has a special civ-version with other registry-keys, which affects all download-providers, CivComplete and maybe more.
To solve the problem, the CvPath has to be changed, that it reads the real registry-keys. Could be included in the CvPath, but i don't know anything about exception-handling in Python, so it's easier to replace the file through an patch (-> patch can't be included in the main-download).
Some things here are only guessed, but it seem's logical, and it's working
.
Thanks to Primordial Stew, who also pointed a way to this, and to Tssha, who provided the helpful logs
.