Jump to content

Home

And yet another "new" CMI Easter Egg


Serge

Recommended Posts

Yeah, they just keep popping up now :)

 

After finding out how to trigger the light saber easter egg (see earlier post), tel and I started to investigate the peculiar costume that Blondebeard posted about a month ago at http://www.milegend.com - the one that looked very much like the "Spider" from The Dig... And yep, here's the recipe for how to make it appear in the game:

 

After you've died on Blood Island, and talked to Stan, exit and enter his crypt about 35-36 times (not quite sure if the first time we see this room (when Guybrush lies in the coffin) is counted, so either 35 or 36 times). A short cutscene will appear. Very grotesque, but very very funny :)

 

That's all for now :)

 

Serge

Link to comment
Share on other sites

As a final remark, I might add that no, the car crash sounds in the Blood Island Mill room are never used :(

 

And as tel noted, it doesn't seem the DESTROY HIM! etc. signs during sword fighting are used either.

 

- Serge

Link to comment
Share on other sites

They decompiled the scripts (the scripts control all the game logic, that is the scripts are the heart of the game if you want to call it so). Then they looked at each script (damn, must be hundreds of them) to see what happens when you do this and do that.

Then they probably tried to confirm the things they found out in the game.

Link to comment
Share on other sites

Originally posted by john_doe

They decompiled the scripts (the scripts control all the game logic, that is the scripts are the heart of the game if you want to call it so). Then they looked at each script (damn, must be hundreds of them) to see what happens when you do this and do that.

 

More like thousands :) In reality, we searched through the decompiled scripts to find one that referenced the light saber sounds or the spider costume. Then found out how to trigger it by reading the script and the other scripts that call it. CMI script decompilation has come a long way since SCUMM Revisited 2 :) As an example, the script for entering Stan's crypt looks like this:

 

if (ClassOf(1066,[156])) {
 if (stans_crypt_entry_count >= 35 && 
       !bitvar74 && !cutscene_active) {
   entered_stans_crypt_entry_count = 0;
   StartScript(383,0,[]);
   repeat {
     BreakHere;
   } until (!ScriptRunning(383));
 } else {
   if (Object[1192].Owner == 1) {
     StartScript(368,0,[]);
   } else {
     StartScript(385,0,[]);
   }
 }
}
EndScript;

1066 is the object ID of the door to stan's crypt in the cemetary. First line checks if it's unlocked. Second line checks if the number of time's you've entered the crypt is greater than 34 (and makes sure this isn't during another cutscene etc.). If it is, script 383 is run. (Script 383 is the script with the spider). Otherwise, it checks if Guybrush (actor 1) owns Murray (object 1192) and runs a different script when entering depending on that (if you have Murray, you'll get a funny little conversation and Guybrush will refuse to stay in the crypt). Otherwise, it runs the standard script (385).

 

Still working on making the decompiler output even more readable, then I might release it for those (few) who are interested. Right now it's mainly used for developing another project.

 

- Serge

Link to comment
Share on other sites

Originally posted by Serge

if (ClassOf(1066,[156])) {
 if (stans_crypt_entry_count >= 35 && 
       !bitvar74 && !cutscene_active) {
   entered_stans_crypt_entry_count = 0;
   StartScript(383,0,[]);
   repeat {
     BreakHere;
   } until (!ScriptRunning(383));
 } else {
   if (Object[1192].Owner == 1) {
     StartScript(368,0,[]);
   } else {
     StartScript(385,0,[]);
   }
 }
}
EndScript;

[

 

That looks very much like PHP code. Programming games may not be as difficult as I thought :)

Link to comment
Share on other sites

Originally posted by Dalixam

 

That looks very much like PHP code. Programming games may not be as difficult as I thought :)

 

You are wrong. it really is as hard as you thought. what i do wanna know though, is what program they used to decompile them and where from?:manny:

Link to comment
Share on other sites

Damnit... Posted this two hours ago... Oh well, let's try again.

 

The decompiler (CMIDec) is not using actual SCUMM syntax (which is actually even more humanly readable from what I've seen). Rather, it uses a subset of the good old LECHUCK language (of SCRAMM infame...), which is the same language that will be used for ScummIDE (the current project) if it ever gets done.

 

Really, it's a mix of Pascal, C and Java - different language features chosen depending on how to best reproduce the compiled scripts. For example, the SCUMM version of the C switch construct works more like Pascal's case construct, so, grabbed the syntax from Pascal in that case. etc.

 

- Serge

Link to comment
Share on other sites

Oh, for those forum people with hawk eyes... Yeah, there's an error in that script. I hadn't added the variable name for var533 (stans_crypt_entry_count) yet when I wrote the post, so I just figured I'd edit it in manually. So, the entered_stans_crypt_entry_count variable should be just stans_crypt_entry_count - the same as the other reference to it in the same script.

 

- Serge

Link to comment
Share on other sites

Hello,

 

Can anyone help me please?

I want translate Indiana Jones 4 into my language.

I looking for any util for extract & insert text files.

 

Please help.

 

BR

Vladimir

Link to comment
Share on other sites

That is REALLY hard to do, sorry. To make an explanation of why, the following is a bit technical:

 

The reason is that dialogue lines are stored inside the scripts, which are placed inside the resource bundles of the game along with costumes, background art, everything.

 

If the length of a translated dialogue line differs as much as a single letter from the original version, every command that comes after it in the script will have a different offset (position) than before. Which means that if there's a jump earlier in the script, it'll jump to a wrong offset and the game will (most likely) crash.

 

Also, all the resources following the script you patch will have their position changed too. Which means that the directory (atlantis.000) will point to wrong positions too. Which, in turn, means that the engine won't be able to find anything in the resource file.

 

It IS possible to do a utility to take care of all this, but I don't think anyone has done it yet. It's something I might consider adding to the SCUMMBag family sometime (see the Questions thread on the SCUMM Hacking forum).

 

- Serge

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...