Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2058 closed defect (fixed)

BS2: bug on boat in london.

Reported by: SF/kurutsu Owned by: eriktorbjorn
Priority: low Component: Engine: Sword2
Keywords: script Cc:
Game: Broken Sword 2

Description

Hi everybody, first of all, good job on the scummvm, you all do an excellent job!

Platform: WinXP SP2 Language: I use the English CD version of BS2 I use ScummVM version 0.7.1 (2005-03-27) (Sorry I don't know how to compile Scummvm so I don't know if the bug has gotten rid of.

As for the bug, you play with Nicole on the boat in london. When I try to take the mop before I close the door (maybe even before I open the door) after the patrolling man, the mop DISAPPEARS and suddenly Nicole finds herself above the cupboard without having climbed the ladder.

I added a savefile.

Ticket imported from: #1214168. Ticket imported from: bugs/2058.

Attachments (1)

sword2.000 (825 bytes ) - added by SF/kurutsu 15 years ago.

Download all attachments as: .zip

Change History (14)

by SF/kurutsu, 15 years ago

Attachment: sword2.000 added

comment:1 by eriktorbjorn, 15 years ago

I vaguely recall seeing that before. I wouldn't be surprised if it happens with the original interpreter as well, but I never bothered to check.

comment:2 by sev-, 15 years ago

Summary: bug on boat in london.BS2: bug on boat in london.

comment:3 by fingolfin, 15 years ago

Priority: normallow

comment:4 by SF/kurutsu, 15 years ago

Sorry for the late response, I was confused by the "login and submit new' link above and I thought I couldn't reply back.

I checked the revolution site but it didn't mention the bug, however, it doesn't mean it is not an game bug ^_- Should I start a thread on the forum and ask people if they noticed the bug ?

Keep up the good work!

comment:5 by eriktorbjorn, 15 years ago

I don't know. For what it's worth, I've started decoding the scripts used in that scene, but it'll take some time because the tool we have for that is extremely crude. (I should know -- I wrote it.)

If it turns out to be a script bug I'll see if I can figure out a workaround, but I can't promise anything.

comment:6 by eriktorbjorn, 15 years ago

In the docks scene, global variable 1003 is used to keep track of Nico:

0: Hiding behind the first crate. 1: Hiding behind the second crate. 2: Standing in plain view on the deck. 3: Hiding on the roof.

Each object has a script that handles player interaction, i.e. it's run when you click on the object. These scripts are all quite similar, and might run something like

* Check Nico's state and run the appropriate animation, e.g. peeking over the top of a crate.

* Wait for the guard to pass.

* Check Nico's state. Run an animation, or a series of animations, of her moving from that state to the new one.

* Update global variable 1003 with Nico's new state.

That's simplified, of course, and the scripts also handle examining objects and using an object on another object.

However, in the mop's script, in the case where global variable 1003 is 3 (hiding on the roof), the variable is not changed to 2 (standing on the deck). Visually, Nico moves from the roof to the deck and picks up the broom, as far as the other scripts are concerned she's still hiding on the roof.

Note that this bug only happens if you go directly from hiding on the roof to picking up the mop. If you do it in several steps (e.g. first climb down and then click on the mop), it won't happen. There's very little code-sharing between the different scripts, so each have their own set of instructions for moving Nico from one state to another.

Could this be the bug you are seeing? I have an experimental workaround for it that I plan on committing later, once I've cleaned it up a bit.

(Another glitch I noticed is that when taking the mop this way it vanishes for a few frames, but that doesn't seem worth fixing.)

comment:7 by eriktorbjorn, 15 years ago

I've committed my fix. I'll leave the bug report open until I'm more sure that we're talking about the same bug.

comment:8 by eriktorbjorn, 15 years ago

The disappearing mop glitch is probably because it's sending the event telling the mop to hide itself too early. I'll see if I can find a simple workaround for it. If not, I'll just ignore it.

comment:9 by SF/kurutsu, 15 years ago

Thanks for the complete information on the script! It seems we are talking about the same bug. While working on the bug did you find yourself on top of the boat (cupboard) too ? That 's the major bug I think.

comment:10 by eriktorbjorn, 15 years ago

Well, it's not really a bug in ScummVM since it's doing exactly what the script in the game data file is telling it to do. Since the game thinks she's hiding on top of the boat, wherever she goes after picking up the mop she has to climb down first. (Another consequence is that the guard won't notice her.)

It's not even a serious bug, since it doesn't put the game in an unwinnable state. But I agree that it looks ugly having her disappear and reappear like that, which is why I've fixed it in the development version. I'd be grateful if you could try it with a recent ScummVM snapshot, in case there's another similar bug in the scene.

(I haven't done anything about the mop disappearing briefly. It's a script error, and it's in the same script, but other than that it's a different bug.)

comment:11 by SF/kurutsu, 15 years ago

Hiya! We are talking about the same bug! I checked what happened with both the stable version and the CVS one of 2nd of July. In the stable version when I tell her to go up the ladder while she is having the mop in her hands she suddenly reappears on the roof (without having climbed the ladder that is), this is NOT the case anymore in the the CVS version. There is only a small glitch left in both versions: when she is on the roof and I tell Nicole to take the mop , the mop disappears until she has reached it. That 's all. Great improvement! You did a good job :)

comment:12 by eriktorbjorn, 15 years ago

Thanks! I'm closing the bug report since the main bug has been fixed. The remaining script bug is harder to work around in a nice way, and it much less serious I think. I've added it to the TODO list. Some day, maybe...

comment:13 by eriktorbjorn, 15 years ago

Owner: set to eriktorbjorn
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.