[MOD] Eusebius World Religions

Hephaistion said:
Thanks for your help -- after a few days of tinkering, and eliminating arrangements that give me tons of errors all over the place, I've come down to one consistent error:

Traceback:

File "CivAppInterface", line 47, onSave
Attribute Error: 'module' object has no attribute 'onEvent'

Here's my CvCustomEventManager setup (the part I've been messing with):

Spoiler :
import CvEventManager
import CvConfigParser
import CvEnhancedTechConquestEventManager
import CvEnhancedCulturalDecayEventManager
# --------- Revolution mod -------------
import RevUtils
import BarbarianCiv
import AIAutoPlay
import ChangePlayer
import Revolution
import Tester
# ---------- World Religions Mod ----------
import SettlerReligion
import TPEventManager
import ewr
import euMap

gc = CyGlobalContext()
m_moduleList = {}

def getModule(sName):
return m_moduleList.get(sName, -1)


class CvCustomEventManager(CvEventManager.CvEventManager, object):

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 <--
CvEnhancedTechConquestEventManager.CvEnhancedTechConquestEventManager(self)
CvEnhancedCulturalDecayEventManager.CvEnhancedCulturalDecayEventManager(self)

config = CvConfigParser.CvConfigParser("HephMod.ini")

if( config.getboolean("AIAutoPlay", "Enable", True) ) :
AIAutoPlay.AIAutoPlay(self, config)
if( config.getboolean("BarbarianCiv", "Enable", True) ) :
BarbarianCiv.BarbarianCiv(self, config)
if( config.getboolean("ChangePlayer", "Enable", False) ) :
ChangePlayer.ChangePlayer(self, config)
if( config.getboolean("Revolution", "Enable", False) ) :
Revolution.Revolution(self, config)

RevUtils.registerEvents( self, config )

m_moduleList['ewr'] = ewr.ewr(self)
m_moduleList['euMap'] = euMap.euMap(self)
m_moduleList['SettlerReligion'] = SettlerReligion.SettlerReligion(self)
m_moduleList['TpEventManager'] = TPEventManager.TPEventManager(self)

# This component now handles all the mod issue reporting (ActivePopup, etc)
Tester.Tester( self, config )

def beginEvent( self, context, argsList=-1 ):
"Begin Event"
if(self.CustomEvents.has_key(context)):
return self.CustomEvents[context][2](argsList)
else:
return CvEventManager.CvEventManager.beginEvent(self, context, argsList)

def applyEvent( self, argsList ):
'Apply the effects of an event '
context, playerID, netUserData, popupReturn = argsList

if(self.CustomEvents.has_key(context)):
entry = self.CustomEvents[context]
# the apply function
return entry[1]( playerID, netUserData, popupReturn )
else:
return CvEventManager.CvEventManager.applyEvent(self, argsList)


def addCustomEventDefinition(self, eventType, eventDefinition):
self.CustomEvents[eventType] = eventDefinition

def removeCustomEventDefinition(self, eventType):
del self.CustomEvents[eventType]

def setCustomEventDefinition(self, eventType, eventDefinition):
self.CustomEvents[eventType] = eventDefinition


I copied and pasted all those additional "def" entries starting with def Begin Event from the EWR CvCustomEventManager ... wasn't sure if I needed them or not ...

Any thoughts?

You know, I've seen this sort of error once in a blue moon, inconsistantly.
There is nothing I can see wrong in your code. This type of error wants me want to make sure I have an absolutely clean environment--reboot, start a new game, etc. I don't know about you, but I tend to test Python by finding an error, alt-tabbing to editor and changing the python, alt-tabbing back, etc. Once in a while things get hosed that way. Sorry not to be more help. This is precisely the sort of Python question I am weakest on.

The extra defs came with jzoc which is where I got my CvCustomEventManager. I wasn't aware they were non-standard.

Eusebius
 
Eusebius said:
You know, I've seen this sort of error once in a blue moon, inconsistantly.
There is nothing I can see wrong in your code. This type of error wants me want to make sure I have an absolutely clean environment--reboot, start a new game, etc. I don't know about you, but I tend to test Python by finding an error, alt-tabbing to editor and changing the python, alt-tabbing back, etc. Once in a while things get hosed that way. Sorry not to be more help. This is precisely the sort of Python question I am weakest on.

The extra defs came with jzoc which is where I got my CvCustomEventManager. I wasn't aware they were non-standard.

Eusebius

Hmmm ... I'll have to do some more experimenting, then. I'm using Revolution's CvCustomEventManager as my foundation. I tried fitting RevMod into the EWR event manager, but that caused more problems than the other way around. Perhaps I'll try it again with more concerted fiddling.

