Search the Community
Showing results for tags 'playlists'.
-
********** EDIT - This functionality now superseded by PinballX v4.50 Filtered Lists - https://www.gameex.info/forums/topic/25021-news-pinballx-450/ ************ I've been aware of custom lists for a while but have never really used them because of the work required to create them initially and then to keep them maintained after adding tables - i'm too lazy for that and i wanted a 'set and forget' solution where i could quickly select EM, SS or Original tables from my Visual Pinball X system without the maintenance (i had actually considered splitting them out into their own systems but again was put off by the work required, i.e. the same lazy reason). So, here's what i came up with as a method to create and maintain the custom lists i wanted; Downloaded xml starlet from http://xmlstar.sourceforge.net/ and copy the xml.exe onto the cab (i have attached the file in case of link changes, but the attached version probably won't be the latest) Made sure that my Visual Pinball X xml file had the Type field correctly populated for all non Original tables (i leave blank for Originals) in Game Manager Backed up my current database xml files (just in case i screwed up somewhere!) Created a batch file to call xml.exe to create my custom lists. The batch file is just a notepad file saved with a .bat extension rather than .txt. The batch file contents are; REM set to folder where you copied xml.exe set XMLexePATH="c:\CustomScripts" cd %XMLexePATH% REM set database xml source and output names set SOURCEXML1="c:\pinballx\Databases\Visual Pinball X\Visual Pinball X.xml" set OUTPUTXML1="c:\pinballx\Databases\Visual Pinball X\VPX Solid State.xml" REM create outputxml file ECHO ^<menu^> > %OUTPUTXML1% xml sel -t -c "/menu/game[type='SS']" %SOURCEXML1% >> %OUTPUTXML1% ECHO ^</menu^> >> %OUTPUTXML1% REM set 2nd database xml source and output names set SOURCEXML2="c:\pinballx\Databases\Visual Pinball X\Visual Pinball X.xml" set OUTPUTXML2="c:\pinballx\Databases\Visual Pinball X\VPX Electro-Mechanical.xml" REM create 2nd outputxml file ECHO ^<menu^> > %OUTPUTXML2% xml sel -t -c "/menu/game[type='EM']" %SOURCEXML2% >> %OUTPUTXML2% ECHO ^</menu^> >> %OUTPUTXML2% REM set 3rd database xml source and output names set SOURCEXML3="c:\pinballx\Databases\Visual Pinball X\Visual Pinball X.xml" set OUTPUTXML3="c:\pinballx\Databases\Visual Pinball X\VPX Original.xml" REM create 3rd outputxml file ECHO ^<menu^> > %OUTPUTXML3% xml sel -t -c "/menu/game[manufacturer='Original']" %SOURCEXML3% >> %OUTPUTXML3% ECHO ^</menu^> >> %OUTPUTXML3% .. which is pretty much the same thing repeated 3 times as i'm creating 3 custom lists using xml.exe. The main things to note are the paths which need changing to suit your build, xml.exe location etc and the xpath queries (the xml set -t -c lines). Added the batch file as a Startup Setting in Pinballx (i named the batch file xmlstarlet) so that the batch re-runs every time i start pinballx so that the lists are recreated (adding any new tables [assuming i've populate Game Manager correctly!]) ; And that's it, i now have custom lists for SS, EM and Original Tables under the Lists menu option in PinballX which are maintained automatically. I may revisit later and update my VPX tables in Game Manager so that i enter Type as SS LED or SS DMD rather than just SS and then amend the batch file so that i create different custom lists for each. You might want different custom lists on your setup and the batch file can be amended to suit your requirements. You could create your own decades lists if you wanted (going further back than the default pinballx lists) by using syntax like "/menu/game[year>=1950 and year<1960]", or match all tables with a common description part with syntax like "/menu/game[description [contains(text(),"star wars")]]" (which could be used for different systems and then combined into a custom group to show all tables of that type for any system in one list), or split visual pinball tables by versions if you're using the <alternateexe> tag in your database files. The syntax for queries can be tested by pasting you database xml and query into https://codebeautify.org/Xpath-Tester More advanced use would be to create your own tags for playlists and enter them for your games in the description or type fields and then use them to build custom playlists. I haven't covered the basics of custom lists in this topic deliberately, if you don't know what they are or need more info on how they work check out the custom lists and custom groups section in the pinballx documentation; xml.zip
- 7 replies
-
- 2
-
- custom lists
- playlists
-
(and 2 more)
Tagged with: