Unofficial addon - Abandon City Raise building mod

Joined
Jul 5, 2004
Messages
23,562
Location
Canberra, Australia
Hi,

I have been following this thread Abandon City raise building Mod then merged the latest with RoM 2.5 and what do you know it works.

Here it is. Use Ctrl-A when in the city screen to get a pop up which asks what it is you want to get rid of.

:eek:- I compressed and uploaded my backup not the actual code - sorry

30th January - updated to RoM 2.52. Which means it no longer works with 2.51. I am sure I have tested it in full but it has been over 36C (98.5F) the last three days here and neither my computer or I are handling it well :sad:

1st Feb - fixed bug that gave wolves rather than settlers when you abandoned a large city. You should get 1 settler per 5 population plus 1 worker per 2 population for any left over population. Eg raising a city of 23 should give you 4 settlers and 1 worker.

15th Feb - now respawns holy cities if the holy city is only for one religion. Just like the original respawn function.
 
:eek: Oh yes! I've been looking to break down buildings the moment I started playing Civ 4! I mean, your opponents can break down the city for you, why wouldnt you be able to do it yourself?

Yaay :) :goodjob:
 
Why don't you try it, code32, and let us know? ^^

@DH, I hope you meant "no this is not yet compatible" ;)
 
Nice! I was yesterday checking the original abandon city mod to see if it could be merged - now today I see you've already done it! :D Anyway, I got at least one question to you: Does your addon check if Respawning holy cities option is on when you try to raze cities? I mean if city has holy city and you raze it, then the mod has to relocate holy city if that option is turned on. Not sure if there was other issues that I was trying to figure out yesterday...

Edit: Another thing is that AI doesn't know how to use this feature so I think there should be penalty for human player when using this feature because you can use this feature for your own advantage - something like gold cost to demolish building (100gold per building) - demolishing buildings is expensive.
 
@zappara

It is a very simple merge into RoM as I am still learning Python.

It does not respawn holy cities. If you trash the holy city it is gone. I am not sure that i would want it to be respawned at random I feel you should need to use a prophet to move the holy city and then another to build the shrine, but that may be too much and I don't know how to do it anyway.

On the cost to demolish - I am not sure I agree. In Civ 3 and earlier you could sell the building to private enterprise and get money for it. It still disappeared from the city. Also it is abandon building not really demolish, you are leaving it standing and letting it run to ruin.
 
When the AI takes over a city pretty much all the buildings are demolished anyway - so somehow the AI does know how to do this. You lose a developed city to the AI and take it back, it's naked of development. I'm very interested in this mod if it works reliably. Has it been tested for multiplayer functionality?
 
It does not respawn holy cities. If you trash the holy city it is gone. I am not sure that i would want it to be respawned at random I feel you should need to use a prophet to move the holy city and then another to build the shrine, but that may be too much and I don't know how to do it anyway
I'm just saying that some players might use the RESPAWN_HOLY_CITIES game option which can be found from RoM's GameDefinesAlt.xml file. That mod component works so that when it's enabled and any city is razed and has a holy city, the holy city is respawned to new city. So AbandonRaze city mod component would have to check if player is using Holy city respawn mod component as well. ;)
 
I was doing more testing, or doing my full list of tests and found that I had not changed the unit number for settlers so this mod was producing wolves not settlers :blush:

When the AI takes over a city pretty much all the buildings are demolished anyway - so somehow the AI does know how to do this. You lose a developed city to the AI and take it back, it's naked of development. I'm very interested in this mod if it works reliably. Has it been tested for multiplayer functionality?

I have no idea how to play multiplayer - so I have not done any testing for multiplayer.

I'm just saying that some players might use the RESPAWN_HOLY_CITIES game option which can be found from RoM's GameDefinesAlt.xml file. That mod component works so that when it's enabled and any city is razed and has a holy city, the holy city is respawned to new city. So AbandonRaze city mod component would have to check if player is using Holy city respawn mod component as well. ;)

Currently it calls the kill() function on the city. If it caused a onRaiseCity event then it should do the right thing. Now I need to figure out how to do it.

Later - I tried to call the onRaseCity event but nothing happened and settlers were not produced. So I copied the code and lost all the screen elements. I am still working on it.

@zappara - one question does the RESPAWN_HOLY_CITIES code work is the city is the holy city for more than one religion?
 
@zappara - one question does the RESPAWN_HOLY_CITIES code work is the city is the holy city for more than one religion?
If I remember reading from Orion's Inquisition mod thread correctly, there's small bug in that system still - not sure so I'll have to check his thread...
 
OK, I seem to have the code for respawning holy cities working with the abandon city code. The only problem is that the holy city is not being respawned.

I suspect that the "city" parameter passed to the onCityRazed event is not the same as the thing as the pHeadSelectedCity thing in the Abandon mod.

I know what the latter is because it is in the code as
pHeadSelectedCity = CyInterface().getHeadSelectedCity()

Does anyone know for sure that they are the same or not? If they are the same then I am looking in the wrong place.

Still to do - decide if abandoning a city should give pioneers of colonists if tech allows and how many pop each should take.

Attached is the current code just in case someone can see my error. The code in question is near the end of file and has abandon comments before and after.
 
Silly me - it does work. Just like the original respawn holy city mod.

Neither work if the city is the holy city for multiple religions. Which was what I was running the tests on :crazyeye:

See first post for down load.
 
Neither work if the city is the holy city for multiple religions. Which was what I was running the tests on :crazyeye:
That's known bug and I think it might have been solved in Orion's Inquisition v2.00d which was just released. I've downloaded it and will merge new fixes from it to the next patch.
 
Back
Top Bottom