• Our Forum Hosts will be doing maintenance sometime in the next 72 hours and you may experience an outage lasting up to 5 minutes.

Changes to XML not showing in Civilopedia

AeonOfTime

Chieftain
Joined
Feb 2, 2006
Messages
28
I have a very simple task: make a lighthouse give a bonus of 2 food instead of just 1 per sea tile. I have built a small mod with the following XML:

Code:
	<Buildings>
		<Update>
			<Where Type="BUILDING_LIGHTHOUSE"/>
			<Set Cost="10"/>
		</Update>
	</Buildings>
	<Building_SeaPlotYieldChanges>
		<Update>
			<Where BuildingType="BUILDING_LIGHTHOUSE"/>
			<Set Yield="10"/>
		</Update>
	</Building_SeaPlotYieldChanges>

I changed the cost of the Lighthouse as well to make sure it works, and in the Civilopedia the modified cost shows up correctly. However, the yield of water tiles is not changed in the Civilopedia and not in the game either if I build a lighthouse.

Can anyone see a problem with that bit of XML there? I don't know what else I could try.
 

Morlark

Warlord
Joined
Aug 6, 2009
Messages
209
Civilopedia entries are not dynamically generated from data. You have to update TXT_KEY_BUILDING_LIGHTHOUSE_HELP in Civ5GameTextInfos_Jon.xml in order for your changes to be reflected in the pedia. As for why the actual in-game yield change is not taking effect, I have no idea.

Edit: I just copy and pasted your exact code to try it for myself. Yield change is working just fine. I'm stumped then.
 

AeonOfTime

Chieftain
Joined
Feb 2, 2006
Messages
28
Fiddled around a bit more, I have no idea what made it work in the end. It worked with 10, and the AI seemed to be handling that change well too, it had really big coastal cities in the test game I played :D

10 is nonsense of course, put it back to 2 now. Thanks for the reply!
 

AeonOfTime

Chieftain
Joined
Feb 2, 2006
Messages
28
Civilopedia entries are not dynamically generated from data. You have to update TXT_KEY_BUILDING_LIGHTHOUSE_HELP in Civ5GameTextInfos_Jon.xml in order for your changes to be reflected in the pedia.

You are right - I did not find the related text at first so I assumed it was dynamically generated. Thanks!
 

EmperorFool

Deity
Joined
Mar 2, 2007
Messages
9,633
Location
Mountain View, California
Maybe it was caused by the two different XML attribute names above?

Code:
<Where [B][COLOR="Red"]Type[/COLOR][/B]="BUILDING_LIGHTHOUSE"/>
<Where [B][COLOR="Red"]BuildingType[/COLOR][/B]="BUILDING_LIGHTHOUSE"/>
 
Top Bottom