Player: Mystic Star: Transferred when flying over town, village, etc.

Created on 5 Oct 2016  ·  11Comments  ·  Source: EasyRPG/Player

Name of the game:

Mystic Star

Player platform:

Ubuntu (Linux) x86_64

Attach files (as a .zip archive or link them)

MysticStar_Save01.lsd.zip

Describe the issue in detail and how to reproduce it:

mysticstar-airship-issue-1--->mysticstar-airship-issue-2

How to reproduce it:

  1. Place the gamesave
  2. Start game
  3. Load the gamesave
  4. Get into the airship
  5. Move up
EvenInterpreter Patch available

Most helpful comment

The Mystic Star specific problem ("Hero Touch Below/Above does not trigger while a Move is executed") can be fixed via:

bool Game_Player::CheckTouchEvent() {
    if (InAirship())
        return false;

+   if (IsMoveRouteOverwritten())
+       return false;

    return CheckEventTriggerHere({RPG::EventPage::Trigger_touched});
}

Because the Player can't have it's own move route a check for "IsOverwritten" is sufficient.

All 11 comments

Okay so the problem is that the Airship triggers an event is shouldn't? We already fixed many of them but looks like we missed some cases >.>

Related: #928.

Okay so the problem is that the Airship triggers an event is shouldn't?

Exactly. The behavior is unexpected.

btw if you want to investigate this on your own. You probably have to change this line to fix it:
https://github.com/EasyRPG/Player/blob/75b1a9f05c8acb945285aa9d4e9bb312e6adbbeb/src/game_event.cpp#L515

Currently only touch events with "Same level as actor" are disabled when on Airship. The problematic event is probably below or above actor.

  • Layers_below ---> transferred
  • Layers_above ---> transferred

I noticed that Game_Event::CheckEventTriggerTouch() is not called when transferred.

game_event.cpp:

...

#include "output.h"
bool Game_Event::CheckEventTriggerTouch(int x, int y) {
    Output::Debug("Game_Event::CheckEventTriggerTouch(%d, %d)", x, y);

    if (Game_Map::GetInterpreter().IsRunning())
        return false;
...

log:

Debug: Loading Save Save01.lsd
Debug: Loading Map Map0015.lmu
Debug: Tree: メニュー < >システム
Debug: Loading Map Map0002.lmu
Debug: Tree: フィールド1 < >フィールド
Debug: Loading Map Map0065.lmu
Debug: Tree: ラウアーの町 < >町

Okay then this is something more complex. Maybe a parallel event that checks for the Player coordinates and invokes the transfer based on his position or something worse... :/

At least something that should not be triggered why in an airship _shrug_

Actually I don't think this is a normal Airship. The start animation is strange.

Found the reason: The "Through" flag is enabled. When it is Enabled events with "Same level as hero" are ignored which matches the Airship check we already have btw.

EDIT: That's not the reason but another unrelated bug :-1:

CC @Zegeri who is the interpreter/move route expert.

When a move route for the Player is set, which runs every frame through a parallel event and is stuff that ends in one frame like "Animation On" the "Hero Touch" triggers Above & Below the hero are ignored... That's the reason >.>. But how to fix this.

Edit:
Upon further investigation I can generalize this a bit:
Hero Touch Below/Above does not trigger while a Move is executed (doesn't matter which one)
Hero Touch SameLevel does not trigger by a MoveUp & co., just hangs the move
Event Touch Below/Above does not trigger when it is a blocking move, but triggers e.g. for "Animation On"
Event Touch SameLevel behaves as Hero Touch SameLevel

The Mystic Star specific problem ("Hero Touch Below/Above does not trigger while a Move is executed") can be fixed via:

bool Game_Player::CheckTouchEvent() {
    if (InAirship())
        return false;

+   if (IsMoveRouteOverwritten())
+       return false;

    return CheckEventTriggerHere({RPG::EventPage::Trigger_touched});
}

Because the Player can't have it's own move route a check for "IsOverwritten" is sufficient.

The patch works for me too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carstene1ns picture carstene1ns  ·  18Comments

s9060666 picture s9060666  ·  14Comments

msikma picture msikma  ·  14Comments

akien-mga picture akien-mga  ·  15Comments

BlisterB picture BlisterB  ·  66Comments