Opened 12 months ago

Last modified 11 months ago

#10821 new defect

Getting stuck after knocking at door (location 'qe1e') & after freeing Jack (location 'ej3x')

Reported by: RH16 Owned by:
Priority: normal Component: Engine: ZVision
Keywords: ZGI GOG getting_stuck Cc:
Game: Zork Grand Inquisitor

Description

Bought Zork Grand Inquisitor at GOG and while playing it I stumbled upon two bugs, seemingly scripting bugs.
The first one happened after time travelling as Lucy (or Brog or Griff) and knocking at the door at Port Foozle: Nothing happened and no way back or forth.
After some googling Ctrl+D came into play (very fine function!!)
And by additionally scrutinizing the script files I found my solution by setting the statevalue 1001 (universe_sound_controller) from 15 to 0 as it's one of the criteria for continuing. Seemingly puzzle 2462 left the universe_sound_conroller at 15.
The second bug happened after freeing Jack by combination 31AB.
This time my solution was to set statevalue 5208 (e_start_bg_music) to 0 and again statevalue 1001 (universe_sound_controller) to 0.

I've appended two save files for reproduction.

Regards,
Roland

Attachments (2)

saves.zip (43.3 KB ) - added by RH16 12 months ago.
zgi-win.038.gz (19.6 KB ) - added by eriktorbjorn 11 months ago.

Download all attachments as: .zip

Change History (10)

by RH16, 12 months ago

Attachment: saves.zip added

comment:1 by RH16, 12 months ago

Sorry mistyped that: solution statevalue 5208 to 1!!!

comment:2 by eriktorbjorn, 11 months ago

Oddly enough, both save games work for me, if I load them from the ScummVM launcher. Not if I start the game and load them afterwards.

Looking at the "universe" scripts, there are a lot of them that check "[00020] ! 1 # JustRestored". Maybe that's related somehow? (In both cases I can see that state value 20 is briefly set to 1 and then 0, but maybe things are happening in the wrong order in one of the cases?)

comment:3 by eriktorbjorn, 11 months ago

Also, when I load the savegames from the launcher I get background music. When I load them from within the game, I don't.

If I set statevalue 14000 to 3 after loading the savegames (from within the game), the music starts and the scenes work. I don't yet know the implications of that, or evern what that state value actually does, but it is documented in the "universe" script as as the "universe_sound_state".

comment:4 by eriktorbjorn, 11 months ago

If I load from the launcher, statevalue 14000 is 1, but gets set to 2 and then 3. If I load from within the game, it remains at 1. That's interesting, because as far as I can tell there's exactly one script that sets statevalue 14000 to 2, and that's puzzle:14051, "universe_sounds_all_faded":

puzzle:14051 {	# universe_sounds_all_faded
    criteria {
        [14027] = 1	# universe_fade_out_monastery
        [14029] = 1	# universe_fade_out_foozle
        [14031] = 1	# universe_fade_out_xroads
        [14033] = 1	# universe_fade_out_hades
        [14035] = 1	# universe_fade_out_dmlair
        [14039] = 1	# universe_fade_out_guetech
        [14041] = 1	# universe_fade_out_jailmesa
        [14043] = 1	# universe_fade_out_brog_quest
        [18236] = 1	# universe_fade_out_griff_quest_1
        [18238] = 1	# universe_fade_out_griff_quest_2
        [14047] = 1	# universe_fade_out_lucy_quest
    }
    results {
        action:assign(14051, 0)	# universe_sounds_all_faded
        action:assign(14027, 0)	# universe_fade_out_monastery
        action:assign(14029, 0)	# universe_fade_out_foozle
        action:assign(14031, 0)	# universe_fade_out_xroads
        action:assign(14033, 0)	# universe_fade_out_hades
        action:assign(14035, 0)	# universe_fade_out_dmlair
        action:assign(14039, 0)	# universe_fade_out_guetech
        action:assign(14041, 0)	# universe_fade_out_jailmesa
        action:assign(14043, 0)	# universe_fade_out_brog_quest
        action:assign(18236, 0)	# universe_fade_out_griff_quest_1
        action:assign(18238, 0)	# universe_fade_out_griff_quest_2
        action:assign(14047, 0)	# universe_fade_out_lucy_quest
        action:assign(14028, 0)	# universe_dont_fade_monastery
        action:assign(14030, 0)	# universe_dont_fade_foozle
        action:assign(14032, 0)	# universe_dont_fade_xroads
        action:assign(14034, 0)	# universe_dont_fade_hades
        action:assign(14036, 0)	# universe_dont_fade_dmlair
        action:assign(14040, 0)	# universe_dont_fade_guetech
        action:assign(14042, 0)	# universe_dont_fade_jailmesa
        action:assign(14044, 0)	# universe_dont_fade_brog_quest
        action:assign(18237, 0)	# universe_dont_fade_griff_quest_1
        action:assign(18239, 0)	# universe_dont_fade_griff_quest_2
        action:assign(14048, 0)	# universe_dont_fade_lucy_quest
        action:assign(14000, 2)	# universe_sound_state
    }
    flags {
        once_per_inst
    }
}

When loading from within the game, statevalues 18236 and 18238 are both 0. Setting them to 1 starts the background music, and the scenes work.

So what's supposed to set these statevalues? Actually, that's also the "universe" script. Still not sure what it means, but I guess something must have happened during the "Griff quest". And I still don't know why it works when loading the savegames from the launcher. Dumb luck?

by eriktorbjorn, 11 months ago

Attachment: zgi-win.038.gz added

comment:5 by eriktorbjorn, 11 months ago

I'm attaching an old savegame of mine. Cast Yastard on the rightmost totem in your inventory to get to the area. I can't reproduce the bug from there, so maybe it happened even earlier?

comment:6 by eriktorbjorn, 11 months ago

Slight clarification. State values 18236 and 18238 are 0 in the savegame. When loading from the launcher, they are briefly set to 1 (18236 is set first), and then back to 0 again.

When loading from within the game, they're 0 and don't change.

State value 18236 is set by this script:

puzzle:18237 {	# universe_dont_fade_griff_quest_1
    criteria {
        [14000] = 1	# universe_sound_state
        [18231] ! 1	# universe_griff_quest_1_sound_task
    }
    results {
        action:assign(18236, 1)	# universe_fade_out_griff_quest_1
    }
    flags {
        once_per_inst
    }
}

In the savegame, 14000 is 1 and 18231 is 2.

When loading from the launcher, these values are restored. Then puzzle 18237 is checked (twice, apparently?) and then (the second time) the puzzle criteria are met and the result is executed.

When loading from within the game, the puzzle is checked when the game starts (where it of course does not meet the criteria) but not after the game has been loaded.

Maybe there is more to this than a simple scripting error? If so, that's way over my head...

A final note for now: I still can't reproduce this with my old savegame. Even if I save at the door, when I load that something first sets state value 14000 to 1, and then puzzle 18237 is checked and passed.

comment:7 by eriktorbjorn, 11 months ago

A final, final note for now: In my savegame, state value 14000 is 0. The problematic savegame was apparently created while it was 1?

comment:8 by RH16, 11 months ago

That's all quite interesting, you suggest that a statevalue 14000 (completely other statevalue than those two changed by me) is the underlying cause?
Whatever, potentially unsolved problem is that it was somehow possible to get that bad statevalue into the savegame. I'm not aware of having done something extraordinary.
Maybe it's of interest, that having finished the game I did not have full points. So I've missed somewhere something.

Note: See TracTickets for help on using tickets.