Opened 6 years ago

Closed 6 years ago

Last modified 10 months ago

#10849 closed defect (fixed)

SCI: QFG4CD: Wrong message audio for Rusalka/flowers

Reported by: sluicebox Owned by: bluegr
Priority: normal Component: Engine: SCI
Version: Keywords: SCI32 original has-pull-request
Cc: Game: Quest for Glory 4

Description

SCI: QFG4CD: Wrong message audio for Rusalka/flowers

In the CD version of QFG4 they messed up the messages for giving the Rusalka flowers in room 520.

Floppy messages, first time:

  1. You give the Rusalka some of the lovely flowers.
  2. "Thank you for the beautiful flowers. No one has been so nice to me since I can remember."
  3. "I guess I shouldn't try to drown you now, since you've been so kind."

Floppy messages, subsequent times:

  1. You give the Rusalka some of the lovely flowers.
  2. "Thank you. That's really very sweet. You are the kindest man I know."

In CD they removed all but the last message from each sequence, but assigned the first one audio for a removed message. The correct audio exists with its original tuple from floppy and never plays. A copy of the final message also exists with its original tuple.

CD message, first time:

Audio: "Thank you for the beautiful flowers. No one has been so nice to me since I can remember."
Text: "I guess I shouldn't try to drown you now, since you've been so kind."

CD message, subsequent times:

Text/Audio: "Thank you. That's really very sweet. You are the kindest man I know."


I suspect they didn't mean to delete any of her lines, possibly not even the first, since offering her candy has the same message structure and they kept that.

I don't know what we should do about this. Right now you get audio and text that don't match but you're at least kind of getting both messages. Just changing this to play the correct audio for the text means losing the only version of the other message, since there's no text for it in the game. Is there precedent in ScummVM for just adding missing message text when the audio is already there? (it could play both of her lines that way)

Attached is a save from CD version at the lake with flowers.

This bug was found by OrphanHunter5000.exe

Attachments (1)

qfg4-cd.002 (44.5 KB ) - added by sluicebox 6 years ago.

Download all attachments as: .zip

Change History (10)

by sluicebox, 6 years ago

Attachment: qfg4-cd.002 added

comment:1 by Vhati, 6 years ago

@sluicebox:

This bug was found by OrphanHunter5000.exe

What is that?


Is there precedent in ScummVM for just adding missing message text

Adding text would mean adding text for each language. Luckily QFG4 CD is only English.

EDIT: Never mind filtering through internationalization. A game's text shouldn't be dependent on the locale ScummVM uses. Still, all released languages should be provided and decided by the detected edition - in ScummVM's source code, I guess.


I haven't dealt with message.cpp. I imagine tuples could be intercepted to return a string *as if* it had been looked up.


Source: message.cpp - MessageState::getRecord()

// Fill in known missing message tuples
if (g_sci->getGameId() == GID_SQ4 && stack.getModule() == 16 &&
	t.noun == 7 && t.verb == 0 && t.cond == 3 && t.seq == 1) {
	// This fixes the error message shown when speech and subtitles are
	// enabled simultaneously in SQ4 - the (very) long dialog when Roger
	// is talking with the aliens is missing - bug #3538416.
	record.tuple = t;
	record.refTuple = MessageTuple();
	record.talker = 7;	// Roger
	// The missing text is just too big to fit in one speech bubble, and
	// if it's added here manually and drawn on screen, it's painted over
	// the entrance in the back where the Sequel Police enters, so it
	// looks very ugly. Perhaps this is why this particular text is missing,
	// as the text shown in this screen is very short (one-liners).
	// Just output an empty string here instead of showing an error.
	record.string = "";
	record.length = 0;
	delete reader;
	return true;
}

record.string = "";


Elsewhere, m-kiewitz said:

We could - in theory - patch the message resource in some way.

I poked around a little, trying to find raw message bytes with the script patcher to do word substitution. Unsuccessful.

Either I guessed my signatures incorrectly, or the patcher would need modification to see messages. I couldn't find bytes in a View's cel either. The patcher can definitely see scripts and heaps.

Last edited 6 years ago by Vhati (previous) (diff)

comment:2 by Vhati, 6 years ago

I fixed #10770 by making getRecord() substitute a hardcoded string. :D

Pull request there includes language detection and an escaped non-ascii character.


record.length is a straightforward character count (without a +1 for null). A small value doesn't truncate but good to fill in nonetheless.

Source: message.cpp - MessageReaderV4::findRecord()

const uint32 maxSize = _data.size() - stringOffset;
record.string = (const char *)_data.getUnsafeDataAt(stringOffset, maxSize);
record.length = Common::strnlen(record.string, maxSize);

Source: str.cpp - strnlen()

comment:3 by m-kiewitz, 6 years ago

The messages are stored in separate resources.
Using the script patcher on those would not really make sense.

comment:4 by Vhati, 6 years ago

Pull Request: SCI32: Fix QFG4 Rusalka flowers dialogue

Last edited 6 years ago by Vhati (previous) (diff)

comment:5 by Vhati, 6 years ago

Keywords: Sci32 has-pull-request added

comment:6 by Vhati, 6 years ago

Keywords: SCI32 added; Sci32 removed

comment:7 by Filippos Karapetis <bluegr@…>, 6 years ago

In 2d75c6b:

SCI32: Fix QFG4 Rusalka flowers dialogue

Fixes mixed up text/audio when giving her flowers, bug #10849

comment:8 by Vhati, 6 years ago

Owner: set to bluegr
Resolution: fixed
Status: newclosed

comment:9 by ArthurWalden, 10 months ago

If this bug was fixed in previous versions of ScummVM, it seems to have been reintroduced in 2.8.0. I click the flowers on the Rusalka and the game displays the following:
Narrative text: Thank you for the beautiful flowers. No one has been so kind to me as long as I can remember.
Then:
Rusalka dialogue text: You give the Rusalka some of the lovely flowers.
Rusalka audio: I guess I shouldn't try to drown you now that you've been so kind.
Then:
Last Rusalka audio line repeats as text and audio.

Note: See TracTickets for help on using tickets.