Jump to content



Photo
- - - - -

VPinballX.starter

Pinball Y Pinball X VPX Pinup Popper Visual Pinball

  • Please log in to reply
6 replies to this topic

#1 jarr3

jarr3

    Enthusiast

  • Platinum Supporter
  • 173 posts
  • Location:Frankfurt, Germany

  • Flag: Sweden

  • Favorite Pinball: Medieval Madness

Posted 30 March 2024 - 07:23 PM

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.exe
It 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.cmd
It 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



#2 digitalarts

digitalarts

    Pinball Fan

  • Members
  • PipPipPipPip
  • 570 posts
  • Location:Bavaria

  • Flag: Germany

  • Favorite Pinball: Judge Dredd (have the real one); all virtual EM's

Posted 30 March 2024 - 09:11 PM

Thank you so much!
It's one of the most useful "helping" tools.

#3 jarr3

jarr3

    Enthusiast

  • Platinum Supporter
  • 173 posts
  • Location:Frankfurt, Germany

  • Flag: Sweden

  • Favorite Pinball: Medieval Madness

Posted 14 April 2024 - 05:20 PM

There is a new prerelease out at https://github.com/J...tarter/releases
 
A new settings which can be used to run Windows batch cmd files before and after a specific table is opened and also for all tables:
;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

PREcmd can be used to set up the stage for a particular table, loading images or whatever comes to your mind. And POSTcmd is used to clean up afterwards.

 
 
E.g. if you start "Blood Machines (VPW 2022).vpx" it will try to find "Blood Machines (VPW 2022).pre.cmd" before the table starts. After the table has finished it will look for "Blood Machines (VPW 2022).post.cmd". It will also look for VPinballX.starter.pre.cmd/post.cmd and run it for each table started.
 
Be careful not to start anything in these cmd batch files that will block the script!
 
What I just tried out sucessfully was to put the following into VPinballX.starter.PRE.cmd:
powershell -command "(new-object -com shell.application).minimizeall()"

and the following into VPinballX.starter.POST.cmd:

powershell -command "(new-object -com shell.application).undominimizeall()"

This makes all windows become small (minimized), before my table is started and it is undone when the table has finished.

 
Pinup Popper is luckily immune to the Minimize call :pinnochio:, but this is only to show what could be done.
 
I have also used the PRE/POST scripts for the "Cactus Canyon PROC" version, to make it work with the latest VPX RC release...
by copying the working core.vbs in the "Cactus Canyon Continued (Bally 1998).PRE.cmd" script, start CCC, and then restore the latest core.vbs in the "Cactus Canyon Continued (Bally 1998).POST.cmd" script.

To make your imagination fly away more, check out nirsofts Sound Volume View (changing volume) and ControlMyMonitor (change screen brightness)

The sky is the limit!

Edited by jarr3, 14 April 2024 - 05:32 PM.


#4 digitalarts

digitalarts

    Pinball Fan

  • Members
  • PipPipPipPip
  • 570 posts
  • Location:Bavaria

  • Flag: Germany

  • Favorite Pinball: Judge Dredd (have the real one); all virtual EM's

Posted 16 April 2024 - 11:25 AM

Hi jarr3

 

maybe you can show me the scripts for CCC ? Or can you see an error in my doing ?

 

I tried this as Cactus Canyon Continued (Bally1998) VPW1.1.pre.cmd

rename C:\vPinball\VisualPinball\scripts\core.vbs C:\vPinball\VisualPinball\scripts\core.new
rename C:\vPinball\VisualPinball\scripts\core.vbs.proc C:\vPinball\VisualPinball\scripts\core.vbs

but when i try to start the table, an error come:

"Object reference not set to an instance of an object"

 

my starter.ini :

