Author Topic: NXP extractor  (Read 2760 times)

0 Members and 1 Guest are viewing this topic.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
NXP extractor
« on: May 06, 2020, 12:45:36 AM »
Don't take this as encouragement to start working in old-formats again - I produced this because it came to light that a very significant collection of packs by no-longer-present authors existed in NXP format and thus those could be useful to make current-formats conversions. To anyone else with existing old-formats content that isn't upgraded yet, consider this a bonus.

Anyway, here's a tool that extracts the contents of NXP files, as well as the source code (compile using Lazarus). Only lightly tested, let me know in this topic if there's a historical NXP file it doesn't work with. (If the NXP was produced more than a year after the first stable new-formats NeoLemmix was released, I don't care about it and will not help resolve issues with extracting it, as it should never have been created.)

It should also be able to extract the contents of the old .DAT music packs, if anyone needs to extract those (as the format of those is identical to that of NXP files).

Use it on the command line ("nxpextract.exe [nxp filename here]"), or drag-drop an NXP file on to it.
« Last Edit: May 12, 2020, 02:49:16 AM by namida »
My Lemmings 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)

Offline GigaLem

  • The Dog That Brought Lemmings to Avalice
  • Posts: 1417
    • View Profile
Re: NXP extractor
« Reply #1 on: May 06, 2020, 01:24:09 AM »
While I was able to extract from the Demo of Lemmingbytes, the full version didn't spit out nearly anything.
I've attached the version of lemmingbytes that's available on the site

Offline Proxima

  • Posts: 4569
    • View Profile
Re: NXP extractor
« Reply #2 on: May 06, 2020, 10:23:43 PM »
When extracting the attached NXP, there is a text file "i1101" that says "WARNING: This level might be impossible under NeoLemmix mechanics." According to namida, this should be the intro text for level 1101, but there is no level with that number.

Offline WillLem

  • Posts: 3384
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: NXP extractor
« Reply #3 on: May 11, 2020, 07:46:46 PM »
This one extracts to a bunch of DAT files (which then extract to empty folders).

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: NXP extractor
« Reply #4 on: May 11, 2020, 08:39:00 PM »
When extracting the attached NXP, there is a text file "i1101" that says "WARNING: This level might be impossible under NeoLemmix mechanics." According to namida, this should be the intro text for level 1101, but there is no level with that number.

There is no "1101.lvl" in that NXP file at all, so I think this might just be a case of a dangling file - perhaps due to a bug in the old-formats Flexi Toolkit resulting in it not properly removing unneeded files.

This one extracts to a bunch of DAT files (which then extract to empty folders).

It looks like this is in a particularly old format. Use DATPacker to extract those DAT files, they should contain the actual levels. It's possible it might also use oddtabling (NL used to support this but hasn't for a long time now - as in even V1.43 didn't support it - so there's no easy way to convert levels that use it).

While I was able to extract from the Demo of Lemmingbytes, the full version didn't spit out nearly anything.
I've attached the version of lemmingbytes that's available on the site

This one looks like an actual bug with the extractor; I'll need to look into this more thoroughly at some point.
My Lemmings 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)

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: NXP extractor
« Reply #5 on: May 12, 2020, 12:19:59 AM »
(feel free to move this post if you think it should go elsewhere)

This topic got me thinking that it would be useful to have a guide on how to convert content from arbitrary old versions, including old DOS Lemmings .lvl and .dat packs, definitely for individual levels, and, if possible, for bulk conversions, too. Right now you kinda have to track down the conversion instructions for each intermediate conversion you need and it's a bit of pain, and I've been wanting to go through some old levels on an old hard drive that never got NL conversions, as I'm curious if any of them would be salvageable (I'm guessing no, and I want to see if I'm right). Even recently, it took me a while to track down the instructions on how to cleanse levels on an nxp.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: NXP extractor
« Reply #6 on: May 12, 2020, 02:50:02 AM »
I looked into the LemmingBytes issue and I've got a fix. Uploaded a fixed version of the extractor (and the source code) in the first post.

Let me know if there's any other packs it still runs into issues on.
My Lemmings 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)