Code/Example BAM Script Extensions Map

Coding and examples for future Pinball and BAM

Gimli

Pinball Master
Joined
Feb 6, 2020
Messages
1,341
Reaction score
882
Points
120
Favorite Pinball Machine
Monster Bash
Effective March 2022-----------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------- Old script comment style tricks --------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------
'[BAM] !texture = textureName
'[BAM] !normalMap = textureName
'[BAM] !specularMap = textureName
'[BAM] !shininess = value
'[BAM] !specularLevel = value
'[BAM] !heightMap_bias = value
'[BAM] !heightMap_scale = value
'[BAM] !specularBalance = value
'[BAM] !specularColorRed = value
'[BAM] !specularColorGreen = value
'[BAM] !specularColorBlue = value
'[BAM] !normalMapScale = value
'[BAM] !latlong = 1
'[BAM] !latlongRotation = value
-----------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------- procedures in script called by BAM --------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------
Sub BAM_Init
Sub NewtonPhysicsTick
Sub FLIPPERNAME_prehit // note, FLIPPERNAME is FP Object Flipper Name... and xBAM.Flipper "FP Object Flipper Name" must be called in BAM_Init
Sub EnumBallsCallback ball // ball is BallInfo object
-----------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------- functions, objects, constats accesible with xBAM --------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------
xBAM
.Ball (ret: BallInfo ***)
.BallID (get int)
.BallRadius (set only)
.BallMass (set only)
.BallOpacity (set only)
.BallCloseTo x, y, z (ret: BallInfo ***)
.BallSpeedLimit (set only)

.EnumBalls max, order, callback_FunctionNameInScript

.MiniPlayfield minX, maxX, minY, maxY, minZ, maxZ, toX, toY, toZ, scale
.CreateMiniPlayfield maxX, minY, maxY, minZ, maxZ, cenX, cenY, cenZ (ret: MiniPlayfield ***)

.CreateMagneticField x, y, z, range, strength (ret: MagneticField ***)

.CreateModel ModelTemplateName, x, y, z, height, rotX, rotY, rotZ, relfectionsFlag, z2yFlag (ret: Model ***)
.LoadModels
.ModelAnimationSplit ModelTemplateName, startFrame, endFrame, dstAnim, srcAnim

.SetTexture FPObjectName, textureName, textureId (default textureId = 0)
.SetTopTexture FPObjectName, textureName (same as .SetTexture FPObjectName, textureName, 0)
.SetSideTexture FPObjectName, textureName (same as .SetTexture FPObjectName, textureName, 1)
.SetEnamelTexture FPObjectName, textureName (same as .SetTexture FPObjectName, textureName, 2)
.SetPlayfieldTexture textureName
.SetTransliteTexture textureName
.SetCabinetTexture textureName
.SetPosterTexture textureName
.GameRome (property, boolean, can be read and write, TRUE = show game room, FALSE = hide game room)

.Flipper FPFlipperObjectName (ret: FlipperExt ***)

.FixScore
.EnterPinballHighScore CurrentPlayer
.GetKeyCode keyId

.FrameCounter
.NewtonCounter

.FindObject x, y, type (get ObjectInfo)

.ShadowMap LightSourceFPObjectName, Amount, Passes, Radius, Brighness, SpotlightRange, WhiteLight, Reflection
.RemoveFlippersFromShadowmaps (bool value: true/false, can be SET and READ) // obsolete, now it is alway = true
.SetBallShadows dark_level, radius_soft, radius_hard, maxLevelAbovePlayfield

.PhysicsXML "xml"

.Camera (ret: Camera ***)
.Physics
.SetMaterial PObjectName, elasticCoef, softnessCoef, staticFriction, kineticFriction
.ExpandWorldSize left, right, up, down, above, below
.BallCollidable - sets it to FALSE and there will be no ball-ball collisions. WRITEONLY

.BallManager
.DefineCustomBall red, green, blue, dirtTextrureName, reflectionTextureName, reflectionInPlayfieldTextureName (ret: BAM_BALL_TYPE_NAME)
.CreatCustomBall BAM_BALL_TYPE_NAME (ret: BallCreationInfo)
.CreateTransformation (ret: Transformation)
.UpdateBall BallID, BAM_BALL_TYPE_NAME
.GetBallName BallID (ret: BAM_BALL_TYPE_NAME)
.SetBallOpacity BallID, opacity
.SetBallOpacityWithEasing BallId, opcity, time, easingFunction

