X-MapEdit
Copyright (c) 2000, Joshua Day
E-mail me at: koralt@yahoo.com

X-MapEdit should be installed in the same directory as UFO.BAT or TFTD.COM.
It should include:
XMAP.EXE
USEMAP.EXE
XMAPEDIT.CFG
XMAP.TXT

    BORING LEGAL DISCLAIMER:
Neither I, IBM, Microsoft, Microprose, or the individiual and/or site
from which you recieved this file are responsible for any damages to
your computer or the files thereon.  It is recomended that you back up
all files which you intend to edit.
This software was developed independantly of and without the knowledge
or consent of Microprose, and contains no warranties, express or implied.

X-MapEdit is freeware; it may be distributed as long as all .EXE files,
this text file and the original .CFG are included, unmodified.
Alternate .CFG files, for editing TFTD, may be added.  X-MapEdit and
all .CFG files for it must be distributed absolutely free of charge,
with the exception of a small fee for any disk or shipping.



    USING X-MAPEDIT ON TFTD:
I have not tried X-MapEdit on TFTD yet, and you will need to edit
the CFG file in order to.

    USING X-MAPEDIT:
The main program in X-MapEdit is XMAP.EXE.
When you first open X-MapEdit, you will be presented with a list of
map choices to edit, such as 'Jungle', and 'Urban'.  Press the
key corresponding to the mapset you want to edit.  (Note that you
cannot edit ships yet, nor will this list change in editing TFTD)

X-MapEdit will then present you with a list of map files.  Enter the
two digit number at the end of the name of the file you wish to edit.
This will bring you to the editing screen.

The editing screen has a little (or big) box on the left side and a list
of options on the right side.  There will be a rough layout of the
currently selected floor of the currently selected map in the box,
and one tile will have a yellow circle in it.  That yellow circle is your
cursor.  Use the arrow keys to move the cursor around, and press 1-4 to
change one of the attributes of the square: 1=Floor, 2=Left, 3=Top, 4=Item
    Hint:  Pressing 1, 2, 3, or 4 and then an enter (without typing a number)
            clears the object in that position.

Pressing "+" or "-" takes you up or down one floor.

The other commands are as follows:
ESC Returns to the map selection screen
A   Clears the screen and draws all floors of the map roughly as they
    will appear in the game.
C   Clears the screen and draws the current floor.
D   Change the dimensions of the current map- make sure that they are
    multiples of 10.  Be careful using this option.
E   Edit the RMP entry that is currently caught.
M   Catch RMP entry (or put caught RMP down)
N   Copy the MAP to a new number (this is how you make new maps)  You
    automatically switch to editing the copy.  If you want to edit the
    original, press ESC and type in the number again.
O   Optimize Palette.  Doesn't work yet.
P   Shows a picture of one tile.  Just enter the tile number and it will
    show you what it looks like.  Very useful.
Q   Quit the editor
R   Show all RMPs on the current floor.  You must press R every time you
    change floors, select new maps, or view the map in XCom graphics.
S   Save changes to the map (changes to RMPs are saved when you make them)
V   View the current floor without first clearing the screen.
X   Copy the currently caught RMP entry (i.e., put the original back and
    hold the copy)
B   Toggles borders.  With this option on, a black border is drawn around
    each object on the map.  This is very useful when editing maps from
    Mars or the desert.


After a few tries, you'll get the hang of it (hey, I had a fourth grader
using it pretty efficiently, so don't worry!)


    USING USEMAP:
USEMAP can be used to cause XCom to use extra maps, rather than simply
replacing existing ones.
When GEOSCAPE builds a battle map, it selects one of the 'built in' maps for
each ten by ten area.  (If it picks a map larger than 10x10, it sets the
maps in the overwritten area to a value meaning 'no map')  USEMAP allows
you to create a file to change the maps after they have been picked.
You must add a line which reads:
    USEMAP yourfilename.CHG
into your UFO.BAT (or a copy of UFO.BAT) right above the line reading
    %1UFOEXE\TACTICAL %1
In the file yourfilename.CHG, you must have the Change data.
The change data consists of ten lines of text in a text file.  Each line
must begin with a colon (":").  If a line does not have a colon as the
first character, that line is considered a comment.  The first line with
a colon represents map set 'A', the second represents map set 'B', and so
on down to 'J', the tenth line.  Make sure to not have more than ten lines
beginning with colons.
After the colon, you must have "change strings".  On the left side of
each change string is the list of map numbers to change, and on the
right side is the list of map numbers to change them into.  Before each
map number to change, you must include a minus ("-").  After the last map
number to change, you must include an equals sign ("=").  Then, list
the maps that all of those other maps can be changed into without any
seperators.  Finally, put in a pipe ("|") and then any new strings.
Also, make sure that no lines are more than 256 characters long.
I know this is probably very confusing, so here's an example:

---------------Filename: hardxcom.chg----------------------------------------
:
:-16-17-18-19-20-21-22-23-24-25=16171819202122232425|
  The above line changes map numbers 16,17,18,19,20,21,22,23,24, or 25
  into 16, 17, 18, 19, 20, 22, 23, 24, or 25 in barn terrain (letter 'B')
  Each of these are barns (although some of them are new barns)
:
:
:-08-16=0816|-06-17=0617|-07-18=0718|-11-19=1119|-00-20|-05-22=0522|-09-21=0921|
  The above line changes map 08 or map 16 into map 08 or map 16.
  Note that it is not guaranteed that it will change them; if it sees
  map number 08 or map 16 it will set that square to map 08 or 16 at random.
  The line can also change map numbers 06,17,07,18,11,19,00,20,05,22,09,
  and 21.  This line applies to the alien bases.
:-09-10-20=091020|-00-11=0011|-01-12=0112|-02-13=0213|
  The above line affects Urban battles (terror missions).
:
:
:
:
-----------------------------------------------------------------------------

Finally, replace maps of a given size with others of their size only:
do not replace 20x20 with 10x10, etc.




    EDITING THE .CFG FILE:
The XMAPEDIT.CFG file contains all of the information that X-MapEdit needs
to locate all XCom files.  It consists of a number of keys with names
such as 'RMP_EXT' and 'MAP_PATH'.

All of the _EXT keys tell X-Mapedit what extension to look for for different
file types.  This does not need to be changed, ever.  It is only there for
people who want to do really crazy stuff to the game...

The _PATH keys tell X-MapEdit where each type of file can be found, relative
to the directory the program is installed to.  These, like the _EXT keys,
will likely not need to be changed except by crazy people like me.

The TACTICAL key tells X-MapEdit the path and file name of TACTICAL.EXE.
This, once again, probably does not ever need to be changed.

The PAL_LBM key tells X-MapEdit the path and file name of the LBM (Deluxe
Paint Picture File) which TACTICAL uses as its palette file (changing
the palette in this LBM file changes the colors in battle!)  This
needs to be changed to UFOGRAPH\ISLAND2.LBM for TFTD.

Finally, TAC_REF... the single most important entry.  This is the tough
one to change.  This tells X-MapEdit where in TACTICAL it can find
the MCD references.  My advice to people who really want to change this
is, "don't".  I'll get around to releasing more CFG files, if I don't
just remake the whole program before then...
