Skip to content
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

Memory of Moshimo: Monster "Turn End Processing" (ターン終了処理") displayed #2153

Closed
Ghabry opened this issue Apr 14, 2020 · 7 comments · Fixed by #2399
Closed

Memory of Moshimo: Monster "Turn End Processing" (ターン終了処理") displayed #2153

Ghabry opened this issue Apr 14, 2020 · 7 comments · Fixed by #2399

Comments

@Ghabry
Copy link
Member

Ghabry commented Apr 14, 2020

Name of the game:

Memory of Moshimo
http://vipkohaku2013.web.fc2.com/ent/18.html

https://cloud.mastergk.de/f/5818bfeadfd54cd68aad/?dl=1

Describe the issue in detail and how to reproduce it:

Start a battle test.
Because of bad sanity checks (out of bounds monster access via (*Main_Data::game_party)[target]) the first battles crash.
Use Battle 16. At first a slime is displayed (Correct), then a bat (Wrong).

This bat is called "ターン終了処理" (Turn End Processing) and must be invisible.

Another case of "You never notice this without knowing the language" :)

@Ghabry Ghabry changed the title Legend of Moshimo: Monster "Turn End Processing" displayed Legend of Moshimo: Monster "Turn End Processing" (ターン終了処理") displayed Apr 14, 2020
@fmatthew5876
Copy link
Contributor

I haven't looked at this yet in any detail, but this game is doing some crazy stuff with battle events. It has call event commands in it's battle events which must have been injected by some third party tool.

I'm not sure if it's related, but one refactor I want to do is to kill the Map and Battle interpreter classes and just have 1 interpreter class which can handle all event types.

@Ghabry
Copy link
Member Author

Ghabry commented Apr 15, 2020

Call Event should be supported by our battle interpreter. Only stuff that makes no sense wihle battle is open (and breaks RPG_RT when used) is in the map interpreter.

@Ghabry Ghabry changed the title Legend of Moshimo: Monster "Turn End Processing" (ターン終了処理") displayed Memory of Moshimo: Monster "Turn End Processing" (ターン終了処理") displayed Apr 15, 2020
@Ghabry
Copy link
Member Author

Ghabry commented Apr 15, 2020

"ターン終了処理" has a hacked HP value of 0, so it is already dead. But there must be a reason why they make this monster "visible".

@fmatthew5876
Copy link
Contributor

fmatthew5876 commented Apr 19, 2020

Looked into this just a little.

When I run battle test 16 with RPG_RT on locale emulator, I don't see the slime. But my RPG Maker Editor (also under locale emulator) doesn't show a graphic for the first few monsters (I see other monsters / assets). So maybe it's a missing asset / locale or japanese RTP problem?

One clue is that RPG_RT's version of Game_Battler::Exists() checks for hp > 0 && notHidden whereas ours does hasDeathState && notHidden. This monster has 0 hp but I don't believe (not fully verified) it ever has "death" state.

The RPG_RT analogue of our Game_Battler::CanAct() works like ours where it just checks for a do nothing state restriction.

So an enemy with 0 max hp could simultaneously be able to "act" but also not exist. They must be exploiting some consequence of this for a reason.

This one runs rather deep, and probably needs a standalone testgame to study further. Just changing our Exists() to do what RPG_RT does didn't fix it, and even if it did such an invasive change would need to be carefully evaluated for regressions / unintended consequences.

@fmatthew5876
Copy link
Contributor

The download link is no longer valid here :(

fmatthew5876 added a commit to fmatthew5876/Player that referenced this issue Oct 17, 2020
@fmatthew5876
Copy link
Contributor

fmatthew5876 commented Oct 17, 2020

This is now fixed by #2399

Changing IsDead() to check hp instead of the state does the trick, but the last time I tried this I missed the fact that you also need to call DetectStateChange() on the battler sprite. This change is the right one, because everywhere RPG_RT checks for death, it checks for hp == 0

With #2399, there is no more need for DetectStateChange() for enemies, since the Draw() function just checks for death and does the right thing.

@Ghabry Please retest and verify this one

@Ghabry
Copy link
Member Author

Ghabry commented Oct 17, 2020

I wrote a yahoobox downloadscript so I actually got all of them 👍

I updated the download link.


At least from a visual point of view it is correct but I need to do more tests.

I can't really say if the battle is fully functional because I never ran it past the first turn.
Also getting an "Invalid Actor 0" warning but this is also in master.

@Ghabry Ghabry added this to the 0.6.3 milestone Oct 17, 2020
fmatthew5876 added a commit to fmatthew5876/Player that referenced this issue Oct 22, 2020
fmatthew5876 added a commit to fmatthew5876/Player that referenced this issue Oct 23, 2020
fmatthew5876 added a commit to fmatthew5876/Player that referenced this issue Oct 23, 2020
fmatthew5876 added a commit to fmatthew5876/Player that referenced this issue Oct 26, 2020
fmatthew5876 added a commit to fmatthew5876/Player that referenced this issue Nov 1, 2020
fmatthew5876 added a commit to fmatthew5876/Player that referenced this issue Nov 8, 2020
fmatthew5876 added a commit to fmatthew5876/Player that referenced this issue Nov 9, 2020
fmatthew5876 added a commit to fmatthew5876/Player that referenced this issue Dec 2, 2020
fmatthew5876 added a commit to fmatthew5876/Player that referenced this issue Jan 10, 2021
fmatthew5876 added a commit to fmatthew5876/Player that referenced this issue Jan 11, 2021
fmatthew5876 added a commit to fmatthew5876/Player that referenced this issue Jan 11, 2021
fmatthew5876 added a commit to fmatthew5876/Player that referenced this issue Feb 17, 2021
fmatthew5876 added a commit to fmatthew5876/Player that referenced this issue Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants