Hi all,
I am working through updating my mods to work with the recent updates, though I did not purchase the expansion. Apparently I am no longer able to set a plot owner in the following way:
local plot = Map.GetPlot(locX, locY);
local playerCapital = Players[owner]:GetCities():GetCapitalCity();
WorldBuilder.CityManager():SetPlotOwner(plot, playerCapital);
Lua.log shows "function expected instead of nil" on the SetPlotOwner line. Parameters "plot" and "playerCapital" are holding the correct values, checked by printing them out before trying to run SetPlotOwner.
I skimmed through the .diff file posted by Gedemon here (https://forums.civfanatics.com/threads/change-to-modding-from-the-gathering-storm-patch.642080/), but didn't identify any obvious issue. I haven't modded here in a while, and am pretty rusty. If the required parameters for that function have changed, I don't know how to go about finding the updated ones. Any help in fixing this issue would be greatly appreciated.
I am working through updating my mods to work with the recent updates, though I did not purchase the expansion. Apparently I am no longer able to set a plot owner in the following way:
local plot = Map.GetPlot(locX, locY);
local playerCapital = Players[owner]:GetCities():GetCapitalCity();
WorldBuilder.CityManager():SetPlotOwner(plot, playerCapital);
Lua.log shows "function expected instead of nil" on the SetPlotOwner line. Parameters "plot" and "playerCapital" are holding the correct values, checked by printing them out before trying to run SetPlotOwner.
I skimmed through the .diff file posted by Gedemon here (https://forums.civfanatics.com/threads/change-to-modding-from-the-gathering-storm-patch.642080/), but didn't identify any obvious issue. I haven't modded here in a while, and am pretty rusty. If the required parameters for that function have changed, I don't know how to go about finding the updated ones. Any help in fixing this issue would be greatly appreciated.