Whatever your evaluation of your own python skills, I feel like a chimp trying to repair an internal combustion engine ... thanks for your help! I'll grab a few more bananas and move some more things around ...
 
HELP WITH INSTALLATION

I posted this in the newbie file and was directed to post it here, so my apologies if this seems rather juvenile to you folks - but I can't get this mod to run, no matter what I seem to do.

I've downloaded the file, unzipped it, installed in my mods folder in the Program files - it shows up as a playable mod - I select it, it loads, with the name of the mod in the upper right hand corner of the screen, yet the game that ends up being loaded is a generic warlords game, not Eusebius World Religion V41b. I've emptied the cache each time before I play, I've downloaded and installed Patch 208 - I've checked the "About this Build" and it says that the mod is Eusebius World Religion, etc....can anybody give me any ideas of what to try next??

Oh, I also put it in the ini folder as the mod to load, and still nothing but a generic warlord game.

I have downloaded other mods and installed them so that they play, but I must be missing something very obvious. Can anybody give me a heads up on what to do next??

Again, my apologies for posting this tech question here, but the newbie folks thought I'd get better help here than there.
 
boesveld said:
HELP WITH INSTALLATION

I posted this in the newbie file and was directed to post it here, so my apologies if this seems rather juvenile to you folks - but I can't get this mod to run, no matter what I seem to do.

I've downloaded the file, unzipped it, installed in my mods folder in the Program files - it shows up as a playable mod - I select it, it loads, with the name of the mod in the upper right hand corner of the screen, yet the game that ends up being loaded is a generic warlords game, not Eusebius World Religion V41b. I've emptied the cache each time before I play, I've downloaded and installed Patch 208 - I've checked the "About this Build" and it says that the mod is Eusebius World Religion, etc....can anybody give me any ideas of what to try next??

Oh, I also put it in the ini folder as the mod to load, and still nothing but a generic warlord game.

I have downloaded other mods and installed them so that they play, but I must be missing something very obvious. Can anybody give me a heads up on what to do next??

Again, my apologies for posting this tech question here, but the newbie folks thought I'd get better help here than there.

I am happy to have the interest in the mod and I'll give what thoughts I can...

First of all, make absolutely certain that you unloaded the mod in the Warlords\Mod folder. I have outsmarted myself a few times putting a mod in the Vanilla Civ folder by accident.

The ini line I use to start this mod is
Mod = Mods\EusebiusWorldReligion

The other way to check things is to click on 'Advanced' from the main menu. Then 'Load a Mod'. You should then see 'Eusebius World Religion' on the list of mods. If you don't there is definitely something wrong with the position of the folder.

Just to double check, it should be in...
C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Warlords\Mods\EusebiusWorldReligion

Good luck,
Eusebius
 
boesveld said:
HELP WITH INSTALLATION

it loads, with the name of the mod in the upper right hand corner of the screen, yet the game that ends up being loaded is a generic warlords game...

Wait a second, I just re-read that. You are getting farther than I thought. How do you know that it is a generic Warlords game? It wouldn't be immediately obvious from the user interface.

Try this. Go into World Builder, click city-editor. Click on a city. If you have a really long list of religions, then you are definitely using the mod.

Eusebius
 
boesveld said:
I'm really sorry to bother you folks, but I'm having a problem playing this mod. I've downloaded Eusebius World Religion V41b and installed it in C-Program Files-Firaxis-Civ IV-Warlord-Mod - and unzipped the files. It shows up under Advanced on the Play screen under Mods, - there it is every time! I went in and cleared the cache, and although I can click it and a game loads, it most certainly isn't the mod I selected, but a regular game.

I suspect that there is something in the ini. file that I need to add or adjust, but I don't know what it is. I'm not afraid of the ini file - I modified it when I first got the game a short time ago on my much older and slower computer. With my new one, the games have been reinstalled, I've re-downloaded the mod, unzipped, cleared cache, mod appears but still not playable.

Can anyone tell me what it is I still need to do to play this mod?

I posted this originally in the Newbie question forum, and they directed me to ask it here.
Thanks.
Ron


Thanks Eusebius!! I really appreciate you taking the time to help me out. Hopefully this time I'll get it right!!
My hat is off to you for developing and sharing such a fantastic mod.
 
Eusebius said:
Wait a second, I just re-read that. You are getting farther than I thought. How do you know that it is a generic Warlords game? It wouldn't be immediately obvious from the user interface.

