Author Topic: Amiga Lemmings Level Editing  (Read 2201 times)

0 Members and 1 Guest are viewing this topic.

Offline spud

  • Posts: 4
    • View Profile
Amiga Lemmings Level Editing
« on: December 28, 2009, 02:37:54 pm »
I've finally had some time to write up the method to compress levels for the Amiga version of Lemmings. It's fairly involved for the uninitiated, but I've tried to make it as concise as possible, whilst still being easy enough to follow. If anything doesn't make sense then feel free to fire any questions my way. Here goes...


What you need

1. A WinUAE configuration capable of running a Lemmings hard drive installation (e.g. the one provided by Mindless). I followed the guide at http://guide.abime.net/home3.htm (chapters 1-4), also making sure I had lha, jst (which is needed by Lemmings) and WHDLoad.

2. ByteKiller 1.0 Pro, available here. Make sure ByteKiller is installed somewhere in your Amiga setup (such as a programs drive) where you can access it from the Amiga shell.

3. A Hex Editor. I used HxD which can be found here.

4. Four Lemmings levels, using the tilesets from the original Lemmings, saved in .lvl format.



What to do

Stage 1. Creating your level pack.

Firstly the four levels must be joined together. The Amiga Lemmings levels are arranged in packs of 4 levels linked one after another. There may be an Amiga tool to link the files together, but after briefly looking I couldn't find one. Anyway, it is simple enough to do in HxD.

1. Open HxD and create a new file.

2. Then open the first of your four .lvl files, also in HxD. Now hit Ctrl-A (select all), copy, and paste the file contents into your new, empty file.

3. Now open the second .lvl file, select all, and copy its contents at the end of the new file, after the data for the first level.

4. Repeat this for the two remaining levels and save the new file, giving it a temporary name (e.g. l0). Look at the properties for the file you just created, and it should be *EXACTLY* 8KB (8192 bytes). We now have the uncompressed level pack.


Stage 2. Compressing the level pack with ByteKiller.

1. Copy your new l0 file into the directory containing your ByteKiller executable file.

2. Boot your WinUAE Amiga configuration into Workbench and open the shell.

3. Go to wherever you have installed ByteKiller and run it.

4. ByteKiller will ask you to specify the amount of memory for it to use - just enter an amount large enough for it to process the file (I normally enter 8888).

5. Next it will ask for the filename - enter the filename of your uncompressed levelpack: l0.

6. Type c (to crunch) the file and hit enter.

7. At the mode selection screen type 1 (mega crunch) and hit enter.

8. Type d (save data file) and hit enter at the next screen.

9. Enter a filename - Level000 - and hit enter to save it. Now exit the program. The file is now crunched, but the header and footer need fixing.


Stage 3. Fixing the file header/footer

1. Open your new Level000 file in HxD.

2. Delete the first 4 bytes of the file.

3. Cut the next 8 bytes of the file.

4. Scroll to the end of the file, and delete the last 4 bytes (which should read "data").

5. Paste the 8 bytes you copied earlier at the end of the file.

6. Cut again the first 4 of the 8 bytes you just pasted, and paste them at the end of the file. The values of the last 4 bytes should now be 00 00 20 00.

7. Save the file.



And we're done. The file you've just saved should be compressed in the right way to work with the Amiga Lemmings executable.

To test it copy it into the directory containing your Lemmings hard drive installation, and load up the game. Due to the odd data structure of the game, the levels your level pack has replaced are a bit random. The ones you will want to try (assuming the filename of your level pack is Level000) are Tricky 01, Taxing 15, Tricky 14 and Tricky 20.

Et voila! You should now be playing Amiga Lemmings with a custom level pack.

Admittedly there is more work to be done for this to become useful. The ordering of the levels in the packs is fairly confusing, and certain levels are reused (e.g. the map for Tricky 15 - Ozone Friendly Lemmings is reused for Fun 01 - Just Dig). There is no level file for Fun 01, and if you replace the map for Tricky 15 then Fun 01 will use that map as well.

I believe the leveldata file specifies which levels should be reused and when, but after having a brief look at it (it was also compressed with ByteKiller) I can't make anything of it - maybe someone else would know...


Offline geoo

  • Administrator
  • Posts: 1322
    • View Profile
Re: Amiga Lemmings Level Editing
« Reply #1 on: December 30, 2009, 11:27:19 pm »
Thanks for the thorough documentation :thumbsup:; I hope I'll get around to try it out sometime.

Offline Dullstar

  • Posts: 1581
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: Amiga Lemmings Level Editing
« Reply #2 on: December 31, 2009, 03:18:44 am »
If you can post the outcome of the file, someone might be able to make something out of it.  Not I, but maybe someone else.

Offline Proxima

  • Posts: 3326
    • View Profile
Re: Amiga Lemmings Level Editing
« Reply #3 on: November 13, 2016, 02:39:57 pm »
The original game does have 80 unique levels with 40 repeats.

Online namida

  • Administrator
  • Posts: 8568
    • View Profile
    • NeoLemmix Website
Re: Amiga Lemmings Level Editing
« Reply #4 on: November 15, 2016, 03:32:36 am »
On the DOS version, using a hex editor on Oddtable.dat allows you to edit the titles / stats of repeated levels. However, there isn't any easy way to change /which/ levels are repeated, though the keyword here is "easy".

Chances are something similar is possible on Amiga too.

Though I do have to wonder why you're trying to edit the Amiga version rather than creating your content for a modern engine like NeoLemmix (or even Lemmix, if you'd rather stay true to original physics).
My released level packs:
Lemmings Plus Series | Doomsday Lemmings

Offline lionclaw1

  • Posts: 5
    • View Profile
Re: Amiga Lemmings Level Editing
« Reply #5 on: February 10, 2019, 10:53:57 pm »
I use the Amiga Version of all three Lemmings, so I hope that I can try this some day. I've downloaded all the custom levels from the Lemmings database :D