.DispDMD DispDMDName (ret: DispDMDExt)
.HudDMD DispDMDName (ret: HudDMDExt)
.CreateAllExt
.SetDefaultMatrixBaseColor red, green, blue
.Lights (ret: Lights ***)


// ****************** new things:
.Get pluginName (ret: plugin object) see: PuPPlugin
.DisableFlipperShadows()
.EnableFlipperShadows()
.HideHud()
.ShowHud()
.HideAllDispOnBackbox()
.ShowAllDispOnBackbox()
.GetTexture "textureName" // return of texture object...
.isValid
.normalMap // same as '[BAM] !normalMap = textureName
.specularMap // same as '[BAM] !specularMap = textureName
.shininess
.specularLevel
.heightMap_bias
.heightMap_scale
.specularBalance
.specularColorRed
.specularColorGreen
.specularColorBlue
.SetSpecularColor red, green, blue
.normalMapScale
.latlong
.latlongRotation
.SetColor red, green, blue
.brightness

.Trails // way to set in script same ball trails params as in BAM menu
.Level // set "level" of ball trails.
.Color radm green, blue // set color of ball trails
.Enabled // = true or false to enable/disable trails

.Table // this variable is same as name of table, so for "NewTable" xBAM.Table is same thing as NewTabele... this way in script you don't have to check name of table to get width, height,....

.LoadGif gifTexture - returns IGif object to control gif animations
.VisibleCabParts bitField - every bit of 16 bit word enables/disable cabinet parts (legs, wood parts, etc)
.DrawCustomModelsLast - controls when BAM Custom models are drawed (boolean)
.DrawCustomModelsWithSurface "surfaceNameInFpEditor" - controls when BAM custom models are drawed
.SuppressLoadMessages - set to True to hide BAM yellow loading messages (boolean)
.EnableShadows - fake ball/flippers shadows (boolean)
.TimeScale - change physics simulation time speed, default = 1.0 (float)
.SetShadowColor red, green, blue - sets color of fake shadows
.MouseX - horizontal mouse move between frames (READONLY) (int)
.MouseY - vertical mouse move between frames (READONLY) (int)
.RayCastShadows
.Enable - use it to enable/disable ray-cast-shadows from script
.Sharpness - float
.DarkLevel
.Set sharpness, darkLevel - enables shadows and sets params for sharpness and dark level
.DumpAllObjectInfo()

constansts:
xBAM.easeLinear
xBAM.easeInSine
xBAM.easeOutSine
xBAM.easeInOutSine
xBAM.easeInQuad
xBAM.easeOutQuad
xBAM.easeInOutQuad
xBAM.easeInCubic
xBAM.easeOutCubic
xBAM.easeInOutCubic
xBAM.easeInQuart
xBAM.easeOutQuart
xBAM.easeInOutQuart
xBAM.easeInQuint
xBAM.easeOutQuint
xBAM.easeInOutQuint
xBAM.easeInExpo
xBAM.easeOutExpo
xBAM.easeInOutExpo
xBAM.easeInCirc
xBAM.easeOutCirc
xBAM.easeInOutCirc
xBAM.easeInBack
xBAM.easeOutBack
xBAM.easeInOutBack
xBAM.easeInElastic
xBAM.easeOutElastic
xBAM.easeInOutElastic
xBAM.easeInBounce
xBAM.easeOutBounce
xBAM.easeInOutBounce

xBAM.orderXYZ
xBAM.orderXZY
xBAM.orderYXZ
xBAM.orderYZX
xBAM.orderZXY
xBAM.orderZYX

xBAM.RESET
xBAM.ASAP
xBAM.APPEND

--------------------------------------------
BallInfo (from xBAM.Ball or xBAM.BallCloseTo)
.Position
.x
.y
.z
.PositionGlobal
.x
.y
.z
.Velocity
.x
.y
.z
.Speed
.HitSpeed
.Exist
.ExtInt1 (can be SET or READ)
.ExtInt2 (can be SET or READ)
.ExtInt3 (can be SET or READ)
.ExtFloat1 (can be SET or READ)
.ExtFloat2 (can be SET or READ)
.ExtFloat3 (can be SET or READ)
.Id (READ only)
.Name (can be SET or READ)
.UpdateBall Red, Green, Blue, DirtTexture, ReflectionTexturem, ReflectionInPlayfield
.Opacity (only SET)
.SetBallOpacityWithEasing opacity, time, easingFunction
.ExtTimer1 (READ only)
.ExtTimer2 (READ only)
.ExtTimer3 (READ only)
.ResetExtTimer idx (idx = 1, 2, 3)
.StopExtTimer idx (idx = 1, 2, 3)

