Player icon indicating copy to clipboard operation
Player copied to clipboard

Maniac - Timing issue when a parallel process is running both before and after a save load while its condition is no longer valid

Open Mimigris opened this issue 6 months ago • 3 comments

Encountered this issue while testing the compatibility of EasyRPG with Maniac, by checking the OneShot EasyRPG adaptation I made a year ago.

Test project: Project1.zip

Interact with the event on the right, this will let a parallel process CE run, and pressing enter will do a save. Now, do the same thing with the one on the left, and do it to load the save file. On EasyRPG, doing so will display Right After Load to be enabled, while on Maniac, the game will display neither Right After Load or not Right After load to be enabled, unless you interact again with one of the signs, in which case it will consider.

It's a bit messy, but the key input detection done to do the save is set to to disable itself as part of the save script just before it. When you load the save file normally, either through Open Load Menu, the title screen, or the Load command in a normal context, the game will understand that said common event isn't supposed to be running (condition doesn't match), but will keep in mind where it was, so that when it is called again, it will also resume where it was.

If you attempt to load the save file done at this moment in EasyRPG, while said event is running, it seems that EasyRPG considers the fact that since it was running prior to the load, said event is still valid, and will as such directly make the event resume while it shouldn't.

Mimigris avatar Jun 29 '25 22:06 Mimigris

When the run condition of a parallel event is not fulfilled anymore it will stop execution when it "yields" e.g. Showing a message, Wait etc.

Somehow the Player does not do this when using the Load event command. 🤔

Ghabry avatar Jun 30 '25 10:06 Ghabry

It's not really that it doesn't do this as far as I can tell: if you just loaded the save file from this test using the Load command in a normal context, both Maniac and EasyRPG would have the same result. Here, from what I can tell, it's more that the game keeps in memory that before the load, the event was running, so it continues its processing after the save load which shouldn't occur.

Mimigris avatar Jun 30 '25 11:06 Mimigris

Interesting observation: The load code has special handling for when the Map Scene is active to prevent that data referenced is destroyed.

I tested now: A normal teardown (loading and Pop/Push the Map) is somehow not crashing anymore and fixes the bug you mention here (because then Maniac Load is exactly like "Normal load").

Guess some other bugs that required the workaround were fixed by now 🤔

Ghabry avatar Jun 30 '25 14:06 Ghabry