MV (solved) trouble with HIME pre-title events pluggin

i'm wanting to have a more customized title screen. i'm trying to use the hime pre-title events plugin to have different choices than the default "new, continue, options" layout, have some choices hidden until certain persistent switches are flipped, etc.

unfortunately right now the "return to title screen" command breaks my game rather than returning to the assigned map. exiting from the pause menu works fine, just not the events with that command.

it looks like a weird plugin interaction i can't make sense of. or like my custom sprites are formatted wrong somehow. i saw in other threads that f8 shows error breakdowns, so i have screenshots of the errors and what f8 tells me. i'm putting all of them under labeled spoilers for the sake of space.

Spoiler: initial error screenshots
Screenshot 2024-05-15 122110.png
Screenshot 2024-05-15 122158.png

these are my plugins

Spoiler: plugin setup when the error occurs
Screenshot 2024-05-15 123332.png

and this is what happens when i turn the yanfly plugins off (since i'm just using them for the debug menu right now)

Spoiler: game error + f8 (yanfly off)
Screenshot 2024-05-15 124439.png

where am i goofing? let me know if there's any other screenshots that would help figure it out

update:

i did some more testing with mixed success. i decided to delete all the events on the map (they're all easy to rebuild) and remake the ExitDoor and player transparency events for ease of testing. surprisingly the Return to Title Screen command works!

the mixed part is a new bug came up in its place, which again doesn't occur doing Game End -> To Title. when the title transfer starts, the game flashes back to being not faded out for a frame or two. the same bug happens in a new test project.

i'm sure there's an explanation to why this is happening but i can't shake the feeling that it's "computer's haunted" 😅
There's no need to turn any Yanfly anything off, they're not listed at all in the error trace. Every file of code listed there is from the default core scripts.

That error from that line is saying that the current map is null (doesn't exist).

exiting from the pause menu works fine, just not the events with that command.
Does this mean that selecting Game End -> To Title from the menu works? But there's something else you're trying to do that doesn't?

Please show the event you're using, then, because Return to Title Screen ought to call the same code as To Title.
There's no need to turn any Yanfly anything off, they're not listed at all in the error trace. Every file of code listed there is from the default core scripts.
i gotcha. is there a reason why it lists YEP_CoreEngine.js:1098 in the first screenshot? my coding knowledge is pretty sparse

Does this mean that selecting Game End -> To Title from the menu works? But there's something else you're trying to do that doesn't?
that's correct. Game End -> To Title goes to the map i assigned and the events i made don't. here's screenshots of the two events that have Return To Title Screen on them that both have the same error.

Spoiler: exit door
Screenshot 2024-05-15 144700.png

Spoiler: bed
Screenshot 2024-05-15 144947.png

i only included the pages of both that i've tested. i assume the problems with these are in the other pages that use the same code format. thanks so much for taking a look!
i gotcha. is there a reason why it lists YEP_CoreEngine.js:1098 in the first screenshot?
Oh, I missed that. It's just using an altered version of that one function - you did the right thing trying it with that turned off.

Okay, so the code for the event command and the menu command are the same. The Hime plugin intercepts that command and replaces the scene so long as you have Use As Title set to true.

I don't immediately see how/why one of those would function and the other one not. You can try replacing the Return to Title Screen event command with this Script command:
Code:
SceneManager.goto(new Scene_PretitleMap())

but I honestly expect that to have the same result.
Oh, I missed that. It's just using an altered version of that one function - you did the right thing trying it with that turned off.
thank you for the explanation! troubleshooting has been melting my brain and i feel like i can't tell relevant details apart anymore lol

I don't immediately see how/why one of those would function and the other one not. You can try replacing the Return to Title Screen event command with this Script command:
Code:
SceneManager.goto(new Scene_PretitleMap())
but I honestly expect that to have the same result.
i gave it a shot and the result was slightly different. the error message no longer appears, but the script sends me to an empty map/black screen instead. doing Game End -> To Title from that empty map still works

edit: also thank you to who moved my thread! i didn't notice i was in the wrong spot
I can't duplicate your bug.

I made a new test project, put the Pre-Title Events in (and Yanfly's Core Engine for good measure).

Both quitting from the menu and using the event command take me to the title map as expected.

I can only suggest you go over any events on the map with a fine-toothed comb.
thanks for giving it a shot! this is unfortunately not the first time something has broken in a bizarre way in this project. i decided to delete all the events on the map (they're all easy to rebuild) and remake just the ExitDoor and player transparency events for ease of testing. surprisingly the Return to Title Screen command works!

despite everything, a new bug came up in its place. one which again doesn't occur doing Game End -> To Title. when the title transfer starts, the game flashes back to being not faded out for a frame or two. the same bug happens for me in a new test project. i'll edit my original post to reflect this.

i'm sure there's an explanation to why this is happening but i can't shake the feeling that it's "computer's haunted" 😅
Things you might try:
- remove the Fadeout Screen event command to see what it looks like naturally

- Fadeout Screen, turn the player's Transparent On, and make your title screen map be an empty, black one. Then, from there, use an Autorun event to transfer to what you're currently using for the title screen. It's possible the transition between scene types is messing with the fade.
- Fadeout Screen, turn the player's Transparent On, and make your title screen map be an empty, black one. Then, from there, use an Autorun event to transfer to what you're currently using for the title screen. It's possible the transition between scene types is messing with the fade.
this fixed the issue and helped me get on a track where i feel confident troubleshooting on my own again. thanks again for your help!

Original thread: https://forums.rpgmakerweb.com/threads/solved-trouble-with-hime-pre-title-events-pluggin.168706/