1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Holy city reallocation

Discussion in 'Rhye's and Fall Modmods' started by usi, Aug 21, 2009.

  1. usi

    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.
     
  2. BurnEmDown

    BurnEmDown Chieftain

    Joined:
    Jul 18, 2008
    Messages:
    1,718
    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.
     

    Attached Files:

  3. Cethegus

    Cethegus Chieftain

    Joined:
    Feb 28, 2008
    Messages:
    922
    Location:
    Finland
    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.
     
  4. usi

    usi Shogun

    Joined:
    Jun 20, 2007
    Messages:
    239
    Location:
    Connecticut, USA
    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%

    Not completely, because religions might not respawn.
    But, it's easy to change the codes such that Christianity always reallocate its holy city.
     
  5. Panopticon

    Panopticon Utilitarian

    Joined:
    Aug 4, 2007
    Messages:
    1,434
    Location:
    Ireland
    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?
     
  6. usi

    usi Shogun

    Joined:
    Jun 20, 2007
    Messages:
    239
    Location:
    Connecticut, USA
    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?
     
  7. JujuLautre

    JujuLautre Chieftain

    Joined:
    Apr 9, 2007
    Messages:
    3,112
    Location:
    Kansai, Japan
    Nice job :) I'm now only hoping that Rhye would include that in his next release, in some form or another ^^
     
  8. mitsho

    mitsho Chieftain

    Joined:
    Nov 3, 2003
    Messages:
    6,815
    Location:
    Europe, more or less
    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?
     
  9. Lone Wolf

    Lone Wolf Chieftain

    Joined:
    Dec 4, 2006
    Messages:
    9,865
    "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.
     
  10. mitsho

    mitsho Chieftain

    Joined:
    Nov 3, 2003
    Messages:
    6,815
    Location:
    Europe, more or less
    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
     
  11. Lone Wolf

    Lone Wolf Chieftain

    Joined:
    Dec 4, 2006
    Messages:
    9,865
    And it happens because Christian holy city gets razed by the barbs. Maybe the Barbarians should just refuse to raze holy cities.
     
  12. Panopticon

    Panopticon Utilitarian

    Joined:
    Aug 4, 2007
    Messages:
    1,434
    Location:
    Ireland
    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.
     
  13. usi

    usi Shogun

    Joined:
    Jun 20, 2007
    Messages:
    239
    Location:
    Connecticut, USA
    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).
     
  14. BurnEmDown

    BurnEmDown Chieftain

    Joined:
    Jul 18, 2008
    Messages:
    1,718
    Yes me too, and I'm sure many others also hope for this.
     
  15. NerfCothons

    NerfCothons Chieftain

    Joined:
    Aug 25, 2008
    Messages:
    286
    Location:
    Denver, CO
    I would support such a change if possible
     
  16. ThurinEthir

    ThurinEthir Chieftain

    Joined:
    Dec 28, 2008
    Messages:
    126
    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.
     
  17. dagriggstar

    dagriggstar Chieftain

    Joined:
    Mar 23, 2006
    Messages:
    548
    Location:
    Adelaide, Australia
    Is it possible for say Lhasa to get the Buddhist holy city as an independent ?
     

Share This Page