BAM BAM: Milestone Releases with Ravarcade's Instructions

Gimli

Pinball Master
Joined
Feb 6, 2020
Messages
1,341
Reaction score
882
Points
120
Favorite Pinball Machine
Monster Bash
BAM Update v289

https://www.ravarcade.pl/files/BAM_v1.5-289.zip
https://www.ravarcade.pl/files/bam-setup.exe
https://www.ravarcade.pl/files/BAM-OpenVR.zip

- Bug fixes: lighting error in VR, New Renderer on objects in mini-playfield
- Added iCom & PuP Plugins, see TerryRed guide: https://vpinball.com/forums/topic/futur ... -terryred/
- PuP Plugin allows to replace any texture in FP to another texture or pup video stream with script commands
Code:
Code:
Dim PP
Set PP = xBAM.Get("PuPPlugin")

'Display open notepad on einstein poster
PP.ShowVideo "einstein poster", "Notepad", true

Dim einTex
einTexId = PP.GetTextureId("einstein poster")

Dim ornTex
ornTex = PP.GetTextureId("orn-screw")

' put orn texture on einstein poster
PP.ReplaceTexture einTexId, ornTex
PP.ShowVideo "texture name", "PuPVideo Window Full Name"
PP.ShowVideo "texture name", "PuPVideo Window partial name", True

- Limit for mini-playfields chenged from 16 to 48
- Added Update command to mini-playfield. Now you can change source box of existing mini-playfield. This way you can reuse same mini-playfield to temporaly move different objects.
Code:
Code:
Dim MiniPlayField_0        '                             Xmin     Xmax     Ymin     Ymax     Zmin     Zmax     CenX     CenY     CenZ
Set MiniPlayField_0 = xBAM.CreateMiniPlayfield( 390, 410, 290, 310, 0, 20, 400, 300, 0)

' change source box
Set MiniPlayField_0 = xBAM.Update( 290, 310, 290, 310, 0, 20, 400, 300, 0)
- Added ImageLight to "LightExt" objects. Now you can modify brightness, color, glow radius, glow color of image light same way as bulbs
- Added Texture interface. You have now way to change look of any texture, like you do with normal maps....
Simple usage pattern:
Step 1. Add to script:
Code:
Code:
Dim tex
Set tex = xBAM.GetTexture("einstein poster")
Step 2. Run table, go to menu: Dev Options -> BAM Textures, edit params
Note, you have new brightness and color params here
Step 3. Press Ctrl+C, it will create in clipboard script with all modifications. Paste it in script or text editor to see commands.

_________________
http://www.ravarcade.pl
Better Arcade Mode
BAM version: v1.5-289, released: May 10, 2020
 
BAM release v.275
https://www.ravarcade.pl/files/bam-setup.exe
https://www.ravarcade.pl/files/FP-BAM-setup.exe
https://www.ravarcade.pl/files/BAM_v1.5-275.zip

Fixed reflections in new renderer:
Image


Added "Config BAM" in Addons menu:
- you can change ball reflections, shinines, specular params
- added all above to script: xBAM.Lights.BallReflection, xBAM.Lights.BallShininess, xBAM.Lights.BallSpecular
- that params are added to 3x CTRL-C script SetLightsParamsInBAM.

 
BAM update:
https://www.ravarcade.pl/files/bam-setup.exe
https://www.ravarcade.pl/files/BAM_v1.4-257.zip
https://www.ravarcade.pl/beta/SetTextureDemo.fpt

1. In addons menu you can select "hide FP logo". This will hide logo in 5 seconds after game starts.
2. Ball/Flipper shadows should work on miniplayfields now.
3. Look at demo table. On top/left corrner you have 4 lights: flasher, bulb, light, shapeable light.
With keys on numpad you can:
- keys 7/8 - disable/enable selected light
- key 9 - select next light
- keys 4/5/6 - set unlit color
- keys 1/2/3 - set lit color
- for flasher and bulb you can use arrow keys to move it.

