Wizard XML Converter readme file     updated v0.94 6/19/02
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Contents:
---------
I.      Introduction
    A.     The Wizard
    B.     eScape
    C.     The Converter
II.     Using the Converter
    A.     Highlights & Variables
    B.     Scripts
    C.     Macros (not enabled)
III.    Settings Dialog
    A.     Paths Page
    B.     Colors Page
    C.     Miscellaneous Page
IV.     A Note About .sou Files
V.      A Note About Color
VI.     A Note About Scripts and Variables
VII.    A Warning About Corrupted Wizard Files
VIII.   Contact & Links
 

Introduction:
=============

The Wizard:
-----------
The Wizard stores your highlights, macros, variables, and other settings for each character in a group of text files in the applicable game directory (eg. \Drealms for DragonRealms characters, \Gemstone for GemStone III, etc.).  There are eight possible filetypes that the Wizard may create for each character, each one storing a different set of information about your character's settings.  The files are all named after the character whose settings they contain, which makes it quite easy to tell which files apply to which characters.  For example, if you had a character named "Martha" then the names of all the Wizard settings files for her will start with "Martha".  The filename extension tells you what kind of information that particular file holds.  There is also one file that holds global name highlights, that is used by all characters.

.his file (Martha.his)        Contains the strings highlights you have set for Martha.
.nam file (Martha.nam)        Contains the name highlights you have set for Martha.
.sou file (Martha.sou)        Contains the sound highlights you have set for Martha (see notes below).
.squ file (Martha.squ)        Contains the text squelches you have set for Martha.
.mac file (Martha.mac)        Contains the macros you have defined for Martha.
.colors file (Martha.colors)  Contains the color palette specific to Martha's highlights.
.dat file (Martha.dat)        Contains Wizard configuration settings, variables, and window status.
.lay file (Martha.lay)        Used to save Wizard game window layouts.
names.his file                Contains the global name highlights for all your characters.

Some of these filetypes may be missing for certain characters, or they may have a size of zero; that just means that you have not created that kind of information for that character yet.

In addition, Wizard scripts are stored as two additional kinds of text files, .wiz files and .cmd files.  .Cmd files store command-line scripts and .wiz files store "normal" scripts.

eScape
------
eScape stores its configuration, highlight, macro, and script information in XML.  XML is highly organized and flexible, but .xml files are, like the Wizard files, essentially text files.  Luckily for us, this makes it possible to convert the one into the other.

You load settings into eScape by importing an XML file while logged into the game.  This simple process is discussed in the eScape FAQ and on the eScape import window, which can be reached by pressing the options button while eScape is running.  A few minutes perusal of those sites will suffice to explain how it is done.

Note that in order for eScape to import (or export) files, you will first have to set java security for Internet Explorer.  Detailed instructions on how to do so can be found here: eScape FAQ: Java Security (click the button labeled "Trusted Site Help").

The Converter
-------------
The Wizard XML Converter transcribes Wizard highlight, script, variable, sound, and other information into XML so you can import these settings into eScape.  When you run it, the Converter reads the registry to determines where the Wizard program files are.  It detects the game folders for DragonRealms, Gemstone III, Hercules & Xena: Alliance of Heroes, and Modus Operandi, and what characters exist (if any) in each of those games.  The Converter reads the various Wizard files and converts the settings into XML. 

I think what sets my program apart is the ease of selecting files for conversion, its flexibility, and conversion accuracy.

I have not tested the Converter with Platinum games, or with DragonRealms: The Fallen, but I expect it will work fine as I believe the Wizard was last updated before these were available.  If you play a Platinum game or The Fallen, please contact me if there are any problems with my converter.

The Converter should run fine under Windows 98, ME, 2000, and XP.

Note that the program makes use of some simple Visual Basic scripting (required for file system access), and may set off a scripting warning if you have your anti-Virus program set for the absolute maximum security.  I run Norton AV on my computer and have seen the warning a few times.  The program is entirely free of viruses or other malicious code, but please run the antivirus scan of your choice for peace of mind.


Using the Converter:
====================

