Abandon/Raze City and Buildings

Nemo

Warlord
Joined
Oct 14, 2001
Messages
129
Location
Nusquam
I have modified the old Abandon/Raze City/Building mod found here.

All rights and credits go the the original author(s). I merely fixed it to work with Beyond the Sword v3.13. Please note that this also works with v3.17.

Enjoy!
 

Attachments

  • AbandonCityWithWorker-DemolishBuilding_v3.13.zip
    4.6 KB · Views: 1,479
I saw this mod a while ago, and now its finally for BtS!
I always get annoyed when I capture and keep a city which gets annoying later

I was wondering though whether you know a way to convert this to C++. I plan to add this to a personal mod, and python changes slow down my game.

Thanks, and good work!
 
karl&friedrich: No, I do not know of a way to convert this to c++, sorry. I glad you appreciate it though!

To change it to C++ you might want to start by looking at the python SDK dependencies (imports, and their imports, ..n) and then figure out which API calls it is using on the SDK. That will get you a pretty good head start on merging it into your mod. Good luck with it!
 
find the expanded mod folder, if you're using it, and copy the files into the appropriate sub folders. exit the game and reload (using the mod)

Well actually i need to merge it, into another mod!!
 
I think you can just modify the AbandonRazeDemolish.py file. In the file there are two lines that appear hard coded (instead of using the built in unit get id method).

Try to change the following to lines in the file from:

Player.initUnit(5, ix, iy, UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION)

to:

Player.initUnit(4 ix, iy, UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION)

and again from:

razor.initUnit(5, city.plot().getX(), city.plot().getY(), UnitAITypes.NO_UNITAI)

to:

razor.initUnit(4, city.plot().getX(), city.plot().getY(), UnitAITypes.NO_UNITAI)

That should do it for you. Just change the number 5 to number 4 in both of those lines. This assumes you haven't modified your unit XML files with other mods.

HTH
 
I'm not really sure. I've been too busy to test it. Most mods I play have custom DLLs, which means that they are not still compatible with BtS3.17
 
I tested it with both the basic civ bts and the next war mod. It works with both without problems.

I normally put the files here:

\My Documents\My Games\Beyond the Sword\CustomAssets\python\AabandonRazeDemolish.py

\My Documents\My Games\Beyond the Sword\CustomAssets\python\CvCustomEventManager.py

\My Documents\My Games\Beyond the Sword\CustomAssets\python\entrypoints\CvEventInterface.py
 
Happy new year :D

Thanks to the maker of this mod.

I have a question:

Im using the Rise of Mankind v2.51 mod and i try to use this mod together.

How can i make this mod work with ROM v2.51?

Thanks for any help

I wish everyone the best for this year.

Tore
 
help!
okay so i am having a little bit of an issue here... i am working on a mod comp of revdcm with nextwar/inquisition, and id love to incorpriate this mod into it.

i have gone over the python files so much, and i still cant get the window option to delete or abandon to pop up. i dont think im coding it right. revdcm and this mod have one common file, civeventinterface.py in the entrypoints folder, and i noticed that the abandonraze civeventiterface.py calls on the civutils.py in python. im so lost, is do you have any insight on how to do this so that it works? ive searched the forum for mods that combine the two and i am coming up short, its either one or the other.

thanks
ps ive enclosed the files of both mod comps, its just three, i hope anyone can make sense of this.
 

Attachments

  • review.rar
    7.7 KB · Views: 176
help!
okay so i am having a little bit of an issue here... i am working on a mod comp of revdcm with nextwar/inquisition, and id love to incorpriate this mod into it.

i have gone over the python files so much, and i still cant get the window option to delete or abandon to pop up. i dont think im coding it right. revdcm and this mod have one common file, civeventinterface.py in the entrypoints folder, and i noticed that the abandonraze civeventiterface.py calls on the civutils.py in python. im so lost, is do you have any insight on how to do this so that it works? ive searched the forum for mods that combine the two and i am coming up short, its either one or the other.

thanks
ps ive enclosed the files of both mod comps, its just three, i hope anyone can make sense of this.

i had to change some variable names if i recall correctly. feel free to check the code in my mod.

i find what is best is to use winmerge. there is alot going on with this mod.
 
Top Bottom