New issue

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

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

Already on GitHub? Sign in to your account

Witch's Heart: When landing while on the broom the Player is moved to the top-left corner #1349

Closed
Ghabry opened this Issue Apr 15, 2018 · 8 comments

Comments

Projects
None yet
3 participants
@Ghabry
Member

Ghabry commented Apr 15, 2018

Name of the game: Witch Heart

http://vgperson.com/games/witchheart.htm

@ghost

This comment has been minimized.

ghost commented May 4, 2018

More details:
The magic broom is an item obtained at the start of the fourth scenario. It is needed to complete that scenario, so if it doesn't work, the game can't be played beyond that point.
Flying around on the broom works, but when landing, the player is always teleported to the top-left corner of the map, whether there is anything there or not. If it is part of the room, you can continue playing. If it isn't, the only action that does anything at that point is activating the broom again, but as soon as you try to land..
In other words, activating the broom is an effective way to get stuck on maps where the top-left corner isn't part of the room, and in any case the broom can't be used in the intended way (to travel to otherwise unreachable areas).

Since this game was translated only recently, it's pretty popular at the moment (as RPG Maker 2k3 games go). It'd be really cool if you could look into this issue soonish ^_^

Attached for easy testing: Data.zip - Save file on Scenario 4, Day 2.

@Ghabry Ghabry closed this May 4, 2018

@Ghabry Ghabry reopened this May 4, 2018

@Ghabry

This comment has been minimized.

Member

Ghabry commented May 4, 2018

Thanks for that information! I became aware of Witch's Heart due to multiple Android bug reports. Usually we only try to fix the bug but in case of Witch's Heart I liked the game so much that I started playing it instead ;) (and wanted to fix it as soon as I encounter the bug).

By now I only played Scenario 1 and started with 2, this explains why I havn't encountered it yet :)

@Ghabry Ghabry changed the title from Witch's Heart: When throwing the broom it always lands at the top-left corner to Witch's Heart: When landing while on the broom it always lands at the top-left corner May 4, 2018

@Ghabry Ghabry changed the title from Witch's Heart: When landing while on the broom it always lands at the top-left corner to Witch's Heart: When landing while on the broom the Player is moved to the top-left corner May 4, 2018

@ghost

This comment has been minimized.

ghost commented May 4, 2018

You can use the save file I attached if you just want to check on the bug (I forgot to equip the broom, but it's in the Esc menu). I guess it would be a little spoilerish if you're playing the game yourself though ^_^;

In case it helps to know, I tried running EasyRPG with all the different engine types and that didn't change anything.

@vgperson

This comment has been minimized.

vgperson commented May 5, 2018

I got reports of this a few times (though at first I was like "I dunno, probably can't do anything about that on my end"), so I looked into this myself.

The way the Magic Broom works is that it's really the Airship, which via Common Event 64 gets moved to the player's position when you press the button under the right conditions, so you can then board it.

This part works fine in EasyRPG, but the problem is in the "descending" part. Common 65 checks if the "riding broom" switch is on (Common 66 sets it when "riding Airship" is true), but the "riding Airship" condition is now false. In other words, checking if "you've fully gotten off the Airship." When the condition is met, it resets the Airship's position to 1,1 (an unreachable position) to keep it from being boarded until 64 puts it under the player again.

Unfortunately, it seems that in EasyRPG, there exists a tiny span of time in which you are no longer on the Airship according to the condition check, yet you are not "fully" off the Airship, so the Place Vehicle event moves the player as well. Looking through the code, it seems to be a mismatch between Game_Vehicle::IsInUse() - which is what the condition checks - and Game_Player::Unboard() - which is what actually "separates" the two, but is not called until Game_Player::Update() is called and detects that the Airship is no longer in use. So perhaps Unboard() should be called immediately?

Meanwhile, it turns out it's seemingly harmless to remove the 1,1 reset. You have to go into the menu to switch items, and when you press Confirm doing so, 64 will move the Airship to... the menu map. (Turns out there is actually a bug where you can fly in that map if you mash while opening the menu, but it was already present, not EasyRPG-specific, and fairly harmless.) So I'll update the game to remove that, which should fix it for players in the meantime.

(Also, I know this is unrelated, but if we have a dev who's into Witch's Heart: any progress on custom EXFONT implementation so there aren't :) and :| faces around every name? I've started including external EXFONT files for exactly that reason.)

@ghost

This comment has been minimized.

ghost commented May 5, 2018

Ooh, the official translator person descends ^o^

Any idea why some of the music sounds almost like loud static? Scenario selection, Candy Space and the broom flying are three examples, but there are more. The songs sound fine when I try playing the mp3 files directly.

It also sometimes happens that key presses apparently don't register, or register doubly. Like I try to use some item and have to press the key twice for it to actually activate. Or I try to get some water in the Pretty Bottle and it immediately spills it. Maybe it's a timing problem?

I should probably make separate issues for these, huh? ^_^;

@vgperson

This comment has been minimized.

vgperson commented May 5, 2018

I don't get static for those tracks in RPG Maker nor EasyRPG, so I can say that's not a universal problem.

Using items appears to be the same in EasyRPG as in RPG Maker; the implementation is just (sometimes unavoidably) a bit janky. For instance, ideally the same button press would both position the Magic Broom and board it, but you usually have to press it twice to do the two parts of that.

For the bottle and others, there's a 0.2-second span between detecting a Confirm press and performing the equip item action, so other things can happen there... so I think sometimes you get a situation like "detected keypress, prepare to use item - obtain some water - you have water, so spill it." I'll have to see if removing those waits is safe and improves things.

@Ghabry

This comment has been minimized.

Member

Ghabry commented May 5, 2018

Thanks @vgperson for figuring out the reason.
Was again one of these off-by-one-frame timing problems...

Submitted a patch, should be merged in a few days.

Together with external ExFont loading. Yes, I noticed this file in the game root but I didn't knew that it is for us :).

@Ghabry Ghabry added this to the 0.5.4 milestone May 5, 2018

@carstene1ns

This comment has been minimized.

Member

carstene1ns commented May 5, 2018

The patch has been included in the git master. We will push a new release to google play in a bit...
Thank you all for the useful information!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment