Religious decay

OK, in the next day or two I hope to have a version up with the basics plus the option to stop a holy city loosing its religion. Then I will start on the civics.

Currently, the probability that decay happens is checked and if it does then a religion is chosen at random from the (valid) ones in the city. Which means that they have equal probability of going. So I need to change this last bit. My idea is:-

Code:
Assign a number to each religion based on whether or not it is state religion
  If the religion's holy shrine is built in the city decrease this number (eg -25)
  For each of this religions wonders or national wonders in the city decrease the number (eg -10)
  For each other building in the reduce the number (eg -5)

If any number is less that zero adjust the number for each religion up by twice the value

Get a random number based on the total of the numbers for all religions

Choose the religion where the cumulative total (of number) is greater than the random number.

Does this sound about right?
 
Attached is a version of Religion Decay which works with RoM (and AND). I have only added the holy city decay option. Config file is in the usersettings folder.

You will need to add the following line to the Config\Init.xml file to get it to work.

Code:
	<events module="CvJReligionDecayEventManager">	</events>

Put it with the other RoM "<events ..." entries.

To do:-
. Scale with game speed
. Civics affect which religion goes
. Buildings affect which religion goes.
 
Attached is a version of Religion Decay which works with RoM (and AND). I have only added the holy city decay option. Config file is in the usersettings folder.

You will need to add the following line to the Config\Init.xml file to get it to work.

Code:
	<events module="CvJReligionDecayEventManager">	</events>

Put it with the other RoM "<events ..." entries.

To do:-
. Scale with game speed
. Civics affect which religion goes
. Buildings affect which religion goes.

I now have code to scale for game speed.

Slight change on the proposed mechanism
  • Civics will affect the probability that a religion will go.
  • Buildings will affect which religion goes.

My problem with these is making it so that the mod works for any base mod not just RoM.
 
I am not liking the way this mod is going :). It does not support my game style!

I have "game speed" and "religious influence" working but need to get the civic adjustments in. I think it will need a BUG screen for the options. It also needs some messages added to inform you what has happened.

Game speed - affects how often a turmoil "may" happen.
Religious Influence - affects which religion goes, the less infulence a religion has in the city the more likely it is to go.
 
For the love of the gods, Hoskuld, is 6 posts in a row really necessary?

For the love of whatever mythological deity, check the time stamp of the posts :). He posted 6 posts in a row because no one had posted anything in between!
 
For the love of the gods, Hoskuld, is 6 posts in a row really necessary?

One every seven days or a bit less in the beginning, maybe not. However the last one was needed because I posted to mod this morning and wondered why no one had commented or downloaded this evening when I realised I needed yo bump the thread.
 
I think it's a good idea. Maybe it will find its way into an AND update.
 
i think it's better suited for DH/AArandas religion mod to keep the religion icons for cities at a bearable level ;).
nah but seriously, the more religions there are the more religious decay is needed imho.
 
This looks awesome!

Is it going to be incorporated into AND in the future? Or is it just saying a mod for AND?

Im going to include this in the next version of UM Project or Clash of Civilizations. depending.
 
This looks awesome! :D

Is it going to be incorporated into AND in the future? Or is it just saying a mod for AND?

It does not need AND in anyway shape or form so it should be a RoM mod that works with AND/ ;)

i think it's better suited for DH/AArandas religion mod to keep the religion icons for cities at a bearable level ;).
nah but seriously, the more religions there are the more religious decay is needed imho.

Im going to include this in the next version of UM Project or Clash of Civilizations. depending.

In my view it still has problems.
  • I need to fix the decay that occurs when a religion spreads to a city (removed from beta) because it is the religion that spreads that decays most often. While typing this I though of the obvious fix :)
  • I am not completely convinced that I have it reading the configuration file correctly.
  • If the state religion can decay I am not applying the civic probability modifiers to it.
  • I need to learn how to update the config file, and put an option for this on the Custom game screen or put it in a BUG options tab. Not sure which.
 
cool, take your time dude:) by the way i got one question though off topic, how i know wether custom python files are compatible with a new dawn? especially since they not really touching or effecting any of the existing python files. Only change is in the cvMainInterface.py in the screens. Just not sure how to extract just that part and put it into proper version of RoM/AnD. Any guidelines you got for me? i want to try it out myself so can just get a hang of it. And i dont want to be a trouble:P oh and if i wanted to create any new corporations will i have to make changes to any python files?
 
cool, take your time dude:) by the way i got one question though off topic, how i know wether custom python files are compatible with a new dawn? especially since they not really touching or effecting any of the existing python files. Only change is in the cvMainInterface.py in the screens. Just not sure how to extract just that part and put it into proper version of RoM/AnD. Any guidelines you got for me? i want to try it out myself so can just get a hang of it. And i dont want to be a trouble:P

Mostly the mods I have worked on are independent of each other and so are "BUG modular". Which means that only the config\init.xml needs to be edited to include the code. There is a tutorial on how to do this type of python in the BUG modder's guide.

If you are changing cvMainInterface.py then it is not modular and you need to make a new copy every time RoM/AND put out a new release since they will probably update the file also. Since I may need to change this bit of python as well we may end up with configuration problems.

Recently, StrategyOnly put out an "Animal Placement mod" which at first needed changes to the screen files but after NotSoGood restructured it, it became more independent but I have not managed to get it fully working with RoM due to time constraints.

And i dont want to be a trouble:P oh and if i wanted to create any new corporations will i have to make changes to any python files?

As far as I know corporations do not necessarily need python.
 
Recently, StrategyOnly put out an "Animal Placement mod" which at first needed changes to the screen files but after NotSoGood restructured it, it became more independent but I have not managed to get it fully working with RoM due to time constraints.

please update me on your advancement on that mod.
 
Back
Top Bottom