[P] Playing Next Part of Sequence Errors When Load Data Music ID Is Absent

Post about any bugs or other issues that you find on AAO.

Moderator: EN - Forum Moderators

Post Reply
Posts: 3049
Joined: Sat Oct 17, 2009 12:20 am
Gender: Male
Spoken languages: English

[P] Playing Next Part of Sequence Errors When Load Data Music ID Is Absent

Post by Trybien »

User Agent String: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0
Link: http://aaonline.fr/player.php?trial_id=143265
What happened?: Transitioning to next part in a series prevents game to start due to music id in load data not being found.
What did you expect to happen?: Case starts when clicking play button
Can you reproduce the problem?: Yes. In part 1 create a music track and set it to play in the Storyboard. Transition to part 2, transferring data does not matter, but make sure the same music id does not exist.
What did you do before the problem showed up?: Loaded the game after transitioning from a previous part
Winner of the “Broken Commandments” Case Competition
User avatar
Posts: 382
Joined: Fri Jan 01, 2021 8:27 pm
Spoken languages: English

Re: [P] Playing Next Part of Sequence Errors When Load Data Music ID Is Absent

Post by TimeAxis »

I took a look at fixing this, and had a couple theories on possible fixes, but I can only create individual trials on my machine, not trial sequences, unless I install the entirety of AAO including the forum (something that doesn't have a nice step-by-step guide on how to do, so I'd be a bit lost), so for all practical purposes, I wouldn't be able to test it even if I were to fix it. Instead, I'll just share what I've found to hopefully save someone else some time if they give this a shot:

In player_actions.js in the function runFrameActionAfter, around line 471, there's a part where save data is prepared for jumping to the next part. Maybe setting currentMusicID to MUSIC_STOP there could fix this.

I had a few other more far-fetched ideas, but that one seems the most likely to me. If I were able to test it, I'd do the fix myself, but I can't.
Spoiler : If the above doesn't work :
Another place to look is in player_save.js in the loadSaveData function, on line 74, there's a line:

Code: Select all

This seems to trigger on all save loads, and for some reason the "if current_music_id != music_id" in the PlayMusic function on line 84 of player_sound.js doesn't seem to catch when you manually set current_music_id to either -1 or MUSIC_STOP through editing the URL, even though both values are shown as -1 through my browser's debugger. Maybe set current_music_id to null and change the above line to only call playMusic if it's not null, although that may be a bit hacky. Or maybe changing that if from a != to a !== might help? Anyway, I'm sure people more familiar with the code would have a better idea of this stuff.
Question Arcs (Threads Coming Eventually)
Gaiden Episodes
Champion of Turnabouts ★
Phoenix Wright: Ace Attornauts
The Curious Case of the Phantom Limousine (Coming Eventually)
The Imposter's Turnabout (Coming Maybe)
Posts: 76
Joined: Thu Aug 02, 2018 12:01 am
Gender: Male
Spoken languages: English

Re: [P] Playing Next Part of Sequence Errors When Load Data Music ID Is Absent

Post by Mosy »

I noticed tons of bugs related to next sequence as well.

TimeAxis, At this point you're keeping the forums more up to date about the code than even the mods XD
I always enjoy reading your findings in the code, they are super interesting!
If only this site got more stability updates to the code more frequently... :/
Live life as you enjoy it, pal!- :objection:
I guess not...
Post Reply