Community

SCI Programming => SCI Development Tools => Topic started by: edenwaith on October 09, 2021, 10:23:23 PM

Title: How to extract SCR and HEP files?
Post by: edenwaith on October 09, 2021, 10:23:23 PM
I was reading about the debug mode for Quest For Glory 4 here (https://tcrf.net/Quest_for_Glory:_Shadows_of_Darkness#cite_note-1) and it mentions to implement that mode, one needs to extract the files 18.scr and 18.hep from the floppy disk version of the game.  How do I go about doing this?  The footnote mentions using SCI Resource Viewer.  I was able to use that tool to open up the SHADOWS folder and it shows the already listed scripts, heaps, sounds, and maps, but I'm not seeing anything immediately that indicates how I can extract the "18" script and heap from the game.  Is there a specific file I should be opening instead of the entire folder?
Title: Re: How to extract SCR and HEP files?
Post by: Kawa on October 10, 2021, 03:47:25 AM
In the SCI Resource Viewer, open QFG4 and expand the Script folder. Select 18.scr, click File, Extract. Save as 18.scr, the default. Now do the same with 18.hep in the Heap folder.



Unnecessary explanation of why you need to extract those files, feel free to ignore: another script in the game checks for the presence of the file 18.scr and enables access to the debugger if it's there. The debugger itself is script #18, already there in the game but inaccessible. Technically you only need to extract the script, not the heap.
Title: Re: How to extract SCR and HEP files?
Post by: lskovlun on October 10, 2021, 07:02:56 AM
Technically you only need to extract the script, not the heap.
in this case. Not a good habit to get into.
Title: Re: How to extract SCR and HEP files?
Post by: Kawa on October 10, 2021, 09:04:30 AM
Technically you only need to extract the script, not the heap.
in this case. Not a good habit to get into.
I mean, that's the only thing the game checks for. So in this particular case, it's safe. But you're right, it isn't a good habit.
Title: Re: How to extract SCR and HEP files?
Post by: edenwaith on October 10, 2021, 11:39:44 AM
When I use SCI Resource Viewer, the only scripts or heaps it shows are the ones which are already in the SHADOWS directory, so I don't see a bunch of the other scripts.  (shrug) When I use the program, I opened up the SHADOWS folder.

In the SCI Resource Viewer, open QFG4 and expand the Script folder. Select 18.scr, click File, Extract. Save as 18.scr, the default. Now do the same with 18.hep in the Heap folder.



Unnecessary explanation of why you need to extract those files, feel free to ignore: another script in the game checks for the presence of the file 18.scr and enables access to the debugger if it's there. The debugger itself is script #18, already there in the game but inaccessible. Technically you only need to extract the script, not the heap.
Title: Re: How to extract SCR and HEP files?
Post by: doomlazer on October 10, 2021, 01:06:39 PM
Untested, but it's just checking for the presence of 18.scr. Try putting any random file renamed that in the game folder.
Using an empty file does NOT work.
Title: Re: How to extract SCR and HEP files?
Post by: EricOakford on October 10, 2021, 01:14:01 PM
Untested, but it's just checking for the presence of 18.scr. Try putting any random file renamed that in the game folder.

That wouldn't be a good idea, since SCI's first priority for resources is external files, then the resource package. This would just confuse the interpreter.
Title: Re: How to extract SCR and HEP files?
Post by: doomlazer on October 10, 2021, 01:16:28 PM
Untested, but it's just checking for the presence of 18.scr. Try putting any random file renamed that in the game folder.

That wouldn't be a good idea, since SCI's first priority for resources is external files, then the resource package. This would just confuse the interpreter.

Ah, right. It will try to load it as a patch file. Does the interpreter check if the patch is valid before using them? Maybe it would just ignore the dummy 18.src, but you're right, it's best to extract the actual file.
Title: Re: How to extract SCR and HEP files?
Post by: doomlazer on October 10, 2021, 01:26:17 PM
When I use SCI Resource Viewer, the only scripts or heaps it shows are the ones which are already in the SHADOWS directory, so I don't see a bunch of the other scripts.  (shrug) When I use the program, I opened up the SHADOWS folder.

You might not have the correct version. In the pictures below I was able to extract 18.scr from the steam collection with SCIViewer. I don't have a SHADOWS folder, I'm opening the main game folder (QG4) and seeing the 18.scr script.

edit: steam version is QfG4 v1.0
Title: Re: How to extract SCR and HEP files?
Post by: Collector on October 10, 2021, 07:56:46 PM
Yes, just point SV to the game's directory and it will show all versions of the resources, both in the vol file and external resources.

http://sciwiki.sierrahelp.com//index.php?title=Sierra_Resource_Viewer

Note that the unversioned one is the latest
Title: Re: How to extract SCR and HEP files?
Post by: edenwaith on October 10, 2021, 11:16:32 PM
I ended up pointing SCI Resource Viewer to the CD version of QFG4 and was able to extract the files I was looking for.  Odd how it doesn't seem to show everything with the floppy disk version of the game (which is saved into a folder called SHADOWS).
Title: Re: How to extract SCR and HEP files?
Post by: Collector on October 11, 2021, 09:07:34 AM
It doesn't matter what the directory is named. SV just looks for the map file and any loose patch files in the directory you point it at. Not sure if it reads the RESOURCE.CFG for paths or just scans all subdirectories.