;A Configuration file for VPinballX.starter
[VPinballX.starter]
;DefaultVersion when started without any table param.
DefaultVersion=10.80
LogVersions=1
;cmd files to run before and after a table has been started. Activate here:
PREPOSTactive=true
PREcmdExtension=.pre.cmd
POSTcmdExtension=.post.cmd
[TableNameExceptions]
;If left string is found in the Table filename
;we will use the right string to add to the version number search
;Table Name=x32
;Another Table=GL
;x32=x32
;FirePower(Vs A.I.)V3.7=.Workaround
;=.Workaround
X64=.64bit
old64=.old64
;GL=GL
;Revert to older VPX 7.4 for certain tables
X74=.RevertX7
;Old table=.RevertX7
[VPinballX]
;Default value used when not found in the table below.
Default=VPinballX8_1950.exe
Default.Workaround=VPinballX8_1889.exe
Default.RevertX7=VPinballX74.exe
Default.64bit=VPinballX8_64.exe
Default.old64=VPinballX74_64.exe


#5 jarr3

jarr3

    Enthusiast

  • Platinum Supporter
  • 173 posts
  • Location:Frankfurt, Germany

  • Flag: Sweden

  • Favorite Pinball: Medieval Madness

Posted 17 April 2024 - 01:24 PM

 

Hi jarr3

 

maybe you can show me the scripts for CCC ? Or can you see an error in my doing ?

 

 

Yes of course!

 

this is my CCC scripts:

 

Cactus Canyon Continued (Bally 1998) VPW - PROC.pre.cmd   -> both has to be next to the table file
@echo off
echo %0 %* >> C:\vPinball\VisualPinball\VPinballX.starter.log
set b2sfullname=%~dpn0

set scriptpath=C:\vPinball\VisualPinball\Scripts

if exist %scriptpath%\core-orig.vbs GOTO :EOF

ren %scriptpath%\core.vbs core-orig.vbs
copy %scriptpath%\corePROC.vbs %scriptpath%\core.vbs
 
 
Cactus Canyon Continued (Bally 1998) VPW - PROC.post.cmd
@echo off
echo %0 %* >> C:\vPinball\VisualPinball\VPinballX.starter.log
set b2sfullname=%~dpn0

set scriptpath=C:\vPinball\VisualPinball\Scripts

if not exist %scriptpath%\core-orig.vbs GOTO :EOF

del %scriptpath%\core.vbs
ren %scriptpath%\core-orig.vbs core.vbs
you need to change to your paths, but can put "REM" in the beginning of the lines saying "echo", but can be nice to have as log entry in the VPinballX.starter.log
 
corePROC.vbs is the old version of core.vbs which works with PROC

Edited by jarr3, 17 April 2024 - 03:11 PM.


#6 Cliffy

Cliffy

    Enthusiast

  • Gold Supporter
  • 248 posts
  • Location:SF Bay Area

  • Flag: United States of America

  • Favorite Pinball: King of Diamonds

Posted 17 April 2024 - 06:29 PM

I got this working with CC Continued p-roc yesterday and I must say it's a really awesome tool overall.

Along with having the pre and post cmd files next to the table the table name and cmd names must also match exactly!

In my case I simply renamed the vpw CCC table the same as the cmd name and did the same with the b2s if using one, of course and the res file as well.

Now you just need an older version of core.vbs that you rename to corePROC.vbs and copy into your \scripts folder.

Thats it! 



#7 digitalarts

digitalarts

    Pinball Fan

  • Members
  • PipPipPipPip
  • 570 posts
  • Location:Bavaria

  • Flag: Germany

  • Favorite Pinball: Judge Dredd (have the real one); all virtual EM's

Posted 18 April 2024 - 11:42 AM

ok got it... but, for me the "logic" of 

 

PREPOSTactive=xxx

isn't logic...

 

if it's set to =true, the additional cmds are NOT working

if it's set to =false, the additional cmds are working


Edited by digitalarts, 18 April 2024 - 12:07 PM.






Also tagged with one or more of these keywords: Pinball Y, Pinball X, VPX, Pinup Popper, Visual Pinball