Released: November 21st, 1999
======================================================================
Title                   : Map Converter
Filename                : mapconv.exe
Version                 : 1.2.1

Author                  : Kristian Duske
Net Nick                : SleepwalkR
Email Address           : SleepwalkR@planetquake.com
ArghRad WWW             : http://www.planetquake.com/rem/

Description             : Map file converter
                          * Converts Quake2 map files to Quake1 map files and vice versa
                          * Removes hint brushes
                          * Removes skip brushes
                          * Removes area portals
                          * Converts "%" characters to "*" characters in texture names
                          * adds texture pathes to map names

Requirements            : Win32 operating system
                          * tested on Windows 98
                          * tested on Windows NT 4.0
                          * tested on Windows 2000

Acknowledgments         : Chris 'kanaeda' Voss for beta testing and input
                          Dennis 'headshot' Kaltwasser for beta testing
                          Wouter 'Aardappel' van Oortmerssen for beta testing
                          'Lunaran' for beta testing
                          'SpoG' for input
                          Matthias 'Maddes' Buecher for input
                          'sting' for helping me to find a bug
                          the QBoard gang
                          the people at #terrafusion

Other Works by Author   : Rapid Eye Movement maps: http://www.planetquake.com/rem/maps.htm

======================================================================
* Overview *

Brief listing of options.  See manual below for full details.

Command Line Options
--------------------
Modes:
   -toq1               : Convert Quake2 map file to Quake1 map file
   -toq2               : Convert Quake1 map file to Quake2 map file

Quake1 Switches:
   -rhintbrushes       : remove all hint brushes from map file before converting
   -rskipbrushes       : remove all skip brushes from map file before converting
   -rareaportals       : remove all area portals from map file before converting
   -cspecialcharacters : convert "%" and "#" characters to "*" characters in texture names

Quake1 Switches:
   -addpath <Path>     : Add <Path> to all texture names
	 
======================================================================
* Manual *

What it's used for
------------------

This program was written with one intention: being able to edit Quake1 
maps in QERadiant.
QERadiant does not support Quake1 editing natively. There is supposed 
to be a plugin, but the development of this plugin seems to be on hold, 
so I decided to write this little program.

How it works
------------
The usage of the program is pretty easy. Just launch it with the 
following parameters:

   mapconv.exe <Mode> <Switches> <Source Map File> <Target Map File>
   
The source and target map file can be identical. The source file will be 
overwritten in that case.

What it does
------------
The program removes the Quake2 specific bits of the texture definitions 
of brushes in map files. Additonally, it removes all path information from
the texture field of a face definiton.

Example:
   ( 672 -928 -368 ) ( 672 -736 -368 ) ( 672 -736 -400 ) e1u1/ceil1_28 0 0 0 1 1 0 1 10000

This is a Quake2 face definiton. The last three numbers are the specific 
bits that Quake1 does not use. The first of the three numbers is the surface 
flags, the second is the content value, and the third is the value that is 
used for surface lighting for example.
These three numbers will be removed by the program.
Apart from that, the texture path will also be removed, as it is not 
needed in Quake1 maps:

   ( 672 -928 -368 ) ( 672 -736 -368 ) ( 672 -736 -400 ) ceil1_28 0 0 0 1 1
   
This face definition is Quake1-compatible and can be parsed / compiled by 
qbsp.
Additionally, the program has the option to convert "" characters to "*" characters in 
texture names. This is due to the fact that you can't have filenames with "*" characters 
in them, so Dos fucks up when you try to convert the Quake1 water, slime and lava textures 
to Quake2 wal files in order to see them in QERadiant.
So what you do when converting the 
textures to wal files is change the "*" characters to "" characters in the Quake2 wal file
names. Then, when running the converter on your map, it will convert the "" characters in 
your map file to "*" characters, so that the Quake compilers can pick the correct textures 
from your wad.

The converter can also convert Quake1 map files into valid Quake2 map files by adding a specific 
texture path to all path names in the map file.
This is useful if you decide to edit one of your Quake1 maps in QERadiant. You can simply turn 
your Quake1 map file into a valid Quake2 map file that can be read by QERadiant.

Example:

Quake1 face definition:
   ( 672 -928 -368 ) ( 672 -736 -368 ) ( 672 -736 -400 ) ceil1_28 0 0 0 1 1
   
If you run the converter on this file with the appropriate mode and switch parameters, this line 
will be turned into the following:

   ( 672 -928 -368 ) ( 672 -736 -368 ) ( 672 -736 -400 ) e1u1/ceil1_28 0 0 0 1 1 0 0 0

The command line would have been:
mapconv.exe -toq2 -addpath e1u1 <Source Map File> <Target Map File>


How to edit Quake1 maps in QERadiant
------------------------------------
1. Get Radiant
   Get the latest version of QERadiant here:
   
      http://www.qeradiant.com/
   
   Install it and get used to the interface. This might take a while, as 
   Radiant is quite different from other editors like Worldcraft or Qoole.
   It might be a bit easier to get used to it for BSP users.
   A good tip is to customize your keyboard shortcuts. I have included my 
   keyboard shortcut config in this package, as it is very easy to edit and 
   adapt.
   To use this configuration instead of the original Radiant configuration, copy
   the file "mycfg.ini" to your Radiant program dir.
   Then, in Edit -> Preferences, enter the path in the field labelled "User INI path".
   It should look something like this:

      User INI path: C:\PROGRA~1\Radiant\mycfg.ini
      
   Restart Radiant. After that, you should be able to use Radiant with my keyboard 
   config. If you want to change the config, open the file "mycfg.ini" and change
   the appropriate commands. It's quite easy to grasp the syntax of this file.

