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.


Messages - spud

Pages: [1]
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 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...


2
Level Design / Re: Possibility of a Method to Edit Amiga Lemmings?
« on: December 28, 2009, 01:04:25 PM »
Actually it was a coincidence that I started looking at this at all - I was originally digging around in the Amiga version of Lemmings to try to extract the sounds because several of the Windows ones sound sped up in comparison. After I stumbled upon this thread it intrigued me enough to have a look into the compression of the levels.

Anyway, what gave me the clue to the compression format was the documentation for XFD which stated that it could decompress ByteKiller compressed files that had had their headers modified or moved to the end of the files. I messed around with the Level000 file from the Lemmings hard drive installation provided by Mindless, first decompressing it with XFD and then attempting to recompress it and end up with exactly the same file I started with. After some time playing around with it I managed to figure out the required method to do this. I then just applied the same technique to a custom, uncompressed level pack (saved in .lvl format in Lemmix), plugged it into the Lemmings installation and, hey presto, it worked.

Stand by for a full description of how to compress the levels.

3
Level Design / Re: Possibility of a Method to Edit Amiga Lemmings?
« on: December 22, 2009, 10:03:08 AM »
It involved running the uncompressed level pack through ByteKiller and then a bit of messing about with the file header and footer, but yes it seems to work!

If anyone wants I could write a brief howto, so other people can try it out for themselves.

4
Level Design / Re: Possibility of a Method to Edit Amiga Lemmings?
« on: December 20, 2009, 02:10:33 PM »
Try this in your LemmingsHD install.

The levels you want are Tricky 01, Taxing 15, Tricky 14 and Tricky 20. They are a random selection from Van Clan Lemmings.

Here's a teaser:



Pages: [1]