espxmlc.pl - convert .esp files to an XML-based text representation
perl espxmlc.pl [-exactfp] <file.esp> <file.xml>
Converts a .esp file to XML (possibly XML-like, I'm not an expert!).
Designed for use with a version control system such as CVS, to make it easy to handle versions and see differences between versions. It is also useful to browse the contents of a .esp file.
See also xmlespc to convert back again.
The decoding is based on Jim Adam's discussion at http://home.cinci.rr.com/jimadam/MorrowindESPFormat.html, but with a few differences. Still, see that site for some interpretation of this data.
Some parts of the file can be safely edited in XML form, but be careful, as there are no checks on consistency! In particular, you can edit:
and you (probably?) cannot edit:
The conversion is not screamingly fast: on my 2Ghz pentium, it takes about 7 minutes to convert Morrowind.esp to XML, and about 5 minutes to convert it back again. On the other hand, all the mods I have installed convert in less than a second, and save games (completed Morrowind, most of the way through Tribunal, finished 2.5 other faction quests) take about 30s.
Andy Mortimer, andy.mortimer@zetnet.co.uk
$Id: espxmlc.pl,v 1.2 2003/05/29 17:11:47 andy Exp $
To record the original hex representation of floating point numbers, use the ``-exactfp'' switch, but then of course it's harder to view and edit them!
For now, any text containing UNIX-style line endings will be stored as hex, which makes it hard to read and edit. It would be nice to handle this properly. When this happens, you will get a warning like
Warning: Error with guessed pretty coding of GMST/STRV: Coding error: non-CRLF "string" 'Do you wish to quit your current game? All unsaved progress will be lost.' at espxmlc.pl line 326.
However, I'm sure there are bugs out there waiting to be found.