Where are the information favorite, hidden and kidgame stored?
-
I am currently looking through the source code of gamelist.xml metadata processing.
https://github.com/RetroPie/EmulationStation/blob/master/GAMELISTS.md
https://github.com/RetroPie/EmulationStation/blob/master/es-app/src/MetaData.cppWhat exactly is sortname? I don't get it.
Where are favorite, hidden, kidgame stored? When I search my gamelists, I cannot find these tags (or attributes?) in my xml. Aren't these part of the systems gamelist.xml files? Or did I make a mistake on my side maybe. -
@thelostsoul said in Where are the information favorite, hidden and kidgame stored?:
What exactly is sortname? I don't get it.
It's an alternative to the
name
tag, used only for sorting the gamelist, without changing thename
displayed in the gamelist. For instance, setsortname
to1. Legend of Zelda
and the game namedLegend of Zelda
would be shown at the top of the gamelist, without changing it'sname
.Where are favorite, hidden, kidgame stored?
In the
gamelist.xml
. -
Okay, found the tags by reading from live system. It was actually my mistake.
Shouldn't
sortname
have been an integer instead of replacingname
? Doesn't this alternative thing makes it unnecessary complicated? Not criticizing here, just want to know why this approach was chosen.https://github.com/muldjord/skyscraper/blob/master/src/screenscraper.cpp
What about the ages, tags, screenshot, cover, wheel from Skyscraper? Or aren't these actual tags? Don't know how such an output file looks like and if EmulationStation ignores them. -
@thelostsoul said in Where are the information favorite, hidden and kidgame stored?:
Shouldn't sortname have been an integer instead of replacing name? Doesn't this alternative thing makes it unnecessary complicated? Not criticizing here, just want to know why this approach was chosen.
Actually the opposite would make it more complicated - because you'd need to first add an order number to each list entry after sorting the list and then insert the new element there, then re-order the list againg. This way, you re-use the already existing sorting routine (alpha-sort) and just replace the
name
withsortname
, whensortname
is defined. Plus, to nitpick, it should be calledsortorder
and you could probably rid of the XML node and use just an attribute on thegame
node.What about the ages, tags, screenshot, cover, wheel from Skyscraper?
I don't know the details about all of these, they're probably translated into the frontend's supported metadata (Skyscraper supports more than EmulationStation).
-
I guess its more complicated to me to deal with sortname, but its easier to implement in the code of EmulationStation. And Skyscraper, ah yes, I forgot these tools support other systems as well. I am too much focused on RetroPie.^^
So thank you for explaining. I will study a bit more. If I have any questions, then I come back here. :-)
-
In EmulationStation I use "name" and "sortname" together with alphabetical sorting. No matter what the scraped ROM is named I can manually add the "sortname" to get all of my Pac-Man (or other series) games together.
e.g.
. . .
Night Slashers
Ninja Clown
Pac-Man
Ms. Pac-Man
Jr. Pac-Man
Ghost Muncher
Pengo
Popper
. . .I do the same thing to put all of my "Street Fighter II" games together. (e.g. Hyper, Super, etc.) And then there's the case of Ultimate Mortal Kombat 3.
-
@thelostsoul said in Where are the information favorite, hidden and kidgame stored?:
I guess its more complicated to me to deal with sortname,
Ok, I do not know what your background is, but @IanDaemon had a Point with his Use-Case Example. In Fact, I am curious(!) why you may consider sortname with an absolute number more usefull over an alphanumeric name? With Retropie I haven't used it so far, but within my Mediacenter Raspi (OSMC/Kodi) Setup, I use the Sortname alike to IanDaemon (1): To Group Items together in a certain Order, which would be sorted by just their name/title in totally different places. The sortname attribute is totally (AFAIK) optional, just leave it blank if you don't have the need to group/sort the item in question to another place. The Sortorder name isn't to be used as an absolute address, it is just an override for the regular title/name for the sorting algorithm to be able to group/place items together. As the Number of Items may change in time (Adding and Removing Roms; - @mitu already said it a few posts above:), with an absolute numeric pointer, you would need to reassign them with every change, but with an alpha-numeric sortname you are less prone to the need to change it everytime ;)
[1]: In my OSMC Case for the Star Wars Titles, to order the whole set within its canonical timeline, it would be (as an example): Episode III -> Sortname "Star_Wars_03_00", Solo -> Sortname "Star_Wars_03_01", Rouge One -> Sortname "Star_Wars_03_02", Episode IV -> Sortname "Star_Wars_04".
-
@Ashpool
I didn't state the sortname function wouldn't be useful. I just asked why the implementation was chosen this way, regardless of its usefulness. My question was why it is not implemented as a number and wouldn't this be easier for the programmer and user. My confusion arised from the statement that sortname can replace name. mitu explained it and IanDaemon showed an example, and that is fine. No complaints here.As I understand now, sortname will be used as name while sorting, but name is used for display. This is indeed more flexible and like you say less prone to error and changes. It makes sense now. I was just curious about this, because I never saw it before and just saw it while reading in the source code.
-
It's also a good thing to have when sorting alphabetically and wanting to keep release date/order within a series. I want the
Castlevania
games to be easy to find in the C's, butAria of Sorrow
should not be listed beforeHarmony of Dissonance
. I guess it just adds another layer of available sorting complexity...if you want to use it.I dig the feature and I'm glad it's there.
-
@IanDaemon that's exactly what I plan to use it for. All of the game sequels done with Roman Numerals can be displayed as the publishers intended but also in sequential order.
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.