View Full Version : [ModComp] JUnitReligion Mod
Jeckel May 18, 2006, 02:25 AM JUnitReligion Mod is based on Bhruic's old SettlerReligion mod and uses Dr Elmer Jiggle's CustomEventManager and Stone-D's SD-Toolkit.
This mod has two main funtions. The first functions almost identically to Bhruic's SettlerReligion mod(ie settlers get a religion from the city that builds them and that religion is given to the city when the settler builds it), but with several differences.
1) There is a base chance whether or not the Settler gets a religion from the city.
2) If the city has the State Religion AND is under Theocracy there is a percent chance the Settler will get the State Religion.
3) If the city has the State Religion but is NOT under Theocracy there is a percent chance the unit will receive the State Religion.
4) The three above percent chances are configurable through a Config.ini file.
In addition to Settlers getting a religion from the city that builds them, I have expanded this to all units, not just the Settler.
The other primary function of this mod is to allow units to spread their personal religion to cities they fortify in. Through the config.ini file you can turn unit religion spreading on/off as well as define the number of turns a unit must be fortified before their religion can spread.
Note: As of v0.45 the default is set for Sea and Air Domain units to not get religion. This can be changed in the ini file and Land Domain is controlable also.
Note: Warlords Compatability with JUnitReligion v0.5 and later!!
To play this mod in warlords, install the mod like normal. Then go into the JUnitReligion's Python directory and open the CvModName.py file in a text editor. Just change expansionWarlords = False to expansionWarlords = True and the mod will work in Warlords.
For detailed steps to making it work for Warlords see the spoiler below.
New Version 0.5 Released. Now with Warlords compatibilty.
The new version comes set up for regular Civ4 v1.61. If you wish to play it in Warlords follow the steps below.
1) Download the mod.
2) Unzip the mod to your Civilization 4/Warlords/Mods directory as normal.
3) Open the Civilization 4/Warlords/Mods/JUnitReligion/Assets/Python directory.
4) In that directory open the CvModName.py file in Notepad or any text editor.
5) Change the line
expansionWarlords = False
to
expansionWarlords = True
6) Save the file, load the mod, and play as normal. :)
File: JUnitReligion_v0.48.zip
Compatible: Civ4 v1.61
Mod Folder: Mods\JUnitReligion
Released: July 15, 2006
Size: 20.33
CivFanatics: JUnitReligion Mod v0.48 (http://forums.civfanatics.com/downloads.php?do=file&id=240) File Now Available
FileFront: JUnitReligion Mod v0.48 (http://files.filefront.com/JUnitReligion_v048zip/;5257929;;/fileinfo.html) File Now Available
File: JUnitReligion_v0.5.zip
Compatible: Civ4 v1.61 and Warlords
Mod Folder: Mods\JUnitReligion
Released: August 1, 2006
Size: 20.73
CivFanatics: JUnitReligion Mod v0.5 (http://forums.civfanatics.com/downloads.php?do=file&id=1153) Beta File Released *Updated August 8, 2006*
FileFront: JUnitReligion Mod v0.5 (http://files.filefront.com/JUnitReligion_v05zip/;5371232;;/fileinfo.html) Beta File Released *Updated August 8, 2006*
Houman May 19, 2006, 01:53 PM This sounds great. However if I have Hindusim, Zoroastrism and Chritianity in my City. Is there a difference between how many percentage of the city follows which religion etc? Or is that not yet doable in Civ?
Thanks
Houman
Jeckel May 20, 2006, 07:31 PM That is doable, but I don't have it in this mod yet, but sounds like a good suggestion. Let me clarify to be sure I understand what you are saying. :)
Athens has population 10 and the religions Hindusim, Zoroastrism and Chritianity. 6 pops are Zoroastrian, 2 pops are Hindu, and 2 pos are Christys.
So when a Settlar is built it will have a 60% chance to be Zoro, 20% to be Hindu, and 20% of being Christian.
Is this what you are suggesting?
Grave May 21, 2006, 10:34 AM That's a damn good idea!
Houman May 23, 2006, 08:52 AM That is doable, but I don't have it in this mod yet, but sounds like a good suggestion. Let me clarify to be sure I understand what you are saying. :)
Athens has population 10 and the religions Hindusim, Zoroastrism and Chritianity. 6 pops are Zoroastrian, 2 pops are Hindu, and 2 pos are Christys.
So when a Settlar is built it will have a 60% chance to be Zoro, 20% to be Hindu, and 20% of being Christian.
Is this what you are suggesting?
Sorry for late resonse, this is exactly what i was suggesting. :D
Jeckel May 24, 2006, 01:39 PM Well, I got some free time last night and got the next version of this mod about half done. I am going to try and finish today or tomorrow and should have it uploaded and post by this weekend. :D
Houman May 25, 2006, 02:46 AM Excellent. So we could implement this into the Realism Mod.
:D
Greetz
Houman
Mr. Dictator May 28, 2006, 11:19 PM maybe if there was 6 Christian, 2 Hindu, and 2 Taoist, there is a chance that your city will randomly spawn a settler to escape persecution.
i dont know bout that idea though because sometimes you may not have anywhere to expand, but you could just move them to a city that would accept them.
ohwell
Jeckel Jun 01, 2006, 11:58 AM @Mr. Dictator
I like the idea of spawning a unit from the minority religion part of society, but how about, instead of settlar, a missionary is spawned and sets out to find a new home.
Jeckel Jun 01, 2006, 12:30 PM WooHOoo!! I finnaly released a new version that has religion spreading from units other then just the settler. I have been putting in a few minutes here, couple minutes there on this mod for the past week so the code is a little messyer then I would like, but it should all work. If anyone comes across any problems just let me know. :)
File linked in first post and I left the origonal version up until I am satified that this version is glitchless.
Mr. Dictator Jun 01, 2006, 03:00 PM @Mr. Dictator
I like the idea of spawning a unit from the minority religion part of society, but how about, instead of settlar, a missionary is spawned and sets out to find a new home.
yeah, that sounds good, is there any way to make missionaries say, build a mission? dont know exactly what it could do but eventually become a city......not really sure about that idea though
Houman Jun 03, 2006, 12:04 PM That is doable, but I don't have it in this mod yet, but sounds like a good suggestion. Let me clarify to be sure I understand what you are saying. :)
Athens has population 10 and the religions Hindusim, Zoroastrism and Chritianity. 6 pops are Zoroastrian, 2 pops are Hindu, and 2 pos are Christys.
So when a Settlar is built it will have a 60% chance to be Zoro, 20% to be Hindu, and 20% of being Christian.
Is this what you are suggesting?
Were you able to make this idea work in the 0.41 version?
Cheers
Houman
Jeckel Jun 03, 2006, 12:10 PM I don't know about the whole creating more cities thing, but I was thinking and how about this.
If a minority religion in a city, lets say the 2 Hindus from the above example, feel persequted they can flee the city and find some other city to move to. The first city would then lose 2 population(and its hindu religion) and a few turns later some close city would gain 2 population(and hindu religion if it doesn't already have it).
I am working on an udated version of Snaif's First Contact mod atm, but I will start planning out how to add Detailed City Religions and Religious Refugges to this mod. :)
Mr. Dictator Jun 07, 2006, 01:25 PM oh that sounds pretty good
Jeckel Jun 07, 2006, 03:30 PM @Houman
Sorry I missed your last post until just now. And no, I haven't put that option in yet, I working on it when I get free time, but will probly be a week or two before I release the next version containing those features. :)
Tholish Jun 24, 2006, 05:53 AM As long as you are thinking about counting the quantity of religions what about doing something about the effects of buildings. If you only have one hindu, for example, how could hindu buildings create more than 1 happiness? How are cathedrals making all these, say, moslems happy?
Jeckel Jun 24, 2006, 01:12 PM @Tholish
Good point, thanx for bringing that to my attention, I will add that to the feature feature list and will try to put it in the upcoming version. :)
Caesium Jun 24, 2006, 02:01 PM Sometimes python raises the message, that unit with "none" isn't defined or something like that. What's this?
Caesium Jul 07, 2006, 12:11 PM Hi, it's me again, here is the error message I get:
Traceback (most recent call last):
File "CvEventInterface", line 23, in onEvent
File "CvCustomEventManager", line 184, in handleEvent
File "CvCustomEventManager", line 195, in _handleDefaultEvent
File "CvJUnitReligionEventManager", line 55, in onBeginPlayerTurn
File "CvJUnitReligionGameUtils", line 283, in onBeginPlayerTurn
AttributeError: 'NoneType' object has no attribute 'getNumUnits'
ERR: Python function onEvent failed, module CvEventInterface
An that's my question:
How do I get rid of the problem?
Jeckel Jul 07, 2006, 06:25 PM Sorry I didn't see your first post about this Caesium, I've been swamped these past few weeks. I will look into that this weekend, I have an idea of what is causeing it and shouldn't have much problem telling ya how to fix it. I'll post up an answer later today or tomorrow, when I get the time. :)
Jeckel Jul 09, 2006, 07:20 AM K Caesium, I looked into that error and I know how to fix it, I think. I will try to fix this and release a new version some time this coming week. If you know how cut and past into python I can pm you the lines that you need to add and tell ya where to paste them. :)
Caesium Jul 09, 2006, 11:57 AM No problem, just pm me, meanwhile I know python very well.
Jeckel Jul 11, 2006, 05:54 AM New Version Released
Alright, v0.45 has been uploaded, check the first post for the link. This version should be alot more stable as I rewrote it all to be more in keeping with the structure used by TheLopez in his ModComps.
There are three new config.ini options to control is Land, Sea, or Air units get a chance to have a religion when built. By default Land units can have religion, but Sea and Air units can not.
I ran it through about an hour of intensive testing, but its likly that a few small exceptions made it through, but none of the mod mechanics or game play should be effected. Please, anyone that plays without python exceptions hidden, please report any errors you get. :)
Caesium Jul 11, 2006, 01:48 PM OK, just a few comments:
In line 80, you set the wrong ini-Name
In lines 84-86 it must be getboolean instead of getint
And, now, I've got two errormessages:
Traceback (most recent call last):
File "CvEventInterface", line 23, in onEvent
File "CvCustomEventManager", line 188, in handleEvent
File "CvCustomEventManager", line 199, in _handleDefaultEvent
File "CvJUnitReligionEventManager", line 48, in onBeginPlayerTurn
File "CvJUnitReligionGameUtils", line 518, in onBeginPlayerTurn
TypeError: iterable argument required
ERR: Python function onEvent failed, module CvEventInterface
Traceback (most recent call last):
File "CvEventInterface", line 23, in onEvent
File "CvCustomEventManager", line 188, in handleEvent
File "CvCustomEventManager", line 199, in _handleDefaultEvent
File "CvJUnitReligionEventManager", line 48, in onBeginPlayerTurn
File "CvJUnitReligionGameUtils", line 478, in onBeginPlayerTurn
AttributeError: 'NoneType' object has no attribute 'getNumUnits'
ERR: Python function onEvent failed, module CvEventInterface
Jeckel Jul 11, 2006, 09:28 PM Thanx Caesium, I got the typo errors fix and am looking into the exceptions. I thought I had both those fixed, will go over them again and get them fixed tonight, give me a couple hours and will have a new version up. :)
Jeckel Jul 11, 2006, 09:52 PM Bug Fixed Version Released
K, I think I solved those problems mentioned by Ceasium a few posts above. Opening post updated with the link to v0.46. :)
Caesium Jul 12, 2006, 08:16 AM Next bug detected:
I gave buddhism to the city, where I was building the settler.
As I built the settler the message was, settler has judaism.
As I let him found the city, this city had judaism, while I didn't have judaism in any city.
Another question: Would you add an ini-switch for the informations?
In my opinion it would be better, if you don't know, what religion the settler's got.
Edit:
New error:
Traceback (most recent call last):
File "CvEventInterface", line 23, in onEvent
File "CvCustomEventManager", line 185, in handleEvent
File "CvCustomEventManager", line 196, in _handleDefaultEvent
File "CvJUnitReligionEventManager", line 48, in onBeginPlayerTurn
File "CvJUnitReligionGameUtils", line 491, in onBeginPlayerTurn
AttributeError: 'NoneType' object has no attribute 'isNone'
ERR: Python function onEvent failed, module CvEventInterface
djKianoosh Jul 12, 2006, 03:30 PM just curious, but if you have this mod, are we missing the point of having missionaries and those other types of religious units? doesn't this defeat the purpose of those other units? just wondering. not meaning to diss your work, i'm sure it's good stuff.
Jeckel Jul 12, 2006, 07:47 PM Next bug detected:
I gave buddhism to the city, where I was building the settler.
As I built the settler the message was, settler has judaism.
As I let him found the city, this city had judaism, while I didn't have judaism in any city.
Fixed, I just had a 0 instead of the zero position of a list.
Another question: Would you add an ini-switch for the informations?
In my opinion it would be better, if you don't know, what religion the settler's got.
It was an accedent that the message was still on. I agree it is best to not know the settler's religion until the city is built, so I turned it off. I'll add ini options to turn some of the messages back on to the future feature list.
Traceback (most recent call last):
File "CvEventInterface", line 23, in onEvent
File "CvCustomEventManager", line 185, in handleEvent
File "CvCustomEventManager", line 196, in _handleDefaultEvent
File "CvJUnitReligionEventManager", line 48, in onBeginPlayerTurn
File "CvJUnitReligionGameUtils", line 491, in onBeginPlayerTurn
AttributeError: 'NoneType' object has no attribute 'isNone'
ERR: Python function onEvent failed, module CvEventInterface
This is basicly the same error we've gotten in each of the last version. It is a invalid pPlot being sent, but I get the plot from a list of the players cities and as each city has to be on a plot I don't understand how it could be NoneType. What is the happening when you get this exception, is it early in the game or late, about how many cities do you have, ect. Once I get some idea of how this is happening I might be able to recreate the exception and then fix it, cause as it stands I have never gotten this error myself. But until then I'll see what I can do about working around it. :)
Thanx again for the help, I'll have a new version with the mentioned fixes in a few hours, just have to finish some other things up.
Jeckel Jul 12, 2006, 07:56 PM just curious, but if you have this mod, are we missing the point of having missionaries and those other types of religious units? doesn't this defeat the purpose of those other units? just wondering. not meaning to diss your work, i'm sure it's good stuff.
Not completely defeat the purpose of missionairys, but definetly makes them not as crucial. I made it cause religion spread always seem static and to controlable to me. I wanted to tie the spread of religion to the movement of people, more like it is in real life. Obviously this is not a modcomp for everyone, but I enjoy coding it and atleast Caesium and a few others think it adds to their enjoyment of the game. In the end, thats all that is needed. :)
Caesium Jul 12, 2006, 08:15 PM Fixed, I just had a 0 instead of the zero position of a list.I thought of something like that. :) It was an accedent that the message was still on. I agree it is best to not know the settler's religion until the city is built, so I turned it off. I'll add ini options to turn some of the messages back on to the future feature list.Sounds good.This is basicly the same error we've gotten in each of the last version. It is a invalid pPlot being sent, but I get the plot from a list of the players cities and as each city has to be on a plot I don't understand how it could be NoneType. What is the happening when you get this exception, is it early in the game or late, about how many cities do you have, ect. Once I get some idea of how this is happening I might be able to recreate the exception and then fix it, cause as it stands I have never gotten this error myself. But until then I'll see what I can do about working around it. :)I added your Mod to my Mod Compilation, it works pretty good, despite of this little error.Thanx again for the help, I'll have a new version with the mentioned fixes in a few hours, just have to finish some other things up.No problem. Time's on your side. I think, I'll get to bed now.
Jeckel Jul 12, 2006, 10:58 PM Bug Fixed Version Released
There I think that should have solved just about everything. I am working on v0.5 right now, it will have a some cool new features, if no more problems pop up with this beta version I will probly realse v0.5 by the end of next week. :)
Caesium Jul 13, 2006, 02:29 AM Hi,
it's me again.
I've got a new error:
Traceback (most recent call last):
File "CvEventInterface", line 23, in onEvent
File "CvCustomEventManager", line 187, in handleEvent
File "CvCustomEventManager", line 198, in _handleDefaultEvent
File "CvJUnitReligionEventManager", line 46, in onBeginPlayerTurn
File "CvJUnitReligionGameUtils", line 618, in onBeginPlayerTurn
File "CvJUnitReligionGameUtils", line 546, in runSpreadUnitsReligion
AttributeError: 'NoneType' object has no attribute 'getNumUnits'
ERR: Python function onEvent failed, module CvEventInterface
Jeckel Jul 13, 2006, 02:39 AM Cool, thanx, I am working on this issue *fistshakes at NoneType*. Is this exception from just my mod or is this from your mod composite? If you can get this exception with just my mod and post up a the savegame file that would really help me out. :)
But this last exception aside, everything else seems to be good to you?
Caesium Jul 13, 2006, 03:51 AM This exception only occurs with your mod. Any other implemented modcomp works very well.
As attachment a savegame with exception.
Jeckel Jul 15, 2006, 02:50 AM WooHoo, the NoneType problem is solved. Thanx to some advise from TheLopez I fixed the issue and have uploaded the final 0.4x version. Thanx also to Caesium for all the testing and error reporting.
If any one happens upon any new exceptions please report them, but I think it is pretty stable now. :)
n003lb Jul 15, 2006, 04:52 PM 1 quick question. I'm fairly new to modding Civ and I am curious about combining this with other mods. Since this appears to be a python only mod, it should not conflict with an XML only mod, should it? Do I just copy the python folder and the .ini files to the other mod to combine them?
Sorry for the stupid question.
Caesium Jul 15, 2006, 05:45 PM @Jeckel:
I tested the new code and let the AI autoplay for altogether 350 turns, and there was no error message. So, I think, now the error is corrected.
Jeckel Jul 16, 2006, 09:21 AM @Caesium
Sweet, glad to hear it. Now that we've got a stable version I can get back to working on the new features for v0.5. :)
@n003lb
Yep that is about all you have to do. The only other thing, in the <your mod>/Assets/Python directory there is a file called CvModName.py, open that file in a text editor and you will find this line
modName = "JUnitReligion"
Change the JUnitReligion part to the name of your mod and that should be all ya need to do. :)
Louis XXIV Jul 18, 2006, 05:04 PM If there is a percentage of the population that has a religion, could you make it so missionaries increases the percentage of that one religion (or would there be no point?). Also, along the same lines, would it be possible to attempt to destroy a religion in your city (can't think of any practical application of this, except for maybe to introduce some kind of Inquisitor unit)?
Jeckel Jul 19, 2006, 04:56 AM Currently there is no detailed breakdown of what pop is which religion. But as for the removal of religion, I am working on a religion decay mod that will work for religion kinda like the CulturalDecay mod does for culture. This will be out some time in August. This will include a more detailed breakdown of religion demographics of your cities. And yes, I will see about the missionaries thing, that sounds like somthing that will work well with the overal system of my religion mods. Thanx for the input. :)
Caesium Jul 19, 2006, 05:51 AM There already exists a inquisition mod. The only problem is, that the AI isn't able to use this unit properly. A new script to this and the unit as an addition would be cool.
Jeckel Aug 01, 2006, 12:53 PM @Caesium
Yea, the AI use is an issue, but I'm not making any new actions, I'm just going to use turns fortified and random percent chances, aswell as state religions and some civics. So if I just stick to using built in things that already get used, it is more of a side effect then somthing the AI has to actively do. :)
Jeckel Aug 01, 2006, 12:58 PM New Version 0.5 Released. Now with Warlords compatibilty.
The new version comes set up for regular Civ4 v1.61. If you wish to play it in Warlords follow the steps below.
1) Download the mod.
2) Unzip the mod to your Civilization 4/Warlords/Mods directory as normal.
3) Open the Civilization 4/Warlords/Mods/JUnitReligion/Assets/Python directory.
4) In that directory open the CvModName.py file in Notepad or any text editor.
5) Change the line
expansionWarlords = False
to
expansionWarlords = True
6) Save the file, load the mod, and play as normal. :)
zulu9812 Aug 02, 2006, 02:16 AM Excellent. I really like your mods, so its good to see them being updated for Warlords.
zulu9812 Aug 06, 2006, 03:50 AM Whenever I play with this mod (v0.5 for Warlords) I get the following red messages (at top left of screen) at the start of every turn:
iEra = UNITCLASS_SCOUT
iEra = UNITCLASS_SCOUT
iEra = UNITCLASS_SCOUT
iEra = UNITCLASS_SCOUT
iEra = UNITCLASS_WARRIOR
iEra = UNITCLASS_WARRIOR
No error pop-ups that I have to click through - just that messages all the time. I assume that the iEra extends to all instances of all unit types currently in play, but the game can't display all the messages at once.
Jeckel Aug 06, 2006, 06:59 AM Oops, sorry bout that, looks like I left a debug message on, I'll fix that when I get home tonight and repost the file. :)
zulu9812 Aug 07, 2006, 03:04 PM bump - was this fixed?
Jeckel Aug 08, 2006, 12:11 PM It is now fixed, uploaded, and linked to. Sorry for any inconvience. :)
NikNaks Aug 10, 2006, 12:04 PM Could I use this in my mod? Please? I really like the idea!
Jeckel Aug 10, 2006, 01:24 PM Could I use this in my mod? Please? I really like the idea!
Yes, you can use any of the mods I make. Like all the other modders I only ask for a little props if you use it in a mod you make. :)
I'm happy to hear you like it. :thanx:
And if like JUnitReligion Mod, you might also like JReligionDecay Mod... It isn't released yet, but I'm about 60-70 percent done, just working out some kinks before adding in the final features, so keep your eyes pealed. :cool:
Fachy Mar 31, 2007, 09:20 PM Excellent. So we could implement this into the Realism Mod.
Houman
Houman, is this mod in your TR for warlords?
@ Jeckel is this 2.08 compatible??
Also how can I prevent landunits (except settlers, of course!) from having a religion?? Thanks for the good work :D
Houman Apr 01, 2007, 09:04 AM no it isn't included yet.
Fachy Apr 01, 2007, 10:47 PM It's very easy to include, because I could merge it in my composite mod (http://forums.civfanatics.com/showthread.php?t=190225), but I dunno if it'll need to be updated to 2.08
Edward The Big Oct 10, 2007, 06:15 AM I figured it out...My Bad.
marx&engles Oct 16, 2007, 04:39 PM Is it possible to make this compatible w/ BtS?
|
|