• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Adding a new XML file

TC01

Deity
Joined
Jun 28, 2009
Messages
2,216
Location
Irregularly Online
So I recently attempted to add a "CIV4CivilizationClassInfos.xml" file to the game. This is a new file I created in Assets\XML\Civilizations. It should be the second to last Civilizations file to be loaded (right before CivilizationInfos.xml itself).

Everything appeared to be okay: the DLL built properly. However, when I actually attempt to run the game, it loads XML right up until it gets to the first XML file in Civilizations, CIV4TraitInfos.xml, and then crashes ("LoadXML call failed for Civilizations/CIV4TraitInfos.xml).

So I have two questions... one, could someone who's done it before outline the process for adding a new XML file to the game? I thought I had done it successfully but it's entirely possible I missed something.

And two, is it possible this isn't a DLL issue at all but an issue with my schema file (see attached)? I think it's all correct, but I'm not sure what in the DLL would cause the first XML file in Civilizations to fail to load, so... any ideas?
 

Attachments

It's probably a schema issue.

First, I see you've modified the definition of the FavoriteCivic element - just make sure you've updated its usage in leader heads XML.

Second, I don't know if schema file parsing must be sequential, but the definition for CivicType comes after you first use it. Try moving it upwards in the file.
 
Back
Top Bottom