Tools for converting levels to bitmap?

Started by Ron_Stard, April 25, 2017, 08:21:09 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Ron_Stard

Are there any program susceptible to use for batch-converting Lemmings and Lemmings 2 levels to PNG or bitmap format?

Nepster

For lemmings levels, you can load them into NeoLemmix. NeoLemmix has a hotkey (default is "I") that saves the current frame (including any lemmings, ...) as a png. If you have them as a NeoLemmix level pack, then you can even press "F5" on the main screen and mass dump images of (the initial state of) all levels in the pack.

Ron_Stard

Thank you for your help! But while pressing "I" works fine on both Lemmix and NeoLemmix players, the F5 hotkey doesn't seem to work on NeoLemmix (on Lemmix, it extracts all the levels individually to .LVL format, which is not what I wanted, but is also pretty useful for me).

Simon

#3
I don't know level-to-image dumpers for L2. There is L2 format documentation on Mindless's Lemmings Archive.

If you write your own image dumper from these hacking notes, feel free to ask questions. geoo has written code for PCL2ED to load tilesets and levels, and code for C++ Lix to load tilesets only. But writing your own might be too much work for what you had in mind with the images. :-)

-- Simon

Ron_Stard

Thank you for the info! I am planning to do a simple drag and drop level2image converter in AutoHotkey. I thought I could rely on any console program some of the conversion work. But I have no problem with writing everything almost from scratch. I will have a look to those codes :thumbsup:

Nepster

Quote from: Ron_Stard on April 26, 2017, 10:26:16 AM
[...] the F5 hotkey doesn't seem to work on NeoLemmix (on Lemmix, it extracts all the levels individually to .LVL format, which is not what I wanted, but is also pretty useful for me).
When creating a level pack, one has the option to disable both dumping the level files and the level images. But I am not aware of any pack that uses this option, so I forgot to mention it in my first post. Sorry.

Ron_Stard

Quote from: Nepster on April 26, 2017, 04:30:31 PM
When creating a level pack, one has the option to disable both dumping the level files and the level images. But I am not aware of any pack that uses this option, so I forgot to mention it in my first post. Sorry.

So, there is no way to extract the .LVLs from a .NXP file?

Nepster

It depends: In most packs "F4" on the main menu does the job. But if the pack creator explicitely disabled that option when creating the level pack, then you are out of luck (though namida and I can get even around that).

namida

With Lemmix players (at least if they're my updated versions, which add the mass dump features), you'll want to use F5 for level dump and F6 for image dump, IIRC.

I can probably put together some kind of command-line app that does this for you if you like. Do be aware it'll be based on NeoLemmix code, so (a) special graphics levels won't be supported, as NeoLemmix doesn't support that anymore (instead, NL "special graphics" levels are created by using a custom tileset with a very large terrain piece, and handling objects by taking advantage of NL's ability to mix multiple tilesets in one level), and (b) there may be some very minor differences, such as that NeoLemmix has differently-colored one way arrows for the Snow graphic set than DOS L1 / Lemmix do.
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)

Ron_Stard

Quote from: namida on April 27, 2017, 10:31:18 AM

I can probably put together some kind of command-line app that does this for you if you like. Do be aware it'll be based on NeoLemmix code, so (a) special graphics levels won't be supported, as NeoLemmix doesn't support that anymore (instead, NL "special graphics" levels are created by using a custom tileset with a very large terrain piece, and handling objects by taking advantage of NL's ability to mix multiple tilesets in one level), and (b) there may be some very minor differences, such as that NeoLemmix has differently-colored one way arrows for the Snow graphic set than DOS L1 / Lemmix do.

That would be enough, thank you for your help! I'll post the AutoHotkey GUI code for the converter I have planned in this thread, later at night.

Ron_Stard

This is a screenshot of the GUI I am planning to do (almost finished):



The code is attached below. For testing it, just download AutoHotkey and drop the LvL2img.ahk file into it.

(Of course, notice that it's not finished yet, since there are still no calls to any console command able to convert LVL nor NXP to images).

Simon

Hah, awesome. Are you planning to write all code in AHK? Or are you building the GUI with AHK and plan to call a command-line tool from the GUI?

It looks like you will outsource the hard work to a command-line program, I like this approach. Interesting that AHK is so easy to make GUIs with. I knew it had extensive scripting.

-- Simon

Geoff

I don't know if this might be of use to anyone?




Ron_Stard

Quote from: Geoff on April 29, 2017, 07:25:58 PM
I don't know if this might be of use to anyone?

That's great! Exactly what I wanted to program!
It seems it crashes with Holiday 93, and can't extract Lemmings 2 levels, despite including that game inside the .ZIP

Geoff

I can't really help you with the crashes. its a unfinished program i found on the net a couple of years ago.