Author Topic: [SL TUTORIAL] "Level specified in replay file does not exist" [HOW TO FIX]  (Read 2726 times)

0 Members and 1 Guest are viewing this topic.

Offline WillLem

  • Moderator
  • Posts: 3345
  • Unity isn't sameness, it's togetherness
    • View Profile
Loading Replays for Levels Within Packs

You're trying to load a replay file in SuperLemmini, and you get the dreaded error message:

Level specified in replay file does not exist

Well, fear not! Here are some easy steps to get around this issue:

STEP 1. Make sure that the level actually does exist in your SuperLemmini directory - this is obviously necessary!

STEP 2. Open the replay file in a text editor

At the top, you should see the following text:

#REPLAY NEW
#FORMAT 1
#REVISION 0.104
#Players 1


And, directly below this will be the level identifier. It follows this format:

#Name Of Pack, X (rank number), Y (level position), Rank, Title Of Level

So, for example, Havoc 17 Where Lemmings Dare would appear as follows:

#Oh No! More Lemmings, 4, 16, Havoc, Where Lemmings Dare

Note that in SuperLemmini, counting always starts at 0. So "Fun" would be 0, "Tricky" would be 1, "Taxing" would be 3, etc. and the same goes for level numbers as well. If this part of the replay file is incorrect for any reason, edit it to match the correct title/position of the level.

STEP 3. Now try to load the replay again.

Loading Replays for External Levels

