SDK/DLL | Python | XML | DDS

GlobalDefinesAlt | PythonCallbackDefines | All Schema Files

The Schema files are not specifically a requirement for Civilization, they are a part of the XML language. One could go without the Schema Files completely, but would then have to contain the relevant pieces of information within each of the other files, making them slightly more cluttered and less intuitive for the standard beginner to mod.

As long as the XML file contains an identifier linking it to the appropriate Schema in the first line, the game will link the two together. Example:

   <Civ4UnitInfos xmlns="x-schema:CIV4UnitSchema.xml">

This identifies the start of the <Civ4UnitInfos> section, as well as directing the file structure to go and read "CIV4UnitSchema.xml" to see what it should expect to be here.

If you open up the Schema file itself, you will notice that on the first line it references some Microsoft Files to decode what is contained in the Schema even more.

Looking further down in the CIV4UnitSchema.xml, we can go down and find the line which the computer is now looking for. It wants to know what precisely this tag <Civ4UnitInfos> means, which is defined by an <ElementType> tag.

 	<ElementType name="Civ4UnitInfos" content="eltOnly">
 		<element type="UnitInfos" minOccurs="0" maxOccurs="*"/>

This tells us that the Tag should only contain other Tags, no raw Information (content="eltOnly"), then lists what these other fields are (in this case, only UnitInfos. Of which we can have none, or an unlimited total amount {minOccurs="0" maxOccurs="*"}). To understand what the Element "UnitInfos" means, we must find the ElementType for it as well.

Do a quick search and you will find a similar tag stating that UnitInfos is another element which will only contain other elements. In this case it expects at least 1, but an unlimited total number, of the UnitInfo tag.

Looking once again, we find UnitInfo. This one again contains only other Elements, but this time it contains a LARGE quantity of other elements. All of the fields which you so freely edit within the "standard" XML file to get things to happen in the game.

So far, all fields of the Schema have been covered, except for what you can carry in a field other than more fields. To carry actual data, you must declare content="textOnly", which will allow you to type in a field like PROMOTION_COMBAT1, a number which uses a decimal or descriptive Text like the Pedia Entry for a Leader. Add to that a little bit more with content="textOnly" dt:type="int" or content="textOnly" dt:type="boolean", and you will be restricted to only entering a number, or only entering a 0 or 1.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.