Opened 6 years ago

Closed 6 years ago

#10604 closed defect (fixed)

ZVISION: ZGI: Unresponsive black screen in Jack's shop

Reported by: Kurufinwe21 Owned by: eriktorbjorn
Priority: normal Component: Engine: ZVision
Version: Keywords:
Cc: Game: Zork Grand Inquisitor

Description

ScummVM 2.1.0git2703-gf9489be3a9 (Jun 30 2018 09:24:02)
Windows 10, 64-bit, v. 1803
Zork Grand Inquisitor DVD version, English, from GOG (fresh download)

Early in the game, when breaking into Jack's shop after getting him arrested, when approaching the lantern, the screen goes black. The cursor changes to different icons when moving it, but everything is unresponsive. No error messages appear.

The bug was reported by a different user in the GOG forums, so the problem does not seem to affect only me.

Save game attached. Move forward to reproduce the bug.

Attachments (2)

zgi-win.001 (13.7 KB ) - added by Kurufinwe21 6 years ago.
Saved game
zgi-win.002 (13.9 KB ) - added by eriktorbjorn 6 years ago.
Savegame before the bug happens, to assist in testing of upcoming workaround

Download all attachments as: .zip

Change History (10)

by Kurufinwe21, 6 years ago

Attachment: zgi-win.001 added

Saved game

comment:1 by eriktorbjorn, 6 years ago

I could be wrong, but I think this is a script bug that happens if you are looking at the cigar box when Jack returns to examine the lantern closer.

There are three scenes to consider:

pp1f - The table with the lantern and the cigar box.
pp1g - The close-up of the cigar box.
pp1h - A "dummy" room that starts the cutscene where Jack is examining the latern.

The pp1f scene can move you to pp1h like this:

puzzle:10826 {	# pp1f_talk_start
    criteria {
        [10803] = 1	# pp1f_video_flag
    }
    results {
        action:assign(01001, 15)	# universe_sound_controller
        action:assign(10803, 0)	# pp1f_video_flag
    }
}

puzzle:10827 {	# pp1f_unleash_the_dm
    criteria {
        [10826] = 1	# pp1f_talk_start
        [01001] = 0	# universe_sound_controller
    }
    results {
        action:assign(10803, 0)	# pp1f_video_flag
        action:dissolve()
        action:change_location(p, p, 1h, 0)
    }
}

And pp1g can move you to pp1h like this:

puzzle:10836 {	# pp1g_times_up
    criteria {
        [10803] = 1	# pp1f_video_flag
        [00009] ! 5	# Inventory
    }
    results {
        action:dissolve()
        action:change_location(p, p, 1h, 0)
    }
    flags {
        once_per_inst
    }
}

And the cutscene plays like this i pp1h:

puzzle:19870 {	# pp1h_play_the_movie
    criteria {
    }
    results {
        action:crossfade(10262 01012 -1 0 55 0 1000)	# NULL
        action:stop(10262)	# p_radio_playing
        action:streamvideo(pp1em022.avi 0 0 639 343 0 0)
        action:assign(10250, 0)	# p_listen_to_the_music
        action:dissolve()
        action:change_location(p, e, 10, 721)
    }
}

