RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    How To Create Favorites System in Retropie (yes system, not folder!)

    Scheduled Pinned Locked Moved Ideas and Development
    favoritessystememulationstaion
    57 Posts 10 Posters 16.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • meleuM
      meleu @TMNTturtlguy
      last edited by

      @TMNTturtlguy Here is an example of the results (I used your arcade theme from ComicBook for favorites):

      0_1496559702720_rsz_captura_de_tela_de_2017-06-04_035813.jpg

      The games:

      • G.I. Joe (NES)
      • Sonic (Mega Drive)
      • Tekken Advance (Gameboy Advance)
      • Wall Jump Ninja (Atari 2600)
      • X-Men (SNES)
      • Useful topics
      • joystick-selection tool
      • rpie-art tool
      • achievements I made
      1 Reply Last reply Reply Quote 0
      • pjftP
        pjft
        last edited by

        Give me a couple of weeks, as this is in my backlog of "fun things to implement on ES", as mentioned in a few other posts. :)

        Just want to make sure the screensaver stuff is merged into the main branch, so I can move on to other things.

        TMNTturtlguyT 1 Reply Last reply Reply Quote 2
        • meleuM
          meleu @Sano
          last edited by meleu

          @Sano said in How To Create Favorites System in Retropie (yes system, not folder!):

          BTW all my roms stay zipped when the emulator allows it, so checking for suffix wouldn't work for me :)

          The script works for everyone that stores the ROMs in valid places (I mean ~/RetroPie/roms/SYSTEM_NAME). The script has nothing to do with suffix and I think it would work for you.

          Edit: FYI, all my ROMs on my example above are zipped and they worked just fine.

          • Useful topics
          • joystick-selection tool
          • rpie-art tool
          • achievements I made
          1 Reply Last reply Reply Quote 0
          • SanoS
            Sano
            last edited by

            @meleu Yes, I understand your piece of code is looking for the symbolic link target, so it's based on the system rom folder.
            I was actually talking about @lilbud script ;)

            lilbudL 1 Reply Last reply Reply Quote 1
            • lilbudL
              lilbud @Sano
              last edited by

              @Sano I could never get that script to work. It would always crash

              Creator of the Radiocade: https://retropie.org.uk/forum/topic/6077/radiocade

              Backlog: http://backloggery.com/lilbud

              1 Reply Last reply Reply Quote 0
              • TMNTturtlguyT
                TMNTturtlguy @meleu
                last edited by

                @meleu thanks! I think I am still misunderstanding. Do I still need to copy or move my roms into the /roms/favorites folder? When I read your instructions I am thinking you were trying to avoid placing the roms in the roms/favorites folder because of your comments on pax games.

                Thanks!

                1 Reply Last reply Reply Quote 0
                • SanoS
                  Sano
                  last edited by Sano

                  Nope, in oder to avoid copying the roms data (very space inefficient), you have to create a symbolic link in the favourite folder, which target your rom in its original system folder.
                  It's the purpose of this line :
                  ln -s ~/RetroPie/roms/nes/MyFavoriteNesGame.nes ~/RetroPie/roms/favorites/MyFavoriteNesGame.nes

                  After this, @meleu script will simply look at the target of the symlink (the folder of the original rom file) to determine the system to use.

                  TMNTturtlguyT 1 Reply Last reply Reply Quote 1
                  • TMNTturtlguyT
                    TMNTturtlguy @pjft
                    last edited by TMNTturtlguy

                    @pjft thanks, I know this is on your radar, however I am not sure ES needs to a changed to do what I am trying to do. All I am doing is replicating what the arcade system does. I am creating a system that can store and launch any rom from any system. Like arcade can hold mame, fba, and neo get in one system, the Mario system per @lilbud can hold nes,SNES,n64,go,gba,nds, etc.

                    The original steps I created do exactly what the arcade system does. No changes to Es required. The arcade folder requires that you select the emulator type at Rom launch, so does my new system, again, Mario in @lilbud case. @lilbud was just looking for a way to avoid having to select the rom emulator for each rom in his folder. I think this has gotten more complicated than intended.

                    All this is, is a simple instructions on how the arcade system works, and how you can create any system you want.

                    Thanks for all the help and look forward to more development on this front!

                    Eidit: I finally understand @meleu script and it is brilliant, but also fairly complex. I think it is great if you want the rom in 2 places for sure!

                    1 Reply Last reply Reply Quote 1
                    • TMNTturtlguyT
                      TMNTturtlguy @Sano
                      last edited by

                      @Sano @meleu wow, now I get it! It was 2:30 am when I read your script @meleu so please forgive me. I now see that i replace the "myfavoritenesgame" with the actual rom name! I feel dumb now....I was reading that as a subfolder name within the NES folder. My mistake!

                      1 Reply Last reply Reply Quote 1
                      • pjftP
                        pjft
                        last edited by

                        @TMNTturtlguy not a bother - this is a nice use case even for custom folders and collections...

                        A question around these symlinks, though: would they only work on the SD card/on a Linux partition, or if you have a USB drive formatted as FAT32 with the roms, would that still work as well?

                        TMNTturtlguyT 2 Replies Last reply Reply Quote 2
                        • TMNTturtlguyT
                          TMNTturtlguy @pjft
                          last edited by TMNTturtlguy

                          @pjft I haven't had a chance to test yet and won't for a few hours. Maybe @meleu can answer.

                          To your point, this will probably only work if the USB you are using is in use with the ad card that the script was run on. Example. I have 2 separate builds each running off an 8gb ad card. I have just one 128 USB drive with all my roms. If I run the script in build A it should work fine. When I remove my USB and place it in build b it will not work because the USB drive does not include any of the runcommand.cfg files or es_sytem files. You would have to do a duplicate setup on build b. I am not positive this is the outcome, but just projecting this thought.

                          Edit: I should clarify this is the case with or without the script. You would need to set up the favorites or "any system name" folders and .cfg files on both systems sd cards either way.

                          1 Reply Last reply Reply Quote 0
                          • TMNTturtlguyT
                            TMNTturtlguy @pjft
                            last edited by

                            @pjft said in How To Create Favorites System in Retropie (yes system, not folder!):

                            @TMNTturtlguy not a bother - this is a nice use case even for custom folders and collections...

                            @pjft - question regarding your upcoming work on the favorites, I am assuming your work will be geared towards selecting roms and have them moved or linked to the favorites folder much like the script that @meleu has written, however as he has stated, it will be handled in ES and not a "hack" to make it work. Your work will not include the creation of custom systems though, like Mario, or Batman, or Sports? Is that a fair statement.

                            If the above is true, i think i will spend some time to develop a few systems in my theme and then start a completely new post and change the name from "Favorites" to something on the line of "Custom Systems". In hind sight I should never have called this thread favorites, I only did that as it was a hot topic and i had a system logo created for it! Then users can choose to copy their roms into their custom system, or move them to the system so they only exist once. They will also have the ability to run @meleu script if they choose. But this won't be a tutorial on how to create favorites, I will leave that to you expert coders, this will be geared towards creating any system with the expectations is works like the Arcade folder. You place your roms and gamelist there and you set your emulator for each rom.

                            pjftP meleuM 2 Replies Last reply Reply Quote 0
                            • pjftP
                              pjft @TMNTturtlguy
                              last edited by

                              @TMNTturtlguy Correct, only favorites.

                              There's no problem in calling this "Favorites" - I think it's a great use case. In fact, I might not have "Favorites" working before we actually have Favorites in ES, but the groundwork would be done.

                              Cheers!

                              1 Reply Last reply Reply Quote 2
                              • meleuM
                                meleu @TMNTturtlguy
                                last edited by meleu

                                @TMNTturtlguy hey bro, I liked your work here. This was a creative solution. And I'm thinking about making a menu for Mega Man games (but I'm still a bit afraid to play with those CG softwares. Will they bite me? :) ). But I can predict some problems with creating favorites as a system (like the arcade system):

                                • it's harder to manage, if you add a favorite game for a new system, you need to edit configs/favorites/emulators.cfg
                                • your configs/favorites/retroarch.cfg will ovewrite those you tweaked for a specific system.
                                • if you launch a game in the favorite menu and save a state, when you launch the same game in the normal system menu you won't be able to load that state.
                                • if you launch a game that has the feature to save (like most RPGs), then the saves will be .srm files in the roms/favorites/ folder, and, again, you won't be able to load your progress when launching the same game in the normal system menu.

                                That little script looks complex, due to the regular expressions part, but it's quite simple (I added the comments to make it simple to understand for those who aren't familiar with regex). And it also can work around the problems I listed above.

                                @pjft The symbolic link itself must be in a Linux partition, the target file can be in any partition. But if I was able to code this in ES I would implement this creating/editing a favorites/gamelist.xml files with fullpath entries, not symbolic links. Then the roms/favorites/ folder would have only one file: gamelist.xml. To launch a favorite game would be another issue to solve, a little tweak on runcommand can solve, but needs to be elegant enough to make BuZz accept it. :)

                                • Useful topics
                                • joystick-selection tool
                                • rpie-art tool
                                • achievements I made
                                pjftP TMNTturtlguyT 2 Replies Last reply Reply Quote 1
                                • pjftP
                                  pjft @meleu
                                  last edited by

                                  @meleu don't worry, this will be elegant. I don't want people to have to create a separate manual gamelist - I'd rather have this fully managed within EmulationStation and with the favorites system. :)

                                  1 Reply Last reply Reply Quote 3
                                  • TMNTturtlguyT
                                    TMNTturtlguy @meleu
                                    last edited by

                                    @meleu thanks for the kind words and all your help! I now you are in support and i appreciate it! I have a few comments for the issues you bring up, I already have thought about these and just need some time to get everything put together:

                                    it's harder to manage, if you add a favorite game for a new system, you need to edit configs/favorites/emulators.cfg

                                    I am going to create a folder called AllSystems in the opt/retropie/configs in that folder i will update the emulators folder to contain at minimum the main package emulators. A user can simply copy the AllSystems folder into the configs folder and they never need to add an emulator. Downside, a lot of emulators to wade through the first time you enter a new game.

                                    I will also remove the default tag in the emulators.cfg making it required that you select an emulator the first time you run the rom.

                                    I will also provide an es_systems code that has all the .zip or .nes etc extensions. Also, all of the different custom systems you create will be able to reference the AllSystem folder for its startup and runcommand. This way there is no need to modify any of those settings. To create a new system, just copy Mario and create MegaMan. Change the rom path from Mario to MegaMan and the theme path, and you are set. The emulators and runcommand would be identical. No user input need except creating the roms folder, theme, and editing the es_systems.cfg.

                                    your configs/favorites/retroarch.cfg will ovewrite those you tweaked for a specific system.

                                    Yes, if you are using your script, however if you put a new copy of the rom in the folder, ie, mario folder, then it will have its own profile. - To your point, this will either require 2 copies of the rom on your machine, or you only have the rom in your mario system and not the NES. That is why this is not really a "favorites" as we have been talking about it in other uses on the forum, this is a standalone system, we can just call it favorites, or anything else you want.

                                    if you launch a game in the favorite menu and save a state, when you launch the same game in the normal system menu you won't be able to load that state.
                                    if you launch a game that has the feature to save (like most RPGs), then the saves will be .srm files in the roms/favorites/ folder, and, again, you won't be able to load your progress when launching the same game in the normal system menu.

                                    Correct, same comment as above.

                                    As for your script, you are right, i shouldn't have used complex, it is genius and works great. What i meant is that it is involved. I need enter every rom i want to create a link to and run it. Not much difference in effort than setting up which emulator to run the rom from. What it does do is eliminate the duplicates of roms on your system. It also causes all of the other issues you have listed above, which was never the intent of this setup. Again this should run just like Arcade, with just a lot more emulators in it.

                                    1 Reply Last reply Reply Quote 0
                                    • CapemanC
                                      Capeman @mattrixk
                                      last edited by

                                      @mattrixk said in How To Create Favorites System in Retropie (yes system, not folder!):

                                      I don't know when I'll have a chance to test this, but thank you for all your work putting it together, and more people need to see it.

                                      It works, I set up a menu like this on my arcade a few weeks back just like this, works like a charm

                                      Vector Artist, Designer and Maker of Stuff: Laser Cut Atari / Pixel Theme Bartop

                                      1 Reply Last reply Reply Quote 1
                                      • fernbuildsF
                                        fernbuilds @TMNTturtlguy
                                        last edited by

                                        @TMNTturtlguy i am on AM running it on my Pi3

                                        TMNTturtlguyT 1 Reply Last reply Reply Quote 0
                                        • TMNTturtlguyT
                                          TMNTturtlguy @fernbuilds
                                          last edited by

                                          @fernbuilds are you running emulationstation or attract mode?

                                          fernbuildsF 1 Reply Last reply Reply Quote 0
                                          • fernbuildsF
                                            fernbuilds @TMNTturtlguy
                                            last edited by

                                            @TMNTturtlguy AM robospin_V4 to be exact. on a RaspberryPi 3

                                            TMNTturtlguyT 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            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.