---------------------------------------------
BallCreationInfo (from xBAM.BallManager.CreateCustomBall)
.Red (read only)
.Green (read only)
.Blue (read only)
.BallNumer (read only)
.Opacity (can be SET and READ)
---------------------------------------------
Transformation (from xBAM.BallManager.CreateTransformation)
.AddRule sourceBall, DestinationBall
.Update ballID
---------------------------------------------
MiniPlayfield (from xBAM.CreateMiniPlayfield)
.Position
.x
.y
.z
.Rotation
.x
.y
.z
.Scale
.Time
.MoveTo x, y, z, rotX, rotY, rotZ, scale, time
.Easing (set only)
.EasingPosition (set only)
.EasingRotation (set only)
.EasingScale (set only)
.TargetPosition
.x
.y
.z
.TargetRotation
.x
.y
.z
.TargetScale
.CurrentPosition
.x
.y
.z
.CurrentRotation
.x
.y
.z
.CurrentScale
.RotationOrder
.TrackedBall (can be SET and READ, BallInfo)
.TrackedBallExist
.TrackedBallStop
.Inertia
.TraceBallRotation
.GravityAngle
.GravityRotation
.GravityScale
.SetGravity angle, rotation, scale
.Collidable
.PhysicsMove
.Update maxX, minY, maxY, minZ, maxZ, cenX, cenY, cenZ
-------------------------------------------
MagneticField (from xBAM.CreateMagneticField)
.X
.Y
.Z
.Strength
.Range
.SingleBall
.Horizontal
.MaxForce
.MinZ
--------------------------------------------
ObjectInfo (from xBAM.FindObject) (everything read only)
.Position
.x
.y
.z
.Rotation
.x
.y
.z
.Velocity
.x
.y
.z
.RotationSpeed
.x
.y
.z
.Exist
.Material
.lineardamping
.angulardamping
.Center
.x
.y
.z
--------------------------------------------
Model (from xBAM.CreateModel)
.Position
.x
.y
.z
.Rotation
.x
.y
.z
.Scale
.x
.y
.z
.Z2Y
.Reflections
.Mode
.Anim StringAsAnimationDescription
.Loop StringAsAnimationDescription
.Frame start, end, loop
.CurrentFrame
.Speed
.Kd
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Ks
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Ke
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Spe
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Rim
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Part partIndex (ret: ModelPart)
.Visible
.Height
--------------------------------------------
ModelPart (from Model.Part partIndex)
.Kd
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Ks
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Ke
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Spe
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Rim
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
--------------------------------------------
FlipperExt (from xBAM.Flipper)
.Mass
.Omega
.ReleaseOmega
.SetMaterial elasticCoef, softnessCoef, staticFriction, kineticFriction
.Angle
.ContactPoint
.BallHSpeed
.BallVSpeed
.Hit
.AngleDiff
.IsSolenoidOn (READONLY)
--------------------------------------------
DispDMDExt (from xBAM.DispDMD)
.SetMatrixColor red, green, blue
.SetBackgroundMatrixColor red, green, blue
.SetMatrixBaseColor red, green, blue
.FullColorBackground (bool value: true/false, can be SET and READ)
.Visible
--------------------------------------------
HudDMDExt (from xBAM.HudDMD)
.SetMatrixColor red, green, blue
.FullColorBackground (bool value: true/false, can be SET and READ)
.SetBackgroundMatrixColor red, green, blue // probably don't work
--------------------------------------------
DispReelExt & IDispSegExt (created with xBAM.CreateAllExt from DispReel and DispSeg with added "Ext" at end of object name)
.Visible (you can hide disp reel and disp seg with this)
--------------------------------------------
LightExt (created with xBAM.CreateAllExt from Bulbs, Flashers, image lights .... with added "Ext" at end of object name)
.SetLitColor red, green, blue
.SetUnliteColor red, green, blue
.SetPosition x,y,z, glowStaysWithModel
.GlowRadius
.DetachLight
.Brightness
.GlowBrightness
.SetGlowColor red, green, blue
.isOnBackbox
.X
.Y
.Z
.SpotLight radius, angleZ, angleX, softEdge
.SetAttenuation constant, linear, quadratic
.EnableRayCastShadows
--------------------------------------------
Camera (from xBAM.Camera)
.Mode
.AspectRatio
.ScriptControl
.RequestForControl
.DesktopSet eyeX, eyeY, eyeZ, atX, atY, atZ, fov, delay
.DesktopRelease delay
.DesktopSetLookAt eyeX, eyeY, eyeZ, atX, atY, atZ, fov, delay
.DesktopSequenceBegin seqId
.DesktopSequenceEnd
.DesktopSequenceAddEntry eyeX, eyeY, eyeZ, atX, atY, atZ, fov, delay
.DesktopSequencePlay seqId, loopFlag
.CabinetSet tX, tY, tZ, sX, sY, sZ, rX, rY, rZ, delay
.CabinetRelease delay
.CabinetSequenceBegin seqId
.CabinetSequenceEnd
.CabinetSequenceAddEntry tX, tY, tZ, sX, sY, sZ, rX, rY, rZ, delay
.CabinetSequencePlay seqId, loopFlag
--------------------------------------------
Lights (from xBAM.Lights)
.EnableNewRenderer (bool value: true/false, can be SET and READ)
.MainLightLock (bool value: true/false, can be SET and READ)
.EnablePostprocessing (bool value: true/false, can be SET and READ)
.SetMainLightPosition x, y, z
.SetMainLightProperties size, diffuse, specular, ambient
.SetMainLightAttenuation constant, linear, quadratic
.SetOtherLightsAttenuation constant, linear, quadratic
.SetPostprocessing contrast, brightness, gamma, saturation
.SetPostprocessingForNewRenderer contrast, brightness, gamma, saturation, srcGamma, srcSpecular, outDiffuse, outSpecular, outSepecularColor
.Backup
.Restore
.Brightness
.GlowBrightness
.LockGlowBrightness
.LockFlasherBrightness
.BallReflection
.BallShininess
.BallSpecular
.BallBrightness
--------------------------------------------
Gif (from xBAM.LoadGif)
.ReplaceTexture textureName
.NumFrames - READONLY returns number of frames in gif
.CurrentFrame
.StepForward
.UpdateInterval
.Frame startFrame, endFRame, repeatFrame
.Stop
.RestoreTexture
.SetTransparentColor red, green, blue
.Solid
 