Now, I'm a bit fuzzy on the script syntax, but I think what happens in the "normal" case is:

  1. The player enters scene pp1f. Puzzle 10826 gets triggered. (I assume [01001] controls the sound effect that's playing while Jack is rummaging around, or something like that.) As a result, [10826] is set to 1, and this puzzle is never run again.
  1. Puzzle 10827 is triggered. The player gets moved to pp1h. [10827] is set to 1, and never run again.
  1. In pp1h, puzzle 19870 is triggered, which starts the cutscene. [19870] gets set to 1, so the puzzle - and thus the cutscene - is never triggered again.

So the next time you enter the shop, you will not be taken to pp1h. You'll stay in pp1f, where you can pick up the lantern.

But if you're looking at the cigar box at the time...

  1. The player enters scene pp1f. Puzzle 10826 gets triggered. (I assume [01001] controls the sound effect that's playing while Jack is rummaging around, or something like that.) As a result, [10826] is set to 1, and this puzzle is never run again.
  1. The player looks at the cigar box, so he enters scene pp1g. Puzle 10836 triggers instead of 10827 . The player is moved to pp1g, [10836] is set to 1, and the puzzle is never run again.
  1. In pp1h, puzzle 19870 is triggered, which starts the cutscene. [19870] gets set to 1, so the puzzle - and thus the cutscene - is never triggered again.
  1. The next time the player enters pp1f, puzzle 10827 gets triggered and moves the player to pp1h, but this time the cutscene will not be triggered. That's probably where you get a black screen instead.

It seems to me like puzzle 10836 should also clear [10803]. It won't fix old savegames, but it's the fix that seems the most consistent with the rest of the scripts. So you can probably fix the invalid state by

  1. Pressing Ctrl+D to open the console
  2. (Optional) Type "statevalue 10803" and press Enter. You probably see the reply "[10803] = 1".
  3. Type "statevalue 10803 0" and press Enter.
  4. Type "exit" and press Enter.

before you walk forward in the attached savegame.

comment:2 by Kurufinwe21, 6 years ago

The workaround seems to have done the trick. Thanks a lot!

by eriktorbjorn, 6 years ago

Attachment: zgi-win.002 added

Savegame before the bug happens, to assist in testing of upcoming workaround

comment:3 by eriktorbjorn, 6 years ago

I've attached a second savegame to help in testing an upcoming workaround in ScummVM. To reproduce the bug from there:

  1. Use the lamp on Jack's door.
  2. While Jack is rummaging around, click on the cigar box and pick up a cigar. Do not return to the previous screen.
  3. Wait for Jack to return.
  4. Go to the Grand Inquisitor doll and light it on fire with the cigar. Hide in the barrel.
  5. Return to Jack's shop. Walk to the table.

At this point, you should see a black screen. If you didn't do step 2, or if you returned to the previous screen after picking up the cigar, you shouldn't see any bug.

comment:4 by eriktorbjorn, 6 years ago

There seems to be another bug which may also have been mentioned on GOG. If I set the doll on fire, and then bring up the inventory before I hear anyone yell "Fire! Fire!", I can't leave the room with the doll. The guards never appear.

comment:5 by eriktorbjorn, 6 years ago

Here are the scripts from the CD version.

The pp1f scene plays the cutscene itself:

puzzle:10826 {	# pp1f_talk_start
    criteria {
        [10803] = 1	# pp1f_video_flag
    }
    results {
        action:assign(01001, 15)	# universe_sound_controller
        action:assign(10803, 0)	# pp1f_video_flag
    }
}

puzzle:10827 {	# pp1f_unleash_the_dm
    criteria {
        [10826] = 1	# pp1f_talk_start
        [01001] = 0	# universe_sound_controller
    }
    results {
        action:assign(10803, 0)	# pp1f_video_flag
        action:crossfade(10262 01012 -1 0 55 0 1000)	# NULL
        action:stop(10262)	# p_radio_playing
        action:streamvideo(pp1em022.avi 0 0 639 343 0 0)
        action:assign(10250, 0)	# p_listen_to_the_music
        action:dissolve()
        action:change_location(p, e, 10, 721)
    }
}

The pp1g scene moves the player to pp1f, not pp1h:

puzzle:10836 {	# pp1g_times_up
    criteria {
        [10803] = 1	# pp1f_video_flag
        [00009] ! 5	# Inventory
    }
    results {
        action:dissolve()
        action:change_location(p, p, 1f, 0)
    }
    flags {
        once_per_inst
    }
}

There is no pp1h.

I need to think more about this after breakfast.

comment:6 by eriktorbjorn, 6 years ago

I've verified that the bug doesn't happen with my CD version, but I'm having some trouble figuring out if the bug was introduced with the DVD version or if it was introduced with the 1.2 CD patch.

comment:7 by eriktorbjorn, 6 years ago

My workaround [1] was accepted while I was on vacation so the bug should be fixed. As mentioned above, it won't help if you have a savegame where the bug has already been triggered, but it should prevent it from happening in the future.

[1] https://github.com/scummvm/scummvm/pull/1235

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

comment:8 by eriktorbjorn, 6 years ago

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