ZedSpot Posted September 28, 2016 Share Posted September 28, 2016 I have been going through my collection and revamping all the metadata I include in the game. One that is very important for me is the number of players. Now, within Launchbox I can easily edit a custom "Player" field to include this information. But when I go into the XML I cannot find that info anywhere. Can anyone give insight into where this data may be stored? Thanks. Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted September 28, 2016 Share Posted September 28, 2016 Hi @ZedSpot, there's a separate CustomField section that contains this data. Search for <CustomField> and you should find it I think. Quote Link to comment Share on other sites More sharing options...
ZedSpot Posted September 28, 2016 Author Share Posted September 28, 2016 Well there it is! Thank you very much! 1 Quote Link to comment Share on other sites More sharing options...
ZedSpot Posted September 29, 2016 Author Share Posted September 29, 2016 Hey Jason, One follow up question, I'm not sure if you can shed any light on. In the XML it appears to me as there is no order to the list of games. It's not stored alphabetically by title or even Launchbox ID. It doesn't appear to be listed by date added or any other criteria of the metadata. I'm hoping to find a way to edit the XML directly so that I can batch some of this information, but I can't for the life of me figure out why the games are in the order they are. Thanks for your help with the previous question. I seriously love your work with this project and try to spread the word about it to anyone who will listen! Quote Link to comment Share on other sites More sharing options...
mcfilmmakers Posted November 6, 2017 Share Posted November 6, 2017 How do I use the custom field in my theme? Say i have a custom field called Controller with the value Joystick. How do I call it in the theme? SelectedGame.Controller doesn't work. Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted November 6, 2017 Share Posted November 6, 2017 @ZedSpot Sorry I missed this. There truly isn't any particular order to the way the games are stored in the XML. When the order doesn't matter, it's always faster just to write them out in random order. The good news is that if you're looking to generate XML, you don't have to worry about the order. @mcfilmmakers Unfortunately that may require a plugin for the moment. There's a method that you can use called SelectedGame.GetAllCustomFields() which returns an array of ICustomField, but I don't think there's a good way to get at the data in XAML without using a plugin currently. Quote Link to comment Share on other sites More sharing options...
KobraKid1337 Posted July 8, 2019 Share Posted July 8, 2019 On 11/6/2017 at 11:40 AM, Jason Carr said: Unfortunately that may require a plugin for the moment. There's a method that you can use called SelectedGame.GetAllCustomFields() which returns an array of ICustomField, but I don't think there's a good way to get at the data in XAML without using a plugin currently. How would one go about creating such a plugin? I'm pretty well-versed when it comes to programming but have no experience with XAML or C#. I've been able to use a ListBox in XAML to expose all of the custom fields for a given game, but I can't filter it down to just the one field I want. Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted July 8, 2019 Share Posted July 8, 2019 15 hours ago, KobraKid1337 said: How would one go about creating such a plugin? I'm pretty well-versed when it comes to programming but have no experience with XAML or C#. I've been able to use a ListBox in XAML to expose all of the custom fields for a given game, but I can't filter it down to just the one field I want. There are lots of C# tutorials out there, so I would start there and learn the basics; it should go pretty quick. You shouldn't need to learn XAML for that in particular. You can just use a WPF custom control and output it directly from C#. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.