If you have in FP command xBAM.CreateAllExt it will create all "ext" version of flashers, bulbs, lights, shapeable lights.
On demo table i care only flasher0, bulb0, light0, slight0

Now you can:
- lightExt.GlowRadius = x
Change glow radius, set to 0 to remove glow. (On demo table i change glow radius every frame, but you don't have to do it
every frame).

- lightExt.SetLitColor red, green, blue
Set Lit color (any time in script)

- lightExt.SetUnlitColor red, green, blue
Set Unlit color (any time in script)

- lightExt.SetPosition x, y, z - move light (only flasher and bulb)

- lightExt.DetachLight = True - only for flasher, you can set light source position, but you will not move flasher model.
 
BAM Update v.254

https://www.ravarcade.pl/files/bam-setup.exe
https://www.ravarcade.pl/files/BAM_v1.4-254.zip

New things in scripts:
1. FlipperExt, DispDMDExt, HudDMDExt & xBAM.CreateAllExt
To get control over aditional params for flipper in script you need to create flipperEXT object.
You do it inside BAM_Init subroutine: call xBAM.Flipper function with flipper name as argument.
It looks like this:
Image


In this new BAM you have control over DispDMD and HudDMD and you need EXT objects to control new params. You create that objects with xBAM.DispDMD and xBAM.HudDMD same way as for flippers. Code looks like this:
Image


So, you have to write few lines of code ... and you can make a lot of typos.

Lets make your life easy.

You can replace all that code with one command:
xBAM.CreateAllExt
This single line will create all "Ext" objects for every flipper, hudDMD, dispDMD on table. So, if in FP you have "LFlipper", "LFlipper2", "RFlipper", "HudScore", "HudScore2", when after this one line you will have "LFlipperExt", "LFlipper2Ext", "RFlipperExt", "HudScoreEXT", "HudScore2Ext".

2. OnPreHitFlipperExt
Here is scenario: you have "LeftFlipper" & "RightFlipper" and you need to write same flipper "PreHit" subroutine for both flippers. In old BAM you need to write 2 separate "PreHit" subroutines. In both most likely you will call third "PreHit" subroutine with FlippeExt as argument.

Once again a lot of code to write.

Lets make your life easy.
You don't need to write "LeftFlipper_PreHit", "RightFlipper_PreHit". You can rename "OnPreHitFlipperSetting" subroutine to "OnPreHitFlipperExt" and it will be called for every flipper on table without own "PreHit" subroutine.
Image


... and if you still need different params for "LeftFlipper" you can create "PreHit" subroutine only for it.
Image


3. DispDMD & HudDMD. **See Demo table from RAV below ADDED April 5, 2022
With dispDMD1Ext (an Ext object for "dispDMD1") you can:
- dispDMD1Ext.SetMatrixColor red, green, blue - change color of DMD (same way as in FP editor) any time in script.
- dispDMD1Ext.SetBackgroundMatrixColor red, green, blue - change color of image from image list displayed on DMD... and yes, it may be different color.
- dispDMD1Ext.SetMatrixBaseColor red, green, blue - change color of DMD outside dots. Default value in FP is 51, 0, 0.
- dispDMD1Ext.FullColorBackground[/b] = True/False - you can make image from image list displayed on DMD full color.

With hudDMD1Ext (an Ext object for "hudDMD1") you can:
- hudDMD1Ext .SetMatrixColor red, green, blue - change color of DMD (same way as in FP editor) any time in script.
- hudDMD1Ext .FullColorBackground[/b] = True/False - you can make image from image list displayed on DMD full color.
But, you can't change SetBackgroundMatrixColor or SetMatrixBaseColor like you do it for DispDMD

- xBAM.SetDefaultMatrixBaseColor red, green, blue - change color of DMD outside dots for ALL DMD, Hud & Disp. So, for HudDMD you can change this MatrixBaseColor, but it will change ALL DMDs, not only one selected.

