Opened 6 years ago

Closed 6 years ago

#10871 closed defect (fixed)

QFG4: After geas, Hero can walk through the closed castle gate

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

Description

Towards the end of the game, after being captured by Ad Avis, and released by Katrina under geas to find the rituals, she teleports you outside of the castle gates. However, the Hero can walk straight through. I recall this being the same in the original, though now when I enter the castle it acts as though I'm a fighter/Paladin that has forced the gate and is breaking in to the castle via the front door. In the original, Katrina & Ad Avis would be waiting over the portcullis as expected.

One solution may be to prevent the Hero from walking through the gate; force an exit-entry (this also works to fix Katrina & Ad Avis peering over you).

Attachments (1)

qfg4-cd-gog.021 (95.7 KB ) - added by tomasz89 6 years ago.

Download all attachments as: .zip

Change History (8)

by tomasz89, 6 years ago

Attachment: qfg4-cd-gog.021 added

comment:1 by Vhati, 6 years ago

I can reproduce this in both the CD and floppy editions under ScummVM and their original interpreters - including the absent Ad and Kat at the castle entrance.


QFG4 CD (English)

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

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:2 by Vhati, 6 years ago

There's an inconsistency between two IF blocks' conditions.

One decides whether the gate is open. (Dungeon is not mentioned)
One decides whether polygon to use the polygon with a path to the castle. (Dungeon is mentioned)


script 600 - rm600::init()

# local0 decides the situation.
(= local0
	(cond
# ...

		# 670 Dungeon
		((== g12_myPrevRoomNum 670)
			11
		)
		(
			(and
				# 552 Forest 1S from the gate
				# 670 Dungeon (can't happen)
				(proc64999_5 g12_myPrevRoomNum 552 670)
				# Geas'd.
				(proc0_4 110)
				# Have all the scrolls or completed the rituals.
				(or (g0_hero has: 52) (proc0_4 323))
				(or (g0_hero has: 53) (proc0_4 324))
				(or (g0_hero has: 55) (proc0_4 325))
				(or (g0_hero has: 56) (proc0_4 326))
				(or (g0_hero has: 54) (proc0_4 327))
			)
			10
			# This situation would set flag 101, which is needed
			#   for Ad and Kat to appear at the castle entrance.
		)
# ...
	)
)

# ...

(if (or (proc64999_5 g12_myPrevRoomNum 810 610 630) (== local0 10))
	# 810 Combat
	# 610 Castle entrance
	# 630 Great hall

	# The gate is open.
	(aGate posn: -30 105 setPri: 163 init:)
else
	# The gate is closed.
	(aGate init: approachVerbs: 4)
	(cond 
		((== local0 10) (aGate posn: -30 105))  # !? This can never be true.
		((not (proc0_4 122))
			(if g121_myIsNight
				(gateTeller init: aGate 600 14 125 15)
			else
				(gateTeller init: aGate 600 14 125 13)
			)
		)
	)
)

(if (or (proc64999_5 g12_myPrevRoomNum 670 810 610 630) (== local0 10))
	# 670 Dungeon
	# 810 Combat
	# 610 Castle entrance
	# 630 Great hall

	# Add the polygon with a path to the castle.
	# ...
else
	# Add the impassable gate polygon.
	# ...
)



If hero was sent to the gate directly from the dungeon, they will be magic'd into view (in CD) or pop into existence (floppy), time of day will change, the gate will be closed... and passable, and the castle entrance will not have Ad and Kat.


If hero has been geas'd and has all the ritual scrolls... arriving at the gate from the forest leads to local0=10. Flag 101 will be set. The gate will be open and passable, and the castle entrance will have Ad and Kat. This is why leaving and returning works.

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

comment:3 by Vhati, 6 years ago

Quick and dirty way to reproduce...

  • Create a new character.
  • Spoof the current room number as if you were in the dungeon.
    • vv g 11 670
  • Set flag 110 (geas)
    • vv g 506 2
  • We could acquire all the scrolls now, but they won't be checked.
  • Teleport to the gate.
    • room 600
  • The gate will be closed yet passable. Ad and Kat won't be waiting at the castle entrance because flag 101 was not set.
  • Go south and return without the scrolls.
    • The gate will be closed and solid.
  • Go south.
  • Acquire the ritual scrolls.
    • send hero get 52
    • send hero get 53
    • send hero get 54
    • send hero get 55
    • send hero get 56
  • Go north to the gate.
    • The gate will be open and passable. Ad and Kat will be waiting.
Last edited 6 years ago by Vhati (previous) (diff)

comment:4 by Vhati, 6 years ago

Keywords: SCI32 original has-pull-request added
Summary: After geas, Hero can walk through castle gates and enter castle as though in "break-in" scenarioAfter geas, Hero can walk through the closed castle gate

Pull Request: SCI32: Fix QFG4 castle gate after geas

comment:5 by Vhati, 6 years ago

Summary: After geas, Hero can walk through the closed castle gateQFG4: After geas, Hero can walk through the closed castle gate

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

In 1d0ffca0:

SCI32: Fix QFG4 castle gate after geas (#1479)

Fixes hero being able to walk through the closed gate, bug #10871

comment:7 by bluegr, 6 years ago

Owner: set to bluegr
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.