[Custom Civ] Tomatekh's Benin Empire for VP

Apparently you can build an Iya anywhere adjacent to a city, even if it isn't your city. AI Benin turned my city into an enclave by building an Iya right next to it.

It happened again, in my very next game, this time between 2 AIs.
 

Attachments

  • 8930_20250819095953_1.png
    8930_20250819095953_1.png
    3.3 MB · Views: 59
It happened again, in my very next game, this time between 2 AIs.
Ok I added a lua function that forbids constructing Iya adjacent to foreign Cities.

Spoiler code :

Code:
function Jar_CanBuildIya(iPlayer, eUnit, iX, iY, eBuild)
    local pPlot = Map.GetPlot(iX, iY)
    local pPlayer = Players[iPlayer]
    if eBuild == GameInfoTypes.BUILD_TOMATEKH_BENIN_IYA then
        for direction = 0, DirectionTypes.NUM_DIRECTION_TYPES - 1, 1 do
            local pAdjacentPlot = Map.PlotDirection(pPlot:GetX(), pPlot:GetY(), direction)
            if pAdjacentPlot and pAdjacentPlot:IsCity() and pAdjacentPlot:GetOwner() ~= iPlayer then
                return false
            end
        end
    end
    return true
end
GameEvents.PlayerCanBuild.Add(Jar_CanBuildIya)


In attachment there's the whole mod with the fix (v7) and also just the lua function file to replace for those in the middle of the games with Benin inside.
(I did not test because I have not much time but on paper it should work).
 

Attachments

Last edited:
I'm having trouble with this mod now. The 3rd and 4th components are not loading anymore. I'm using VP 4.22, (over) More Unique Components for VP (v 89), and Tomatekh's Benin for VP (v7). Any ideas?
 
New thread maintained by Jarcast
 
Back
Top Bottom