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

How to change the name of a civilization in LUA?

Discussion in 'Civ5 - SDK / LUA' started by clausewitz77, Apr 4, 2013.

  1. clausewitz77

    clausewitz77 Chieftain

    May 14, 2006
    I want to create a little mod which changes the names of civilizations at the start of certain eras. For example: Persia becomes Iran in the industrial era. Gaul becomes France in the Renaissance and so on.

    I did a lot of research but I could not find a way to change the name of a civilization during the game.

    Before the game would be in SQL such as:
    UPDATE Civilizations SET ShortDescription='Iran' WHERE Type='CIVILIZATION_PERSIA';
    Or I would change the localized texts in SQL.

    From what I read, it looks like the game database can not be changed during the game. Is that true? Is it possible to change the localized texts?

    The Lua-event would be:
    Events.SerialEventEraChanged( g_iCityEra-1, g_iCurrPlayer );
    But how can I change the name of the civilization in the event handler??

    Thanks for any help!!
  2. Gedemon

    Gedemon Modder Moderator

    Oct 4, 2004
    have you tried PreGame.SetCivilizationDescription(PlayerID EditSlot, string arg1) ?

    (or SetCivilizationShortDescription or SetCivilizationKey ...)

Share This Page