| Author
|
Thread |
 |
|
JohnnyWalker2001

Joined: 19 Jul 2011
Posts: 157
Location: aka ThunderPeel2001 |
Unused/untriggered dialogue
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! _________________ Grim Fandango Deluxe - a mod project
http://grimfandangodeluxe.blogspot.com
|
Fri Aug 05, 2011 12:31 am |
|
|
|
|
|
|
giucam

Joined: 21 Mar 2011
Posts: 131
Location: Belluno, Italy |
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:
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. _________________ I can't reap hamburger - cows are a whole other bureau, not to mention the lettuce.
http://lostsoulsalliance.wordpress.com
|
Thu Oct 20, 2011 4:48 pm |
|
|
Ezekiel000
Joined: 07 May 2009
Posts: 96
|
Couldn't a utility be created to patch the game files?
Or when that script is loaded substitute the incorrect line at runtime?
|
Thu Oct 20, 2011 7:16 pm |
|
|
JohnnyWalker2001

Joined: 19 Jul 2011
Posts: 157
Location: aka ThunderPeel2001 |
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! _________________ Grim Fandango Deluxe - a mod project
http://grimfandangodeluxe.blogspot.com
|
Fri Oct 21, 2011 12:37 am |
|
|
|
|
|
|
Napper
Joined: 28 Oct 2011
Posts: 4
|
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?
|
Fri Oct 28, 2011 10:12 pm |
|
|
Napper
Joined: 28 Oct 2011
Posts: 4
|
Nevermind. I used the debug mode to access the convo like you suggested.
|
Sat Oct 29, 2011 1:01 am |
|
|
JenniBee
Joined: 26 Apr 2011
Posts: 12
|
quote: Originally posted by giucam 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.
|
Tue Nov 15, 2011 8:39 pm |
|
|
somaen

Joined: 24 Nov 2010
Posts: 273
|
I'm looking into prettier ways to perform such user-patching, rather than modifying the lab-files wholesale.
|
Wed Nov 16, 2011 1:55 pm |
|
|
Ezekiel000
Joined: 07 May 2009
Posts: 96
|
quote: Originally posted by somaen 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?
|
Wed Nov 16, 2011 2:29 pm |
|
|
somaen

Joined: 24 Nov 2010
Posts: 273
|
I'd rather avoid that, special-casing in the engine is more of a last-resort solution, besides it complicates things unneccessarily.
|
Wed Nov 16, 2011 9:28 pm |
|
|
Ezekiel000
Joined: 07 May 2009
Posts: 96
|
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.
|
Wed Nov 16, 2011 10:41 pm |
|
|