Help, Religion in Custom Scenario Not Working!

CivEarth

Chieftain
Joined
Aug 22, 2016
Messages
10
I've been trying to add religion to my scenario/mod, and since I'm a Lua newbie I've been using this Lua script guide:
But when I load up the mod, all I get is a minimal religion overview screen with no world religions that I can't close out of. What am I doing wrong?:confused:
Here is my modified file:
Spoiler :
function EstablishChristian()
if Game.GetElapsedGameTurns() == 0 then

function CreateChristianHolyCity(pCity, religion, pantheonBelief, founderBelief, followerBelief, followerBelief2, enhancerBelief)
local iPlayer = pCity:GetOwner()
local iReligion = GameInfoTypes[religion]

-- Optional extra beliefs
local iBelief4 = followerBelief2 and GameInfoTypes[followerBelief2] or -1
local iBelief5 = enhancerBelief and GameInfoTypes[enhancerBelief] or -1

Game.FoundPantheon(iPlayer, GameInfoTypes[pantheonBelief])
Game.FoundReligion(iPlayer, iReligion, nil, GameInfoTypes[founderBelief], GameInfoTypes[followerBelief], -1, -1, pCity)
Game.EnhanceReligion(iPlayer, iReligion, GameInfoTypes[followerBelief2], GameInfoTypes[enhancerBelief]);
end

function FoundChristianity()
for iPlayer=0, GameDefines.MAX_CIV_PLAYERS - 1 do
local pPlayer = Players[iPlayer]
if (pPlayer:IsEverAlive()) then

for pCity in pPlayer:Cities() do

-- City exists and has the proper name?
if pCity ~= nil and pCity:GetName() == "Rome" then

CreateChristianHolyCity(pCity, "RELIGION_CHRISTIANITY", "BELIEF_GOD_CRAFTSMEN",
"BELIEF_INITIATION_RITES", "BELIEF_CATHEDRALS1", "BELIEF_STATE_CHURCH", "BELIEF_RELIGIOUS_TEXTS");
print ("okay, Rome is the Catholic holy city")
return pCity
end
end
end
end
end

local pChristianPlot = FoundChristianity():Plot()

end
end
Events.ActivePlayerTurnEnd.Add(FollowChristianity)
-- Enumerate Playable Civ Cities with Confucianism
function FollowChristianity()
if Game.GetGameTurn() == 0 then

for iPlayer=0, GameDefines.MAX_CIV_PLAYERS - 1 do
local pPlayer = Players[iPlayer];
if pPlayer:IsEverAlive() then

print (pPlayer:GetName())

-- Enumerate cities
for cityIndex = 0, pPlayer:GetNumCities() - 1, 1 do
local pCity = pPlayer:GetCityByID(cityIndex)

print (pCity:GetName());

-- City exists and has the proper name?
if pCity ~= nil and city:GetName() == "Benevento" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Civitavecchia" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Frosinane" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Perugia" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Nettuno" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Catania" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Rieti" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Tivoli" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Terracina" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Aquila" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Agropoli" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Bari" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Barletta" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Brindisi" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Capua" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Catanzaro" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Teramo" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Termoli" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Foggia" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Manfredonia" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Campobasso" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Sulmona" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Gaeta" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Naples" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Melfi" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Potenza" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Policuro" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Tarranto" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Salerno" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Monopoli" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Leece" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Gagliano del Capo" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Corigliano Calabro" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Cosenza" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Crotone" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Vibo Valentia" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Gioia Tauro" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Reggio Calabria" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Lipari" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Messina" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Taormina" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Syracuse" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Gela" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Agrigento" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Caltanissetta" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Sciatta" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Marsala" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Palermo" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Mdina" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Chia" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Sant'Antiocco" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Iglesias" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Cagliari" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Costa Rei" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Muravera" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Tortoli" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Orosei" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Olbia" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Palau" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Valledoria" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Ozieri" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Macomer" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Nuoro" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Bosa" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Sassari" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Porto Torrres" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Oristano" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Guspini" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Fordongianus" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Bonifacio" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Porto-Vecchio" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Ajaccio" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Calvi" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Bastia" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Ancona" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "San Benedetto" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Civitanova" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Senigallia" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Pesaro" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Urbino" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Arezzo" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Sovana" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Grosseto" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Volterra" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Siena" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Torrita" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Montalcino" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Castiglione d'Orcia" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "San Marino" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Florence" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Montevarchi" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "San Gimigiano" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Pisa" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Livorno" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Cecina" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Piombino" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Portoferraio" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Lucca" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Modena" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Sestola" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Bologna" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Ravenna" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Ferrara" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Treviso" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Padua" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Vicenza" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Aquilea" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Verona" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Mantua" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Reggio" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Cremona" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Parma" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Brescia" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Bergamo" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Piacenza" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Bobbio" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Pavia" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Alessandria" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Montferrat" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Asti" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Saluzzo" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Tenda" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Savona" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Nizza" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Genoa" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Rapollo" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "La Spezia" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Omeglia" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Sanremo" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Turin" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Susa" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Aosta" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Bourg-Saint-Maurice" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Chamonix" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Chambéry" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Thonon-les-Bains" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Geneva" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Milan" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Saranno" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Varese" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Como" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Novara" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Ragusa" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Stagno" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Klagenfurt" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Trent" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Venice" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Choggia" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
elseif pCity ~= nil and pCity:GetName() == "Caorle" then
pCity:AdoptReligionFully(GameInfoTypes["RELIGION_CHRISTIANITY"]);
return pCity
end
end
end
end

