JesusOnEez
Emperor
EDIT : I just tried it and it works fine with BtS!!!!!!!!
Wow! I'll have to try it when I get home!
EDIT : I just tried it and it works fine with BtS!!!!!!!!
How does one merge two mods? I'd like to use this with Ethnic Artstyles for BtS.You have to merge the two mods. You'll need a merged .ini file, and if the other one also has some Python code then you may need to reconcile the two sets of code.
Which mods do you want to merge? Civ4lerts is already a component of the HoF Mod, along with several other mods.
Dr. Elmer Jiggle's CustomEventManager, it seems to port to BtS will no problems.
Normally, "port" implies that you need to modify it to handle differences in the two games. Did you have to change anything, or can you confirm that using the Warlords version as-is works in BtS? I'm putting together a mashup of various interface mods with NikNaks93, and this is at the top of the list.![]()
def _getInstallDir():
gc = CyGlobalContext()
subkey = r"Software\Firaxis Games\Sid Meier's Civilization 4"
if ((gc.getDefineINT("CIV4_VERSION") / 100) == 2):
subkey += r" - Warlords"
return __getRegValue(_winreg.HKEY_LOCAL_MACHINE, subkey, "INSTALLDIR")
def _getInstallDir():
gc = CyGlobalContext()
subkey = r"Software\Firaxis Games\Sid Meier's Civilization 4"
if ((gc.getDefineINT("CIV4_VERSION") / 100) == 2):
subkey += r" - Warlords"
elif ((gc.getDefineINT("CIV4_VERSION") / 100) == 3):
subkey += r" - Beyond the Sword"
return __getRegValue(_winreg.HKEY_LOCAL_MACHINE, subkey, "INSTALLDIR")
def _getInstallDir():
civ4Dir = __getRegValue(_winreg.HKEY_LOCAL_MACHINE,
r"Software\Firaxis Games\Sid Meier's Civilization 4",
"INSTALLDIR")
civ4Dir = os.path.join(civ4Dir,"Warlords")
return civ4Dir
def _getInstallDir():
civ4Dir = __getRegValue(_winreg.HKEY_LOCAL_MACHINE,
r"Software\Firaxis Games\Sid Meier's Civilization 4",
"INSTALLDIR")
civ4Dir = os.path.join(civ4Dir,"Beyond the Sword")
return civ4Dir
def __init__(self, *args, **kwargs):
super(CvCustomEventManager, self).__init__(*args, **kwargs)
# map the initial EventHandlerMap values into the new data structure
for eventType, eventHandler in self.EventHandlerMap.iteritems():
self.setEventHandler(eventType, eventHandler)
# --> INSERT EVENT HANDLER INITIALIZATION HERE <--
Civ4lerts.Civ4lerts(self)
def __init__(self, *args, **kwargs):
super(CvCustomEventManager, self).__init__(*args, **kwargs)
# map the initial EventHandlerMap values into the new data structure
for eventType, eventHandler in self.EventHandlerMap.iteritems():
self.setEventHandler(eventType, eventHandler)
# --> INSERT EVENT HANDLER INITIALIZATION HERE <--
Civ4lerts.Civ4lerts(self)
CvUnitStatisticsEventManager.CvUnitStatisticsEventManager(self)
J
However, if anyone is using his CvConfigParser you will have to make one addition to make it function.
Open up CvPath.py.
Look for..
and change it to this..Code:def _getInstallDir(): gc = CyGlobalContext() subkey = r"Software\Firaxis Games\Sid Meier's Civilization 4" if ((gc.getDefineINT("CIV4_VERSION") / 100) == 2): subkey += r" - Warlords" return __getRegValue(_winreg.HKEY_LOCAL_MACHINE, subkey, "INSTALLDIR")
Code:def _getInstallDir(): gc = CyGlobalContext() subkey = r"Software\Firaxis Games\Sid Meier's Civilization 4" if ((gc.getDefineINT("CIV4_VERSION") / 100) == 2): subkey += r" - Warlords" elif ((gc.getDefineINT("CIV4_VERSION") / 100) == 3): subkey += r" - Beyond the Sword" return __getRegValue(_winreg.HKEY_LOCAL_MACHINE, subkey, "INSTALLDIR")
Alternatly, in many mods that release versions specific to Warlords or Vanilla (TheLopez's mods would be a good example, and that is where I'm pasting this code from) you should look for this..
and make it look like this..Code:def _getInstallDir(): civ4Dir = __getRegValue(_winreg.HKEY_LOCAL_MACHINE, r"Software\Firaxis Games\Sid Meier's Civilization 4", "INSTALLDIR") civ4Dir = os.path.join(civ4Dir,"Warlords") return civ4Dir
Code:def _getInstallDir(): civ4Dir = __getRegValue(_winreg.HKEY_LOCAL_MACHINE, r"Software\Firaxis Games\Sid Meier's Civilization 4", "INSTALLDIR") civ4Dir = os.path.join(civ4Dir,"Beyond the Sword") return civ4Dir
Have multiple people confirmed that the existing version in the original post will work in BtS? If so I'll give it a try tonight when I get home.
def _getInstallDir():
civ4Dir = __getRegValue(_winreg.HKEY_LOCAL_MACHINE,
r"Software\Firaxis Games\Sid Meier's Civilization 4 - Beyond the Sword",
"INSTALLDIR")
civ4Dir = os.path.join(civ4Dir,"Beyond the Sword")
return civ4Dir
my standard civ 4 key is Sid Meier's Civ 4 Gold
def get_INI_File(szINIFileName):
# BUG - EF: replaced "os.path.dirname(dir)" with "dir"
filepaths = [os.path.join(dir, szINIFileName)
for dir in assetsPath]
for filepath in filepaths:
if os.path.isfile(filepath):
return filepath
return ""