Issues with Updating in Mod

DRK248

Chieftain
Joined
Jul 28, 2014
Messages
19
Hi all!

I'm having some issues with a mod I'm developing where I'm modifying a few aspects of the Austrian civilization. I'm getting rid of the coffee house as a unique building and changing Maria Theresa's trait. However when I go to test/play the mod, the trait remains unmodified and Austria still has the coffee house. I have included a text file of the xml I used to make these changes. Can you guys let me know where I went wrong? I can provide more info if need be.

Thanks,
DRK248
 

Attachments

  • CA_Update.txt
    4.4 KB · Views: 176
Welcome to CivFanatics :)

You can't have a <Delete> inside an <Update>. So instead of:

Code:
	<Civilization_BuildingClassOverrides>
		<Update>
			<!--Remove coffee house as Austria's unique building-->
			<Where CivilizationType="CIVILIZATION_AUSTRIA">
				<Delete />
			</Where>
		</Update>
	</Civilization_BuildingClassOverrides>
It should be:
Code:
	<Civilization_BuildingClassOverrides>
		<!--Remove coffee house as Austria's unique building-->
		<Delete CivilizationType="CIVILIZATION_AUSTRIA"/>
	</Civilization_BuildingClassOverrides>
(and similar changes in a few other places)

Also, you can't have a <Where> inside of <Where> or <Set> inside of <Where> - it should be <Update> with one <Where> and one <Set> inside it.

So instead of this:
Code:
	<Leader_Flavors>
		<Update>
			<!--Change cultural tendency for Maria Theresa-->
			<Where LeaderType="LEADER_MARIA">
				<Where FlavorType="FLAVOR_CULTURE">
					<Set>
						<Flavor>8</Flavor>
					</Set>
				</Where>
			</Where>
		</Update>
	</Leader_Flavors>
You should have this:
Code:
	<Leader_Flavors>
		<Update>
			<!--Change cultural tendency for Maria Theresa-->
			<Where LeaderType="LEADER_MARIA" FlavorType="FLAVOR_CULTURE"/>
			<Set>
				<Flavor>8</Flavor>
			</Set>
		</Update>
	</Leader_Flavors>

And every time you have a <Set> inside <Where> you should change it so both <Set> and <Where> are on the same level, inside <Update>. Also, only one <Where> and one <Set> are allowed per <Update>, so in the part where you update text keys you should have a separate <Update> for every text key.

Edit: See here if you need more information about correct Civ5 XML syntax (you can ignore the parts about SQL if you don't use it).
 
Thank you for the suggestions. I will implement them and let you know how it goes.
 
Everything seems to work fine except for the changes in city names. Here is a sample of how I'm making the change:
Spoiler :
<Language_en_US>
<Update>
<Where Tag="TXT_KEY_CITY_NAME_AUSTRIA_1"/>
<Set Text="Prag"/>
</Update>
</Language_en_US>

I use the exact same format for changing the names of city states, and that works fine so I'm really confused what the problem.

Edit: Never mind I was using the wrong tags. I got that incorrect information from the civilization xml files I downloaded from this post: http://forums.civfanatics.com/showthread.php?t=490901, so just a warning to others and a call for the owner to fix the files.
 
Top Bottom