Opened 6 years ago

Closed 6 years ago

#10731 closed defect (fixed)

QFG4: Castle barrel room door, hero returns when exiting

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

Description

On this version of ScummVM:
ScummVM 2.1.0git (Sep 9 2018 17:36:39)
Features compiled in: Vorbis FLAC MP3 ALSA SEQ TiMidity RGB zLib MPEG2 FluidSynth Theora AAC FreeType2 JPEG PNG

Stumbled upon what looks like a pathfinding/position bug in Castle Borgov, when coming back from the bedroom with the wraith, and trying to get back to the main hall. You can pick the lock (playing as a Thief) on the door and leave, but for some reason the Hero will return to the previous room immediately.

I suspect it's a problem of position evaluation for leaving the room made before the Hero has had the time to move away from the edge of the screen.

Strange thing is, it did not happen with my Paladin run.

Attachments (5)

qfg4-cd.012 (76.5 KB ) - added by darksoul42 6 years ago.
Pick lock on the door on the right, but the Hero goes back in the previous room right away
sci.092 (68.2 KB ) - added by Vhati 6 years ago.
SavedGame (Floppy) - Castle barrel room
sci.055 (77.8 KB ) - added by Vhati 6 years ago.
SavedGame (CD) - Castle barrel room
Polygon - Room 630 doorMat.png (54.9 KB ) - added by Vhati 6 years ago.
Polygon - Room 630 doorMat
Polygon (Fixed) - Room 630 doorMat.png (54.8 KB ) - added by Vhati 6 years ago.
Polygon (Fixed) - Room 630 doorMat

Download all attachments as: .zip

Change History (19)

by darksoul42, 6 years ago

Attachment: qfg4-cd.012 added

Pick lock on the door on the right, but the Hero goes back in the previous room right away

comment:1 by darksoul42, 6 years ago

I actually retried with my machine being under high CPU load, and managed to leave the room... It might be a timing issue. (Come to think of it, I recall some other bugs like the ones with the wraiths not triggering, or not releasing the Hero after dying also trigger somewhat randomly)

comment:2 by Vhati, 6 years ago

The CD edition's original interpreter also does this.

Occurs in the floppy edition under ScummVM, and its original interpreter, too.

After emerging back into the barrel room, the door sound plays an extra time. This happened reliably when I had my speed slider set high.

Workaround: Lowering the speed slider let me reach the Great Hall.


ScummVM 2.1.0git3797-ge7d23d2cd9 (Oct 25 2018 04:17:12)
Windows 7 64bit
QFG4 Floppy 1.1a + note patch (English)

File - 5kb MD5 - Full MD5
RESOURCE.000 - f64fd6aa3977939a86ff30783dd677e1 - ff42260a665995a85aeb277ad80aac8a
RESOURCE.MAP - d10a4cc177d2091d744e2ad8c049b0ae - 3695b1b0a1d15f3d324ea9f0cc325245
RESOURCE.SFX - 3cf95e09dab8b11d675e0537e18b499a - 7c858d7253f86dab4cc6066013c5ecec

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

by Vhati, 6 years ago

Attachment: sci.092 added

SavedGame (Floppy) - Castle barrel room

comment:3 by Vhati, 6 years ago

Keywords: SCI32 original added; sci32 removed
Summary: QFG4: Pathfinding bug in Borgov CastleQFG4: Timing bug in Borgov Castle barrel room

comment:4 by Vhati, 6 years ago

Summary: QFG4: Timing bug in Borgov Castle barrel roomQFG4: Castle barrel room door, hero returns after exiting

comment:5 by Vhati, 6 years ago

Summary: QFG4: Castle barrel room door, hero returns after exitingQFG4: Castle barrel room door, hero returns when exiting

comment:6 by Vhati, 6 years ago

There's a doorMat that triggers sLeaveWest immediately upon entering the great hall.
doorMats (script 49) stay dormant when the room (global2) has its script property set.

One would expect sEnterTheRoom to preempt the doorMat until it finishes all its states and disposes itself, by which point the hero will have moved past the doorMat's region.

But rm630::init() calls setScript(sEnterTheRoom), not on itself, but on hero.

Now I'm wondering what mechanism stops this bug happening all the time.

comment:7 by Vhati, 6 years ago

Pull Request: SCI32: Fix QFG4 great hall entry from barrel room

comment:8 by digitall, 6 years ago

Keywords: has-pull-request added

comment:9 by sluicebox, 6 years ago

This save game was made using NRS unofficial patches which are unsupported and may even be the cause of the bug on ScummVM. Even if it's not, the save game can't be loaded on ScummVM using the normal game files, it crashes.

Can this bug be reproduced ScummVM against clean game files? If so, can a save be uploaded so I can test?

Version 0, edited 6 years ago by sluicebox (next)

comment:10 by Vhati, 6 years ago

@sluicebox:

NRS unofficial patches which are unsupported

Comment: bluegr on report 10711

solution is to fix the issues in the NRS patch in ScummVM, like with the other games where we fixed them in a similar fashion.

by Vhati, 6 years ago

Attachment: sci.055 added

SavedGame (CD) - Castle barrel room

comment:11 by bluegr, 6 years ago

@Vhati: to be more explicit, we had issues with some of the NRS patches in the past, because the issues they solve are patched with hacks, which have caused other bugs to appear. Also, people have applied the patches in different (e.g. non-English) versions, which are incompatible.
Also, the way that scripts are patched changes their offsets, making the saved games created with them incompatible with the original.

Hence, we are trying to patch the issues fixed in the NRS patches ourselves, where posdible, and blacklist them.

comment:12 by Vhati, 6 years ago

@bluegr:
I see. Thank you.

comment:13 by sluicebox, 6 years ago

@Vhati Thanks for the upload, I can reproduce now

by Vhati, 6 years ago

Polygon - Room 630 doorMat

by Vhati, 6 years ago

Polygon (Fixed) - Room 630 doorMat

comment:14 by bluegr, 6 years ago

Owner: set to bluegr
Resolution: fixed
Status: newclosed

Thanks for your work! The pull request has been merged, so this can be closed now

Note: See TracTickets for help on using tickets.