Text Display Error - Help!

thecrazyscot

Spiffy
Joined
Dec 27, 2012
Messages
3,110
I've created several building modpacks (linky) and am working on another one for the Industrial Era. I've done everything that I did for my other modpacks, but the Building Description, Help Entry and Civilopedia Entry all show up incorrectly. I've looked over the xml over and over again, but can't seem to find why. :cry: Can someone take a look for me? Maybe another set of eyes can solve the problem...
 

Attachments

I'm also having a problem with my Unique Policy Buildings modpack, which at one point showed up with the previous text error, but now will not show up at all!
 

Attachments

Enable logging, check the logs, remove the errors

Code:
[23143.621] columns Language, Tag are not unique
[23143.621] While executing - 'insert into Language_en_US('Tag', 'Text') values (?, ?);'
[23143.621] In XMLSerializer while inserting row into table insert into Language_en_US('Tag', 'Text') with  values (TXT_KEY_BUILDING_GROCER, Grocer, ).
[23143.621] In XMLSerializer while updating table Language_en_US from file XML/Industrial_Text.xml.
[23143.621] columns Language, Tag are not unique
[23143.621] columns Language, Tag are not unique
[23143.621] While executing - 'insert into Language_en_US('Tag', 'Text') values (?, ?);'
[23143.621] In XMLSerializer while inserting row into table insert into Language_en_US('Tag', 'Text') with  values (TXT_KEY_BUILDING_PATENT_OFFICE, Patent Office, ).
[23143.621] In XMLSerializer while updating table Language_en_US from file XML/Policy_Buildings.xml.
[23143.621] columns Language, Tag are not unique

Edit: TXT_KEY_BUILDING_GROCER is an unused text key in vanilla Civ ... this is why it is always recommended to include something unique in your type strings, eg TXT_KEY_BUILDING_TCS_GROCER (for The Crazy Scot)
 
Thank you - that fixed the problems for both of them. I'll start being more careful with my type strings to prevent this sort of error from occurring.

One more question - how would I go about updating the basic Policy help text? I've tried the <Update> and <Replace> tags as well as deleting the help text altogether and replacing it, but nothing seems to update the Policy help text in Civilopedia or the Policy screen (I'm hoping I won't have to mess with lua to do this...).

This was my last try:

