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

UI - Trade Opportunities

Discussion in 'Civ5 - Mod Components' started by whoward69, Feb 3, 2012.

  1. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,399
    Location:
    Near Portsmouth, UK
    C:\Users\{USERNAME}\Documents\My Games\Sid Meier's Civilization 5\Mods\UI - Trade Opportunities (v 11)\UI\InGame\Popups\DiploTradesStatus.lua

    Open with Notepad

    Code:
    function InitPlayer()
      GetCivControl(gPlayerIM, [B][COLOR="Red"]Game.GetActivePlayer()[/COLOR][/B], false)
    end
    I can't see any problems with the City States panel

    Tell me if it fixes the problem and I'll upload a new version to Steam Workshop

    W
     
  2. AndreP

    AndreP Chieftain

    Joined:
    Apr 14, 2010
    Messages:
    66
    Yes, it´s works, thank you.:)

    But not for "DiploCityStatesStatus.lua" (show Screenshot)

    I´m Germany and Player 2, Player 1 is Arabia.
     
  3. Txurce

    Txurce Deity

    Joined:
    Jan 4, 2002
    Messages:
    8,261
    Location:
    Venice, California
    Andre, your English is very good.
     
  4. AndreP

    AndreP Chieftain

    Joined:
    Apr 14, 2010
    Messages:
    66
    Thank you.:)
     
  5. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,399
    Location:
    Near Portsmouth, UK
    Now I see the problem

    C:\Users\{USERNAME}\Documents\My Games\Sid Meier's Civilization 5\Mods\UI - Trade Opportunities (v 11)\UI\InGame\Popups\DiploCityStatesStatus.lua

    Open with Notepad

    Code:
    function getAlly(pCs, pPlayer)
      [B][COLOR="Red"]local iPlayer = pPlayer:GetID()[/COLOR][/B]
      local sAlly, sAllyText
    Code:
    function getQuests(pCs, pPlayer, bForcePeace)
      local sQuestText = ""
      [B][COLOR="red"]local iPlayer = pPlayer:GetID()[/COLOR][/B]
      local pCsTeam = Teams[pCs:GetTeam()]
     
  6. AndreP

    AndreP Chieftain

    Joined:
    Apr 14, 2010
    Messages:
    66
    Thank you, it´s works fine.:)

    Now i have a new Problem.

    When i clicked on " Trade Opportunities or City States" and then on

    "Deal History etc" then... (show Screen).

    Edit:
    Sorry, my Mistake.

    I've forgotten a few lines in "DiploOverview.lua" :wallbash:
     
  7. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,399
    Location:
    Near Portsmouth, UK
    Version 12 uploaded, includes changes outlined aboved.
     
  8. AndreP

    AndreP Chieftain

    Joined:
    Apr 14, 2010
    Messages:
    66
    The Error in V11...

    ...is still present in V12.
     
  9. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,399
    Location:
    Near Portsmouth, UK
    Thanks.

    I also need to update the quest list to include the new quests, so I'll wait until I've done that before posting a new version
     
  10. skodkim

    skodkim Deity

    Joined:
    Jan 16, 2004
    Messages:
    2,221
    Location:
    Denmark
    I really don't understand this. Are we supposed to change anything in the file?


    Think I get the same error using v12:

    Spoiler :
    [3128.225] Runtime Error: [string "C:\Users\hollenbo\Documents\My Games\Sid Me..."]:28: attempt to index local 'pPlayer' (a nil value)
    [3135.620] Runtime Error: [string "C:\Users\hollenbo\Documents\My Games\Sid Me..."]:28: attempt to index local 'pPlayer' (a nil value)


    \Skodkim
     
  11. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,399
    Location:
    Near Portsmouth, UK
    The bug only affected people trying to use this mod with HotSeat. The changes are now in V12, so no you shouldn't need to edit anything.

    If you can confirm if those messages are in V12 (and not V11 - which they look like) I'll add them to the list of things to investigate.
     
  12. dbconfession

    dbconfession Chieftain

    Joined:
    Nov 1, 2010
    Messages:
    58
    i can't download from the workshop. Do you have a post for your latest updates here in the forums?
     
  13. skodkim

    skodkim Deity

    Joined:
    Jan 16, 2004
    Messages:
    2,221
    Location:
    Denmark
    I downloaded v12 from the workshop and the mod itself says v12 so...

    To make sure I included the mod (and the log file) in the post. Its not exactly the same as the one from the workshop as I made changes to DiploTradesStatus.xml because of the error from post 28 (concerning TXT_KEY_RESOURCE_###).

    \Skodkim
     
  14. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,399
    Location:
    Near Portsmouth, UK
    Sorry, but no, and never will. With over 110 mods it's not practical to maintain two upload areas.
     
  15. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,399
    Location:
    Near Portsmouth, UK
    I fix one bug and create another :(

    In DiploCityStatesStatus.lua

    Code:
    function ShowHideHandler(bIsHide, bIsInit)
      if (not bIsInit and not bIsHide) then
        [B][COLOR="Red"]InitCsList()[/COLOR][/B]
      end
    end
    ContextPtr:SetShowHideHandler(ShowHideHandler)
    
    [B][COLOR="red"]function InitCsList()
      local iPlayer = Game.GetActivePlayer()[/COLOR][/B]
      local pPlayer = Players[iPlayer]
    This one is bad enough that I'll post a new version (v13) in a bit
     
  16. skodkim

    skodkim Deity

    Joined:
    Jan 16, 2004
    Messages:
    2,221
    Location:
    Denmark
    Hi Whoward69

    Using v14 and enyoying it. It's a shame however that strategic resources aren't displayed. Any chance you could squeeze them in somewhere?

    \Skodkim
     
  17. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,399
    Location:
    Near Portsmouth, UK
    I think 6 more columns would definately break it's usabilty IMHO, so probably not.
     
  18. dbconfession

    dbconfession Chieftain

    Joined:
    Nov 1, 2010
    Messages:
    58
    can't u just add a separate "tab" in diplomacy for start resources instead of squeezing it into "Trade Opps"

    Or put it in Trade Opps, but just make ONE column at the end for strat resources, which blows pinto another similar pop-up screen when moused over, much like when mousing over culture, happiness out in the map screen.
     
  19. Martock

    Martock Warlord

    Joined:
    Jun 19, 2003
    Messages:
    254
    Location:
    South Carolina, USA
    For some reason this mod doesn't want to work now. Where I should be seeing Trade Opportunities, I get TXT_KEY_DO_TRADE_STATUS. Now I applied a fix you recommened to me the other day with regards to the Enhanced Rankings. I moved the Civ5ModsDatabase.db to a backup dir and then restarted, letting the mods update again. Trade Ops shows a check and shows up as loaded in my mods but for some reason doesn't work. Any ideas? Anything I can post to help?
     
  20. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,399
    Location:
    Near Portsmouth, UK
    Enable logging and see what's in database.log (and possibly xml.log and lua.log)
     

Share This Page