LemMain is a tool for extracting and rebuilding the images in the Lemmings MAIN.DAT file. It can work with MAIN.DAT files from virtually any traditional or NeoLemmix game. Do note that it doesn't tend to play well with the DOS versions of Lemmings due to the compression algorithm not being as efficient as some other tools (but you could always decompress and recompress it with other tools if you need to work with the DOS version; in this case I recommend Mindless's Lemmings Tools).

LemMain is now obsolete due to NeoLemmix no longer using MAIN.DAT as of V1.40n; it may still be of use to those who wish to extract graphics from older packs, or work with traditional Lemmix or the DOS games.

Usage is very simple - place the MAIN.DAT in the same folder as LemMain, run LemMain, and press 1 to Extract. You'll then be asked what kind of MAIN.DAT you're extracting; select the correct type. Note that if you're using a MAIN.DAT that uses the Xmas Palette, you can switch palette before choosing extract or rebuild. This does not apply to NeoLemmix V1.29n+ MAIN.DATs; you do not need to select the correct palette as they use RGB pixels rather than palettes.

If you already have the source images (most likely from extracting a MAIN.DAT, and perhaps modifying them afterwards), you can rebuild the MAIN.DAT in much the same way.

Finally, there is an option at the main menu to save BMP images of the palettes. This is because Lemmings uses specific palettes for all images in MAIN.DAT; and thus by saving these, you know what colors you can use when editing the images (although do note that some images are limited to the first 4 or 8 colors of the palette, or in one case - the High Perfomance PC game font - the first four colors are fine, the next four aren't, the next four are, and the last four aren't). The palette limitations don't apply for NeoLemmix V1.29n+ MAIN.DAT files; you can use any color you like there.

LemMain supports five types of MAIN.DAT files, and supports both the standard and Xmas palettes:
  • Four-rank traditional MAIN.DATs
  • Five-rank traditional MAIN.DATs
  • Fifteen-rank traditional MAIN.DATs (for Flexi)
  • NeoLemmix MAIN.DATs for V1.28n and earlier
  • NeoLemmix MAIN.DATs for V1.37n and later

NeoLemmix MAIN.DAT files for V1.29n to V1.36n are not supported directly; instead, you should load and then re-export these MAIN.DAT files to a Flexi Toolkit project (using V1.04 or higher of Flexi Toolkit), this will automatically upgrade them to V1.37n MAIN.DAT files.

LemMain is open-source; the source code (for QB64) is included with the download.

Current version: V11.0

        Download LemMain V11.0

The "extra graphics" download is no longer here; these should be obtained instead by extracting the sample MAIN.DAT that is included with LemMain.

For all NeoLemmix players (assuming V1.29n or higher; if not you should probably update anyway), the NeoLemmix V1.29n+ format should be used. For traditional Lemmix players, the Four-Rank Traditional format should be used (with the Xmas Palette in the case of Xmas / Holiday), except on OhNo / Cust (five-rank traditional) and Extra / Flexi (fifteen-rank traditional).