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

[HowTo] Play "Yet (not) Another Earth Map Pack" with CPP

Discussion in 'Community Patch Project' started by Estebanium, Jan 27, 2015.

  1. Comrade Deeco

    Comrade Deeco Chieftain

    Joined:
    Jul 5, 2015
    Messages:
    5
    Location:
    UK
    Have an issue with resources (only oasis and atolls appear), no ruin placements and TSL isnt working with Ynaemp v25:

    Dunno if any of this is helpful but Lua keeps flagging this:

    [72261.593] Syntax Error: D:\Daleth\Documents\My Games\Sid Meier's Civilization 5\MODS\JFDLC (10) - Gedemon's YnAEMP (v 25)\LUA\YnaemLoading.lua:514: 'end' expected (to close 'function' at line 459) near 'elseif'
    These lines correspond to:
    Code:
    function CanPlaceDepositAt (resourceID, plotX, plotY)
        local plot = Map:GetPlotXY(plotX, plotY)
        local ignoreLatitude = true
    
        local resource = GameInfo["Resources"][resourceID]
        
        if plot:GetPlotType() == PlotTypes.PLOT_OCEAN then
            -- don't use "CanHaveResource" if the plot is a ocean
            -- else all water resource will be placed immediatly at the coast
            -- we want some resources being almost out of reach
            -- to do : replace hardcoding by xml/DB settings
    
            if plot:GetTerrainType() == TerrainTypes.TERRAIN_OCEAN then
                -- allow resource on ocean ?
                return false
            end
            if plot:GetFeatureType() == FeatureTypes.FEATURE_ICE then
                -- allow resource under ice ?
                -- melting mod someone ? :-)
                return false
            end
            if plot:GetResourceType(-1) ~= -1 then
                -- Plot already had a resource.
                return false
            end
            local condition = "ResourceType = '" .. resource.Type .. "'"
            local bIsWater = false
            for row in GameInfo["Resource_TerrainBooleans"](condition) do
                if row.TerrainType == "TERRAIN_COAST" then
                    bIsWater = true
                end
            end
            if not bIsWater then
                -- this resource can't be placed on water...
                return false
            end
            if plot:IsLake() then
                -- the real hardcoding start here...
                -- no whales or oil in lakes
                if resource.Type == "RESOURCE_WHALE" or resource.Type == "RESOURCE_OIL" then
                    return false
                end
            end
            if plot:IsAdjacentToLand() then
                -- no whales or oil near the coast
                if resource.Type == "RESOURCE_WHALE" or resource.Type == "RESOURCE_OIL" then
                    return false
                end
            end
            if plot:IsFeatureAtoll() then
                -- no resources in atoll
                print ("do not place resources in atoll...")
                return false
                end   
            end
    elseif (not plot:CanHaveResource(resourceID, ignoreLatitude)) then
            return false
        end
    The only mods I use are that in the 43-Civ Version Repository (CP, CBO, CSDM, C4DF, More Lux, 43 Civs VP, UI Prom tree and Icons - non eui),
    VP Happiness notifications (v1) and Ynaemp Leaders for City States (v. 3)
    Any suggestions on getting resources?
    Deeco
     
  2. SLGray

    SLGray King

    Joined:
    May 18, 2015
    Messages:
    963
    Gender:
    Male
    Location:
    United Sates
  3. Tiber Septim

    Tiber Septim Chieftain

    Joined:
    Feb 18, 2019
    Messages:
    3
    Are you specifically wedded to using v25? I have been successfully playing with v22 since January, with all resources spawning correctly and accurate TSL; indeed, I'm currently in the middle of a Rome GEM game on the latest VP beta.

    (The only broken features are those attempting to control resource spawning. If you check the boxes for placing Civ-specific or region-accurate resources, the client will crash on load. Resource scaling, however, works perfectly well but I recommend avoiding it for the GEM if you want Luxuries and monopolies to be relevant.)
     

Share This Page