Opened 14 months ago

Last modified 6 months ago

#10404 new enhancement

SCI: LSL7: parser behavior improvement

Reported by: MIKZER0 Owned by:
Priority: normal Component: Engine: SCI
Keywords: sci32 Cc:
Game: Leisure Suit Larry 7

Description

First, this is not an issue with the current implementation as the scummvm version behave the same as the original game.

The italian version of Larry 7 has a couple of issue. The game is completable but one of this issue prevent the player from getting one of the easter eggs and reach the complete ending.

The verb "unzip" in italian was translated as "Aprire la cerniera" but is never recognized by the parser. The verb "Aprire" is recognized instead but it's related to the verb "Open" in the english version.
At first I thought the reason was that the verb was composed by more than one word, but the english version has multiple words verb recognized (turn on, turn off) and works fine.
I checked the parsing code in ScummVm and it seem it stops at the first complete match in every version of the SCI engine.
In the end I think I find the reason the Italian version has this issue. The parser stops at the first complete match of the game verbs on the input, but doesn't check if there is a verb that completely match the input, in other words it checks if the game verb match the start of the input (it is contained in it) but not if the input has characters left that could better match another verb. It also checks each entry in order (verb number and maybe sequence). I believe that the list of verbs was carefully crafted to works with this system (the order in which each verb is numbered is important) so that in case of verbs with the initial part in common the parser would pick the right one.

One example is this list of verbs:
-turn off
-turn on
-turn
in this order.
If the player input "turn on" the parser would:
-check "turn off" and fail
-check "turn on" and match
-stop
-verb "turn on" is recognized
If the order was different (turn, turn on, turn off) this would happen:
-check "turn" and match (turn is contained in turn on)
-stop
-verb "turn" is recognized

In the english version there are in fact other cases of verbs that cannot be matched using the parser due to the matching argorithm but luckily they are not needed to complete the game.
"Lay" and "Lay down", lay down is never matched. "Lay cable" however get recognized as it is placed before the others.
"Look over" and "Look down" are never recognized as "Look" comes before them. They have a different number associated that "look", I don't know if there are events related to those verbs that never happens in the game due to this issue.
In the Italian version however, translating some of those verbs messed up the matching order and some (one in particular) of those verbs are needed to have a complete ending.

The behavior is the same on both the original game (DOS and Windows client) and is correctly replicated in ScummVm.
For the italian version an easy fix is to change the problematic verb with another one. We (a group of fan) already did that and it works.
However it would be good to also have the parser improved to correctly match the words the player input. It would also allow owners of the original Italian retail version to complete the game without the need of a fanmade patch (that we can provide to you if you wish to make it available).
I don't know if this could create new issues with other languages (including english) as those version have been tested with the original parser. I have a limited understanding of scummvm code but if you need further assistance on the issue I'm willing to help as well as providing better reproducible examples.

Change History (2)

comment:1 Changed 14 months ago by MIKZER0

Summary: SCI: LSL7: parser behavior improvement (Italian version)SCI: LSL7: parser behavior improvement

After further analysis I believe this change wouldn't only impact the Italian version of the game, but all versions. It could open up event that wouldn't be fired originally but it could also break the game in case those verbs doesn't link to any events. The original game was probably not tested on those not recognized verbs. I'll try to make some other tests and bring the results here.

It would be interesting to know what others thinks about this parser behavior and if an improvement could be discussed.

comment:2 Changed 6 months ago by Gimlao

The « Unzip » verb also can't be used in the French version.

We have to type « Ouvrir la fermeture éclair », which is more than 20 characters, so we actually can't get the latest easter egg...

Version 0, edited 6 months ago by Gimlao (next)
Note: See TracTickets for help on using tickets.