Try this. Go into World Builder, click city-editor. Click on a city. If you have a really long list of religions, then you are definitely using the mod.

Eusebius

Eusebius, I really, really want to thank you! I've learned more about my computer, and downloading mods, et al, than I ever imagined - and all because I was DETERMINED to be able to play your mod!

The problem I was having turned out to be with my file extraction and unzipping software. In the past month I had gotten a new computer, and after I downloaded your mod, I used the extraction program that came with the computer to unzip your mod, which seemed to do the trick, but no matter what I did, it still didn't load. After your last message I was still being told that I was loading the mod each time I ran Warlords, but in actual play I was not - which was confirmed when I checked the city editor window in World Builder and found that even though the mod said it was Eusebius World Religion, it still only displayed the religions that came with Warlords. I went online and downloaded Winzip Self Extractor and now your mod (and probably any others I download) plays fine. The problem with the unzip/extract program that came with the computer, as opposed to WinZip self-extractor, (and other programs like WinRar or 7-Zip) was that it opened your mod as "Read only" files. The new program unzips, extracts, and makes playable all the files in your mod.

Thanks for your help, and I'm looking forward to many lost hours playing your mod!!!

Ron
 
Hi Eusebius,

I have spent a bit of time to combine your great religion mod with my Giant Earth Map mod.

Firstly, I am assuming you would not mind me using your mod and post it? I actually titled the combined mod GEM EWR at the moment including both of our documentations.

Morever, since your mod doesn't come with a map and I think it would be a good idea to play your 19 religions mod on a Giant Map with 24 civs, I am wondering if you would even consider adding my map in your mod as a default?
 
Hi Eusebius,

I have spent a bit of time to combine your great religion mod with my Giant Earth Map mod.

Firstly, I am assuming you would not mind me using your mod and post it? I actually titled the combined mod GEM EWR at the moment including both of our documentations.

Morever, since your mod doesn't come with a map and I think it would be a good idea to play your 19 religions mod on a Giant Map with 24 civs, I am wondering if you would even consider adding my map in your mod as a default?

What a great idea! In fact, I am currently working on a major revision which includes a 24 civ SDK, so your map ought to fit perfectly. I see that you have done several maps for various periods; could you post hyperlinks to anything you want included?

Thanks!
Eusebius
 
What a great idea! In fact, I am currently working on a major revision which includes a 24 civ SDK, so your map ought to fit perfectly. I see that you have done several maps for various periods; could you post hyperlinks to anything you want included?

Thanks!
Eusebius

For the moment, just the Giant Earth Map that I want to be included. The others aren't that great and popular + they were made for the vinalla Civ4 :p

I am working on v2.2 of my Giant Earth Map, which I think is the final revision of the map itself. After this I will focus on my World History Series scenarios. So give me a few days and I'll send you the files needed. To play Giant Earth Map on EWR, 3 files actually has to be added or modified. So I will send you those files, marked where I have changed/added your files.

I am actually hoping to intergrate your EWR mod and CivGold 3 with my World History Series, as I believe this can be the best combination of mods for realistic historical games. Since we are working in entirely different parts of the game, may be we could form a super team?
 
I am actually hoping to intergrate your EWR mod and CivGold 3 with my World History Series, as I believe this can be the best combination of mods for realistic historical games. Since we are working in entirely different parts of the game, may be we could form a super team?

I like it. How does this sound for a proposal?
  1. You finish the Giant Earth Map and send me/post the files, which I will include.
  2. I finish my release and you help with testing.
  3. You integrate CivGold with my mod; we both test.
  4. I'll keep CivGold as part of my official releases and maintain the code. I will also integrate other maps you do.
It doesn't look to me as if CivGold is compatible with Warlords 2.08 yet. Is that your understanding? Perhaps that is what their upcoming 4.0 release will be about?

Eusebius
 
Hello Eusebius,
I'm having problems trying to compile the SDK with your changes:
In CvPlayerAI.cpp, the function AI_religionValue(ReligionTypes eReligion) uses 2 variables which don't seem to have been declared: iStateComm and religion.
Are they in the h-file and you forgot to include it, or am I missing something?

Thanks
 
Hello Eusebius,
I'm having problems trying to compile the SDK with your changes:
In CvPlayerAI.cpp, the function AI_religionValue(ReligionTypes eReligion) uses 2 variables which don't seem to have been declared: iStateComm and religion.
Are they in the h-file and you forgot to include it, or am I missing something?

Thanks

