BML - External map list builder
-------------------------------

Purpose:
BML is a quick utility written to take an ASCII text file
with a listing of maps, and to write a .CFG file of aliases to setup
the map loops used in Expert Quake.

Instructions:
Using BML is fairly simple.  First you need a text file with all the 
maps of your map loop in it.  For example, the included file EXPCYCLE.TXT
has the map loops for all the modes of the Expert Quake server.

The format of the file is as follows:

[DM]
e1m1
e1m2
e1m3

// cycle for CTF with <20 players and hook
[CHS]
e1m4
e1m1
e4m3

Text enclosed in brackets [] names the cycle of maps that follows it.
Any text preceded by "//" is a comment that won't affect the level cycle.

In this example, the DM cycle executes 3 maps:  E1M1, E1M2,
and E1M3, and the CHS cycle executes 3 maps: E1M4, E1M1, E4M3.

Expert Quake currently uses 5 map cycles:  DM (deathmatch and teamplay),
CHS (CTF, <20 players, with hook), CHL (CTF, >20 players, with hook),
CNS (CTF, <20 players, without hook), and CNL (CTF, >20 players,
without hook).

If you just want to edit the map cycles for your Expert server, edit
"expcycle.txt" and then run makelist.bat.  The next time you start your
Expert server (or if you manually "exec expcycle.cfg" at the server
console) the server will use your custom cycle.

In the general case of creating your own map cycles, once you have a text
file with the map cycles you want, run "BML MYLOOP.TXT", where "MYLOOP.TXT"
should be the name of the file with your map cycles.  This will build a
config file called MYLOOP.CFG; you can exec it from the server console
or from another .CFG file (like server.cfg).

Error messages:
If a problem comes up, an error message will be displayed.  Most of
the error messages give enough details that you can find the problem,
but here's a listing of them in detail:

	Help mode, no parameters defined.
		You typed BML without specifying a map list,
		so it assumed you wanted to know what the command
		line options were.

	Warning:  No map loops were defined.
		BML didn't find a header in the map list.  Check
		to make sure the map list is in the same format as
		EXPCYCLE.LST.  This might mean you specified an empty
		map list file, a map list file which is missing a
		header, or a file which isn't in DOS ASCII format.
		Try loading the map list file into DOS EDIT and see
		if the file looks similar to EXPCYCLE.LST.
		
	Warning:  Map outside of defined loops (thismap); Ignored.
		BML found a map (called thismap above) that wasn't part
		of a defined header, and therefore didn't know which
		map loop this map was part of.  Make sure you have a
		header before any maps, and make sure the file is
		in DOS ASCII format.  Try loading the file into DOS
		EDIT to check its format.  If it looks ok, save it and
		try again.

	File I/O error ## has occured.
		This is my catch-all file error.  If something goes
		wrong, it triggers this error.  Check your free disk
		space, and make sure the source file exists and is
		a DOS ASCII file.  Make sure you have permission to
		write to the destination drive.  Double check the
		source and target files to make sure they weren't
		misinterpreted.  Also make sure that the target file
		doesn't already exist as a read-only file, since it
		would be impossible to overwrite.

	General error ## has occured.
		This means there was an error in the first 15 lines
		of code somewhere.  If you manage to get this error,
		send it to me at thegriffin@usa.net, along with any
		output starting with when you entered the BML command
		and ending with this error message.

		This error message should never appear.

Status messages:
	Map set MAPSET  : ## maps.
		BML completed the current map set and found ## maps
		in it.  Unless the number looks wrong, everything went
		fine.  This is just debugging and status information.

	Operation complete.
		BML got to the end of the map loop file and finished.
		Unless there are other errors, everything went fine.
