Xargon Mapper and Resource Extractor

About and Dependencies

This is a series of Python scripts to generate maps of Xargon, as well as extract most of the Xargon image resources. These scripts require the Python Imaging Library (PIL) and Python 2.x (tested with Python 2.7.3). PIL unfortunately does not yet support Python 3, which prevents these scripts from being forward-compatible at this time.

EDIT from the future: these could be ported to Pillow, but I have not spent the time to do so.

Windows users should be able to download Python and PIL from the above links. Most Linux/Unix varients should be able to install Python and PIL via your package manager of choice; Ubuntu users can install the python and python-imaging libraries. OSX users should already have Python, but you may need to compile PIL yourself via the source download at the PIL website. Or just use pip.

The scripts also obviously require Xargon, either the shareware or full versions. The full version has been released as Freeware, so it should be easy for you to get what you need.

A full development log for this tool is available on the VGMaps Forums.
This tool was developed without the use of the Xargon source code by manually
decoding the game resources, so some of the techniques may be useful for decoding other games.

Please note the palimage#.png image files are used to obtain
the assorted Xargon colour paletted variations, and are required for
this tool to work.


There are two scripts included in the package that are intended to be executed directly.
xargonmapper.py is the main map generation script,
xargongraphics.py is a script to extract the contents of a Xargon GRAPHICS resource file. In addition to the three scripts above, several supplimentary scripts can be run to gather debug outputs of one form or another, and are listed under the Other Scripts heading.

The genep1.sh, genep2.sh and genep3.sh are pre-made shell scripts to generate map images for each episode of the game. You can edit these files to change the path to Xargon for alternate configurations. Sorry, no .BAT files are provided for Windows users, but the .sh files and the below instructions should get you going.


Usage: python xargonmapper.py [Graphics File] [Tiles File] [Map File(s)...]

Generates map images for every Xargon map file indicated. Requires the
corresponding GRAPHICS file for the images to use, and the TILES file
for the map tile to graphics resource mapping. All files should be from
the same Episode of Xargon.


Usage: python xargongraphics.py [Graphics File]

Extracts all graphics resources from the specified GRAPHICS file from
Xargon. Output is stored in the Episode#Images and
Episode#OriginalImages folders, where # is the episode number of the
input file. The OriginalImages folder contains the original 256-colour
images without any additional processing, while the Images folder
contains 32-bit RGBA images after colour index 0 has been set

Other Scripts


Usage: python xargonmap.py [Map File(s)]

Generates the following debug information for each specified Xargon map

A false-colour image of the map, where each tile
value is represented as a different colour.
A simple CSV containing each tile value
Auxiliary information about a map from the footer.
Contains all the unknown header-type information,
as well as the strings.
A full listing of all objects in the specified map,
and all their associated fields.
A listing of all the strings in the map, as well
as the guessed mapping to object reference

Usage: python xargontiles.py [Tiles File]

Generates a debug CSV file for the mapping specified in the given
TILES file from Xargon. Output is written to tiles.csv.


Usage: python xargongraphics.py [Graphics File]

Generates BDF font files for the two identified fonts stored in the
Xargon GRAPHICS file. The BDF files can then be converted to .pil files
for use in the main mapper via the pilfont.py script. The BDF files can
also be used in any software that supports BDF.


xargonmapper.tar.gz (194.2 kB)
xargonmapper.zip (212.6 kB)


Add a Comment
Comment Atom Feed