There are a number of things that I have discovered will crash scenarios.
Strangely, a number of issues arise with preplacing cities. I have found that it is best to place the cities with lua. Here is just such a function... change the civilization names to suit your scenario:
For Major Civilizations... this will found three cities in order, so the first will be the capital and thereafter, they will be founded in the order of your city list.
Code:
--found Denmark Cities
function FoundDenmark()
if Game.GetElapsedGameTurns() == 0 then
-- Set up Denmark Player
for iPlayer=0, GameDefines.MAX_MAJOR_CIVS-1 do
local pDenmark = Players[iPlayer]
if (GameInfo.Civilizations.CIVILIZATION_DENMARK.ID == pDenmark:GetCivilizationType()) then
pDenmark:Found(95, 10)
pDenmark:Found(88, 12)
pDenmark:Found(98, 7)
print (pDenmark:GetName() ,"...is founding cities");
end
end
end
end
Events.SequenceGameInitComplete.Add(FoundDenmark)
For city states (more than one city if you wish...)
Code:
--found Angles Cities
function FoundAngles()
if Game.GetElapsedGameTurns() == 0 then
-- Set up Angles Player
for iPlayer=GameDefines.MAX_MAJOR_CIVS, GameDefines.MAX_CIV_PLAYERS-1, 1 do
local pAngles = Players[iPlayer]
if (GameInfo.MinorCivilizations.MINOR_CIV_ANGLES.ID == pAngles:GetMinorCivType()) then
pAngles:Found(83, 17)
pAngles:Found(81, 7)
--print (pAngles:GetName() ,"...is founding cities");
end
end
end
end
Events.SequenceGameInitComplete.Add(FoundAngles)
You'll want to change Angles to whatever city state you choose, and the civ name must be adjusted of course.
If you found cities this way, you'll also need to adjust population as they will have the minimum... This code will set overall starting pop. You'll have to do something a little different if you want individual cities to have different populations.
Code:
-- sets starting populations for cities
function SetPop()
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
if pCity ~= nil then
pCity:ChangePopulation(1)
--print ("Setting population for...", pCity:GetName());
end
end
end
end
end
end
Events.SequenceGameInitComplete.Add(SetPop)
And you will want to kill off spawning city state settlers...
Code:
-- Kill city state settlers.
function KillCSSettlers()
if Game.GetElapsedGameTurns() == 0 then
for iPlayer=GameDefines.MAX_MAJOR_CIVS, GameDefines.MAX_CIV_PLAYERS-1, 1 do
local pPlayer = Players[iPlayer];
if (pPlayer:IsAlive()) then
for pUnit in pPlayer:Units() do
if (pUnit:GetUnitClassType() == GameInfoTypes.UNITCLASS_SETTLER) then
pUnit:Kill()
--print ("Killing city state settlers");
end
end
end
end
end
end
Events.SequenceGameInitComplete.Add(KillCSSettlers)
If you want these cities to have buildings at start, I think you can set that up via xml, but you can also do it with lua.
I've been working on my scenario for almost 2 years, off and on, and I have found that founding the cities this way gets over certain glitches in world builder.
I hope this helps.