Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Layered common events misbehave #3

Merged
merged 2 commits into from
Dec 12, 2013
Merged

Layered common events misbehave #3

merged 2 commits into from
Dec 12, 2013

Conversation

Ghabry
Copy link
Member

@Ghabry Ghabry commented Dec 12, 2013

This is a bit of a difficult issue to work out, so I apologise if I am unclear.

I have a dialogue tree where one option leads to separate common events (this event itself is a common event) controlled by conditional branches and labels, another displays text and includes a label, and the last is to close the tree.

In the original player, the internal common event can be started, and will lead back to the original event like so:
Start if x, go to 1 -> label 1 -> inner event plays out -> go to 99 -> 99 is at the start again

However with EasyRPG player, the inner event will loop until the last command is executed: There’s a yes/no branch, an exp check, and then no events should follow after some effects and messages, or an “insufficient exp” alert, but it takes the last event in the list (outside the “<> End” of the branches) to actually return to the outer event – the message that plays via “No” that sits at the end of the code.
Secondly, this cancel instead leads onto the next dialogue option in the outer event, instead of the go to that proceeds the Call common event command.

This diagram may be of more assistance:

@fdelapena fdelapena closed this Apr 1, 2012
@fdelapena fdelapena reopened this Apr 2, 2012
@fdelapena fdelapena mentioned this pull request Dec 30, 2012
@fdelapena
Copy link
Contributor Author

@Lobomon
Copy link
Member

Lobomon commented Dec 8, 2013

My latest changes on my branch fix this. Please check them and include them to main release, particularly the break and stack fixes are crucial to the interpreter.

The easy interpreter is so solid after the changes that it can actually run the Escalar battle system fine. The only problem that I see is the frame rate that is low while the enemies are moving on the map.

@ghost ghost assigned Ghabry Dec 8, 2013
@Ghabry
Copy link
Member

Ghabry commented Dec 8, 2013

Okay assigned this to me.

@Lobomon
Copy link
Member

Lobomon commented Dec 8, 2013

Have you checked my changes?

@fdelapena
Copy link
Contributor Author

Try opening a pull request. To do this, go to your fork Lobomon/Player -> Pull requests -> Open a pull request -> Create pull requesst

@Ghabry
Copy link
Member

Ghabry commented Dec 9, 2013

"Have you checked my changes?"
No, not yet.

He has unrelated changes (his high resolution stuff) in the branch, so a pull request is a bad idea. Will do a cherry pick.

@Ghabry
Copy link
Member

Ghabry commented Dec 10, 2013

@Lobomon
Can you provide me with a test case that works with your changes but not without? (e.g. the example you posted in the forum, can you upload that project)

The following case fails for me in both cases (with and without your changes)
Message: 1
Teleport: Map2
Message: 2
Message: 3
Call Event CommonEvent1
Message: 5
Teleport: Map3
Message: 6

CommonEvent 1:
Message: 4

Message: 5 is not displayed.

Maybe I triggered a different bug with this that is unrelated :P

@Lobomon
Copy link
Member

Lobomon commented Dec 11, 2013

It works for me on my personal build , what did you pick as my changes ?

@Lobomon
Copy link
Member

Lobomon commented Dec 11, 2013

May be you trigger an other bug with some event changes, do you have an example project ? Did you set several parallel process that may not work =/

check this sample

http://www.2shared.com/file/vuCZ0syS/vs2010.html

it works, and with out the code changes, you will never see anything after the events, nor break

@Lobomon
Copy link
Member

Lobomon commented Dec 11, 2013

Several parallel process may not work because we have just one interpreter per map, and one child process per event call, so haven several parallel map events that calls to several system events probably wont work.

 on most of games. The stack calls works and also the break.
Fixed the teleport to store location.
@Ghabry
Copy link
Member

Ghabry commented Dec 11, 2013

Now I know why it failed for me: When the message is multiline it is not displayed before the teleport... That is a different bug :/
Your patch fixes the one line-message case

…d the event called via "Call event" displayed a message the message directly after the "Call event" call was not displayed.
@Ghabry
Copy link
Member

Ghabry commented Dec 11, 2013

I cherry picked your commit and applied an extra fix that also fixes the multiline case for me.
Can you check if my change breaks "Escalar battle system"?

My branch: https://github.com/Ghabry/easyrpg-player/tree/events

@Lobomon
Copy link
Member

Lobomon commented Dec 12, 2013

The Escalar Battle system still works, so you did not break anything and picked up my changes.

@fdelapena
Copy link
Contributor Author

GitHub feed says I opened the bug request. Is a github pull request API bug?
Anyways, looks good to me to be merged into upstream.
Is the case exposed in the first issue comment probed to fix it?

@Ghabry
Copy link
Member

Ghabry commented Dec 12, 2013

Not sure if that fixes that bug. Hard to get the original test case... we only have a partly cropped screenshot. But it fixes something related to (Common) event calling ;). E.g. input message commands after event return were ignored when the message after the return had them.

It reports "you opened" because you opened that issue but I attached my pull to that issue using curl and the github api. (and the feed uses the issue creator I guess?)

@fdelapena
Copy link
Contributor Author

OK, I just imported this bug for the old bug tracker, so I don't have more details about this.
I guess is the same issue about the common event calling and returning too. Let's merge then 👍

fdelapena added a commit that referenced this pull request Dec 12, 2013
Layered common events misbehave
@fdelapena fdelapena merged commit 0a611d4 into EasyRPG:master Dec 12, 2013
fdelapena pushed a commit that referenced this pull request Jul 27, 2015
Ghabry pushed a commit to Ghabry/easyrpg-player that referenced this pull request Jan 5, 2022
florianessl added a commit to florianessl/Player that referenced this pull request Feb 1, 2025
… "ControlVariables" method from a switch lookup to a "dispatch table"-style code structure
florianessl added a commit to florianessl/Player that referenced this pull request Feb 1, 2025
… "ConditionalBranch" method from a switch lookup to a "dispatch table"-style code structure
# for free to join this conversation on GitHub. Already have an account? # to comment
Development

Successfully merging this pull request may close these issues.

3 participants