Skipping "The" in sorting game titles in EmulationStation?
-
It comes out formatted with 8 space indentations for sub elements. Here is an excerpt of my snes gamelist (for a modified entry).
<?xml version="1.0"?> <gameList> </game> <game id="3669" source="theGamesDB.net"> <path>./Addams Family, The - Pugsley's Scavenger Hunt (USA).zip</path> <name>Addams Family, The: Pugsley's Scavenger Hunt</name> <desc>As if things weren't ooky enough!...</desc> <image>~/.emulationstation/downloaded_images/snes/Addams Family, The - Pugsley's Scavenger Hunt (USA)-i mage.jpg</image> <releasedate>19930201T000000</releasedate> <developer>Ocean</developer> <publisher>Ocean</publisher> <genre>Platform</genre> <players>1</players> </game> </gameList>
-
Thanks, that's very interesting. Will play around more next time I write a script for the gamelist. Maybe it was just when I added new subelements that those weren't indented like the others, not sure anymore. I also didn't use the encoding parameter in the tree.write. Thanks again for reply!
-
@joemommasfat Thanks for sharing the Python script. It is a workaround, but I really don't like the look of ", The" at the end of game titles. There has to be a way for ES to skip "The" when sorting games in the GUI, so that your games would sort like this:
Kirby Super Star
Kirby's Dream Land 3
The Legend of the Mystical Ninja
The Legend of Zelda: A Link to the Past
Lemmings
Lord of Darkness
The Lost Vikings
Lufia & the Fortress of Doom
Magical Pop'n
The Magical Quest Starring Mickey Mouse
Mario Paint
Mega Man 7 -
Not sure, I guess it's a matter of preference. I prefer the sorting as it is, with all the games in a group to start with the same letter, makes it easier to scan through them for me.
-
@jell You walk into a record store, where are The Beatles, in the B's or the T's? Proper alphabetical sorting should always ignore articles.
-
I guess the short answer is no, that is not a current feature of emulationstation. It has been mentioned before, but so far no one has implemented it.
Why not take a crack at it?
https://github.com/RetroPie/EmulationStation/blob/master/es-app/src/FileSorts.cpp
-
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. :)
-
@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.
-
@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.
-
@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.
-
@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.
-
@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.
-
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.
-
@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? -
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.
-
@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"?
-
@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 -
@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
andSuper Mario Bros. III
, the first game would be at the end like this:Super Mario Bros. 2
Super Mario Bros. 3
Super Mario Bros -
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)
-
@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.
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.