Disappearing City States

CleverAdvisor

Chieftain
Joined
Mar 5, 2014
Messages
26
I'm no good with lua and found this script by n0Rb. I don't think he updates it anymore so don't think it's gonna be fixed by him. So i have about 20 city states that are set for "true start" locations ,but when the game is start only about 4 or 5 ever show up. Anyone can help find a solution?

https://www.dropbox.com/s/lohceu15s9cg7jz/Medium NA map Mulitiplayer.lua?dl=0

Like I said I'm not well versed in lua but i think the problem might be in this section?

Spoiler :
function nORbConvWorld:MoveStartPos()
print("Placing Start Points.");
for player_ID = 0, GameDefines.MAX_CIV_PLAYERS - 1 do
print("Player No: "..player_ID);
local pPlayer = Players[player_ID];

if pPlayer:IsEverAlive() then
if (pPlayer:IsMinorCiv()) then
local pStartPlot = self:GetMinorCivStartPlot(pPlayer);
if (pStartPlot ~= nil) then
if (self:IsPlot4StartCiv(pStartPlot:GetX(), pStartPlot:GetY()) ) then
pPlayer:InitCity(pStartPlot:GetX(), pStartPlot:GetY());
self:SetBlockedPlotsByCiv(pStartPlot:GetX(), pStartPlot:GetY());
else
print("MinorCiv True Start Position is blocked: "..pStartPlot:GetX().."x"..pStartPlot:GetY());
end
end
else
local pStartPlot = self:GetCivStartPlot(pPlayer);
if (pStartPlot ~= nil) then
local thisCiv = GameInfo.Civilizations[pPlayer:GetCivilizationType()];

if (thisCiv.Type == "CIVILIZATION_AZTEC") then
pPlayer:InitUnit(GameInfo.Units.UNIT_AZTEC_JAGUAR.ID,pStartPlot:GetX(), pStartPlot:GetY());
elseif (thisCiv.Type == "CIVILIZATION_POLYNESIA") then
pPlayer:InitUnit(GameInfo.Units.UNIT_POLYNESIAN_MAORI_WARRIOR.ID,pStartPlot:GetX(), pStartPlot:GetY());
elseif (thisCiv.Type == "CIVILIZATION_SHOSHONE") then
pPlayer:InitUnit(GameInfo.Units.UNIT_SHOSHONE_PATHFINDER.ID,pStartPlot:GetX(), pStartPlot:GetY());
else -- default warrior for others
pPlayer:InitUnit(GameInfo.Units.UNIT_WARRIOR.ID,pStartPlot:GetX(), pStartPlot:GetY());
end

pPlayer:InitUnit(GameInfo.Units.UNIT_SETTLER.ID,pStartPlot:GetX(), pStartPlot:GetY());
pPlayer:InitUnit(GameInfo.Units.UNIT_WORKER.ID,pStartPlot:GetX(), pStartPlot:GetY());
pPlayer:SetStartingPlot(pStartPlot);
self:SetBlockedPlotsByCiv(pStartPlot:GetX(), pStartPlot:GetY());
end
end
else
print(" -- skip player");
end -- if player:IsEverAlive() end
end -- for end
return true
end

--[[ Remove standard functions ]]--
function GeneratePlotTypes()
end
function GenerateTerrain()
end
function AddFeatures()
end
function DetermineContinents()
end
 
Top Bottom