Civ 4 XML Tutorial Part 1

I am running Vista. It says it doesn't support the file type. It's pissing me off!!!
 
I guess. I couldn't save it so I have to do it all over again.
 
Yes I do. It is n administrator.
 
I liked the tutorial, it was good. If you highlighted the actual code in a different colour, it might be easier to read.
 
I can't find the designated folders. In mine it has CustomAssests/Xml/Civilizations, and it stops there.
 
I wanted to see one of the original game files to kind of get a look at the format. I know what he's got is one, but I just wanted to check.
 
A few gotchas I've found doing a simple mod to GlobalDefinesAlt.xml in Vista:
1) If you use an XML editor like XML Copy Editor, make sure the file is being saved in Windows (CRLF) as opposed to Unix (CR) line termination format. Civ IV will throw a syntax error on the XML file if it is not in windows format.
2) If you attempt to save the file directly in \Program Files\Firaxis Games\Sid Meier's Civilization 4\Assets\XML, it will instead save a shadow copy to your \Users\yourname\AppData\Virtual Store\Program Files\... etc. This file will not be readable by other users on the computer. In fact, it appears that if you originally installed Civ 4 with one ID and are running it under another ID it will not read the file in any case.

I did find that putting the file in \Users\myName\Documents\My Games\Sid Meier's Civilization 4\CustomAssets\xml worked fine once I got past the syntax error issue. Note that in addition to my own changes, I also set the value of the override define to 1. I'm not sure if this is required, but I don't see any reason to change it.
<Define>
<DefineName>MODS_SHOULD_OVERRIDE_GLOBAL_DEFINES_HERE</DefineName>
<iDefineIntVal>1</iDefineIntVal>
</Define>

In order to ensure you save in Windows format, you can use Notepad, but when you save, if you do "Save As" be sure to change the file type in the save dialog from Text file to All Files, or it will append a .txt extension.

I've found my best option is to use a one of several free text editors that do XML syntax highlighting and allow you to set the line termination format if that becomes necessary. Some examples are Programmers' Notepad ( http://www.pnotepad.org/download/ ) and Notepad++ (Sourceforge: http://notepad-plus.sourceforge.net/uk/download.php ). These are both Open Source Freeware. As is XML Copy Editor...
 
Thank you bwcbwc for that last input - it explains why I kept get some kind of syntax error when I was trying to create a Canadian Civ. I don't recall the specific wording, but something about "XML at top of page" blah blah blah. I got so frustrated that I eventually gave up.
Thank you also to The_J. I may just try again to create my Canadian Civ and make sure I follow your tutorial...
 
Back
Top Bottom