Author Topic: L3DEdit: Lemmings 3D Level Editor - Release topic (V0.51)  (Read 33196 times)

0 Members and 1 Guest are viewing this topic.

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: L3DEdit: Lemmings 3D Level Editor - Release topic (V0.45)
« Reply #45 on: July 10, 2019, 02:39:34 AM »
The manual has been updated to reflect the changes in V0.44 and V0.45.
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 insulfrog

  • Posts: 28
    • View Profile
Re: L3DEdit: Lemmings 3D Level Editor - Release topic (V0.45)
« Reply #46 on: July 19, 2019, 04:27:34 PM »
I am not sure what happened with the latest L3DEdit update Namida but L3DEdit is deleting level files every time I try to open either the 'BLK' or the 'LEVEL' files. Then a cmd prompt type window opens for a split second (see attachment), then this message appears.

Cannot open File
(directory here)... L3D\LEVELS\LEVEL.nnn
The system cannot find the file specified

(where nnn is the level number)

The L3DEditD.exe is in the L3D folder.

EDIT: I have copied my entire L3D game from my L3D CD to the same L3D directory.
« Last Edit: July 19, 2019, 08:29:16 PM by insulfrog »

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: L3DEdit: Lemmings 3D Level Editor - Release topic (V0.45)
« Reply #47 on: July 19, 2019, 09:05:25 PM »
Okay - so what's happening there, is that L3D, as on-disc, has all the levels compressed via RNC compression. I don't understand the RNC algorithm well enough to write my own decompression code yet*, so L3DEdit relies on an external command line tool (there's a copy built into L3DEdit.exe that it extracts as needed, so you don't need to obtain this tool separately).

This tool can only extract from a file on disk, to another file on disk; so this works by - let's use LEVEL.000 as an example - asking the tool to decompress LEVEL.000 and save the result in LEVEL.000.TMP (the BLK file is not compressed, ever). L3DEdit then deletes LEVEL.000, and renames LEVEL.000.TMP to LEVEL.000.

In your case, it looks like the command line parameters aren't being passed to the RNC tool properly. Maybe it's a specific issue with your setup, maybe something's broken during development since this feature was introduced, maybe it's a bug specific to the Delphi version - I'll have to look into it a bit to see.

Due to the compression being the reason for this, this should NEVER happen with custom levels, unless you've compressed them manually. Nonetheless, this could still be severe if I'm wrong on that assumption, or someone has done that, so - I was about to release a 0.46 update just now, but I'll put it on hold to put some more safety measures in place to avoid file deletion if things go wrong and release a 0.47 update instead that has these measures in place. An actual solution to the issue, rather than just data-loss-prevention safety measures, will become a project for 0.48.

In regards to just getting the editor working for yourself - as an immediate workaround, please try downloading the Lazarus version of L3DEdit (L3DEdit.exe), placing it in your L3D folder, and using the Utilities -> RNC Decompress -> Lemmings 3D (Full) option. This will run the RNC decompressor on all known RNC-compressed files in L3D. Please make a backup of any L3D files that you've customized first. Note that your save file is safe no matter what, as L3D stores this in an entirely different folder. If it's a "this has crept in over time" bug or a "specific to your setup" bug this won't help, but if it's a Delphi version-exclusive bug - which I believe to be the most likely scenario at this stage - then this will get all the files decompressed. You don't need to continue using the Lazarus version after that (except if you need decompress files again - you may want to take a backup of your decompressed but otherwise unmodified L3D folder, to avoid that hassle), once the files are decompressed you can go back to using the Delphi version for actual real-world usage.

* If anyone who's more familiar with compression algorithms wants to help me understand it so I can write my own implementation, or if anyone knows of a Pascal implementation that already exists, please let me know. In the latter case, compression ability would be nice, but only decompression is critical. Only version 1 of RNC is relevant to Lemmings 3D.
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 namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: L3DEdit: Lemmings 3D Level Editor - Release topic (V0.47)
« Reply #48 on: July 19, 2019, 09:49:48 PM »
Uploaded V0.47. Compared to V0.46, V0.47 just adds some safety checks to reduce the risk of data loss when the bug mentioned above by insulfrog is triggered. It does not *fix* the bug, it just has more precautions to avoid data loss when the bug does occur.