end
end
Events.SequenceGameInitComplete.Add(EstablishChristian)
 
Well, first off... the last line has a space in EstablishChris tian, if that isn't an artifact of this forum.

What does the log say?

It must be an artifact of the forum; I checked modbuddy and there was no such space.
Here's the lua log, I couldn't get anything helpful out of it but maybe you can:
Spoiler :
[181055.812] Initializing Lua 5.1.4
[181125.000] InstalledPanel: Refreshing Mods
[181125.015] InstalledPanel: GetModBrowserListings()
[181125.062] InstalledPanel: Refreshing Mods
[181125.062] InstalledPanel: GetModBrowserListings()
[181129.281] InstalledPanel: Refreshing Mods
[181129.281] InstalledPanel: GetModBrowserListings()
[181131.562] InstalledPanel: Refreshing Mods
[181131.562] InstalledPanel: GetModBrowserListings()
[181185.328] SelectCivilization: table: 190D0C70
[181186.500] SelectCivilization: select civ
[181188.812] WorldBuilderMapLoader: -------------------------------
[181188.812] WorldBuilderMapLoader: Map Generation - Adding Goodies
[181188.812] WorldBuilderMapLoader: ** The Era specified NO GOODY HUTS
[181188.812] WorldBuilderMapLoader: Map Generation - Adding Resources
[181220.203] CivilopediaScreen: SetSelectedCategory(12)
[181220.203] CivilopediaScreen: CivilopediaCategory[CategoryTerrain].DisplayList
[181220.296] CivilopediaScreen: SetSelectedCategory(1)
[181220.296] CivilopediaScreen: CivilopediaCategory[CategoryHomePage].DisplayList
[181221.750] Tutorial: Loaded Additional Tutorial checks - Assets\DLC\Expansion2\Tutorial\Lua\TutorialInclude_Expansion2.lua
[181221.750] Tutorial: Loaded Additional Tutorial checks - Assets\DLC\Expansion\Tutorial\lua\TutorialInclude_Expansion1.lua
[181223.328] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\ConfirmImprovementRebuildPopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\DeclareWarMovePopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\PuppetCityPopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\DeclareWarPlunderTradeRoutePopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\DeclareWarRangeStrikePopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmImprovementRebuildPopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\NetworkKickedPopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\CityPlotManagementPopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmCommandPopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\MinorCivEnterTerritoryPopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\LiberateMinorPopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ReturnCivilianPopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\AnnexCityPopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\DeclareWarMovePopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\BarbarianRansomPopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmGiftPopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmCityTaskPopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\PuppetCityPopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\DeclareWarRangeStrikePopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmPolicyBranchPopup.lua
[181223.328] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\MinorCivGoldPopup.lua
[181224.578] EconomicGeneralInfo: Total Units - 2
[181224.578] EconomicGeneralInfo: Maint Free Units - 0
[181224.578] EconomicGeneralInfo: Paid Units - 2
[181224.656] EconomicGeneralInfo: Total Units - 2
[181224.656] EconomicGeneralInfo: Maint Free Units - 0
[181224.656] EconomicGeneralInfo: Paid Units - 2
[181225.531] ChoosePantheonPopup: -252
[181225.531] ChoosePantheonPopup: 963
[181225.531] ChoosePantheonPopup: 711
[181225.765] EspionageOverview: Refreshing My Cities
[181226.234] ChooseIdeologyPopup: -252
[181226.234] ChooseIdeologyPopup: 963
[181226.234] ChooseIdeologyPopup: 711
[181226.375] CultureOverview: Non-Wonder Great Work buildings
[181226.375] CultureOverview: 121:BUILDINGCLASS_AMPHITHEATER/BUILDING_AMPHITHEATER: 1x GW / Generic (4,2)
[181226.375] CultureOverview: 30:BUILDINGCLASS_OPERA_HOUSE/BUILDING_OPERA_HOUSE: 1x GW / Generic (7,3)
[181226.375] CultureOverview: 31:BUILDINGCLASS_MUSEUM/BUILDING_MUSEUM: 2x GW+T / Generic (9,1)
[181226.375] CultureOverview: 32:BUILDINGCLASS_BROADCAST_TOWER/BUILDING_BROADCAST_TOWER: 1x GW / Generic (11,2)
[181226.375] CultureOverview: 137:BUILDINGCLASS_CATHEDRAL/BUILDING_CATHEDRAL: 1x GW / Generic (no tech)
[181226.375] CultureOverview: 163:BUILDINGCLASS_JFD_BAVARIA/BUILDING_JFD_BAVARIAN_MUSIC: 1x GW / Generic (no tech)
[181227.500] CityInfoStack: loaded
[181227.531] JFD_Milan_Functions: Gian Visconti is in the game
[181227.640] JFD_Sardinia_Functions: King Victor Emmanuel II is in this game
[181227.687] JFD_TwoSicilies_Functions: King Ferdinand I is in this game
[181227.703] JFD_PapalStates_Functions: Pope Pius IX is in this game
[181227.750] BuildingYieldFromGreatWorksInCity: loaded
[181227.781] Tuscany_CoreFunctions: Loaded
[181227.781] Tuscany_CoreFunctions: Is using alternate UA: false
[181227.828] CaribbeanLSUnitCode: Tradition - Caribbean Unit Code
[181227.921] CaribbeanLSUnitCode2: Liberty - Caribbean Unit Code
[181227.984] GenoaLSUnitCode: La Superba - Genoa Unit Code
[181228.000] GenoaLSUnitCode: La Superba - Genoa Trait Code
[181228.000] GenoaLSUnitCode: La Superba - Genoa Building Code
[181228.031] MinoanLSUnitCode: Bull leaping - Minoan Unit Code
[181228.765] AdvisorInfoPopup: Closing Advisor Info
[181228.765] Demographics: Dequeuing demographics
[181228.765] Demographics: Dequeuing demographics
[181256.218] Advisors: Marking VERY_UNHAPPY as seen
[181256.234] NotificationPanel: Attempt to remove unknown Notification 0
[181256.234] NotificationPanel: Attempt to remove unknown Notification 1
[181256.343] Advisors: Marking FIRST_SPY as seen
[181256.343] Advisors: Could not find concept. $ô>
[181343.375] InstalledPanel: Refreshing Mods
[181343.375] InstalledPanel: GetModBrowserListings()
[181343.421] InstalledPanel: Refreshing Mods
[181343.421] InstalledPanel: GetModBrowserListings()
[181392.078] InstalledPanel: Refreshing Mods
[181392.078] InstalledPanel: GetModBrowserListings()
[181392.109] InstalledPanel: Refreshing Mods
[181392.109] InstalledPanel: GetModBrowserListings()
[181399.312] InstalledPanel: Refreshing Mods
[181399.312] InstalledPanel: GetModBrowserListings()
[181466.796] SelectCivilization: table: 601E16A8
[181470.250] SelectCivilization: select civ
[181473.546] WorldBuilderMapLoader: -------------------------------
[181473.546] WorldBuilderMapLoader: Map Generation - Adding Goodies
[181473.546] WorldBuilderMapLoader: ** The Era specified NO GOODY HUTS
[181473.546] WorldBuilderMapLoader: Map Generation - Adding Resources
[181506.562] CivilopediaScreen: SetSelectedCategory(12)
[181506.562] CivilopediaScreen: CivilopediaCategory[CategoryTerrain].DisplayList
[181506.640] CivilopediaScreen: SetSelectedCategory(1)
[181506.640] CivilopediaScreen: CivilopediaCategory[CategoryHomePage].DisplayList
[181510.187] Tutorial: Loaded Additional Tutorial checks - Assets\DLC\Expansion2\Tutorial\Lua\TutorialInclude_Expansion2.lua
[181510.187] Tutorial: Loaded Additional Tutorial checks - Assets\DLC\Expansion\Tutorial\lua\TutorialInclude_Expansion1.lua
[181512.078] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\ConfirmImprovementRebuildPopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\DeclareWarMovePopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\PuppetCityPopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\DeclareWarPlunderTradeRoutePopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\DeclareWarRangeStrikePopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmImprovementRebuildPopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\NetworkKickedPopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\CityPlotManagementPopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmCommandPopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\MinorCivEnterTerritoryPopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\LiberateMinorPopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ReturnCivilianPopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\AnnexCityPopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\DeclareWarMovePopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\BarbarianRansomPopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmGiftPopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmCityTaskPopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\PuppetCityPopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\DeclareWarRangeStrikePopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmPolicyBranchPopup.lua
[181512.078] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\MinorCivGoldPopup.lua
[181513.203] EconomicGeneralInfo: Total Units - 0
[181513.203] EconomicGeneralInfo: Maint Free Units - 0
[181513.203] EconomicGeneralInfo: Paid Units - 0
[181513.265] EconomicGeneralInfo: Total Units - 0
[181513.265] EconomicGeneralInfo: Maint Free Units - 0
[181513.265] EconomicGeneralInfo: Paid Units - 0
[181514.140] ChoosePantheonPopup: -252
[181514.140] ChoosePantheonPopup: 963
[181514.140] ChoosePantheonPopup: 711
[181514.343] EspionageOverview: Refreshing My Cities
[181514.796] ChooseIdeologyPopup: -252
[181514.796] ChooseIdeologyPopup: 963
[181514.796] ChooseIdeologyPopup: 711
[181514.921] CultureOverview: Non-Wonder Great Work buildings
[181514.921] CultureOverview: 121:BUILDINGCLASS_AMPHITHEATER/BUILDING_AMPHITHEATER: 1x GW / Generic (4,2)
[181514.921] CultureOverview: 172:BUILDINGCLASS_TEMPLE/BUILDING_JFD_CHAPEL_WRITING: 1x GW / CIVILIZATION_JFD_PAPAL_STATES (4,1)
[181514.921] CultureOverview: 30:BUILDINGCLASS_OPERA_HOUSE/BUILDING_OPERA_HOUSE: 1x GW / Generic (7,3)
[181514.921] CultureOverview: 31:BUILDINGCLASS_MUSEUM/BUILDING_MUSEUM: 2x GW+T / Generic (9,1)
[181514.921] CultureOverview: 32:BUILDINGCLASS_BROADCAST_TOWER/BUILDING_BROADCAST_TOWER: 1x GW / Generic (11,2)
[181514.921] CultureOverview: 137:BUILDINGCLASS_CATHEDRAL/BUILDING_CATHEDRAL: 1x GW / Generic (no tech)
[181514.921] CultureOverview: 163:BUILDINGCLASS_JFD_BAVARIA/BUILDING_JFD_BAVARIAN_MUSIC: 1x GW / Generic (no tech)
[181514.921] CultureOverview: 170:BUILDINGCLASS_JFD_CHAPEL_ART/BUILDING_JFD_CHAPEL_ART: 1x GW / CIVILIZATION_JFD_PAPAL_STATES (no tech)
[181514.921] CultureOverview: 171:BUILDINGCLASS_JFD_CHAPEL_MUSIC/BUILDING_JFD_CHAPEL_MUSIC: 1x GW / CIVILIZATION_JFD_PAPAL_STATES (no tech)
[181515.875] CityInfoStack: loaded
[181515.906] JFD_Milan_Functions: Gian Visconti is in the game
[181515.984] JFD_Sardinia_Functions: King Victor Emmanuel II is in this game
[181516.015] JFD_TwoSicilies_Functions: King Ferdinand I is in this game
[181516.046] JFD_PapalStates_Functions: Pope Pius IX is in this game
[181516.078] BuildingYieldFromGreatWorksInCity: loaded
[181516.109] Tuscany_CoreFunctions: Loaded
[181516.109] Tuscany_CoreFunctions: Is using alternate UA: false
[181516.156] CaribbeanLSUnitCode: Tradition - Caribbean Unit Code
[181516.234] CaribbeanLSUnitCode2: Liberty - Caribbean Unit Code
[181516.281] GenoaLSUnitCode: La Superba - Genoa Unit Code
[181516.296] GenoaLSUnitCode: La Superba - Genoa Trait Code
[181516.312] GenoaLSUnitCode: La Superba - Genoa Building Code
[181516.343] MinoanLSUnitCode: Bull leaping - Minoan Unit Code
[181517.281] AdvisorInfoPopup: Closing Advisor Info
[181517.281] Demographics: Dequeuing demographics
[181517.281] Demographics: Dequeuing demographics
[181551.437] TopPanel: 0 [ICON_RES_IRON] Iron[NEWLINE][NEWLINE]0 [ICON_RES_HORSE] Horses
[181551.734] TopPanel: 0 [ICON_RES_IRON] Iron[NEWLINE][NEWLINE]0 [ICON_RES_HORSE] Horses
[181551.968] TopPanel: 0 [ICON_RES_IRON] Iron[NEWLINE][NEWLINE]0 [ICON_RES_HORSE] Horses
[181552.000] TopPanel: 0 [ICON_RES_IRON] Iron[NEWLINE][NEWLINE]0 [ICON_RES_HORSE] Horses
[181552.125] TopPanel: 0 [ICON_RES_IRON] Iron[NEWLINE][NEWLINE]0 [ICON_RES_HORSE] Horses
[181845.781] InstalledPanel: Refreshing Mods
[181845.781] InstalledPanel: GetModBrowserListings()
[181845.812] InstalledPanel: Refreshing Mods
[181845.812] InstalledPanel: GetModBrowserListings()
[181884.000] InstalledPanel: Refreshing Mods
[181884.000] InstalledPanel: GetModBrowserListings()
[181884.046] InstalledPanel: Refreshing Mods
[181884.046] InstalledPanel: GetModBrowserListings()
[181899.000] InstalledPanel: Refreshing Mods
[181899.000] InstalledPanel: GetModBrowserListings()
[181901.734] InstalledPanel: Refreshing Mods
[181901.734] InstalledPanel: GetModBrowserListings()
[181914.046] InstalledPanel: Refreshing Mods
[181914.046] InstalledPanel: GetModBrowserListings()
[181917.437] InstalledPanel: Refreshing Mods
[181917.437] InstalledPanel: GetModBrowserListings()
[182022.125] SelectCivilization: table: 5FF7FC18
[182024.140] SelectCivilization: select civ
[182026.890] WorldBuilderMapLoader: -------------------------------
[182026.890] WorldBuilderMapLoader: Map Generation - Adding Goodies
[182026.890] WorldBuilderMapLoader: ** The Era specified NO GOODY HUTS
[182026.890] WorldBuilderMapLoader: Map Generation - Adding Resources
[182059.859] CivilopediaScreen: SetSelectedCategory(12)
[182059.859] CivilopediaScreen: CivilopediaCategory[CategoryTerrain].DisplayList
[182059.921] CivilopediaScreen: SetSelectedCategory(1)
[182059.921] CivilopediaScreen: CivilopediaCategory[CategoryHomePage].DisplayList
[182062.203] Tutorial: Loaded Additional Tutorial checks - Assets\DLC\Expansion2\Tutorial\Lua\TutorialInclude_Expansion2.lua
[182062.203] Tutorial: Loaded Additional Tutorial checks - Assets\DLC\Expansion\Tutorial\lua\TutorialInclude_Expansion1.lua
[182063.593] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\ConfirmImprovementRebuildPopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\DeclareWarMovePopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\PuppetCityPopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\DeclareWarPlunderTradeRoutePopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\DeclareWarRangeStrikePopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmImprovementRebuildPopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\NetworkKickedPopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\CityPlotManagementPopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmCommandPopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\MinorCivEnterTerritoryPopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\LiberateMinorPopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ReturnCivilianPopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\AnnexCityPopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\DeclareWarMovePopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\BarbarianRansomPopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmGiftPopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmCityTaskPopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\PuppetCityPopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\DeclareWarRangeStrikePopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmPolicyBranchPopup.lua
[182063.593] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\MinorCivGoldPopup.lua
[182064.187] EconomicGeneralInfo: Total Units - 0
[182064.187] EconomicGeneralInfo: Maint Free Units - 0
[182064.187] EconomicGeneralInfo: Paid Units - 0
[182064.203] EconomicGeneralInfo: Total Units - 0
[182064.203] EconomicGeneralInfo: Maint Free Units - 0
[182064.203] EconomicGeneralInfo: Paid Units - 0
[182064.796] ChoosePantheonPopup: -252
[182064.796] ChoosePantheonPopup: 963
[182064.796] ChoosePantheonPopup: 711
[182065.046] EspionageOverview: Refreshing My Cities
[182065.281] ChooseIdeologyPopup: -252
[182065.281] ChooseIdeologyPopup: 963
[182065.281] ChooseIdeologyPopup: 711
[182065.437] CultureOverview: Non-Wonder Great Work buildings
[182065.437] CultureOverview: 121:BUILDINGCLASS_AMPHITHEATER/BUILDING_AMPHITHEATER: 1x GW / Generic (4,2)
[182065.437] CultureOverview: 172:BUILDINGCLASS_TEMPLE/BUILDING_JFD_CHAPEL_WRITING: 1x GW / CIVILIZATION_JFD_PAPAL_STATES (4,1)
[182065.437] CultureOverview: 30:BUILDINGCLASS_OPERA_HOUSE/BUILDING_OPERA_HOUSE: 1x GW / Generic (7,3)
[182065.437] CultureOverview: 31:BUILDINGCLASS_MUSEUM/BUILDING_MUSEUM: 2x GW+T / Generic (9,1)
[182065.437] CultureOverview: 32:BUILDINGCLASS_BROADCAST_TOWER/BUILDING_BROADCAST_TOWER: 1x GW / Generic (11,2)
[182065.437] CultureOverview: 137:BUILDINGCLASS_CATHEDRAL/BUILDING_CATHEDRAL: 1x GW / Generic (no tech)
[182065.437] CultureOverview: 163:BUILDINGCLASS_JFD_BAVARIA/BUILDING_JFD_BAVARIAN_MUSIC: 1x GW / Generic (no tech)
[182065.437] CultureOverview: 170:BUILDINGCLASS_JFD_CHAPEL_ART/BUILDING_JFD_CHAPEL_ART: 1x GW / CIVILIZATION_JFD_PAPAL_STATES (no tech)
[182065.437] CultureOverview: 171:BUILDINGCLASS_JFD_CHAPEL_MUSIC/BUILDING_JFD_CHAPEL_MUSIC: 1x GW / CIVILIZATION_JFD_PAPAL_STATES (no tech)
[182065.906] CityInfoStack: loaded
[182065.906] JFD_Milan_Functions: Gian Visconti is in the game
[182065.921] JFD_Sardinia_Functions: King Victor Emmanuel II is in this game
[182065.921] JFD_TwoSicilies_Functions: King Ferdinand I is in this game
[182065.937] JFD_PapalStates_Functions: Pope Pius IX is in this game
[182065.968] CaribbeanLSUnitCode: Tradition - Caribbean Unit Code
[182066.031] CaribbeanLSUnitCode2: Liberty - Caribbean Unit Code
[182066.031] GenoaLSUnitCode: La Superba - Genoa Unit Code
[182066.031] GenoaLSUnitCode: La Superba - Genoa Trait Code
[182066.031] GenoaLSUnitCode: La Superba - Genoa Building Code
[182066.046] MinoanLSUnitCode: Bull leaping - Minoan Unit Code
[182066.421] AdvisorInfoPopup: Closing Advisor Info
[182066.421] Demographics: Dequeuing demographics
[182066.421] Demographics: Dequeuing demographics