Link to demo table:
https://www.ravarcade.pl/files/DmdExtDisplayDemo.fpt
Use keys: F,G,H,J,K,L, on numpad: 7,8,9, 4,5,6, 1,2,3, 0, .(comma)

4. Lights controled in script.
You can control lights in script. There is 9 new commands... all are described on this on image:
Image

... and as usualy you can use CTRL-C in Lights or postprocessing menu to get ready to paste in script code with values.

5. CTRL-C repeated 3x & 4x times.
Can use CTRL-C shortcut inside 10+ BAM menus to get code ready to paste in script. I think that is too many CTRL-C....

Lets make your life easy.

If you are in BAM menu (in any place) and press 3x times CTRL-C in row in short time, you will get in clippboard "BAM_Init" and few more lines with setup code for:
- All used Mini-playfields
- All used Magnetic fields
- SetLightsParamsInBAM subroutine (see previous point)
- ShadowMaps command in BAM_Init
- Camera Sequence animations in BAM_Init
- Flippers starting params in BAM_Init

So, you will not have to look at all that BAM menus and copy parts after parts.

... and if you press 4x times CTRL-C in row you will get all above and:
- physics xml in comment section
- call to xBAM.CreateAllExt with list of created "Ext" objects
- some flipper _prehit subroutines (empty or commented)

... just try it.



_________________
http://www.ravarcade.pl
 

Attachments

  • DmdExtDisplayDemo.fpt
    12 KB · Views: 19
Last edited:
BAM update. v233

https://www.ravarcade.pl/files/bam-setup.exe
https://www.ravarcade.pl/files/BAM_v1.4-233.zip
https://www.ravarcade.pl/files/BAM-OpenVR.zip

