Poll

Would you want a Linux port of L3DUtils?

Yes
0 (0%)
No - I don't use Linux
0 (0%)
No - I don't use L3DUtils, or I can use what I need from it via WINE
0 (0%)
No - but I'd like Mac!
0 (0%)

Total Members Voted: 0

Author Topic: L3DUtils V0.10 - Replay save / load, save file utilities, game patches for L3D  (Read 581 times)

0 Members and 1 Guest are viewing this topic.

Offline namida

  • Administrator
  • Posts: 9355
    • View Profile
    • NeoLemmix Website
L3DUtils is a collection of utilities for Lemmings 3D. Most features require DOSBox, although the patches can be used even with copies of L3D running on real hardware or in virtual machines.

Note that L3DUtils is only intended for use with the full version of Lemmings 3D. Most features also require L3DUtils to be in the L3D folder, although you can use the launcher with CD versions of the game, or the replay manager, from anywhere. The Replay Manager features require Windows XP or higher, and likely won't work in WINE (although they might work if you use Windows DOSBox via WINE too).

L3DUtils has three main features:

1 - Game Patches
L3DUtils has three patches it can apply to Lemmings 3D.

The first one is the Music Patch. This fixes the discrepancy some levels have in their music between the CD audio vs soundcard / MIDI audio. This is identical to the music patch L3DEdit can apply (I'll be removing that from L3DEdit in the future, since it makes more sense as part of L3DUtils). This patch should be considered obligatory when creating or playing custom levels, but it's up to you if you want to use it for the official content.

The second is the Pyramid Texture Patch. Some copies of Lemmings 3D have corruption in one of the two Pyramid texturesets, resulting in many missing textures on the levels "Tooten Lemming", "Oh No! More Pyramids!", "King Coder's Tomb" and "The Prisoner" (it doesn't affect "The Arena" or "Raiders Of The Lost Lemming" as they use the other texture set, which is not affected). This patch will fix this corruption.

Finally, the last option is to switch the Lemmings 3D EXE between the floppy disk and CD versions of the game. The floppy version doesn't have the disk check, at the cost of not supporting CD audio (it does still support CD animations if the files are there).


2 - Replay Manager
The replay manager lets you save and load your replays in Lemmings 3D, instead of them being limited to an auto-replay mode when you retry a level. There's even an option to auto-save replays when you complete a level - please note that this specifically works by saving the replay as soon as you hit the save requirement, so anything done after that will not be included in the auto-save replays.

Saving a replay manually is as easy as clicking "Save Replay". You can save a replay at any time during gameplay (or demo mode, if you really want). If you start a different level, or start playing the same level and interrupt the replay (or start it again in a way that doesn't trigger auto-replay mode), that's when the replay is lost - up until that point, you can still save the replay.

Loading a replay is similar; you can load a replay at either type of preview screen, while in-game (if you do this, gameplay will restart), or on a failed postview screen.

It is normal for L3DUtils to seem to freeze for 10 - 15 seconds upon opening the Replay Manager. You can minimize this by not opening the Replay Manager until Lemmings 3D is running, although it will still happen, just to a lesser extent. This is just because L3DUtils is searching DOSBox's memory to find Lemmings 3D.

If the Replay Manager doesn't work (the buttons never become enabled), please make sure that (a) you're using a 32-bit version of DOSBox (will look into supporting 64-bit in the future), (b) you're not using the debugger build of DOSBox (this will be easy to make work, but I haven't done so yet), and (c) DOSBox is not running as an administrator - or if it has to be for some reason, then L3DUtils needs to run as one too. L3DUtils shouldn't require any specific version of DOSBox, just as long as the EXE file is named "DosBox.exe" (not case-sensitive).

You can also use these replay files, to create demos for your custom level packs. Simply replace the "REP.xxx" files in the "REPLAY" folder with the replays extracted by L3DUtils. Note that while REP.000 to REP.003 can be for any level, REPLAY.080 to REPLAY.099 must specifically be for the corresponding Practice level.

There are also some general memory-hacking features for L3D hidden in the replay manager. These are probably of no use to the average user, but if it sounds like something you have a use for, see the V0.08 update post for details.

3 - L3D Launcher
This enables one-click launching of Lemmings 3D in DOSBox. Note that you still mostly need to configure DOSBox's options in terms of graphics, setting the CPU type to "dynamic", etc. What the launcher will do, is take care of mounting the folders for you and starting up L3D. Optionally, it can mount an ISO file or a physical CD-ROM drive as well - and yes, it's compatible with the OGG-based CD music setup that some people have been sharing around (make sure to select the CUE file, not the ISO file, when using that setup). :)

If there is a copy of Lemmings 3D in the same folder as L3DUtils, this copy will be launched. If not, then if an ISO or CD drive is configured, it'll launch the copy from that. (If neither of these applies, it won't be able to launch L3D.)

