AW Arcaeca
Deus Vult
Well, my Inuit mod is nearly done, but there are still a few glitches.
One of which is that the alternate UB - the igloo (replaces granary) - is supposed to give +1 culture per era... that is, +1 if you're in the ancient era, +2 in classical, +3 in medieval, and so on. Well, it isn't. (Who could've seen that coming?
)
So I have coding, it has InGameUIAddin and everything, but no success:
I'm not entirely sure whether or not I was supposed to use "else break end", but I needed some way to end the code there.
So, questions:
1) Is such a feature even possible? Yields that change with the era?
2) Why wouldn't the code be working?
3) It isn't a syntax error - in fact, the lua.log mentions nothing. But why isn't it showing up?
If I still need to attach my mod, I can.
TIA
One of which is that the alternate UB - the igloo (replaces granary) - is supposed to give +1 culture per era... that is, +1 if you're in the ancient era, +2 in classical, +3 in medieval, and so on. Well, it isn't. (Who could've seen that coming?

So I have coding, it has InGameUIAddin and everything, but no success:
Spoiler :
Code:
GameEvents.PlayerDoTurn.Add(
function(playerID)
local pPlayer = Players[playerID]
if (pPlayer:IsAlive()) then
for pCity in pPlayer:Cities() do
local pBuilding = GameInfoTypes.BUILDING_IGLOO
local pBuildClass = GameInfoTypes.BUILDINGCLASS_GRANARY
local culture = GameInfoTypes.YIELD_CULTURE
if (pCity:IsHasBuilding(pBuilding)) then
if (pPlayer:GetCurrentEra() == GameInfoTypes.ERA_ANCIENT) then
pCity:SetBuildingYieldChange(pBuildClass, culture, 1)
elseif (pPlayer:GetCurrentEra() == GameInfoTypes.ERA_CLASSICAL) then
pCity:SetBuildingYieldChange(pBuildClass, culture, 2)
elseif (pPlayer:GetCurrentEra() == GameInfoTypes.ERA_MEDIEVAL) then
pCity:SetBuildingYieldChange(pBuildClass, culture, 3)
elseif (pPlayer:GetCurrentEra() == GameInfoTypes.ERA_RENAISSANCE) then
pCity:SetBuildingYieldChange(pBuildClass, culture, 4)
elseif (pPlayer:GetCurrentEra() == GameInfoTypes.ERA_INDUSTRIAL) then
pCity:SetBuildingYieldChange(pBuildClass, culture, 5)
elseif (pPlayer:GetCurrentEra() == GameInfoTypes.ERA_MODERN) then
pCity:SetBuildingYieldChange(pBuildClass, culture, 6)
elseif (pPlayer:GetCurrentEra() == GameInfoTypes.ERA_ATOMIC) then
pCity:SetBuildingYieldChange(pBuildClass, culture, 7)
elseif (pPlayer:GetCurrentEra() == GameInfoTypes.ERA_INFORMATION) then
pCity:SetBuildingYieldChange(pBuildClass, culture, 8)
else break end
end
end
end
end)
So, questions:
1) Is such a feature even possible? Yields that change with the era?
2) Why wouldn't the code be working?
3) It isn't a syntax error - in fact, the lua.log mentions nothing. But why isn't it showing up?
If I still need to attach my mod, I can.
TIA
