I've come a long way with this one. Classic Mode can now do the following:
- Deactivate Skill Shadows
- Deactivate CPM
- Deactivate Direction Select / Walker Select / Highlight Lemming
- Deactivate Frameskipping (includes special skips and slow motion)
- Deactivate Helpers (includes all overlays plus splat ruler hotkey)
- Deactivate Skill Queueing
- Deactivate Jump-to-Min/Max RR
- Deactivate Save/Load State / Save/Load Replay / Edit Replay / Replay Insert Mode
- Deactivate Assign-Whilst-Paused
The above is all tested and ready; there are likely many bugs and edge-cases that I haven't considered, but it all
works.
The only feature holding this back (and in fact one of only 2 things holding up an initial release of SuperLemmix) is Deactivate Replay-on-Restart.
Let me be clear: this is
not the same feature as "Cancel Replay After Backskip." It's already possible in NL to do this, and yet still have the level's replay load if you
Restart the level, in any of the following ways:
- Pressing the Restart button or Hotkey
- Choosing "Retry Level" from the Postview screen
- Exiting all the way to menu or level select, and then choosing to play the same level
The first of these I've sorted; in Classic Mode, hitting Restart button or Hotkey cancels the Replay. No problems there.
The issue is the other two, and they're causing more of a headache than I imagined. Since NL's gameplay structure is basically
built on its Replay functionality, messing with anything to do with replays is like diffusing a bomb!
Restarting whilst in-level shouldn't trigger a replay, I'm sure we can all agree that this is not in the spirit of Classic Mode. However, when the player has exited a level, it becomes a bit more complicated.
Firstly, if they've successfully completed the level, of course a Replay should be Auto-Saved and/or the player should be able to save one manually via the "Save Replay" clickable text/hotkey - I still want those who use Classic Mode to be able to save and share replays (maybe it could form the basis of a new challenge?)

So, "Save Replay" needs to be left alone, even in Classic Mode. So, for that matter, does "Auto-Save" (a toggleable option which automatically saves a replay upon successful completion of a level).
If the player
hasn't completed the level though, it becomes a bit more complicated here. I still want them to be able to save a replay (they may be highlighting a bug, or something which makes the level impossible, or they may just wish to save the replay to review at a later stage). It
does mean that players could still "cheat" in Classic Mode and use replay saving-and-loading TAS-style to complete a level, buuut if someone's going to bother to do that, then... whatever, I cba trying to stop it at this stage, and there's more to be lost by outright preventing it.
However, if the player re-enters the level after a non-successful attempt (either by hitting "Retry Level", or via the Level Select screen), I
don't want the replay to load.
So, basically, here are the cases I'm attempting to account for:
Case 1: (ClassicMode active) and (level finished unsuccessfully) >>> (user inputs "Save Replay" either by hotkey or mouse click) | Result: Open save replay dialog, go back to Postview screen after saving. Thereafter, usual replay-on-restart behaviour could be allowed in this case, since the player may wish to review the level again and the replay has been manually saved anyway.
Case 2: (ClassicMode active) and (level finished unsuccessfully) >>> (user inputs "Retry Level" either by hotkey or mouse click) | Result: The Replay is cleared and the level is reloaded (so, no red or blue R).
Case 3: (ClassicMode active) and (level finished unsuccessfully) >>> (user inputs "Select Level" either by hotkey or mouse click) >>> Result: Level Select Screen is accessed, Replay is kept in memory until a level is selected; therefore, if the player cancels out of the Level Select Screen, they can still choose to "Save Replay" from the existing Postview (i.e. Level Select doesn't exit the Postview Screen) | If, however, they choose to load a level via Level Select, the Replay is cleared.
Case 4: (ClassicMode active) and (level finished unsuccessfully) >>> (user inputs "Exit to Menu" either by hotkey or mouse click) Result: The Replay is cleared and the Main Menu is accessed.
I've managed to write some code which fully covers cases 2 and 4, and
appears to also have cases 1 and 3 covered:
if GameParams.ClassicMode and not GameParams.GameResult.gSuccess then
begin
fReplayManager.Clear(true);
end;
However, what happens here is that if the player chooses "Save Replay", the replay is indeed saved, but is for some reason unplayable. It isn't blank, all the level info (I.D, etc) is the same. It just won't play.
I have no idea why...
EDIT:
Tried the following. Getting an "Undeclared identifier" error message on TGameBaseScreen, which I'm hoping is an easy fix because I think I'm on the right track with this one. Going to bed, I'll look at it again tomorrow:
if GameParams.ClassicMode and not GameParams.GameResult.gSuccess then
begin
if not TGameBaseScreen.TryLoadReplay then
begin
fReplayManager.Clear(true);
end;
end;