Does anyone know if people that don't have accounts here would be able to access that file?I posted a zip of the assignstartingplots lua here:
https://forums.civfanatics.com/resources/assignstartingplots-lua-from-v-1-0-0-167.26501/
Does anyone know if people that don't have accounts here would be able to access that file?I posted a zip of the assignstartingplots lua here:
https://forums.civfanatics.com/resources/assignstartingplots-lua-from-v-1-0-0-167.26501/
Can you please leave this link up for a couple of days? I linked to it over at Reddit so users can follow this solution. Unfortunately not everyone comes over to civ fanatics.
yes.Does anyone know if people that don't have accounts here would be able to access that file?
thanks.I posted a zip of the assignstartingplots lua here:
https://forums.civfanatics.com/resources/assignstartingplots-lua-from-v-1-0-0-167.26501/
The production options for religious buildings is allows all buildings. The production queue acts like it wants allow queued builds but the are hidden.
I can no longer select a location for districts. Brings up the tile options but can't select a tile.
Cannot get the game past turn 3 before it crashed, so have deleted all mods and was going to start again. First mod I wanted was Alert Guard, but cannot find it anywhere on the mod page. anyone know if there is another mod that will cause a sentry to wake up when threatened?
@PYITE What does Assignstartingplots.Lua from v. 1.0.0.167 exactly do? What about starting biases for Khmer and Indonesia? Are the biases for specific civs in another file?
It can also be used as a mod (ie without replacing the game's files) following those instruction:
https://forums.civfanatics.com/resources/how-to-install-a-mod.25400/
You're using map scripts in your mods?Thanks for posting this. I've found testing another map it spawns two AI on each other's doorstep. It's pretty rubbish how Firaxis change one thing and break another
The game needs our mods/hotfixes in order to run.
BTW have you figured out why it's spawning civs so weirdly? Are there changes to the maps we can make to mitigate this?
You're using map scripts in your mods?
Alternate solution: add the old placement code directly in your scripts:All my maps are scripts. They're based off the map script from the Outback Tycoon scenario, fashioned after Civ V's "Scrambled" maps →
https://forums.civfanatics.com/threads/scrambled-maps-pack.616588/
BTW I had a look at the standard maps and the start conditions haven't changed. So the hotfix/mod is the only solution RN.
------------------------------------------------------------------------------
function AssignStartingPlots:__SetStartMajor(plots)
-- Sort by fertility of all the plots
-- eliminate them if they do not meet the following:
-- distance to another civilization
-- distance to a natural wonder
-- minimum production
-- minimum food
-- minimum luxuries
-- minimum strategic
sortedPlots ={};
local iSize = #plots;
local iContinentIndex = 1;
for i, plot in ipairs(plots) do
row = {};
row.Plot = plot;
row.Fertility = self:__WeightedFertility(plot);
table.insert (sortedPlots, row);
end
if(self.uiStartConfig > 1 ) then
table.sort (sortedPlots, function(a, b) return a.Fertility > b.Fertility; end);
else
self.sortedFertilityArray = {};
sortedPlotsFertility = {};
sortedPlotsFertility = self:__PreFertilitySort(sortedPlots);
self:__SortByFertilityArray(sortedPlots, sortedPlotsFertility);
for k, v in pairs(sortedPlots) do
sortedPlots[k] = nil;
end
for i, newPlot in ipairs(self.sortedFertilityArray) do
row = {};
row.Plot = newPlot.Plot;
row.Fertility = newPlot.Fertility;
table.insert (sortedPlots, row);
end
end
local bValid = false;
while bValid == false and iSize >= iContinentIndex do
bValid = true;
local NWMajor = 0;
pTempPlot = Map.GetPlotByIndex(sortedPlots[iContinentIndex].Plot);
iContinentIndex = iContinentIndex + 1;
--print("Fertility: ", sortedPlots[iContinentIndex].Fertility)
-- Checks to see if the plot is impassable
if(pTempPlot:IsImpassable() == true) then
bValid = false;
end
-- Checks to see if the plot is water
if(pTempPlot:IsWater() == true) then
bValid = false;
end
-- Checks to see if there are resources
if(pTempPlot:GetResourceCount() > 0) then
local bValidResource = self:__BonusResource(pTempPlot);
if(bValidResource == false) then
bValid = false;
end
end
-- Checks to see if there are luxuries
if (math.ceil(self.iDefaultNumberMajor * 1.25) + self.iDefaultNumberMinor > self.iNumMinorCivs + self.iNumMajorCivs) then
local bLuxuryCheck = self:__LuxuryBuffer(pTempPlot);
if(bLuxuryCheck == false) then
bValid = false;
end
end
--Checks to see if there are strategics
-- local bStrategicCheck = self:__StrategicBuffer(pTempPlot);
-- if(bStrategicCheck == false) then
-- bValid = false;
-- end
-- Checks to see if there is fresh water or coast
local bWaterCheck = self:__GetWaterCheck(pTempPlot);
if(bWaterCheck == false) then
bValid = false;
end
local bValidAdjacentCheck = self:__GetValidAdjacent(pTempPlot, 0);
if(bValidAdjacentCheck == false) then
bValid = false;
end
-- Checks to see if there are natural wonders in the given distance
local bNaturalWonderCheck = self:__NaturalWonderBuffer(pTempPlot, false);
if(bNaturalWonderCheck == false) then
bValid = false;
end
-- Checks to see if there are any major civs in the given distance
local bMajorCivCheck = self:__MajorCivBuffer(pTempPlot);
if(bMajorCivCheck == false) then
bValid = false;
end
-- Checks to see if there is an Oasis
local featureType = pTempPlot:GetFeatureType();
if(featureType == g_FEATURE_OASIS) then
bValid = false;
end
-- If the plots passes all the checks then the plot equals the temp plot
if(bValid == true) then
self:__TryToRemoveBonusResource(pTempPlot);
self:__AddBonusFoodProduction(pTempPlot);
return pTempPlot;
end
end
return nil;
end
------------------------------------------------------------------------------
function AssignStartingPlots:__SetStartMinor(plots)
-- Sort by fertility of all the plots
-- eliminate them if they do not meet the following:
-- distance to another civilization
-- distance to a natural wonder
-- minimum production
-- minimum food
sortedPlots ={};
local iSize = #plots;
local iContinentIndex = 1;
for i, plot in ipairs(plots) do
row = {};
row.Plot = plot;
row.Fertility = self:__WeightedFertility(plot);
table.insert (sortedPlots, row);
end
table.sort (sortedPlots, function(a, b) return a.Fertility > b.Fertility; end);
local bValid = false;
while bValid == false and iSize >= iContinentIndex do
bValid = true;
local NWMinor = 2;
pTempPlot = Map.GetPlotByIndex(sortedPlots[iContinentIndex].Plot);
iContinentIndex = iContinentIndex + 1;
--print("Fertility: ", sortedPlots[iContinentIndex].Fertility)
-- Checks to see if the plot is impassable
if(pTempPlot:IsImpassable() == true) then
bValid = false;
end
-- Checks to see if the plot is water
if(pTempPlot:IsWater() == true) then
bValid = false;
end
-- Checks to see if there are resources
if(pTempPlot:GetResourceCount() > 0) then
local bValidResource = self:__BonusResource(pTempPlot);
if(bValidResource == false) then
bValid = false;
end
end
local bValidAdjacentCheck = self:__GetValidAdjacent(pTempPlot, 2);
if(bValidAdjacentCheck == false) then
bValid = false;
end
-- Checks to see if there are natural wonders in the given distance
local bNaturalWonderCheck = self:__NaturalWonderBuffer(pTempPlot, true);
if(bNaturalWonderCheck == false) then
bValid = false;
end
-- Checks to see if there are any minor civs in the given distance
local bMinorCivCheck = self:__MinorCivBuffer(pTempPlot, 1);
if(bMinorCivCheck == false) then
bValid = false;
end
-- Checks to see if there is an Oasis
local featureType = pTempPlot:GetFeatureType();
if(featureType == g_FEATURE_OASIS) then
bValid = false;
end
-- If the plots passes all the checks then the plot equals the temp plot
if(bValid == true) then
self:__TryToRemoveBonusResource(pTempPlot);
return pTempPlot;
end
end
return nil;
end
Alternate solution: add the old placement code directly in your scripts:
if(validity test fails) then
bValid = false;
else
local iFallBackScoreTemp = X;
if (iFallBackScore <= iFallBackScoreTemp) then
pFallback = pTempPlot;
iFallBackScore = iFallBackScoreTemp;
end
end
Alert doesn't do anything. Units on alert just sit there and get hammered by Barbs/Other civs and do nothing. Ok if you are on that screen, but not if you are looking at a different part of the map. No notificationThis is a problem with the Production Queue mod you're using. It is not currently compatible with the patch.
The mod was likely removed when Firaxis added it to the base game. You do not need a mod for this. Just use the "Alert" button when selecting a unit.
Since 2K acquired Firaxis and the Civ franchise, Firaxis no longer does anything but in-house QA testing and the majority of that is automated just looking for script running errors. So it seems they use their limited human testing resources to test only if the code they write does what they want for the specific situation they wrote it for. It appears no overall testing is done as I recall happening in Civ 4, I was a beta tester for Civ 4 and all of its expansions.I wonder how this starting position problem came up in the first place. They didn't introduce any changes to the game that would require a change to the starting position code, did they. So how come this doesn't work anymore when it worked fine for a year now.
Apart from that : could someone kindly summarize how to actually fix this myself? I see some solutions here and there, but I did not quite understand if they fix the problem completely or if I'll have to deal with other problems then. And what code has to be replaced by which code and where in which file?
Highly appreciated.