File Name: VPinballX.starter
File Submitter: jarr3
File Submitted: 30 Mar 2024
File Category: Frontends and Addons
Small tool to start the right VPinballX version depending on the selected table file.
To all who ask:
Should I really try out the new VPX release with all the new tables coming for 10.8?
How can I use different versions of VPinballX for different tables?
This is my answer to those questions! The tool VPinballX.starter can be put as replacement for VPinballX.exe in the default folder....
It will start the right VPinballX version depending on the table file. It is meant to be a "set and forget" tool.
Please do not forget to like and review..., what is important for content creators (tables, backglasses, DMD colorization?) is as important for us writing the tool-set!
It uses a small ini file similar to this one:
;A Configuration file for VPinballX.starter [VPinballX.starter] ;DefaultVersion when started without any table param. DefaultVersion=10.80 LogVersions=1 [TableNameExceptions] ;If left string is found in the Table filename we will use the right string to add to the version number search CASE sensitive... Table Name=x32 Another Table=GL x32=x32 GL=GL X74=.RevertX7 old table=.RevertX7 [VPinballX] ;Default value used when not found in the table below. Default=VPinballX64.8-1786.exe Default.RevertX7=VPinballX.7.4.exe ;File versions converted to the right VPinballXxx.exe 10.72=VPinballX72.exe 10.80=VPinballX64.8-1786.exe 10.80GL=VPinballX_GL64.exe 10.80x32=VPinballX.8-1786.exeIt works like this:
VPinballX.starter is started with exactly the same parameters as VPinballX.exe. First it loads the table file and finds out what version it was saved with (using the same technique as VPX). It takes this information and looks in the ini file above to find out which version of VPinballX.xxx.exe YOU want to run.
It will then run the VPinballXxx.exe that you have configured with exactly the same parameters that were given to the starter. If you simply double-click the VPinballX.starter without a table, the default entry under [VPinballX.starter] will be used or if it cannot find a version stored in the table, it will use the default in [VPinballX].
In this way, the correct table version or the version you have selected will be used. Each time you start VPinballX.starter, a log entry will be added to VPinballX.starter.log stating which version was used. This can be disabled by setting LogVersions=0.
Table Name Exceptions
A new feature called Table Name Exceptions allows to configure exceptions to the automated finding the right executable. The Exceptions are either that a string is added to the table filename hinting that this table should use the x32 version instead, or can be parts of a table filename pointing to the same string. This string will be added when searched for the executable.
So either you name the table with an exception string like (x32, x64, GL) or you enter parts of the table names into the ini, where you know they only want certain versions (like x32, x64 or even GL)
What you decide here is all up to you!
E.g starting a table needing 10.80 and having an exception "GL" will look for 10.80GL in the [VPinballX] section in the ini. This is made using pure string handling, there is NO logic behind the strings in the ini file. You can define your own standard here.
How to set it up
Copy VPinballX.starter.exe next to your VPinballX.exe files. Double click on VPinballX.starter.exe and follow the instructions. It will create a template VPinballX.starter.ini that you will need to edit to your liking. The values 10.72, 10.80 (10.74 has no specific version saved) and so on all come from the pinball tables saved in different versions by VPinballX.exe.
Once you are happy with VPinballX.starter.exe, you can rename it to VPinballX.exe; it will take care of starting the right version independent if you are using Windows Explorer, PinballX, PinballY or Pinup Popper...
PRE and POST cmd files
Starting with 1.7 the settings PREPOSTactive, PREcmd and POSTcmd can be used to run windows batch cmd files before and after a certain table is opened.
PREcmd can be used to setup the stage for a certain table, loading pictures or whatever comes to mind. And POSTcmd is then used to cleanup afterwards.
As the default settings tells, it will search for a file called <tablename>.pre.cmd and call it if found.
If you start "Blood Machines (VPW 2022).vpx" it will try to find "Blood Machines (VPW 2022).pre.cmd" before starting the table.
After the table has quit, "Blood Machines (VPW 2022).post.cmd" will be searched. It will also search for VPinballX.starter.pre/post.cmd and call it for every table started.
When VPinballX.starter is triggered it tries to find the process name of the caller. When starting a table from Windows Explorer, the caller is "explorer".
This information can be used to have different PRE and POST scripts depending on the caller:
;A Configuration file for VPinballX.starter [VPinballX.starter] ;cmd files to run before and after a table has been started. Activate here: PREPOSTactive=false PREcmdExtension=.pre.cmd POSTcmdExtension=.post.cmd ;you can have different settings depending on the caller: (Pinup popper show up as anonymous) PREPOSTactive.explorer=true PREcmdExtension.explorer=.explorerpre.cmd POSTcmdExtension.explorer=.explorerpost.cmdIt will search the settings in the order <setting>.<caller> and then <setting>. If a more specific setting exists and the file exists, that one will be used.
Be sure to not start anything in these cmd batch files which block the script!
While running and if there is a .net 6 missing library, it can be downloaded from https://dotnet.micro...s-x64-installer (6.0.29 as of today)
Click here to download this file