Author Topic: Custom XML lists  (Read 1996 times)

drmechxico

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Custom XML lists
« on: December 29, 2016, 12:53:06 AM »
I was wondering how data is pulled from XMLs. I was thinking of implementing custom images based on XML keywords.
For example instead of "genre" I was thinking of using a keyword like "decade" and based on that, do a reloadableimage thats "80s", "90s", etc.
The question is, how do I create an XML that would do that?

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1117
  • Karma: +18/-0
    • View Profile
    • Towel 42
Re: Custom XML lists
« Reply #1 on: December 29, 2016, 07:23:46 AM »
It's indirect. RetroFE pulls certain fields from the XML files to generate the meta.db database, and pulls the info from that database when loading a collection. Adding unsupported fields for games requires changes in the C++ code I'm afraid. The code for the collection information is more flexible  (e.g. information about NES).

Sent from my SM-G920F using Tapatalk


Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1117
  • Karma: +18/-0
    • View Profile
    • Towel 42
Re: Custom XML lists
« Reply #2 on: December 29, 2016, 07:25:46 AM »
As for your example, you could use year, and just use an 80s image for 1980-1989.

Sent from my SM-G920F using Tapatalk


drmechxico

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Custom XML lists
« Reply #3 on: December 30, 2016, 02:12:26 AM »
How does retroFE parse the info as to what xml list to use?

The predefined variables are manufacturer, year, genre, players and rating?

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1117
  • Karma: +18/-0
    • View Profile
    • Towel 42
Re: Custom XML lists
« Reply #4 on: December 30, 2016, 08:06:26 AM »
When booting, RetroFE checks whether meta.db exists. If it does not, it parses all XML files in the meta/hyperlists directory based on the supported fields, ignores all unsupported fields, and puts the information in the meta.db database. The games are listed under name that matches the XML file name. RetroFE matches that information with a collection either by name of the collection or by the metadata.type setting in the collection's settings.conf file if it exists. As an example:
The information in meta/hyperlists/Nintendo Entertainment System.xml will be put in the database under the collection Nintendo Entertainment System. If a collection is named Nintendo Entertainment System (without metadata.type set to something else) or a collection has metadata.type = Nintendo Entertainment System in the settings.conf file, RetroFE will pull the information from that part of the database by matching the filename of the rom to the database entry.

drmechxico

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Custom XML lists
« Reply #5 on: December 30, 2016, 07:02:13 PM »
When booting, RetroFE checks whether meta.db exists. If it does not, it parses all XML files in the meta/hyperlists directory based on the supported fields, ignores all unsupported fields, and puts the information in the meta.db database. The games are listed under name that matches the XML file name. RetroFE matches that information with a collection either by name of the collection or by the metadata.type setting in the collection's settings.conf file if it exists. As an example:
The information in meta/hyperlists/Nintendo Entertainment System.xml will be put in the database under the collection Nintendo Entertainment System. If a collection is named Nintendo Entertainment System (without metadata.type set to something else) or a collection has metadata.type = Nintendo Entertainment System in the settings.conf file, RetroFE will pull the information from that part of the database by matching the filename of the rom to the database entry.
So if I want a collection to use a specific XML list, I just save that as the metadata type?

Sent from my LG-LS980 using Tapatalk


Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1117
  • Karma: +18/-0
    • View Profile
    • Towel 42
Re: Custom XML lists
« Reply #6 on: December 30, 2016, 07:42:55 PM »
Correct. Just match the names or set the metadata.type in the settings.conf.

Sent from my SM-G920F using Tapatalk


KMetalMind

  • Newbie
  • *
  • Posts: 43
  • Karma: +1/-0
    • View Profile
Re: Custom XML lists
« Reply #7 on: January 01, 2017, 11:52:48 AM »
I seriously want custom metadata properties too  :D Iīve started to collect info about what games are single player, cooperative multiplayer or competitive multiplayer. Itīs really helpful for me as sometimes we want to try a new coop game in home and that way we can find them easier, as most multiplayer games are usually competitive.

Itīs also one of the few features I miss to finish my WIP layouts, although Iīll start releasing them earlier anyway  ;D

firewater

  • Full Member
  • ***
  • Posts: 144
  • Karma: +1/-0
    • View Profile
Re: Custom XML lists
« Reply #8 on: January 18, 2019, 07:52:03 AM »
Reviving this to add a vote for the suggestion. I'm currently doing stuff like using <rating> for plot, which is... wrong.