SettlerReligion Mod

Bhruic

Emperor
Joined
Nov 15, 2005
Messages
1,457
SettlerReligion causes all Settlers created to have a religion based on the religions present in their creating city. The religion is chosen randomly from among the religions present in that city. For example, if a city has Hinduism and Christianity, a settler created in the city has a 50/50 chance of being Hindu or Christian. If there is a state religion, and an empire is operating under the Theocracy Civic, a Settler can only have the state religion. If the city does not have the state religion (even if it has other religions), the Settler will have no religion.

Once the Settler forms a city, that city will automatically get the religion of the Settler. So from the above example, if the Settler was Hindu, once it formed a city, that city would automatically gain Hinduism.

Settlers gained from goody huts, or created in cities with no religions will not have religions, and neither will the cities they create. Also, if this mod is used in a game in progress, any current Settlers will have no religions. Only Settlers created with this mod running will gain religions.

At present, there is no visual display of the religion of the Settler. Until the city is created you won't know what religion it has.

Installation:
SettlerReligion should NOT be installed in your main Civ IV location, as it will overwrite necessary files. Instead, it should be installed at: "My Documents\My Games\Civilization 4".

History:
v0.2
- restricted Settlers to state religion under Theocracy

v0.1
- first release

Bh
 

Attachments

  • SettlerReligion-v0.2.zip
    3.2 KB · Views: 1,051
Updated to v0.2

- restricted Settlers to state religion under Theocracy

Bh
 
Actually, Bhruic, have you considered making all settlers (or at least a majority) of settlers under theocracy be of the NON-state religion, to simulate the kind of persecution that forces religious minorities to strike out and form their own colonies? Just a thought. Otherwise, looks kinda cool :)!

Yours,
Aussie_Lurker.
 
This is a very good idea but if you could add the touch below (not all settlers though, just a few) that would really make it superb. Imagine how annoying that would be! :)

Aussie_Lurker said:
Actually, Bhruic, have you considered making all settlers (or at least a majority) of settlers under theocracy be of the NON-state religion, to simulate the kind of persecution that forces religious minorities to strike out and form their own colonies? Just a thought. Otherwise, looks kinda cool :)!

Yours,
Aussie_Lurker.
 
I really don't think that's a good idea. Gameplay should work in the way the end user expects - if you've selected a civic that says "No non-state religion spread", having settlers spread a non-state religion would be counter-intuitive.

Bh
 
Could you make a version that has just a 25% chance to "catch" a religion? 100% is rather high if you found an early religion: you'll never have to spread it in your own empire.
 
Thalassicus said:
Could you make a version that has just a 25% chance to "catch" a religion? 100% is rather high if you found an early religion: you'll never have to spread it in your own empire.

Err, um I think that's the whole idea. :crazyeye:
 
Warning: Off Topic
Thalassicus, i hate to get all rorschach inkblot test here, but is your avatar a Christian fish humping a dinosaur skeleton? If so, what is the significance of such?
 
Lol no, it's just a fish playing the guitar! :crazyeye:

I like classic guitar and piano, hence the subtitle "the musical fish". I picked up the avatar and nick when a freshman in high school...course, that was ten years ago... :lol:
 
I'll try out your mod, Bhruic, as soon as possible - it sounds VERY nice, and I'm sure it's worth trying :D
 
Im gonna try this out as well...

It seems to me that, if a city makes a settler, the people who make up the settler(that will make the new city) will be of that religion, thus they would automatically spread that religion to the new city.

The spread of religion thru monastery/culture/missionaries would then just to spread to newly captured cities.

Personally, I have always thought this is the way it should have been from the get.


-=R=-
 
I changed it so that when you are not in Theocracy, there's a chance that a settler will not have a religion. For example, if a city has christianity and hinduism, there wil be 1/3 chance for each of these and 1/3 chance for no religion.
There is a risk that I interpreted the code wrongly and that the actual probabilities wil be different. I don't think so, however.
The changed code (in SetterReligion.py) is shown here and is also enclosed:
Code:
			else:
				dice = gc.getGame().getMapRand()
				# Change by RobO: Allow a chance for the settler to not have a religion
				# Each religion in the city and "no religion" has the same probability
				iRandReligion = dice.get(len(listReligions)+1, "Religion Selection - AlterReligion PYTHON")
				if(iRandReligion < len(listReligions)+1):
					iSelectedReligion = listReligions[iRandReligion]
					unit.setScriptData(gc.getReligionInfo(iSelectedReligion).getType())
				else:
					unit.setScriptData("NO_RELIGION")
				# Original code:
				# iRandReligion = dice.get(len(listReligions), "Religion Selection - AlterReligion PYTHON")
				# iSelectedReligion = listReligions[iRandReligion]
				# unit.setScriptData(gc.getReligionInfo(iSelectedReligion).getType())
 

Attachments

  • settler religion change.txt
    775 bytes · Views: 180
I get an exception call with RobO's modofication to the mod:
in onUnitBuilt,
Index error: list index out of range,
and that's in:
iSelectedReligion = listReligions[iRandReligion]

now, I'm a newbie, can't tell why...
 
Saarlaender said:
I get an exception call with RobO's modofication to the mod:
in onUnitBuilt,
Index error: list index out of range,
and that's in:
iSelectedReligion = listReligions[iRandReligion]

now, I'm a newbie, can't tell why...
Try the original code. It ought to crash as well. If it does, then you'e encountered a situation that isn't covered by eny of the versions, and it would be interesting to know what triggers it. It seems to be happening when you build a settler.
Then try the enclosed version and tell me if it works for that savegame.
I'm really guessing here - the documentation of the API is limited.
 

Attachments

  • settler religion change 2.txt
    869 bytes · Views: 199
RobO, thanks for the change (and of course for the original idea, Bhruic) it's just what I was looking for.

Please help me though....How can I use it with Alerum's Unaltered gameplay mod?
 
Top Bottom