Last edited:
@Gimli
Since this is sometimes updated, isn't it better a link pointing to the latest version?
 
@Gimli
Since this is sometimes updated, isn't it better a link pointing to the latest version?
Do you mean the lastest version of code extensions or BAM ?

I started a threat about BAM releases with link to latest version at top
 
I meant that .txt file because it was quoted.
 
I meant that .txt file because it was quoted.
I don't believe this info is regularly officially updated but when I requested it this was Rav's response

Updated text file:
https://ravarcade.pl/files/BAM-Script-E ... ns-Map.txt

This file is little haotic.
If you tired in searching thru it, you can use something different.
There is small tool used to read TLB files. That file is part of BAM.dll and it contains definitions of all script functions added.

http://www.benf.org/other/olewoo/index.html
You can download it & open BAM.dll
You will see everything.... but some moethods don't work, so you may find some functions broken.

... another tip, you can open Future Pinball.exe too.
 
I know it is not updated regularly and not by much sometimes. Assuming the process will continue, and since the thread exists I though I should mention it.

Going directly to the source though might be better even if a bit too geek for most. /edit and to me as my C is very rusty :)

Thanks for sharing the information.
 
@ravarcade
@Gimli

Is there a way to turn off specular globally instead of doing it for each texture?
I need to get rid of the intense light reflection on surface like apron and playfield,

doing this for every texture, is kinda overkill :

Dim tex3
Set tex3= xBAM.GetTexture("test3")
tex3.specularLevel = 0
 
@ravarcade
@Gimli

Is there a way to turn off specular globally instead of doing it for each texture?
I need to get rid of the intense light reflection on surface like apron and playfield,

doing this for every texture, is kinda overkill :

Dim tex3
Set tex3= xBAM.GetTexture("test3")
tex3.specularLevel = 0
Good question Steve
I am not aware of that option currently
 
@TerryRed
@Popotte
@shiva
@GeorgeH
@Paolo
@AnonTet
@JLou5641

I asked Rav for an updated list of the BAM code extensions
I updated it above at the top of this thread.

