[MOD] Eusebius World Religions

Pachacutec said:
Actually, Islam is what is considered to be an "Abrahamic faith", meaning that it traces itself back to Abraham, who's life is narrated in the old testament and is named as a prophet in the Qur'an. Judaism, Christianity, Islam and Baha'i are all Abrahamic faiths. Jesus is also mentioned in the Qur'an as a prophet. So, Islam really isn't independent from all other faiths. That said, at the time of Islam's founding, Arabia was primarily polytheistic, so it doesn't make too much sense to require Judaism or Christianity.

Also, a suggestion: Make the founding of religions a function of great prophets. You can apply all the rules you want to religion founding; i.e. Christianity can only be founded in a city with Judaism by a civ with theology, Sikhism can only be founded in a city with Islam and Hinduism, Confucianism can only be founded by a civ with code of laws. This would make way more sense from a historical accuracy point of view, and best of all you don't have to modify the tech tree or buildings. The only thing that worries me is that there might be too few great prophets generated over the course of a game. I'll suggest this to some other modders and see what kind of reaction I get. I might even learn me some python.

BTW: MY FIRST POST

The main question to the prophets poping religion, is that the A.I. tends to not do it. A new mission would need to be created and the SDK would need to be modified to have the A.I. do this. Not an easy task in itself. Something requiring a good deal of C++ to have it done correctly.

I think though some of the new tags that the CCCP made available and which Eus should be starting to use may help out a bit. Once he adapts the CCCP into his .DLL he will gain the ability to do a few things that currently are not available plus we are creating new tags from sugestions. (Eus, I need your tag needs again so I can send it off to Impaler)

I'm excited about the buildings/wonders giving diplomatic bonus or penalty and its going to be fleshed out so it can be controled dynamicly in python.
That way you can have religions that are opposed to other religions or in line with other religions and give diplomatic bonus or penelty. I don't know if Eus wants to go that route but its an interesting option.
 
Ket said:
The main question to the prophets poping religion, is that the A.I. tends to not do it. A new mission would need to be created and the SDK would need to be modified to have the A.I. do this. Not an easy task in itself. Something requiring a good deal of C++ to have it done correctly.

I think though some of the new tags that the CCCP made available and which Eus should be starting to use may help out a bit. Once he adapts the CCCP into his .DLL he will gain the ability to do a few things that currently are not available plus we are creating new tags from sugestions. (Eus, I need your tag needs again so I can send it off to Impaler)

I'm excited about the buildings/wonders giving diplomatic bonus or penalty and its going to be fleshed out so it can be controled dynamicly in python.
That way you can have religions that are opposed to other religions or in line with other religions and give diplomatic bonus or penelty. I don't know if Eus wants to go that route but its an interesting option.

As for GPs popping religions, it might be a lot of work, but everything else seems like a stopgap measure to me. Besides, changing the tech tree to add religions really mucks up the flow of the game. Prophets solve petty much every accuracy/balance problem related to religion that I can think of.

What do you guys think of having more than one shrine for some religions? or perhaps a shrine that can be popped by a GP that has a different function from standard shrines in Civ 4 (+1 beaker per city with taoism). I know that there are a number of really important mosques all over the muslim world.

Btw, what is the CCCP? I know it stands for Civ 4 Community Core Project, but that's about it.
 
Ket said:
The main question to the prophets poping religion, is that the A.I. tends to not do it. A new mission would need to be created and the SDK would need to be modified to have the A.I. do this. Not an easy task in itself. Something requiring a good deal of C++ to have it done correctly.


Its not that hard to do and there is even two ways to do it.

The easy way:
Let the prophet create a bulding that founds the religion and immediately destroy the building. This way you dont need to do a SDK mod and the user will not see the differance.

The harder way:
Is to make an SDK mod as you say, but after looking into the source code i can say that its a easy change for anyone with some knoledge in C++.
 
Hello I am trying to combine my flavor units mod with this one. I am having problems. I feal that I have semi successfully combined them. I am getting a python error message at the end of every turn in game.

Here is the error message

Exeption

Traceback ( most recent call last)

File "CvGameInterface", line 178, in AI_doDiplo
File "TPGameUtils", line 191, in AI_doDiplo

Attribute Error 'CyGlobalContext', object has no attribute 'CyGame'


