Author Topic: LSL6 dark intro scenes with narration and no visible text  (Read 1331 times)

0 Members and 1 Guest are viewing this topic.

Offline miracle.flame

LSL6 dark intro scenes with narration and no visible text
« on: February 08, 2025, 04:01:48 PM »
Hello dear community, I was missing the good vibes of these calm forums and their helpful members. In case you were curious the LSL5 Czech localization is out. There's a video presentation as well.

Also LSL6 is somewhat done without need to tamper with scripts or re-compilation. However there are few bugs worth discussing.

During the intro cutscene of LSL6 there are two instances when the scene goes out into dark and narration goes on, no text being visible at that time unfortunately for localization. When a new scene pops in there's the text from the previous narration still visible for a short time before it gets replaced by new text along with new narration.
The short glimpse is of string "After a few glorious moments in the back of the limo (in which you act out your favorite scene from "No Way Out" while Shalo acts out her favorite scene from "Ice Station Zebra") you arrive at the studio, and are escorted directly to the set, where an episode of "Stallions" is being taped."

So to summarize rm130 ends with narration without visible text, scene rm140 starts with text from previous scene visible for a while. Would it be possible to make the scene rm140 appear sooner so that the text is visible for at least 3 seconds before the new narration occurs? If not sooner maybe just pause for 3 sec right after popping in before it gets into motion. I believe the snippet dealing with loading the scene is this (from sluicebox's)

Code: [Select]
(instance rm140 of LarryRoom
(properties
picture 140
horizon 0
)

(method (init)
(SetCursor 98 0 0)
(gGlobalSound2 number: 0 stop:)
(super init: &rest)
(Palette 2 0 255 local8) ; PalIntensity
(gMouseDownHandler add: self)
(gKeyDownHandler add: self)
(self setScript: cartoonScr)
)

(method (handleEvent event)
(if
(and
(not (event claimed:))
(or
(& (event type:) evMOUSEBUTTON)
(and
(not local6)
(== (event message:) KEY_RETURN)
(& (event type:) evKEYBOARD)
)
)
)
(event claimed: 1)
(proc98_0)
)
)

(method (dispose)
(gMouseDownHandler delete: self)
(gKeyDownHandler delete: self)
(super dispose: &rest)
)

(method (newRoom newRoomNumber)
(= local6 newRoomNumber)
(gCast eachElementDo: #hide)
(gThePlane drawPic: -1)
(roomTimer setReal: self 2)
(if global205
(proc79_7)
)
)

(method (cue)
(roomTimer dispose: delete:)
(Palette 2 0 255 100) ; PalIntensity
(super newRoom: local6)
)
)


There's another such transition from rm140 to rm800 when these lines are being said:
Wow! What a cherry '73 Pacer!!
Finally! Your luck has changed, Larry! Two weeks at an exclusive health spa, filled with gorgeous women!
La Costa Lotta, HERE I COME!

and this is the snippet which might have the timing involved.

Code: [Select]
(instance startOfGameScr of Script
(properties)

(method (changeState newState)
(switch (= state newState)
(0
(gEgo hide:)
(= ticks 60)
)
(1
(gGlobalSound1 number: 803 loop: -1 hold: 1 setVol: 10 play:)
(= ticks 30)
)
(2
(gGlobalSound1 fade: 127 10 5 0)
(= ticks 240)
)
(3
(limo
init:
setStep: 5 2
setCycle: Fwd
setMotion: DPath 174 120 61 120 -20 119 self
)
)
(4
(limo hide:)
(= ticks 120)
)
(5
(limo
show:
setStep: 3 2
loop: 1
cel: 0
posn: -10 89
setCycle: Fwd
setPri: 100
setMotion: MoveTo 117 89 self
)
)
(6
(gGlobalSound1 hold: 2)
(= ticks 120)
)
(7
(gGlobalSound2 number: 801 loop: 1 play:)
(guardGate setCycle: End self)
)
(8
(= ticks 20)
)
(9
(gGlobalSound1 hold: 3)
(limo setCycle: Fwd setMotion: MoveTo 197 89 self)
)
(10
(gGlobalSound1 hold: 4)
(limo loop: 2 cel: 0 setCycle: CT 2 1 self)
)
(11
(= cycles 2)
)
(12
(limo setPri: 80 posn: 202 89 cel: 2)
(= ticks 45)
)
(13
(gEgo setPri: 79 posn: 203 90 loop: 8 cel: 1 show:)
(= ticks 90)
)
(14
(gGlobalSound1 hold: 5)
(gGlobalSound2 number: 802 loop: 1 play:)
(guardGate setCycle: Beg)
(limo setCycle: End self)
)
(15
(= cycles 2)
)
(16
(limo posn: 194 88 loop: 3 cel: 0 setCycle: Fwd)
(= cycles 2)
)
(17
(limo
cel: 0
loop: 3
setCycle: Fwd
setMotion: MoveTo -10 88 self
)
)
(18
(limo dispose:)
(gGlobalSound1 fade:)
(gEgo
setPri: -1
setSpeed: 6
setMotion: DPath 211 90 215 87 217 84 223 84 self
)
)
(19
(= ticks 120)
)
(20
(gThePlane drawPic: -1 0)
(gCurRoom newRoom: 200)
)
)
)
)


Well, even if these scripts could be altered in a way that would help the localization would it be possible to make SCR patches that would be compatible with the vanilla files of the game?



Offline doomlazer

Re: LSL6 dark intro scenes with narration and no visible text
« Reply #1 on: February 08, 2025, 05:14:30 PM »
This is the delay for "After a few glorious moments in the back of the limo..." is in rm130
 https://github.com/sluicebox/sci-scripts/blob/5ce19d3be606f2f9a758f54144904d201bc4a8e9/lsl6-cd-dos-1.000.000/src/rm130.sc#L299

Try changing the ticks to seconds.

rm140 has "Wow! What a cherry '73 Pacer!!"
https://github.com/sluicebox/sci-scripts/blob/5ce19d3be606f2f9a758f54144904d201bc4a8e9/lsl6-cd-dos-1.000.000/src/rm140.sc#L876

Offline miracle.flame

Re: LSL6 dark intro scenes with narration and no visible text
« Reply #2 on: February 09, 2025, 02:09:40 PM »
Thanks, this sounds promising.

I've copied the contents of lsl6-cd-dos-1.000.000 from the linked repository to the game directory. Loaded it in SCIC and edited script rm130,  line 298.

I've tried "ticks 60", "seconds 2", I've even tried to remove the whole 14th entry so that after saving it looks like this


Still after exporting the script as scr in the game's Patches directory (overwriting the previous one) the game plays the scene without noticeable changes.

I'm not sure if this is the correct procedure to go about making the patch, the script itself fails to compile if attempted.

Offline Collector

Re: LSL6 dark intro scenes with narration and no visible text
« Reply #3 on: February 09, 2025, 03:31:52 PM »
What does the "patchDir  =" line show in your resource.cfg?
KQII Remake Pic

Offline doomlazer

Re: LSL6 dark intro scenes with narration and no visible text
« Reply #4 on: February 09, 2025, 06:22:33 PM »
After seeing the problem firsthand, the easiest solution would be to comment out (gGame hideControls:), which keeps the interface visible during the fade to black.

Attached below is a patch that makes this change. You'll need to do the same thing in rm140 for the 76' Pacer line.

Edit: I don't know why, but recompiling any change to the rm130 script crashes the game in DOSBox, but not in ScummVM. I'v re-attached a fixed version that works in both.

If recompiling rm140 for the '73 pacer has issues in DOSBox, do this:

Export a clean 140.scr from SCICompanion.
Use a hex editor to find the value 385D03 in the patch file. That's hideControls.
(gGame hideControls:) in byte code is 9 bytes long, so change 385D to 3307 to skip the entire command.

That's the beauty of jmp!
« Last Edit: February 09, 2025, 08:29:59 PM by doomlazer »

Offline miracle.flame

Re: LSL6 dark intro scenes with narration and no visible text
« Reply #5 on: February 10, 2025, 02:57:29 AM »
In my resource.cfg patchDir  = .\;.\patches and localization files load fine from Patches directory as well as the provided 130.scr - and the solution is brilliant.

However now I am utterly puzzled because in the linked sluicebox's repository of 130.sc there is no "gGame hideControls" line to comment and I could not find one in 140.sc either.

What's even more puzzling when I open the blue rm130.sc marked as Patch Source in SCIC the code does not contain ";(gGame hideControls:)" and the whole 14th entry that should have been (= ticks 120) isn't there either - now I have confirmed that SCIC is loading the src\rm130.sc and and not the rm130.scr file itself.

I'd love to get to the bottom of this so that I can reliably try to make my own scr modifications because there are a few more bug puzzles to come besides this one.

EDIT:
Now I have decompiled the original files and rm130 has "(gLSL6 hideControls:)" in there. I have found the suggested "(theGame hideControls:)" in this repository though. How should I understand the differences? These were confusing me since the beginning I've tried re-compiling anything in SCIC.

EDIT2:
Well, eventually I've figured I had to decompile the vanilla files, modify script, and compile the script itself before exporting the script file as patch.
This helped me resolve also hideControls in rm140.sc and some other localization related issue elsewhere.

BUT there's another minor issue with rm140.sc now after using the modified script patch. There's a single reply from Rock Hard "Whatever". The name Rock Hard is replaced with cObj for some reason now. I find it odd because there's also 140.hep file among patches which has the name Rock Hard within. Also the rm140.sc has the following
Code: [Select]
(86
((ScriptID 1823 33) name: {Rock Hard})
(gLarryMessager say: 0 0 2 17 self)
)

How to avoid this and have the name Rock Hard displayed instead of cObj?
« Last Edit: February 10, 2025, 05:55:26 AM by miracle.flame »

Offline Kawa

Re: LSL6 dark intro scenes with narration and no visible text
« Reply #6 on: February 10, 2025, 05:59:38 AM »
The Game class needs a game-specific implementation, right? And that's LSL6, script 0 export 0. That's where saved games get their filenames from and all that.

That game also needs to be referred to in order to control it, so there's a global variable, usually the second (#1, starting at 0), and that needs a name. Variable names aren't stored in the compiled script data so a decompiler has to make a best guess. Now, you could just look for when that particular variable is first used and see how it's used. For example, it could be used as a pointer to a class or instance, so you name it after that class. And it's a global variable so you put a g in front.

A given decompiler may be smart enough to know that all SCI games from a certain period have a similar set of global variables and preset the start of the list to be gEgo, gGame, gCurRoom etc. If so, it'll already know to use gGame way before it's first used. If it didn't, it'd make a best guess and end up with gLSL6 or whatever script 0 export 0 is called.

Same with for example gEgo: if the game has multiple playable characters like LSL5, the first use of global 0 could be best-guessed as gLarry, and suddenly any scripts involving Patti as a playable character make no sense. Hence the hard-coded list.

Plus, there may not be a hard-coded list for that one particular period, so it already knows it's gGame for one set of games, but has to guess for another.

And on top of all that, the whole "put a g in front if it's a global" is not law, so Eric is perfectly within his rights to use theGame. After all, it's what the original code as written by the Sierra devs used!

So yeah, (gLSL6 hideControls:), (theGame hideControls:), (gGame hideControls:), and (global1 hideControls:) are all doing the exact same thing, just with a different name. That's what you get when you mix and match different decompilations. Wack, isn't it?

Offline doomlazer

Re: LSL6 dark intro scenes with narration and no visible text
« Reply #7 on: February 10, 2025, 09:46:55 AM »
I find it odd because there's also 140.hep file among patches which has the name Rock Hard within. Also the rm140.sc has the following
Code: [Select]
(86
((ScriptID 1823 33) name: {Rock Hard})
(gLarryMessager say: 0 0 2 17 self)
)

How to avoid this and have the name Rock Hard displayed instead of cObj?

If you change a string (ie anything inside "" or {}) or add new object/classe in a script, then you should also export a new 140.hep after recompling. If you don't see a heaps tab in SCICompanion, make sure the app width is wide enough to show the  hidden tabs.

Offline miracle.flame

Re: LSL6 dark intro scenes with narration and no visible text
« Reply #8 on: February 10, 2025, 11:58:12 AM »
Thank you for valuable inputs.
Doomlazer, new export of 140.hep helped.

Still one haunting detail though. I have to stick with the modified resource.000 and resource.map after recompilation otherwise the game would crash with the attached. I have also modified the button sizes of n098.sc to better fit the localization and that doesn't seem to cause any troubles if loaded as patch with vanilla resource files.

I've found the solution of hex editing 38 5D to 33 07 as most elegant so I'll stick with that for 140.scr but for any future cases I believe it is desired to supply patches without resource files, right? What am I missing still when creating those scr patches? Or is this 140.scr specific that it needs some additional scr exports to work with?

Offline doomlazer

Re: LSL6 dark intro scenes with narration and no visible text
« Reply #9 on: February 10, 2025, 05:32:02 PM »
Sounds like you're having problems creating any working patches with this game, right? I know I ported the debugger script into this version so it must be possible to compile working patches. I'll do some testing when I get home.

Edit: I think it has to do with Kernel command defines being incorrect in SCICompanion for the hi-res version, but I really don't know. I could get some scripts compiling, but a lot of them crash in dosbox.

If you can get everything you need working in the resource.000 file, a diff patch installer is a viable option. I believe Collector has templates for that.
« Last Edit: February 11, 2025, 12:23:12 AM by doomlazer »

Offline doomlazer

Re: LSL6 dark intro scenes with narration and no visible text
« Reply #10 on: February 11, 2025, 10:25:01 AM »
Someone reminded me to mention that earlier I mistakenly linked to the wrong sci-scripts version initially.

This version is for the standard CD lsl6, not the lsl6SVGA (Hi-Res) version: https://github.com/sluicebox/sci-scripts/tree/main/lsl6-cd-dos-1.000.000

For the hi-res version you should be using: https://github.com/sluicebox/sci-scripts/tree/main/lsl6-hires-dos-1.000.000

I still had issues with DOSBox crashes compiling the hi-res code, but you should be using the correct version to start with at least. Also, I'm told some interpreter versions, like kq7, require a .hep patch to be exported along with a .src patch even if there are no changes to the heap, so for this game I'd always export both .scr and .hep together.

Maybe that will reduce the dosbox crashes, but I haven't had time to test this morning.

Offline miracle.flame

Re: LSL6 dark intro scenes with narration and no visible text
« Reply #11 on: February 11, 2025, 02:39:02 PM »
Note that when I mentioned "I have also modified the button sizes of n098.sc to better fit the localization and that doesn't seem to cause any troubles if loaded as patch with vanilla resource files" I didn't use sluicebox's scripts - it was exported patch of SCIC decomiplation modified and recompiled. The same for rm140.sc but this one crashed.

Since I've managed to fix it via hex edit and the testing of this scene is annoyingly long I won't be testing sluicebox's compilation of rm140.sc

If sluicebox considers implementing this as official bug fix for ScummVM the code logic might be pseudo
Code: [Select]
if Subtitles not enabled:
    (gGame hideControls:)
in both 130 and 140.

Offline doomlazer

Re: LSL6 dark intro scenes with narration and no visible text
« Reply #12 on: February 11, 2025, 09:55:42 PM »
When it comes down to it, you can use either the SCICompanion decompiler, Eric's repo or Sluice's repo. All three have their strengths and weaknesses. It's understanding how and why they differ, as Kawa explained above, that's important. Using all three together can be really helpful when working on a problem.

If sluicebox considers implementing this as official bug fix for ScummVM the code logic might be pseudo
Code: [Select]
if Subtitles not enabled:
    (gGame hideControls:)
in both 130 and 140.

I like this idea as an accessibility feature, it should always be shown when text is on.
« Last Edit: February 14, 2025, 07:53:08 AM by doomlazer »

Offline miracle.flame

Re: LSL6 dark intro scenes with narration and no visible text
« Reply #13 on: February 14, 2025, 03:04:23 AM »
If sluice's going to implement this, there is another such instance at the end of the game at
https://github.com/sluicebox/sci-scripts/blob/5ce19d3be606f2f9a758f54144904d201bc4a8e9/lsl6-hires-dos-1.000.000/src/rm720.sc#L649

The line (gGame hideControls:) should be moved on line 673 right after Shamara says her lines and before the end game scene starts. Tested nicely.

BTW for anymore curious this is the page of LSL6 Czech localization with some screenshots and video demo.
https://lokalizace.net/cestina-do/leisure-suit-larry-6-shape-up-or-slip-out
Files coming this weekend.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.059 seconds with 23 queries.