I don't think it's possible to conditionally load XML, because XML is loaded by the executable as far as I know. The intent behind modules is providing variable content on install time, not at runtime.
I haven't worked with Python in modules much, because it's hard to have truly modular Python in the first place. But I guess you could make the root import conditional on some game option without problems.
def onBeginGameTurn(self, argsList):
'Called at the beginning of the end of each turn'
iGameTurn = argsList[0]
## Barbarian Civ ##
if (gc.getGame().isOption(GameOptionTypes.GAMEOPTION_BARBARIAN_CIV)):
BarbCiv.BarbCiv().checkBarb()
## Barbarian Civ ##
CvTopCivs.CvTopCivs().turnChecker(iGameTurn)
added the option in the dll.
at least it wont fire the functions if a player decided not to play with it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.