It includes newer stuff of course like:
1.RayCasting
2.BAM lighting extension
3.Find Objects and read its velocity , position , rotation etc...
4.Enabling Mouse controls
etc...etc..

also see enclosed attachment :
 

Attachments

  • BAM-Script-Extensions-Map.txt
    14.9 KB · Views: 44
@Gimli - any chance you could do another update on your TXT file listing out all the BAM functions?
 
BAM Extensions
If not up to date Rav have (if he want and have time) to update it.
 
BAM Extensions
If not up to date Rav have (if he want and have time) to update it.
I’ll ask rav again for an update

He did say that it was easily extracted from the BAM.dll with a specific file viewer but I never figured it out
 
I’ll ask rav again for an update

He did say that it was easily extracted from the BAM.dll with a specific file viewer but I never figured it out
I think he updated the link
 
-----------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------- Old script comment style tricks --------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------
'[BAM] !texture = textureName
'[BAM] !normalMap = textureName
'[BAM] !specularMap = textureName
'[BAM] !shininess = value
'[BAM] !specularLevel = value
'[BAM] !heightMap_bias = value
'[BAM] !heightMap_scale = value
'[BAM] !specularBalance = value
'[BAM] !specularColorRed = value
'[BAM] !specularColorGreen = value
'[BAM] !specularColorBlue = value
'[BAM] !normalMapScale = value
'[BAM] !latlong = 1
'[BAM] !latlongRotation = value
-----------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------- procedures in script called by BAM --------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------
Sub BAM_Init
Sub NewtonPhysicsTick
Sub FLIPPERNAME_prehit // note, FLIPPERNAME is FP Object Flipper Name... and xBAM.Flipper "FP Object Flipper Name" must be called in BAM_Init
Sub EnumBallsCallback ball // ball is BallInfo object
-----------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------- functions, objects, constats accesible with xBAM --------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------
xBAM
.Ball (ret: BallInfo ***)
.BallID (get int)
.BallRadius (set only)
.BallMass (set only)
.BallOpacity (set only)
.BallCloseTo x, y, z (ret: BallInfo ***)
.BallSpeedLimit (set only)

.EnumBalls max, order, callback_FunctionNameInScript

.MiniPlayfield minX, maxX, minY, maxY, minZ, maxZ, toX, toY, toZ, scale
.CreateMiniPlayfield maxX, minY, maxY, minZ, maxZ, cenX, cenY, cenZ (ret: MiniPlayfield ***)

.CreateMagneticField x, y, z, range, strength (ret: MagneticField ***)

.CreateModel ModelTemplateName, x, y, z, height, rotX, rotY, rotZ, relfectionsFlag, z2yFlag (ret: Model ***)
.LoadModels
.ModelAnimationSplit ModelTemplateName, startFrame, endFrame, dstAnim, srcAnim

.SetTexture FPObjectName, textureName, textureId (default textureId = 0)
.SetTopTexture FPObjectName, textureName (same as .SetTexture FPObjectName, textureName, 0)
.SetSideTexture FPObjectName, textureName (same as .SetTexture FPObjectName, textureName, 1)
.SetEnamelTexture FPObjectName, textureName (same as .SetTexture FPObjectName, textureName, 2)
.SetPlayfieldTexture textureName
.SetTransliteTexture textureName
.SetCabinetTexture textureName
.SetPosterTexture textureName
.GameRome (property, boolean, can be read and write, TRUE = show game room, FALSE = hide game room)

.Flipper FPFlipperObjectName (ret: FlipperExt ***)

.FixScore
.EnterPinballHighScore CurrentPlayer
.GetKeyCode keyId

.FrameCounter
.NewtonCounter

.FindObject x, y, type (get ObjectInfo)

.ShadowMap LightSourceFPObjectName, Amount, Passes, Radius, Brighness, SpotlightRange, WhiteLight, Reflection
.RemoveFlippersFromShadowmaps (bool value: true/false, can be SET and READ) // obsolete, now it is alway = true
.SetBallShadows dark_level, radius_soft, radius_hard, maxLevelAbovePlayfield

.PhysicsXML "xml"

.Camera (ret: Camera ***)
.Physics
.SetMaterial PObjectName, elasticCoef, softnessCoef, staticFriction, kineticFriction
.ExpandWorldSize left, right, up, down, above, below
.BallCollidable - sets it to FALSE and there will be no ball-ball collisions. WRITEONLY

