1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Sukritact's Events and Decisions

Discussion in 'Civ5 - Modpacks' started by sukritact, Jun 22, 2014.

  1. Chrisy15

    Chrisy15 Flower, Beautiful

    Joined:
    Jul 9, 2015
    Messages:
    2,070
    Your Lua log might have an error message which could identify what's causing the system to run into an error.
     
  2. JigglyBuffer

    JigglyBuffer Chieftain

    Joined:
    Jun 12, 2019
    Messages:
    4
    Gender:
    Male
    I did as your link asked and found this error message, repeating several times as E&D loads. Copying them all here for good measure:
    [19059.375] Runtime Error: C:\Users\Gabriel\Documents\My Games\Sid Meier's Civilization 5\MODS\Sukritact's Events and Decisions (v 3)\Lua/UI/EnactDescisionsPopup.lua:402: attempt to call method 'BuildInstance' (a nil value)
    [19079.015] Runtime Error: C:\Users\Gabriel\Documents\My Games\Sid Meier's Civilization 5\MODS\Sukritact's Events and Decisions (v 3)\Lua/UI/EnactDescisionsPopup.lua:402: attempt to call method 'BuildInstance' (a nil value)
    [19082.572] Runtime Error: C:\Users\Gabriel\Documents\My Games\Sid Meier's Civilization 5\MODS\Sukritact's Events and Decisions (v 3)\Lua/UI/CityInfoStack.lua:59: attempt to call method 'BuildInstance' (a nil value)
    [19085.115] Runtime Error: C:\Users\Gabriel\Documents\My Games\Sid Meier's Civilization 5\MODS\Sukritact's Events and Decisions (v 3)\Lua/UI/EnactDescisionsPopup.lua:402: attempt to call method 'BuildInstance' (a nil value)
    [19085.365] Runtime Error: C:\Users\Gabriel\Documents\My Games\Sid Meier's Civilization 5\MODS\Sukritact's Events and Decisions (v 3)\Lua/UI/EnactDescisionsPopup.lua:402: attempt to call method 'BuildInstance' (a nil value)
    [19095.115] Runtime Error: C:\Users\Gabriel\Documents\My Games\Sid Meier's Civilization 5\MODS\Sukritact's Events and Decisions (v 3)\Lua/UI/CityInfoStack.lua:59: attempt to call method 'BuildInstance' (a nil value)
    [19098.047] Runtime Error: C:\Users\Gabriel\Documents\My Games\Sid Meier's Civilization 5\MODS\Sukritact's Events and Decisions (v 3)\Lua/UI/CityInfoStack.lua:59: attempt to call method 'BuildInstance' (a nil value)

    I have since found the only instance of "BuildInstance" in the E&D Lua file. Copying the function below:

    g_ItemManagers[tInfo[sKey].iKey]:BuildInstance()
    local itemInstance = g_ItemManagers[tInfo[sKey].iKey]:GetInstance()

    local Pedia = CivilopediaControl and (tEvent.Pedia)
    if Pedia then
    itemInstance[tInfo[sKey].sButton]:RegisterCallback(Mouse.eRClick, function() getPedia(Pedia) end)

    local sPediaTitle = Locale.ConvertTextKey(tEvent.Pedia)
    local sHelpPedia = Locale.ConvertTextKey("TXT_KEY_RIGHT_CLICK_NOTE", sPediaTitle)
    tEvent.Desc = tEvent.Desc .. sHelpPedia
    end

    I hope this helps! Thank you for working through this with me.
     
  3. JFD

    JFD Kathigitarkh

    Joined:
    Oct 19, 2010
    Messages:
    9,107
    Location:
    The Kingdom of New Zealand
    To clarify, the recent gameplay mods I've released on Steam have no compatibility issues with E&D. Chrisy was referring specifically to Rise to Power, which in general I would advise against using and don't support atm because of incompatibilities like this.
     
    JigglyBuffer likes this.
  4. JigglyBuffer

    JigglyBuffer Chieftain

    Joined:
    Jun 12, 2019
    Messages:
    4
    Gender:
    Male
    Thanks for the reply JFD! Would you happen to know anything about the bug I encountered? It's frustrating to see the pop-ups come up when I have the gold, culture and faith to enact a certain decision, only to be unable to select it in the decisions panel. Also, events don't seem to be happening anymore either. I really appreciate Chrisy's and your help!
     
  5. Chrisy15

    Chrisy15 Flower, Beautiful

    Joined:
    Jul 9, 2015
    Messages:
    2,070
    Spoiler :


    I don't see how this error can be coming about: the object BuildInstance is being called on can't be nil, because otherwise the error message would reflect that fact; the method can't have been left undefined by InstanceManager.lua because ResetInstances is defined after it in that file, and that method must be working fine for the interpreter to reach this part of the file. The fact that the same method is found to be nil in two different files implies the issue must be with InstanceManager rather than its specific instances themselves, but I don't know why anything would be rewriting InstanceManager.lua nor how this would happen if you have no other mods running. Are there more errors in the log? Do you want to just try Verifying Integrity through Steam?
     
  6. bc1

    bc1

    Joined:
    Jan 12, 2004
    Messages:
    1,210
    This is likely a compatibility issue with the latest EUI beta: since BuildInstance is never used by Firaxis for any other purpose than a subroutine to GetInstance, it was not included in EUI's optimized instance manager (which overwrites InstanceManager.lua).

    In the next EUI version I will add a dummy BuildInstance function (that does nothing) to improve compatibility... In the mean time, you can safely delete line 402 from Sukritact's Events and Decisions (v 3)\Lua/UI/EnactDescisionsPopup.lua.

    Edit:

    Actually with the base game InstanceManager, the mod's BuildInstance call on line 402 of EnactDescisionsPopup.lua defeats the action of its ResetInstances call line 323, so the mod will spam new hidden instances and eventually cause an out of memory crash. If the goal was to make the sure the instances appeared in a predictable order, the mod should be using GenerationalInstanceManager:new instead of InstanceManager:new, but in no case should it use BuildInstance. CityInfoStack.lua and RandomEventsPopup.lua both have the same issue. Proposed fix attached (untested).

    Given my analysis this mod needs a fix, I will not be making any change to EUI.
     

    Attached Files:

    Last edited: Jun 14, 2019
  7. chrisgatt7

    chrisgatt7 Prince

    Joined:
    Mar 26, 2013
    Messages:
    327
    Any luck bringing this to civ vi ?
     
  8. Mursilis

    Mursilis Chieftain

    Joined:
    Aug 1, 2019
    Messages:
    1
    I have the same problem with the "Decisions" icon. It does not appear in the upper interface. I have used the "Fix" files and it doesn't work. Any solution?
     

Share This Page