Text_Key Problem with mods

Deridex

Chieftain
Joined
Nov 6, 2011
Messages
3
Hi there,

dunno if i have to post my Problem in the Technical Support or in the Mods Section. Sorry for that.
Moderator Action: Problem with a mod -> modding section. Moved.

I allready searched for a Solution for my Text_Key Problem, but havent found something usefull. I do not have a Problem to play the Mods, like Procyon-Call to Power. The thing is the Tech Tree dont show up like the way it should be. Goin to attach some screens...
The question is, did i do something wrong with the Mod installation? Are there any Solutions for my Problem? I tried to change the game language from german to english but it did not help...
 

Attachments

  • Image1.jpg
    Image1.jpg
    313 KB · Views: 325
  • Image2.jpg
    Image2.jpg
    474.4 KB · Views: 252
This could be a factor of a few things:

1) "TXT_KEY_TECH_ALGEBRA_TITLE" was never defined, so the game doesn't know what it wants to read.
2) The text file is not working. This is a product of a few reasons:
- There is a syntax error with the text file
- One of the tags is the same as an existing tag, so the whole file will crash
3) If you have multiple mods installed, they may add the same text string which will crash the text file.
 
This make sence.... Sounds like a good idea to deactivate all mods ecept my desired one... Maybe this will fix the Problem.

Thx for the answer!!!!
 
This make sence.... Sounds like a good idea to deactivate all mods ecept my desired one... Maybe this will fix the Problem.

It might make the problem go away for now, but it won't fix it. The problem is that one or more of your mods are conflicting with each other, OR with the vanilla game, OR with some DLCs you've purchased.

Here's the thing. Before the March patch, you could have two mods adding or editing the same text key, and it wouldn't break like this. Instead, it'd just overwrite the first one loaded (which'd be the one in the vanilla game, if any) with the second. What happened, fairly often, was that mods would accidentally re-define certain existing keys in relatively harmless ways. The most common, by far, was when a custom civilization would use a city name that the game was already declaring. Someone would decide to add a Korea civilization (pre-DLC, I mean), would define TXT_KEY_CITY_SEOUL as "Seoul", and the fact that the game had already defined that same key for the city-state wouldn't cause a problem because both were setting it to the same text string. The mods in question were not technically breaking anything, but they weren't actually working together correctly.

In the March patch, the devs changed it to do what you saw, where the entire XML file containing the second instance would fail to load in case of a conflict. Again, this was most commonly encountered in mods or scenarios that added a custom civilization of some kind. Since many of these have long since been abandoned by their creators and/or superceded by DLC civilizations, they were never repaired to work with the updated game. You can still find the broken mods fairly often, especially if you're the kind of person who uses the in-game Mod Browser to find content instead of scanning these boards to see what's still being kept current.

Now, you CAN fix it fairly easily if you want to use these mods together. If you go into your user directory (that's My Documents/My Games/Sid Meier's Civilization V/ on a Windows 7 machine), there's a "Logs" directory. Inside it are a bunch of log files the game generates; the two you'd care about for this are Database.log and xml.log. The Database.log is the main one you want to use here; it'll give messages like "TXT_KEY_CITY_SEOUL is multiply defined" to let you know exactly which keys are causing the conflict. Go into whatever mod is using that key (Windows has a Search function, after all) and just delete that entry from the offending XML file. Repeat as necessary, until the logfile reports no more errors like that.

NOTE: If Database.log isn't being created, then you don't have logging turned on at all. In your user directory is a file "config.ini". Open that in a text editor, and search for LoggingEnabled = 0. Change it to a 1. While you're at it, the top of the file has EnableTuner = 0; change that one to a 1 too. There will be a few other logging options within the file; change whatever sounds interesting to a 1.
 
@Spatzimaus
i apologize for the other thread, i should have looked more thouroughly first.

and thank you for the explanation what happened/is happening, it again helped a lot :)