Here is the related Python script

Here is the TPGameUtils line 191 the error was a 191 not 197

# Having some problems with this getting called early in the game.
if (gc.CyGame().getGameTurn() < 3):
return False


The last line is line 191

Here is the CvGame Interface line 178

def AI_doDiplo(argsList):
'AI decides does diplomacy for the turn - return 0 to let AI handle it, return 1 to say that the move is handled in python '
#CvUtil.pyPrint( "CvGameInterface.AI_doDiplo" )
return gameUtils().AI_doDiplo(argsList)

The line that starts 'AI is line 178

If I could maybe get an interpretation of this or a direction to go in it would be highly appricaited. I like the look of this mod and would verymuch like to include into my game.
 
tlucky4life said:
Here is the error message

Exeption

Traceback ( most recent call last)

File "CvGameInterface", line 178, in AI_doDiplo
File "TPGameUtils", line 191, in AI_doDiplo

Attribute Error 'CyGlobalContext', object has no attribute 'CyGame'

It sounds like you havent import CyGame correctly.
 
I'll look into this mod later today. Quite interesting to see that someone has done a Shintoism mod to add into Civ4.
 
Morkul said:
It sounds like you havent import CyGame correctly.

What is cygame and how do I import it correctly?

At first I tryed to add this mods files and add them to my mod then I tryed to take my game files and add them to this mod and I got the very same error message
 
Alright Ive figured out that I need to know what cygame means and the reference to in the tpgameutils python file. In other words what does cygame equal? Has anyone else tried to combine this mod with there own. If so were there any similiar probs. I could really use some help on this one Ive been :wallbash: for about two days now.
 
That bug is not due to combination but certainly within this mod. I didn't change anything but also get the error. Playing it with debugging enabled unfortunatly still is a pain. As soon that's fixed I'll give it another try and search for more exceptions. Sorry not enough into python to be really of help here-can't do more than copypaste currently to be true:p
 
well Im just happy Im not alone on this. I tryed to get this thing to work for about two days, then I gave up and cut it out of my mod. I may try to retry it agian, I like the mod if I didnt get 8 exceptions (the same exception) every turn that I had to close befor I could play the next turn.
 
Ket said:
The main question to the prophets poping religion, is that the A.I. tends to not do it. A new mission would need to be created and the SDK would need to be modified to have the A.I. do this. Not an easy task in itself. Something requiring a good deal of C++ to have it done correctly.

FYI, the function tpConsiderFounding in TPEventManager.py hard codes this. If they can, AI Civs will always found a religion when a great prophet is born unless they (1) already have one, (2) don't have free religion and (3) lose a 50-50 random chance.

Eusebius
 
tlucky4life said:
well Im just happy Im not alone on this. I tryed to get this thing to work for about two days, then I gave up and cut it out of my mod. I may try to retry it agian, I like the mod if I didnt get 8 exceptions (the same exception) every turn that I had to close befor I could play the next turn.

Just released 0.23 with this bug fixed. I really apologize for this. The error was entirely mine. Somehow I didn't get or missed the e-mail that there was traffic on this thread or I would have jumped in much sooner.

Eusebius
 
Eusebius,

Imagine my surprise when I saw that it was complete!!!! Thank you so much.
We have 2 problems that I noticed right off the bat.

1) There is a python error.
ewr:759: SyntaxWarning: name 'Paganism' is used prior to global declaration
ERR: Call function onEvent failed. Can't find module CvEventInterface

2) It looks like the merge was done on 1.0 of the mod. Which has a MAJOR problem in that Plot List Enhancement is broken. Also I have made some python changes since then. I'm going to produce a patch for this and send it to you. Not sure if I can tackle the first problem. But I can tackle the second.

3) cvmodname.py can not be changed or the python ini reader's will no longer function.
 
Ok this file corrects 2 and 3...