.BallManager
.DefineCustomBall red, green, blue, dirtTextrureName, reflectionTextureName, reflectionInPlayfieldTextureName (ret: BAM_BALL_TYPE_NAME)
.CreatCustomBall BAM_BALL_TYPE_NAME (ret: BallCreationInfo)
.CreateTransformation (ret: Transformation)
.UpdateBall BallID, BAM_BALL_TYPE_NAME
.GetBallName BallID (ret: BAM_BALL_TYPE_NAME)
.SetBallOpacity BallID, opacity
.SetBallOpacityWithEasing BallId, opcity, time, easingFunction

.DispDMD DispDMDName (ret: DispDMDExt)
.HudDMD DispDMDName (ret: HudDMDExt)
.CreateAllExt
.SetDefaultMatrixBaseColor red, green, blue
.Lights (ret: Lights ***)


// ****************** new things:
.Get pluginName (ret: plugin object) see: PuPPlugin
.DisableFlipperShadows()
.EnableFlipperShadows()
.HideHud()
.ShowHud()
.HideAllDispOnBackbox()
.ShowAllDispOnBackbox()
.GetTexture "textureName" // return of texture object...
.isValid
.normalMap // same as '[BAM] !normalMap = textureName
.specularMap // same as '[BAM] !specularMap = textureName
.shininess
.specularLevel
.heightMap_bias
.heightMap_scale
.specularBalance
.specularColorRed
.specularColorGreen
.specularColorBlue
.SetSpecularColor red, green, blue
.normalMapScale
.latlong
.latlongRotation
.SetColor red, green, blue
.brightness

.Trails // way to set in script same ball trails params as in BAM menu
.Level // set "level" of ball trails.
.Color radm green, blue // set color of ball trails
.Enabled // = true or false to enable/disable trails

.Table // this variable is same as name of table, so for "NewTable" xBAM.Table is same thing as NewTabele... this way in script you don't have to check name of table to get width, height,....

.LoadGif gifTexture - returns IGif object to control gif animations
.VisibleCabParts bitField - every bit of 16 bit word enables/disable cabinet parts (legs, wood parts, etc)
.DrawCustomModelsLast - controls when BAM Custom models are drawed (boolean)
.DrawCustomModelsWithSurface "surfaceNameInFpEditor" - controls when BAM custom models are drawed
.SuppressLoadMessages - set to True to hide BAM yellow loading messages (boolean)
.EnableShadows - fake ball/flippers shadows (boolean)
.TimeScale - change physics simulation time speed, default = 1.0 (float)
.SetShadowColor red, green, blue - sets color of fake shadows
.MouseX - horizontal mouse move between frames (READONLY) (int)
.MouseY - vertical mouse move between frames (READONLY) (int)
.RayCastShadows
.Enable - use it to enable/disable ray-cast-shadows from script
.Sharpness - float
.DarkLevel
.Set sharpness, darkLevel - enables shadows and sets params for sharpness and dark level
.DumpAllObjectInfo()

constansts:
xBAM.easeLinear
xBAM.easeInSine
xBAM.easeOutSine
xBAM.easeInOutSine
xBAM.easeInQuad
xBAM.easeOutQuad
xBAM.easeInOutQuad
xBAM.easeInCubic
xBAM.easeOutCubic
xBAM.easeInOutCubic
xBAM.easeInQuart
xBAM.easeOutQuart
xBAM.easeInOutQuart
xBAM.easeInQuint
xBAM.easeOutQuint
xBAM.easeInOutQuint
xBAM.easeInExpo
xBAM.easeOutExpo
xBAM.easeInOutExpo
xBAM.easeInCirc
xBAM.easeOutCirc
xBAM.easeInOutCirc
xBAM.easeInBack
xBAM.easeOutBack
xBAM.easeInOutBack
xBAM.easeInElastic
xBAM.easeOutElastic
xBAM.easeInOutElastic
xBAM.easeInBounce
xBAM.easeOutBounce
xBAM.easeInOutBounce

xBAM.orderXYZ
xBAM.orderXZY
xBAM.orderYXZ
xBAM.orderYZX
xBAM.orderZXY
xBAM.orderZYX

xBAM.RESET
xBAM.ASAP
xBAM.APPEND

--------------------------------------------
BallInfo (from xBAM.Ball or xBAM.BallCloseTo)
.Position
.x
.y
.z
.PositionGlobal
.x
.y
.z
.Velocity
.x
.y
.z
.Speed
.HitSpeed
.Exist
.ExtInt1 (can be SET or READ)
.ExtInt2 (can be SET or READ)
.ExtInt3 (can be SET or READ)
.ExtFloat1 (can be SET or READ)
.ExtFloat2 (can be SET or READ)
.ExtFloat3 (can be SET or READ)
.Id (READ only)
.Name (can be SET or READ)
.UpdateBall Red, Green, Blue, DirtTexture, ReflectionTexturem, ReflectionInPlayfield
.Opacity (only SET)
.SetBallOpacityWithEasing opacity, time, easingFunction
.ExtTimer1 (READ only)
.ExtTimer2 (READ only)
.ExtTimer3 (READ only)
.ResetExtTimer idx (idx = 1, 2, 3)
.StopExtTimer idx (idx = 1, 2, 3)

---------------------------------------------
BallCreationInfo (from xBAM.BallManager.CreateCustomBall)
.Red (read only)
.Green (read only)
.Blue (read only)
.BallNumer (read only)
.Opacity (can be SET and READ)
---------------------------------------------
Transformation (from xBAM.BallManager.CreateTransformation)
.AddRule sourceBall, DestinationBall
.Update ballID
---------------------------------------------
MiniPlayfield (from xBAM.CreateMiniPlayfield)
.Position
.x
.y
.z
.Rotation
.x
.y
.z
.Scale
.Time
.MoveTo x, y, z, rotX, rotY, rotZ, scale, time
.Easing (set only)
.EasingPosition (set only)
.EasingRotation (set only)
.EasingScale (set only)
.TargetPosition
.x
.y
.z
.TargetRotation
.x
.y
.z
.TargetScale
.CurrentPosition
.x
.y
.z
.CurrentRotation
.x
.y
.z
.CurrentScale
.RotationOrder
.TrackedBall (can be SET and READ, BallInfo)
.TrackedBallExist
.TrackedBallStop
.Inertia
.TraceBallRotation
.GravityAngle
.GravityRotation
.GravityScale
.SetGravity angle, rotation, scale
.Collidable
.PhysicsMove
.Update maxX, minY, maxY, minZ, maxZ, cenX, cenY, cenZ
-------------------------------------------
MagneticField (from xBAM.CreateMagneticField)
.X
.Y
.Z
.Strength
.Range
.SingleBall
.Horizontal
.MaxForce
.MinZ
--------------------------------------------
ObjectInfo (from xBAM.FindObject) (everything read only)
.Position
.x
.y
.z
.Rotation
.x
.y
.z
.Velocity
.x
.y
.z
.RotationSpeed
.x
.y
.z
.Exist
.Material
.lineardamping
.angulardamping
.Center
.x
.y
.z
--------------------------------------------
Model (from xBAM.CreateModel)
.Position
.x
.y
.z
.Rotation
.x
.y
.z
.Scale
.x
.y
.z
.Z2Y
.Reflections
.Mode
.Anim StringAsAnimationDescription
.Loop StringAsAnimationDescription
.Frame start, end, loop
.CurrentFrame
.Speed
.Kd
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Ks
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Ke
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Spe
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Rim
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Part partIndex (ret: ModelPart)
.Visible
.Height
--------------------------------------------
ModelPart (from Model.Part partIndex)
.Kd
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Ks
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Ke
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Spe
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
.Rim
.r (is same thing as .x)
.g (.y)
.b (.z)
.a (.w)
--------------------------------------------
FlipperExt (from xBAM.Flipper)
.Mass
.Omega
.ReleaseOmega
.SetMaterial elasticCoef, softnessCoef, staticFriction, kineticFriction
.Angle
.ContactPoint
.BallHSpeed
.BallVSpeed
.Hit
.AngleDiff
.IsSolenoidOn (READONLY)
--------------------------------------------
DispDMDExt (from xBAM.DispDMD)
.SetMatrixColor red, green, blue
.SetBackgroundMatrixColor red, green, blue
.SetMatrixBaseColor red, green, blue
.FullColorBackground (bool value: true/false, can be SET and READ)
.Visible
--------------------------------------------
HudDMDExt (from xBAM.HudDMD)
.SetMatrixColor red, green, blue
.FullColorBackground (bool value: true/false, can be SET and READ)
.SetBackgroundMatrixColor red, green, blue // probably don't work
--------------------------------------------
DispReelExt & IDispSegExt (created with xBAM.CreateAllExt from DispReel and DispSeg with added "Ext" at end of object name)
.Visible (you can hide disp reel and disp seg with this)
--------------------------------------------
LightExt (created with xBAM.CreateAllExt from Bulbs, Flashers, image lights .... with added "Ext" at end of object name)
.SetLitColor red, green, blue
.SetUnliteColor red, green, blue
.SetPosition x,y,z, glowStaysWithModel
.GlowRadius
.DetachLight
.Brightness
.GlowBrightness
.SetGlowColor red, green, blue
.isOnBackbox
.X
.Y
.Z
.SpotLight radius, angleZ, angleX, softEdge
.SetAttenuation constant, linear, quadratic
.EnableRayCastShadows
--------------------------------------------
Camera (from xBAM.Camera)
.Mode
.AspectRatio
.ScriptControl
.RequestForControl
.DesktopSet eyeX, eyeY, eyeZ, atX, atY, atZ, fov, delay
.DesktopRelease delay
.DesktopSetLookAt eyeX, eyeY, eyeZ, atX, atY, atZ, fov, delay
.DesktopSequenceBegin seqId
.DesktopSequenceEnd
.DesktopSequenceAddEntry eyeX, eyeY, eyeZ, atX, atY, atZ, fov, delay
.DesktopSequencePlay seqId, loopFlag
.CabinetSet tX, tY, tZ, sX, sY, sZ, rX, rY, rZ, delay
.CabinetRelease delay
.CabinetSequenceBegin seqId
.CabinetSequenceEnd
.CabinetSequenceAddEntry tX, tY, tZ, sX, sY, sZ, rX, rY, rZ, delay
.CabinetSequencePlay seqId, loopFlag
--------------------------------------------
Lights (from xBAM.Lights)
.EnableNewRenderer (bool value: true/false, can be SET and READ)
.MainLightLock (bool value: true/false, can be SET and READ)
.EnablePostprocessing (bool value: true/false, can be SET and READ)
.SetMainLightPosition x, y, z
.SetMainLightProperties size, diffuse, specular, ambient
.SetMainLightAttenuation constant, linear, quadratic
.SetOtherLightsAttenuation constant, linear, quadratic
.SetPostprocessing contrast, brightness, gamma, saturation
.SetPostprocessingForNewRenderer contrast, brightness, gamma, saturation, srcGamma, srcSpecular, outDiffuse, outSpecular, outSepecularColor
.Backup
.Restore
.Brightness
.GlowBrightness
.LockGlowBrightness
.LockFlasherBrightness
.BallReflection
.BallShininess
.BallSpecular
.BallBrightness
--------------------------------------------
Gif (from xBAM.LoadGif)
.ReplaceTexture textureName
.NumFrames - READONLY returns number of frames in gif
.CurrentFrame
.StepForward
.UpdateInterval
.Frame startFrame, endFRame, repeatFrame
.Stop
.RestoreTexture
.SetTransparentColor red, green, blue
.Solid
 
