VPX Documentation

Table

4min
variables variables are items in vpx you can set, adjust or call call detail example name(string) table name filename(string) file name (without path and extension) width(float) playfield width default=1000 height(float) playfield height default=2000 glassheight(float) height of glass above playfield the ball will collide with this if shot upwards tableheight(float) inclination(float) angle of table (used for display only) default=43 rotation(float) rotation of table (used mainly for fs/cab tables 270) scalex(float) x scale of table scaley(float) y scale of table scalez(float) z scale of table xlatex(float) x offset of table xlatey(float) y offset of table xlatez(float) z offset of table layback(float) skew of table (used mainly for fs/cab tables) default=0 fieldofview(float) perspective of table default=45 backglassmode(int) which backglass mode is active (0=desktop,1=fullscreen,2=fullsinglescreen) maxseparation(float) maximum separation/scale effect for stereo 3d (ranges from 0 1) zpd(float) reads the depth where the stereo 3d should happen (ranges from 0 1) offset(float) reads the constant offset for the stereo 3d effect (ranges from 0 1) playfieldcolor(ole color) backdropcolor(ole color) backdropimage(string) slopemax(float) angle of playfield within cabinet (used for physics only) slopemin(float) angle of playfield within cabinet (used for physics only) globaldifficulty(float) mainly chooses/weights between slopemax and slopemin, but also affects precision of flippers/scattering (0 100) gravity(float) default=0 86543 friction(float) for the playfield, default=0 0025 elasticity(float) for the playfield, default=0 2 elasticityfalloff(float) for the playfield, default=0 scatter(float) scatter angle for the playfield, default=0 defaultscatter(float) default=0, overrides all elements that have scatter angle set to < 0 overridephysics(int) overrides the table physics settings with pre defined settings defined under preferences > physics options you can define up to 8 different physics settings for the table and the flippers save them to one of the 8 slots and by assigning the slot number to this overridephysics it overrides these settings default=0 (means use table settings) physicslooptime(int) the meaning of this has changed starting with 9 2 1 it specifies the maximum number of iterations spent in the physics update by setting it f e to 1, the rendered frame updates will always match the physics updates, everything above 1 allows for multiple physics updates per frame (2, 3 or 4 can be good values for this, as it slows down the physics temporarily if the fps drop below 50, 33 or 25 in these cases) default= 1 (which means infinite updates allowed) yieldtime(int) time in milliseconds to sleep during each frame can help side threads like vpinmame default=0 ballimage(string) ballfrontdecal(string) image of the ball front decal balldecalmode(bool) switch between using the ball decal as ball logo or ball 'scratches' image(string) playfield image enableantialiasing(bool) enables aa for this table if you have set 'enable antialiasing' in the video options default=false enablefxaa(bool) enables fxaa for this table if you have set 'enable fxaa' in the video options default=false renderemreels(bool) default=true renderdecals(bool) default=true tableadaptivevsync(int) sets adaptive vsync option for this table ( 1=use global setting, 0=off, 1=automatic, any other number is refresh rate in hz) ballreflection enable ball reflection on table depending on the global video setting 'reflect ball on playfield' this is on or off or it is defined specific for this table playfieldreflectionstrength(int) defines the reflection strength of the (dynamic) table elements on the playfield (0 100) ballplayfieldreflectionscale(float) scale/dampen the contribution of the playfield to the ball reflections defaultbulbintensityscale(float) scale/dampen the contribution of the bulbs lights on the ball this is a default setting for all balls created on the the table if you need ball specific intensity scaling you can change the intensity by using the bulbintensityscale value on the ball balltrail enable ball trail/motion blur on table depending on the global video setting 'ball trail/motion blur' this is on or off or it is defined specific for this table trailstrength(int) defines the strength of the ball trail (0 100) detaillevel(int) defines the ramp accuracy for this table and overrides the global setting from the video options (range 0 10) plungernormalize(int) mech plunger component adjustment or weak spring, aging default=100 plungerfilter(bool) default=false accelerometer(bool) accelnormalmount(bool) accelerometerangle(float) joltamount(int) tiltamount(int) jolttriggertime(int) tilttriggertime(int) deadzone(int) nudgetime(float) tablesoundvolume(int) scales the global sound volume (in percent) default=100 tablemusicvolume(int) scales the global music volume (in percent) default=100 lightambient(ole color) changes the ambient light contribution for each material, please always try to keep this at full black light0emission(ole color) changes the light contribution for each material (currently light0 emission is copied to light1, too) lightemissionscale(float) environmentemissionscale(float) aoscale(float) scaling factor when blending the ambient occlusion ssrscale(float) scaling factor when blending the screen space reflections bloomstrength(float) scaling factor when blurring the clipped framebuffer contribution (leave at 1 for kinda natural glow) lightheight(float) height of lights lightrange(float) range of lights colorgradeimage(string) the 256x16 lut texture used for the color grading post process callback call detail example onballballcollision(ball1, ball2, velocity) called when two balls collide ball1 and ball2 are the two ball objects see default table for example events event detail example init keydown keyup musicdone exit paused unpaused methods \[id(dispid gameevents init)] void init(); \[id(dispid gameevents keydown)] void keydown( \[in] long keycode); \[id(dispid gameevents keyup)] void keyup( \[in] long keycode); \[id(dispid gameevents musicdone)] void musicdone(); \[id(dispid gameevents exit)] void exit(); \[id(dispid gameevents paused)] void paused(); \[id(dispid gameevents unpaused)] void unpaused(); }