Author Topic: Can you cancel a nonsensical skip in QFG3?  (Read 3093 times)

0 Members and 1 Guest are viewing this topic.

Offline lwc

Can you cancel a nonsensical skip in QFG3?
« on: September 25, 2023, 03:43:12 PM »
It always bothered me Quest for Glory 3 skips to Manu the monkey's second encounter if there wasn't a first encounter before the conference. There were 4 SCI games in that series and I don't remember any similar avoidable skip, especially as the character acts like it already met you. I mean, all the game had to do was patiently wait until the user went to the Lost City's overhead map and meet Manu for the first time. In fact, the game does exactly that in another event (Thieves have to randomly go there in order for a prisoner to appear in the Simbai village).

In fact I've even tried to fix it myself by taking the original conditions of:
  • Crossing from room 160 (Savannah panorama) to 170 (Jungle panorama)
  • After having Flag 43 (After Conference) set
And adding to them:
3. Having Flag 109 (Manu Released) set.

But this of course means you'll have to meet Manu at room 180 (Lost City panorama) and then go back to room 170 (Jungle panorama), which the game never anticipated. This means you'll re-meet Johari (treated like her final encounter) while browsing the Jungle itself (170 will make you enter random Jungle room 700).

Is there any way to avoid this?

A SCI diff file of what I've tried + a ScummVM savegame (before meeting Manu for the second time without the first time) are available at https://bugs.scummvm.org/ticket/11432

If you manage to make it work, please consider also converting it to ScummVM so all future players will enjoy it.
« Last Edit: December 04, 2023, 04:45:23 PM by lwc »



Offline lwc

Re: Can you cancel a nonsensical skip in QFG3?
« Reply #1 on: December 03, 2023, 03:13:49 PM »
Will it help if I give you a savegame from the original interpreter instead of ScummVM? Just load it and head right and you'll meet Manu who will know you even though you didn't release it yet.

Offline Collector

Re: Can you cancel a nonsensical skip in QFG3?
« Reply #2 on: December 04, 2023, 10:42:04 AM »
What game version are these from? Remember that savegames are version specific and will usually fail to load for other versions. You can check the VERSION file to see.
KQII Remake Pic

Offline lwc

Re: Can you cancel a nonsensical skip in QFG3?
« Reply #3 on: December 04, 2023, 11:18:28 AM »
1.1

Offline doomlazer

Re: Can you cancel a nonsensical skip in QFG3?
« Reply #4 on: December 04, 2023, 12:37:10 PM »
Reading your ScummVM bug report, it seems you've already produced working patch files for this except it introduces an issue with Johari. Sounds like you just need to find Johari's appearance code and add a check against Manu. Is this where you're stuck?

You've already solved 80% of the problem, so it's confusing as to why you're having trouble with the Johari check. Or is the problem converting your patch fix into a SVM fix?

Offline lwc

Re: Can you cancel a nonsensical skip in QFG3?
« Reply #5 on: December 04, 2023, 01:33:32 PM »
It's like the "80% of all outcomes are derived from 20% of causes" rule was made for this case.
Everything I've tried with Johari didn't work, I just keep re-meeting her while she's supposed to be long gone.

Once this is solved, then the conversion will need to be dealt with...maybe if I put a working SCI code in the bug report someone there will be kind enough to convert it.
« Last Edit: December 04, 2023, 01:35:05 PM by lwc »

Offline doomlazer

Re: Can you cancel a nonsensical skip in QFG3?
« Reply #6 on: December 04, 2023, 03:07:06 PM »
I see that QfG3 v1.1 comes with an existing patch for 700.scr and 700.hep. Is it possible you weren't overwriting these patches when testing your changes to script 700? That's happened to me, where I wasn't seeing changes to a recompiled script because it's still using the old patch files in the game folder.

After a quick 'find in files' search, it looks like script 700 line 619 is where a lot of the Johari encounter stuff get's kicked off.

Code: [Select]
(self setScript: (ScriptID 702 1))
Was that near were you were looking? I could be way off though as I've never played QfG3 and the code is a mess to sift through blind.

Offline lwc

Re: Can you cancel a nonsensical skip in QFG3?
« Reply #7 on: December 04, 2023, 04:50:00 PM »
I've rephrased my OP - 700 is just where 170 takes you. It's 170 that I must assume needs handling. If 170 is handled, 700 shouldn't even take place. 170 should know you already met Johari and thus not redirect you to her again at 700.

Offline doomlazer

Re: Can you cancel a nonsensical skip in QFG3?
« Reply #8 on: December 04, 2023, 06:17:25 PM »
170 should know you already met Johari and thus not redirect you to her again at 700.

This is mostly a guess, but maybe changing script 170 line 514 to:

Code: [Select]
(if
      (and
            (Btst fAfterConference)
            (not (Btst fMetJohariInJungle))
      )
      ...
)

edit: hmm... that might get set too early. If so, consider setting your own flag when you know Johari shouldn't be seen again. fBeatGargoyle ;342 is the last flag listed in game.sh, so (Bset 343) should be unused. Then test for it in script 170 line 514.
« Last Edit: December 04, 2023, 10:30:51 PM by doomlazer »

Offline Collector

Re: Can you cancel a nonsensical skip in QFG3?
« Reply #9 on: December 05, 2023, 10:56:44 AM »
If there was an existing official patch and you have a PATCHES subdirectory then you could have two copies in the game, your patch and the official patch. The game will only recognize patch files in PATCHES if it is specified in the RESOURCE.CFG. I believe that what is in the base directory of the game  might be used first.
KQII Remake Pic

Offline lwc

Re: Can you cancel a nonsensical skip in QFG3?
« Reply #10 on: December 05, 2023, 11:17:11 AM »
v1.1 has no PATCHES subfolder and there are no 170 files. It's 170 that needs changing to stop taking the hero to 700.

Offline Daventry


Offline lwc

Re: Can you cancel a nonsensical skip in QFG3?
« Reply #12 on: December 06, 2023, 05:40:19 PM »
What about it?
  • It's closed source, meaning the actual code is unknown (which might be permitted but in my eyes kind of breaks GitHub's spirit).
  • The only related patch there seems to be "170: Fixed a script error where the player was not being forced into the encounter with Manu after the conference" while the request here is asking the exact opposite.
« Last Edit: December 06, 2023, 05:53:02 PM by lwc »

Offline Collector

Re: Can you cancel a nonsensical skip in QFG3?
« Reply #13 on: December 07, 2023, 11:32:42 AM »
v1.1 has no PATCHES subfolder and there are no 170 files. It's 170 that needs changing to stop taking the hero to 700.

Doesn't matter. Any given copy of the same version may have the PATCHES directory or not. The interpreter recognizes the patchDir token and will look in a directory for any patches if specified in the RESOURCE.CFG. This can be done by the installer or after the fact by the user. It was just something to check for in your installed copy to make sure the game was not dealing with multiple copies of the patch file. If yours does not have any subdirectories or if your RESOURCE.CFG does not have that token set, nor any copy of it is in the base directory then it will use the one in the RESOURCE.000 file. If so you can ignore this possibility.
KQII Remake Pic


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.086 seconds with 23 queries.