Unused/untriggered dialogue

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Unused/untriggered dialogue

Post by JohnnyWalker2001 »

This page has a bunch of unused dialogue from the game (scroll down a bit to see them). Is there any way for us to check if these are ever played, or if they were ever MEANT to be played (i.e. they were held back because of a bug), or if they are simply left-over resources?

http://grimfandango.net/?page=missing

Quite interesting!
User avatar
MeddlingMonk
Posts: 221
Joined: Wed Jan 21, 2009 10:06 pm

Post by MeddlingMonk »

I'm the one who extracted those dialog clips (using Scumm Revisited) and since then have found where and when the "custard" line can be heard: when giving Meche Domino's mouthpiece after you've filled it with Fill-a-Dent but before you have Manny bite on it.

Some people have said they've randomly been able to have the conversation with Domino on the factory island ("Domino talks") but I never have playing with the original game.

All the rest (apart from "Eva's message", which I think was meant to be among the notes Manny got from Salvador, and "conspiracy theories") depend on dialog tree choices that aren't available. They could have been cut or could be due to bugs like the Domino conversation, but I don't know either way. It's pretty obvious where they would go in the story, so it's possible they could be restored to the game with ResidualVM. But apparently not with the original game.

I also found some unused dialog text with no associated audio clips using Scumm Revisted when I was preparing for writing the Grim Fandango novel years ago. The only thing that sticks out in my memory was a fragment between Meche and Olivia about the seating arrangement in the Bone Wagon. The presence of text but no audio clips kind of suggests that some planned dialog was simply cut.
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Post by JohnnyWalker2001 »

Wow. Interesting stuff. Thanks for sharing that. I believe "Domino Talks" has been restored to the ResidualVM version of the game(?), but it would be great if people could look more into the other choices to see if there's similar scripting bugs.

Of course that's probably a lot of work... but it would be awesome if someone did :)
User avatar
giucam
Posts: 139
Joined: Mon Mar 21, 2011 9:20 am

Post by giucam »

I've investigated this bug a bit:
it happens only if you talked to Domino in his office earlier. Or vice versa: you can't talk to him in his office (from now on "do") if you talked to him at the end of the world (from now on "dr") already. (Of course this can happen only by jumping with the debug keys, not when actually playing the game.)

The bug is very simple: every lua file has a statement at its top like this:

Code: Select all

CheckFirstTime("filename.lua")
This prevents the file fom being loaded two times. Now, the problem is that both dlg_domino.lua and dlg_dom2.lua, which are used respectively in do and in dr, check for "dlg_domino.lua". When you try to talk to Dom in dr the script tries to load the file dlg_dom2.lua, but that raises an error, since it thinks it was already loaded.
So, that's basically a copy and paste bug.

The solution is not so simple, instead.
* One way could be to override the function CheckFirstTime, and make it do nothing. Dirty hack.
* Another solution could be to reset the state of dlg_dialog.lua every frame or so. A really dirty hack.
* Some more dirty hack.
Unfortunately i can't think of a decent solution right now.
User avatar
ezekiel000
Posts: 443
Joined: Mon Aug 25, 2008 5:17 pm
Location: Surrey, England

Post by ezekiel000 »

Couldn't a utility be created to patch the game files?
Or when that script is loaded substitute the incorrect line at runtime?
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Post by JohnnyWalker2001 »

Great job in figuring out what caused the bug. It's a shame there's no immediately obvious "none-hacky" solution. I guess I've never heard the speech at the end of Grim Fandango, as I would have always talked to Domino in his office first.

I hope someone can figure out some sort of agreeable fix that could be added to ResidualVM!
User avatar
giucam
Posts: 139
Joined: Mon Mar 21, 2011 9:20 am

Post by giucam »

I've found a solution. Not automatized yet but probably the best one.
  • - Build the tools unlab, mklab and delua from residual-tools;
    - create a directory "data000" and unlab the file data000.lua in there;
    - delua the extracted file dlg_dom2.lua and modify its first line to "CheckFirstTime(dlg_dom2.lua)";
    - overwrite the old dlg_dom2.lua with the fixed one
    - create a new data000.lua from the directory data000
    - replace the old data000.lab
    - enjoy :)
User avatar
ezekiel000
Posts: 443
Joined: Mon Aug 25, 2008 5:17 pm
Location: Surrey, England

Post by ezekiel000 »

I was going to try this fix but unfortunately mklab doesn't compile for me at the moment. I've submitted a bug report http://github.com/residualvm/residualvm-tools/issues/19.
Napper
Posts: 6
Joined: Fri Oct 28, 2011 10:11 pm

Post by Napper »

Hey giucam can you help me? I downloaded ResidualVM-tools and extracted the Mklab.cpp, unlab.cpp and delua.cpp files. Can you explain with a bit more detail how I use these tools?
Napper
Posts: 6
Joined: Fri Oct 28, 2011 10:11 pm

Post by Napper »

Nevermind. I used the debug mode to access the convo like you suggested.
JenniBee
Posts: 95
Joined: Fri Sep 17, 2010 5:22 am

Post by JenniBee »

giucam wrote:I've found a solution. Not automatized yet but probably the best one.
Thanks. That worked great. :D

I uploaded a zip with Windows compiled versions of the residual tools and I created a little batch file that should automate the process. It uses Find And Replace Text to replace the text in the LUA file.

The zip file is available here if anyone's interested. :)

Just unzip it into the same directory containing DATA000.LAB and run fixgrim.bat.
User avatar
somaen
ScummVM Developer
Posts: 376
Joined: Thu Apr 21, 2011 7:31 pm
Location: Trondheim, NO

Post by somaen »

I'm looking into prettier ways to perform such user-patching, rather than modifying the lab-files wholesale.
User avatar
ezekiel000
Posts: 443
Joined: Mon Aug 25, 2008 5:17 pm
Location: Surrey, England

Post by ezekiel000 »

somaen wrote:I'm looking into prettier ways to perform such user-patching, rather than modifying the lab-files wholesale.
Can't it be done on the fly whenever residual opens that script it substitutes the correct line?
User avatar
somaen
ScummVM Developer
Posts: 376
Joined: Thu Apr 21, 2011 7:31 pm
Location: Trondheim, NO

Post by somaen »

I'd rather avoid that, special-casing in the engine is more of a last-resort solution, besides it complicates things unneccessarily.
User avatar
ezekiel000
Posts: 443
Joined: Mon Aug 25, 2008 5:17 pm
Location: Surrey, England

Post by ezekiel000 »

The official patch includes an extra lab file that I assume takes precedent if there is a duplicate file right?
So what if you include in the patch extractor a process that will take the incorrect script from the original lab, fix it and then insert it into the lab file from the patch.
Post Reply