Scripts
Scripts
Helper scripts for the VPinMAME driver core (aka core vbs/scripts)
====================================================================
Basic documentation on how to use the VPM core scripts shipped with VPX.
Please also check core.vbs' actual functions for more help in their comments and
the respective machine .vbs files functions, too.
In addition there is the pretty aged "vbsdoc_outdated.html", too, which may still
be useful in some cases though!
And CommandReference.txt for some overview of (the majority of) the VPX scripting
commands to connect both worlds, etc.
============
Basic usage:
============
' Though shall not declare a custom LoadVPM anymore, BUT use this instead:
On Error Resume Next
ExecuteGlobal GetTextFile("Controller.vbs")
If Err Then MsgBox "Unable to open Controller.vbs. Ensure that it is in the Scripts
folder of Visual Pinball."
On Error Goto 0
LoadVPM "02000000", "xxx.VBS", 3.58 ' adapt 02000000 and 3.58 to the actually
required minimum VPinMAME- and core scripts versions, replace xxx with the machine
generations vbs name
===================================================================================
===================== SNIP
==========================================
Now some partially outdated documentation: :/
==========================================
Available classes:
------------------
cvpmDictionary (Must usually not be used directly, also deprecated as just a simple
wrapper nowadays)
cvpmDips (create as many as needed) => (Dip Switch And/Or Table Options Menu)
(Public) .AddForm - create a form (AKA dialogue)
(Public) .AddChk - add a chckbox
(Public) .AddChkExtra - - "" - for non-dip settings
(Public) .AddFrame - add a frame with checkboxes or option buttons
(Public) .AddFrameExtra - - "" - for non-dip settings
(Public) .AddLabel - add a label (text string)
(Public) .ViewDips - Show form
(Public) .ViewDipsExtra - - "" - with non-dip settings
cvpmImpulseP (create as many as needed) => (Impulse Plunger Object using a Trigger
to Plunge Manual/Auto)
(Public) .InitImpulseP - Initialise Impulse Plunger Object (Trigger, Plunger
Power, Time to Full Plunge [0 = Auto])
(Public) .CreateEvents - Create Hit/Unhit events
(Public) .Strength - Change plunger strength
(Public) .Time - Change plunger time (in seconds) to full plunger
strength (0 = Auto Plunger)
(Public) .Pullback - Pull the plunger back
(Public) .Fire - Fires / Releases the Plunger (Manual or Auto depending
on Timing Value given)
(Public) .AutoFire - Fires / Releases the Plunger at Maximum Strength +/-
Random variation (i.e. Instant Auto)
(Public) .Switch - Switch Number to activate when ball is sitting on
plunger trigger (if any)
(Public) .Random - Sets the multiplier level of random variance to add (0
= No Variance / Default)
(Public) .InitEntrySnd - Plays Sound as Plunger is Pulled Back
(Public) .InitExitSnd - Plays Sound as Plunger is Fired (WithBall,WithoutBall)
Generating events:
------------------
vpmCreateEvents
cpmCreateLights
Exported variables:
-------------------
vpmTimer - Timer class for PulseSwitch etc
vpmNudge - Class for table nudge handling