scemino / engge

Open source remake of Thimbleweed Park's engine
https://scemino.github.io/
MIT License
148 stars 15 forks source link

When using the verb "Talk to" with Willie, Boris does not walk to the good position #105

Closed Mac1512 closed 4 years ago

Mac1512 commented 4 years ago

When the verb "Talk to" is selected, Willie is not detected when passing the mouse cursor over it, therefore it is not possible to speak with him. On the other hand, when we select the verb "Look at", Willie is detected when the mouse cursor passes over it, but the plotting is wrong if we click on it, since the dialog selection box opens to speak with it. This action is what the verb "Talk to" must perform

This is tested on Windows.

scemino commented 4 years ago

Actually there is a willieObject in room Bridge, it has the name Willie and whatever action you use on it it starts the dialog with Willie. But this object has not the flag TALKABLE, that's why engge don't propose "Talk to" as a verb. I don't know what to do yet to fix this.

Mac1512 commented 4 years ago

I have been looking at the code and indeed, it is as you say. Maybe, we all think of something.

Mac1512 commented 4 years ago

From what I could see, there is the object "willieObject" and the actor "willie". Both share the name "Willie # M".

The object "willieObject" shares characteristics of the actor "willie", such as its position, ... And also this object "willieObject", its function is to occupy the position of said actor in the room "bridge" so that when we do almost any action on willie, the dialogue appears.

I say almost any action, because the verbs "give", "use", have a specific behavior.

At the current moment of the engine, when we are in the bridge room, when the mouse cursor passes through the area where willie is located, the cursor detects both, that is, it detects the object "willieObject" and also detects the actor "willie" . Although the actor "willie" detects it in a very subtle way.

By this I mean that in a large portion of the image that represents willie, the cursor shows the verb "Look at". This area is the object "willieObject", where any option we execute on this will open the dialog, except the verb "use" that shows a phrase and the verb "give" that does not work on it. But in a small proportion of the screen, when passing the mouse cursor the default verb "Talk to" would be shown, this area being the one corresponding to the actor "willie". Here the behavior corresponds to said actor, so if we use verb such as "open", "close", "pick up", "push", "pull", "look at", it would show text corresponding to the options of said actor. Just as the verb "give" works. And the verb "use" has a behavior like the previous one. But, if we use the verb "talk to", it does nothing. I have seen error behavior in the log, giving several results, although I have only saved the last one:

[2020-03-02 02:53:29.473] [log] [error] File BORIS_24868.ogg not found

corresponding to:

24868 (male)He doesn't seem interested in talking.

Which is an error, since it should have opened the dialog, since it is set to the "willieObject" object.

Perhaps, the solution would be to check if the actor exists with the same name as the object, that is:

name = Willie # M

and if so, that the object inherits the flags of the actor and if said object is active then deactivate the actor, so that only the actions of that object can be done, with the addition of the actor's options. That is, for this particular case:

That only the object "willieObject" appears in said room, when inheriting the flags of the actor, the default verb would be "talk to" opening the dialog box correctly, the verb "give" and the verb "use" work with its corresponding functioning and the rest of the verbs open the dialogue.

Although I have spread a lot, I hope it is understood and that you have a global vision, to get an idea and maybe I can help you solve the problem.

regards

neuromancer commented 4 years ago

He doesn't seem interested in talking.

Is that line reachable in the original engine?

Mac1512 commented 4 years ago
He doesn't seem interested in talking.

Is that line reachable in the original engine?

I suppose that later in another room there is that response in the original engine when the verb "talk to" is executed, although in the bridge room, when the actor "Boris" is active, the dialog box should be opened just like in the original engine at that point, since in the bridge script, the "willieObject" object by default has that behavior, and the "willie" actor establishes the dialog like this:

willie.dialog = "WillieBorisDialog"

scemino commented 4 years ago

I agree @Mac1512, Boris should never say "He doesn't seem interested in talking." and yes, this the object willieObject which should be the "main target" instead of Willie. Maybe if the object has the same name as an actor then it inherits of the actor properties.

Mac1512 commented 4 years ago

Indeed, I think it could be the right option.

We would have to test it and see what happens.

Mac1512 commented 4 years ago

I need to comment that I think the object "willieObjet" should be the "main target", only when a verb is selected, since it must live with the actor "willie" because the animations are made by that actor. This functionality to disable the use of verbs by the actor and activate those of the object "willieObject" I think it could be set with the function objectState, in the bridge script I see:

