L3DUtils V0.10 - Replay save / load, save file utilities, game patches for L3D

Started by namida, June 15, 2019, 09:18:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Would you want a Linux port of L3DUtils?

Yes
0 (0%)
No - I don't use Linux
1 (50%)
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!
1 (50%)

Total Members Voted: 2

namida

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).

What does the music patch do?" / "I applied the music patch but my sound isn't working?
Copy/pasted from a post in the L3DEdit topic (as this patch used to be part of L3DEdit):
QuoteThe music patch does not fix anything with sound working or not working.

What it fixes, is that in the vanilla version of L3D, there's a discrepancy between CD audio and other audio. As you might know, there's two tracks for each style on the CD audio (I'll call these "Standard" and "Alternate"); while the soundcard / MIDI audio has three for each track (equivalents to Standard and Alternate, plus a third one - which I'll call "Remix" - which is always a remix of Standard).

Each level can select between Standard, Alternate and Remix. Obviously, this setting is based on soundcard / MIDI audio. Since CD audio doesn't have Remix, you'd logically expect that any level that plays Remix, would instead get Standard under CD audio; while Standard and Alternate would work the same way they always do. However - what actually happens, is that while Standard works fine, the CD audio will play Alternate if the level's set to "Remix", and Standard if the level is set to "Alternate".

The music patch fixes this, so that the musics are consistent between the CD audio and the soundcard / MIDI audio. That's all it does - specifically, it does this by swapping the 2nd and 3rd music file for every style. You can then choose, either globally or per-style, whether you want to treat the CD audio track selection or the soundcard audio selection as the "correct" one (which will then patch the levels appropriately - when keeping the CD music, or on levels that use Standard, no changes are needed; otherwise, it will swap between the two remaining options). You can customize this however you like, but I've set the default to be keep soundcard / MIDI's choices for Space levels, and CD audio's for all others (when you see exactly which Space levels get the alternate music with this setup, you'll see exactly why I made that the default).

If sound / music is not working, you need to run L3D's "setup.exe" and configure sound hardware. With DOSBox's default config, you can use either Soundblaster or General Midi. With some additional setup, you can also use Gravis UltraSound. AWE32 is not supported in DOSBox - although you can use Virtual Midi Synth, together with an AWE32 soundfont and the "General Midi" music option, to get very close to AWE32 music (but you just have to settle for Soundblaster or Gravis UltraSound for effects) - the one catch being that it glitches out hard towards the end of the Standard track for the Computer style (sound glitches only, but they're REALLY annoying). The need to run setup to configure your sound hardware is nothing special to DOSBox; the same applies to running L3D PC version on real hardware.

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.
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)

607

With these cool projects in the making I should find my Lemmings 3D cd and try to get it working again. Exciting! :thumbsup:

namida

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.
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

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).
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

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!
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

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.)
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

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.
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

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
To activate the memory features, open the replay manager, turn caps lock on, and type (without quotes) "PETERGRIFFIN". No speed requirement - you can take an hour between letters and it'll still count. However - it MUST be done with caps lock; holding shift won't work.

The "Memory Dump" button saves a dump of L3D's memory, the "Memory Inject" button injects a file into memory (at the offset typed into the textbox next to it, in hex), and the "Inject Raw Data" button injects the bytes you type into the large edit box into memory (same as with the file inject; the offset is determined by the small edit box). The data should be entered in hexidecimal, you can divide lines however you like, spaces are accepted between bytes but not required.

You're on your own for how to do anything useful with these features. If you don't know how to do anything useful with them, and aren't trying to learn how to do anything useful with them, you probably should pretend they don't exist.
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

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.
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

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).
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)

grams88

Hi Namida

It's me again.

I was having a bit of trouble trying to get the texture patch to work. I'm playing the lemmings 3d with the dosbox but on the pyramid levels, it's all black and hard to see where you are going. Do you have to put the patch in the levels folder, I was wondering. I'm not as well if the L3dutils downloaded properly as it says it is blocked, I tried disabling my Avast but still says the same.

namida

Put L3DUtils in the same folder as L3D.exe, and run it from there.

If it doesn't work, may be easiest to start clean with one of the copies of L3D in this topic: https://www.lemmingsforums.net/index.php?topic=4289.0
(These copies also have the music patch pre-applied - which is useful if you're intending to play custom content.)

Alternatively, if your existing install is otherwise working fine and you want to keep it as-is, and you can't get the patch to work; download the non-CD copy from that topic, and copy the "TEXTURE.000" file (in the GFX folder) from the downloaded copy, into your existing copy.
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)

grams88

Thanks Namida

Right I will have a look into that and see if I can get it working.

grams88

That worked quite well Namida :thumbsup::thumbsup:

I thought at first that was the actual design of the level being dark and black but seeing what the textures are meant to be that's a lot better and the pyramids look nicer. No wonder I was finding the pyramid level hard, at first I was thinking why would the lemmings 3d team make a level that was very dark, I couldn't solve it as it was hard to see where the lemmings were going. Now it's going to be a lot easier, hopefully.

One of the problems I had with the download was because I was using Microsoft edge and it didn't seem to allow me to download the file properly but I managed to get it working on google chrome.

Hope you have been keeping well. :)

namida

Once you're finished with the official levels, if you want some more to play, check out my level pack too: https://www.lemmingsforums.net/index.php?topic=4368.0
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)