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. sukritact

    sukritact Artist and Modder

    Joined:
    Sep 21, 2010
    Messages:
    2,860
    Location:
    Bangkok
    Extract it to your mods folder, wherever that might be
     
  2. LordBaal

    LordBaal Sistem Lord

    Joined:
    Oct 28, 2014
    Messages:
    82
    Gender:
    Male
    You should put this on the steam workshop.
     
  3. RoxyRiku94

    RoxyRiku94 Detective Agent

    Joined:
    Jan 30, 2016
    Messages:
    141
    Gender:
    Male
    Location:
    Souzai Daigaku
    Hey there, I'm trying to create some decisions for a civ, but for some reason after starting the game, the text boxes are messed up while hovering over the enact button:

    Spoiler :
    The text box's text is supposed for the last civ decision shown at the image:



    I've looked at the Lua Decision Files and in the Lua.log before, but I can't find anything wrong. Any suggestions on how to fix it?

    EDIT: Added the Decisions into the ZIP file.
     

    Attached Files:

    Last edited: Dec 28, 2016
  4. Chrisy15

    Chrisy15 Flower, Beautiful

    Joined:
    Jul 9, 2015
    Messages:
    2,077
    Dunno if this is the cause, but pScroogeITCUnit is undefined in the decision - and even if it was defined, I'm pretty sure that setting a variable to nil is the equivalent of deleting it :/
     
  5. RoxyRiku94

    RoxyRiku94 Detective Agent

    Joined:
    Jan 30, 2016
    Messages:
    141
    Gender:
    Male
    Location:
    Souzai Daigaku
    That's weird. I've pretty much borrowed the Lua Code from the Dutch Navy Decision, but looking and comparing them plainly doesn't seem to reveal anything.

    The Dutch Navy Decision's code...
    Code:
    pDutchNavyUnit = nil
           local pPlot = pCity:Plot()
           local iNumUnits = pPlot:GetNumUnits()
           for iVal = 0,(iNumUnits - 1) do
               local pUnit = pPlot:GetUnit(iVal)
               local iUnitClass = pUnit:GetUnitClassType()
               if (pUnit:GetUnitClassType() == GameInfoTypes.UNITCLASS_MERCHANT) or (pUnit:GetUnitClassType() == GameInfoTypes.UNITCLASS_GREAT_ADMIRAL) then
                   pDutchNavyUnit = pUnit
                   break
               end
           end
           if pDutchNavyUnit ~= nil then
               return true, true
           else
               return true, false
           end
    ...in comparison to the Duckburg ITC Wonder Decision (all I've changed from the vanilla code was the GP Requirement and iUnitclass) :
    Code:
    pScroogeITCUnit = nil
           local pPlot = pCity:Plot()
           local iNumUnits = pPlot:GetNumUnits()
           for iVal = 0,(iNumUnits - 1) do
               local pUnit = pPlot:GetUnit(iVal)
               local iUnitClass = pUnit:GetUnitClassType()
               if (iUnitclass == GameInfoTypes.UNITCLASS_GREAT_GENERAL) then
                   pScroogeITCUnit = pUnit
                   break
               end
           end
           if pScroogeITCUnit ~= nil then
               return true, true
           else
               return true, false
           end
       end
    
     
  6. meRlinX_AT

    meRlinX_AT JustMe

    Joined:
    Jan 19, 2015
    Messages:
    161
    Location:
    Earth
    is it right? - there is no longer a separate version for CP/CBO?

    thanks for info
     
  7. eXalted

    eXalted Chieftain

    Joined:
    Jun 28, 2012
    Messages:
    61
    I am getting a City Decision event but clicking on its icon doesn't open a pop-up window. Clicking Next Turn is also not possible so I am stuck.

    Am I the only one with this problem?
     
  8. Chrisy15

    Chrisy15 Flower, Beautiful

    Joined:
    Jul 9, 2015
    Messages:
    2,077
    Lua log, although if it's got a finger notification on the right surely it's a CP Event...
     
  9. eXalted

    eXalted Chieftain

    Joined:
    Jun 28, 2012
    Messages:
    61
    Here is the log - http://pastebin.com/GQm27V0k

    I see a "Runtime Error: Sound cannot be found" line. Is that it?
     
    Last edited: Jan 11, 2017
  10. Chrisy15

    Chrisy15 Flower, Beautiful

    Joined:
    Jul 9, 2015
    Messages:
    2,077
    I suspect the problem is that you're using the Events Compendium without any of the JFDDLC; the EC requires both RTP and CID, because otherwise you'll end up with a lot of events that will be missing parts. This issue might be the cause of your problem, given that if the Runtime Error is connected to the issue then the event is likely referencing a sound effect added by CID, which obviously isn't there.
     
  11. eXalted

    eXalted Chieftain

    Joined:
    Jun 28, 2012
    Messages:
    61
    Thank you for the answer. It's really helpful. As I am starting to play Civ V with mods for the first time, I'm slowly adding mods one by one and completing game sessions to see how every mod plays. That's why I haven't yet installed the other JFD mods.
     
  12. meRlinX_AT

    meRlinX_AT JustMe

    Joined:
    Jan 19, 2015
    Messages:
    161
    Location:
    Earth
    Bug in DecisionsAddinSupport.sql

    CREATE TABLE IF NOT EXISTS Building_YieldFromCityStates (
    BuildingType text,
    YieldType text,
    Yield integer default 0,
    IncludeFriendly boolean default false
    );

    CREATE TABLE IF NOT EXISTS Building_YieldFromCityStates (
    BuildingType text,
    YieldType text,
    Yield integer default 0,
    IncludeFriendly boolean default 0
    );

    greetz
    :)
     
  13. RoxyRiku94

    RoxyRiku94 Detective Agent

    Joined:
    Jan 30, 2016
    Messages:
    141
    Gender:
    Male
    Location:
    Souzai Daigaku
    With Events and Decisions, how do you force a specific event once you enacted a certain decision?
     
  14. SLGray

    SLGray King

    Joined:
    May 18, 2015
    Messages:
    898
    Gender:
    Male
    Location:
    United Sates
    Events are random.
     
  15. RoxyRiku94

    RoxyRiku94 Detective Agent

    Joined:
    Jan 30, 2016
    Messages:
    141
    Gender:
    Male
    Location:
    Souzai Daigaku
    I'm normally aware that Events are random, but I'm not talking about the Events itself, but rather about the trigger to activate a specific event.
     
  16. Chrisy15

    Chrisy15 Flower, Beautiful

    Joined:
    Jul 9, 2015
    Messages:
    2,077
    Code:
    LuaEvents.PushRandomEventPopup(pPlayer, tEvent)
    Apparently.
     
  17. RoxyRiku94

    RoxyRiku94 Detective Agent

    Joined:
    Jan 30, 2016
    Messages:
    141
    Gender:
    Male
    Location:
    Souzai Daigaku
    Thanks. I'll try it out later.
     
  18. Pengan

    Pengan Chieftain

    Joined:
    Mar 22, 2017
    Messages:
    1
    Gender:
    Male
    I am curious to what is wrong with this mod : I keep having to crash my game because I cannot click the pop-ups that the events generate. I Think it is a timing issue that has something to do with the event firing while it is still the AI doing their turn, so I am not allowed to click on stuff, OR that something else in the game also has a pop-up that has focus, but is hidden behind the mod pop-up. Any thoughts on this ?

    Note that is only happens sometimes not every popup.
     
  19. Grandy

    Grandy Chieftain

    Joined:
    Mar 28, 2013
    Messages:
    2
    The events seem to be functioning okay, but I cannot seem to be able to find the Decisions menu. I understand it was supposed to show on the same drop down list as the Science or Unit List options, right?
     
  20. NN23

    NN23 Warlord

    Joined:
    Jan 9, 2014
    Messages:
    115
    i haven't played civ 5 in a while, do i need this one or events compendium?
     

Share This Page