[WTN]Manhattan
Feb 07, 2007, 05:42 AM
I tried to figure out how to allow only one religion per city as in the Omens scenario from Warlords (if you use a missionary to convert a city, the next turn the previous religion disappeares and only your new religion remains). I can't find anything in the xml files. It shouldn't be a SDK matter as there is no new dll in the Omens mod folder. Maybe Phyton is needed. Does anyone know something about that?
Kael
Feb 07, 2007, 09:09 AM
Manhattan;5075346']I tried to figure out how to allow only one religion per city as in the Omens scenario from Warlords (if you use a missionary to convert a city, the next turn the previous religion disappeares and only your new religion remains). I can't find anything in the xml files. It shouldn't be a SDK matter as there is no new dll in the Omens mod folder. Maybe Phyton is needed. Does anyone know something about that?
Trip wrote a function that looks through all the cities and removes in appropriate religions (doRemoveReligions) in the CvModEvents.py for Omens which works great for that mod.
If you want something simpliar you may just want to intercept the onReligionSpread python function in CvEventManager.py. That is called whenever a religion is added to a city. Challenges you will have are:
1. What if its a holy city trying to add to a city that already has a religion (not a problem in Omens since the holy cities are already defined when the mod starts)?
2. This may cause the AI to waste its missionaries trying to add a religion to a city that will just fail anyway.