Community

General and Everything Else => The Games and other Sierra Adventure stuff => Topic started by: robingravel on January 22, 2021, 03:43:02 PM

Title: King's quest IV: door out of place
Post by: robingravel on January 22, 2021, 03:43:02 PM
In King's Quest IV. the door from the mine is misplaced when Rosella's riding on the unicorn.

Does someone know what's happened?
Title: Re: King's quest IV: door out of place
Post by: Kawa on January 22, 2021, 08:00:29 PM
If nobody else answers before I do, I may just look into this tomorrow.

For my own reference, this is the 1989 release.
Title: Re: King's quest IV: door out of place
Post by: gumby on January 22, 2021, 08:48:48 PM
Not sure in which context this is happening, but I've got a guess: the y-position of the hotspot in the door view has been changed or incorrect?
Title: Re: King's quest IV: door out of place
Post by: Kawa on January 23, 2021, 09:40:41 AM
The door is view 600, which has two loops of one cel each. For its closed state, the hotspot is at [0,0], so right in the center bottom. When it's open, the hotspot is at [-8,3], right next to the bottom hinge. If global100 is set, the door in room 28 is instantiated at [289, 137], which fits perfectly into the picture. Otherwise, it's instantiated at [284, 131]... which is also exactly right:
Code: [Select]
(= door (View new:)) ; it's a local, don't ask me why.
(if global100
(door
view: 600 loop: 0 cel: 0
setPri: 9
posn: 289 137
ignoreActors: init: stopUpd:
)
(gEgo observeControl: ctlYELLOW) ;patch on the inside of the doorway
else
(door
view: 600 loop: 1 cel: 0
ignoreActors: true
setPri: 9
posn: 284 131
init: stopUpd:
)
)
The rest of Room28::init is to handle the day/night cycle and where Rosella should appear, and that's the only place the door object itself is touched (saying "door" doesn't count). I honestly can't find anything here that could cause the door to be misplaced like this.

For comparison, I checked out the 1988 version. The coordinates are a little different (open hotspot at [-8, 0], positioned at [289, 139] and [283, 139]) among various irrelevant changes but otherwise there's still nothing here that could cause the door to be misplaced.

If I take the door view from 1988 and use it in the 1989 version, set it to loop 1 (open) and place it at [284, 131]... it ends up too far up.



...But guess what happens when you place the 1989 door in the 1988 background, at the 1988 coordinate?

That's right. Positioning-wise, it matches robingravel's screenshot. But the trees indicate that's the 1989 version. Closed doesn't seem quite right either, but not as obviously as when it's open.
Title: Re: King's quest IV: door out of place
Post by: robingravel on January 23, 2021, 09:59:14 AM
Yeah. It happens only when Rosella rides on the unicorn.

When she's walking, the door does not have this behavior.

Title: Re: King's quest IV: door out of place
Post by: Kawa on January 23, 2021, 10:16:03 AM
I'm out of ideas.
Title: Re: King's quest IV: door out of place
Post by: OmerMor on January 23, 2021, 11:09:08 AM
Maybe it's an issue with NRS's "Ultimate King's Quest 4" version? It meshes up resources from the various KQ4 versions.
Title: Re: King's quest IV: door out of place
Post by: robingravel on January 23, 2021, 11:31:08 AM
I'm out of ideas.

I noted when Rosella rides the unicorn, it takes for a while to load on slow computers.

It takes two minutes on real PCjr to load this part.

Perhaps, the game uses different rooms but still uses the same backgrounds.

Here the version the game is using.
Title: Re: King's quest IV: door out of place
Post by: lskovlun on January 23, 2021, 01:24:31 PM
Perhaps, the game uses different rooms but still uses the same backgrounds.
This is, in fact, true. Room 333 handles riding the unicorn through all (!)  the screens.
Title: Re: King's quest IV: door out of place
Post by: Collector on January 23, 2021, 03:04:24 PM
That is the version that requires the KQ4FIX patch,though that should not be a factor in this as that patch is for the waterfalls room.
Title: Re: King's quest IV: door out of place
Post by: Kawa on January 23, 2021, 05:40:32 PM
Maybe it's an issue with NRS's "Ultimate King's Quest 4" version? It meshes up resources from the various KQ4 versions.
That's "mashes up". (My turn~)
Title: Re: King's quest IV: door out of place
Post by: lskovlun on January 23, 2021, 06:01:59 PM
That's "mashes up". (My turn~)
or messes. :P
Title: Re: King's quest IV: door out of place
Post by: Kawa on January 23, 2021, 06:51:28 PM
or messes. :P
Mashes makes more sense in context. At least, mashing it up is the patch author's intent, and messing it up is what results considering the door's gone wonky.
Title: Re: King's quest IV: door out of place
Post by: OmerMor on January 24, 2021, 09:25:35 AM
 ;D