PLEASE NOTE - If you are trying to load a replay for an "External Level" (i.e. one that isn't part of a pack), this is what usually causes issues, since SuperLemmini does not index External Levels permanently.

However, the above steps still apply; these levels will invariably appear like this in the replay file:

#External Levels, 0, 0, Single Levels, Title Of Level

You may need to load the level itself back into External Levels, make a note of its position in the list, and edit the replay file accordingly. So, if you're loading a level called "Blah-dy-Blah" at position 8, the above text would need to be modified as follows:

#External Levels, 0, 7, Single Levels, Blah-dy-Blah

Again, note that if the position in the list is 8, then its relative SL index is 7.

I hope this helps, comment here if you have any problems relating to this.
« Last Edit: January 17, 2021, 07:57:54 AM by WillLem »

Offline ericderkovits

  • Posts: 912
    • View Profile
hey Willlem, I tested this external level thing here you mentioned with one of Turricans'(rush hour). I opened his replay file using notepad text editor and I changed the position to a random number
(of course I loaded the .ini as an external level), but the replay still works. So if I changed the level number to a random number, then why does the replay still work if it doesn't match the position.

example: I loaded Turrican's rush hour level as an external level and it was the only external one I had (so it was at position 0), but I changed the replay file postion number to 21(just picked
a random number that wasn't 0). But the replay didn't crash. It still worked. So I'm thinking I'm not too certain still if this works for external levels. I would have to have someone send me an
external level and their replay. Then if it crashed, I could open the replay file to do as you say and see if it would work then.

I remember Kaywhyn Pming you Willem my replay for a Pimolems level(and the level ini), and you said you couldn't see it. Perhaps you can do to the replay file as you say here to test if it then works.

Offline kaywhyn

  • Global Moderator
  • Posts: 1846
    • View Profile
Wow, thanks for this WillLem! :thumbsup: With this information, you have helped me to discover why eric's Pimolems replays he sent me over the summer weren't loading correctly when he was in the process of converting the pack to Superlemmini. The reason for this was due to the identifier information. When you open the replays I PMed you, it will say that the replay is from the pack Pimolems instead of having the line #External levels, #, #, Single Levels, Level Title at the top. Therefore, there is a mismatch in the information between the level and the identifier in the replay text file. When I replace the line at the top with #External levels, #, #, Single Levels, Level Title at the top instead, replacing the second # with the position of the level in the list, as well as Level Title with the level name of course, his replays now load correctly. This therefore confirms there's nothing wrong with Superlemmini itself and that it's simply a mismatch between the level loaded as an external level and the replay text file saying it came from a level pack rather than specifying it is an external level.

Upon further testing, I loaded up an external level, solved the level, and saved the replay. When I opened up the replay with a text editor, it does have the #External levels, #, #, Single Levels, Level Title line at the top correctly. I'm not sure how eric loaded the levels up, but I'm thinking that when loading the levels up in the editor and then saving the file, then when you go to load it as an external level, test, then save the replay, SL thought it came from a levelpack rather than be an external level. Perhaps he can describe what he did if he happens to remember. In any case, it goes both ways. If coming from a level pack, make sure it has that info at the top in the replay text file. If loading a replay for an external level, make sure it has the external level line information instead and if it doesn't, simply put it in.

I guess this is analogous to different NL levels having the same ID, which therefore confuses the replays and can sometimes say they fail when in fact there's nothing wrong with them and all it is is that the replay matches up to the wrong level.

@eric yup I see the same thing as you. The reason why it works is because you need to have at least 2 external levels loaded. Then you will need to put in the right number for the position, as then a random number won't work in this case. If you put in a number for a different level, then whatever replay you load will load for the wrong level.

Example: Level A is level 1 (0), Level B is level 2 (1), and Level C is level 3 (2). If I change C's replay position to 0, then when I load the replay for C it will load up Level A instead, because 0 is Level A's position. Obviously when you go into the level, the replay will fail because it's for the wrong level.
« Last Edit: January 17, 2021, 09:34:49 AM by kaywhyn »
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

Offline ericderkovits

  • Posts: 912
    • View Profile
ok , again I tested this with 2 of turrican's external levels: Rush hour and Trading and Cooperating. loaded them as external levels. I changed both level position numbers to random numbers
again I can't seem to get any to crash, although when they replay they are unpredictable which one plays. or I can switch the order around, but the replay don't switch either.  Don't  understand
why I can't get it to work as described.

Offline kaywhyn

  • Global Moderator
  • Posts: 1846
    • View Profile
ok , again I tested this with 2 of turrican's external levels: Rush hour and Trading and Cooperating. loaded them as external levels. I changed both level position numbers to random numbers
again I can't seem to get any to crash, although when they replay they are unpredictable which one plays. or I can switch the order around, but the replay don't switch either.  Don't  understand
why I can't get it to work as described.

I'm not sure what you mean here by "replays being unpredictable which one plays." I tried the same two levels as you, and I believe I'm seeing the same thing as you. Before I added Rush Hour and Trading and Cooperation in, I had 5 external levels loaded. Rush Hour is the 6th level, while Trading and Cooperation is the 7th one for me. If I change Rush Hour to, say, 3, then when I load Rush Hour's replay, it loads up the 4th level instead, which is expected because I'm telling the replay to load it for that level due to the index number. Of course, the replay will fail since it's for the wrong level.

I tested by changing them to completely random numbers. Indeed, I see the same thing as you, where the replays load perfectly fine for those two levels. So, looks like I'm wrong with having at least two external levels. Therefore, the only time loading a replay will crash is if the text editor identifies the level coming from a level pack but you added it as an external level or vice versa. In that case, you simply need to replace the info at the top with either the line #levelpack, #, #, level name, or with the line #External levels, #, #, Single levels, level name. Then the replays will load without crashing.

Upon further testing, it appears that if the index number is random, then it simply ignores that part of the identifier line. Instead, it tries to read the level name info. Indeed, I changed Trading and Cooperation to the name of another level on my external list while keeping the random index number. Sure enough, it loads up the other level instead. In this case, the Trading and Cooperation replay will fail since it's not a replay for the other level on my external level list. Otherwise, the level that the replay is supposed to be for it seems to not matter what the index number is. As long as it matches or is some random number that doesn't refer to any level in the list, then it simply ignores the index number and goes by the level name info instead.

Here, I think it's analogous to NL's replay structure as well. I think it might be possible to change the level name to something else so that the replay refers to another level instead of the one it's supposed to be for, but I'm not sure.
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

Offline WillLem

  • Moderator
  • Posts: 3345
  • Unity isn't sameness, it's togetherness
    • View Profile
ok , again I tested this with 2 of turrican's external levels: Rush hour and Trading and Cooperating. loaded them as external levels. I changed both level position numbers to random numbers

Were those random numbers still in the same order as the listed levels?

So, if your list is:

1. Rush hour
2. Trading and Cooperating

And you randomly re-number them "7" and "56", SL will not crash/mismatch the replays because they are still in the correct order. It will just look for the next available level.

Try re-numbering them (for example) "24" and "5" instead, where the higher number is assigned to the level in the numerically lowest position on the list (in this case, Rush hour at position "1").

In any case, the above fix works for levels which are crashing; I'm not sure if reverse-engineering the fix can cause a level to crash, since it might be due to factors other than the ordering. However, I suspect that the suggestion I've given here will cause a crash.

Offline ericderkovits

  • Posts: 912
    • View Profile
ok, I loaded turricans external levels:

1st position) Trading and cooperating
2nd position) Rush hour

example 1

then I edited the replay files so

Trading and cooperating was 1 and
rush hour was 0
 So I switched the replay files to be opposite

so now it plays as expected in reverse order.

But

example 2:

Now I made Trading and cooperating 2 and
rush hour 1

so I just added 1 to the position(didn't change order-just increased position by 1)
so it should still play in reverse order, but this time it plays in the same order

this is what I meant by random order.
« Last Edit: January 17, 2021, 08:13:21 PM by ericderkovits »

Offline kaywhyn

  • Global Moderator
  • Posts: 1846
    • View Profile
Confirmed. I did what you described by loading

1) Trading and Cooperation,

2) Rush Hour.

Then put Trading and Cooperation with 1, Rush Hour 0.

Result: Loading Rush Hour's replay will load up the level Trading and Cooperation, and similarly loading Trading and Cooperation's replay will load up the level Rush Hour.

This is expected, as you're telling the Rush Hour's replay text file to load up the first level in the external level list, which is Trading and Cooperation. Similarly, you're telling the Trading and Cooperation replay's text file to load up the level Rush Hour. However, both replays will fail, since they're for the wrong level. So, no problem here.


Next situation: Trading and Cooperation 2, Rush Hour 1.

