authorblues / bizhawk-shuffler-2

A script to randomly shuffle between games played in Bizhawk, with plugins to enhance the experience
MIT License
58 stars 21 forks source link

Allow Save States On Close #49

Closed Zombietrain5k closed 1 year ago

Zombietrain5k commented 2 years ago

Is your feature request related to a problem? Please describe. Not really...I have a peculiar use case. I'm currently playing through a 100+ RPG shuffler at 60 minute change overs.

Describe the solution you'd like Before closing Bizhawk, allow the script to prompt to make a save state of the current state of the game. Then resume when using the "Resume Previous Session" option keeping the timer where it was at.

Describe alternatives you've considered Right now it's only saving after a game transition. When having longer transitions (as in my case, 60 minutes) it would be cool to be able to quit in the middle and have the game start up again when you left off and continue the timer.

Additional context I feel like this could open the door for longer games being used in the shuffler. I was also thinking of a Koei game only shuffler (so a plethora of strategy games essentially).

Thanks for your consideration!

authorblues commented 2 years ago

I'm not sure if this is doable, but I will look into whether I can get a reliable hook into bizhawk closing such that I can run a script to do this. This seems like a perfectly reasonable and useful feature request.

nameless01234567 commented 2 years ago

Maybe this can help?

event.onconsoleclose -string event.onconsoleclose(nluafunc luaf, [string name = nil]) -Fires when the emulator console closes

I found here: https://tasvideos.org/Bizhawk/LuaFunctions