RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Skipping "The" in sorting game titles in EmulationStation?

    Scheduled Pinned Locked Moved Help and Support
    retropiesortordersorting roms
    36 Posts 13 Posters 8.0k 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.
    • Used2BeRXU
      Used2BeRX
      last edited by

      I'd really like to see this feature coded into EmulationStation. I can't believe after 20+ years of emulation that this is still an issue. "The" should not be displayed in the T's unless the next word begins with T. Putting ", The" at the end of a game looks hideous, and is just a lazy way to "fix" this problem.

      I'm hoping that somebody who knows how to do these things finally makes this a feature in EmulationStation since emulation on the Pi seems to have a very long future ahead of it.

      In the mean time, all of my games on every console will just have a long list of games that start with "The" until somebody codes this. I refuse to put ", The" at the end of the game titles.

      Sorry if that came off as rude. I'm usually pretty happy go lucky, but this issue has been a huge pet peeve of mine for 20 years now. :)

      BuZzB 1 Reply Last reply Reply Quote 1
      • BuZzB
        BuZz administrators @Used2BeRX
        last edited by BuZz

        @used2berx Make a suggestion - offer some ideas, but don't get agitated about it. If it upsets you so much, have you submitted a fix ?

        I really dislike it when people come across as entitled - as if somehow you are owed. The original author of ES never implemented this. No-one else has done it either. 20 years of emulation has nothing to do with it.

        Maybe someone will find the time, but moaning about it does nothing but annoy people.

        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

        Used2BeRXU 1 Reply Last reply Reply Quote 2
        • Used2BeRXU
          Used2BeRX @BuZz
          last edited by

          @buzz I've spent years of my life doing work for the community, and I continue to do it now. I'm not entitled, and I'm not acting entitled. I'm not moaning, and I said so in my post. I also apologized ahead of time if that came off as rude to anybody, so I'm not sure you got to the end of my post before you replied.

          I'm not a coder, and I don't care to learn how to code. I do the other work that anybody could do but nobody is crazy or OCD enough to do. I was just mentioning that it's ugly and I can't believe that nobody in 20 years has ever done this anywhere.

          BuZzB 1 Reply Last reply Reply Quote 0
          • BuZzB
            BuZz administrators @Used2BeRX
            last edited by BuZz

            @used2berx Instead of making the post and apologising at the end, maybe don't come across that way ?

            Don't forget that I have also read all your moaning and swearing over at another forum about RetroPie.

            To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

            Used2BeRXU 1 Reply Last reply Reply Quote 2
            • Used2BeRXU
              Used2BeRX @BuZz
              last edited by Used2BeRX

              @buzz You shouldn't post that site name. They offer roms there.

              Thanks. :)

              BTW... I have had a lot of good things to say about RetroPie, and if you read the bad stuff, you should probably take the time to read on and see how much I've been hyping it the last few months. My initial impressions were not good, but I do see a lot of potential.

              The fix I want done can't be done on the XBox. It takes too many resources and would break a few of the emulators that are already pushing the limits of the system to the max. It would just be nice if we could get that to happen on the Pi 3 that shouldn't have any problems handling the extra workload is all.

              1 Reply Last reply Reply Quote 0
              • S
                sub_atomic @joemommasfat
                last edited by sub_atomic

                @joemommasfat That's a slightly different request than mine, but a good one also. Could be fixed by sorting game titles by Name, then Release Date.

                Coding these changes is WAY beyond my capabilities, but I might know a guy who can make it happen. Haven't talked to him in years, but I'll send this to him and see what he says, thanks.

                1 Reply Last reply Reply Quote 0
                • J
                  joemommasfat
                  last edited by

                  Give this a try.

                  https://github.com/Joemommasfat/EmulationStation/commit/b02b9bfd8f23307625b0045101e67e23a5271ef0

                  If you want to use this, change line 139 of ~/RetroPie-Setup/scriptmodules/supplementary/emulationstation.sh

                      #[[ -z "$repo" ]] && repo="https://github.com/RetroPie/EmulationStation"
                      [[ -z "$repo" ]] && repo="https://github.com/Joemommasfat/EmulationStation"
                  

                  Then install emulation station from source.

                  After that, add a "sortname" entry to your gamelist.xml and it will sort on that rather than the default name. I tested it with the entry below, and Super mario world went to the top of the list in ES.

                                  <name>Super Mario World</name>
                                  <sortname>1111AAAAA</sortname>
                                  <desc>Mario’s off on his biggest
                  

                  If this works for people, I can put in a pull request and see if it gets into the retropie git.

                  Z meleuM S 3 Replies Last reply Reply Quote 1
                  • Z
                    Zigurana @joemommasfat
                    last edited by

                    @joemommasfat
                    Interesting approach, why not stripping out any article (if any) before doing the comparison in Filesorts.cpp?
                    There is little need to actually storing the scrubbed game-name, unless you foresee a use case for manually setting the sort order to something else?

                    If tetris has thought me anything, it's that errors pile up and that accomplishments dissappear.

                    1 Reply Last reply Reply Quote 0
                    • J
                      joemommasfat
                      last edited by

                      Well personally I've always wished Final Fantasy IX was listed after Final Fantasy VII in my list. Now I can set the "sortnames" to "Final Fantasy 9" and "Final Fantasy 7" but keep the display names with Roman numerals.

                      Z Used2BeRXU 2 Replies Last reply Reply Quote 0
                      • Z
                        Zigurana @joemommasfat
                        last edited by

                        @joemommasfat
                        I see, good. I like that your PR is nicely conservative in the sense that you only need to set a sort-name if you need to, as it falls back nicely on the regular game name.

                        To build on that, I think we will need some additional work if we want to support sorting of game franchise series, especially across platforms (tag @pjft). Maybe a combination of sort by name and date, or based on another new metadata entry called "series" or "franchise"?

                        If tetris has thought me anything, it's that errors pile up and that accomplishments dissappear.

                        1 Reply Last reply Reply Quote 0
                        • meleuM
                          meleu @joemommasfat
                          last edited by

                          @joemommasfat said in Skipping "The" in sorting game titles in EmulationStation?:

                          If you want to use this, change line 139 of ~/RetroPie-Setup/scriptmodules/supplementary/emulationstation.sh

                          Maybe using es-tests.sh can be simpler and avoid confusion. I posted about it here: https://retropie.org.uk/forum/topic/10626/es-devs-and-testers-this-tool-is-for-you

                          • Useful topics
                          • joystick-selection tool
                          • rpie-art tool
                          • achievements I made
                          1 Reply Last reply Reply Quote 1
                          • Used2BeRXU
                            Used2BeRX @joemommasfat
                            last edited by Used2BeRX

                            @joemommasfat said in Skipping "The" in sorting game titles in EmulationStation?:

                            Well personally I've always wished Final Fantasy IX was listed after Final Fantasy VII in my list. Now I can set the "sortnames" to "Final Fantasy 9" and "Final Fantasy 7" but keep the display names with Roman numerals.

                            That's a good solution you came up with there. Is there a way to automate this by comparing roman numerals to exact titles that also have them? That way you wouldn't have to go in and manually edit the gamelist.xml to make it happen.

                            We've been able to do that on the XBox for quite some time, actually. I'm going to talk to the dev and see what he did to make it work. I know it's automatic there. Maybe that would give us some ideas how to do it over here?

                            EDIT: The other problem was with games like Super Mario Bros. Before the fix on the XBox went in, unless you named them all Super Mario Bros. I, Super Mario Bros. II and Super Mario Bros. III, the first game would be at the end like this:

                            Super Mario Bros. 2
                            Super Mario Bros. 3
                            Super Mario Bros

                            dankcushionsD 1 Reply Last reply Reply Quote 0
                            • dankcushionsD
                              dankcushions Global Moderator @Used2BeRX
                              last edited by

                              @used2berx

                              We've been able to do that on the XBox for quite some time, actually. I'm going to talk to the dev and see what he did to make it work. I know it's automatic there. Maybe that would give us some ideas how to do it over here?

                              converting roman numeral > integer is a classic programming school homework question. it's very simple, so please don't ask on our behalf ;)

                              scrapers should populate the sortname in these obvious cases ("The Foo", "Foo IX", "Foo VII" etc)

                              Used2BeRXU 1 Reply Last reply Reply Quote 0
                              • Used2BeRXU
                                Used2BeRX @dankcushions
                                last edited by

                                @dankcushions That's cool. I'm not using a scraper for anything, so using this method I'd have to do all of these by hand unless the functionality was put into meleu's script. Not too bad if I only had to do it once, but if I ever created another one down the road from scratch I'd have to do it again.

                                I figured that part would be easy, I'm just going to find out how the dev did it and post what he says here. There are no tags for XBox emulation, so the program is able to do this based off of something else. There might be a much simpler solution to this issue. I'll let you know what I find out.

                                1 Reply Last reply Reply Quote 0
                                • S
                                  sub_atomic @joemommasfat
                                  last edited by

                                  @joemommasfat said in Skipping "The" in sorting game titles in EmulationStation?:

                                  If you want to use this, change line 139 of ~/RetroPie-Setup/scriptmodules/supplementary/emulationstation.sh
                                  #[[ -z "$repo" ]] && repo="https://github.com/RetroPie/EmulationStation"
                                  [[ -z "$repo" ]] && repo="https://github.com/Joemommasfat/EmulationStation"

                                  Then install emulation station from source.

                                  I get an error when I try to install ES from source following these instructions. I'm running RetroPie 4.4, is that the problem?

                                  1 Reply Last reply Reply Quote 0
                                  • J
                                    joemommasfat
                                    last edited by

                                    I think that bug should be fixed if you pull from my "stable" branch.

                                    On a related note, does anyone know the procedure for getting changes merged into the default repo? I put in a pull request last year to help with special sorting, that seemed to be well received.

                                    How do I put it to a vote to get it included in the default release?

                                    1 Reply Last reply Reply Quote 0
                                    • Drakaen391D
                                      Drakaen391
                                      last edited by

                                      Sorry if this is already in it....

                                      But any way to add this “fix” to the docs?

                                      RPi B & RPi 3B OC (Now Raspberry pi 4b 8gb)
                                      Retropie (Latest Stable)
                                      PiBox with Wind Tunnel Cooling System

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        sub_atomic
                                        last edited by

                                        Thanks for the help, @joemommasfat! I got this working on Sunday. It's a great, and essential, update as far as I'm concerned.

                                        J 1 Reply Last reply Reply Quote 0
                                        • J
                                          joemommasfat @sub_atomic
                                          last edited by

                                          @sub_atomic glad it worked for you. Maybe @jdrassa can help me get it accepted into the main repo?

                                          1 Reply Last reply Reply Quote 1
                                          • jeffjenxJ
                                            jeffjenx
                                            last edited by

                                            I can't believe <sortname> is not an option. It may just be because I'm using an NES Classic Emulationstation theme, but my sort option is labeled "sort by: filename, ascending".

                                            Interestingly, it is not sorting by the filename. It is sorting by the <name> node from the gameslist.xml.

                                            Even if the sorting did go by filename and the <name> node acted only as the display text, then we could have a secondary sort. But even that is broken.

                                            Should we contact the RetroPie repository administrators to see how to fast track this change? Seems fairly minor for such a useful library management option.

                                            E 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.