1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Ice tiles blocking path around continent

Discussion in 'Community Patch Project' started by GodDamnItAlexander, May 16, 2017.

  1. GodDamnItAlexander

    GodDamnItAlexander Warlord

    Joined:
    Apr 24, 2017
    Messages:
    202
    Just wanted to ask if anyone else gets this issue - I play on small continents and sometimes ice tiles block one way around a continent (either the northern or southern end). I really don't like it having only subs being able to cross, and was wondering if there is a fix.
     
  2. bigcat88

    bigcat88 King

    Joined:
    Nov 26, 2016
    Messages:
    743
    Gender:
    Male
    I have, I don't know what to do with it. Maybe somewhere there is mod that adds a unit to delete ice, idk. So I just edit map script to create less ice.
    Try Planet Simulator map script. There in file u can edit strings:
    iceNorthLatitudeLimit
    iceSouthLatitudeLimit
    they are in InitializeTemperature function. Or just use "Warm" settings for map(I just copied ice settings from warm option to standart)
     
  3. PapaRockett

    PapaRockett Prince

    Joined:
    Jun 29, 2016
    Messages:
    435
  4. pandasnail

    pandasnail Prince

    Joined:
    Nov 18, 2015
    Messages:
    535
  5. bigcat88

    bigcat88 King

    Joined:
    Nov 26, 2016
    Messages:
    743
    Gender:
    Male
    Just edit tectonic script.
    Quick look for just 5 secs(I need to go now from PC), u need code from string 953:
    function FeatureGenerator:AddIceAtPlot(plot, iX, iY, lat)

    Try to make func just empty. Maybe there will be no ice then. Or edit it's behaviour. Function looks very simple for first look. I get those code from link u provided, just replace original function in tectonic map script with this. Maybe it will work.

    Spoiler try replace func in tectonic map with this :

    Code:
    function FeatureGenerator:AddIceAtPlot(plot, iX, iY, lat)
        local terrainType = plot:GetTerrainType()
        -- ThorHammerz 01/16/2015
        -- Ice cannot appear on plots that are of terrain coast (balance reasons; all islands should be reachable)
        -- Ice cannot appear on plots next to land (which for some reason, the first conditional does not always preclude).
        if(plot:CanHaveFeature(self.featureIce) and terrainType == TerrainTypes.TERRAIN_OCEAN and plot:IsAdjacentToLand() == false) then
            if Map.IsWrapX() and (iY == 0 or iY == self.iGridH - 1) then
                plot:SetFeatureType(self.featureIce, -1)
            else
                local rand = Map.Rand(100, "Add Ice Lua")/100.0;
                if(rand < 7.5 * (lat - 0.875)) then
                    plot:SetFeatureType(self.featureIce, -1);
                elseif(rand < 3.5 * (lat - 0.75)) then
                    plot:SetFeatureType(self.featureIce, -1);
                end
            end
        end
    end


    I don't know lua language(I am a low level coder) and right now I need to go from PC, so cant help much.

    PapaRockett recommend u a quick and nice solution. Install IGE, open map on first turn(not explore, just open)(map will be closed after reload) - then use restart button from game menu if u don't like map, or if map is fine just make paths throw ice in IGE, make a savegame, load it to close minimap and have fun.
     
    Last edited: May 17, 2017
    pandasnail and PapaRockett like this.
  6. Moi Magnus

    Moi Magnus Emperor

    Joined:
    Mar 1, 2015
    Messages:
    1,867
    Note that in VP, if I remember correctly, ice tiles inside your borders can be crossed by your ships.
     
  7. bigcat88

    bigcat88 King

    Joined:
    Nov 26, 2016
    Messages:
    743
    Gender:
    Male
    Who prefer Planet Simulator map here I made some changes(added 1 comparsion to make ice only on ocean tiles, so there will be always a path):
    Spoiler Replace PlacePossibleIce function with this changed func :

    Code:
    function PlacePossibleIce(i,W)
        local featureIce = FeatureTypes.FEATURE_ICE
        local plot = Map.GetPlotByIndex(i)
        local terrainType = plot:GetTerrainType()
        local x = i%W
        local y = (i-x)/W
        if plot:IsWater() then
            if terrainType == TerrainTypes.TERRAIN_OCEAN then
                local temp = temperatureMap.data[i]
                local latitude = temperatureMap:GetLatitudeForY(y)
                local randvalNorth = PWRand() * (mc.iceNorthLatitudeLimit - mc.topLatitude) + mc.topLatitude - 3
                local randvalSouth = PWRand() * (mc.bottomLatitude - mc.iceSouthLatitudeLimit) + mc.iceSouthLatitudeLimit + 3
                --print(string.format("lat = %f, randvalNorth = %f, randvalSouth = %f",latitude,randvalNorth,randvalSouth))
                if latitude > randvalNorth  or latitude < randvalSouth then
                    local tiles = GetCircle(i,1)
                    local count = 0
                    for n=1,#tiles do
                        local ii = tiles[n]
                        --local xx = ii % W
                        --local yy = (ii-xx)/W
                        local nPlot = Map.GetPlotByIndex(ii)
                        if nPlot:GetFeatureType() ~= -1 and nPlot:GetFeatureType() ~= FeatureTypes.FEATURE_ICE then
                            local tiles2 = GetSpiral(ii,1)
                            for nn = 2, #tiles2 do
                                local iii = tiles2[nn]
                                local pPlot = Map.GetPlotByIndex(iii)
                                if iii == -1 or pPlot:GetFeatureType() == FeatureTypes.FEATURE_ICE or not pPlot:IsWater() then
                                    count = count + 1
                                end
                            end
                        end
                    end
                    if count < 5 then
                        plot:SetFeatureType(featureIce,-1)
                    end
                end
            end
        end
    end

    Maybe a better idea will be write some code to make just path throw ices after ice was generated. Nothing hard, maybe later I will write such func - will see.
     
  8. GodDamnItAlexander

    GodDamnItAlexander Warlord

    Joined:
    Apr 24, 2017
    Messages:
    202
    Thanks for the replies everyone. :)
     
  9. Acepox

    Acepox Chieftain

    Joined:
    Jan 29, 2017
    Messages:
    40
    Gender:
    Male
    Man yall are wusses. Just play the game. That's not gamebreaking at all!
     
  10. zeofig

    zeofig Warlord

    Joined:
    Jul 6, 2016
    Messages:
    106
    It seems like no one mentioned that your ships can move through forts/citadels. When you combine this with building a city down near the ice (as mentioned above, ships can move through ice in your territory), you can often make a nice path. This can be pretty fun/satisfying. Of course, it still sucks when this is impossible.
     

Share This Page