Add Religion via Python?

DSChapin

Warlord
Joined
Nov 28, 2005
Messages
116
Does anyone know if it's possible to explicitly add a religion to a city via Python commands? The Inquisitor mod has:

pCity.setHasReligion(iTarget, False, True, True)

which works great for removing a religion from a city. But I can't seem to find a combination of arguments that will add a religion, even if that religion has already been founded. Even the GreekWorld mod seems to do religion spread just by giving the AI a Missionary at the appropriate spot.
Any ideas?
 
Instead of using (iTarget, False, True, True), use (iTarget, True, True, True).
as in:

pCity.setHasReligion(iTarget, True, True, True)
I don't think the last two arguments are that important, they tell whether to display that the religion spread.
 
That's right. Here's the signature from the DLL source:
Code:
void CvCity::setHasReligion(ReligionTypes eIndex, bool bNewValue, bool bAnnounce, bool bArrows)
So the second argument controls if the religion is supposed to be present in the city or not. bAnnounce is the interface message that appears in the log, bArrows is the arrow that points to the city where the religion spread. False will disable those notifications.
 
Back
Top Bottom