Code:
<Update>
<Where Tag="TXT_KEY_POLICY_BRANCH_TRADITION_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Tradition[ENDCOLOR] is best for small empires.[NEWLINE][NEWLINE]Adopting Tradition greatly increases the rate of border expansion in cities and also grants 3 [ICON_CULTURE] Culture in the [ICON_CAPITAL] Capital. Unlocks building Public Baths and the Hanging Gardens.[NEWLINE][NEWLINE]Adopting all Policies in the Tradition tree will grant +15% [ICON_FOOD] Growth and a free Aqueduct in your first 4 cities. It also allows the purchase of Great Engineers with [ICON_PEACE] Faith starting in the Industrial Era.</Set>
<Where Tag="TXT_KEY_POLICY_BRANCH_LIBERTY_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Liberty[ENDCOLOR] is best for civilizations which desire rapid expansion.[NEWLINE][NEWLINE]Adopting Liberty will provide 1 [ICON_CULTURE] Culture in every city. Unlocks building Town Council and the Pyramids.[NEWLINE][NEWLINE]Adopting all policies in the Liberty tree will grant a free Great Person of your choice near the [ICON_CAPITAL] Capital.</Set>
<Where Tag="TXT_KEY_POLICY_BRANCH_HONOR_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Honor[ENDCOLOR] improves the effectiveness of one's army in a variety of ways.[NEWLINE][NEWLINE]Adopting Honor gives a +33% combat bonus VS Barbarians, and notifications will be provided when new Barbarian Encampments spawn in revealed territory. Gain [ICON_CULTURE] Culture for the empire from each barbarian killed. Unlocks building Stronghold and the Statue of Zeus.[NEWLINE][NEWLINE]Adopting all policies in the Honor tree will grant [ICON_GOLD] Gold for each enemy unit killed. It also allows the purchase of Great Generals with [ICON_PEACE] Faith starting in the Industrial Era.</Set>
<Where Tag="TXT_KEY_POLICY_BRANCH_PIETY_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Piety[ENDCOLOR] increases the [ICON_PEACE] Faith of empires.[NEWLINE][NEWLINE]Adopting Piety allows you to build Shrines and Temples in half the usual time. Unlocks building Parochial Schools and the Great Mosque of Djenne.[NEWLINE][NEWLINE]Adopting all Policies in the Piety tree causes a Great Prophet to appear and Holy Sites provide +3 [ICON_CULTURE] Culture.</Set>
<Where Tag="TXT_KEY_POLICY_BRANCH_PATRONAGE_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Patronage[ENDCOLOR] enhances the benefits of City-State friendship.[NEWLINE][NEWLINE]Adopting Patronage will cause [ICON_INFLUENCE] Influence with City-States to degrade 25% slower than normal. Unlocks building Chanceries and the Forbidden Palace.[NEWLINE][NEWLINE]Adopting all policies in the Patronage tree will cause allied City-States to occasionally gift you [ICON_GREAT_PEOPLE] Great People.</Set>
<Where Tag="TXT_KEY_POLICY_BRANCH_AESTHETICS_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Aesthetics[ENDCOLOR] improves the civilization's ability to generate [ICON_CULTURE] Culture.[NEWLINE][NEWLINE]Adopting Aesthetics allows you to earn Great Writers, Artists, and Musicians 25% faster. Unlocks building Monuments and the Uffizi.[NEWLINE][NEWLINE]Adopting all policies doubles the theming bonus you receive from Museums and Wonders. It also allows the purchase of Great Writers, Artists, or Musicians with [ICON_PEACE] Faith starting in the Industrial Era.</Set>
<Where Tag="TXT_KEY_POLICY_BRANCH_COMMERCE_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Commerce[ENDCOLOR] provides bonuses to empires focused on [ICON_GOLD] Gold.[NEWLINE][NEWLINE]Adopting Commerce will boost [ICON_GOLD] Gold output in [ICON_CAPITAL] Capital City by 25%. Unlocks building Depots and Big Ben.[NEWLINE][NEWLINE]Adopting all Policies in the Commerce tree will grant +1 [ICON_GOLD] Gold from every Trading Post. It also allows the purchase of Great Merchants with [ICON_PEACE] Faith starting in the Industrial Era</Set>
<Where Tag="TXT_KEY_POLICY_BRANCH_EXPLORATION_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Exploration[ENDCOLOR] enhances your abilties to spread your empire over the seas.[NEWLINE][NEWLINE]Adopting Exploration gives +1 [ICON_MOVES] Movement for Naval units and +1 Sight for Naval combat units. Unlocks building Botanical Gardens and the Louvre.[NEWLINE][NEWLINE]Adopting all policies allows you to see Hidden Antiquity Sites. It also allows the purchase of Great Admirals with [ICON_PEACE] Faith starting in the Industrial Era.</Set>
<Where Tag="TXT_KEY_POLICY_BRANCH_RATIONALISM_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Rationalism[ENDCOLOR] improves the ability to use and generate [ICON_RESEARCH] Science.[NEWLINE][NEWLINE]Adopting Rationalism will grant +10% [ICON_RESEARCH] Science while the empire is [ICON_HAPPINESS_1] Happy. Unlocks building Patent Offices and the Porcelain Tower.[NEWLINE][NEWLINE]Adopting all Policies in the Rationalism tree will grant a free Technology. It also allows the purchase of Great Scientists with [ICON_PEACE] Faith starting in the Industrial Era.</Set>
</Update>
 
Only ONE pair of <Where><Set> elements per <Update>
 
Ok, I tried that and now the mod won't show up in game at all. Here's the log (hopefully the relevant portion):

Code:
[177076.610] **** Validating Game Database *****
[177078.950] Performing Localization Checks
[177078.950] Checking Tag Format...
[177078.950] Note: Tags must only use [A-Z_] characters, start with 'TXT_KEY_', and be under 128 characters long.
[177078.965] Validating UnitGameplay2DScripts
[177078.965] Missing Entry for UNIT_BARBARIAN_HORSEMAN
[177078.965] **** VALIDATION FAILED *****
[177078.965] Validation Took 2.351340 seconds
[177079.636] **** Validating Prefetch Process *****
[177079.636] **** Validation Success *****
[177079.636] SetGlobalActionInfo

EDIT: here's the relevant text from the mod, and I've attached the updated mod file:
Code:
<Update>
	<Where Tag="TXT_KEY_POLICY_BRANCH_TRADITION_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Tradition[ENDCOLOR] is best for small empires.[NEWLINE][NEWLINE]Adopting Tradition greatly increases the rate of border expansion in cities and also grants 3 [ICON_CULTURE] Culture in the [ICON_CAPITAL] Capital. Unlocks building Public Baths and the Hanging Gardens.[NEWLINE][NEWLINE]Adopting all Policies in the Tradition tree will grant +15% [ICON_FOOD] Growth and a free Aqueduct in your first 4 cities. It also allows the purchase of Great Engineers with [ICON_PEACE] Faith starting in the Industrial Era.</Set>
</Update>
<Update>
	<Where Tag="TXT_KEY_POLICY_BRANCH_LIBERTY_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Liberty[ENDCOLOR] is best for civilizations which desire rapid expansion.[NEWLINE][NEWLINE]Adopting Liberty will provide 1 [ICON_CULTURE] Culture in every city. Unlocks building Town Council and the Pyramids.[NEWLINE][NEWLINE]Adopting all policies in the Liberty tree will grant a free Great Person of your choice near the [ICON_CAPITAL] Capital.</Set>