Highlights & Variables:
-----------------------
Select a game in the Choose Game dropdown, and pick a character in the Select Character dropdown.  The Files box will then show checkbox items for each valid Wizard file for that character, and an entry for Variables if you have set any.  The "Names.his" file contains the Wizard's global name highlights so if that file contains any data it will appear for each character.  As you check items in the Files box, they will appear in the Selected Files box below it.  Double-clicking on a file listed in the lower box will open it for viewing in Notepad (except for Variables).

Click the Convert button to open the conversion window.  By default the program will name the eScape XML import file after the character you've chosen, and save it to the desktop.  If you want to change either of these, type in a different filename or click the browse (...) button.  Click the new Convert button, and the XML file will be created including data from the selected files.  When it's finished, click Done to return to the main window.

Scripts:
--------
Select a game and the scripts for that game will be listed in the upper box.  You can click on the column headers to sort by filename, comment, size, or filetype (.cmd or .wiz).  Clicking on a header again will toggle forward- and reverse-order sorting.  Use the mouse to highlight the files you want to convert, and press the "Add" button to send them into the lower box.  You can select all the scripts with the "Select All" button, and double-clicking on a file will also move it into the lower box.  To remove files from the list of scripts to be converted, highlight them with the mouse and click "Remove".  Click "Clear" to move all the files back into the upper box.  Double-clicking an item in the lower box will open the file for viewing in Notepad.

The total size of selected script files is shown along the lower left-hand side.  You can set the size of the XML files to be created on the Options > Settings > Scripts page (I have found that importing super-huge XML files can lock eScape for longer than is comfortable).  The Converter will create as many XML files as necessary to process all the scripts you have chosen for conversion.

Click "Convert" to begin converting into XML.

Just as for highlights, a window will open which allows you to specify the output path of the XML files you will create.  Unlike for highlights however, instead of defining a filename you will choose a folder into which all the XML script files will be created. 

One difference between the Wizard and eScape's handling of scripts is that eScape does not allow script names with spaces.  Therefore my converter will replace any spaces in a script name with the underline character "_".

Click "Convert" again and voila! Scripts are done.  The individual scripts are listed in the conversion window as they are added to the XML files.

Macros (not enabled):
---------------------
Macro conversion is not yet enabled, due to the complex differences between how the Wizard and eScape store and organize macros.  I hope to have it worked out eventually.


Settings Dialog:
================
Paths page:
-----------
The default settings will use the same folders that the Wizard uses to find sounds and scripts.  If you wish to convert sounds or scripts from a different folder, select "Use one directory for all games" and navigate to the folder of your choice.

Colors page:
------------
These settings control how the Converter will handle certain special cases regarding how to color your highlights.

Convert with eScape-Compatible Palette/Convert with actual Wizard palette: Since eScape does not natively support the same range of colors that the Wizard does, you can choose whether you want to convert your Wizard colors exactly, or to a "best-match" selection from the eScape palette.  See the Note About Color below for more details.

Use character's highlight colors: Check this box to base your highlight color conversion palette on the actual colors in use for the character whose settings you are converting.  Clearing this box will use the default Wizard colors.  This option was included because the Wizard allows you to set your own custom colors.  Note that if this setting is checked, and you have also selected to convert with an eScape-compatible palette, the Converter will use an algorithm to select the eScape colors that come closest to your customized Wizard colors.

Convert Wizard Game window appearance colors: This will allow you to transfer the default text color of the Game window to eScape.  I am hoping that future versions will include the ability to convert other windows' appearance colors as well (I say hoping because this is dependent on getting certain technical information about Simutronics games that I do not subscribe to).  See the Note about .sou Files for more information.

Sound-only Highlights: Convert as "transparent"/Convert to game window appearance colors: Converting as transparent will create a true Wizard-style sound-only highlight, and converting to game window appearance colors will just set the highlight's colors to match the default text color of the game window.  This is discussed in more detail in the Note About .sou Files.

Miscellaneous page:
-------------------
Maximum size of XML file(s) for importing Scripts: When you convert scripts, the Converter will create a set of files rather than one big XML file.  I have implemented script conversion in this way as there can be long delays in eScape when importing a large XML file.  This setting determines the approximate maximum size for files in that set, and the permissible range is 10-500KB.  I say approximate because if you have any single scripts that are themselves bigger than this setting, those scripts will of course still be converted.


