Please Test: Creating Custom Collections
-
@namyzark
What do you want more? A savegame system per user or a system view per user?
I think the system view per user is doable through the custom collections.
Create collections like
Name 1 - Favourite GameBoy
Name 2 - Favourite GameBoy
...@pjft
I asked for adding Y button for quick accessingcustom-collections
do you think this can be also usefull as "open a custom collections after ES startup"?
Optionally the Button B can be locked.... So no escape to other systems! -
What do you want more? A savegame system per user or a system view per user?
I think the system view per user is doable through the custom collections.
Create collections like
Name 1 - Favourite GameBoy
Name 2 - Favourite GameBoyThe issue here is that they will link to same rom and the save states will be overridden. In-fact, this will happen no matter what use case is used. The only way to avoid this is to have multiple versions of the same rom saved so each user has their own rom. Whether you symlink or use the built in ES system, they all use one ROM and therefore the users will be playing the same game and same save states.
-
@tmntturtlguy Yes... I know.
My intention is the following! But I won't code this otherwise my wife will decapitate me!!!- Create Favourites for every user as collection. That's an easy approch as collection files are simply txt files.
- Create a small script to set an active user to /home/pi/currentuser.txt ... It contains username "Julia"
- readout currentuser.txt ... and set user "Julia"
3.1 Julias collections are stored in a zip file which contains (Julias - GameBoy.cfg, Julias - SuperNES.cfg).... We extract Julia.zip...
3.2 Restart ES to load collection only for Julia
3.3 Load a ROM from Julias - GameBoy collection (Pokemon GOLD for GB)
3.4 runcommand-onstart.sh readout /home/pi/currentuser.txt to locate active user
3.4.1 runcommand-onstart.sh extracts zipfile "Julia_Pokemon Gold.zip" there are all files stored execpt the ROM, you can get romname with parameter given by runcommand.sh
3.4.2 Launch GB file Pokemon GOLD with Julia's savegames and SRM state
3.4.3 After 5 hours of intensive gaming Julias ends the game
3.4.4 runcommand-onend.sh stores all files to zip exept the ROM itself to "Julia_Pokeman GOLD.zip"
3.5 Start the script again and chosse annother user "Vika"
Replace Julia with Vika and start with 3.1
Got it now? It's just an shematic of how it can be done. I made nearly the same approch here to get all DOOM Wad files and it's savegames in one folder. Instead of WADFILE we will rather use USERNAME
-
@cyperghost I saw the suggestion, and thought a bit about that.
I'm not considering implementing that. The custom collections system is always at most 4 systems to the left of the first one. Also, the Y button is semantically associated with "toggling" a status while in the gameview, I don't feel there's a need to turn it into a navigation button in the system view.
Cheers.
-
@incunabula can't do that. The SD Card holder and reader on the Pi stopped working 'correctly' less than 2 weeks after I purchased my pi. I have a fix in place, but it is inelegant, and doesn't work well for 'easy' removing and reinserting cards.
@cyperghost - savegame system per user
@pjft is correct. With custom collections being so close at hand I have found an alternative. My answer is simple, although slightly annoying for the 'in house IT guy'.
- Create sub-folders in each primary game for each user in each system (only if needed)
- Make copies of games that each user needs their own save for into each users system sub-folder. Luckily space is not 'too much' of a limiting factor here
- Create favorite links to these sub-folders for each user.
- re-scrape all these 'new' ROM images
- Add new games to sub-folders as needed
- Repeat ad-nauseum
I'll still have 'too many' folders in the system list. But, since the 'custom collection' folders are so close at hand on start up, it becomes less of an issue since they do not have to scroll through them. The big issue here is peace in the household can resume with no one 'accidentally' overwriting someone else's save files, provided they stay out of each others Collection and user folders.
-
@pjft Thank you so far :) You have done a lot of improvement to ES and I'm very gratefull for this ;)
But what do you think about a tweak to select one system and open it at ES start?
So you start ES - GameBoy was setted as favourite starting system, and the gamelist menu of GB is opened?@namyzark
Okay unique savegames ;)An unique game-saving system per user selction is really easy. Get in touch with this topic
First you need zip support so install zip via
sudo apt install zip
RetroPie offers three methods to run scripts.
- runcommand-onstart.sh
- runcommand-onend.sh
- runcommand-menu
runcommand-menu can be entered if you press any button if the grey loading box appers, then you go to Option "User Menu" and there you can change user!
runcommand-onstart.sh will likely look like that and will extract user_savegame per rom (libretro saves and ROM battery saves) from zipfile if a user is correct setted.
#!/bin/bash # Example of how multi user savestate can be realized # cyperghost 08/22/17 # untested and written out of mind! if [[ -e "/home/pi/user.txt" ]]; then username="$(sed -n 1p /home/pi/user.txt)" rompath="${3%/*}" romname="${3##*/}" cd "$rompath" && unzip -qq -o "$username_${romname%.*}.ZiP" fi
runcommand-onend.sh will likely look like that, this will archive all savegames in archive with username. Files will be removed after merged into archive!
#!/bin/bash # Example of how multi user savestate can be realized # cyperghost 08/22/17 # untested and written out of mind! if [[ -e "/home/pi/user.txt" ]]; then username="$(sed -n 1p /home/pi/user.txt)" rompath="${3%/*}" romname="${3##*/}" data="${3##*.}" cd "$rompath" && zip --exclude=*.$data* -mj "$username_${romname%.*}.ZiP" "${romname%.*}".* fi
runcommand-menu will likely contain one file for each user
Username is Julia.
Sojulia.sh
looks like#!/bin/bash echo "Julia" > /home/pi/user.txt
We need a "DEFAULT USER" that removes user.txt
default.sh
#!/bin/bash rm /home/pi/user.txt
That's all untested and written out of my mind!
Updated: It's tested now and works!
See this as a bare way!
EDIT
@namyzark
Well I had annother idea and tested the bash files... There was just one small error in that is elimanted now. So there here it is: Multi User support for savegames! -
@cyperghost said in Please Test: Creating Custom Collections:
But what do you think about a tweak to select one system and open it at ES start?
So you start ES - GameBoy was setted as favourite starting system, and the gamelist menu of GB is opened?That would be a separate change altogether, something to allow you to choose what's the first system to be selected.
I personally am not going to implement that unless there is clear, strong demand for such a use case, and it'll go into the backlog of things I still am to do. :)
-
I know this is an old topic but I didn't see anywhere else I could put this.
Would it be possible to edit custom collection "metadata" that does not change the original system's metadata? Here's an example:
NES System:
AAAAA rom
AAAAB rom
BBAAA rom
BBBAC rom
CCCCC romCustom Collection:
1 BBAAA rom
2 AAAAB rom
3 AAAAA rom
4 CCCCC rom
5 BBBAC romThat way, in the custom collection, we can edit the rom's name as displayed in emulation station, but the original system is unaffected. The .cfg file could look like this maybe:
/home/pi/RetroPie/roms/nes/DuckTales (USA).nes "1 DuckTales [NES]"
So that the custom collection knows to look at /nes/DuckTales, but names it as "1 DuckTales [NES]".
Just a thought for further customization.
At the moment, my workaround for this is to set the order I want the roms to be in by changing the number of players for that game in its metadata. Instead of showing the number of players with my metadata shown, I've made a background image that says "Rank" and the number of players is shown next to it. I can then sort all roms by number of players, ascending, if I want the roms to be displayed in order, but this seems to reset whenever I turn of emulation station.
-
@hubbachubba Hi, and thanks for the note.
There are no plans to add this level of customization to support this specific use case at this stage.
If you'd want to enable something like this, perhaps a workaround could be a mix of this method and the other method for custom collections based on symlinks, or even just the other method altogether.
If I recall correctly @meleu, @TMNTturtlguy and @cyperghost were the masterminds behind it and I imagine you could make it work. It may require a bit more work to set up - and, to be clear, it's not as if it's an official/supported method (in the sense that you will have to do a few more advanced things on your own), but it might just be what you're looking for.
You'd then set up a gamelist.xml with the right names.
Read up on it and see if it'd do the job for you.
Best of luck.
-
@pjft said in Please Test: Creating Custom Collections:
If you'd want to enable something like this, perhaps a workaround could be a mix of this method and the other method for custom collections based on symlinks, or even just the other method altogether.
Yes you're that could be a method indeed. Annother approch was my Little Favourite Launcher this could defintly be the right usecase as it uses "real" filenames so you can rename them as you like.
@pjft Thanks for reminding ;) And you are the master(brain) of custom collections ;) What do you want to do today?
-
@pjft said in Please Test: Creating Custom Collections:
If you'd want to enable something like this, perhaps a workaround could be a mix of this method and the other method for custom collections based on symlinks, or even just the other method altogether.
Yeah, I first started with this method. Had the gamelist.xml all sorted out and everything. But for some reason the runcustom.sh wasn't working for me there. You can see the last comment that I made on that topic.
Either way, what I have now works for me, just thought it would be a cool expansion on this useful tool.
Thanks again
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.