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

Localisation problem

Discussion in 'Civ6 - Creation & Customization' started by Olleus, Nov 15, 2016.

  1. Olleus

    Olleus Deity

    Joined:
    Oct 30, 2005
    Messages:
    6,478
    Location:
    Beyond the Veil
    My current project is working fine and everything is working as it should. Apart from the text localisation.

    If I launch civ from my desktop and then either create a new game or load one, then the text loads properly. If, however, from inside a game I load one, then none of the text keys load properly and I get LOC_PROMOTION_8AOW_FRENZY_DESCRIPTION on the screen instead of the actual description.

    Anyone else had this problem? How did you solve it?
    My files are TextChanges.xml
    Code:
    <GameData>
        <LocalizedText>
    ...
            <Row Tag="LOC_PROMOTION_8AOW_ZWEIHANDER_DESCRIPTION" Language="en_US">
                <Text>+5 [ICON_Strength] Combat Strength vs. melee and anti-cavalry class</Text>
            </Row>
            <Row Tag="LOC_PROMOTION_8AOW_TORTOISE_DESCRIPTION" Language="en_US">
                <Text>+7 [ICON_Strength] Combat Strength when defending against ranged attacks.</Text>
            </Row>
            <Row Tag="LOC_PROMOTION_8AOW_BATTLECRY_DESCRIPTION" Language="en_US">
                <Text>+7 [ICON_Strength] Combat Strength in Woods, Jungle, Hills, or Marsh.</Text>
            </Row>
            <Row Tag="LOC_PROMOTION_8AOW_URBAN_WARFARE_DESCRIPTION" Language="en_US">
                <Text>+5 [ICON_Strength] Combat Strength when fighting in districts, or attacking district defenses.</Text>
            </Row>
        </LocalizedText>
    </GameData>
    
    and the .modinfo is
    Code:
    ...
        <Files>
            <File>ExistingUnitChanges.sql</File>
            <File>PromotionChanges.xml</File>
            <File>TextChanges.xml</File>
        </Files>
    
        <!-- Different parts of the mod -->
        <Components>
            <UpdateDatabase id="Pacing Changes">
                <Properties>
                    <Name>WARFARE_CHANGES</Name>
                </Properties>
                <Items>
                    <File>ExistingUnitChanges.sql</File>
                    <File>PromotionChanges.xml</File>
                </Items>
            </UpdateDatabase>
            <LocalizedText>
                <Properties>
                    <Name>TEXT_UPDATES</Name>
                </Properties>
                <Items> 
                    <File>TextChanges.xml</File>
                </Items>
            </LocalizedText>
        </Components>
    
    </Mod>
    
     
  2. Horem

    Horem Emperor

    Joined:
    Apr 1, 2010
    Messages:
    1,720
    Location:
    Wales, UK
    Bug with the Vanilla games handling of the Localization Database, happens with all mods. Have to exit the application and reboot it.
     
    Olleus likes this.
  3. Olleus

    Olleus Deity

    Joined:
    Oct 30, 2005
    Messages:
    6,478
    Location:
    Beyond the Veil
    Ok, thanks, I hadn't come across this before and wanted to check it wasn't an issue with something I'd done.
     
  4. thecrazyscot

    thecrazyscot Spiffy

    Joined:
    Dec 27, 2012
    Messages:
    2,430
    For new text entries I've found its more reliable to simply write the text directly in the requisite xml entry as the game will always correctly show it.

    Ironic that I've found it works better since it's not something you should really actually do. I really hope they fix that in one of their first patches as I hate its sloppiness.
     
  5. Kavis

    Kavis Chieftain

    Joined:
    Oct 27, 2016
    Messages:
    15
    I had the same issue before. And then I found out that you need to add <Ruleset> or give an ID for <LocalizedText> (like <LocalizedText id="XXXXX">) in .modinfo to make localized text works. Both way are all work to me. Example as below and attached:

    Code:
       <Components>
            <UpdateDatabase id="AIO_America_CMPNT">
                <Items>
                    <File>AIO_America_Data.xml</File>
                </Items>
            </UpdateDatabase>
            <LocalizedText>
                <Properties>
                    <Ruleset>RULESET_STANDARD</Ruleset>
                </Properties>
                <Items>
                    <File>AIO_America_Text.xml</File>
                </Items>
            </LocalizedText>
        </Components>
        <Files>
            <File>AIO_America_Data.xml</File>
            <File>AIO_America_Text.xml</File>
        </Files>
    Attached is the MOD I have created. The localized text is showing correctly under English, Simplified Chinese and Traditional Chinese.

    EDIT: Obviously, I didn't pay attention to the "re-load or re-start a new game from an in-progress game". This solution couldn't solve the text issue either.
     
    Last edited: Nov 17, 2016
  6. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    7,208
    Location:
    Illinois, USA
    Unfortunately it makes no difference for the OP's issue. If you exit from an in-progress game to the main menu and then reload or start a new game you get LOC_TRAIT_LEADER_RELIGIOUS_CONVERT_NAME_PLUS and LOC_TRAIT_LEADER_RELIGIOUS_CONVERT_DESCRIPTION_PLUS instead of the info within the <Text> field. Implementation may be different for non "en_US" localizations.

    Your mod behaves the same as for everyone else's. I wish it were true that you had found something the rest of us missed.
     
  7. Kavis

    Kavis Chieftain

    Joined:
    Oct 27, 2016
    Messages:
    15
    I test the MOD again after seeing your reply. Yes, you are correct.

    Obviously, I didn't pay attention to the "re-load or re-start a new game from an in-progress game".
     
  8. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    7,208
    Location:
    Illinois, USA
    You might want to double-check me but it looked like the today's patch fixed this when you exit to main menu from in a game and at least reload a saved game. Not sure about starting a new game. Also a confirmation that someone else sees the same would be good.
     
  9. Olleus

    Olleus Deity

    Joined:
    Oct 30, 2005
    Messages:
    6,478
    Location:
    Beyond the Veil
    It worked some of the time for me, but not all the time. Haven't found a concrete pattern yet.
     
  10. MyopicCat

    MyopicCat Chieftain

    Joined:
    Jan 6, 2014
    Messages:
    73
    I had the exact same issue with my mod, but found a weird fix. However, I don't think it will work for you because my mod is structurally very different from yours - my mod only makes changes to the Advanced Setup menu. But it was the same kind of problem. Everything was fine when I started a game immediately after starting up Civ 6. But if I start a game, exit to the main menu and start a new game then all changes to LocalizedText were gone.

    This was the meat of my .modinfo when I had the problem:
    Code:
        <Settings>
            <Custom id="WHATEVER">
                <Items>
                    <File>Config.xml</File>
                </Items>
            </Custom>
            <LocalizedText id="WHATEVER">
                <Items>
                    <File>ConfigText.xml</File>
                </Items>
            </LocalizedText>
        </Settings>  
    
        <Components>
            <ImportFiles id="WHATEVER">
                <Items>
                    <File>AssignStartingPlots.lua</File>
                </Items>
            </ImportFiles>
        </Components>
    But when I add an additional declaration of LocalizedText under Components the problem went away:
    Code:
        <Settings>
            <Custom id="WHATEVER">
                <Items>
                    <File>Config.xml</File>
                </Items>
            </Custom>
            <LocalizedText id="WHATEVER">
                <Items>
                    <File>ConfigText.xml</File>
                </Items>
            </LocalizedText>
        </Settings> 
    
        <Components>
            <ImportFiles id="WHATEVER_WHATEVER">
                <Items>
                    <File>AssignStartingPlots.lua</File>
                </Items>
            </ImportFiles>
            <LocalizedText id="WHATEVER">
                <Items>
                    <File>ConfigText.xml</File>
                </Items>
            </LocalizedText>
        </Components>
    Interestingly, I also found that I didn't have to include *all* my LocalizedText declarations under Components. Putting *any* valid change to LocalizedText there made everything work fine even after returning to the main menu. Don't ask me why this works, but it does.

    Again, I doubt this will help you directly, but maybe it will set you on the right track.
     

Share This Page