</Update>
<Update>
	<Where Tag="TXT_KEY_POLICY_BRANCH_HONOR_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Honor[ENDCOLOR] improves the effectiveness of one's army in a variety of ways.[NEWLINE][NEWLINE]Adopting Honor gives a +33% combat bonus VS Barbarians, and notifications will be provided when new Barbarian Encampments spawn in revealed territory. Gain [ICON_CULTURE] Culture for the empire from each barbarian killed. Unlocks building Stronghold and the Statue of Zeus.[NEWLINE][NEWLINE]Adopting all policies in the Honor tree will grant [ICON_GOLD] Gold for each enemy unit killed. It also allows the purchase of Great Generals with [ICON_PEACE] Faith starting in the Industrial Era.</Set>
</Update>
<Update>
	<Where Tag="TXT_KEY_POLICY_BRANCH_PIETY_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Piety[ENDCOLOR] increases the [ICON_PEACE] Faith of empires.[NEWLINE][NEWLINE]Adopting Piety allows you to build Shrines and Temples in half the usual time. Unlocks building Parochial Schools and the Great Mosque of Djenne.[NEWLINE][NEWLINE]Adopting all Policies in the Piety tree causes a Great Prophet to appear and Holy Sites provide +3 [ICON_CULTURE] Culture.</Set>
</Update>
<Update>
	<Where Tag="TXT_KEY_POLICY_BRANCH_PATRONAGE_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Patronage[ENDCOLOR] enhances the benefits of City-State friendship.[NEWLINE][NEWLINE]Adopting Patronage will cause [ICON_INFLUENCE] Influence with City-States to degrade 25% slower than normal. Unlocks building Chanceries and the Forbidden Palace.[NEWLINE][NEWLINE]Adopting all policies in the Patronage tree will cause allied City-States to occasionally gift you [ICON_GREAT_PEOPLE] Great People.</Set>
</Update>
<Update>
	<Where Tag="TXT_KEY_POLICY_BRANCH_AESTHETICS_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Aesthetics[ENDCOLOR] improves the civilization's ability to generate [ICON_CULTURE] Culture.[NEWLINE][NEWLINE]Adopting Aesthetics allows you to earn Great Writers, Artists, and Musicians 25% faster. Unlocks building Monuments and the Uffizi.[NEWLINE][NEWLINE]Adopting all policies doubles the theming bonus you receive from Museums and Wonders. It also allows the purchase of Great Writers, Artists, or Musicians with [ICON_PEACE] Faith starting in the Industrial Era.</Set>
</Update>
<Update>
	<Where Tag="TXT_KEY_POLICY_BRANCH_COMMERCE_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Commerce[ENDCOLOR] provides bonuses to empires focused on [ICON_GOLD] Gold.[NEWLINE][NEWLINE]Adopting Commerce will boost [ICON_GOLD] Gold output in [ICON_CAPITAL] Capital City by 25%. Unlocks building Depots and Big Ben.[NEWLINE][NEWLINE]Adopting all Policies in the Commerce tree will grant +1 [ICON_GOLD] Gold from every Trading Post. It also allows the purchase of Great Merchants with [ICON_PEACE] Faith starting in the Industrial Era</Set>
</Update>
<Update>
	<Where Tag="TXT_KEY_POLICY_BRANCH_EXPLORATION_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Exploration[ENDCOLOR] enhances your abilties to spread your empire over the seas.[NEWLINE][NEWLINE]Adopting Exploration gives +1 [ICON_MOVES] Movement for Naval units and +1 Sight for Naval combat units. Unlocks building Botanical Gardens and the Louvre.[NEWLINE][NEWLINE]Adopting all policies allows you to see Hidden Antiquity Sites. It also allows the purchase of Great Admirals with [ICON_PEACE] Faith starting in the Industrial Era.</Set>
</Update>
<Update>
	<Where Tag="TXT_KEY_POLICY_BRANCH_RATIONALISM_HELP"/>
	<Set>[COLOR_POSITIVE_TEXT]Rationalism[ENDCOLOR] improves the ability to use and generate [ICON_RESEARCH] Science.[NEWLINE][NEWLINE]Adopting Rationalism will grant +10% [ICON_RESEARCH] Science while the empire is [ICON_HAPPINESS_1] Happy. Unlocks building Patent Offices and the Porcelain Tower.[NEWLINE][NEWLINE]Adopting all Policies in the Rationalism tree will grant a free Technology. It also allows the purchase of Great Scientists with [ICON_PEACE] Faith starting in the Industrial Era.</Set>
</Update>
 

Attachments

Back
Top Bottom