Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#10832 closed defect (fixed)

QFG4: Castle rooms silence all doors when one is oiled

Reported by: Vhati Owned by: sluicebox
Priority: low Component: Engine: SCI
Version: Keywords: SCI32 original
Cc: Game: Quest for Glory 4

Description

ScummVM 2.1.0git3990-ge0307e9 (Dec 6, 2018 14:26:10)
Windows 7 64bit
QFG4 CD (English)

When a rogue hero picks the lock on a door in the castle, many room scripts use a cond block to decide whether the door squeaks, or should be silent having been oiled.

Problem: The rooms don't check whether that *specific* door was oiled (any oiled door in the room will count).

File - 5kb MD5 - Full MD5
RESOURCE.000 - 263dce4aa34c49d3ad29bec889007b1c - 1364ba69e3c0abb68cc0170650a56692
RESOURCE.AUD - c39521bffb1d8b19a57394866184a0ca - 71098b9e97e20c8941c0e4812d5f906f
RESOURCE.MAP - aba367f2102e81782d961b14fbe3d630 - 801a04cc6aa5d437681a2dd0b6545248
RESOURCE.SFX - 3cf95e09dab8b11d675e0537e18b499a - 7c858d7253f86dab4cc6066013c5ecec

Change History (8)

comment:1 by Vhati, 6 years ago

script 640 - sPickLock::changeState(1)

(cond 
	((proc0_4 221) (self cue:))
	((proc0_4 220) (self cue:))
	((proc0_4 219) (self cue:))
	(else
		(squeakSound play:)
		# The door hinges squeak in protest as you open the door.
		(g91_gloryMessager say: 1 4 3 1 0 640)
		(self cue:)
	)
)



script 642 - sPickLock::changeState(1)

(cond 
	((proc0_4 216) (self cue:))
	((proc0_4 217) (self cue:))
	((proc0_4 218) (self cue:))
	(else
		(squeakSound play:)
		(g91_gloryMessager say: 1 4 3 1 0 640)
		(self cue:)
	)
)



script 644 - sPickLock::changeState(1)

(cond 
	((proc0_4 210) (self cue:))
	((proc0_4 211) (self cue:))
	(else
		(squeakSound play:)
		(g91_gloryMessager say: 1 4 3 1 0 640)
		(self cue:)
	)
)



script 661 - sPickLock::changeState(1)

(cond 
	((proc0_4 224) (self cue:))
	((proc0_4 118) (self cue:))
	(else
		(squeakSound play:)
		(g91_gloryMessager say: 1 4 3 1 0 640)
		(self cue:)
	)
)



script 634 (for room 631) - sPickLock::changeState(1)

(cond 
	((and (== g11_myCurrentRoomNum 631) (proc0_4 209)) (self cue:))
	((and (== g11_myCurrentRoomNum 631) (proc0_4 210)) (self cue:))
	(else
		(squeakSound play:)
		(g91_gloryMessager say: 1 4 3 1 0 640)
		(self cue:)
	)
)
Last edited 6 years ago by Vhati (previous) (diff)

comment:2 by Vhati, 6 years ago

These rooms got it right.
Test the flag AND the nearest door.
Otherwise it must be the other door; test its flag.


script 662 - sPickLock::changeState(1)

(cond 
	((and (proc0_4 208) (< (g0_hero x?) 160)) (self cue:))
	((proc0_4 209) (self cue:))
	(else
		(squeakSound play:)
		(g91_gloryMessager say: 1 4 3 1 0 640)
		(self cue:)
	)
)



script 645 (for room 622, 623) - sPickLock::changeState(1)

(if (< (global0 x?) 160) (= local0 1))
(switch g11_myCurrentRoomNum
	(622
		(cond 
			((and (proc0_4 217) local0) (self cue:))
			((proc0_4 219) (self cue:))
			(else
				(g91_gloryMessager say: 1 4 3 1 0 640)
				(squeakSound play:)
				(self cue:)
			)
		)
	)
	(623
		(cond 
			((and (proc0_4 213) local0) (self cue:))
			((proc0_4 225) (self cue:))
			(else
				(g91_gloryMessager say: 1 4 3 1 0 640)
				(squeakSound play:)
				(self cue:)
			)
		)
	)
	(else 
		(g91_gloryMessager say: 1 4 3 1 0 640)
		(squeakSound play:)
		(self cue:)
	)
)

comment:3 by Vhati, 6 years ago

The floppy edition has the same cond blocks in all those scripts.


QFG4 Floppy 1.1a + note patch (English)

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

comment:4 by Vhati, 6 years ago

I looked at squeaks during entry...


script 660 (pink bed) - sComeOnIn::changeState(1)

(if (not (proc0_4 223)) (squeakSound play:))
(pDoor setCycle: End self)



script 661 (EXIT bookshelf) - sComeOnIn::changeState(1)

((< (g0_hero x?) 60)
	(if (not (proc0_4 224))
		(g91_gloryMessager say: 1 4 3 1 0 640)
		(squeakSound play:)
	)
	(pLeftDoor setCycle: End self)
)
(else
	(if (not (proc0_4 118))
		(g91_gloryMessager say: 1 4 3 1 0 640)
		(squeakSound play:)
	)
	(pRightDoor setCycle: End self)
)



script 662 (candle bookshelf) - sComeOnIn::changeState(1)

((< (g0_hero x?) 130)
	(if (not (proc0_4 208))
		(squeakSound play:)
		(g91_gloryMessager say: 1 4 3 1 0 640)
	)
	(pBackDoor setCycle: End self)
)
(else
	(if (not (proc0_4 209))
		(squeakSound play:)
		(g91_gloryMessager say: 1 4 3 1 0 640)
	)
	(pRightDoor setCycle: End self)
)



script 663 (crest bookshelf) - sComeOnIn::changeState(1)

(if (not (proc0_2 212)) (squeakSound play:))
(pDoor setCycle: End self)



Entry squeaks are redundant after leaving a room that squeaks on exit.
And a nuisance where the message pops up again.


script 630 (great hall) only squeaks when there's a cutscene.

No other castle rooms squeak during entry.


These entry squeaks are inconsistent and should be removed.

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

comment:5 by Vhati, 6 years ago

Hm. Stairways all share code that squeaks neither on entry nor exit.

  • EXIT bookshelf is adjacent to a doorless hallway. So that entry squeak's okay. The left door only has one side. On the right is the goon stairway.
  • The pink bed is by a stairway.
  • The crest bookshelf is by a stairway.
  • The candle bookshelf is by a stairway. And a regular room (631), which does squeak on exit.



That absolves most of the quoted code in my previous comment.
The only double squeak is from room 631, to the candle bookshelf room (662).

comment:6 by sluicebox <22204938+sluicebox@…>, 5 years ago

In ac0bae82:

SCI32: Fix QFG4 door oiling when picking locks

Fixes door bugs in six castle rooms, bug #10832

comment:7 by sluicebox, 5 years ago

Owner: set to sluicebox
Resolution: fixed
Status: newclosed

Wow that mistake really got propagated! The six sPickLocks are now fixed. Oiling one door in those rooms no longer causes lock picking to act as if all are oiled.

The rest just seems like normal game inconsistencies inconsistencies and not bugs.

comment:8 by sluicebox <22204938+sluicebox@…>, 5 years ago

In f4638bbf:

SCI32: Fix QFG4 door oiling when picking locks

Fixes door bugs in six castle rooms, bug #10832

Note: See TracTickets for help on using tickets.