Announcement

Collapse
No announcement yet.

Method for preventing Holy Cities

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Method for preventing Holy Cities

    Well in all honesty what I have developed is a little Python Code that imediatly removes the Holy City of a religion after it is placed.

    As far as I can tell Firaxis hardcoded most of the aspects of Holy Cities. You cant remove it with a simple City.setHasReligion and their is only one function that sets it and this function only alows it to be moved to an existing city.

    I start by completly bypassing the noraml onReligionFounded event. All this dose is prevent the movie from poping up, the Holy City is still randomly placed presumably outside of Python because I cant find any reference to it being placed anyware. Then I get the religion that was founded and the city it was founded in. Inorder to remove it I had to create a barbarian city way off at cordinates (0, 0) ware it wouldnt do any harm, move the holyCity their and then destroy the city. Now the original city can be striped of its religion.

    Its functional but messy and I continue to get 2 anoying "Religion was founded in City" and "Religion has spread to City" messages. In addition the Religion founded date is set. The game is obviosly still triggering messages and logging things at the time the Holy City got placed. It seems I must nip the whole thing in the bud to realy effectivly prevent the Holy City.

    def onReligionFounded(self, argsList):
    'Religion Founded'
    #NOFOUNDING
    #self.parent.onReligionFounded(self, argsList);
    #INSERT MODS
    iReligion, iFounder = argsList
    pCity = gc.getGame().getHolyCity(iReligion)
    xCity = gc.getPlayer(gc.getBARBARIAN_PLAYER()).initCity(0, 0)
    gc.getGame().setHolyCity(iReligion, xCity, False)
    pCity.setHasReligion(iReligion, False, False, False)
    xPlot = xCity.getCityIndexPlot(xCity.getID())
    xCity.kill()
    xPlot.erase()
    Thats what I am using so far. Dose anyone have a better idea as to how it could be done?
    Companions the creator seeks, not corpses, not herds and believers. Fellow creators, the creator seeks - those who write new values on new tablets. Companions the creator seeks, and fellow harvesters; for everything about him is ripe for the harvest. - Thus spoke Zarathustra, Fredrick Nietzsche
Working...
X