1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Adding a new XML file

Discussion in 'Civ4 - SDK/Python' started by TC01, Mar 10, 2012.

  1. TC01

    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?
     

    Attached Files:

  2. Asaf

    Asaf Sleep Deprived

    Joined:
    Mar 22, 2010
    Messages:
    1,326
    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.
     

Share This Page