Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider donating by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

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

  • 2 months later...
Posted
#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.zip

Add 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>
  • Like 2
Posted

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.

Posted

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%"

  • 1 month later...
Posted

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 :wacko: All I had to do was change the "Emulator Exit" key in PinballX to get VP8 to exit correctly.

Regards

Shando

  • 3 months later...
Posted

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 /arcaderender

and that is not working.

yes, changed this:

;Read PinballX config for paths
IniRead, WorkingPath, %PinballX_Config%, FuturePinball, WorkingPath
still no work...how about this stuff at the bottom? any of it need to change?
WinWait,ahk_class VPinball
WinHide
WinWait, Visual Pinball Player
WinWaitClose, Visual Pinball Player
WinClose, ahk_class VPinball
ExitApp
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
Posted

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 VPinball

To 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")
  • Like 1
Posted

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=True

Hi horseyhorsey,

My default is vp990 and I want to start a table with vp921

I tried your way but I couldn't download .zip file (error 404)

Could you help me?

Thanks

  • 2 weeks later...
  • 3 weeks later...
Posted

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.

Posted

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

Posted

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.

Posted

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.

Posted

Well if you call adjusting the flipper strength, bounce, angle, plunger response, tweaking the slope and friction physics Smoke and mirrors - :D

  • 9 months later...
Posted
#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.zip

Add 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.exe

And I get:

post-23093-0-80834000-1451800215_thumb.j

What did I do wrong?

Posted

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>

Posted

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.

Posted

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.

Posted

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.

Posted

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...

Guest
This topic is now closed to further replies.
×
×
  • Create New...