primordial stew
Emperor
After much pain, a complete re-write (thus the second 2), and much agony, here is van2war2.pl.
WHAT: a perl script which converts vanilla civ4 xml into warlords xml. It will create the directory tree (eg xml/units, xml/art, etc..) and put the processed files in there. Note that not all files are processed! See the directions below.
All new tags get 0 for binary or integer types, and NONE for others. To see what was added, check out the debug.log.
There is no known dependency on the version of Warlords. Whatever schema files are found in the install are used.
HOW:
0. backup your mod!
1. install perl if necessary (any of these will work, take your pick!)
http://www.cpan.org/ports/
http://win32.perl.org/wiki/index.php?title=Strawberry_Perl
http://www.activestate.com/Products/ActivePerl/
2. rename your mod's xml dir (eg xml.orig)
The program will create a new tree named "xml.orig.converted" (following the eg above).
3. download van2war2.pl + edit it (any text editor will do)
http://forums.civfanatics.com/uploads/61935/van2war2.zip
set: $civ4XmlDir to be the path to your warlords xml directory
set: $modDir to point at your mod's xml dir
4. run it.
Depending on which perl is installed, double-clicking on the program may work, or open a dos/cmd window, cd to where van2war2.pl is and run "perl van2war2.pl".
5. re-name $convertedDir unless it already has the correct name (eg assets/xml/xml.orig.converted to assest/xml/xml)
6. copy over missing files.
xml/text <-- directory + files in it
xml/GlobalDefinesAlt.xml <-- file
xml/Audio <-- directory + files in it
I think this is all...
7. check assets/xml.orig/debug.log. There shouldn't be any errors near the end. The program stops on errors. For example using spaces instead of tabs will cause an error.
8. at this point the program is done. Almost certainly there is more work required to get your mod working in Warlords (eg dll, python, graphics), but that is beyond the scope of this utility. It should save you the mundane work of adding the new tags to all of your data, that is all.
ANNOYANCES: things that could get fixed, but probably won't:
1. all comments get stripped out
2. xml must be tab spaced (ie human readable) for the parser to work. While it is valid to use spaces instead of tabs (or no spacing at all..), and newlines are not necessary from Warlords point of view, this program won't work without them!
3. I had hoped the program could also port from warlords back to vanilla, but I'm thinking no one will do this anyway.
WHAT: a perl script which converts vanilla civ4 xml into warlords xml. It will create the directory tree (eg xml/units, xml/art, etc..) and put the processed files in there. Note that not all files are processed! See the directions below.
All new tags get 0 for binary or integer types, and NONE for others. To see what was added, check out the debug.log.
There is no known dependency on the version of Warlords. Whatever schema files are found in the install are used.
HOW:
0. backup your mod!
1. install perl if necessary (any of these will work, take your pick!)
http://www.cpan.org/ports/
http://win32.perl.org/wiki/index.php?title=Strawberry_Perl
http://www.activestate.com/Products/ActivePerl/
2. rename your mod's xml dir (eg xml.orig)
The program will create a new tree named "xml.orig.converted" (following the eg above).
3. download van2war2.pl + edit it (any text editor will do)
http://forums.civfanatics.com/uploads/61935/van2war2.zip
set: $civ4XmlDir to be the path to your warlords xml directory
set: $modDir to point at your mod's xml dir
4. run it.
Depending on which perl is installed, double-clicking on the program may work, or open a dos/cmd window, cd to where van2war2.pl is and run "perl van2war2.pl".
5. re-name $convertedDir unless it already has the correct name (eg assets/xml/xml.orig.converted to assest/xml/xml)
6. copy over missing files.
xml/text <-- directory + files in it
xml/GlobalDefinesAlt.xml <-- file
xml/Audio <-- directory + files in it
I think this is all...
7. check assets/xml.orig/debug.log. There shouldn't be any errors near the end. The program stops on errors. For example using spaces instead of tabs will cause an error.
8. at this point the program is done. Almost certainly there is more work required to get your mod working in Warlords (eg dll, python, graphics), but that is beyond the scope of this utility. It should save you the mundane work of adding the new tags to all of your data, that is all.
ANNOYANCES: things that could get fixed, but probably won't:
1. all comments get stripped out
2. xml must be tab spaced (ie human readable) for the parser to work. While it is valid to use spaces instead of tabs (or no spacing at all..), and newlines are not necessary from Warlords point of view, this program won't work without them!
3. I had hoped the program could also port from warlords back to vanilla, but I'm thinking no one will do this anyway.