The real draw of the launcher, though, is that it allows you to swap between multiple save files - essential if you're playing multiple packs at a time, or you just want to keep separate save files, etc. The save files will be kept in a subfolder of wherever L3DUtils is running from, and the configuration (but not progress, obviously) will be shared across all saves as long as L3DUtils is being used to launch L3D. Do note that you cannot swap save files while L3D is running.

On the subject of save-files, there's also an "Unlock All Levels" button. Unlike the equivalent feature in L3DEdit, this does not create a new save file, but modifies your existing one - so your records will remain, and any levels you've completed will stay marked as complete, and your skill usage counts won't be lost, etc. All it does is unlock any levels that aren't already unlocked, and make sure all the level titles in the save file are correct.



Source code (for Lazarus) is available here: https://bitbucket.org/namida42/l3dreplay/src/master/
L3DReplay does not have any dependencies outside of the units included in Lazarus as standard. However, it relies heavily on the Windows API, so it will not be possible to compile for other operating systems without major changes.
« Last Edit: July 16, 2019, 10:23:35 pm by namida »

Offline 607

  • Posts: 389
    • View Profile
Re: L3DReplay V0.02 - Replay load / save tool for Lemmings 3D
« Reply #1 on: June 16, 2019, 05:53:38 pm »
With these cool projects in the making I should find my Lemmings 3D cd and try to get it working again. Exciting! :thumbsup:

Offline namida

  • Administrator
  • Posts: 9355
    • View Profile
    • NeoLemmix Website
Re: L3DReplay V0.03 - Replay load / save tool for Lemmings 3D
« Reply #2 on: June 17, 2019, 10:43:48 am »
Uploaded V0.03. This update removes the need to initialize by loading a known replay.

Next on the todo list is find a way to have automatic saving of replays upon completing a level. At least in theory this should be possible, though I still need to figure out exactly how to best go about detecting this.
« Last Edit: June 17, 2019, 11:15:17 am by namida »

Offline namida

  • Administrator
  • Posts: 9355
    • View Profile
    • NeoLemmix Website
Re: L3DReplay V0.04 - Replay load / save tool for Lemmings 3D
« Reply #3 on: June 18, 2019, 12:07:55 am »
Uploaded V0.04. The "Initialize" button has been removed (it's all automatic now), and L3DReplay should detect if Lemmings 3D is no longer running (previously, it could only detect if DOSBox as a whole was no longer running).

Offline namida

  • Administrator
  • Posts: 9355
    • View Profile
    • NeoLemmix Website
Re: L3DReplay V0.05 - Replay load / save tool for Lemmings 3D
« Reply #4 on: June 19, 2019, 02:29:53 am »
Uploaded V0.05. This adds a feature to auto-save replays when you reach the save requirement on any level you're playing. This feature must be specifically turned on each time you run L3DReplay!

Offline namida

  • Administrator
  • Posts: 9355
    • View Profile
    • NeoLemmix Website
Uploaded V0.06. This has turned the project from L3DReplay to L3DUtils, and has added game patching and launching features. These are documented in the original post.

Aside from that, your replay autosave setting is now preserved between sessions, and there are also optimizations to greatly improve how quickly L3D is located in DOSBox's memory, resulting in faster initialization most of the time. (EDIT: It appears that while this works great if you exit then re-enter L3D in a single DOSBox session, it doesn't really do much between sessions. I'll look into if further improvement is possible.)
« Last Edit: July 05, 2019, 09:22:58 pm by namida »

Offline namida

  • Administrator
  • Posts: 9355
    • View Profile
    • NeoLemmix Website
Uploaded V0.07. This adds an "Unlock All Levels" button next to the save file selection.

Clicking this will unlock all levels that aren't already unlocked, as well as correct any wrong level titles in the save file. It will not clear existing completion, saved lemming / time records, etc.

Offline namida

  • Administrator
  • Posts: 9355
    • View Profile
    • NeoLemmix Website
Uploaded V0.08.

As far as most users need to know, this is just a bugfix update for one bug: If you hit "Unlock All Levels" when no save file exists, a save with glitchy records is produced. This behaviour is corrected in the new update; the records will be blank as they should be.

However, for those of you who are interested in hacking L3D, there's some useful memory dump / injection features.

Spoiler (click to show/hide)

Offline namida

  • Administrator
  • Posts: 9355
    • View Profile
    • NeoLemmix Website
Uploaded V0.09. Changes:
- You can now load replays at the pre-first-attempt wallpaper / preview screen.
- You no longer need to pause before loading a replay during gameplay and/or manually restart afterwards - this all happens automatically now.

Offline namida

  • Administrator
  • Posts: 9355
    • View Profile
    • NeoLemmix Website
Uploaded v0.10. This fixes some bugs with loading replays on the wallpaper / preview screens (in particular, that it wouldn't work if you came to the level after completing a previous level, rather than directly from the level select or password menus).