extracting Cheapo graphics

Started by mobius, December 06, 2014, 09:59:32 PM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

namida

Simple is always good. If you could at least document the format, I could look at doing something with it...
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)

mobius

#31
 :thumbsup: thanks big time. This is really cool.

Quote from: Essman on January 20, 2015, 03:32:55 AM
Quote from: namida on January 20, 2015, 02:31:44 AM
Alright! :) I'll have a look at the output from this later on today, and see what I can do about making a tool to convert the output to NeoLemmix / SuperLemmini styles. Of course, keep in mind that objects that don't exist in these versions can't be transferred (which is pretty much any Cheapo-exclusive object, with the exception (only in NeoLemmix) of the teleporters).

I just updated the zip file link so that it extracts music (.midi) and sound (.wav) files.
The only thing left is object info. Is that even useful to know? I'd have to make a list of objects, and write out the position of each sprite that it uses for each frame. Before I make up a format for extracted objects, I'll wait to see if anyone has any requirements. Otherwise I'll just make up an XML or JSON text format.

I'd be interested in objects but not sure about requirements or how high of a priority it is, considering I'm not even sure how to create new objects in Lemmini/SuperLemmini. [what I would be doing this for right now that is]
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


mobius

It works great so far except I get an error when I try to extract the Mario (SMB) set. It says invalid style file. Any ideas [the style works fine in-game...]

This was the one style I really wanted above all the others  :'(
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Essman

Quote from: möbius on January 21, 2015, 01:33:42 AM
It works great so far except I get an error when I try to extract the Mario (SMB) set. It says invalid style file. Any ideas [the style works fine in-game...]

This was the one style I really wanted above all the others  :'(

I don't have a copy of that Mario style file. If you get a copy to me then I'll debug the extractor and see what's wrong.

Edit: I think I found the SMB.sty file online so I'll check it out later. Thanks for the info.

Essman

Quote from: möbius on January 21, 2015, 01:33:42 AM
It works great so far except I get an error when I try to extract the Mario (SMB) set. It says invalid style file. Any ideas [the style works fine in-game...]

This was the one style I really wanted above all the others  :'(

I ran the extractor on smb.sty and it worked fine. I added an attachment of the files that were extracted.
Try downloading the style extractor zip file again, I've been updating it as I make fixes. Or maybe you have a corrupt copy of smb.sty. Either way, hopefully the attached zip file has what you want.

mobius

Quote from: Essman on January 21, 2015, 04:33:20 AM
Quote from: möbius on January 21, 2015, 01:33:42 AM
It works great so far except I get an error when I try to extract the Mario (SMB) set. It says invalid style file. Any ideas [the style works fine in-game...]

This was the one style I really wanted above all the others  :'(

I ran the extractor on smb.sty and it worked fine. I added an attachment of the files that were extracted.
Try downloading the style extractor zip file again, I've been updating it as I make fixes. Or maybe you have a corrupt copy of smb.sty. Either way, hopefully the attached zip file has what you want.

:thumbsup: exactly what I wanted thanks a million.
So far this is the only time I've had a problem everything else extracted fine.

Do you have documentation or know who created each style?
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Essman

Quote from: möbius on January 21, 2015, 10:09:15 PM
Do you have documentation or know who created each style?

Nope, not unless the creator included a readme file with the style. For SMB.sty, the readme says "Insane Steve" created it.

Essman

One last update for the style extractor: All information about sprites and objects are written to XML files.
https://github.com/spadapet/cheapstyle/blob/master/Publish/CheapStyle.zip?raw=true

namida

Working on a LemSet update that can take these files as input. :)
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)

Essman

Quote from: namida on January 27, 2015, 05:51:24 AM
Working on a LemSet update that can take these files as input. :)

Cool, if you're using the files, let me know if I can change the file format to make them easier to use.

namida

It's manageable as it is. :) I already modified LemSet to accept PNG (and GIF) files before I saw this post, and that's probably the only major obstacle that existed.

However, two pieces of info that could be useful:
- How exactly does Cheapo calculate a circle trigger area? NeoLemmix doesn't support this, so I'd have to approximate it with a square (or add support for it, in which case knowing the algorithm would be useful).
- What sound effects correspond to what traps?
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)

Essman

Quote from: namida on January 27, 2015, 06:49:15 AM
However, two pieces of info that could be useful:
- How exactly does Cheapo calculate a circle trigger area? NeoLemmix doesn't support this, so I'd have to approximate it with a square (or add support for it, in which case knowing the algorithm would be useful).
- What sound effects correspond to what traps?

I forgot about circle triggers for objects. Now I added support for them, but it's not well tested since I couldn't find any objects that have circle triggers. But I think it works. You would've seen negative rectangle sizes before I added circle support.

I attached a text file here that lists all of the sound effect numbers.

namida

#42
Just for record, I haven't forgotten about this. But I am going to have to make some adjustments to NeoLemmix, to support having more than one window in the same graphic set, as even some of the official Cheapo styles use this, let alone fan-made ones.

EDIT: I have support for it implemented in LemSet, and I have it functionally (but not yet graphically) working in NeoLemmix (ie: they function as windows, but don't yet follow the rules for how windows are meant to animate).

EDIT: Fully implemented now.


There are some types of objects in Cheapo that NeoLemmix doesn't support (basically anything that doesn't appear in the official games, except for Teleporters; also NoSplats are virtually the same as NeoLemmix's updrafts so those could be used as a substitute; also it doesn't support triggered harmless animations (only constant ones) or exits, or SingleTele / TwoWayTele). Most likely, I'll just convert the unsupported ones to objects that do nothing.
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)

namida

#43
Alright, I just took this for its first test run. Results:

- Terrain is converted PERFECTLY. :)
- Objects, not so well yet. Some types seem to not function even when they should, the spawn point for windows is a bit off fixed and fixed, and most of all, the graphic is entirely missing the graphics are fine now.
- NeoLemmix also seems to have a weird issue when a graphic set has a window as the first object. Fixed this one.
- Objects don't have sound linked to them yet, but after intensively examining the code, I have determined that this is because I haven't written any code to handle doing so yet - important parts first. :P


EDIT: By any chance, does the window spawn position (HitPointX and HitPointY) refer to the lemming's top-left rather than it's foot position? No worries, through trial-and-error I worked out the correct relative position to use.

Also, I notice that the extracted width/height of images are 1 higher than the actual width/height (eg: for a terrain piece that's 32 pixels wide, the width in the XML file will be listed as 33). This applies to both terrain pieces and object frames; not sure about anything else.
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)

namida

Things are looking good. There's one small snag of what to do about one-way arrows; as you probably know, Cheapo doesn't consider them "objects", but treats them more like how steel areas are handled (or at least, how they were prior to autosteel's existance). Since the sizing of them is very flexible, unlike in other engines where they're restricted by the size of the object, this could be problematic when converting levels (of course, in all but the very best of cases, Cheapo level conversions are going to require some manual touching-up anyway - NeoLemmix is probably the closest currently-used engine to Cheapo mechanics-wise, but there are still a lot of differences).

But, to show that I'm getting somewhere; here's a saved gameplay image showing a Cheapo graphic set being used in NeoLemmix (note the Swimmer, which is not found in Cheapo).
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)