Sid Meier's Civilization V

Sid Meier's Civilization V

SMAN's Privy Council - The Monarchs
S-Man  [developer] Aug 15, 2018 @ 4:04pm
Quickfix for Really Advanced Setup (RAS) Mod incompatibilty
Hello - if you're having difficulty with RAS and this mod working together, there is an inelegant fix to get you through until I can change my mod to accommodate RAS's problems. It will require some editing of a core mod file.

1. Using Windows Explorer (not Internet Explorer) by pressing the WIN-E key combination, navigate to this mod's LUA folder - usually some place like this:


C:\Users\XXXX\Documents\My Games\Sid Meier's Civilization 5\MODS\AfterTheRevoltion (v 1)\LUA

Where 'XXXX' is the account you installed the game under


2. Using Notepad (or any text editor), open the file "GovernmentOverviewManageSaveTable.lua"



3. Basically, delete the entire contents of the file, then copy/paste this section below:



-- GovernmentOverviewManageSaveTable()
-- Author: sman
-- DateCreated: 07/09/18 12:02:49 PM
--------------------------------------------------------------

function InitializeGovernmentTable() -- Gets gov building game turn creation from game's SavedData
if (iGOV_Table_Built == nil) then -- No saved table exists - populate it with default valuesa
print("Building Governments Age table...")
iStartingGameTurn = Game.GetStartTurn() or 1

for iDX = 0, GameDefines.MAX_MAJOR_CIVS - 1, 1 do
local pPlayer = Players[iDX];
if pPlayer ~= nil then
local iGovType = GetGovernmentType(pPlayer) -- Default to "Anarchy" for major/live civs
local sCivDBKey = string.format("GOV_OV_GOV_AGE_PLAYER_%02i", pPlayer:GetID())
local iCivGovAge = g_tSavedData.GetValue(sCivDBKey) or -1 -- Get govt Age, but use "Anarchy" if the return type isn't valid
if iCivGovAge == -1 then iCivGovAge = iStartingGameTurn end

if pPlayer:IsAlive() then
g_tSavedData.SetValue(sCivDBKey, iCivGovAge)
dPrint("iDX: " .. iDX .. " Player: " .. pPlayer:GetCivilizationShortDescription() .. " Gov Type: " .. g_tGovernment_Types[iGovType][1] .. " DB Key: " .. sCivDBKey .. " Gov Start GT: " .. iCivGovAge)

end

end
end
end
end
Events.SequenceGameInitComplete.Add( InitializeGovernmentTable )



4. Save the file, exit Notepad, then reload the mod combination. They both should work together.


Let me know if you see any problems. Thanks.

Last edited by S-Man; Nov 11, 2018 @ 2:13am