Though as mentioned above, V0.46 didn't see a release, and that one does have a few changes:
- The Reorder Levels menu now has a "Style Count" button, which can be used to count the style usage in either all levels (if none are selected in the menu) or a subset of levels (by selecting them in the level list in that menu).
- Can now edit the "Land Is Slippery" and "Disable Quick Jump" (the quick-jump done by clicking and dragging on the minimap) flags.
- Two of the flags in the metablock editor have had their descriptions updated to reflect recent discoveries about them.
- Some improvements to the tab ordering of form controls, though it's still not great. (If anyone wants it to be great, please submit a pull request - I simply don't see tweaking the tab ordering as a worthwhile use of development time; hotkeys are faster for layout editing, and other fields are not used frequently enough that the tab order needs to be perfect IMO.)
- Fixed bug: The "Swap" button in the Reorder Levels menu doesn't stay in place when the window is resized.

Note that when saving a level, if the "Disable Minimap" flag is active, the level will be saved with the "Disable Quick Jump" flag also active (yes - you can still quick jump on minimap disabled levels if this flag isn't set, despite the minimap not being visible) regardless of the state of the checkbox. However, you can absolutely have the "Disable Quick Jump" flag on levels that don't outright disable the minimap (this is seen in official levels in Lemlab, The Prisoner, The Hanger and Claustrophobic).


Please also note, there's a change to the repo structure:
- The Delphi version is now the main version, ie: the "master" branch. From 0.47 on, release branches under just "release/x.xx" are Delphi versions (for 0.46 and earlier, they're Lazarus versions).
- The Lazarus version is now in a "Lazarus" branch. The releases are "release-lazarus-windows/x.xx".
- The Linux version has been re-branched from the new Lazarus branch. It also has release branches now, "release-lazarus-linux/x.xx".

I intend to deprecate the Windows Lazarus build in the near future. The branch will remain in existance, as I'll use it so that I can follow a two step porting process - first from Delphi to Lazarus-Win, then from Lazarus-Win to Lazarus-Linux. The only released Lazarus builds will then be the Linux build, and possibly in the future a Mac build; though anyone will still be free to compile the Lazarus-Windows source themself if they wish.
« Last Edit: July 19, 2019, 10:56:19 PM 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 insulfrog

  • Posts: 28
    • View Profile
Re: L3DEdit: Lemmings 3D Level Editor - Release topic (V0.47)
« Reply #49 on: July 20, 2019, 08:37:29 AM »
The 'Anti-Data-Loss' algorithm is working, but I fear though that Delphi is not supporting the decompression algorithm. The reason being is that in the Delphi version now simply refuses to decompress the levels for viewing in the editor even after un-checking the 'read only' status in the folder properties. The attachment might provide more insight. 

Surprisingly the Lazarus version loads levels flawlessly and seems to run quicker but there may still be bugs to squash. So I am gong to have a play around that version and see what's up.  Please note that I have not applied any patches to L3D at this point as I have restored my L3D game folder from a pre-patched backup.

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: L3DEdit: Lemmings 3D Level Editor - Release topic (V0.47)
« Reply #50 on: July 20, 2019, 09:51:13 AM »
Yes - as mentioned, I haven't made any effort to fix the bug yet, just to avoid data loss when it occurs. So the only difference from before that you'll see so far, is that files don't disappear anymore.

The "Read Only" mark shouldn't matter - both versions of L3DEdit are aware of the possibility of the file being read-only, and are prepared to deal with that. But something else must be stopping the Delphi version from working properly - so I'll look into that.

As mentioned in my previous post - you should be able to use the Lazarus version to decompress the files (Utilities -> RNC Decompress -> Lemmings 3D (Full), this will decompress all RNC compressed files in the Lemmings 3D installation), and once that's done, the Delphi version should work fine with the now-decompressed files. Lemmings 3D does not require the files to be compressed, and even the Lazarus version of L3DEdit does not compress level files when saving them, so you won't run into the same issue when you try to save levels.

I'll probably have a patch out to fix this in the Delphi version either later tonight, or sometime tomorrow, if you'd rather just wait for that.
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 namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: L3DEdit: Lemmings 3D Level Editor - Release topic (V0.48)
« Reply #51 on: July 20, 2019, 10:21:56 AM »
V0.48 released. For users of the Lazarus Windows build, there is no change except the version number, so no need to update if that's the version you're using.
- Fixed bug: (Delphi version only) Decompression of RNC compressed files fails.
- Fixed bug: (Linux version only) Most files fail to load due to incorrect path delimiters
- Fixed bug: (Linux version only) Many UI elements are oddly sized and/or overlap each other

Just to be completely clear: RNC decompression is still not supported on the Linux build; Linux users will need to use one of the Windows versions with WINE, or an external tool, to decompress the files.

The manual has also been updated to match V0.48 of L3DEdit.
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 namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: L3DEdit: Lemmings 3D Level Editor - Release topic (V0.49)
« Reply #52 on: July 21, 2019, 12:57:13 AM »
Uploaded V0.49 of the Delphi Windows Build only. This fixes a bug introduced in 0.48 that would cause the level reordering menu to not load correctly.

As there's no other changes, I didn't upload new Lazarus builds (Windows or Linux), so for those, continue using 0.48.
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 namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: L3DEdit: Lemmings 3D Level Editor - Release topic (V0.49)
« Reply #53 on: July 23, 2019, 01:26:02 AM »
Uploaded V0.50 (all builds, this time).

This fixes a bug in the code that automatically enables the "Disable Quick Jump" flag on levels that have the "Disable Minimap" flag - it was also setting flags that disable the proper rendering of some other level elements.

This new version will not repair those flags on levels that have already been affected. If your levels have been affected by this bug, please download this tool, place it in your L3D "LEVELS" folder, and run it; it will fix the levels. (It also ensures the Disable Quick Jump flag is active on the levels in question, so if you have levels that pre-date the discovery of this flag and need them adjusted, use this tool to quickly do so, instead of manually going through all your levels.) Source code, for Lazarus, is also attached. This should work under WINE, but if anyone needs a native Linux build and can't compile one themself, let me know.

For the record, any level that has been saved with V0.48 or V0.49 of L3DEdit with the "Disable Minimap" flag active, even if the flag was later deactivated, will have the incorrect settings - although depending on the level's design, it may not suffer any ill effects from this. (If the flag was enabled, but disabled again before the level was saved, the level will not have the settings in question.) This applies to all three builds.
« Last Edit: July 23, 2019, 01:44:22 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 namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: L3DEdit: Lemmings 3D Level Editor - Release topic (V0.51)
« Reply #54 on: August 09, 2019, 12:12:54 AM »
Uploaded V0.51.

I've decided at this point to stop releasing Lazarus-Windows builds. The Lazarus-Windows branch in the repo is still there, so anyone who really wants this is free to compile it themself. So, the only builds released for this update are the Delphi-Windows build and the Lazarus-Linux build.

Also, since it looks like I need to start putting attention into NeoLemmix again, I'm likely going to slow down work on this project. Assuming no one else wishes to take over on it, future updates will be for bugfixes only, at least for the foreseeable future. However - this is pretty much a complete editor at this stage; basically every known feature can be edited directly, and there's now even means to edit the unknown-at-this-time values, if anyone ever figures out what they're for.

Changes for V0.51:
- Unknown values, and some known obscure settings, can now be edited through a menu (or in some cases, extra edit boxes) that edit the raw data for these attributes - look under "Edit" on the menu bar. You can use the obscure ones, but I advise leaving the unknown ones alone if you don't know what you're trying to do with them.
- Adjusted the metablock editor's positioning of face graphics to more accurately reflect how a block is composed in-game.
- Some improvements to rendering accuracy.
- Fixed bug: The level isn't considered "modified" (and thus you won't be asked if you want to save before exiting / etc) after shifting the level.
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)