# MosPack v0.91b

MosPack consists of two utilities, mospack and mosunpack. They convert MOS files to and from the MOZ format, described in mozformat.html. Typically mod authors will pack the finished MOS files with mospack, and then ship mosunpack together with the MOZ files and an installer. The MOZ files need to be unpacked before they can be used by the game engine.

## A note on image quality

In our tests, very little image quality was lost in the conversion, especially with the quality cranked up a bit to 85. However, by using a 24-bit source for the tiles instead of a MOS file (that has 8-bit tiles) it should be possible to get slightly better image quality and slightly better compression. For this to work the mod editors would need to support MOZ files natively, and not save the tiles as MOS files first.

## mospack

Usage:

`mospack [-s] [-q quality] [-o outfile.moz] [-e] [-V] infile.tis`

Arguments:

-s | Be silent. Supply twice for really silent.
-q quality | Set the compression quality, between 1-100. The default is 75.
-b blur | Set the amount of blur used with lossy compression, between 1-100. The default is no blur. Blurred input compresses better, but doesn't look as good.
-o outfile.moz | Select output file. The default is <infile>.moz.
-e | Do not halt on errors. Default is to halt processing if an error occurs, with this option mospack continues packing the next file.
-V | Print version number and exit.

Example:

    C:\>mospack -s -q 85 worldmap.mos
    Processing worldmap.mos...
    Packing mos of size 4776 x 3600 (4275 tiles) in worldmap.mos to worldmap.moz
    packed 4275 tiles
    output size: 6690290 bytes (39.4%)

worldmap.mos is compressed with lossy compression at quality 85 (-q 85), and the program is less chatty (-s).

## mosunpack

Usage:

`mosunpack [-s] [-f] [-o outfile.mos] [-e] [-V] infile.moz`

Arguments:

-s | Be silent. Supply twice for really silent.
-f | Force overwrite of existing output file.
-d | Dither 24-bit tiles. This should probably not be used if the source images were already dithered.
-o outfile.mos | Select output file. The default is <infile>.mos.
-e | Do not halt on errors. Default is to halt processing if an error occurs, with this option mosunpack continues unpacking the next file.
-V | Print version number and exit.

Example:

    C:\>mosunpack -s worldmap.moz
    worldmap.mos already exists, use -f to force overwrite.

    C:\>mosunpack -s -o worldmap-q85.mos worldmap.moz
    Processing worldmap.moz...
    Unpacking mos of size 4776 x 3600 (4275 tiles) in worldmap.moz to worldmap-q85.mos
    unpacked 4275 tiles

worldmap.moz is unpacked to worldmap-q85.mos (with -o), and again we make it less chatty (-s).

## Contact

If you have any questions / comments please contact me at the forgotten wars forums:
forums.forgottenwars.net

## History

Version 0.91b - 2005-03-13
  - Fixed tileset indices.
Version 0.91 - 2005-03-13
  - First public release.