Jump to content



Photo
- - - - -

Future Pinball Physics Finally Fixed


  • Please log in to reply
110 replies to this topic

#41 gimli246

gimli246

    Enthusiast

  • Members
  • PipPipPip
  • 278 posts

  • Flag: Canada

  • Favorite Pinball: Monster Bash

Posted 29 August 2018 - 09:33 PM

 
I was so used to FP physics that I could make most of the shots on certain of my favorite table

 
I actually don't believe you here. You should be able to make a shot if on target on a machine, FP never did this very well. All other hacks never worked great either, illusions.
 
 
I'd say a lot of people have seen numerous captures of FP anyway. If there's a difference, we'll see it. That's all trying to say, a bit of video evidence.
 
Hopefully you can tell from that video that flipper accuracy is very good now

Skip to 33 secs in video (the first part demonstrates how flipper speed is adjusted based on predicted contact point)
In the video pay attention once the ball is cradled (as flipper testing tool often launched before I was ready) The red flashing arrows show the intended target...

The cental drop target zone , and the ramps left and right of centre I can hit at will. The left and right orbits perhaps 60% of the time. The lane between the right ramp and right orbit is a little tricky maybe 40% and the left barrel barrel lane probably I can hit 80% although video doesn't show that until the end...

Backhand shots I am not proficient at on any system..

https://youtu.be/CqzNKJIsUWc

Edited by gimli246, 29 August 2018 - 10:25 PM.


#42 gimli246

gimli246

    Enthusiast

  • Members
  • PipPipPip
  • 278 posts

  • Flag: Canada

  • Favorite Pinball: Monster Bash

Posted 09 October 2018 - 04:53 PM

Two more tables have been updated using Dynamic Flipper Coding:

 

1. Medieval Madness

http://www.pinsimdb....adness_ultimate

 

 

2.Turok

http://www.pinsimdb....download-174491

 

I have just tried both and I think the flipper aiming is excellent.

Again, the general table physics (xml file etc..) is independent from the dynamic flipper settings... so try to remember this when assessing these tables.

And please try to assess each on their own merits.

 

I hope that SlamT1lt and some of the old table creators, will experiment with Dynamic Flippers on future tables...it would be interesting to see where all this could go in terms of enhancing FP game play



#43 gimli246

gimli246

    Enthusiast

  • Members
  • PipPipPip
  • 278 posts

  • Flag: Canada

  • Favorite Pinball: Monster Bash

Posted 19 October 2018 - 04:37 PM

Another Dynamic Flipper and VR release

3.Jaws

http://www.pinsimdb....3-jaws_ultimate



#44 gimli246

gimli246

    Enthusiast

  • Members
  • PipPipPip
  • 278 posts

  • Flag: Canada

  • Favorite Pinball: Monster Bash

Posted 16 November 2018 - 01:27 PM

https://youtu.be/7Ix0W6HvvzQ
Indiana Jones Pinball Adventure
Gameplay starts around 3 minute mark of video

I added a bunch of stuff to my previous version and decided to get back to it, especially with all of the recent enhancements of BAM.

some of the stuff I am working on:

