SteveTheGeek Posted May 22, 2014 Share Posted May 22, 2014 Hi ! With the DX9 version out, a lot of tables need the old versions because of bugs while some new tables require the new DX9 version. I know it's manageable through creating a second emulator list for VP, but it's not the best way to do it as it's complicated to move games when they change etc... Is an easy way to manage this in the works for PinballX as with the FPLaunch with the TXT file on Hyperpin ?Thanks !Steve Link to comment Share on other sites More sharing options...
horseyhorsey Posted August 17, 2014 Share Posted August 17, 2014 #Include, %A_ScriptDir%\xpath.ahkdefault_exe = VPinball 9.2.1 rev815.exePinballX_Config = I:\PinballX\Config\PinballX.ini;Read PinballX config for pathsIniRead, WorkingPath, %PinballX_Config%, VisualPinball, WorkingPathTablePath = %1%TableName = %2%SplitPath, TableName, ,, ext,,; Add extra check rename for VP10If ext = vpx{ StringReplace, table, TableName, .vpx,, All}else{ StringReplace, table, TableName, .vpt,, All}; Read exe tag from xml, if no tag use default_exedatabaseFile = I:\PinballX\Databases\Visual Pinball\Visual Pinball.xmlxpath_load(dbXML, databaseFile ) ; need to read the existing xml otherwise xpath deletes all existing nodesexe := XPath(dbXML, "/menu/game[@name=" . table . "]/exe/text()")If exe = { exe = %default_exe% }Run, %WorkingPath%\%exe% /Play -"%TablePath%\%TableName%"MouseMove, 200, 100WinWait,ahk_class VPinballWinHideWinWait, Visual Pinball PlayerWinWaitClose, Visual Pinball PlayerWinClose, ahk_class VPinballExitApp[VisualPinball]Enabled=TrueWorkingPath=I:\Emulators\Visual PinballTablePath=I:\Emulators\Visual Pinball\TablesExecutable=VisualPinballExeChanger.exeParameters="[TABLEPATH]" "[TABLEFILE]"Add this small file into VP directory - Xpath for reading xml http://www.autohotkey.net/~Titan/dl/xpath.zipAdd your default_exe.Path to PinballX config.Path to databaseFile.Compile the ahk script with AHK2EXE. Tag this exe to run as admin.When you want a table to use a different exe other than default add into tag. <game name="AbraCaDabra_FS_B2S"> <description>Abra Ca Dabra (Gottlieb 1975)</description> <manufacturer>Gottlieb</manufacturer> <year>1975</year> <type>EM</type> <hidedmd>True</hidedmd> <hidebackglass>True</hidebackglass> <exe>VPinball990.exe</exe> </game> <game name="Airborne (Capcom)(1996)(Bodydump Jimmyfingers)(1.0)(FS)"> <description>Airborne (Capcom 1996)</description> <manufacturer>Capcom</manufacturer> <year>1996</year> <type>SS</type> <hidedmd>True</hidedmd> <hidebackglass>True</hidebackglass> <exe>VPinball990.exe</exe> </game> 2 Link to comment Share on other sites More sharing options...
tetrafred Posted August 22, 2014 Share Posted August 22, 2014 In my cab i create a new system call "Vpinball Physique mod" in the empty list on "other emulator".After in VP folder i've also create a new table directory containing all the VP physique mod table, .vbs and ledwiz settings.ini...With "game manager" its so easy to configure this and you can "filtre" them with xml in database folder.I think it's the best way and the most easy. Link to comment Share on other sites More sharing options...
horseyhorsey Posted August 24, 2014 Share Posted August 24, 2014 Well, the "best" way is a matter of opinion.The 'best' way in mine... is not to have 5 different system entrys in your config for just one system: Visual Pinball. Symbolic links and other uneeded settings.Far quicker than messing about with a game manager. After you compile the method above just to add an exe tag into xml. 70% of what I have will run with my default exe.You could use the above script for Future Pinball by editing different paths and the parameters here :Run, %WorkingPath%\%exe% /Play -"%TablePath%\%TableName%" Link to comment Share on other sites More sharing options...
Shando69 Posted October 8, 2014 Share Posted October 8, 2014 Hey horseyhorsey,Thanks for the script above, it all works fine for me, except I have some VP8 tables that always crash out when exiting back to PinballX (I get the standard VP exit popup flash up briefly before it crashes out). Do you know of a way that I can disable this popup (I've never tried anything with ahk scripts before yours, so wouldn't really know where to start)? I've read that disabling the 'esc' key in VP works, but there's no obvious option in the Editor, so I presume it has to be done via script??Any help would be greatly appreciated.OK, my bad All I had to do was change the "Emulator Exit" key in PinballX to get VP8 to exit correctly.RegardsShando Link to comment Share on other sites More sharing options...
bitupset Posted January 17, 2015 Share Posted January 17, 2015 Well, the "best" way is a matter of opinion.The 'best' way in mine... is not to have 5 different system entrys in your config for just one system: Visual Pinball. Symbolic links and other uneeded settings.Far quicker than messing about with a game manager. After you compile the method above just to add an exe tag into xml. 70% of what I have will run with my default exe.You could use the above script for Future Pinball by editing different paths and the parameters here :Run, %WorkingPath%\%exe% /Play -"%TablePath%\%TableName%"i tried Run, %WorkingPath%\%exe% /Open -"%TablePath%\%TableName%" /play /exit /arcaderenderand that is not working.yes, changed this:;Read PinballX config for pathsIniRead, WorkingPath, %PinballX_Config%, FuturePinball, WorkingPathstill no work...how about this stuff at the bottom? any of it need to change?WinWait,ahk_class VPinballWinHideWinWait, Visual Pinball PlayerWinWaitClose, Visual Pinball PlayerWinClose, ahk_class VPinballExitApp tried changing it around to say Future or FPinball....still didn't work..would be great to get future tables to work as perfect as the VP ones do...the correct exe is launching, just doesn't like the parameters is my guess...anyone? EDIT: i'm a little slow...took out the - and all is well.Run, %WorkingPath%\%exe% /Open "%TablePath%\%TableName%" /play /exit /arcaderender Link to comment Share on other sites More sharing options...
horseyhorsey Posted January 22, 2015 Share Posted January 22, 2015 Glad its been of use.With the future pinball one you're going to have to alter this and create seperate exe loader for it.WinWait,ahk_class VPinballWinHideWinWait, Visual Pinball PlayerWinWaitClose, Visual Pinball PlayerWinClose, ahk_class VPinballTo something like: (taken from HyperLaunch module)WinWait("ahk_class FuturePinball")WinWait("ahk_class FuturePinballOpenGL")WinActivate, ahk_class FuturePinballOpenGLWinWaitActive("ahk_class FuturePinballOpenGL")WinWait, ahk_class FuturePinballOpenGLSecondary,,1 ; do not use the function because it will ScriptError after 1 secondWinActivate, ahk_class FuturePinballOpenGLSecondaryWinWaitActive, ahk_class FuturePinballOpenGLSecondary,,1 ; do not use the function because it will ScriptError after 1 secondWinWaitClose("ahk_class Ghost",,5) ; this doesn't always get picked up by ahk, so we need a timeoutLoop { IfWinActive, Future Pinball ahk_class FuturePinballOpenGL Break WinActivate, Future Pinball ahk_class FuturePinballOpenGL Sleep, 50}WinWaitActive("Future Pinball ahk_class FuturePinballOpenGL")WinWaitClose("ahk_class FuturePinball") ; this helps eliminate the slight flicker when you exit the tableWinClose("ahk_class FuturePinball") 1 Link to comment Share on other sites More sharing options...
nicco84 Posted January 22, 2015 Share Posted January 22, 2015 Simple idea. Read tag and if it has exe tag alter the configs executable in ini. Launch VP.Nearly got there with this by adding tag into database but config cannot be altered whilst PinballX is running?Will have to make seperate script for launching VP with new executable...#Include, %A_ScriptDir%\xpath.ahk;Params sent to this file and remove extensiontable_name = %1%StringReplace, table_name, table_name, .vpt,, AllPinballX_Config = I:\PinballX\Config\PinballX.inidatabaseFile = I:\PinballX\Databases\Visual Pinball\Visual Pinball.xmlxpath_load(dbXML, databaseFile ) ; need to read the existing xml otherwise xpath deletes all existing nodesexe := XPath(dbXML, "/menu/game[@name=" . table_name . "]/exe/text()") If exe != { IniWrite, %exe%, %PinballX_Config%, VisualPinball, Executable }ExitApp<game name="AbraCaDabra_FS_B2S"> <description>Abra Ca Dabra (Gottlieb 1975)</description> <manufacturer>Gottlieb</manufacturer> <year>1975</year> <type>EM</type> <hidedmd>True</hidedmd> <hidebackglass>True</hidebackglass> <exe>VPinball990.exe</exe> </game>[VisualPinball]Enabled=TrueWorkingPath=I:\Emulators\Visual PinballTablePath=I:\Emulators\Visual Pinball\TablesExecutable=VPinball 9.2.1 rev815Parameters=/Play -"[TABLEPATH]\[TABLEFILE]"LaunchBeforeEnabled=TrueLaunchBeforeWorkingPath=I:\PinballX\ScriptsLaunchBeforeExecutable=VisualPinballExeChanger.ahkLaunchBeforeParameters=[TABLEFILE]LaunchBeforeWaitForExit=TrueHi horseyhorsey,My default is vp990 and I want to start a table with vp921I tried your way but I couldn't download .zip file (error 404)Could you help me?Thanks Link to comment Share on other sites More sharing options...
horseyhorsey Posted January 22, 2015 Share Posted January 22, 2015 Looks like that link is down. First time in years !https://www.dropbox.com/s/fc1off2b2vn5y4i/xpath.zip?dl=0 1 Link to comment Share on other sites More sharing options...
nicco84 Posted February 1, 2015 Share Posted February 1, 2015 Thanks horsey I'll try soon as I can Link to comment Share on other sites More sharing options...
mace Posted February 20, 2015 Share Posted February 20, 2015 Thanks for working on this its a really simple and elegant solution to having multiple file locations, I have one quick question....I've followed #4 and it's all working fine but I'm not clear on the xpath file that goes into the Virtual Pinball main directory, should it be left as a zip, unzipped as xpath.ahk or compiled into xpath.exe - I've done all three but the answer is nagging at me and I'm no script expert. Link to comment Share on other sites More sharing options...
Carny_Priest Posted February 20, 2015 Share Posted February 20, 2015 Xpath.ahk just needs to be in the same folder as your script when you compile. No need to do anything else. 1 Link to comment Share on other sites More sharing options...
mace Posted February 21, 2015 Share Posted February 21, 2015 Thanks CP - appriciated Link to comment Share on other sites More sharing options...
Carny_Priest Posted February 21, 2015 Share Posted February 21, 2015 No problem. I'm about to implement a solution like horsey's. It will be easier to maintain as one system and one database with an added exe tag rather than four like what I have now. Future Pinball is not a problem at all. I run everything through BAM and use the various physics xmls where appropriate. It is not really required to run a script for FP although I do personally because I choose to run FP at a custom resolution. But still I have FP as a single database Link to comment Share on other sites More sharing options...
mace Posted February 22, 2015 Share Posted February 22, 2015 BAM is awesome especially now I have PinballX calling Future DMD first so all three displays are in use but I do find Future pinball very frustrating, every table needs a range of tweaks and them they play beautifully - and I have a Kinect running in the cab too. My only grouse at the moment is wishing I had enough knowledge to get into Future Pinballs code to set things up for my Virtua Pinball accelerometer so nudging is a little more sensitive as even on +2 it does not hold a candle to the newer Virtual Pinball builds. Link to comment Share on other sites More sharing options...
horseyhorsey Posted February 22, 2015 Share Posted February 22, 2015 What's all this about FP playing beautifully? Smoke & mirrors.I had been making a small manager for PinballX, mainly for these exe tags selected with a dropdown and an easier loader so you won't have to compile. Seeing as there is more interest I'll get it finished soon as I can. Link to comment Share on other sites More sharing options...
mace Posted March 2, 2015 Share Posted March 2, 2015 Well if you call adjusting the flipper strength, bounce, angle, plunger response, tweaking the slope and friction physics Smoke and mirrors - Link to comment Share on other sites More sharing options...
horseyhorsey Posted March 5, 2015 Share Posted March 5, 2015 Heh yes I would, it's all an illlllllusion Link to comment Share on other sites More sharing options...
Itchigo Posted January 3, 2016 Share Posted January 3, 2016 #Include, %A_ScriptDir%\xpath.ahkdefault_exe = VPinball 9.2.1 rev815.exePinballX_Config = I:\PinballX\Config\PinballX.ini;Read PinballX config for pathsIniRead, WorkingPath, %PinballX_Config%, VisualPinball, WorkingPathTablePath = %1%TableName = %2%SplitPath, TableName, ,, ext,,; Add extra check rename for VP10If ext = vpx{ StringReplace, table, TableName, .vpx,, All}else{ StringReplace, table, TableName, .vpt,, All}; Read exe tag from xml, if no tag use default_exedatabaseFile = I:\PinballX\Databases\Visual Pinball\Visual Pinball.xmlxpath_load(dbXML, databaseFile ) ; need to read the existing xml otherwise xpath deletes all existing nodesexe := XPath(dbXML, "/menu/game[@name=" . table . "]/exe/text()")If exe = { exe = %default_exe% }Run, %WorkingPath%\%exe% /Play -"%TablePath%\%TableName%"MouseMove, 200, 100WinWait,ahk_class VPinballWinHideWinWait, Visual Pinball PlayerWinWaitClose, Visual Pinball PlayerWinClose, ahk_class VPinballExitApp[VisualPinball]Enabled=TrueWorkingPath=I:\Emulators\Visual PinballTablePath=I:\Emulators\Visual Pinball\TablesExecutable=VisualPinballExeChanger.exeParameters="[TABLEPATH]" "[TABLEFILE]"Add this small file into VP directory - Xpath for reading xml http://www.autohotkey.net/~Titan/dl/xpath.zipAdd your default_exe.Path to PinballX config.Path to databaseFile.Compile the ahk script with AHK2EXE. Tag this exe to run as admin.When you want a table to use a different exe other than default add into tag. <game name="AbraCaDabra_FS_B2S"> <description>Abra Ca Dabra (Gottlieb 1975)</description> <manufacturer>Gottlieb</manufacturer> <year>1975</year> <type>EM</type> <hidedmd>True</hidedmd> <hidebackglass>True</hidebackglass> <exe>VPinball990.exe</exe> </game> <game name="Airborne (Capcom)(1996)(Bodydump Jimmyfingers)(1.0)(FS)"> <description>Airborne (Capcom 1996)</description> <manufacturer>Capcom</manufacturer> <year>1996</year> <type>SS</type> <hidedmd>True</hidedmd> <hidebackglass>True</hidebackglass> <exe>VPinball990.exe</exe> </game>I need help with this please. I have this:VisualPinballExeChanger.exe#Include, %A_ScriptDir%\xpath.ahkdefault_exe = VPinball9.90.exePinballX_Config = V:\PinballX\Config\PinballX.ini;Read PinballX config for pathsIniRead, WorkingPath, %PinballX_Config%, VisualPinball, WorkingPathTablePath = %1%TableName = %2%SplitPath, TableName, ,, ext,,; Add extra check rename for VP10If ext = vpx{ StringReplace, table, TableName, .vpx,, All}else{ StringReplace, table, TableName, .vpt,, All}; Read exe tag from xml, if no tag use default_exedatabaseFile = V:\PinballX\Databases\Visual Pinball\Visual Pinball.xmlxpath_load(dbXML, databaseFile ) ; need to read the existing xml otherwise xpath deletes all existing nodesexe := XPath(dbXML, "/menu/game[@name=" . table . "]/exe/text()")If exe = { exe = %default_exe% }Run, %WorkingPath%\%exe% /Play -"%TablePath%\%TableName%"MouseMove, 200, 100WinWait,ahk_class VPinballWinHideWinWait, Visual Pinball PlayerWinWaitClose, Visual Pinball PlayerWinClose, ahk_class VPinballExitApp[VisualPinball]Enabled=TrueWorkingPath=V:\Visual Pinball\TablesTablePath=V:\New B2S Tables doneExecutable=VisualPinballExeChanger.exeParameters="[TABLEPATH]" "[TABLEFILE]"XPath.exe[VisualPinball]Enabled=TrueWorkingPath=V:\Visual Pinball\TablesTablePath=V:V:\New B2S Tables doneExecutable=VisualPinballExeChanger.exeParameters="[TABLEPATH]" "[TABLEFILE]"Pinball X is pointed at the XPath.exeAnd I get:What did I do wrong? Link to comment Share on other sites More sharing options...
Itchigo Posted January 3, 2016 Share Posted January 3, 2016 I have 1 table that only works in 9.21, so I'll know right away if this works right. I added this to that table's xml:<exe>VPinball9.21.exe</exe> Link to comment Share on other sites More sharing options...
Carny_Priest Posted January 3, 2016 Share Posted January 3, 2016 Why not just use the alternateexe tag that is supported in the current version on PBX?Sent from my iPad using Tapatalk Link to comment Share on other sites More sharing options...
jupiter Posted January 3, 2016 Share Posted January 3, 2016 THe AlternateExe tag works great apart from a 20 second delay to exit a table with an EXE other than standard VPinball.exe. It might be fixed in latest PBX release although I haven't had time to set it up yet. Link to comment Share on other sites More sharing options...
horseyhorsey Posted January 4, 2016 Share Posted January 4, 2016 Yes known issue. I don't notice delays myself using <alternateExe> but some people just use the launcher here with <exe>.PinXCheck has option to write to exe tag as well as alternateExe for this reason. Link to comment Share on other sites More sharing options...
Carny_Priest Posted January 4, 2016 Share Posted January 4, 2016 Yes known issue. I don't notice delays myself using but some people just use the launcher here with .PinXCheck has option to write to exe tag as well as alternateExe for this reason.Hmm, I'll have to give this a try. I use an exe tag. Link to comment Share on other sites More sharing options...
Itchigo Posted January 7, 2016 Share Posted January 7, 2016 Sorry, I never got a notification.So am I correct in saying that the new Pinball X supports .exe tags without the file previously listed? If so I am not seeing this work.I am using this without those files <exe>VPinball9.21.exe</exe> and it opens up in 9.9 with no errors. If I use those files, I get the error I showed previously. I'd like to keep one main area to keep my stuff in if possible, but I admit I'm late to the party... Link to comment Share on other sites More sharing options...
Recommended Posts