Removing One Tile Islands

You'd have to add some custom stuff to the existing scripts but yes. If you're familiar with Lua, you could dig into either of my map scripts and see what I've done regarding single tile islands. GeneratePlotTypes() is the function where I'm killing single-tile mountain islands. I'm doing so with a table of mountain tiles I stored from just above in the same method but the detection and removal of tiles is essentially the same you'd just be iterating on every tile on the map instead of a table (an example of that is also just above where I'm messing with islands). The only custom helper method I see being used at first glance is a spiral/neighbor iterator.
 
I'm sorry I have no experience with Lua, I have been looking at your code, but can't make much sense of it.
This is the part of the code your talking about, right ??

-- Gets rid of most single tile mountains in the oceans. -- Bobert13
for k = 1,#mountainTab,1 do
local i = mountainTab[k]
local plot = Map.GetPlotByIndex(i)
local tiles = GetSpiral(i,1,1)
local landCount = 0
for n=1,#tiles do
local ii = tiles[n]
if ii ~= -1 then
local nPlot = Map.GetPlotByIndex(ii)
if nPlot:GetPlotType() == PlotTypes.PLOT_HILLS then
landCount = landCount + 1
elseif nPlot:GetPlotType() == PlotTypes.PLOT_LAND then
landCount = landCount + 1
end
end
end
if landCount == 0 then
local roll1 = PWRandInt(1,4)
if roll1 == 1 then
plot:SetPlotType(PlotTypes.PLOT_LAND,false,true)
else
plot:SetPlotType(PlotTypes.PLOT_HILLS,false,true)
end
end
end
 
Actually, I think I have removed them, using the newest version of Planet Simulator, thanks

Thanks.
 
Top Bottom