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

Patch 674: Change to DiploCorner

Discussion in 'Civ5 - SDK / LUA' started by whoward69, Jun 17, 2012.

  1. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,201
    Location:
    Near Portsmouth, UK
    The DiploCorner in the standard game (post patch 674) now has a mechanism for adding new entries into the drop-down, which in theory makes the custom diplo corner mods (here and here) redundant.

    To add a new entry, use the following template code

    Code:
    function OnDiploCornerPopup()
      -- Display your mod here
    end
    
    function OnAdditionalInformationDropdownGatherEntries(additionalEntries)
      table.insert(additionalEntries, {
        text=Locale.ConvertTextKey("TXT_KEY_MY_ADDIN_NAME"), 
        call=OnDiploCornerPopup
      })
    end
    LuaEvents.AdditionalInformationDropdownGatherEntries.Add(OnAdditionalInformationDropdownGatherEntries)
    LuaEvents.RequestRefreshAdditionalInformationDropdownEntries()
     
  2. ww2commander

    ww2commander Chieftain

    Joined:
    Aug 23, 2003
    Messages:
    1,243
    Location:
    Australia
    Would I be causing any issues (likely CTDs) if I have modified the diplocorner files in my mod given these changes?
     
  3. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,201
    Location:
    Near Portsmouth, UK
    possibly - you should merge your changes into the new version of diplocorner.lua and not just replace the new version with "the old version plus your changes"
     

Share This Page