Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - spud

Pages: [1]
Level Design / 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 (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...

Pages: [1]