Author Topic: [BUG]Incorrect end level message in functional preplaced lem level w/ bad stats  (Read 1772 times)

0 Members and 1 Guest are viewing this topic.

Offline Dullstar

  • Posts: 2094
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
When thinking about the Validate Level functionality due to it being mentioned in another thread regarding the skill count, I remembered that it warned about missing hatches/exits and thought to see what would happen if I put a single preplaced lemming in a level with an exit and no hatch in a level whose stats were not changed from the default save 20 out of 40 lemmings. I expected I'd have an unbeatable level and maybe Validate Level would complain about it. I definitely didn't expect what behavior this actually caused:

The player recognizes the level is only capable of dispensing one lemming, so it shows level stats of 1 lemming, 1 to be saved. However, when it checks the results at the end of the level (assuming the player solves the level successfully according to the displayed stats), it disagrees with itself as to whether or not you beat the level: the displayed stats are consistent with beating the level (1 lemming, 1 saved), but it provides a message consistent with failure: "A little more practice on this level is definitely recommended!" Internally the game appears to treat this as a successful solve: the autosave successful replays feature will save the replay, and if the level is run through the player and not the editor, you will receive a checkmark for completing the level.

The attached level demonstrates that the player will adjust the level's obviously bad stats in an attempt to make it beatable. I suspect the mismatch between the result and the end of level message is due to the message being based off of the level's original stats rather than these adjusted stats.

The Validate Level functionality only mentions that the level is missing a hatch, which is true, but maybe a little vague. On the other hand that is the root cause. So while the Validate Level could probably be modified to detect this particular issue more specifically, it's probably fine as is for this particular scenario.

EDIT: This is specific to levels with the ability to dispense 0 or 1 lemmings (including preplaced). I was also able to replicate the behavior using a hatch set to spawn only 1 lemming. Validate Level will display an error that the level's save requirement is too high in this case rather than that the level is missing a hatch.
« Last Edit: August 20, 2019, 06:26:17 PM by Dullstar »

Offline namida

  • Administrator
  • Posts: 12422
    • View Profile
    • NeoLemmix Website
I'll investigate more later - but, does this happen with levels that have at least 2 lemmings? There was a known issue in previous versions (although it's supposedly fixed now, according to Nepster - but maybe it snuck back in at some point) where levels with 0 or 1 lemmings displayed incorrect postview messages.
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 Dullstar

  • Posts: 2094
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
2+ appears to work correctly, but 1 or 0 triggers the bug I described. Will edit the OP to reflect this information.

Offline namida

  • Administrator
  • Posts: 12422
    • View Profile
    • NeoLemmix Website
Okay, I'll look into this bug and in particular, whether or not it was fixed via changes to the default postview messages file. If it was fixed via such changes, this would mean the fix doesn't automatically carry over to any packs with custom postview texts - and it seems a lot of packs have a copy of the default file (as it stood at the time of conversion), possibly due to the convertor from old formats not really being able to detect custom vs default messages and just treating all postview texts as custom (and thus creating the pack-specific file).
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 Dullstar

  • Posts: 2094
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
For what it's worth, the test level was newly created and not part of a pack. If I understand how the custom postview texts work enough, it should be using the default.

Offline namida

  • Administrator
  • Posts: 12422
    • View Profile
    • NeoLemmix Website
Yes, in this case, it should definitely be using the defaults. Alright, I can rule out the above theory.
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: 12422
    • View Profile
    • NeoLemmix Website
Alright, should be fixed in commit 761809A.

Please keep an eye on this in the release candidate build when it comes, and let me know if there are any edge cases that still don't work correctly, or any significant side effects.

No changes should be needed to files. I achieved this fix by making it so that conditions that usually would mean "keep the previous text, don't use the next one in the list" get overriden for texts where the condition is either (a) the exact save requirement, or (b) 100%.
« Last Edit: September 26, 2019, 07:27:01 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)