There is also something wacky going on with the turns. I try to set the start in 1300 AD in worldbuilder, but it always goes 250 or so turns ahead and the game starts in like 7000AD. I'm not sure if that may or may not be contributing to the problem.
 
Here is my latest iteration of the code... perhaps I have changed something that fundamentally alters how it works.

Code:
-- Find Paris player and found Christianity in their city, returning the city

function EstablishChristian()
if Game.GetElapsedGameTurns() == 0 then

function CreateChristianHolyCity(pCity, religion, pantheonBelief, founderBelief, followerBelief, followerBelief2, enhancerBelief)
  local iPlayer = pCity:GetOwner()
  local iReligion = GameInfoTypes[religion]

  -- Optional extra beliefs
  local iBelief4 = followerBelief2 and GameInfoTypes[followerBelief2] or -1
  local iBelief5 = enhancerBelief and GameInfoTypes[enhancerBelief] or -1

  Game.FoundPantheon(iPlayer, GameInfoTypes[pantheonBelief])
  Game.FoundReligion(iPlayer, iReligion, nil, GameInfoTypes[founderBelief], GameInfoTypes[followerBelief], -1, -1, pCity)
  Game.EnhanceReligion(iPlayer, iReligion, GameInfoTypes[followerBelief2], GameInfoTypes[enhancerBelief]);