If at all possible please remove both download links for the add on and replace it with this (after #1 is fixed)

This is essentially your add on the only changes I made was to sync it to my version 1.3 (Formations, Unit Size, Python Directory, Remove the buggy PLE, changed cvmodname.py) Now I cant figure out how to fix the global define. Other than define it at the top is that the best thing to do?
 
Ket said:
Ok this file corrects 2 and 3...

If at all possible please remove both download links for the add on and replace it with this (after #1 is fixed)

This is essentially your add on the only changes I made was to sync it to my version 1.3 (Formations, Unit Size, Python Directory, Remove the buggy PLE, changed cvmodname.py) Now I cant figure out how to fix the global define. Other than define it at the top is that the best thing to do?

Will fix #3 tonight; also found another bug last night. Simply removing the global statements down in getworldview ought to do it. I think they are extraneous; Python scoping and global initialization still confuses me. I keep trying to fix things and breaking others.

If anyone wants to do their own fix before I get to it...
The calls to ewr.addMessage in TPEventManager.py ought to be calls to CvUtil.pyAddMessage.

The wording of your note suggests there was supposed to be a file link, but I don't see one. Did something get left out inadvertantly?

I'm sort of doing my testing by release at this point, under the disclaimer of 'beta'. If anyone wants to suggest/volunteer a more formal approach, I would be very interested. I have not done collaborative software work over the net before and am not completely sure of the etiquette involved.

Thanks,
Eusebius
 
http://www.filefactory.com/file/ca41d7/ WOOPS
i have the global i think in that moved to the top...

Also the formations.xml needs a quick edit with the old missionarys not in the game removed.
That was a bug I induced when I updated the formations.

As far as etiquette, who knows... Just help each other get quality releases out?

:)
 
Eusebius, HELLO TO YOU,

first id like to say that your work is immpressive.

i thank you for making this mod, it gives "life" to the religion in civ, and this mod outdone what the game creators did.


now,
i wonder, is it possible you will be able to help me combie this mod in mine?
i know its alot to ask, but, ill understand if you wont. its not easy.

anyway again , increddible work.
 
Pachacutec said:
Also, a suggestion: Make the founding of religions a function of great prophets. You can apply all the rules you want to religion founding; i.e. Christianity can only be founded in a city with Judaism by a civ with theology, Sikhism can only be founded in a city with Islam and Hinduism, Confucianism can only be founded by a civ with code of laws. This would make way more sense from a historical accuracy point of view, and best of all you don't have to modify the tech tree or buildings. The only thing that worries me is that there might be too few great prophets generated over the course of a game. I'll suggest this to some other modders and see what kind of reaction I get. I might even learn me some python.

I've been meaning to get back to this. Most religions in the mod do require a great prophet and work basically the way you describe. Have a look at the religion tables referenced in the first post in order to see the requirements to found each religion.

Eusebius
 
Making bug fixes for the new release and got a new one...

Traceback (most recent call last):
File "CvAppInterface", line 46, in onSave
File "e:/main/civilization4/warlords/assets/python/system\pickle.py", line 1386, in dumps
File "e:/main/civilization4/warlords/assets/python/system\pickle.py", line 214, in __init__
SystemError: unknown opcode

None of these are my files. Anyone got any suggestions?

Thanks,
Eusebius
 
You might want me to handle the file database download for the Add-On that was I can make sure that it stays updated with the latest version of both of our code. Don't worry I'll be sure to give you credit for it.

That way you dont have to update 2 code bases just one base and I can handle the updates from my end when you update your mod.

So I guess remove the file database entry for the add-on I'll do a fix to the base I gave you, and an update with your latest changes. And re-release it?
Then once thats done you can change the link in your First Post and it should be synced. I'll do a post on my forum with the details on the add on and we can go from there.

In so far as pickle.py
Ok something is reading from a pickle

"Pickling"' is the process whereby a Python object hierarchy is converted into a byte stream, and "unpickling"' is the inverse operation, whereby a byte stream is converted back into an object hierarchy.

Detailed Python Pickle Info
Spoiler :

"A pickle" is a program for a virtual pickle machine (PM, but more accurately
called an unpickling machine). It's a sequence of opcodes, interpreted by the
PM, building an arbitrarily complex Python object.

For the most part, the PM is very simple: there are no looping, testing, or
conditional instructions, no arithmetic and no function calls. Opcodes are
executed once each, from first to last, until a STOP opcode is reached.

The PM has two data areas, "the stack" and "the memo".

Many opcodes push Python objects onto the stack; e.g., INT pushes a Python
integer object on the stack, whose value is gotten from a decimal string
literal immediately following the INT opcode in the pickle bytestream. Other
opcodes take Python objects off the stack. The result of unpickling is
whatever object is left on the stack when the final STOP opcode is executed.

The memo is simply an array of objects, or it can be implemented as a dict
mapping little integers to objects. The memo serves as the PM's "long term
memory", and the little integers indexing the memo are akin to variable
names. Some opcodes pop a stack object into the memo at a given index,
and others push a memo object at a given index onto the stack again.

At heart, that's all the PM has. Subtleties arise for these reasons:

+ Object identity. Objects can be arbitrarily complex, and subobjects
may be shared (for example, the list [a, a] refers to the same object a
twice). It can be vital that unpickling recreate an isomorphic object
graph, faithfully reproducing sharing.

+ Recursive objects. For example, after "L = []; L.append(L)", L is a
list, and L[0] is the same list. This is related to the object identity
point, and some sequences of pickle opcodes are subtle in order to
get the right result in all cases.

+ Things pickle doesn't know everything about. Examples of things pickle
does know everything about are Python's builtin scalar and container
types, like ints and tuples. They generally have opcodes dedicated to
them. For things like module references and instances of user-defined
classes, pickle's knowledge is limited. Historically, many enhancements
have been made to the pickle protocol in order to do a better (faster,
and/or more compact) job on those.

+ Backward compatibility and micro-optimization. As explained below,
pickle opcodes never go away, not even when better ways to do a thing
get invented. The repertoire of the PM just keeps growing over time.
For example, protocol 0 had two opcodes for building Python integers (INT
and LONG), protocol 1 added three more for more-efficient pickling of short
integers, and protocol 2 added two more for more-efficient pickling of
long integers (before protocol 2, the only ways to pickle a Python long
took time quadratic in the number of digits, for both pickling and
unpickling). "Opcode bloat" isn't so much a subtlety as a source of
wearying complication.


Pickle protocols:

For compatibility, the meaning of a pickle opcode never changes. Instead new
pickle opcodes get added, and each version's unpickler can handle all the
pickle opcodes in all protocol versions to date. So old pickles continue to
be readable forever. The pickler can generally be told to restrict itself to
the subset of opcodes available under previous protocol versions too, so that
users can create pickles under the current version readable by older
versions. However, a pickle does not contain its version number embedded
within it. If an older unpickler tries to read a pickle using a later
protocol, the result is most likely an exception due to seeing an unknown (in
the older unpickler) opcode.

The original pickle used what's now called "protocol 0", and what was called
"text mode" before Python 2.3. The entire pickle bytestream is made up of
printable 7-bit ASCII characters, plus the newline character, in protocol 0.
That's why it was called text mode. Protocol 0 is small and elegant, but
sometimes painfully inefficient.

The second major set of additions is now called "protocol 1", and was called
"binary mode" before Python 2.3. This added many opcodes with arguments
consisting of arbitrary bytes, including NUL bytes and unprintable "high bit"
bytes. Binary mode pickles can be substantially smaller than equivalent
text mode pickles, and sometimes faster too; e.g., BININT represents a 4-byte
int as 4 bytes following the opcode, which is cheaper to unpickle than the
(perhaps) 11-character decimal string attached to INT. Protocol 1 also added
a number of opcodes that operate on many stack elements at once (like APPENDS
and SETITEMS), and "shortcut" opcodes (like EMPTY_DICT and EMPTY_TUPLE).

The third major set of additions came in Python 2.3, and is called "protocol
2". This added:

- A better way to pickle instances of new-style classes (NEWOBJ).

- A way for a pickle to identify its protocol (PROTO).

- Time- and space- efficient pickling of long ints (LONG{1,4}).

- Shortcuts for small tuples (TUPLE{1,2,3}}.

- Dedicated opcodes for bools (NEWTRUE, NEWFALSE).

- The "extension registry", a vector of popular objects that can be pushed
efficiently by index (EXT{1,2,4}). This is akin to the memo and GET, but
the registry contents are predefined (there's nothing akin to the memo's
PUT).


All that being said maybe a mis-alligned tuple? Anyway my sugest would be to draft a quick PM to TheLopez explain to him as much as you can and ask if he could give you a hand with what the heck to do to fix it.
 
Top Bottom