Now as soon as I start the game in ScummVM, if I try to look at the first room (400)'s computer screen it crashes the game with [VM] Trying to instantiate class 72 by instantiating script 0x3a0 (928) failed! - other actions in that room do work - can you check why and is it a general issue?[/li][/list]
There is a problem decompiling that script; closer investigation reveals that script 928 needs a class in another file (script 929 containing the class MouthSync) which is missing. As for why it worked before, no idea.
Who knows what happened, but I redid main from scratch and now it works.
Wow! So many questions:
1. How did you do it so quickly after you wrote it'll be time consuming? If you borrowed it from the sequel then note it misses the sequel's Alt+J, Alt+S and Alt+W (which I guess is how you managed to fit the Shift+/ help in one screen)
It was time consuming, I spent several hours porting the script and it's not exactly the 'fun' kind of programming. It's pretty tedious work. Plus, there is everything that comes after - I've spent several more hours on the project this morning.
I did start with the script 98 from EQ2. I removed ALT+J, S & W because they didn't work in EQ2 and they aren't really that useful.
2. 0.scr is Main, and 800.scr (which also has 800.hep) is your brand new debugRm, but why did it also need 988.scr which is Ego?
988.scr is required to prevent the movement code from swallowing the mouse event. It's exactly the same thing from EQ2.
3. Will this work in the other versions of the game other than the CD one?
No, 0.scr would not be compatible with either of the floppy versions. I'm guessing some work would likely need to be done on script 800 to make it compatible as well.
4. Can you include the source code?
I've added the source code, but rm360 and the debugRm scripts are in SCICompanion's decompile format, not sluicebox's. The reason why is because both the SCICompanion and Sluice's decompile will not recompile without errors out of the box. It was just easier for me to work in the SCICompanion version.
Converting code between the two is another time consuming and very not-fun task, so I've provided a mix of the two in the SCR folder for now. Semantically the code is identical, just the names are different.
5. Now as soon as I start the game in ScummVM, if I try to look at the first room (400)'s computer screen it crashes the game with [VM] Trying to instantiate class 72 by instantiating script 0x3a0 (928) failed! - other actions in that room do work - can you check why and is it a general issue?
This should be resolved as mentioned above.
6. What do you mean about SQ3's QA? And are you sure it should be different from all other Sierra games that do have WhereTo? The benefit of WhereTo is not having to type a manual number.
I've added a 'Where to?' with a few rooms chosen at random.
When you teleport to rooms later in the game you've skipped performing a lot of the actions normally required to get there, so it leads to inconsistent behaviors. Depending on what you're testing you might need to set certain flags and globals or your results aren't going to be the same when actually playing through the game.
In SQ3 if you PUMP SHARK, then type QA in the first room (rm002), you get several locations to jump to, but look at what variables are set before teleporting to the ship's cockpit:
(1
(= shipRepairLevel 4)
((inventory at: iReactor) moveTo: 14)
((inventory at: iWire) moveTo: 14)
(= roomWithMotivator NULL)
(= motivatorState motivatorINSHIP)
(= sittingInCockpit TRUE)
(= shipLocation shipSPACE)
(= global207 1)
(= global208 2)
(= global206 3)
(= score 134)
(theGame changeScore: 1)
(RedrawCast)
(curRoom newRoom: 14)
)
Not only are you in the cockpit, but the game state has been set as though you've correctly completed the junkyard section of the game.
The code above was taken from
EO's SCI Decompile Archive because it's easier to understand. Compare to the same code in
Sluicebox's repo:
(1
(= global136 4)
((gInventory at: 3) moveTo: 14) ; Reactor
((gInventory at: 1) moveTo: 14) ; Wire
(= global149 0)
(= global135 4)
(= global203 1)
(= global210 1)
(= global207 1)
(= global208 2)
(= global206 3)
(= gScore 134)
(gGame changeScore: 1)
(RedrawCast)
(gCurRoom newRoom: 14)
)
I point this out only to highlight that both resources are incredibly valuable. I refer to both on nearly every project for different reasons.
But I digress. New version attached below.