[Extension] [POLL] More Wonders for VP

What is your opinion on Flavoured Help Texts unique for More Wonders mod?

  • I like them and I use them every game

  • I use them from time to time to check how they perform

  • I use them only to give some feedback to the author

  • I prefer original version, but I don't mind them

  • I prefer original version, but I played with them few times

  • I don't like them in their current state, but I think they can be improved

  • I don't like them and disable them every game

  • I like them, but still I think they can be improved


Results are only viewable after voting.
Sorry Adan, some problem with Zocalo conditions : I have flat, plains but not lake and I can build it.

Spoiler Zocalo :
All wonders requiring Lake have busted requirements.
"Water = 1, MinAreaSize = 1" doesn't work anymore as Lake requirement. Better substitute with Lua.
 
All wonders requiring Lake have busted requirements.
"Water = 1, MinAreaSize = 1" doesn't work anymore as Lake requirement. Better substitute with Lua.
It was always supported with lua.

Code:
-- checks if city is between River and Sea and adds this condition (normally it would be treated like city with Lake)
-- Sea and Lake        =    FreshWater == true,     Water>=1 == true            true
-- Lake and River    =    FreshWater == true,     Water>=1 == true            true
-- Sea and River    =    FreshWater == true,     Water>=1 == true            true? (should be false)
-- Sea                =    FreshWater == false,     Water>=1 == true            false
-- Lake                =    FreshWater == true,     Water>=1 == true            true
-- River            =    FreshWater == true,     Water>=1 == false            false
function IsLakeWithOcean(ePlayer, eCity, eBuilding)
    if not tValidIsNearLake[eBuilding] then return true end
    if bReachedMaxEra then return false end

    local pPlayer = Players[ePlayer]
 
    if not pPlayer:IsAlive() then return false end

    local pCity = pPlayer:GetCityByID(eCity)
    local iCityX = pCity:GetX()
    local iCityY = pCity:GetY()

    if pCity:IsCoastal(1) then -- city is adjacent to at least one water tile
        for dir = 0, DirectionTypes.NUM_DIRECTION_TYPES - 1 do
            if Map.PlotDirection(iCityX, iCityY, dir):IsLake() then
                return true
            end
        end
    end

    return false
end
GameEvents.CityCanConstruct.Add(IsLakeWithOcean)
Code:
-- IsNearLake
    -- add lake buildings ==> lake is when: FreshWater = 1, Water = 1, MinAreaSize = 1
    for building in GameInfo.Buildings() do 
        if building.FreshWater and building.Water and building.MinAreaSize == 1 and building.IsCorporation == 0 then
            local eBuilding = GameInfoTypes[building.Type]
          
            --dprint("...adding (id,building,requirement)", building.ID, building.Type, "(IsNearLake)")
            tValidIsNearLake[building.ID] = true
        end
    end
Question is, why it is not working. Any lua errors @gwennog?
How about other "lake" wonders?
 
Ok, found it. There's an error caused by VP cleanup.
This works:
Code:
-- IsNearLake
    -- add lake buildings ==> lake is when: FreshWater = 1, Water = 1, MinAreaSize = 1
    for building in GameInfo.Buildings() do
        if building.FreshWater and building.Water and building.MinAreaSize == 1 and not building.IsCorporation then
            local eBuilding = GameInfoTypes[building.Type]
         
            --dprint("...adding (id,building,requirement)", building.ID, building.Type, "(IsNearLake)")
            tValidIsNearLake[building.ID] = true
        end
    end
It was
Code:
building.IsCorporation == 0
and should be
Code:
not building.IsCorporation
You must paste it into UniqueWorldWonderRequirements.lua. Find similar function (look to post above).
Sorry for inconvienience.
 
"King Solomon's Mines" in neutral territory grants "For the King" promotion to adjacent workers despite the description mentioning this effect should only be applied for the wonder's owner.
Fixed. Also OnTile promotions like in Bermuda Triangle will be fixed in new version.
 
Back
Top Bottom