objectState(Bridge.willieObject, HERE)

with this he establishes it in the room and begins to work. Or maybe by setting it as "Touchable":

objectTouchable(Bridge.willieObject, YES)

When he doesn't need it, I see that the actor sends it to void and deactivates the object in the script:

script attackBoris()

specifically:

actorAt(willie, Void)

objectState(Bridge.willieObject, GONE)

Although I am not entirely sure, it is a point to consider. Since at the present time of the engine through the mouse both the actor and the object are detected.

I also believe that the correct functioning of the verb "Talk to" of the actor should be implemented, since when I click on that verb or when the mouse cursor detects the actor "willie" and the default verb "Talk to" appears, at Clicking does nothing and from what I see, the dialogue is established as follows:

willie.dialog = "WillieBorisDialog"

and when you click, you should execute the following code defined in the actor "willie"

verbTalkTo = function() { if (dialog) { stopthread(rambleTID) startDialog(dialog) }

Although if it is developed in the engine "engge" the operation as it was mentioned in previous posts, this function would not make sense in this context. But maybe later if I have it.

This is part that makes me turn my head and think that the approach is still wrong

Mac1512 commented 4 years ago

I've been testing on windows, and it still doesn't work well. I do not know if it works correctly on Mac or Linux.

The behavior has now changed, the default verb is "Talk to", and if you right-click if it is highlighted, as if you select it manually and left-click, both options execute the dialogue between Willie and Boris. This part works correctly, it is the expected behavior. On the other hand, The other verbs trigger a different action for each one (which is incorrect, they should open the dialog), unless the verb "Look at" is selected, in which case it does nothing at all.

So I think this issue should remain open, or open another with a more accurate name.

regards

scemino commented 4 years ago

I discovered something "funny", if you click on a verb and click on Willie, Boris walks to Willie and then starts the dialog, if you start again with any verb (except Talk to and Give) now the behavior is different: nothing happens. If you walk elsewhere and try again, you will see that the behavior is correct again.

scemino commented 4 years ago

I've been testing on windows, and it still doesn't work well. I do not know if it works correctly on Mac or Linux.

The behavior has now changed, the default verb is "Talk to", and if you right-click if it is highlighted, as if you select it manually and left-click, both options execute the dialogue between Willie and Boris. This part works correctly, it is the expected behavior. On the other hand, The other verbs trigger a different action for each one (which is incorrect, they should open the dialog), unless the verb "Look at" is selected, in which case it does nothing at all.

So I think this issue should remain open, or open another with a more accurate name.

regards

Try it now, it should be fixed by this commit 3333399c01bd65a0e237dfed11781a02c03fe392

Mac1512 commented 4 years ago

I have been testing the last commit, and the operation is almost perfect, although it still lacks a small bug, I will describe the operation in windows:

If we click on any verb, except the verb "Give", the operation is correct and Boris's position is also correct.

If the verb is "Talk to", whether it is manually selected (left click) or the highlighted verb by default (right click), the operation is correct, although Boris's position is incorrect, it covers most of willie and therefore willie is not seen talking. This happened before.

with the other verbs it is correctly placed in the dialogue position, which is in front of willie.

If the verb "Give" is selected, Boris's positioning is correct, and it works well with the inventory options except for "The room key card" which does nothing. The log shows the following:

[2020-03-20 21:08:48.567] [log] [error] File BORIS_24840.ogg not found

Which is incorrect, since it corresponds to:

24840 I don't want to give away evidence.

I also take the opportunity to tell you that willie never falls asleep, a fact that he should do when exhausting the dialogue options.

Mac1512 commented 4 years ago

I have tried the last commit, and the text of the room key card works fine.

For my part, the problem of Boris' position has yet to be solved. This happens with the verb "talk to" and with the verb "Give", the position is incorrect, it is positioned covering up to willie.

Solving this problem would solve others, for example when the verb "Talk to" between Ray and Reyes is selected, the active actor positions himself behind the other, being almost completely hidden.

I have seen more bugs, but I think this is not the place to comment on them, either I open more issues or I write to you by email.

scemino commented 4 years ago

I'm reopening it for the position's errors. Thank you for your comments. For the script errors, it's better to create a new issue.

Mac1512 commented 4 years ago

I see it correct, I have opened a new issue: https://github.com/scemino/engge/issues/113

I proceed to edit the previous post.