2. Entities
   The first thing you need to do is to copy the enclosed Quake1 entity file
   ("quake1.def") to your radiant program dir.
   Then go to File -> Project Settings, and enter the path to this 
   entity file in the field labelled "entitypath".
   It should look something like this:

      entitypath: C:\PROGRA~1\Radiant\quake1.def
   
   Restart Radiant. After the restart, you should be able to drop all your 
   Quake1 entities with a rightclick.
   
   By the way, this entity definition file was taken from Stoneless, a great Quake1 
   map editor. It was slightly changed in that way that the "info_teleport_destination"
   has slightly different size and offset, so that the player does not fall out of
   the air when teleporting.
   You can grab Stoneless here: 
   ftp://ftp.cdrom.com/pub/idgames2/utils/level_edit/editors/stls101.zip

3. Textures
   This is a bit tricky. First, you need Wally, a superb texture editing tool.
   Get Wally here:
   
      http://home.telefragged.com/wally/
   
   After you have downloaded and installed Wally, you can open your wad file
   with it. In the upcoming texture list, select all textures and rightclick
   them. In the popup menu, choose "Export...".
   Select "Quake2 Texture (*.wal)" in the "Output Format" dropdown list.
   Enter a subdirectory under your project textures directory, for example:
   
      Output Directory: c:\quake2\myproject\textures\myq1wad
   
   Mind you, the path informations will be removed from the map file later on, 
   so it doesn't really matter where you put your textures.
   Then, in your Radiant project settings, enter the full texture path in the 
   "texturepath" field:
   
      texturepath: C:\Quake2\myproject\Textures\myq1wad
   
   Restart Radiant. After the restart, you should be able to select your 
   Quake1 textures from the "Textures" menu.
   
4. Converting and Compiling
   Now you can edit away with Radiant. When you need to compile your map, 
   you just have to set up a batch file (everyone uses batch files for 
   compilation, right?) and add the converter to it. Do not use the 
   "bsp" menu in Radiant, as it uses an internal qbsp3, which won't work 
   with your Quake1 map.
   Add the converter before your call to qbsp. It should look something like 
   this:

      mapconv.exe -rhint -rskip -rareaportals mymap.map mymap.map
      qbsp.exe mymap.map
      qvis.exe mymap.bsp
      light.exe mymap.bsp
      
   You can also simply compile your map without the map converter to check out the 
   architecture in Quake2, if you want to. There's no problem in doing that, as 
   long as you have your textures in a subdirectory of \quake2\baseq2\textures as 
   well, so that Quake2 can find them.
   
   I think that's it for now. If I missed something, or if you run into problems, 
   feel free to email me.
   

======================================================================
* Useful Tools *

1. TexMex 2.9 or later by Mike Jackman <mickey@planetquake.com>
   http://www.planetquake.com/texmex/
2. Wally 1.48b or later by Ty Matthews <mailto:ty@wwa.com> and 
   Neil White <nwhite@softblox.com>
   http://home.telefragged.com/wally/
3. TreeQBSP 1.63 or later by Greg "Tree" Lewis <tree@yossman.net>
   http://www.yossman.net/~tree/
4. TyrLite 0.3 or later by Kevin "Tyrann" Shanahan <tyrann@planetquake.com>
   http://www.planetquake.com/tyrann/
   TyrLite supports almost all features of ArghLite
   (no antilights and spotlights with yaw/pitch)
5. ArghLite 2.0 or later by Tim "Argh!" Wright <argh@ntplx.net>
   ftp://ftp.cdrom.com/pub/quake/utils/level_edit/bsp_builders/
   Argh's homepage at http://www.planetquake.com/arghrad/
6. RVISPlus or later by Kevin "Tyrann" Shanahan <tyrann@planetquake.com>
   http://www.planetquake.com/tyrann/

This list was provided by Matthias 'Maddes' Buecher 
<matthias.buecher@ruhr-uni-bochum.de>


======================================================================
* Version History *

Version 1.2.1 <11/05/2000>: Bugfix
Version 1.2.1 <07/05/2000>: Bugfix
Version 1.2.0 <08/02/2000>: Quake1 > Quake2 conversion support
Version 1.1.0 <04/01/2000>: Character conversion support
Version 1.0.0 <21/11/1999>: Initial Release

======================================================================
* Construction *

Compiler used           : Borland Delphi 4.0
Construction time       : two days

======================================================================
* Copyright / Permissions *

You MAY distribute this EXE, provided you include this file, with no
modifications.  You may distribute this file in any electronic format
(BBS, Diskette, CD, etc.) as long as you include this file intact.

* Disclaimer *

Usage of Map Converter is at your own risk.  I accept NO responsibility
for any form of damage incurred through the usage of this program.

======================================================================
* Where to get this Utility *

http://www.planetquake.com/rem/
