AssignStartingPlots fix for Communitu_79a

jarcast2

Janitor Raccoon
Joined
Jan 10, 2018
Messages
353
Location
Terra Incognita
The latest version 3.7.8 updated the AssignStartingPlots.lua fixing the starting location of City-States to avoid a "coastal" start at the poles surrounded by ice.
This change is not automatically ported to the Communitu mapscript when the option "Override AssignStartingPlots" is enabled.
In this case Communitu uses a custom function AssignCityStatesToRegionsOrToUninhabited that replaces the same one in the updated AssignStartingPlots.lua.
I just edited it to mimic the changes to the original function:

Line ~722
Before
Code:
if (plotType == PlotTypes.PLOT_LAND or plotType == PlotTypes.PLOT_HILLS) and terrainType ~= TerrainTypes.TERRAIN_SNOW then
After
Code:
if (plotType == PlotTypes.PLOT_LAND or plotType == PlotTypes.PLOT_HILLS) and self:CanPlaceCityStateAt(x, y, plot:GetArea(), false, false) then

Line ~760
Before
Code:
if terrainType ~= TerrainTypes.TERRAIN_SNOW then
After
Code:
if self:CanPlaceCityStateAt(x, y, areaID, false, false) then

Attached is the updated file to put in MODS\(2) Vox Populi\Mapscripts folder.
 

Attachments

  • Communitu_79a.zip
    54.2 KB · Views: 22
Please submit a pull request with the change, and change the version number to 2.6.3.
 
Top Bottom