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

LUA - Odd text error

Discussion in 'Civ5 - Creation & Customization' started by sman1975, Nov 10, 2018 at 2:04 PM.

Tags:
  1. sman1975

    sman1975 Chieftain

    Joined:
    Aug 27, 2016
    Messages:
    641
    Location:
    Dallas, TX
    Hello,

    I'm working on a mod that adds a couple of customized civs.

    When I use the "GetCivilizationDescription()" method to pull the civ's name, the civ's Leader Name is returned. Same for GetCivilizationShortDescription, as well.

    I used SQLite Spy to look at the Localization database and see the correct data listed. It's just not being returned when called, unfortunately. The rest of the civ's data keys are loaded correctly as well.

    Cleared cache many, many times, even rebooted a couple of more.

    Has anyone ever seen an error like this before or know where to start looking?

    EDIT: For clarity - The mod added 6 civs, but the odd error only happened with 2 of them. All 6 civs used the same template...
     
    Last edited: Nov 10, 2018 at 3:50 PM
  2. MariusMagnus

    MariusMagnus Chieftain

    Joined:
    Mar 12, 2018
    Messages:
    51
    I've never used GetCivilizationDescription or GetCivilizationShortDescription, so I can't really offer much as for what the problem might be. The only advice I can really give is to try calling Player:GetCivilizationShortDescriptionKey and see if you get the correct key. If you do, try passing that through Locale.ConvertTextKey and see if that works.
     
  3. sman1975

    sman1975 Chieftain

    Joined:
    Aug 27, 2016
    Messages:
    641
    Location:
    Dallas, TX
    @marius - I tried your suggestion but they still returned the same bogus data - even though I know the localized db has it right.

    As (usually not my) luck would have it.... The error is showing up in a scenario mod I'm working on. I used someone else's map to get the mod started. While making some other adjustments to the map in WorldBuilder, I noticed that the original map maker had put some leader and civ names in the scenario editor.

    Removing those entries seemed to be all that was needed to resolve the error...

    :hammer2:

    Thanks!!!
     
    Last edited: Nov 12, 2018 at 6:39 PM

Share This Page