A Note About .sou Files:
========================
Files with the ".sou" suffix contain highlight strings that appear in the Wizard under the "Sounds" tab of the Text Strings dialog box.  These highlights match a string only for the purpose of generating a sound, and do not change the color of the matched text.  The matched text remains the same colors as unhighlighted text in whatever window it appears--in other words, that window's default appearance colors.  I use it for door slams and knocks and similar sound effects.  The only problem here is that you can't properly create this kind of highlight directly from within eScape itself, but you can do it by importing your strings into eScape (to be more specific, you can create a true Wizard-style Sounds highlight in eScape XML by either deleting both the color and bgcolor entries in the highlight definition, or by setting both of those values equal to the string "transparent").  True sound-only highlights cannot be created from within eScape because eScape does not let the user set the foreground color to transparent.  To create a highlight from within eScape that functions the same, you need to set the highlight's colors to match the default colors of the window in which you expect it to appear (usually the Game window).  The problem with this method is that if you change the window default color, the sound highlights will then all need to be changed individually.

I have included options on the Colors page of the Settings dialog to give you the choice of which method you want to use to convert your sound-only highlights.


A Note About Color:
===================
I have tried to make the converter as flexible as possible to give the user the greatest range of options as to how they want to convert their Wizard highlight colors.  That it is necessary to have options at all is due to the fact that while the Wizard's user interface directly supports the use of any RGB color, eScape's user interface only allows a choice of about 90 colors, and these do not include all the Wizard default colors.  You can, however, set a highlight in eScape to any RGB color by importing it via an eScape XML settings file (which is of course what the Converter creates).

There is a problem with importing the exact Wizard colors however, in that you cannot then readily create a new highlight in eScape to match those colors.  So I have included the option to convert your Wizard colors to a "best-match" palette of colors selected from those 90 that are available through the eScape user interface.  The Converter does this by using an algorithm to find the eScape color that has the least RGB value deviation from the Wizard color, so in most cases the match is near-perfect, and in others very good.  The problem then becomes, however, finding the same color tile on the eScape palette when you want to make new highlights that match what you've already converted or created.  This is especially difficult as there is a lot of similarity among the eScape colors.  To help you make new highlights that match what you have, I have included the following gif image file, which highlights the tiles on the eScape palette that are closest to the default Wizard colors.

The best solution, in my opinion, to these color problems would be for Simu to include the standard Wizard colors in the eScape palette.  They would be set together on one side of the palette (as opposed to "mixed in"), so that the user can reliably distinguish these colors from similar shades.  I personally feel that the range of color tiles on the present eScape palette is inefficient, as there are many shades that are extremely similar to one another--so similar that you don't need to have them all available as choices, especially when there are many colors that Wizard users have grown used to using that are not currently available in eScape.  There are actually three tiles on the eScape palette that exactly match three other tiles, i.e. they have identical RGB color values.

My hope is that one day Simutronics will update the eScape palette to include a grouped set of tiles that match the original Wizard colors, and allow the user to set a highlight's foreground color to transparent so that true sound-only highlights may be created.


A Note About Scripts and Variables:
===================================
EScape is quite finicky about script and variable names.  If you try to execute a script with the commandline option, you must enter the script name precisely as upper and lower case matter.  So if you have a script named "Stow", entering ".stow" will NOT run your script.  Variable names are equally case-sensitive, so %Weapon is a different variable than %weapon.  Also, scripts with spaces in their names cannot be run with the commandline method as eScape thinks the first word is the script name, and that subsequent words are parameters.  I therefore have enabled the Converter to remove all the spaces in a script name and replace them with underlines (eg. "My Script.wiz" becomes "My_Script.wiz").


A Warning About Corrupted Wizard Files:
=======================================
I have included some error checking to try to prevent converting corrupted Wizard data, but I cannot anticipate every kind of error possible.  Corrupted data in the XML will cause eScape to reject it when you try to import.  This can especially be a problem when converting scripts, as it only takes one corrupted script in the batch to make the whole XML file fail.  If you encounter a problem of this nature please check your scripts to ensure they are all valid.


Contact & Links
===============
That's it in a medium-sized nutshell! If anything doesn't make sense or you find a bug or have an idea how to improve something, please let me know.

The latest version of the Converter is available on the WXMLC Home Page.

If you have any questions/comments/etc. please e-mail me at threephi@play.net.  I hope you like the program!