ERLoft
Nov 26, 2005, 02:28 AM
Ok, I'm not ever likely to release this, as very little of it is my own work, and I'd need the individual permission of each mod maker, but I'm trying to combine a number of mods, including, but not limited to:
Realism
Lost Units
Lost Wonders
Forestry
Great People
I've been using Compare It! and jEdit to work on the XML files, which I think I'm getting set up correctly (won't know until I try to load the mod, now will I?). But I have a question regarding Python files.
I already have a CvEventInterface python file from Realism in the EntryPoints directory, which is a bit different than the CvEventInterface python file from the Great People mod. Here's the two files:
####################################
#### Civilizations 4 Realism Mod ###
#### by jaynus ###
####################################
#
# Events Engine Overwite interface file
#
import CvUtil
import CvRealismEventManager
from CvPythonExtensions import *
eventManager = CvRealismEventManager.CvRealismEventManager()
def getEventManager():
return eventManager
def onEvent(argsList):
'Called when a game event happens - return 1 if the event was consumed'
return getEventManager().handleEvent(argsList)
def applyEvent(argsList):
context, playerID, netUserData, popupReturn = argsList
return getEventManager().applyEvent(argsList)
def beginEvent(context, argsList=-1):
return getEventManager().beginEvent(context, argsList)
and
# Sid Meier's Civilization 4
# Copyright Firaxis Games 2005
#
# CvEventInterface.py
#
# These functions are App Entry Points from C++
# WARNING: These function names should not be changed
# WARNING: These functions can not be placed into a class
#
# No other modules should import this
#
import CvUtil
import CvGreatPersonEventManager
from CvPythonExtensions import *
greatPersonEventManager = CvGreatPersonEventManager.CvGreatPersonEventManage r()
def getEventManager():
return greatPersonEventManager
def onEvent(argsList):
'Called when a game event happens - return 1 if the event was consumed'
return getEventManager().handleEvent(argsList)
def applyEvent(argsList):
return getEventManager().applyEvent(argsList)
def beginEvent(context, argsList=-1):
return getEventManager().beginEvent(context, argsList)
So, can these two be combined by simply taking the items in bold from the Great Person Mod and inserting them into the Realism CvEventInterface? And as the def getEventManager(): ?function? returns different items in each of the two examples, how should I go about resolving this? (Sorry, not a programmer, just decent with computers...)
Thanks for any help!
Realism
Lost Units
Lost Wonders
Forestry
Great People
I've been using Compare It! and jEdit to work on the XML files, which I think I'm getting set up correctly (won't know until I try to load the mod, now will I?). But I have a question regarding Python files.
I already have a CvEventInterface python file from Realism in the EntryPoints directory, which is a bit different than the CvEventInterface python file from the Great People mod. Here's the two files:
####################################
#### Civilizations 4 Realism Mod ###
#### by jaynus ###
####################################
#
# Events Engine Overwite interface file
#
import CvUtil
import CvRealismEventManager
from CvPythonExtensions import *
eventManager = CvRealismEventManager.CvRealismEventManager()
def getEventManager():
return eventManager
def onEvent(argsList):
'Called when a game event happens - return 1 if the event was consumed'
return getEventManager().handleEvent(argsList)
def applyEvent(argsList):
context, playerID, netUserData, popupReturn = argsList
return getEventManager().applyEvent(argsList)
def beginEvent(context, argsList=-1):
return getEventManager().beginEvent(context, argsList)
and
# Sid Meier's Civilization 4
# Copyright Firaxis Games 2005
#
# CvEventInterface.py
#
# These functions are App Entry Points from C++
# WARNING: These function names should not be changed
# WARNING: These functions can not be placed into a class
#
# No other modules should import this
#
import CvUtil
import CvGreatPersonEventManager
from CvPythonExtensions import *
greatPersonEventManager = CvGreatPersonEventManager.CvGreatPersonEventManage r()
def getEventManager():
return greatPersonEventManager
def onEvent(argsList):
'Called when a game event happens - return 1 if the event was consumed'
return getEventManager().handleEvent(argsList)
def applyEvent(argsList):
return getEventManager().applyEvent(argsList)
def beginEvent(context, argsList=-1):
return getEventManager().beginEvent(context, argsList)
So, can these two be combined by simply taking the items in bold from the Great Person Mod and inserting them into the Realism CvEventInterface? And as the def getEventManager(): ?function? returns different items in each of the two examples, how should I go about resolving this? (Sorry, not a programmer, just decent with computers...)
Thanks for any help!