one small remark regarding the log files:
even without having logging enabeled in the config.ini it could be that a "Database.log" (among others) is created! (it was in my case) But most likely it won`t contain any useful information ^^.
So to anybody having problems like that, double check if logging is enabeled.
 
hey there

i have a problem with text entries too. i made a simple changes in my mod and i dont use other mods. now step by step to the problem:

there are 3 files i have add and change...

in this file i delete CIVILIZATION_SONGHAI
Spoiler :

<GameData>
<Civilizations>
<Delete Type="CIVILIZATION_SONGHAI"/>
</Civilizations>

<Civilization_CityNames>
<Delete CivilizationType="CIVILIZATION_SONGHAI" />
</Civilization_CityNames>

<Civilization_FreeBuildingClasses>
<Delete CivilizationType="CIVILIZATION_SONGHAI" />
</Civilization_FreeBuildingClasses>

<Civilization_FreeTechs>
<Delete CivilizationType="CIVILIZATION_SONGHAI" />
</Civilization_FreeTechs>

<Civilization_FreeUnits>
<Delete CivilizationType="CIVILIZATION_SONGHAI" />
</Civilization_FreeUnits>

<Civilization_UnitClassOverrides>
<Delete CivilizationType="CIVILIZATION_SONGHAI" />
</Civilization_UnitClassOverrides>


</GameData>


in this file i define CIVILIZATION_NUBIEN
Spoiler :

<GameData>
<Civilizations>
<Row>
<Type>CIVILIZATION_NUBIEN</Type
<Description>TXT_KEY_CIV_NUBIEN_DESC</Description> <ShortDescription>TXT_KEY_CIV_NUBIEN_SHORT_DESC</ShortDescription>
<Adjective>TXT_KEY_CIV_NUBIEN_ADJECTIVE</Adjective>
<CivilopediaTag>TXT_KEY_CIV5_NUBIEN</CivilopediaTag>
<DefaultPlayerColor>PLAYERCOLOR_SONGHAI</DefaultPlayerColor>
<ArtDefineTag>ART_DEF_CIVILIZATION_SONGHAI</ArtDefineTag>
<ArtStyleType>ARTSTYLE_MIDDLE_EAST</ArtStyleType>
<ArtStyleSuffix>_AFRI</ArtStyleSuffix>
<ArtStylePrefix>AFRICAN </ArtStylePrefix>
<PortraitIndex>20</PortraitIndex>
<IconAtlas>CIV_COLOR_ATLAS</IconAtlas>
<AlphaIconAtlas>CIV_ALPHA_ATLAS</AlphaIconAtlas>
<MapImage>MapSonghai512.dds</MapImage>
<DawnOfManQuote>TXT_KEY_DAWN_OF_MAN_NUBIEN</DawnOfManQuote>
<DawnOfManImage>DOM_Askia.dds</DawnOfManImage>
<DawnOfManAudio></DawnOfManAudio>
<SoundtrackTag>Arabia</SoundtrackTag>
</Row>
</Civilizations>

<Civilization_BuildingClassOverrides>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<BuildingClassType>BUILDINGCLASS_MONUMENT</BuildingClassType>
<BuildingType>BUILDING_MONUMENT</BuildingType>
</Row>
</Civilization_BuildingClassOverrides>

<Civilization_UnitClassOverrides>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<UnitClassType>UNITCLASS_SPEARMAN</UnitClassType>
<UnitType>UNIT_SPEARMAN</UnitType>
</Row>
</Civilization_UnitClassOverrides>

<Civilization_FreeTechs>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<TechType>TECH_AGRICULTURE</TechType>
</Row>
</Civilization_FreeTechs>

<Civilization_FreeBuildingClasses>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<BuildingClassType>BUILDINGCLASS_PALACE</BuildingClassType>
</Row>
</Civilization_FreeBuildingClasses>

<Civilization_FreeUnits>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<UnitClassType>UNITCLASS_SETTLER</UnitClassType>
<Count>1</Count>
<UnitAIType>UNITAI_SETTLE</UnitAIType>
</Row>
</Civilization_FreeUnits>

<Civilization_Leaders>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<LeaderheadType>LEADER_ASKIA</LeaderheadType>
</Row>
</Civilization_Leaders>

<Civilization_CityNames>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_NAPATA</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_KAWA</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_TABO</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_MEROE</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_KERAMA</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_NAQA</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_NURI</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_GEBEL_BARKAL</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_SOBA</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_GAMMAI</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_KARANOG</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_KALABSHA</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_EL_KURRU</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_AMARA</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_DONGOLA</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_FARAS</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_QASR_IBRIM</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_NUBIEN</CivilizationType>
<CityName>TXT_NUBIEN_CITY_ASWAN</CityName>
</Row>
</Civilization_CityNames>


and finally in this file i define text entries
Spoiler :

<GameData>
<Language_DE_DE>
<Row Tag="TXT_KEY_CIV_NUBIEN_DESC">
<Text>Reich von Kusch</Text>
</Row>
<Row Tag="TXT_KEY_CIV_NUBIEN_SHORT_DESC">
<Text>Reich von Kusch</Text>
</Row>
<Row Tag="TXT_KEY_CIV_NUBIEN_ADJECTIVE">
<Text>nubisch</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_NUBIEN_HEADING_1">
<Text>Geschichte</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_NUBIEN_TEXT_1">
<Text>Das Reich von Kusch wurde von nubischen...</Text>
</Row>
<Row Tag="TXT_KEY_DAWN_OF_MAN_NUBIEN">
<Text>Gesegnet seis Du, oh König der des nubischen Volkes von Kusch...</Text>
</Row>

<Row Tag="TXT_NUBIEN_CITY_NAPATA">
<Text>Napata</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_KAWA">
<Text>Kawa</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_TABO">
<Text>Tabo</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_MEROE">
<Text>Meroe</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_KERAMA">
<Text>Kerama</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_NAQA">
<Text>Naqa</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_NURI">
<Text>Nuri</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_GEBEL_BARKAL">
<Text>Bebel Barkal</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_SOBA">
<Text>Soba</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_GAMMAI">
<Text>Gammai</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_KARANOG">
<Text>Karanog</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_KALABSHA">
<Text>Kalabsha</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_EL_KURRU">
<Text>el-Kurru</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_AMARA">
<Text>Amara</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_DONGOLA">
<Text>Dongola</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_FARAS">
<Text>Faras</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_QASR_IBRIM">
<Text>Qasr Ibrim</Text>
</Row>
<Row Tag="TXT_NUBIEN_CITY_ASWAN">
<Text>Aswan</Text>
</Row>
</Language_DE_DE>
</GameData>


i have defined the actions
Spoiler :

attachment.php



but allways the same problem. see it in WB. ingame the same problem
Spoiler :

attachment.php



in my eyes this all is right and i look thousend time through the file. i dont see the problem. i checked the structur in other mods i.e. Putmalk's Ancient World. the logfiles says nothing. i have no idea, where is my error

hope someone can help me
 

Attachments

  • actions.jpg
    actions.jpg
    280.3 KB · Views: 1,036
  • worldbuilder.jpg
    worldbuilder.jpg
    278 KB · Views: 1,027
@Armarius

Welp I don't see any syntax errors in the text file (which is the file that's failing, btw). It may be completely possible that one of your text entries already exist in the game, and if this is the case, the whole file will fail. This happens more frequently in city names. But I don't recognize any entries from the base game in that file.

Other than that I'm actually pretty clueless as to what the problem is. Is the language setting set to DE_DE for you?
 
hey, wow, i found the damn bug after hours... thanx for help

i reduced first all markups to one in hope to localize the bad file.
but the error isnt in the file, i found it in the actions window. u can see it in my fist post, there is no .xml ending.

btw Putmalk, i like your mesopotamia work :thumbsup:. this inspired me to make my own meso-scenario.

thx
 
hey, wow, i found the damn bug after hours... thanx for help

i reduced first all markups to one in hope to localize the bad file.
but the error isnt in the file, i found it in the actions window. u can see it in my fist post, there is no .xml ending.

btw Putmalk, i like your mesopotamia work :thumbsup:. this inspired me to make my own meso-scenario.

thx

Thanks a lot! Hope yours goes well as well. :D Glad you fixed the problem!
 
Side note: while it might not crash anything, the game will give warning messages for all of your city names because it wants all text keys to start with TXT_KEY, not things like TXT_NUBIEN. I'd suggest changing all of those to TXT_KEY_NUBIEN_whatever.
 
I'm having a problem with a few, though not all, of my buildings not having any text apart from their name and cost in hammers showing in the civilopedia. All my new buildings use the same text file and in the same format, so I'm not sure what's happening. Here's an example of one - the Babylonian garden.

The buildings file:
Spoiler :

<GameData>
<Buildings>
<Row>
<Type>BUILDING_BABYLONIANGARDEN</Type>
<BuildingClass>BUILDINGCLASS_GARDEN</BuildingClass>
<Cost>90</Cost>
<GoldMaintenance/>
<PrereqTech>TECH_IRRIGATION</PrereqTech>
<Help>TXT_KEY_BUILDING_BABYLONIANGARDEN_HELP</Help>
<Description>TXT_KEY_BUILDING_BABYLONIANGARDEN</Description>
<Civilopedia>TXT_KEY_BUILDING_BABYLONIANGARDEN_PEDIA</Civilopedia>
<Strategy>TXT_KEY_BUILDING_BABYLONIANGARDEN_STRATEGY</Strategy>
<ArtDefineTag>ART_DEF_BUILDING_GARDEN</ArtDefineTag>
<MinAreaSize>-1</MinAreaSize>
<ConquestProb>66</ConquestProb>
<FreshWater>true</FreshWater>
<GreatPeopleRateModifier>40</GreatPeopleRateModifier>
<HurryCostModifier>25</HurryCostModifier>
<IconAtlas>CIV_COLOR_ATLAS_AD</IconAtlas>
<PortraitIndex>19</PortraitIndex>
</Row>
</Buildings>
</GameData>

EDIT: Not sure why PEDIA and STRATEGY are showing with a space in the middle of the words - this is a Civfanatics thing rather than something in my xml file. I've even attempted to edit the above manually but get the same result?!!?


The text file:
Spoiler :

<GameData>
<Language_en_US>
<Row Tag="TXT_KEY_BUILDING_BABYLONIANGARDEN">
<Text>Babylonian garden</Text>
</Row>
<Row Tag="TXT_KEY_BUILDING_BABYLONIANGARDEN_HELP">
<Text>Babylonian replacement for the garden; +40% great person birth rate with no upkeep costs.</Text>
</Row>
<Row Tag="TXT_KEY_BUILDING_BABYLONIANGARDEN_PEDIA">
<Text>In ancient Babylon wild, uncultivated terrain was seen as something that was unfinished by God and which still participated in the formless chaos and godlessness of pre-creation. It was seen both as unfinished and as a place where dangerous forces lurked, beasts and devils. Thus when people took possession of wild, uncultivated land, it was understood that certain religious rites had to be performed which, in essence, claimed the land for God, for civilization, and for safety. For ancient Babylon, a cultivated garden was a safe and sacred place whereas an uncultivated desert was dangerous and in some dark way in opposition to God.</Text>
</Row>
<Row Tag="TXT_KEY_BUILDING_BABYLONIANGARDEN_STRATEGY">
<Text>The Babylonian garden is the unique building for Babylon, replacing the garden. It generates +40% great person birth rate. Unlike the normal garden, the Babylonian garden has no upkeep costs.</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_BUILDINGS_BABYLONIANGARDEN_HEADING">
<Text>Babylonian garden</Text>
</Row>
</Language_en_US>
</GameData>


Does anyone have any idea where I've gone wrong?
 
Does anyone have any idea where I've gone wrong?

1> If you're going to post code like that, put it inside (CODE)(/CODE) (except with brackets instead of parentheses). The Code environment preserves indentation and doesn't add those spaces you were complaining about. You can put (CODE) inside (SPOILER) to save space, but not the other way around.

2> What do your logfiles say? Generally speaking if you see strange effects like that, it means that there was either an error loading the XML (in which case there'll be errors listed in the Database.log or xml.log files) or it's failing in the tooltip display of InfoTooltipInclude.lua (in which case there'll be errors in Lua.log, and/or in FireTuner).
 
What do your logfiles say? Generally speaking if you see strange effects like that, it means that there was either an error loading the XML (in which case there'll be errors listed in the Database.log or xml.log files) or it's failing in the tooltip display of InfoTooltipInclude.lua (in which case there'll be errors in Lua.log, and/or in FireTuner).
The xml.log tells the story:

[23423.269] **** Validating Game Database *****
[23424.517] Performing Localization Checks
[23424.517] Checking Tag Format...
[23424.517] Note: Tags must only use [A-Z_] characters, start with 'TXT_KEY_', and be under 128 characters long.
[23424.548] Validating UnitGameplay
[23424.548] Number of selection sounds doesn't match number of units.
[23424.548] Validating Notifications
[23424.548] **** VALIDATION FAILED *****
[23424.548] Validation Took 1.283375 seconds
[23425.078] **** Validating Prefetch Process *****
[23425.078] **** Validation Success *****
[23425.078] SetGlobalActionInfo
[23425.078]

I'll have a look at it when I come home from work tonight.
 
That's the baseline. Those errors are what you see if you run the game with no mods, so no errors there. Try the other logs.
Just goes to show how much I know ;)! The other logs didn't come up with anything of note either.

The issue isn't stopping the game from working, it's just that it's curious that I (believe that) I've done nothing different than I've done for the other buildings that do have a full civilopedia entry. I'll go back and check again; probably I'll take the buildings out and try putting them back in again from scratch. It doesn't take that long to do!
 
I've re-input the buildings and everything works now! I'm certain that I've done it exactly the same, but I guess something must have been wrong the first time out!
 
I've re-input the buildings and everything works now! I'm certain that I've done it exactly the same, but I guess something must have been wrong the first time out!

The slightest spelling error can go unnoticed yet cause so much damage.

Glad you got it fixed.

Have you enabled logging? Doing so will make your life easier. I believe the debugging happens in Database.log.
 
Please give me a clue on how I do that :).

My Games -> Civ 5 -> config.ini

Go down to "Enable the logging system" and change "LoggingEnabled = 0" to 1.
 
Back
Top Bottom