Outgun / Tools / Map converter

Map converter



The map converter is a command line tool that converts Outgun map files from the 0.8.5 format to the format used by 1.0 and following versions. There is nothing interactive in this program, and all parameters (including the source and destination file names) must be entered on the command line.

Using the command line (for newbies)

On Windows systems you can get to the command line by selecting Start, Run... and entering cmd (for Windows NT, 2000 and XP) or command (for older Windows versions). You should get a C:\Windows> or similar prompt. If the 0.8.5 maps to convert are located in C:\Outgun085\maps type:

cd "\Outgun085\maps"

Actually, if the folder name (here \Outgun085\maps) doesn’t have spaces in it, you don’t need the quotes. To make things simple, use any means to copy mapconv.exe to the same directory. Now you can enter the commands described below. Converting one map is simple (for example mapconv themap.txt themapnew.txt where the resulting 1.0 compatible map file will be called themapnew.txt), but if you want to convert all maps at once, you can type:

md new
for %a in (*.txt) do mapconv "%a" "new\%a"

The first command will make the folder new where the converted maps will be generated by the second command.

Command line syntax

The basic usage of mapconv is mapconv map_in.txt map_out.txt where map_in.txt is the name of the source map file (in 0.8.5 format) and map_out.txt the map to create (in 1.0 format). Additional options may be specified between mapconv and map_in.txt. They are as follows:

-ccompatibility make the map 0.5.0 compatible (but less readable)
-ppack pack lines to make the file smaller (and less readable)
-vverbose show diagnostic messages while reading the map
-dduplicate roomsduplicate identical rooms instead of using X directives

The -c switch makes the output compatible with 0.5.0 and 0.5.0-E. Without -c the converter will emit S lines to the destination map and scale the coordinates accordingly. That way they are more compact and easier to understand and edit being integers. This only works with Outgun versions 1.0 and above; please use the -c switch if you are using an older version.

The -p switch makes the file smaller by removing padding and extra tailing zeros from the values. Without -p the file will be padded for readability so it’s easier to edit. The difference is especially big when the -c switch is used.

The -v switch makes the program show its progress while reading the source map file. This is useful when the program reports an error in the map file, so you can locate the error.

The -d switch removes the use of X lines in the output so that every room is output as a unit. This makes the resulting map file considerably larger and it’s hard to think of a use for this switch. If the map has no identical rooms, this switch will have no effect on the output.


The program is distributed as mapconv.exe (81k). It is the real executable and no installer. That means there is no documentation supplied with the program, so you might want to save this page for reference.

This program is not very well tested, please report any bugs!

Updated 2005-01-25 – Niko Ritari