end

function FoundChristianity()
  for iPlayer=0, GameDefines.MAX_CIV_PLAYERS - 1 do
    local pPlayer = Players[iPlayer]
    if (pPlayer:IsEverAlive()) then

	for pCity in pPlayer:Cities() do

				-- City exists and has the proper name?
    			if pCity ~= nil and pCity:GetName() == "Paris" then

		             CreateChristianHolyCity(pCity, "RELIGION_CHRISTIANITY", "BELIEF_GOD_KING",
					"BELIEF_PAPAL_PRIMACY", "BELIEF_CATHEDRALS",  "BELIEF_MOSQUES", "BELIEF_RELIGIOUS_TEXTS");
					print ("okay, Paris is the Catholic holy city")
				return pCity
				end
			end
		end
	end
end

local pChristianPlot = FoundChristianity():Plot()

end
end

Events.SequenceGameInitComplete.Add(EstablishChristian)

and...

Code:
-- Enumerate Playable Civ Cities with Christianity

function FollowChristianityA()
if Game.GetElapsedGameTurns() == 0 then

for iPlayer=0, GameDefines.MAX_CIV_PLAYERS - 1 do
	local pPlayer = Players[iPlayer];
		if pPlayer:IsEverAlive() then 
			
			-- Enumerate cities
			for pCity in pPlayer:Cities() do

				-- City exists and has the proper name?
    			
				
				if pCity ~= nil and pCity:GetName() == "Aachen" then
					pCity:ConvertPercentFollowers(2, -1, 100);
					print(pCity:GetName(), "...is getting Christian followers...");
				return pCity							
    			end
			end
		end
