Yeah this one would be a lot more work I think, there is a bit of code in the forums, I forget whether it is python or SDK that allows you to disable religion founding on tech, I think I used that...
then I use this bit of python to found a religion when a building is built, it will not be right for what you need, as it makes the religion of the particular faction, rather than assigning one of 3 to the relevant factions, but it might help you get a little closer...
then I use this bit of python to found a religion when a building is built, it will not be right for what you need, as it makes the religion of the particular faction, rather than assigning one of 3 to the relevant factions, but it might help you get a little closer...
Code:
# When capitol is built, found corresponding religion and convert
def onBuildingBuilt(self, argsList):
pCity, iBuildingType = argsList
iCapitol = self.gc.getInfoTypeForString("BUILDING_CAPITOL")
if iBuildingType != iCapitol: return
iPlay = pCity.getOwner()
pPlay = self.gc.getPlayer(iPlay)
# Perform string operation to get corresponding religion name, eg
# "TXT_KEY_CIV_HOPEVLLE_DESC" => "RELIGION_HOPEVILLE"
# For v11, fix bug found by Dresden, v10 feedback thread, post 5
# Was: sCivdesc = pPlay.getCivilizationDescriptionKey()
pCiv = self.gc.getCivilizationInfo(pPlay.getCivilizationType())
sCivdesc = pCiv.getTextKey()
sReldesc = sCivdesc.replace("TXT_KEY_CIV_", "RELIGION_")
sReldesc = str(sReldesc.replace("_DESC", ""))
iRel = self.gc.getInfoTypeForString(sReldesc)
if iRel != -1:
CyGame().setHolyCity(iRel, pCity, 1)
pPlay.convert(iRel)
furyLog(self.gc.getReligionInfo(iRel).getText() + " founded\n")
else:
furyLog("Unable to convert " + sCivdesc + " to religion\n")