Result: Loading Rush Hour's replay will load up the level Rush Hour, which is expected, since Rush Hour is the second level in the list.

Loading up Trading and Cooperation's replay will load up the level Trading and Cooperation. This is likely causing confusion, since there's no level in the third position, while the level itself is first on the list. However, there's nothing wrong here either, as in my explanation above if you randomly assign numbers so that they're not referring to any level in the list, then SL simply ignores the index number and reads the level name info instead. That's exactly what's happening here. Since the replay is for Trading and Cooperation, the replay still passes.

However, if you change the level name in the text file to Rush Hour, it will load up the level Rush Hour as expected, since I'm telling the replay file that the replay is for this level. But, the replay will fail because the replay was saved after Turrican passed the level Trading and Cooperation, not Rush Hour.


Next situation: Increase by 1 again, so that Trading and Cooperation is 3, Rush Hour 2.

Result: Loading Rush Hour's replay will load the level Rush Hour, while loading Trading and Cooperation's replay will load the level Trading and Cooperation. Since we don't have any level in the 4th or 3rd position, SL ignores the index number and goes by the level name info in the text file instead. Indeed, this is exactly what is happening, so therefore this is the expected result. Therefore, what WillLem described wouldn't work, even though Trading and Cooperation has the higher index number than Rush Hour. As a result, replays don't load in reverse order.

The replays also pass, because these replays were saved after Turrican passed the level associated with the corresponding replay.



Ultimately, no problem in any of the 3 situations, since as I explained before if you put index numbers that don't refer to any level on the list, then SL ignores the number and goes by the level name info in the text file instead.
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

Offline ericderkovits

  • Posts: 912
    • View Profile
yeah your right Kaywhyn, I just didn't replay the levels. I just went by the ordering. when you switch the order the replays fail. in fact rush hour tries to replay Trading and cooperating. And Trading and cooperating ends up crashing. I guess this has to do with the actual replaying not the level ordering. But thanks again Kaywhyn. Maybe Willlem should have actually stated that because it was confusing to me. But now this all makes sense. The levels will load but will not replay if they refer to the wrong level.

Offline kaywhyn

  • Global Moderator
  • Posts: 1846
    • View Profile
Glad that I could help and that we could put our heads together to figure all this out based on the info WillLem presented :thumbsup: It's good to know there isn't anything wrong with your Pimolems replays from over the summer at all, and that it was simply due to mismatch identifier information in the replay text file. Once I changed the line at the top to #External Levels, #, #, Single Levels, Level Name, they all worked fine. Of course, this problem would had been solved so much sooner if Tsyu had told us how to fix it.
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

Offline ericderkovits

  • Posts: 912
    • View Profile
Re: [SL TUTORIAL] "Level specified in replay file does not exist" [HOW TO FIX]
« Reply #10 on: January 17, 2021, 11:16:31 PM »
yes, also maybe you should modify your post in the Several bugs in behavior in Superlemmini, where you posted about the external replays to say another Member figured it out how to handle this.

Although who knows if ever Tsyu would even see it and come online.

Offline kaywhyn

  • Global Moderator
  • Posts: 1846
    • View Profile
Re: [SL TUTORIAL] "Level specified in replay file does not exist" [HOW TO FIX]
« Reply #11 on: January 18, 2021, 01:45:03 AM »
Done. Thanks for the reminder. I totally forgot that I was the one who posted about replays of external levels sometimes crashing Superlemmini :XD:
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

Offline WillLem

  • Moderator
  • Posts: 3345
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [SL TUTORIAL] "Level specified in replay file does not exist" [HOW TO FIX]
« Reply #12 on: January 18, 2021, 03:30:36 AM »
Really, what needs to happen is for replays to refer specifically to the level files themselves, rather than their list index. This would likely require some sort of ID system similar to what NeoLemmix has, since levels can be renamed and repositioned in packs at any time.

For now, the fix I described in the OP will work in 99% of situations, providing that the user has not "cleared" or reordered their External Levels list.

Offline kaywhyn

  • Global Moderator
  • Posts: 1846
    • View Profile
Re: [SL TUTORIAL] "Level specified in replay file does not exist" [HOW TO FIX]
« Reply #13 on: January 18, 2021, 04:39:37 AM »
Really, what needs to happen is for replays to refer specifically to the level files themselves, rather than their list index. This would likely require some sort of ID system similar to what NeoLemmix has, since levels can be renamed and repositioned in packs at any time.

For now, the fix I described in the OP will work in 99% of situations, providing that the user has not "cleared" or reordered their External Levels list.

Right, because if you have a list of external levels, then you can pretty much give all of them random index numbers so that SL simply ignores it and interprets the level name in the text file, which ideally is what the engine should be doing. It might be the same with levels in level packs, but I haven't tested that.
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

Offline ericderkovits

  • Posts: 912
    • View Profile
Re: [SL TUTORIAL] "Level specified in replay file does not exist" [HOW TO FIX]
« Reply #14 on: January 18, 2021, 05:01:10 AM »
yeah not too concerned about level packs as it seems replays almost always work. Just external levels seem to be a big pain.