Civilopedia/diplo screen localisation not working

Homusubi

Lafcadio Hearn Wannabe
Joined
Dec 21, 2012
Messages
1,035
I'm trying to make a new civ, but I keep running into problems with the localisation. Any piece of localisation that is explicitly defined in the game files, Civ 5-style, works, e.g. the name of the civ and leader and the start menu description of the various uniques. However, whenever there's a localisation string that is not mentioned anywhere other than the localisation files (e.g. LOC_CIVINFO_INSERTCIVNAMEHERE_LOCATION), it doesn't work, and so I'm left with a blank civilopedia and default diplomacy text.

What's going on, and how do I fix it?
 
Additions to the <LocalizedText> table have to be done through a special type of file activation. You can not use UpdateDatabase on either the FrontEnd or In-Game "sides" of the database.

So for a mod created in modbuddy, I have this in my modinfo file to add new or alter existing text strings:
Code:
<Mod id="46f68baa-7457-4c80-b88d-53da67a4b38d" version="5">
  <Properties>
    <Name>LeeS' Buildings Are Fun</Name>
    <Description>LeeS' Buildings Are Fun</Description>
    <Teaser>LeeS' Buildings Are Fun</Teaser>
    <Authors>Lee</Authors>
  </Properties>
  <InGameActions>
    <UpdateText id="InGameText">
      <File>XML/BuildingInGame_Text.xml</File>
    </UpdateText>
    <UpdateDatabase id="XML_Actions">
      <Properties>
        <LoadOrder>100</LoadOrder>
      </Properties>
      <File priority="22">XML/Era_Buildings/Dummy_Era_LOCKERS.xml</File>
      <File priority="1">XML/WorldWonders/ForestryService.xml</File>
    </UpdateDatabase>
  </InGameActions>
  <Files>
    <File>XML/BuildingInGame_Text.xml</File>
    <File>XML/Era_Buildings/Dummy_Era_LOCKERS.xml</File>
    <File>XML/WorldWonders/ForestryService.xml</File>
  </Files>
</Mod>
Note the action specified as an UpdateText type of action in the InGameActions:
Code:
    <UpdateText id="InGameText">
      <File>XML/BuildingInGame_Text.xml</File>
    </UpdateText>
I did not show an action of this type for the "FrontEnd" stuff but you would need one in the FrontEnd tab in modbuddy in order to add new text tags that need to show in game set-up menus. These FrontEnd/In-Game requirements are the same if you are creating the mod using modbuddy or if you are manually creating the mod by simply editing a modinfo file and manually adding your files to a mod folder.

If this is not your problem, then

My Boiler-Plate Response in Such Situations: Add Your Mod to A Forum Post (Civ6):
  1. It's better to just take the mod from the game's MODS folder, zip it, and attach the result directly to a post. It is far easier to look at your actual code and the actual structure of the mod as it is being seen by the game than any attempt to determine what you are doing wrong by analyzing descriptions of the problem, or out-of-context snippets of the code.
  2. Very often what a new modder thinks the problem is and what the problem actually is are two different things. Having the actual mod as you are currently trying to use it allows us to look for the actual problem, and if all else fails to simply drop the mis-behaving mod into our MODS folder and run the mod to see what the game tells us.
  3. Zip the version of the mod the game is actually trying to use, which will be found as a sub-folder in ~\Documents\My Games\Sid Meier's Civilization VI\Mods. Zip the whole sub-folder for your mod.
    • Do not (unless specifically asked by someone trying to help diagnose your problem) zip the modbuddy project folder
      Spoiler why not :
      1. This is useless in most cases and requires us to dump it into our modbuddy folder and then start modbuddy and then attempt to analyse what you are doing wrong.
      2. If we cannot spot the issue we then have to create the built and usable version of the mod on our end, which is what we really needed in the 1st place.
      3. And in all this process we have to hope that we are not wasting our time in the event the modbuddy project does not contain the same code as the built version of the mod that is non-functional
      4. People completely corrupt via fix-attempts the built version of the mod in the game's MODS folder and then package and send the modbuddy solution all the time. This results in what we see being different from what the novice mod-maker is seeing in-game.
  4. To attach the zip to a forum post, look for a button called Upload A File when composing your thread reply: this button opens a browse menu where you can select the zipped folder to attach directly to a forum post.
  5. If the zipped folder is too large for the forum to accept then upload the zipped mod to a file-sharing site such as dropbox and provide a link where the mod can be downloaded.
    • Mediafire is not really a very good choice any more because they have become rife with spam and malware, as well as attempts to get you to download unwanted and uneeded kludge by confusing the layout of the download pages. You'll note for example that Mediafire links are no longer allowed on Steam, whereas CFC (this site) and dropbox links are still allowed.
 
Thanks for the reply. I've asked my collaborator about attaching the file, if he's OK with it I'll attach it later. What I can say now is that it is unlikely to be the modinfo file, as it correctly uses UpdateText for the text xml, and besides, other localisation strings from the xml in question do work properly.
 
Re-reading your OP, are you talking about this sort of thing?

Code:
<GameInfo>
	<CivilizationInfo>
		<Row CivilizationType="CIVILIZATION_AMERICA" Header="LOC_CIVINFO_LOCATION" Caption="LOC_CIVINFO_AMERICA_LOCATION" SortIndex="10" />
		<Row CivilizationType="CIVILIZATION_AMERICA" Header="LOC_CIVINFO_SIZE" Caption="LOC_CIVINFO_AMERICA_SIZE" SortIndex="20" />
		<Row CivilizationType="CIVILIZATION_AMERICA" Header="LOC_CIVINFO_POPULATION" Caption="LOC_CIVINFO_AMERICA_POPULATION" SortIndex="30" />
		<Row CivilizationType="CIVILIZATION_AMERICA" Header="LOC_CIVINFO_CAPITAL" Caption="LOC_CIVINFO_AMERICA_CAPITAL" SortIndex="40" />
		.........etc
 
YES! That's one missing bit. I just checked the XML and it's not there. I'll add that when I next have the chance.

Where do I add the equivalent rows for civilopedia info and diplomacy text?
 
Top Bottom