[SCRIPT] Setup for an automatic savestate selector
-
Yo, this is pretty neat! I might have to check it out.
-
Looks cool, thank you for the script !
Some ideas to improve and simplify:
- use
source
to include the RetroPie bash functions instead of replicating them inline. - instead of using the
onstart
scripts, use the user menu option for the Runcommand to run your script (https://retropie.org.uk/docs/Runcommand/#runcommand-menu-custom-scripts). - just use ImageMagick for generating the thumbnails and install it automatically during setup if not detected, there's no point in letting the users choose which one to install.
- use
-
@mitu Thank you for your input!
- I haven't used
source
with shell scripts before... I'll have to look at the script I copied those functions from. If that script does execute anything, can I just reference those functions? As I understand itsource
takes the whole file and puts it into my own file (in memory), which would also execute any code therein... - That is a good suggestion. I will make it so one can chose one option during install and switch the option with the settings menu itself
- I don't understand this point... The install scripts does install ImageMagick which is later used to create the thumbnail preview. To be precise,
montage
from ImageMagick is used to create that. PNGView is used to display the previews on top of a simple shell dialog. Is there something I didn't get?
- I haven't used
-
@jandalf81 said in [SCRIPT] Setup for an automatic savestate selector:
I haven't used source with shell scripts before... I'll have to look at the script I copied those functions from. If that script does execute anything, can I just reference those functions? As I understand it sourcetakes the whole file and puts it into my own file (in memory), which would also execute any code therein...
The RetroPie setup script has dedicated shell script files that only declare functions -
initfuncs.sh
,helpers.sh
- and don't execute code.I don't understand this point... The install scripts does install ImageMagick which is later used to create the thumbnail preview. To be precise, montagefrom ImageMagick is used to create that. PNGView is used to display the previews on top of a simple shell dialog. Is there something I didn't get?
No, it's ok - that's something I didn't understand - I thought you're using ImageMagick as an alternative to PngView and let the user choose between them.
-
@jandalf81 Nice work!
I would agree to @mitu, it's better to use the runcommand scripts/menus this provides all relevant enviroment to the script. I see that you also ripped out joy2key out of runcommand. If you are doing this you are not forced to stick withtab
andenter
If you invoke/0x20
you can use fselect dialog -
@mitu
I just updated the script so it now uses the JOY2KEY functions from~/RetroPie-Setup/scriptmodules/helpers.sh
... Had been stumped for quite a while on this. For future reference, at least the two JOY2KEY functions from that script need a variable$scriptdir
set to~/RetroPie-Setup
to work correctly. Without this variable, there's no error but it doesn't work either ;-)I call these functions with the same parameters as before, so it's still cursor key for axis/DPAD, ENTER for A, TAB for B, as I like that mapping.
@cyperghost
I'm fairly new to Shell scripts... What do you mean with your last sentence? -
awesome work.
Any chance the games can launch as normal and you use a hot key to open the save state menu.
i dont want the save menu to launch on every game.
Im probably just been fussy.
thank you. Keep up the great work
-
@legacy Thanks!
If you want this script to only optionally start before the ROM, that is exactly the suggestion @mitu made. I'll implement this as an option into the installer, so this script will either start every time with the ROM or be available in the RUNCOMMAND section USER MENU
If you're asking for a hotkey inside of the games itself, I don't think that's possible...
Did I get your request right?
-
@jandalf81 yes im happy, il look forward to the upgraded script,
Also any chance of a background image on the selection screen, is it possible.
thank you
-
Hopefully you won't have to wait long... ;-)
A background image is not possible, sorry. I'm already using some pretty hacky stuff to display the thumbnails on top of basically everything else... Basically, the dialog is in the main layer and the thumbnail previews are layered on top of that. No way to display anything behind the dialog that I know of. -
@jandalf81 , no probs, its working great.
-
@mitu @cyperghost @legacy
I have update the script and it's menu. SAVESTATE_SELECTOR can now be invoked by none, either or both ofRUNCOMMAND-ONSTART
andRUNCOMMAND-MENU
. Both options can be enabled and disabled via the settings menu. When started viaRUNCOMMAND-MENU
it also features two more menu items to return toRUNCOMMAND-MENU
or EmulationStation. I have added new screenshots to the IMGur album from the first post.
The installer script has not been updated yet. -
@jandalf81 if you use an own joy2key session you can set any key to it. So assinig key 0x20 offers usage of space key. This can be used for radio list buttons on dialog
-
@cyperghost Ah, now I see, thanks! At the moment I'm using only menus with dialog, though...
Also, I just updated both scripts so they work in conjunction. Until now, you could remove the local savestates using this script but they'd be re-downloaded on the next start (the sync process from the other script never will delete files on either side). Now, the delete dialog detects the other script and aks you to also confirm the deletion from the remote.
To update, simply re-run the online installation of both scripts.
-
A huuuuuuge THANK YOU for both scripts. I have now 3 Pi's (one stationary and two mobile) and customized anything possible to my needs from rewind function, til Background music. So your scripts are the cherry on the top of my build for a kind of a "luxury retrogame experience" :D
-
@jandalf81 I had a chance to install your scripts. The installer was as easy as can be. Surprisingly, I actually like having it automatically start when I load a rom. Some games I didn't even realize I still had a save (EVO - search for eden) and having it load only when a save is detected was an excellent idea. Thumbnails and deletions complete it.
Great work. I think it is near perfect just as it is, but I'm sure it'll mature & get even better just as @cyperghost scripts have.
-
@bizzar721 thx
It is always a pleasure to see the coding of others. Everybody gets his own style in writing programs and leaves his own signature in. The way this script is made is really clever and fulfills lots of demands users wanted.
At least it helps me to improve the OpenBOR script of joypad detection. I think I will implent them if OpenBOR will be run on higher version level as it now does. The keep your thumbs up for (hopefully) future development of the OpenBOR binary ;) -
Thank you all for your kind words! That means a lot to me
Both scripts implement vital functions (at least for me); cloud sync and easy savestate selection. I really hope they can be used by a lot more people. Also, I like to deliver "complete" solutions which is why I made the installer and menu scripts.
I understand that doing these things yourself is a major aspect of RetroPie for a lot of people. It is not for all, though. Some people just like to get ready-to-play boxes already doing the things they want. Either way, you can use the scripts as they are or you can customize them to your specific needs. Of course, both scripts still offer options for optimization or added features.
So, if you want to add something to my scripts or if you want to take something out of them to use in other projects, I'm fine with both. Either way, i just ask to be notified of it.
I myself will definitely keep on working on these scripts. I really need to stop playing with my RetroPie and start playing with my RetroPie... ;-)
-
@jandalf81 I really like your Savestate selector menu. My friend had a copy on his retropie and pointed me to this article.
When I go to perform the install, it attempts to find the PNGView binary on my system. When that shows up as Not Found, it tries to download the source and says 'Failed'. This closes out the install.
My connection looks to be valid so I'm wondering if something has changed in the last two months since anyone posted on this thread.
-
@Athimar
is the file/usr/lib/libraspidmx.so.1
available?
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.