Is there a method that I can use in order to get the number of different religions in a city? There doesn't seem to be anything directly available for this, and I'm not sure how I might indirectly go about this. Thanks.
Is there a method that I can use in order to get the number of different religions in a city? There doesn't seem to be anything directly available for this, and I'm not sure how I might indirectly go about this. Thanks.
You can probably loop through all religions (skipping ID = 0 because that's a pantheon) and count them by checking which religions have more than 0 followers in the city, something like:
Code:
local rCount = 0
for pReligion in GameInfo.Religions() do
iReligionID = pReligion.ID;
if (iReligionID > 0) then
if pCity:GetNumFollowers(iReligionID) > 0) then
rCount = rCount + 1
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.