[FAQ] Most Common XML questions!

DasGuntLord01

Chieftain
Joined
Feb 11, 2010
Messages
80
This thead shall be a compilation of the most common XML issued and their causes.

If you keep coming across people asking the same question over and over again, and it's not listed here, then let me know below and I'll add it here.

PROLOGUE: The Debug Database
First thing's first. EVERY modder should learn how to access and read CivV's debug database. The debug database is a verbatim copy of the games database, and you can access it at any time to see if your changes have actually been added to the game.

While this is not absolutely essential, you can also learn heaps from learning how the database is put together, and you can make debugging your xml much less painful.

One of the easiest ways to do this is to download the SQLite Manager for Firefox. Once installed, hit Tools -> SQLite manager in your browser.

Next you need to connect do your debug databse. Hit Database -> Connect Database, and navigate to Documents\My Games\Sid Miers Civilization 5\cache\Civ5DebugDatabase.db. (Make sure that "All Files" is selected).

If you've done this, you'll end up with something that looks like the attached picture.

1) I've tried adding XYZ to the game, but it won't work!
Six times out of ten when your XML isn't working, it's because of one or more of the following mistakes. Any one of these mistakes will stop the ENTIRE XML file from being applied to the game.

- Capitalization: All tags begin with a capital letter. <Row> is correct. <row> is not. <ROW> is also not.
- Spelling: If you mispell one tag, your mod will not work.
- Syntax

1.1) Syntax
Three times out of ten, your issue will be sytax. Common sytax issues that modders fall in to are

- Using <Row></Row> when you should be using <Update></Update>: <Row> is used to add entire new entries to the databse; <Update> is used to modify existing entries. For example, if you want to change the speed of a warrior from 2 to 3:
Code:
<GameData>
    <Units>
        <Update>
            <Where Type="UNIT_WARRIOR" />
            <Set Moves="3" />
        </Update>
    </Units>
</GameData>

However, if you want to add a super swordsman, say, then you would use:
Code:
<GameData>
    <Units>
        <Row>
             <!-- All the data nessesary for the units -->
        </Row>
    </Units>
</GameData>
 

Attachments

  • DebugDatabase.jpg
    DebugDatabase.jpg
    430.1 KB · Views: 68
Top Bottom