if ( GC.getCivicInfo(getCivics((CivicOptionTypes)4)).getNonStateReligionHappiness() > 0 )
{
CvCity* pLoopCity;
int iI, iMod, iLoop, iReligionDiplo=0;
CvReligionInfo& religion = GC.getReligionInfo(eBestReligion);
int iStateComm = religion.getStateReligionCommerce(COMMERCE_GOLD) + religion.getStateReligionCommerce(COMMERCE_RESEARCH) + religion.getStateReligionCommerce(COMMERCE_CULTURE);

If you look really carefully, they are declared inside the 'if' statement. C/C++ actually allows you to declare variables inside any {} section, not just at the beginning of a function. They are only valid inside that block, so if you are trying to reference them someplace else, they will come up as undefined.

I learned C a long time ago and know all kinds of tricks that no one should probably ever actually use :crazyeye: . But in this case, it kept my modifications to the function all in one place.

Eusebius
 
If you look really carefully, they are declared inside the 'if' statement. C/C++ actually allows you to declare variables inside any {} section, not just at the beginning of a function. They are only valid inside that block, so if you are trying to reference them someplace else, they will come up as undefined.

I learned C a long time ago and know all kinds of tricks that no one should probably ever actually use :crazyeye: . But in this case, it kept my modifications to the function all in one place.

Eusebius

This if-statement is in CvPlayerAI::AI_doReligion(), but I don't see any in CvPlayerAI::AI_religionValue(ReligionTypes eReligion) ... :confused:
 
This if-statement is in CvPlayerAI::AI_doReligion(), but I don't see any in CvPlayerAI::AI_religionValue(ReligionTypes eReligion) ... :confused:

/* EWRMOD */
int CvPlayerAI::AI_religionValue(ReligionTypes eReligion)
{
CvCity* pHolyCity;
CvCity* pLoopCity;
int iCommerceCount;
int iValue;
int iLoop;
int iI, iJ;
int iStateComm; // ewrmod
CvReligionInfo& religion = GC.getReligionInfo(eReligion); //ewrmod
if (getHasReligionCount(eReligion) == 0)
{
return 0;
}
iValue = GC.getGameINLINE().countReligionLevels(eReligion);
iStateComm = religion.getStateReligionCommerce(COMMERCE_GOLD) + religion.getStateReligionCommerce(COMMERCE_RESEARCH) + religion.getStateReligionCommerce(COMMERCE_CULTURE);// EWR
for (pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))

:confused: You are right! I have no idea how it happened, but the version of the file that went out with mod seems to be incomplete. It obviously wound't have compiled in its current state. Well, if you replace the top part of the module (through the 'for' statement with the above, you should be good.

Eusebius
 
Neopaganism

Yea its real and there are definatly more than one million followers...

According to the 2001 US Census 521,000 people fall under the heading of neopaganism in the US <note that this was a voluntary declaration in a country where neo pagans have been Brutally persecuted over the course fo the past 200 years> burned at the stake, stoned to death and hunted for sport...so most do not publically decalre themselves (see Salem witch trials and The Trail of Tears)

if over 500k declare themselves in the US then there are defiantly more than 1 million on the planet...

For reference
http://www.census.gov/compendia/statab/population/

I am counting New Age, Wiccan, Druid, Pagan, Spiritualists under neopagan ..i belive that North American Shamanism should also fall into this category but didi not count it in the 521,000...there are a couple other religions listed that may also fall into this catergory ..however i do not have enough persopnal knowlegde of them to say ...

Canada census for 2001 shows the following
http://www12.statcan.ca/english/cen...eveProductTable.cfm?Temporal=2001&PID=67773&A

some where between 29 and 45 thousand neopagans
 
hmmn seems when i looked up the 2001 Census of the Russian Federation it kicks back weird stats like 1.4 million people of the russion federation consider themselves middle Earthers <from the tolkienin triolgy ...ergo i dont think that the people fo the russian fed liked having people come to their homes and ask silly categorizing questions cant say as i blame them...
 
Neopaganism

Yea its real and there are definatly more than one million followers...

Sure it is real. But it doesn't have much by way of "buildings" in the Civ sense of the word. No government has ever adopted it as state religion. I figure the civic 'Environmentalism' covers Neopagan values pretty well.

Eusebius
 
Sure it is real. But it doesn't have much by way of "buildings" in the Civ sense of the word. No government has ever adopted it as state religion. I figure the civic 'Environmentalism' covers Neopagan values pretty well.

Eusebius

True it does cover the values eheh we cant have everything ;o) ..and after some thought the best place for it is under aboriginal primordal (ie animalist and spiritualistic religions without human sacrifice)
 
Top Bottom