[GS] Playing with mod civ, culture gain on holy site pillage not working

i like turtles

Chieftain
Joined
Feb 17, 2015
Messages
43
This mod civ im using has a leader ability that gives me culture that scales with era when I pillage a holy site on my home continent. The problem is that instead of giving my faith and culture when I pillage, it gives me two separate faith boosts. Im in the industrial era so pillaging a holy site gives me 120 Faith and another 30.

After looking around in the lua script for the mod, I found this:

Code:
-- Nobu_OnPillage
-- Gain Culture on pillaging a Holy Site on Nobu's home continent.
----------------------------------------------------------------------------------------------------------------------------
function Nobu_OnPillage(iOwner, iDistrict, iCity, iX, iY, iDistrictType, iPercentComplete, bPillaged)
    print(iOwner, iDistrict, iCity, iX, iY, iDistrictType, iPercentComplete, bPillaged)
    if bPillaged == 1 and iDistrictType == iHolySiteType then
        local pPlot = Map.GetPlot(iX, iY)
        if pPlot then
            local aUnits = Units.GetUnitsInPlot(pPlot);
            for i, pUnit in ipairs(aUnits) do
                if pUnit:GetCombat() > 0 then
                    local pPlayer = Players[pUnit:GetOwner()]
                    local iPlayer = pPlayer:GetID()
                    if iPlayer ~= iOwner then
                        local playerConfig = PlayerConfigurations[iPlayer]
                        if not playerConfig then print("No valid player.") return end
                        local leaderType = playerConfig:GetLeaderTypeName()
                        local civilizationType = playerConfig:GetCivilizationTypeName()
                       
                        for trait, value in pairs(tHolySiteTraits) do
                            if (HasCivilizationTrait(civilizationType, trait) == true or HasLeaderTrait(leaderType, trait) == true) then
                               
                                --Same continent?
                                local pPlayerCapital = pPlayer:GetCities():GetCapitalCity()
                                local iCapitalX = pPlayerCapital:GetX()
                                local iCapitalY = pPlayerCapital:GetY()
                                local pCapitalPlot = Map.GetPlot(iCapitalX, iCapitalY)
                                print(pPlot:GetContinentType(), pCapitalPlot:GetContinentType())
                                if pPlot:GetContinentType() == pCapitalPlot:GetContinentType() then
                               
                                    local iCultureGain = iBaseCulture + (pPlayer:GetEra() * iExtraCulturePerEra)
                                    --since eras start at 0, this will make Ancient pillaging only be the base culture amount
                                   
                                    pPlayer:GetCulture():ChangeCurrentCulturalProgress(iCultureGain)
                                    --LuaEvents.Custom_StatusMessage(Locale.Lookup("LOC_STATUS_MESSAGE_TRAIT_VV_TENKA_FUBU_CULTURE_GAIN", iCultureGain), 10, ReportingStatusTypes.DEFAULT)  --GS broke LuaEvents, thanks
                                    Game.AddWorldViewText(0, "[COLOR_FLOAT_CULTURE]+"..iCultureGain.." [ICON_Culture][ENDCOLOR]", iX, iY, 0.5)
                                end
                            end
                        end
                    end
                end
            end
        end
    end
end

It seems that the way lua scripts work in GS made the feature not work anymore. Can anyone tell me how to fix this? I also provided the save file if it helps. No other mods are being used.

Mod is vicevirtuoso's Fate Oda Nobunaga: https://steamcommunity.com/sharedfiles/filedetails/?id=1720057060 .
 

Attachments

  • ODA NOBUNAGA 20 3240 BC.Civ6Save
    3.1 MB · Views: 10
Top Bottom