1.Dynamic flippers (with GeorgeH's help)
2.Upgraded the menu system
3.Added a bunch of VR rooms
4.I am using a hybrid of SLAMT1LT ultimate and Glxb's version.
I added a bunch of models and switch the table cabinet back to wood just for fun
5.Playing with BAM's new camera function
6.Much enhanced path of adventure physics (due to BAM miniplayfield gravity settings)
7.Added the proper POA texture that was missing in my last mod
8. As before true multiplayer function, save game mode etc..
9.With Gin's help, I fixed the Tank Chase DMD (added Indy on a horse chasing tank)
10. Also with Gin's help I fixed Streets of Cairo DMD (Added the jumping screeching monkey that shows where Marion is hiding)
11. Fixed a bunch of the DMD timing
12. Enhanced mode has a few tricks (boulder will crash into you during Multiball mode,
the ark will come towards you during "choose wisely" and the planes will buzz around you during "dog fight"
13.as before custom balls by mionwkhan
14. All user options are saved and restored each time you load table
(The saved features include 3 vs 5 ball, hud on/off, enhanced features on/off, Games Room choice, Camera mode on/off
15. Stats will display during game if flippers are held for 5 seconds
16. Multiball mode coded as per rules
17. Bonus added and graphically displayed at the end of ball
I hope to release eventually , but I want to go through the timing of all the DMD's a little more...

Edited by gimli246, 11 December 2018 - 01:10 PM.


#45 JonBaker

JonBaker

    Enthusiast

  • Members
  • PipPipPip
  • 343 posts
  • Location:Where time has no meaning

  • Flag: Scotland

  • Favorite Pinball: Hong Kong Phooey - Doesn't exist but it should

Posted 01 December 2018 - 02:35 AM

I'm extremely grateful for all the hard work that has gone into improving Future Pinball over the years.  While VP makes small steps at improvements, FP takes giant leaps.

 

No sim will ever match a real pinball game and all have their faults, but FP certainly has the most potential with almost unlimited possibility. 

 

For me, VP is the king of recreations.  FP is the king of original ideas.  And FX3 is something you play while on the loo.

 

And yes, the title of this thread is misleading....no way are the 'physics finally fixed'.  Improved certainly.


Edited by JonBaker, 01 December 2018 - 02:40 AM.


#46 gimli246

gimli246

    Enthusiast

  • Members
  • PipPipPip
  • 278 posts

  • Flag: Canada

  • Favorite Pinball: Monster Bash

Posted 01 December 2018 - 07:10 PM

Thanks JonBaker.  Ya the title of the thread was a bit of a bait and switch...But I wanted to draw attention to this new feature.
 
And just today SLAMT1lt has weighed in and given his support !!  It is a team effort (Ravarcade, GeorgeH, Shiva, BlindPeser, Myself and anyone else who is interested)  
 
 "Excellent work George. The biggest pain in my backside has always been the accuracy of FPs flippers. Over the years, I've programed my brain to fire the flippers a millisecond sooner than I normally would to nail the shots. But noobies ...... can't handle this, so FP has been getting a bashing. Now I always stand up for little kid being bullied and so it's been my goal over the past 10 years to make pinball games better ....and exclusivly for Future Pinball. I've pretty much figured out how to fix everything except the flippers and now, thanks to your efforts, we're getting a step closer. And Ravarcades continuing improvements to BAM are making Future Pinball stand head and shoulders above anything else. That skinny, bullied kid is growing up to be a strong and successful contender!"

Edited by gimli246, 05 December 2018 - 02:16 PM.


#47 gimli246

gimli246

    Enthusiast

  • Members
  • PipPipPip
  • 278 posts

  • Flag: Canada

  • Favorite Pinball: Monster Bash

Posted 01 December 2018 - 07:31 PM

Oh and Slam just posted this Video demo using Dynamic Flippers !

 

https://www.youtube....h?v=X97XDnm7XVg


Edited by gimli246, 01 December 2018 - 07:32 PM.


#48 gimli246

gimli246

    Enthusiast

  • Members
  • PipPipPip
  • 278 posts

  • Flag: Canada

  • Favorite Pinball: Monster Bash

Posted 03 December 2018 - 07:02 PM

Here is a demo updating RL new version of Junkyard with Dyamic Flipper Coding and a Wrecking Ball Simulation that uses

an array of BAM's features including:

https://youtu.be/kRUsCHca2Bc

1.Dynamic Flipper Coding

2.Bam Magnetic Fields

3.Bam Customball Creation (Opacity, Radius, Mass, Texture)

4.Bam Toy Animation

5.Bam Ball tracking 

 

And here is a demo of using Bam Magnets to raise and lower the wrecking ball

https://youtu.be/vH_MAK7ONwE

 

It is kinda of fun when you think of all the possibilities now !


Edited by gimli246, 04 December 2018 - 04:41 PM.


#49 gimli246

gimli246

    Enthusiast

  • Members
  • PipPipPip
  • 278 posts

  • Flag: Canada

  • Favorite Pinball: Monster Bash

Posted 05 December 2018 - 01:16 PM

GeorgeH has released Iron Man with dynamic flippers and has added numerous tweaks
http://www.pinsimdb....on_man_ultimate

More positive feedback from SLAM !

"I've copied the Gimli flipper code into all my other ULTIMATE Pro tables now and holy moly, what a difference. I don't give a shit about high scores but I'm pretty certain I'm breaking all my previous bests.
So where does Future Pinball rank now that it has [almost] fixed flippers? It's the best, no question. Combined with the always-improving BAM, it's just in a league of it's own....it's getting close"

I am thrilled that Dynamic Flippers are finally gaining some traction.

Hopefully this can be a spark to re-awaken more of the FP greats like rom, Glxb and Francisco !

Drakko has also come back on the scene and is working on Metroid Pinball!

This approach is still in its infancy and an R and D team would be awesome.

All that is currently implemented is an adjustable code template for adjusting flipper speed based on flipper contact point.

And an adjustable template for bounce control.

In addition to contact point ,Bam tracking allows for monitoring ballspeed,
Ball velocities (Horizontal, vertical and composite directional), Flipper Angles,Maximum Speed and flipper collision.

Features that can be dynamically changed in code based on these tracked parameters include not only flipper speed (omega) but flipper material properties such as friction, mass and elasticity

Because these features are now codeable, you can also alter them based on any game play event

And it also should be understood that these Dynamic code recipes can be combined for specific tasks

For instance :
If vertical velocity is greater than 500 and flipper contact point is less than 0.5

Then flipper speed is 40 and elasticity is 2

Lots of potential but for now we highlight an intro code so you can see the difference and hopefully understand the potential

Edited by gimli246, 06 December 2018 - 06:44 PM.


#50 gimli246

gimli246

    Enthusiast

  • Members
  • PipPipPip
  • 278 posts

  • Flag: Canada

  • Favorite Pinball: Monster Bash

Posted 06 December 2018 - 05:51 PM

It looks like it will be a Merry Christmas for all of us that love future pinball and love SLAMT1LT modded tables    :)
 
According to SLAMT1lT 
 
"After testing dynamic flippers in most of my ULTIMATE Pro games now, I can say without any doubt that Future Pinball's physics are officially.....awesome.
 
​Combined with my own fixes to geometry and physics, and BAM's incredible light engine,  Future Pinball is one giant leap ahead.
 
The dynamic flipper code will now be added to all my scripts, so the games are good to go with everything already done.  Just load and play.
 
​Future Pinball will continue to improve for many more years I'm sure, so what I think is awesome today, may be dog shit tomorrow (like my ULTRA and ULTIMATE Edition games).  But that's progress -  always moving forward, always improving.
 
​It's been a long journey getting FP to this stage, and during the past 10 years many great authors have moved on. ...
 
 It may be too late for Future Pinball, but I won't stop creating games for it. 
 
​So for the last few people who still love Future Pinball, you guys are going to get my games.
 
​Yes, I'm coming back and I'll start releasing my ULTIMATE Pro edition games this Christmas!"
 
This is amazing news  and if these tables are even half as awesome as they seem and if the physics are moving forward as most of us Future Pinball geeks believe, it will be a great Christmas indeed.
 
And the New Year looks bright !
 
Cheers

Edited by gimli246, 06 December 2018 - 05:53 PM.


#51 Slydog43

Slydog43

    Pinball Wizard

  • Platinum Supporter
  • 3,008 posts
  • Location:Hackettstown, NJ

  • Flag: United States of America

  • Favorite Pinball: Addams Family, All Williams 90's Games

Posted 06 December 2018 - 11:41 PM

Sound good, but I will only believe when I actually play the updated tables.  I just downloaded IronMan and will post back tomorrow after some play testing.  Thanks for the info



#52 TerryRed

TerryRed

    Pinball Wizard

  • Silver Supporter
  • 2,011 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 07 December 2018 - 12:08 AM

I played George's update to Iron Man for a bit yesterday. Funny as I have to switch OFF my FP brain when playing, and that takes a while.

 

I'm not expert at physics...but I will say that I can make my shots much better...once I was used to it. Going between VPX, FP, FX3, FX3 Williams, and FP with different newer flipper physics that are WIP takes a while for my brain to adjust.

 

It was definitely easier to make "most" shots. I had a harder time making center shots. There was flipper bounce, but it would be nice to see more of it.

 

Definitely a step in the right direction...and great to see this moving along.

 

 

For a casual player like me...I really like how FX3 Williams feels right now...but I would love to see FP get more like that as much as possible. Keep in mind I don;'t play real pinball too often as well.


Edited by TerryRed, 07 December 2018 - 12:09 AM.


#53 gimli246

gimli246

    Enthusiast

  • Members
  • PipPipPip
  • 278 posts

  • Flag: Canada

  • Favorite Pinball: Monster Bash

Posted 07 December 2018 - 12:08 PM

Thanks for the feedback !!

The version of Indiana Jones that I am playing which I demonstrated in video above has great aiming but low bounce.

So I think it will be important to have the right XML and bounce config

We are working with Ravarcade now to understand bounce.

I find the current low bounce similar to the VR version of Pinball FX2 and not near as bouncy as TPA mobile...which are the other systems that I've played lately.

User perception based on whatever we are acclimatized is always a huge factor...

It's like we have to sync brain rhythms first then add improved dynamic flipper targetting code ...

Terry you work in the military ?
You surely have an electronic gadget for that :)

Edited by gimli246, 07 December 2018 - 12:42 PM.


#54 GeorgeH

GeorgeH

    Pinball Fan

  • Members
  • PipPipPipPip
  • 861 posts
  • Location:Arkansas, USA

  • Flag: United States of America

  • Favorite Pinball: Black Rose

Posted 08 December 2018 - 04:31 AM

 

I played George's update to Iron Man for a bit yesterday. Funny as I have to switch OFF my FP brain when playing, and that takes a while.
 
I'm not expert at physics...but I will say that I can make my shots much better...once I was used to it. Going between VPX, FP, FX3, FX3 Williams, and FP with different newer flipper physics that are WIP takes a while for my brain to adjust.
 
It was definitely easier to make "most" shots. I had a harder time making center shots. There was flipper bounce, but it would be nice to see more of it.
 
Definitely a step in the right direction...and great to see this moving along.
 
 
For a casual player like me...I really like how FX3 Williams feels right now...but I would love to see FP get more like that as much as possible. Keep in mind I don;'t play real pinball too often as well.

 

Terry,

I posted a version of Iron Man on this thread. See if you like it:

http://gopinball.com...=6676&start=110

George

#55 gimli246

gimli246

    Enthusiast

  • Members
  • PipPipPip
  • 278 posts

  • Flag: Canada

  • Favorite Pinball: Monster Bash

Posted 11 December 2018 - 02:05 AM

I am focusing on flipper aiming as that is most crucial , at least to me.
And we still haven't fully explored this..

You are correct though that a table developer needs to try to get everything set properly.

That is why I am so happy SLAM is onboard !

I can't wait to try one of his Pro tables !!

#56 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 11 December 2018 - 07:37 PM

 

According to SLAMT1lT 
 

 

Lol, the gift that keeps giving. DELUDED.


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#57 gimli246

gimli246

    Enthusiast

  • Members
  • PipPipPip
  • 278 posts

  • Flag: Canada

  • Favorite Pinball: Monster Bash

Posted 14 December 2018 - 03:00 AM

Here is a code recipe that I absolutely love. I just tried it in Jaws, Batman Joker, Indiana Jones and Creatures

It could be the Kilkenny Beer, but I have never been able to aim so well with Future Pinball and the bounce blend seems to be improving.....just copy and paste under Options Explicit.  In addition to dynamic flippers , we have added variable bounce control based on ball speed...

 

https://youtu.be/ZJ_DeVg1UgE

Here a video , I am not sure if you can tell but I was hitting everything at will . Sorry I forgot to record sound...

' HOW TO COPY DYNAMIC FLIPPERS TO YOUR TABLE
' __________________________________________
' 
' Some of the guys have requested a way for a novice to add dynamic flippers to other tables.  
' I have adjusted the flipper settings to work with the XML file that has been added below.  I recommend 
' copying the XML along with the flipper settings. I actually tweak the settings very minimally in my custom 
' physics tables so the settings should work for you.  Just copy all the lines of this script from 
' "HOW TO COPY DYNAMIC FLIPPERS TO YOUR TABLE" down to "End of Dynamic Flipper Settings".  Then paste 
' into your table BELOW THE LINE that says "Option Explicit" in the script.  I recommend changing the 
' strength of the main slingshots located just above the flippers in the table editor to their minimum 
' setting for the table to play better. .Some additional guidance is provided in the "FLIPPER OMEGA" and 
' "BOUNCE CCONTROL" sections below.  You may need to adjust the "MinOmega" in the "FLIPPER OMEGA" section  
' below.  You should try the rest of the content to see it it works for you.  

'=============================== PHYSICS XML ===========================
'<?xml version="1.0" encoding="utf-8"?>
'<document>
'  <!—Custom Physics for Medieval Madness -->
'  <physics fps="296" threaded="1"></physics>
'  <ball newtonDamping="0" mass="72" gravity="5300" damping="1.25"></ball>
'  <flipper releaseOmega="18" rotationSpeedChart="{0.0,100.0}[0.0,100.0]" newtonDamping="1" mass="20150" omega="43" moeMethod="0" 
'           leftXoff="0" leftYoff="1500" leftZoff="0" 
'           rightXoff="0" rightYoff="1500" rightZoff="0"></flipper>
'  <bumper impulse="90.0" impulseRandomness="0" vectorRandomness="6"></bumper>
'  <autoplunger mass="20000.0" force="60000.0"></autoplunger>
'  <diverter mass="10000.0" omega="33.0"></diverter>
'  <gate mass="5.0" gravity="2500.0" damping="0.25"></gate>
'  <kicker impulse="1000.0" vukImpulse="1400.0" impulseRandomness="2" vectorRandomness="1"></kicker>
'  <plunger mass="20000.0" force="30000.0"></plunger>
'  <slingshot impulse="500.0" impulseRandomness="15" vectorRandomness="3"></slingshot>
'  <spindisk mass="10000.0" angularDamp="0.33" linearDamp="0.25"></spindisk>
'  <spinner mass="60.0" gravity="100.0" angularDamp="0.25" angularAccel="5.25" 
'           spinDampLoose="0.55" spinBackLoose="1.70"
'           spinDampNorm="0.75" spinBackNorm="1.80"
'           spinDampTight="0.95" spinBackTight="1.90"></spinner>
'  <emkicker mass="10000.0" omega="80.0"></emkicker>
'  <varitarget mass="500.0" damping="0.9" tension="3.0" return="15.0"></varitarget>
'  <magnet impulse="10.0" impulseRandomness="2"></magnet>
'  <nudge impulse="120.0" impulseRandomness="25.0" warningLevel="260" leftAngle="60" upAngle="0" rightAngle="320"
'         vectorRandomness="5" visualDistance="1" waitPeriod="300" maxBallVelocity="500.0"></nudge>
'  <defaultMat softnessCoef="0.02" elasticCoef="0.1" staticFriction="0.02" kineticFriction="0.02"></defaultMat>
'  <playfieldMat softnessCoef="0.03" elasticCoef="0.1" staticFriction="0.025" kineticFriction="0.015"></playfieldMat>
'  <metalMat softnessCoef="0.01" elasticCoef="0.1" staticFriction="0.01" kineticFriction="0.01"></metalMat>
'  <woodMat softnessCoef="0.03" elasticCoef="0.15" staticFriction="0.03" kineticFriction="0.02"></woodMat>
'  <plasticMat softnessCoef="0.02" elasticCoef="0.2" staticFriction="0.02" kineticFriction="0.01"></plasticMat>
'  <rubberHardMat softnessCoef="0.08" elasticCoef="0.42" staticFriction="0.04" kineticFriction="0.055"></rubberHardMat>
'  <rubberIntMat softnessCoef="0.1" elasticCoef="0.52" staticFriction="0.05" kineticFriction="0.065"></rubberIntMat>
'  <rubberSoftMat softnessCoef="0.12" elasticCoef="0.62" staticFriction="0.06" kineticFriction="0.075"></rubberSoftMat>
'  <gateMat softnessCoef="0.05" elasticCoef="0.65" staticFriction="0" kineticFriction="0"></gateMat>
'  <kickerMat softnessCoef="0.01" elasticCoef="0.05" staticFriction="0.8" kineticFriction="0.8"></kickerMat>
'  <rampMat softnessCoef="0.01" elasticCoef="0.01" staticFriction="0.01" kineticFriction="0.01"></rampMat>
'  <plungerMat softnessCoef="0.04" elasticCoef="0.55" staticFriction="0.02" kineticFriction="0.02"></plungerMat>
'  <spindiskMat softnessCoef="0.05" elasticCoef="0.5" staticFriction="1.5" kineticFriction="2"></spindiskMat>
'</document>
'=============================== PHYSICS XML ===========================

' === Dynamic Flipper Settings ===


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Start of Monitoring Code''''''''''''''''''''''''''''''''''


Dim BallTrajectory


Sub NewtonPhysicsTick()
   BallTrajectory  = Atn2( xBAM.Ball.Velocity.X, xBAM.Ball.Velocity.y )
   Dim ball
   Set ball = xBAM.BallCloseTo(0,0)
   
      AddDebugText "ball.Speed: " & ball.Speed
      AddDebugText "xBAM.Ball.Velocity.y: " & xBAM.Ball.Velocity.y
      AddDebugText "xBAM.Ball.Position.Y: " & xBAM.Ball.Position.Y
      AddDebugText "xBAM.Ball.Velocity.X: " & xBAM.Ball.Velocity.X
      AddDebugText "xBAM.Ball.Position.X: " & xBAM.Ball.Position.X
      AddDebugText "BounceMix: " & BounceMix
End Sub

' Convert X, Y velocities to ball trajectory angle
Const RadToDeg = 57.295779513082320876798154814105  
Function Atn2(x, y)
   If x > 0 Then
      Atn2 = Atn(y / x) * RadToDeg
   ElseIf x < 0 Then
      Atn2 = 180 - RadToDeg * Atn(y / -x)
   ElseIf y > 0 Then
      Atn2 = 90
   Else
      Atn2 = -90
   End If
   Atn2 = Atn2+90
End Function


Sub MaxSpeedTimer_Expired()  'you must add a timer in table editor called "MaxSpeedTimer"
   MaxSpeedTimer.Set False
   maxballspeed = 0
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''End of Monitoring Code'''''''''''''''''''''''''''''''''''''''''''''''  

Const BAM_VERSION = 0
AddDebugText BAM_VERSION

If BAM_VERSION > 179 Then xBAM.FixScore

If BAM_VERSION => 233 then
Dim RightFlipperExt,LeftFlipperExt            ' Needed for BAM
 Dim omegaCorrection
xBAM.BallSpeedLimit = 2500
End If   
   

Sub BAM_Init()
   If BAM_VERSION < 233 then Exit Sub
   Set RightFlipperExt      = xBAM.Flipper("RightFlipper")
   Set LeftFlipperExt       = xBAM.Flipper("LeftFlipper")
   RightFlipperExt.Omega    =         47
   LeftFlipperExt.Omega     =         43
End Sub


' FLIPPER OMEGA

' You may want to adjust the strength (also called omega) of the flippers when you add dynamic flipper to other tables.  
' Only change the values for "MaxOmega" and "MinOmega" These settings override the flipper omega listed in the XML.  
' You probably will want to adjust MaxOmega between 40 and 50 and MinOmega between 29 and 33.  
' You need to leave the section below "MinOmega" unchanged and then go on to "BOUNCE CCONTROL" below.

If BAM_VERSION => 233 then
   const MaxOmegaL  = 43  ' Omega at base of flipper.  Must be > MinOmega. Default = 45
   const MinOmegaL  = 32  ' Omega at tip of flipper. Must be < MaxOmega. Default = 31.5
    const MaxOmegaR  = 47  ' Omega at base of flipper.  Must be > MinOmega. Default = 45
   const MinOmegaR  = 32  ' Omega at tip of flipper. Must be < MaxOmega. Default = 31.5
End If

Dim BounceMix
Dim ball_to_flipper_angle
''''''''''''''''''''''''''''''''''''''''''''Right Flipper Prehit Code'''''''''''''''''''''''''''''''''''''''

Sub RightFlipper_prehit()
If BAM_VERSION < 233 then Exit Sub
   ball_to_flipper_angle =  Atn2( RightFlipperExt.BallHSpeed, RightFlipperExt.BallVSpeed )
   
   Dim ball
   Set ball = xBAM.BallCloseTo(0,0)
   If xBAM.Ball.Speed <= 200 then BounceMix = 1 'Ball Speed Measures 150 rolling down left fliper from cradled ball so this should capture it
   If xBAM.Ball.Speed > 200  then  BounceMIx = 2
      

OnPreHitFlipperSettings(RightFlipperExt)
omegaCorrection = 43 - (RightFlipperExt.ContactPoint * 14) ' Max omega is 43 and min is 28.2. 
If RightFlipperExt.ContactPoint < 0.0 then RightFlipperExt.Omega = 43
If RightFlipperExt.ContactPoint > 1.2 then RightFlipperExt.Omega = 28.2
If (RightFlipperExt.ContactPoint => 0.0) And (RightFlipperExt.ContactPoint =< 1.2) then 
RightFlipperExt.Omega = omegaCorrection
End if

   AddDebugText "RightFlipperExt.ContactPoint: " & RightFlipperExt.ContactPoint
   AddDebugText "RightFlipperExt.Mass : " & RightFlipperExt.Mass 
   AddDebugText "RightFlipperExt.Omega : " & RightFlipperExt.Omega
   AddDebugText "xBAM.Ball.Speed: " & xBAM.Ball.Speed
   AddDebugText "xBAM.Ball.Velocity.y: " & xBAM.Ball.Velocity.y
   AddDebugText "xBAM.Ball.Position.Y: " & xBAM.Ball.Position.Y
   AddDebugText "RightFlipperExt.Angle: " & RightFlipperExt.Angle
   AddDebugText "ball_to_flipper_angle: " & ball_to_flipper_angle
   
End Sub


'''''''''''''''''''''''''''''''''''''''''''''''Left Flipper PreHit Code'''''''''''''''''''''''''''''
 
Sub LeftFlipper_prehit()
   Dim ball
   Set ball = xBAM.BallCloseTo(0,0)
   If ball.Speed <= 200 then BounceMix = 1 'Ball Speed Measures 150 rolling down left fliper from cradled ball so this should capture it
   If xBAM.Ball.Speed <= 200 then BounceMix = 1 'Ball Speed Measures 150 rolling down left fliper from cradled ball so this should capture it
   If xBAM.Ball.Speed > 200  then  BounceMIx = 2
If BAM_VERSION < 233 then Exit Sub
   ball_to_flipper_angle =  Atn2( LeftFlipperExt.BallHSpeed, LeftFlipperExt.BallVSpeed )
   
OnPreHitFlipperSettings(LeftFlipperExt)
omegaCorrection = 43 - (LeftFlipperExt.ContactPoint * 14)
If LeftFlipperExt.ContactPoint < 0.0 then LeftFlipperExt.Omega = 43
If LeftFlipperExt.ContactPoint > 1.2 then LeftFlipperExt.Omega = 28.2
If (LeftFlipperExt.ContactPoint => 0.0) And (LeftFlipperExt.ContactPoint =< 1.2) then 
LeftFlipperExt.Omega = omegaCorrection
End if

   AddDebugText "LeftFlipperExt.ContactPoint: " & LeftFlipperExt.ContactPoint
   AddDebugText "LeftFlipperExt.Mass : " & LeftFlipperExt.Mass 
   AddDebugText "LeftFlipperExt.Omega : " & LeftFlipperExt.Omega
   AddDebugText "xBAM.Ball.Speed: " & xBAM.Ball.Speed
   AddDebugText "xBAM.Ball.Velocity.y: " & xBAM.Ball.Velocity.y
   AddDebugText "xBAM.Ball.Position.Y: " & xBAM.Ball.Position.Y
   AddDebugText "LeftFlipperExt.Angle: " & LeftFlipperExt.Angle
   AddDebugText "ball_to_flipper_angle: " & ball_to_flipper_angle
   
End Sub


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

' BOUNCE CCONTROL


' Bounce control is the amount of bounce the ball makes when it hits the flippers.  You may want to leave these settings unchanged.  
' I would suggest small changes here of "base_elasticCoef" and "expected_ball_speed_after_hit".

'(Note that bounce control over rides flipper elasticity listed in the XML. See lines "RightFlipperExt.Omega ="/"RightFlipperExt.Omega=")


Sub OnPreHitFlipperSettings(FlipperExt)
   If BAM_VERSION < 233 then Exit Sub
 'Exit Sub 'turn if off no bounce control
If BounceMix = 1 then OnPreHitFlipperSettings_nobounceControl(FlipperExt)
If BounceMix = 3 then OnPreHitFlipperSettings_bounceControl_verticalAverge(FlipperExt)
If BounceMix = 2 then OnPreHitFlipperSettings_bounceControl(FlipperExt) 'Original Rav Bounce
End Sub

'''''''''''''''''''''''''''''''''''''''''''''''''Original Ravarcade Bounce Control'''''''''''''''''''''''''''''''''''''''''''''''''
Sub OnPreHitFlipperSettings_bounceControl(FlipperExt)
   
   If BAM_VERSION < 233 then Exit Sub
   ' Params to tweak
   const base_elasticCoef                        = 0.90 'george .95 ' very bouncy flipper rubber
   const expected_ball_speed_after_hit           = 370 '400 calc elasticCoef to get desired ball speed after ball hit flipper
   const minimum_elasticCoef_to_scale_fast_balls = 0.20 ' we will add this to calculated elastiCoef, so ball after hit will have aditional 5% of speed before hit
   const reduction_for_flipper_in_motion         = 0.15 ' if flipper is not in starting point, reduce elasticCoef by 20%
  
   If FlipperExt.Hit Then
      Dim elasticCoef 
      Dim maxElasticCoef
      Dim ballSpeed
      ballSpeed = (FlipperExt.BallVSpeed + xBAM.Ball.Speed) * 0.5 ' averge speed of 

      maxElasticCoef = base_elasticCoef
      If FlipperExt.AngleDiff > 1 Then maxElasticCoef = maxElasticCoef - reduction_for_flipper_in_motion

      elasticCoef = base_elasticCoef
      If ballSpeed > 1 Then elasticCoef = expected_ball_speed_after_hit / ballSpeed
      elasticCoef = elasticCoef + minimum_elasticCoef_to_scale_fast_balls

      If elasticCoef > maxElasticCoef Then elasticCoef = maxElasticCoef

      FlipperExt.SetMaterial elasticCoef 
   End If
End Sub
''''''''''''''''''''''''''''''''''''''''''''''Ravarcade Bounce Control Based on average vertical velocity'''''''''''''''''''

Sub OnPreHitFlipperSettings_bounceControl_verticalAverge(FlipperExt)
   ' Params to tweak
   const base_elasticCoef                        = 0.95 ' very bouncy flipper rubber
   const expected_ball_speed_after_hit           = 400  ' calc elasticCoef to get desired ball speed after ball hit flipper
   const minimum_elasticCoef_to_scale_fast_balls = 0.20 ' we will add this to calculated elastiCoef, so ball after hit will have aditional 5% of speed before hit
   const reduction_for_flipper_in_motion         = 0.15 ' if flipper is not in starting point, reduce elasticCoef by 20%
   If FlipperExt.Hit Then
      Dim elasticCoef 
      Dim maxElasticCoef
      Dim ballSpeed
      ballSpeed = (FlipperExt.BallVSpeed + xBAM.Ball.Speed) * 0.5 ' averge speed of 

      maxElasticCoef = base_elasticCoef
      If FlipperExt.AngleDiff > 1 Then maxElasticCoef = maxElasticCoef - reduction_for_flipper_in_motion

      elasticCoef = base_elasticCoef
      If ballSpeed > 1 Then elasticCoef = expected_ball_speed_after_hit / ballSpeed
      elasticCoef = elasticCoef + minimum_elasticCoef_to_scale_fast_balls

      If elasticCoef > maxElasticCoef Then elasticCoef = maxElasticCoef
      
      FlipperExt.SetMaterial elasticCoef 
   End If
End Sub
''''''''''''''''''''''''''''''''''''''''''''No Bounce Control Reset Values from xml'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub OnPreHitFlipperSettings_nobounceControl(FlipperExt)

   RightFlipperExt.SetMaterial       0.62,        0.12,       0.06,      0.075
   LeftFlipperExt.SetMaterial       0.62,        0.12,       0.06,      0.075
   
End Sub


 ' ============================== CUT HERE END =================

Edited by gimli246, 14 December 2018 - 03:24 AM.


#58 TerryRed

TerryRed

    Pinball Wizard

  • Silver Supporter
  • 2,011 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 14 December 2018 - 03:03 AM

...oooh...

 

' HOW TO COPY DYNAMIC FLIPPERS TO YOUR TABLE
' __________________________________________
' 
' Some of the guys have requested a way for a novice to add dynamic flippers to other tables.  
' I have adjusted the flipper settings to work with the XML file that has been added below.  I recommend 
' copying the XML along with the flipper settings. I actually tweak the settings very minimally in my custom 
' physics tables so the settings should work for you.  Just copy all the lines of this script from 
' "HOW TO COPY DYNAMIC FLIPPERS TO YOUR TABLE" down to "End of Dynamic Flipper Settings".  Then paste 
' into your table BELOW THE LINE that says "Option Explicit" in the script.  I recommend changing the 
' strength of the main slingshots located just above the flippers in the table editor to their minimum 
' setting for the table to play better. .Some additional guidance is provided in the "FLIPPER OMEGA" and 
' "BOUNCE CCONTROL" sections below.  You may need to adjust the "MinOmega" in the "FLIPPER OMEGA" section  
' below.  You should try the rest of the content to see it it works for you.  

'=============================== PHYSICS XML ===========================
'<?xml version="1.0" encoding="utf-8"?>
'<document>
'  <!—Custom Physics for Medieval Madness -->
'  <physics fps="296" threaded="1"></physics>
'  <ball newtonDamping="0" mass="72" gravity="5300" damping="1.25"></ball>
'  <flipper releaseOmega="18" rotationSpeedChart="{0.0,100.0}[0.0,100.0]" newtonDamping="1" mass="20150" omega="43" moeMethod="0" 
'           leftXoff="0" leftYoff="1500" leftZoff="0" 
'           rightXoff="0" rightYoff="1500" rightZoff="0"></flipper>
'  <bumper impulse="90.0" impulseRandomness="0" vectorRandomness="6"></bumper>
'  <autoplunger mass="20000.0" force="60000.0"></autoplunger>
'  <diverter mass="10000.0" omega="33.0"></diverter>
'  <gate mass="5.0" gravity="2500.0" damping="0.25"></gate>
'  <kicker impulse="1000.0" vukImpulse="1400.0" impulseRandomness="2" vectorRandomness="1"></kicker>
'  <plunger mass="20000.0" force="30000.0"></plunger>
'  <slingshot impulse="500.0" impulseRandomness="15" vectorRandomness="3"></slingshot>
'  <spindisk mass="10000.0" angularDamp="0.33" linearDamp="0.25"></spindisk>
'  <spinner mass="60.0" gravity="100.0" angularDamp="0.25" angularAccel="5.25" 
'           spinDampLoose="0.55" spinBackLoose="1.70"
'           spinDampNorm="0.75" spinBackNorm="1.80"
'           spinDampTight="0.95" spinBackTight="1.90"></spinner>
'  <emkicker mass="10000.0" omega="80.0"></emkicker>
'  <varitarget mass="500.0" damping="0.9" tension="3.0" return="15.0"></varitarget>
'  <magnet impulse="10.0" impulseRandomness="2"></magnet>
'  <nudge impulse="120.0" impulseRandomness="25.0" warningLevel="260" leftAngle="60" upAngle="0" rightAngle="320"
'         vectorRandomness="5" visualDistance="1" waitPeriod="300" maxBallVelocity="500.0"></nudge>
'  <defaultMat softnessCoef="0.02" elasticCoef="0.1" staticFriction="0.02" kineticFriction="0.02"></defaultMat>
'  <playfieldMat softnessCoef="0.03" elasticCoef="0.1" staticFriction="0.025" kineticFriction="0.015"></playfieldMat>
'  <metalMat softnessCoef="0.01" elasticCoef="0.1" staticFriction="0.01" kineticFriction="0.01"></metalMat>
'  <woodMat softnessCoef="0.03" elasticCoef="0.15" staticFriction="0.03" kineticFriction="0.02"></woodMat>
'  <plasticMat softnessCoef="0.02" elasticCoef="0.2" staticFriction="0.02" kineticFriction="0.01"></plasticMat>
'  <rubberHardMat softnessCoef="0.08" elasticCoef="0.42" staticFriction="0.04" kineticFriction="0.055"></rubberHardMat>
'  <rubberIntMat softnessCoef="0.1" elasticCoef="0.52" staticFriction="0.05" kineticFriction="0.065"></rubberIntMat>
'  <rubberSoftMat softnessCoef="0.12" elasticCoef="0.62" staticFriction="0.06" kineticFriction="0.075"></rubberSoftMat>
'  <gateMat softnessCoef="0.05" elasticCoef="0.65" staticFriction="0" kineticFriction="0"></gateMat>
'  <kickerMat softnessCoef="0.01" elasticCoef="0.05" staticFriction="0.8" kineticFriction="0.8"></kickerMat>
'  <rampMat softnessCoef="0.01" elasticCoef="0.01" staticFriction="0.01" kineticFriction="0.01"></rampMat>
'  <plungerMat softnessCoef="0.04" elasticCoef="0.55" staticFriction="0.02" kineticFriction="0.02"></plungerMat>
'  <spindiskMat softnessCoef="0.05" elasticCoef="0.5" staticFriction="1.5" kineticFriction="2"></spindiskMat>
'</document>
'=============================== PHYSICS XML ===========================

' === Dynamic Flipper Settings ===


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Start of Monitoring Code''''''''''''''''''''''''''''''''''


Dim BallTrajectory


Sub NewtonPhysicsTick()
   BallTrajectory  = Atn2( xBAM.Ball.Velocity.X, xBAM.Ball.Velocity.y )
   Dim ball
   Set ball = xBAM.BallCloseTo(0,0)
   
      AddDebugText "ball.Speed: " & ball.Speed
      AddDebugText "xBAM.Ball.Velocity.y: " & xBAM.Ball.Velocity.y
      AddDebugText "xBAM.Ball.Position.Y: " & xBAM.Ball.Position.Y
      AddDebugText "xBAM.Ball.Velocity.X: " & xBAM.Ball.Velocity.X
      AddDebugText "xBAM.Ball.Position.X: " & xBAM.Ball.Position.X
      AddDebugText "BounceMix: " & BounceMix
End Sub

' Convert X, Y velocities to ball trajectory angle
Const RadToDeg = 57.295779513082320876798154814105  
Function Atn2(x, y)
   If x > 0 Then
      Atn2 = Atn(y / x) * RadToDeg
   ElseIf x < 0 Then
      Atn2 = 180 - RadToDeg * Atn(y / -x)
   ElseIf y > 0 Then
      Atn2 = 90
   Else
      Atn2 = -90
   End If
   Atn2 = Atn2+90
End Function


Sub MaxSpeedTimer_Expired()  'you must add a timer in table editor called "MaxSpeedTimer"
   MaxSpeedTimer.Set False
   maxballspeed = 0
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''End of Monitoring Code'''''''''''''''''''''''''''''''''''''''''''''''  

Const BAM_VERSION = 0
AddDebugText BAM_VERSION

If BAM_VERSION > 179 Then xBAM.FixScore

If BAM_VERSION => 233 then
Dim RightFlipperExt,LeftFlipperExt            ' Needed for BAM
 Dim omegaCorrection
xBAM.BallSpeedLimit = 2500
End If   
   

Sub BAM_Init()
   If BAM_VERSION < 233 then Exit Sub
   Set RightFlipperExt      = xBAM.Flipper("RightFlipper")
   Set LeftFlipperExt       = xBAM.Flipper("LeftFlipper")
   RightFlipperExt.Omega    =         47
   LeftFlipperExt.Omega     =         43
End Sub


' FLIPPER OMEGA

' You may want to adjust the strength (also called omega) of the flippers when you add dynamic flipper to other tables.  
' Only change the values for "MaxOmega" and "MinOmega" These settings override the flipper omega listed in the XML.  
' You probably will want to adjust MaxOmega between 40 and 50 and MinOmega between 29 and 33.  
' You need to leave the section below "MinOmega" unchanged and then go on to "BOUNCE CCONTROL" below.

If BAM_VERSION => 233 then
   const MaxOmegaL  = 43  ' Omega at base of flipper.  Must be > MinOmega. Default = 45
   const MinOmegaL  = 32  ' Omega at tip of flipper. Must be < MaxOmega. Default = 31.5
    const MaxOmegaR  = 47  ' Omega at base of flipper.  Must be > MinOmega. Default = 45
   const MinOmegaR  = 32  ' Omega at tip of flipper. Must be < MaxOmega. Default = 31.5
End If

Dim BounceMix
Dim ball_to_flipper_angle
''''''''''''''''''''''''''''''''''''''''''''Right Flipper Prehit Code'''''''''''''''''''''''''''''''''''''''

Sub RightFlipper_prehit()
If BAM_VERSION < 233 then Exit Sub
   ball_to_flipper_angle =  Atn2( RightFlipperExt.BallHSpeed, RightFlipperExt.BallVSpeed )
   
   Dim ball
   Set ball = xBAM.BallCloseTo(0,0)
   If xBAM.Ball.Speed <= 200 then BounceMix = 1 'Ball Speed Measures 150 rolling down left fliper from cradled ball so this should capture it
   If xBAM.Ball.Speed > 200  then  BounceMIx = 2
      

OnPreHitFlipperSettings(RightFlipperExt)
omegaCorrection = 43 - (RightFlipperExt.ContactPoint * 14) ' Max omega is 43 and min is 28.2. 
If RightFlipperExt.ContactPoint < 0.0 then RightFlipperExt.Omega = 43
If RightFlipperExt.ContactPoint > 1.2 then RightFlipperExt.Omega = 28.2
If (RightFlipperExt.ContactPoint => 0.0) And (RightFlipperExt.ContactPoint =< 1.2) then 
RightFlipperExt.Omega = omegaCorrection
End if

   AddDebugText "RightFlipperExt.ContactPoint: " & RightFlipperExt.ContactPoint
   AddDebugText "RightFlipperExt.Mass : " & RightFlipperExt.Mass 
   AddDebugText "RightFlipperExt.Omega : " & RightFlipperExt.Omega
   AddDebugText "xBAM.Ball.Speed: " & xBAM.Ball.Speed
   AddDebugText "xBAM.Ball.Velocity.y: " & xBAM.Ball.Velocity.y
   AddDebugText "xBAM.Ball.Position.Y: " & xBAM.Ball.Position.Y
   AddDebugText "RightFlipperExt.Angle: " & RightFlipperExt.Angle
   AddDebugText "ball_to_flipper_angle: " & ball_to_flipper_angle
   
End Sub


'''''''''''''''''''''''''''''''''''''''''''''''Left Flipper PreHit Code'''''''''''''''''''''''''''''
 
Sub LeftFlipper_prehit()
   Dim ball
   Set ball = xBAM.BallCloseTo(0,0)
   If ball.Speed <= 200 then BounceMix = 1 'Ball Speed Measures 150 rolling down left fliper from cradled ball so this should capture it
   If xBAM.Ball.Speed <= 200 then BounceMix = 1 'Ball Speed Measures 150 rolling down left fliper from cradled ball so this should capture it
   If xBAM.Ball.Speed > 200  then  BounceMIx = 2
If BAM_VERSION < 233 then Exit Sub
   ball_to_flipper_angle =  Atn2( LeftFlipperExt.BallHSpeed, LeftFlipperExt.BallVSpeed )
   
OnPreHitFlipperSettings(LeftFlipperExt)
omegaCorrection = 43 - (LeftFlipperExt.ContactPoint * 14)
If LeftFlipperExt.ContactPoint < 0.0 then LeftFlipperExt.Omega = 43
If LeftFlipperExt.ContactPoint > 1.2 then LeftFlipperExt.Omega = 28.2
If (LeftFlipperExt.ContactPoint => 0.0) And (LeftFlipperExt.ContactPoint =< 1.2) then 
LeftFlipperExt.Omega = omegaCorrection
End if

   AddDebugText "LeftFlipperExt.ContactPoint: " & LeftFlipperExt.ContactPoint
   AddDebugText "LeftFlipperExt.Mass : " & LeftFlipperExt.Mass 
   AddDebugText "LeftFlipperExt.Omega : " & LeftFlipperExt.Omega
   AddDebugText "xBAM.Ball.Speed: " & xBAM.Ball.Speed
   AddDebugText "xBAM.Ball.Velocity.y: " & xBAM.Ball.Velocity.y
   AddDebugText "xBAM.Ball.Position.Y: " & xBAM.Ball.Position.Y
   AddDebugText "LeftFlipperExt.Angle: " & LeftFlipperExt.Angle
   AddDebugText "ball_to_flipper_angle: " & ball_to_flipper_angle
   
End Sub


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

' BOUNCE CCONTROL


' Bounce control is the amount of bounce the ball makes when it hits the flippers.  You may want to leave these settings unchanged.  
' I would suggest small changes here of "base_elasticCoef" and "expected_ball_speed_after_hit".

'(Note that bounce control over rides flipper elasticity listed in the XML. See lines "RightFlipperExt.Omega ="/"RightFlipperExt.Omega=")


Sub OnPreHitFlipperSettings(FlipperExt)
   If BAM_VERSION < 233 then Exit Sub
 'Exit Sub 'turn if off no bounce control
If BounceMix = 1 then OnPreHitFlipperSettings_nobounceControl(FlipperExt)
If BounceMix = 3 then OnPreHitFlipperSettings_bounceControl_verticalAverge(FlipperExt)
If BounceMix = 2 then OnPreHitFlipperSettings_bounceControl(FlipperExt) 'Original Rav Bounce
End Sub

'''''''''''''''''''''''''''''''''''''''''''''''''Original Ravarcade Bounce Control'''''''''''''''''''''''''''''''''''''''''''''''''
Sub OnPreHitFlipperSettings_bounceControl(FlipperExt)
   
   If BAM_VERSION < 233 then Exit Sub
   ' Params to tweak
   const base_elasticCoef                        = 0.90 'george .95 ' very bouncy flipper rubber
   const expected_ball_speed_after_hit           = 370 '400 calc elasticCoef to get desired ball speed after ball hit flipper
   const minimum_elasticCoef_to_scale_fast_balls = 0.20 ' we will add this to calculated elastiCoef, so ball after hit will have aditional 5% of speed before hit
   const reduction_for_flipper_in_motion         = 0.15 ' if flipper is not in starting point, reduce elasticCoef by 20%
  
   If FlipperExt.Hit Then
      Dim elasticCoef 
      Dim maxElasticCoef
      Dim ballSpeed
      ballSpeed = (FlipperExt.BallVSpeed + xBAM.Ball.Speed) * 0.5 ' averge speed of 

      maxElasticCoef = base_elasticCoef
      If FlipperExt.AngleDiff > 1 Then maxElasticCoef = maxElasticCoef - reduction_for_flipper_in_motion

      elasticCoef = base_elasticCoef
      If ballSpeed > 1 Then elasticCoef = expected_ball_speed_after_hit / ballSpeed
      elasticCoef = elasticCoef + minimum_elasticCoef_to_scale_fast_balls

      If elasticCoef > maxElasticCoef Then elasticCoef = maxElasticCoef

      FlipperExt.SetMaterial elasticCoef 
   End If
End Sub
''''''''''''''''''''''''''''''''''''''''''''''Ravarcade Bounce Control Based on average vertical velocity'''''''''''''''''''

Sub OnPreHitFlipperSettings_bounceControl_verticalAverge(FlipperExt)
   ' Params to tweak
   const base_elasticCoef                        = 0.95 ' very bouncy flipper rubber
   const expected_ball_speed_after_hit           = 400  ' calc elasticCoef to get desired ball speed after ball hit flipper
   const minimum_elasticCoef_to_scale_fast_balls = 0.20 ' we will add this to calculated elastiCoef, so ball after hit will have aditional 5% of speed before hit
   const reduction_for_flipper_in_motion         = 0.15 ' if flipper is not in starting point, reduce elasticCoef by 20%
   If FlipperExt.Hit Then
      Dim elasticCoef 
      Dim maxElasticCoef
      Dim ballSpeed
      ballSpeed = (FlipperExt.BallVSpeed + xBAM.Ball.Speed) * 0.5 ' averge speed of 

      maxElasticCoef = base_elasticCoef
      If FlipperExt.AngleDiff > 1 Then maxElasticCoef = maxElasticCoef - reduction_for_flipper_in_motion

      elasticCoef = base_elasticCoef
      If ballSpeed > 1 Then elasticCoef = expected_ball_speed_after_hit / ballSpeed
      elasticCoef = elasticCoef + minimum_elasticCoef_to_scale_fast_balls

      If elasticCoef > maxElasticCoef Then elasticCoef = maxElasticCoef
      
      FlipperExt.SetMaterial elasticCoef 
   End If
End Sub
''''''''''''''''''''''''''''''''''''''''''''No Bounce Control Reset Values from xml'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub OnPreHitFlipperSettings_nobounceControl(FlipperExt)

   RightFlipperExt.SetMaterial       0.62,        0.12,       0.06,      0.075
   LeftFlipperExt.SetMaterial       0.62,        0.12,       0.06,      0.075
   
End Sub


 ' ============================== CUT HERE END =================

 

 

....oooh that text looked yucky all black and green (though i like it on FP script editor).

 

Try to highlight it and make it it "code" like I did.



#59 gimli246

gimli246

    Enthusiast

  • Members
  • PipPipPip
  • 278 posts

  • Flag: Canada

  • Favorite Pinball: Monster Bash

Posted 14 December 2018 - 03:23 AM

Thanks man ...I'll give it a go.

Terry can you try the code for me ?



#60 TerryRed

TerryRed

    Pinball Wizard

  • Silver Supporter
  • 2,011 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 14 December 2018 - 03:26 AM

Thanks man ...I'll give it a go.

Terry can you try the code for me ?

 

 

I have been super sick for days... so I'm not in the best testing state on mind right now....but when I'm feeling better I'll see what I can do.