First some suggestions on changing your XML:
In Civ4AreaDefines:
- Remove iValue. You don't need it since this value (which is just an ordered number) is determined automatically when reading the XML.
- Change 'Desc' to 'Description', because this is the default way to do this and it's already read that way from the XML.
- You might want to add more coordinates for each area (if it's not a complete rectangle), so you could do something like:
Code:
<AreaDefine>
<Type>AREA_ITALY</Type>
<Desc>TXT_KEY_AREA_ITALY</Desc>
<CoordsGroups>
<CoordsGroup>
<iX1>0</iX1>
<iY1>0</iY1>
<iX2>1</iX2>
<iY2>1</iY2>
</CoordsGroup>
<CoordsGroup>
<iX1>2</iX1>
<iY1>2</iY1>
<iX2>5</iX2>
<iY2>3</iY2>
</CoordsGroup>
</CoordsGroups>
<iValue>1</iValue>
</AreaDefine>
In Civ4AreaPriority:
- Not sure what you need bCivilizationType for. There are existing functions for reading
pairs like this (e.g. CivilizationType and int value) but not triplets. You could write one, but are you sure it's needed?
- And in any case, I suggest canceling this file and moving it to either one of these:
The CivilizationInfos XML file, where each civilization holds the values for each area (and use a default one when it doesn't exist).
The Area defines file (your first one) - and each Area define section holds a list of Civilizations. (I prefer this solution, although either one is probably fine)
The reason is that the priority is not an entity of its own but just connects to other entities (area and civ).
Either way, wrap your list (of either civilizations or areas) with an appropriate tag (CivilizationPriorities or AreaPriorities), so you can treat it as one element.
Look at how the existing XML files are defined in the schemas. After you have a final format I can help you with the schema if you're still having trouble with it.