Rav said the code below turns backbox DMD off and on:

xBAM.CreateAllExt()
DispDmd1Ext.Visible = false
DispDmd1Ext.Visible = true

Rav said that the 2 codes below are for VR users to disable "HUD" (xBAM.ShowHud / xBAM.HideHud).

.HideHud()
.ShowHud()

He said he posted what these 2 are on GoPinball years ago but doesn't remember what they do:

.HideAllDispOnBackbox()
.ShowAllDispOnBackbox()
 
Last edited:
You guys need to review this list. If there is anything you don't recall being defined anywhere, you need to ask Ravarcade. I tried to figure out how to use ".Visible" in the list, gave up and finally asked Rav. Now we have a way to easily turn backglass DMDs on and off, very much like the .fadein and .fadeout of the HUD DMD. The backglass DMD just turns on and off and doesn't fade but the code is still useful.

There might be some hidden gems in there.
 
Last edited:
...
He said he posted what these 2 are on GoPinball years ago but doesn't remember what they do:

.HideAllDispOnBackbox()
.ShowAllDispOnBackbox()
Hide (or show) all the displays on the backbox.
 
Hide (or show) all the displays on the backbox.

Do you code it as
xBAM.HideAllDispOnBackbox()
xBAM.ShowAllDispOnBackbox()
 
How to use .VisibleCabParts:

 
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
      Chat Bot Mibs Chat Bot Mibs: scotty74fr has left the room.
      Back
      Top