Amiga Lemmings Level Editing

Started by spud, December 28, 2009, 02:37:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

spud

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" class="bbc_link" target="_blank">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 http://www.amiga-stuff.com/files/crunchers/ByteKillerPro1.0.lha" class="bbc_link" target="_blank">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 http://mh-nexus.de/en/hxd/" class="bbc_link" target="_blank">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...


geoo

Thanks for the thorough documentation http://www.lemmingsforums.com/Smileys/lemmings/thumbsup.gif" alt=":thumbsup:" title="Thumbs Up" class="smiley" />; I hope I'll get around to try it out sometime.

Dullstar

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.

Proxima

The original game does have 80 unique levels with 40 repeats.

namida

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 projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

lionclaw

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