end
end
end

Events.SequenceGameInitComplete.Add(FollowChristianityA)

One thing I did find was that I applying the code individually to cities when I established a religion seemed to clear up a few problems... so multiple versions of the code just above for each city helped. Otherwise, the code did not fire for all cities for some reason.
 
I tried your advice and I'm still stumped. I can load up the game fine, but the first thing that happens is the religion screen pops up. It says I need "six faith points to start a pantheon (even as the Papal States)" and won't let close out!
 
Ah... you might need to adjust the number of religions for the world size in xml. I am not home right now, so I cannot tell you the file name exactly, but it should be in Worlds.xml. You may have to update the entry to match the number of religions you want.

I could be wrong.

Also, If one of your founding cities is a city state, the number of religions should be reduced by one for each city state that has a holy city... don't ask me why :).
 
I tried your latest advice with the world file, but no luck. I think the root of the problem may be that the game isn't founding the religion at all in Rome, but is spreading it to other cities. I'm not sure, since I can't move around with the religion screen up, but the religion screen does say "+35 from city-state (there are a lot of them)."
Holy City Rome BTW is held by a playable Papal States, so no problem there.
I've looked at the medieval scenario ReligionOverview.lua, but I'm not sure what to copy and what not to. I pretty much just want to spread the religion to everyone.
 
Back
Top Bottom