Change log:
- dynamic flippers setting (see thread: http://gopinball.com/forum/viewtopic.php?f=86&t=6676)
- FP broken flipper shape and wird ball collision fixed

Dynamic flippers setting in short: When ball hit flipper, all params, like flipper mass, omega, elasticCoef can be adjuste based on ball speed, move direction, contact point for that one "hit".

Watch comming Monster Bash table.
 
v222 is now released version.

Links to BAM:
https://www.ravarcade.pl/files/bam-setup.exe
https://www.ravarcade.pl/files/BAM_v1.4-222.zip
https://www.ravarcade.pl/files/BAM-OpenVR.zip

Changelog (since last offical release v207):
- shadow maps
- FP memory leak
- faster table loading

Demo video with shadow maps:

Demo table:
https://www.ravarcade.pl/files/shadowmaps-demo.fpt

Thread with info about shadow maps:
viewtopic.php?f=86&t=6656

_________________
http://www.ravarcade.pl
Better Arcade Mode
 
Update.
https://www.ravarcade.pl/files/FP-BAM-setup.exe
https://www.ravarcade.pl/files/BAM_v1.4-207.zip
https://www.ravarcade.pl/files/BAM-OpenVR.zip
https://www.ravarcade.pl/files/bam-setup.exe

- bug fixes
- custom camera for desktop users.
- custom camera controlled by script.
- camera animation sequencer (
).
- physics params can be set for individual objects on table (walls, flippers).
Syntax:
xBAM.Physics.SetMaterial "Objectname", elasticCoef, softnessCoef, staticFriction, kineticFriction
- some errors in script are now reported to debug window (when game is started with F9), so if you mistype name of object or texture in commands: xBAM.SetTexture or xBAM.Physics.SetMaterial you will get some info.

_________________
http://www.ravarcade.pl
Better Arcade Mode
 
BAM Update!
http://www.ravarcade.pl/files/bam-setup.exe
http://www.ravarcade.pl/files/BAM_v1.4-183.zip

Added support for big score / high score:
Previous Max: 2 147 483 647
Current Max: 922 337 203 685 477 (15 digits)

BAM Update.
http://www.ravarcade.pl/files/bam-setup.exe
http://www.ravarcade.pl/files/BAM_v1.4-154.zip
http://www.ravarcade.pl/files/BAM-OpenVR.zip

All things from "beta-BAM" are now in normal official release:
- Magnetic fields, see: viewtopic.php?f=86&t=6356
- Physics tweaks, see: viewtopic.php?f=86&t=6276
- Some bugfixes

_________________
http://www.ravarcade.pl
Better Arcade Mode


_________________
http://www.ravarcade.pl
Better Arcade Mode
 
Last edited:
BAM Update.

http://www.ravarcade.pl/files/bam-setup.exe
http://www.ravarcade.pl/files/BAM_v.1.4-124.zip

Files changed: All *.dll and *.exe, exept 2 files from Microsoft.

Change log:
1. Few new custom ball fixes.
2. FP script addons: xBAM_BallManager and more. See this thread: viewtopic.php?f=86&t=5583
3. FP script addons: xBAM_MiniPlayfield. See this thread:
viewtopic.php?f=86&t=6098
4. FP script addons: xBAM_Ball, xBAM_BallCloseTo. See this thread:
viewtopic.php?f=86&t=6109
5. All *.dll and *.exe files in BAM are now with "Code signing certificate".
So this first release signed with "code signing certificate". This is my last try to solve that nasty removing of BAM files by antivirus.
Why it is important for AV programs? Signed exe or dll file has author (person to blame if something goes wrong). Also it has encrypted checksum used to verify if file is modified after release. AV programs for some time like to remove all files from unknow source or with small number of users. You already may see messages like: program, dll, exe has low reputation. Now all my files are "signed" by my and in time i hope to gain some "reputation" for AV programs. In time i hope they stop removing my programs. Not now, but some day. I pay $180 for that certificate. I hope that money is not wasted.

6. One more thing: All AV programs don't like my "FPLoader.exe". They think that it may be virus. Cool. So if you don't trust my here is solution for you:
https://github.com/ravarcade/BAM_FPloader
Source code of my FPLoader. You can compile own. It is current verion i use now.

Troubleshoting:
I realy recomend to replace all *.dll and *.exe with new versions. Well they are same as last relase but but with "code signing certificate". So all previous files will still work. Only BAM.dll is realy new.

_________________
http://www.ravarcade.pl
Better Arcade Mode
 
BAM Update.

http://www.ravarcade.pl/files/bam-setup.exe
http://www.ravarcade.pl/files/BAM_v1.3-121.zip
http://www.ravarcade.pl/files/BAM_for_TPA.zip

Updated files: BAM.dll, renderingengine.dll, BAM-Tracker.exe
Added files: Whole "Balls" dir with additional ball textures from miownkhan.

Change log:
- Fixed ball drawning when table is rotated. Please enable "dirt marks" to get new balls look.
- You can change ball textures during game with 'P' and 'N' keys. If "Balls" dir with additional ball textures is present. This dir is optional. BAM will work without it.
- VB Script enhancements: Now on table same time can be many balls with different textures and appearance of ball can be changed anytime.
- New BAM-Tracker with completly new communication patern.
- BAM for The Pinball Arcade. It uses BAM-Tracker. How to run is guide is here: http://www.gopinball.com/forum/viewtopi ... 7&start=10

_________________
http://www.ravarcade.pl
Better Arcade Mode
 
I did EXACTLY that, step by step.

Step 0 : I Renamed the texture "einstein poster" to "einstein" and applied it to the apron,

Step 1 Insert Code:
Dim tex
Set tex = xBAM.GetTexture("einstein")

Step 2 Run Table.
went to menu: Dev Options -> BAM Textures, edit params
lTexture=none,(?) tried to adjust specular to 0

Step 3.
Press Ctrl+C, Nothing happen when I go back pasting it in script editor...nada, blank...

@Gimli Is there some other "up to date" infos somewhere I don't know?

1597939260868.png
***I am trying to get rid of the ugly flare caused by Flashers on the table playfield and apron.
 
Last edited:
Hey Steve
Did you get your answer ?
 
@polygame

I could be wrong... but I believe that texture menu is a much older BAM function...and never had the ability to Copy and Paste changes from it (whereas many other menus did).

I think you need to started off with the correct code for that texture to show up in the menu (to allow you to edit the specular and brightness, normal mapping,etc).... then when you start the table, you'll see the BAM textures showup in that menu, and you can make changes...but you can't copy them back. I think the idea was to make the changes you wanted, then manually change the values in script as you see them.

Again, this was added long before BAM allowed you to copy from other newer menus that came along.

@Gimli and @GeorgeH would probably know better. At least this is how I used it before.
 
Last edited:
***I am trying to get rid of the ugly flare caused by Flashers on the table playfield and apron.

Steve,

I am not entirely sure what you are trying to do but I use this code in the script extensively. It will reduce or eliminate the reflections off the apron and playfield. You just add the name of the texture at the top (!texture). You can add the name of any texture on the table there. I added 24 of these to the version of Road Girls that I am working on.

The amount of reflection is adjusted by !shininess with the default being 1.0.

The brightness is controlled by !specularLevel and the setting for no additional light would be 0.001. I never use the last two parameters.

'[BAM] !texture = [playfield]
'[BAM] !shininess = 0.7
'[BAM] !specularLevel = 0.2
'[BAM] !specularBalance = 0.01
'[BAM] !normalMapScale = 1.0

You can't change these settings at different places in the script. The appearance does change a bit when you change the light settings for Day and Night. Also after you add this code to the script, you need to save and close the table for the changes to take effect.

If the texture for plastics has the apron included and you only want to adjust the apron, you can save 2 copies of the texture to the table and set one to the apron.

If you get any errors, you won't see them until you open the BAM menu and the error messages will appear on the right side of the main screen.

Is this what you wanted?

George
 
so basically instead of doing that for every texture :

Dim tex1,tex2,tex3
Set tex1 = xBAM.GetTexture("einstein1")
Set tex2 = xBAM.GetTexture("einstein2")
Set tex3 = xBAM.GetTexture("einstein3")
tex1.specularLevel = 0
tex2.specularLevel = 0
tex3.specularLevel = 0

You do this for every texture :


'[BAM] !texture = [einstein1,einstein2,einstein3]
'[BAM] !shininess = 0.7
'[BAM] !specularLevel = 0.2
'[BAM] !specularBalance = 0.01
'[BAM] !normalMapScale = 1.0


I wanted to skip the process for having to do it for EVERY TEXTURES.
So if your method does the same as this one, I'll stick with mine.
 
The brackets on mine are part of the name of the texture so no brackets on yours. I am not aware you can add commas between texture names. I think you have to repeat the code for each texture.

I didn't know it was possible to do it your way. I'll have to try it. Your method might be able to be added to different places in the script with different values. Does it work on shininess?
 
yes it does Georges.

@ravarcade All I wanted to know if the shininess could be completely turned off as a global value.

E.G. xBam.Table.SpecularLevel=0

Also since MP are containers, would it be possible to have a propriety to switch the entire MP opacity to 0 or should I use scale 0 to make them disappear?
 
Scale = 0 works well in my experiance
 
yes it does Georges.

@ravarcade All I wanted to know if the shininess could be completely turned off as a global value.

E.G. xBam.Table.SpecularLevel=0

Also since MP are containers, would it be possible to have a propriety to switch the entire MP opacity to 0 or should I use scale 0 to make them disappear?
If you set time = 0 and scale =0 it will be instantaneous . If time is greater than 0 then it will shrink away and grow back when scale > 0 based on time setting
 
Put it to you this way... Star Wars Epic Space Battles uses 25 MP's....and many of them instantly switch to 0 while swapping to another completely different model and MP.

I use 2 different X-Wing MP's and models that swap out instantly while using MP at 0. Same goes for the Tie Fighters (which I have 3 that swap out).

The reason I need to do this is because you can't change the "center" of the MP capture box over and over again during gameplay. So for things like rotation... I needed that to change the center offset for some axis drastically in order to make the space ships fly around like they do while also being able to rotate in place when on the playfield.

It works very well as opposed to needing to hide everything in the cabinet all the time.
 
Last edited:
so basically instead of doing that for every texture :

Dim tex1,tex2,tex3
Set tex1 = xBAM.GetTexture("einstein1")
Set tex2 = xBAM.GetTexture("einstein2")
Set tex3 = xBAM.GetTexture("einstein3")
tex1.specularLevel = 0
tex2.specularLevel = 0
tex3.specularLevel = 0

You do this for every texture :

'[BAM] !texture = [einstein1,einstein2,einstein3]
'[BAM] !shininess = 0.7
'[BAM] !specularLevel = 0.2
'[BAM] !specularBalance = 0.01
'[BAM] !normalMapScale = 1.0


I wanted to skip the process for having to do it for EVERY TEXTURES.
So if your method does the same as this one, I'll stick with mine.
Here is code sample to set SpecularLevel for many textures in one step:
Code:
SetTexParams("[chrome-silver],kicker-hole-t1-red,kicker-hole-t2,kicker-hole-t3,orn-hole,orn-screw,p1-beachwood,p1-plunger-cutout,peg-metal")

Sub SetTexParams(texNames)
    Dim texArray, oneTexName, tex
    texArray = Split(texNames,",")
    For each oneTexName in texArray
        Set tex = xBAM.GetTexture(oneTexName)
        If tex.isValid Then
            tex.SpecularLevel = 0
        End If        
    Next
End Sub
You just give list of texture names separated with coma in arg to SetTexParams.
You may call many times SetTexParams.
So, this will works:
Code:
SetTexParams("einstein,zweitein,treistein")
SetTexParams("boom,doom,kaboom")
 
Yah, I ended up using an array similar to that for cycling RGB lighting in Retroflair BAM and F-14 PinEvent. Not that I came up with it....but have seen similar used in VP tables and other tables before.
 
Here is code sample to set SpecularLevel for many textures in one step:
Code:
SetTexParams("[chrome-silver],kicker-hole-t1-red,kicker-hole-t2,kicker-hole-t3,orn-hole,orn-screw,p1-beachwood,p1-plunger-cutout,peg-metal")

Sub SetTexParams(texNames)
    Dim texArray, oneTexName, tex
    texArray = Split(texNames,",")
    For each oneTexName in texArray
        Set tex = xBAM.GetTexture(oneTexName)
        If tex.isValid Then
            tex.SpecularLevel = 0
        End If       
    Next
End Sub
You just give list of texture names separated with coma in arg to SetTexParams.
You may call many times SetTexParams.
So, this will works:
Code:
SetTexParams("einstein,zweitein,treistein")
SetTexParams("boom,doom,kaboom")

Thanks Rafal!

I used this code on Attack from Mars. The plastics are dark at the start and become brighter when the game starts so I used your code to turn the lighting on for several models. Setting the SpecularLevel to 0 only took one subroutine. Turning the lighting on required 4 subroutines because I had them set to different pecular levers. So I named SetTexParams2(texNames), SetTexParams3(texNames) etc.

It worked like a charm.
 
@ravarcade

I set up the SpecularLevel code as you said and it worked. ...But I then added switchable light modes between 4 lighting modes that use New Renderer and one mode that uses FP Original. Any given specular level that looks good on New Renderer is excessively bright on FP Original. I created some code to set the specular level for FP Original so it is always set to 0. If I switch between New Renderer and FP Original light modes before the game starts, my code appears to work. If I start with New Renderer and switch to the FP Original light mode during a game, the excessively bright specular level still occurs.

Is it supposed to work this way? I could change the code so the lighting modes can only be changed before a game starts if needed.
 
Forum activity
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: Beers is our newest member. Welcome!
      Back
      Top