Are you sure 'mash' fits better than 'mesh' though? I'm not a native English speaker, however these definitions sound fitting:

Mesh (verb)
To connect together by interlocking, as gears do.

Mesh (verb)
To fit in; to come together harmoniously.
"The music meshed well with the visuals in that film."
Title: Re: King's quest IV: door out of place
Post by: Kawa on January 24, 2021, 09:59:29 AM
Por que no los dos?

Also, if it fit together harmoniously, we wouldn't have this thread now, would we? 😹
Title: Re: King's quest IV: door out of place
Post by: robingravel on January 24, 2021, 02:49:33 PM
It was a serious question turned into comedy.

:( :(
Title: Re: King's quest IV: door out of place
Post by: gumby on January 27, 2021, 08:13:42 PM
This thread got accidentally (I think?) locked.  It's unlocked now.
Title: Re: King's quest IV: door out of place
Post by: Kawa on January 28, 2021, 04:01:09 AM
This is, in fact, true. Room 333 handles riding the unicorn through all (!)  the screens.

The relevant bit of code from room 333:
Code: [Select]
(instance from26 of Script
(method (changeState newState)
(switch (= state newState)
(2
(if global100
(newView
view: 600 loop: 0 cel: 0
setPri: 10
posn: 289 137 ; Matches room 28
init: stopUpd:
)
(gRoom drawPic: 28)
(gRoom overlay: 128)
else
(gRoom drawPic: 28)
(newView
view: 600 loop: 1 cel: 0
setPri: 9
posn: 284 131 ; Matches room 28
ignoreActors: init: stopUpd:
)
)
(gRoom setScript: from28)
)
)
)
)
1988 version is exactly the same at this point except for not using an overlay for the night state and having different coordinates for the door: 289 139 and 283 139, which are again the same as in room 28.

So if the unicorn riding isn't the problem, what's going on then?
Title: Re: King's quest IV: door out of place
Post by: robingravel on January 28, 2021, 11:18:09 AM
Maybe this video will give what happens to the door when riding the unicorn.
https://www.youtube.com/watch?v=tEfgE8gvnRM (https://www.youtube.com/watch?v=tEfgE8gvnRM)

This thread got accidentally (I think?) locked.  It's unlocked now.

It was me since this thread turned into mockery.
Title: Re: King's quest IV: door out of place
Post by: Kawa on January 28, 2021, 11:38:23 AM
Okay, so.

1. The mine entrance room you go to on foot (28) is not the same room as the one in the unicorn cutscene -- that's entirely done in room 333, which pretends to be various other rooms. Hence the loading time when you ride horse -- it's preloading all these backgrounds.
2. The mine door is open or closed depending on the time of day you enter room 28, or when room 333 pretends to be 28.
3. The fake mine room (333 pretending to be 28) has the same door view (600) at the same positions as the real room 28, for both 1988 and 1989 versions.
4. There is nothing in this cutscene script that could put the door where it's shown in the video or screenshot.

(5. The mockery started during a lull in the research and wasn't directed at you.)

I'm gonna stop trusting the scripts for a bit, try to see this action for myself.

Edit: overtime nosleep, tp 27, tp 333, wait a bit and... there's nothing wrong with this picture at all. The door's open and in the right place. This is King's Quest IV, version 1.006.004, released 1989-08-07 on SCI 0.000.502.
Title: Re: King's quest IV: door out of place
Post by: OmerMor on January 28, 2021, 01:35:09 PM
This is King's Quest IV, version 1.006.004, released 1989-08-07 on SCI 0.000.502.

Robin's version  (http://sciprogramming.com/community/index.php?topic=1965.msg14170#msg14170)is 1.003.006, 1988-12-07.

So possibly it's something that was fixed between 1.003.006 and 1.006.004.

Edit:
Actually it's weird - according to sciwiki (http://sciwiki.sierrahelp.com/index.php?title=King%27s_Quest_IV:_The_Perils_of_Rosella#SCI0_.28late.29) the only difference is the KQ4PATCH which fixed views 653 and 997. But perhaps the wiki is wrong and there are other differences.

Can someone share v1.003.006 with me please?
Title: Re: King's quest IV: door out of place
Post by: lskovlun on January 28, 2021, 02:14:07 PM
Actually it's weird - according to sciwiki (http://sciwiki.sierrahelp.com/index.php?title=King%27s_Quest_IV:_The_Perils_of_Rosella#SCI0_.28late.29) the only difference is the KQ4PATCH which fixed views 653 and 997. But perhaps the wiki is wrong and there are other differences.
There's definitely a new interpreter; and a quick peek at FreeSCI shows this:
Code: [Select]
#define SCI_VERSION_FTU_PRIORITY_14_ZONES SCI_VERSION(0,000,502)
/* Last version known to do this: 0.000.490
 * Uses 14 zones from 42 to 190 instead of 15 zones from 42 to 200.
*/
Does this matter? idk. But the change is included in the last few releases of KQ4.
Title: Re: King's quest IV: door out of place
Post by: Kawa on January 28, 2021, 02:28:55 PM
A different interpreter (0.000.409 vs my 0.000.502) shouldn't affect the door like that, and KQ4FIX is literally just two apparently-missing views that don't apply to the mine entrance so I too would like to see if Robin's version has any differences in script.333 or view.600.
Title: Re: King's quest IV: door out of place
Post by: robingravel on January 28, 2021, 04:02:44 PM
Here the door code from room 333
Code: [Select]
(case 2
(if (global100)
(send newView:
view(600)
loop(0)
cel(0)
setPri(9)
posn(289 137)
ignoreActors()
init()
stopUpd()
)
(send global2:drawPic(128))
)(else
(send global2:drawPic(28))
(send newView:
view(600)
loop(1)
cel(0)
setPri(10)
posn(284 131)
init()
stopUpd()
)
)
(send global0:posn(30 187))
(send global2:setScript(from28))
)

Title: Re: King's quest IV: door out of place
Post by: OmerMor on January 28, 2021, 05:09:25 PM
A different interpreter (0.000.409 vs my 0.000.502) shouldn't affect the door like that, and KQ4FIX is literally just two apparently-missing views that don't apply to the mine entrance so I too would like to see if Robin's version has any differences in script.333 or view.600.

Additionally there's nothing in KQ4FIX that would bump the version number, so I'm skeptical of the claim in sciwiki.
Title: Re: King's quest IV: door out of place
Post by: Kawa on January 28, 2021, 05:25:24 PM
Those are once again the correct coordinates. Could you attach the actual view, or quote the offsets of the two frames? They should be 0,0 for the closed door and -8,3 for the opened door.
Title: Re: King's quest IV: door out of place
Post by: Collector on January 30, 2021, 11:54:24 PM
Actually it's weird - according to sciwiki (http://sciwiki.sierrahelp.com/index.php?title=King%27s_Quest_IV:_The_Perils_of_Rosella#SCI0_.28late.29) the only difference is the KQ4PATCH which fixed views 653 and 997. But perhaps the wiki is wrong and there are other differences.

Except that the Wiki does not say that that is the only difference. It only notes that it is the version that requires the patch. All subsequent versions included the fix along with whatever other changes were made. Also, later versions did employ a number of graphical changes.

Quote
PC version 1.000.106 and 1.000.111 are the only ones with the original detailed graphics. For 1.003.006 and later versions, Sierra simplified the background graphics to make the game fit on one 5.25 inch disk less, removing background detail and separate night pictures.

The KQ4FIX patch dated 1989-02-15 addresses error message "0x80/653 not found" at DOSBox cycle settings above 1500 when entering the screen with the waterfall. This patch only applies to version 1.003.006. This problem was corrected in the later version 1.006.003 and is not needed in versions 1.006.003 or 1.006.004.

PC version 1.006.004 is the latest PC version and has the main character walking faster diagonally.

Title: Re: King's quest IV: door out of place
Post by: Kawa on January 31, 2021, 05:03:18 AM
Right, in Room24::init, there's a Prop with isExtra set that uses view.653. Which would indeed mean that slower computers wouldn't try to process it and thus wouldn't attempt to load the resource.

Not that any of that has anything to do with this mysterious door, so I'll once again ask what the hotspots are for the door in version 1.003.006.
Title: Re: King's quest IV: door out of place
Post by: OmerMor on January 31, 2021, 12:34:55 PM
what the hotspots are for the door in version 1.003.006.

The hotspots are the same: (0,0) and (-8,3)

Here the door code from room 333
Code: [Select]
(case 2
(if (global100)
(send newView:
view(600)
loop(0)
cel(0)
setPri(9)
posn(289 137)
ignoreActors()
init()
stopUpd()
)
(send global2:drawPic(128))
)(else
(send global2:drawPic(28))
(send newView:
view(600)
loop(1)
cel(0)
setPri(10)
posn(284 131)
init()
stopUpd()
)
)
(send global0:posn(30 187))
(send global2:setScript(from28))
)


Robin, the code you pasted is only for the from20 instance.
The other ones (from26 and from27) have wrong coordiantes, carried over from the old kq4 version:

Code: [Select]
(2
(if global100
(newView
view: 600
loop: 0
cel: 0
setPri: 10
posn: 289 139
init:
stopUpd:
)
(global2 drawPic: 128)
else
(global2 drawPic: 28)
(newView
view: 600
loop: 1
cel: 0
setPri: 9
posn: 283 139
ignoreActors:
init:
stopUpd:
)
)
(global2 setScript: from28)
)

Here is a summary table for all coordinates which are being set to view 600 loop 1:

v1.000.*v1.003.006v1.006.003
Room 28(283, 139)(284, 131)(284, 131)
Room 333from20: (283, 139)
from26: (283, 139)
from27: (283, 139)
from20: (284, 131)
from26: (283, 139)
from27: (283, 139)
from20: (284, 131)
from26: (284, 131)
from27: (284, 131)

I think that finally solves your mystery Robin!
Thanks for raising it - it was very interesting :-)

I guess we should offer a patch to ScummVm.
Title: Re: King's quest IV: door out of place
Post by: Kawa on January 31, 2021, 01:31:51 PM
Woo!
Title: Re: King's quest IV: door out of place
Post by: robingravel on January 31, 2021, 02:01:21 PM
what the hotspots are for the door in version 1.003.006.

The hotspots are the same: (0,0) and (-8,3)

Here the door code from room 333
Code: [Select]
(case 2
(if (global100)
(send newView:
view(600)
loop(0)
cel(0)
setPri(9)
posn(289 137)
ignoreActors()
init()
stopUpd()
)
(send global2:drawPic(128))
)(else
(send global2:drawPic(28))
(send newView:
view(600)
loop(1)
cel(0)
setPri(10)
posn(284 131)
init()
stopUpd()
)
)
(send global0:posn(30 187))
(send global2:setScript(from28))
)


Robin, the code you pasted is only for the from20 instance.
The other ones (from26 and from27) have wrong coordiantes, carried over from the old kq4 version:

Code: [Select]
(2
(if global100
(newView
view: 600
loop: 0
cel: 0
setPri: 10
posn: 289 139
init:
stopUpd:
)
(global2 drawPic: 128)
else
(global2 drawPic: 28)
(newView
view: 600
loop: 1
cel: 0
setPri: 9
posn: 283 139
ignoreActors:
init:
stopUpd:
)
)
(global2 setScript: from28)
)

Here is a summary table for all coordinates the which are being set to view 600 loop 1:

v1.000.*v1.003.006v1.006.003
Room 28(283, 139)(284, 131)(284, 131)
Room 333from20: (283, 139)
from26: (283, 139)
from27: (283, 139)
from20: (284, 131)
from26: (283, 139)
from27: (283, 139)
from20: (284, 131)
from26: (284, 131)
from27: (284, 131)

I think that finally solves your mystery Robin!
Thanks for raising it - it was very interesting :-)

I guess we should offer a patch to ScummVm.

So if from20 is used, the door has the right coordinate.

That explained why the game plays without door glitch but not all of time.

Thanks for the help, guys.