Holy city reallocation

usi

Shogun
Joined
Jun 20, 2007
Messages
239
Location
Connecticut, USA
I didn't fully test it, but I guess it does what it's supposed to do.

What changes wll be made:
Some religions will have some chances of moving their holy cities to somewhere else when the cities are razed.

How to use:
Just unzip the attached zip file and place CvEventManager.py into "Mods\Rhye's and Fall of Civilization\Assets\Python" and overwrite the existing one.

How the new holy city is selected:
The city must
(1) be owned by a civ whose state religion is the same as the religion which just lost its holy city and
(2) have the religion which just lost its holy city.

If the owner of the razed city has other cities that satisfy the conditions above, the player's city closest to the razed city will be chosen for the new holy city.
Else, the city which satisfies the conditions above and closest to the razed holy city will be chosen.
 
I've tried a few 3000 BC starts as Arabia, but in none of them was the holy city for Judaism or Christianity razed.
I'm gonna try 2 more times, I'll update if there's any razing going on :P.
Edit: Success!
Just a few turns before I spawned, I got this message:
The holy city was moved not to the closest city which was in Egypt, but to Medialonium. I think this is best, Rome's and Greece's chances of getting the holy city for Christianity should be higher than the rest of the world. As for other religions I have no idea except maybe for Khmer or China for Buddhism.
 

Attachments

  • holycity1.jpg
    holycity1.jpg
    43.1 KB · Views: 197
Awesome. I suppose this fixes the "bug" of getting an easy UHV as the Khmer after barbs have wiped out Jerusalem?

I'd love to do a few 3000 BC Khmer starts but my computer can't handle Civ anymore. :D; Thanks for doing this, though. It should make the game much more interesting with Panopticon's Protestantism modcomp.
 
I've tried a few 3000 BC starts as Arabia, but in none of them was the holy city for Judaism or Christianity razed.
I'm gonna try 2 more times, I'll update if there's any razing going on :P.

You can use WB to check (e.g., by placing some units near a holy city and then razing the city by the units).

Currently, the chances of reallocation are:
Chirstianity: 75%
Judaism: 10%
Islam: 75%
Buddhism: 50%
Confuscianism: 25%
Others: 0%

Awesome. I suppose this fixes the "bug" of getting an easy UHV as the Khmer after barbs have wiped out Jerusalem?

Not completely, because religions might not respawn.
But, it's easy to change the codes such that Christianity always reallocate its holy city.
 
This looks great, what is the situation with Shrines though? I presume they do not transfer to the new city, but can they be rebuilt?
 
This looks great, what is the situation with Shrines though? I presume they do not transfer to the new city, but can they be rebuilt?

Currently, if the holy city is razed with a Shrine, the Shrine can't be rebuilt (like many other world wonders). SDK modding is neccessary to make a world wonder rebuildable, but I can't compile an SDK and I don't know why, so currently I can't do that.

Nevertheless, it is possible for me code the Shrines to move to the new holy cities. But what I am afraid of is that this might produce "too lucky" event to the player who receives a free Shrine (e.g., Rome was razed by barbs and an Egyptian city gets Christian holy city and its Shrine for free). How do you think?
 
I don't know. I kinda liked when one religion is absent. it seems fair that if you lose the holy city, the religion won't really expand anymore.

Would it be difficult to lower the spread rate (half it) if a holy city has been razed?
 
it seems fair that if you lose the holy city, the religion won't really expand anymore.

"Fair" to whom? It's not Christianity's fault that the civs who usually found it are designed to be decimated by the barbs.

Current system results in nearly every 3000BC game resulting in Islamic Europe.
 
fair to alternative reality gameplay ;-) and I must say, I haven't played a 3000 BC game for a while so I cannot really comment on it. But if there's a Islamic Europe all the time there, then that's a balancing issue at first and foremost
 
then that's a balancing issue at first and foremost

And it happens because Christian holy city gets razed by the barbs. Maybe the Barbarians should just refuse to raze holy cities.
 
Currently, if the holy city is razed with a Shrine, the Shrine can't be rebuilt (like many other world wonders). SDK modding is neccessary to make a world wonder rebuildable, but I can't compile an SDK and I don't know why, so currently I can't do that.

Nevertheless, it is possible for me code the Shrines to move to the new holy cities. But what I am afraid of is that this might produce "too lucky" event to the player who receives a free Shrine (e.g., Rome was razed by barbs and an Egyptian city gets Christian holy city and its Shrine for free). How do you think?

I think that if the Shrine can only be built once, that is perfect. Like the Temple in Jerusalem, it shouldn't be rebuilt once destroyed.
 
Then I guess my part of the job is pretty much done.
I reread the codes again and found few inefficiencies, but they don't slow down the game more than a second I presume.
I hope Rhye will include the codes in the next release (with some modifications to the reallocation chances etc whenever appropriate).
 
Yes me too, and I'm sure many others also hope for this.
 
And it happens because Christian holy city gets razed by the barbs. Maybe the Barbarians should just refuse to raze holy cities.
That's the case in Warlords, I'm pretty sure. The only time I've ever seen a holy city destroyed is when a city is destroyed due to being in a civ's spawn area (for example, Gordion and Turkey).
So it should certainly be possible. I'll try poking around and see if I find anything.
 
Back
Top Bottom